namespace mrpt::io
Overview
namespace io { // namespaces namespace mrpt::io::internal; namespace mrpt::io::zip; // typedefs typedef int TFileOpenModes; // enums enum { fomRead = 1, fomWrite = 2, fomAppend = 4, }; enum OpenMode; // classes class CFileGZInputStream; class CFileGZOutputStream; class CFileInputStream; class CFileOutputStream; class CFileStream; class CMemoryStream; class CPipe; class CPipeBaseEndPoint; class CPipeReadEndPoint; class CPipeWriteEndPoint; class CStream; class CTextFileLinesParser; // global functions template <typename MATRIX> void load_csv(const std::string& path, MATRIX& M); std::string lazy_load_absolute_path(const std::string& relativeOrAbsolutePath); const std::string& getLazyLoadPathBase(); void setLazyLoadPathBase(const std::string& path); void registerAllClasses_mrpt_io(); bool vectorToBinaryFile(const std::vector<uint8_t>& vec, const std::string& fileName); bool loadBinaryFile(std::vector<uint8_t>& out_data, const std::string& fileName); bool loadTextFile(std::vector<std::string>& o, const std::string& fileName); std::string file_get_contents(const std::string& fileName); bool vectorToTextFile( const std::vector<float>& vec, const std::string& fileName, bool append = false, bool byRows = false ); bool vectorToTextFile( const std::vector<double>& vec, const std::string& fileName, bool append = false, bool byRows = false ); bool vectorToTextFile( const std::vector<int>& vec, const std::string& fileName, bool append = false, bool byRows = false ); bool vectorToTextFile( const std::vector<size_t>& vec, const std::string& fileName, bool append = false, bool byRows = false ); template <class EIGEN_MATRIX> bool vectorToTextFile( const EIGEN_MATRIX& vec, const std::string& fileName ); bool vectorNumericFromTextFile( std::vector<double>& vec, const std::string& fileName, const bool byRows = false ); } // namespace io
Typedefs
typedef int TFileOpenModes
File open modes are used in CFileStream Posible values are:
fomRead
fomWrite (creates the file if it didn’t exist, otherwise truncates it).
fomAppend (creates the file if it didn’t exist)