Main MRPT website > C++ reference for MRPT 1.9.9
io/include/mrpt/io/vector_loadsave.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include <string>
12 #include <vector>
13 
14 namespace mrpt
15 {
16 namespace io
17 {
18 /** @defgroup vector_loadsave Load and save vectors to files (in #include
19  * <mrpt/io/vector_loadsave.h>)
20  * \ingroup mrpt_io_grp
21  * @{ */
22 
23 /** Saves a vector directly as a binary dump to a file:
24  * \return Returns false on any error, true on everything OK.
25  * \sa loadBinaryFile
26  */
28  const std::vector<uint8_t>& vec, const std::string& fileName);
29 
30 /** Loads a entire file as a vector of bytes.
31  * \return Returns false on any error, true on everything OK.
32  * \sa vectorToBinaryFile
33  */
34 bool loadBinaryFile(
35  std::vector<uint8_t>& out_data, const std::string& fileName);
36 
37 /** Loads a text file as a vector of string lines.
38  * \return Returns false on any error, true on everything OK.
39  */
40 bool loadTextFile(std::vector<std::string>& o, const std::string& fileName);
41 /** @} */
42 
43 } // namespace io
44 } // namespace mrpt
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
mrpt::io::loadBinaryFile
bool loadBinaryFile(std::vector< uint8_t > &out_data, const std::string &fileName)
Loads a entire file as a vector of bytes.
Definition: system/src/vector_loadsave.cpp:20
mrpt::io::loadTextFile
bool loadTextFile(std::vector< std::string > &o, const std::string &fileName)
Loads a text file as a vector of string lines.
Definition: system/src/vector_loadsave.cpp:58
string
GLsizei const GLchar ** string
Definition: glext.h:4101
mrpt::io::vectorToBinaryFile
bool vectorToBinaryFile(const std::vector< uint8_t > &vec, const std::string &fileName)
Saves a vector directly as a binary dump to a file:
Definition: system/src/vector_loadsave.cpp:43



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST