Go to the documentation of this file.
52 explicit CStringList(
const std::deque<std::string>& lines) : m_strings(lines) { }
57 std::copy(lines.begin(),lines.end(),std::back_inserter(m_strings));
63 void add(
const std::string &str );
71 void insert(
size_t index,
const std::string &str );
76 void set(
size_t index,
const std::string &str );
88 void remove(
size_t index);
94 const std::string &compareText,
96 bool caseSensitive =
true)
const;
100 void get(
size_t index, std::string &outText)
const;
104 std::string operator ()(
size_t index)
const;
108 std::string& operator ()(
size_t index);
112 void getText(std::string &outText)
const;
125 void setText(
const std::string &inText);
129 void loadFromFile(
const std::string &fileName);
133 void saveToFile(
const std::string &fileName)
const;
138 std::string get_string(
const std::string &keyName );
143 float get_float(
const std::string &keyName );
148 int get_int(
const std::string &keyName );
153 double get_double(
const std::string &keyName );
158 bool get_bool(
const std::string &keyName );
162 void set(
const std::string &keyName,
const std::string &value );
166 void set(
const std::string &keyName,
const int &value );
170 void set(
const std::string &keyName,
const float &value );
174 void set(
const std::string &keyName,
const double &value );
178 void set(
const std::string &keyName,
const bool &value );
CStringList(const std::vector< std::string > &lines)
Explicit constructor from vector<string>
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE(class_name, base_name)
size_t size(const MATRIXLIKE &m, int dim)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
CStringList(const std::deque< std::string > &lines)
Explicit constructor from deque<string>
The virtual base class which provides a unified interface for all persistent objects in MRPT.
std::deque< std::string > m_strings
The internal list of strings.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
std::string getText() const
Returns the whole string list as a single string with '\r ' characters for newlines.
CStream BASE_IMPEXP & operator<<(mrpt::utils::CStream &s, const char *a)
A class for storing a list of text lines.
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE(class_name, base_name)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
Page generated by Doxygen 1.8.16 for MRPT 1.4.0 SVN: at Mon Oct 14 23:11:08 UTC 2019 | | |