This class implements a config file-like interface over a memory-stored string list.
Use base class CConfigFileBase
's methods read_{int,float,double,string,...}()
and write()
to actually read and write values.
See: Configuration file format in MRPT
Definition at line 28 of file CConfigFileMemory.h.
#include <mrpt/utils/CConfigFileMemory.h>
Public Member Functions | |
CConfigFileMemory () | |
Empty constructor. Upon construction, call any of the "setContent" method. More... | |
CConfigFileMemory (const utils::CStringList &stringList) | |
Constructor and initialize from a list of strings. More... | |
CConfigFileMemory (const std::string &str) | |
Constructor and initialize from string with the whole "config file". More... | |
virtual | ~CConfigFileMemory () |
dtor More... | |
CConfigFileMemory (const CConfigFileMemory &o) | |
Copy constructor. More... | |
CConfigFileMemory & | operator= (const CConfigFileMemory &o) |
Copy operator. More... | |
void | setContent (const utils::CStringList &stringList) |
Changes the contents of the virtual "config file". More... | |
void | setContent (const std::string &str) |
Changes the contents of the virtual "config file". More... | |
void | getContent (std::string &str) const |
Return the current contents of the virtual "config file". More... | |
std::string | getContent () const |
void | getAllSections (vector_string §ions) const MRPT_OVERRIDE |
Returns a list with all the section names. More... | |
void | getAllKeys (const std::string §ion, vector_string &keys) const MRPT_OVERRIDE |
Returs a list with all the keys into a section. More... | |
bool | sectionExists (const std::string §ion_name) const |
Checks if a given section exists (name is case insensitive) More... | |
Save a configuration parameter. Optionally pads with spaces up to the desired width in number of characters (-1: no fill), and add a final comment field at the end of the line (a "// " prefix is automatically inserted). | |
template<typename data_t > | |
void | write (const std::string §ion, const std::string &name, const data_t &value, const int name_padding_width=-1, const int value_padding_width=-1, const std::string &comment=std::string()) |
template<typename data_t > | |
void | write (const std::string §ion, const std::string &name, const std::vector< data_t > &value, const int name_padding_width=-1, const int value_padding_width=-1, const std::string &comment=std::string()) |
void | write (const std::string §ion, const std::string &name, double value, const int name_padding_width=-1, const int value_padding_width=-1, const std::string &comment=std::string()) |
void | write (const std::string §ion, const std::string &name, float value, const int name_padding_width=-1, const int value_padding_width=-1, const std::string &comment=std::string()) |
Read a configuration parameter, launching exception if key name is not found and `failIfNotFound`=true | |
double | read_double (const std::string §ion, const std::string &name, double defaultValue, bool failIfNotFound=false) const |
float | read_float (const std::string §ion, const std::string &name, float defaultValue, bool failIfNotFound=false) const |
bool | read_bool (const std::string §ion, const std::string &name, bool defaultValue, bool failIfNotFound=false) const |
int | read_int (const std::string §ion, const std::string &name, int defaultValue, bool failIfNotFound=false) const |
uint64_t | read_uint64_t (const std::string §ion, const std::string &name, uint64_t defaultValue, bool failIfNotFound=false) const |
std::string | read_string (const std::string §ion, const std::string &name, const std::string &defaultValue, bool failIfNotFound=false) const |
std::string | read_string_first_word (const std::string §ion, const std::string &name, const std::string &defaultValue, bool failIfNotFound=false) const |
Reads a configuration parameter of type "string", and keeps only the first word (this can be used to eliminate possible comments at the end of the line) More... | |
template<class VECTOR_TYPE > | |
void | read_vector (const std::string §ion, const std::string &name, const VECTOR_TYPE &defaultValue, VECTOR_TYPE &outValues, bool failIfNotFound=false) const |
Reads a configuration parameter of type vector, stored in the file as a string: "[v1 v2 v3 ... ]", where spaces could also be commas. More... | |
template<class MATRIX_TYPE > | |
void | read_matrix (const std::string §ion, const std::string &name, MATRIX_TYPE &outMatrix, const MATRIX_TYPE &defaultMatrix=MATRIX_TYPE(), bool failIfNotFound=false) const |
Reads a configuration parameter as a matrix written in a matlab-like format - for example: "[2 3 4 ; 7 8 9]". More... | |
template<typename ENUMTYPE > | |
ENUMTYPE | read_enum (const std::string §ion, const std::string &name, const ENUMTYPE &defaultValue, bool failIfNotFound=false) const |
Reads an "enum" value, where the value in the config file can be either a numerical value or the symbolic name, for example: In the code: More... | |
Protected Member Functions | |
void | writeString (const std::string §ion, const std::string &name, const std::string &str) MRPT_OVERRIDE |
A virtual method to write a generic string. More... | |
std::string | readString (const std::string §ion, const std::string &name, const std::string &defaultStr, bool failIfNotFound=false) const MRPT_OVERRIDE |
A virtual method to read a generic string. More... | |
void | writeString (const std::string §ion, const std::string &name, const std::string &str, const int name_padding_width, const int value_padding_width, const std::string &comment) |
Write a generic string with optional padding and a comment field ("// ...") at the end of the line. More... | |
Private Attributes | |
void_ptr_noncopy | m_ini |
The IniFile object. More... | |
CConfigFileMemory::CConfigFileMemory | ( | ) |
Empty constructor. Upon construction, call any of the "setContent" method.
Definition at line 53 of file CConfigFileMemory.cpp.
CConfigFileMemory::CConfigFileMemory | ( | const utils::CStringList & | stringList | ) |
Constructor and initialize from a list of strings.
Definition at line 27 of file CConfigFileMemory.cpp.
References mrpt::utils::CStringList::getText(), and THE_INI.
CConfigFileMemory::CConfigFileMemory | ( | const std::string & | str | ) |
Constructor and initialize from string with the whole "config file".
Definition at line 41 of file CConfigFileMemory.cpp.
References THE_INI.
|
virtual |
CConfigFileMemory::CConfigFileMemory | ( | const CConfigFileMemory & | o | ) |
Copy constructor.
Definition at line 60 of file CConfigFileMemory.cpp.
|
virtual |
Returs a list with all the keys into a section.
Implements mrpt::utils::CConfigFileBase.
Definition at line 178 of file CConfigFileMemory.cpp.
Referenced by TEST(), and mrpt::gui::CPanelCameraSelection::writeConfigFromVideoSourcePanel().
|
virtual |
Returns a list with all the section names.
Implements mrpt::utils::CConfigFileBase.
Definition at line 162 of file CConfigFileMemory.cpp.
Referenced by TEST(), and mrpt::gui::CPanelCameraSelection::writeConfigFromVideoSourcePanel().
void CConfigFileMemory::getContent | ( | std::string & | str | ) | const |
Return the current contents of the virtual "config file".
Definition at line 99 of file CConfigFileMemory.cpp.
Referenced by mrpt::vision::checkerBoardCameraCalibration(), mrpt::utils::TStereoCamera::dumpAsText(), mrpt::utils::TCamera::dumpAsText(), mrpt::utils::CLoadableOptions::dumpToTextStream(), mrpt::obs::CObservation3DRangeScan::getDescriptionAsText(), and mrpt::nav::CAbstractNavigator::loadConfigFile().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 43 of file CConfigFileMemory.h.
References getContent().
Referenced by getContent().
CConfigFileMemory & CConfigFileMemory::operator= | ( | const CConfigFileMemory & | o | ) |
Copy operator.
Definition at line 68 of file CConfigFileMemory.cpp.
References mrpt::utils::non_copiable_ptr_basic< T >::get(), m_ini, and THE_INI.
|
inherited |
Definition at line 99 of file CConfigFileBase.cpp.
References mrpt::system::lowerCase(), and mrpt::system::trim().
Referenced by mrpt::detectors::CFaceDetection::init(), mrpt::maps::CRandomFieldGridMap2D::TInsertionOptionsCommon::internal_loadFromConfigFile_common(), mrpt::pbmap::config_heuristics::load_params(), mrpt::hwdrivers::C2DRangeFinderAbstract::loadCommonParams(), mrpt::hwdrivers::CSkeletonTracker::loadConfig_sensorSpecific(), mrpt::hwdrivers::CIMUIntersense::loadConfig_sensorSpecific(), mrpt::hwdrivers::CCANBusReader::loadConfig_sensorSpecific(), mrpt::hwdrivers::CSickLaserSerial::loadConfig_sensorSpecific(), mrpt::hwdrivers::CPhidgetInterfaceKitProximitySensors::loadConfig_sensorSpecific(), mrpt::hwdrivers::CSwissRanger3DCamera::loadConfig_sensorSpecific(), mrpt::hwdrivers::CGPSInterface::loadConfig_sensorSpecific(), mrpt::hwdrivers::COpenNI2_RGBD360::loadConfig_sensorSpecific(), mrpt::hwdrivers::COpenNI2Sensor::loadConfig_sensorSpecific(), mrpt::hwdrivers::CHokuyoURG::loadConfig_sensorSpecific(), mrpt::hwdrivers::CKinect::loadConfig_sensorSpecific(), mrpt::hwdrivers::CCameraSensor::loadConfig_sensorSpecific(), mrpt::maps::CGasConcentrationGridMap2D::TInsertionOptions::loadFromConfigFile(), mrpt::maps::CRandomFieldGridMap3D::TInsertionOptions::loadFromConfigFile(), mrpt::maps::CLandmarksMap::TInsertionOptions::loadFromConfigFile(), mrpt::maps::CLandmarksMap::TLikelihoodOptions::loadFromConfigFile(), mrpt::vision::TMatchingOptions::loadFromConfigFile(), mrpt::maps::COccupancyGridMap2D::TLikelihoodOptions::loadFromConfigFile(), mrpt::vision::TMultiResDescOptions::loadFromConfigFile(), mrpt::hwdrivers::TCaptureOptions_DUO3D::loadOptionsFrom(), mrpt::hwdrivers::TCaptureOptions_FlyCapture2::loadOptionsFrom(), mrpt::graphslam::CGraphSlamEngine< GRAPH_T >::loadParams(), readConfigFile(), CGraphSlamHandler< GRAPH_T >::readConfigFname(), mrpt::gui::CPanelCameraSelection::readConfigIntoVideoSourcePanel(), and run_test_pf_localization().
|
inherited |
Definition at line 65 of file CConfigFileBase.cpp.
Referenced by mrpt::detectors::CCascadeClassifierDetection::init(), mrpt::detectors::CFaceDetection::init(), mrpt::nav::PlannerTPS_VirtualBase::internal_loadConfig_PTG(), mrpt::hwdrivers::C2DRangeFinderAbstract::loadCommonParams(), mrpt::hwdrivers::CGenericSensor::loadConfig(), mrpt::hwdrivers::CGPSInterface::loadConfig_sensorSpecific(), mrpt::hwdrivers::CCameraSensor::loadConfig_sensorSpecific(), mrpt::utils::TCamera::loadFromConfigFile(), mrpt::maps::CRandomFieldGridMap3D::TInsertionOptions::loadFromConfigFile(), mrpt::maps::CLandmarksMap::TLikelihoodOptions::loadFromConfigFile(), mrpt::vision::TMultiResDescOptions::loadFromConfigFile(), mrpt::nav::CPTG_RobotShape_Polygonal::loadShapeFromConfigFile(), mrpt::topography::path_from_rtk_gps(), and TEST().
|
inlineinherited |
Reads an "enum" value, where the value in the config file can be either a numerical value or the symbolic name, for example: In the code:
In the config file:
Which can be loaded with:
Definition at line 163 of file CConfigFileBase.h.
References MRPT_END, MRPT_START, mrpt::utils::TEnumType< ENUMTYPE >::name2value(), and THROW_EXCEPTION_FMT.
Referenced by mrpt::hwdrivers::CVelodyneScanner::loadConfig_sensorSpecific(), mrpt::hwdrivers::CGPSInterface::loadConfig_sensorSpecific(), mrpt::hwdrivers::CKinect::loadConfig_sensorSpecific(), mrpt::slam::CICP::TConfigParams::loadFromConfigFile(), and mrpt::slam::CMetricMapBuilderRBPF::TConstructionOptions::loadFromConfigFile().
|
inherited |
Definition at line 73 of file CConfigFileBase.cpp.
Referenced by mrpt::maps::CRandomFieldGridMap2D::TInsertionOptionsCommon::internal_loadFromConfigFile_common(), mrpt::pbmap::config_heuristics::load_params(), mrpt::hwdrivers::CWirelessPower::loadConfig_sensorSpecific(), mrpt::hwdrivers::CGillAnemometer::loadConfig_sensorSpecific(), mrpt::hwdrivers::CRaePID::loadConfig_sensorSpecific(), mrpt::hwdrivers::CIMUXSens_MT4::loadConfig_sensorSpecific(), mrpt::hwdrivers::CIMUXSens::loadConfig_sensorSpecific(), mrpt::hwdrivers::CSickLaserUSB::loadConfig_sensorSpecific(), mrpt::hwdrivers::CSkeletonTracker::loadConfig_sensorSpecific(), mrpt::hwdrivers::CIMUIntersense::loadConfig_sensorSpecific(), mrpt::hwdrivers::CGyroKVHDSP3000::loadConfig_sensorSpecific(), mrpt::hwdrivers::CRoboPeakLidar::loadConfig_sensorSpecific(), mrpt::hwdrivers::CIbeoLuxETH::loadConfig_sensorSpecific(), mrpt::hwdrivers::CSickLaserSerial::loadConfig_sensorSpecific(), mrpt::hwdrivers::CBoardSonars::loadConfig_sensorSpecific(), mrpt::hwdrivers::CLMS100Eth::loadConfig_sensorSpecific(), mrpt::hwdrivers::CPhidgetInterfaceKitProximitySensors::loadConfig_sensorSpecific(), mrpt::hwdrivers::CVelodyneScanner::loadConfig_sensorSpecific(), mrpt::hwdrivers::CSwissRanger3DCamera::loadConfig_sensorSpecific(), mrpt::hwdrivers::CGPSInterface::loadConfig_sensorSpecific(), mrpt::hwdrivers::COpenNI2_RGBD360::loadConfig_sensorSpecific(), mrpt::hwdrivers::COpenNI2Sensor::loadConfig_sensorSpecific(), mrpt::hwdrivers::CHokuyoURG::loadConfig_sensorSpecific(), mrpt::hwdrivers::CKinect::loadConfig_sensorSpecific(), mrpt::hwdrivers::CCameraSensor::loadConfig_sensorSpecific(), mrpt::maps::CGasConcentrationGridMap2D::TInsertionOptions::loadFromConfigFile(), mrpt::slam::CICP::TConfigParams::loadFromConfigFile(), mrpt::maps::CBeaconMap::TLikelihoodOptions::loadFromConfigFile(), mrpt::vision::TStereoSystemParams::loadFromConfigFile(), mrpt::maps::CLandmarksMap::TInsertionOptions::loadFromConfigFile(), mrpt::maps::CLandmarksMap::TLikelihoodOptions::loadFromConfigFile(), mrpt::vision::TMatchingOptions::loadFromConfigFile(), mrpt::maps::COccupancyGridMap2D::TLikelihoodOptions::loadFromConfigFile(), mrpt::hwdrivers::TCaptureOptions_DUO3D::loadOptionsFrom(), mrpt::hwdrivers::TCaptureOptions_FlyCapture2::loadOptionsFrom(), readConfigFile(), and run_test_pf_localization().
|
inherited |
Definition at line 81 of file CConfigFileBase.cpp.
Referenced by mrpt::detectors::CCascadeClassifierDetection::init(), mrpt::detectors::CFaceDetection::init(), mrpt::nav::PlannerTPS_VirtualBase::internal_loadConfig_PTG(), mrpt::maps::CRandomFieldGridMap2D::TInsertionOptionsCommon::internal_loadFromConfigFile_common(), mrpt::pbmap::config_heuristics::load_params(), mrpt::hwdrivers::CGenericSensor::loadConfig(), mrpt::hwdrivers::CRoboticHeadInterface::loadConfig_sensorSpecific(), mrpt::hwdrivers::CGillAnemometer::loadConfig_sensorSpecific(), mrpt::hwdrivers::CRaePID::loadConfig_sensorSpecific(), mrpt::hwdrivers::CIMUXSens_MT4::loadConfig_sensorSpecific(), mrpt::hwdrivers::CIMUXSens::loadConfig_sensorSpecific(), mrpt::hwdrivers::CIMUIntersense::loadConfig_sensorSpecific(), mrpt::hwdrivers::CImpinjRFID::loadConfig_sensorSpecific(), mrpt::hwdrivers::CCANBusReader::loadConfig_sensorSpecific(), mrpt::hwdrivers::CSickLaserSerial::loadConfig_sensorSpecific(), mrpt::hwdrivers::CBoardSonars::loadConfig_sensorSpecific(), mrpt::hwdrivers::CLMS100Eth::loadConfig_sensorSpecific(), mrpt::hwdrivers::CPhidgetInterfaceKitProximitySensors::loadConfig_sensorSpecific(), mrpt::hwdrivers::CSwissRanger3DCamera::loadConfig_sensorSpecific(), mrpt::hwdrivers::CGPSInterface::loadConfig_sensorSpecific(), mrpt::hwdrivers::COpenNI2_RGBD360::loadConfig_sensorSpecific(), mrpt::hwdrivers::COpenNI2Sensor::loadConfig_sensorSpecific(), mrpt::hwdrivers::CHokuyoURG::loadConfig_sensorSpecific(), mrpt::hwdrivers::CKinect::loadConfig_sensorSpecific(), mrpt::hwdrivers::CCameraSensor::loadConfig_sensorSpecific(), mrpt::maps::CGasConcentrationGridMap2D::TInsertionOptions::loadFromConfigFile(), mrpt::maps::CMultiMetricMapPDF::TPredictionParams::loadFromConfigFile(), mrpt::vision::TStereoSystemParams::loadFromConfigFile(), mrpt::maps::CLandmarksMap::TInsertionOptions::loadFromConfigFile(), mrpt::maps::CLandmarksMap::TLikelihoodOptions::loadFromConfigFile(), mrpt::vision::TMatchingOptions::loadFromConfigFile(), mrpt::maps::COccupancyGridMap2D::TLikelihoodOptions::loadFromConfigFile(), mrpt::vision::TMultiResDescOptions::loadFromConfigFile(), mrpt::hwdrivers::TCaptureOptions_DUO3D::loadOptionsFrom(), mrpt::hwdrivers::TCaptureOptions_FlyCapture2::loadOptionsFrom(), mrpt::graphslam::CGraphSlamEngine< GRAPH_T >::loadParams(), readConfigFile(), mrpt::gui::CPanelCameraSelection::readConfigIntoVideoSourcePanel(), run_test_pf_localization(), and TEST().
|
inlineinherited |
Reads a configuration parameter as a matrix written in a matlab-like format - for example: "[2 3 4 ; 7 8 9]".
This template method can be instantiated for matrices of the types: int, long, unsinged int, unsigned long, float, double, long double
std::exception | If the key name is not found and "failIfNotFound" is true. Otherwise the "defaultValue" is returned. |
Definition at line 126 of file CConfigFileBase.h.
References THROW_EXCEPTION_FMT.
Referenced by mrpt::topography::path_from_rtk_gps().
|
inherited |
Definition at line 112 of file CConfigFileBase.cpp.
References mrpt::system::trim().
Referenced by mrpt::detectors::CCascadeClassifierDetection::init(), mrpt::nav::PlannerTPS_VirtualBase::internal_loadConfig_PTG(), mrpt::maps::CRandomFieldGridMap2D::TInsertionOptionsCommon::internal_loadFromConfigFile_common(), mrpt::pbmap::config_heuristics::load_params(), mrpt::hwdrivers::CGenericSensor::loadConfig(), mrpt::hwdrivers::CWirelessPower::loadConfig_sensorSpecific(), mrpt::hwdrivers::CRoboticHeadInterface::loadConfig_sensorSpecific(), mrpt::hwdrivers::CGillAnemometer::loadConfig_sensorSpecific(), mrpt::hwdrivers::CRaePID::loadConfig_sensorSpecific(), mrpt::hwdrivers::CIMUXSens_MT4::loadConfig_sensorSpecific(), mrpt::hwdrivers::CIMUXSens::loadConfig_sensorSpecific(), mrpt::hwdrivers::CSickLaserUSB::loadConfig_sensorSpecific(), mrpt::hwdrivers::CEnoseModular::loadConfig_sensorSpecific(), mrpt::hwdrivers::CBoardENoses::loadConfig_sensorSpecific(), mrpt::hwdrivers::CImpinjRFID::loadConfig_sensorSpecific(), mrpt::hwdrivers::CGyroKVHDSP3000::loadConfig_sensorSpecific(), mrpt::hwdrivers::CRoboPeakLidar::loadConfig_sensorSpecific(), mrpt::hwdrivers::CCANBusReader::loadConfig_sensorSpecific(), mrpt::hwdrivers::CSickLaserSerial::loadConfig_sensorSpecific(), mrpt::hwdrivers::CBoardSonars::loadConfig_sensorSpecific(), mrpt::hwdrivers::CLMS100Eth::loadConfig_sensorSpecific(), mrpt::hwdrivers::CPhidgetInterfaceKitProximitySensors::loadConfig_sensorSpecific(), mrpt::hwdrivers::CSwissRanger3DCamera::loadConfig_sensorSpecific(), mrpt::hwdrivers::CGPSInterface::loadConfig_sensorSpecific(), mrpt::hwdrivers::COpenNI2Sensor::loadConfig_sensorSpecific(), mrpt::hwdrivers::CHokuyoURG::loadConfig_sensorSpecific(), mrpt::hwdrivers::CNationalInstrumentsDAQ::loadConfig_sensorSpecific(), mrpt::hwdrivers::CKinect::loadConfig_sensorSpecific(), mrpt::hwdrivers::CCameraSensor::loadConfig_sensorSpecific(), mrpt::maps::CGasConcentrationGridMap2D::TInsertionOptions::loadFromConfigFile(), mrpt::utils::TStereoCamera::loadFromConfigFile(), mrpt::maps::CHeightGridMap2D::TInsertionOptions::loadFromConfigFile(), mrpt::hwdrivers::TCaptureOptions_DUO3D::loadOptionsFrom(), mrpt::hwdrivers::TCaptureOptions_FlyCapture2::loadOptionsFrom(), mrpt::graphslam::CGraphSlamEngine< GRAPH_T >::loadParams(), readConfigFile(), CGraphSlamHandler< GRAPH_T >::readConfigFname(), mrpt::gui::CPanelCameraSelection::readConfigIntoVideoSourcePanel(), run_test_pf_localization(), TEST(), and mrpt::gui::CPanelCameraSelection::writeConfigFromVideoSourcePanel().
|
inherited |
Reads a configuration parameter of type "string", and keeps only the first word (this can be used to eliminate possible comments at the end of the line)
Definition at line 120 of file CConfigFileBase.cpp.
References THROW_EXCEPTION, and mrpt::system::tokenize().
Referenced by mrpt::hwdrivers::CCameraSensor::loadConfig_sensorSpecific().
|
inherited |
Definition at line 90 of file CConfigFileBase.cpp.
References mrpt::system::os::_strtoull().
Referenced by mrpt::hwdrivers::CEnoseModular::loadConfig_sensorSpecific(), mrpt::hwdrivers::CBoardENoses::loadConfig_sensorSpecific(), mrpt::hwdrivers::CSwissRanger3DCamera::loadConfig_sensorSpecific(), mrpt::hwdrivers::CNationalInstrumentsDAQ::loadConfig_sensorSpecific(), mrpt::maps::TSetOfMetricMapInitializers::loadFromConfigFile(), and mrpt::hwdrivers::TCaptureOptions_FlyCapture2::loadOptionsFrom().
|
inlineinherited |
Reads a configuration parameter of type vector, stored in the file as a string: "[v1 v2 v3 ... ]", where spaces could also be commas.
std::exception | If the key name is not found and "failIfNotFound" is true. Otherwise the "defaultValue" is returned. |
Definition at line 92 of file CConfigFileBase.h.
References mrpt::system::tokenize().
Referenced by mrpt::hwdrivers::C2DRangeFinderAbstract::loadCommonParams(), mrpt::hwdrivers::CRoboticHeadInterface::loadConfig_sensorSpecific(), mrpt::hwdrivers::CBoardENoses::loadConfig_sensorSpecific(), mrpt::hwdrivers::CBoardSonars::loadConfig_sensorSpecific(), mrpt::utils::TCamera::loadFromConfigFile(), mrpt::vision::TStereoSystemParams::loadFromConfigFile(), mrpt::maps::COccupancyGridMap2D::TLikelihoodOptions::loadFromConfigFile(), mrpt::vision::TMultiResDescOptions::loadFromConfigFile(), and run_test_pf_localization().
|
protectedvirtual |
A virtual method to read a generic string.
Implements mrpt::utils::CConfigFileBase.
Definition at line 129 of file CConfigFileMemory.cpp.
References mrpt::format(), MRPT_END, MRPT_START, and THROW_EXCEPTION.
|
inherited |
Checks if a given section exists (name is case insensitive)
Definition at line 139 of file CConfigFileBase.cpp.
References mrpt::system::os::_strcmpi().
Referenced by mrpt::hwdrivers::CPhidgetInterfaceKitProximitySensors::loadConfig_sensorSpecific(), and mrpt::hwdrivers::COpenNI2Sensor::loadConfig_sensorSpecific().
void CConfigFileMemory::setContent | ( | const utils::CStringList & | stringList | ) |
Changes the contents of the virtual "config file".
Definition at line 80 of file CConfigFileMemory.cpp.
References mrpt::utils::CStringList::getText(), and THE_INI.
Referenced by mrpt::obs::CRawlog::getCommentTextAsConfigFile(), and TEST().
void CConfigFileMemory::setContent | ( | const std::string & | str | ) |
Changes the contents of the virtual "config file".
Definition at line 91 of file CConfigFileMemory.cpp.
References THE_INI.
|
inlineinherited |
Definition at line 63 of file CConfigFileBase.h.
Referenced by run_rnav_test(), mrpt::nav::CPTG_DiffDrive_CCS::saveToConfigFile(), mrpt::nav::CPTG_DiffDrive_CC::saveToConfigFile(), mrpt::nav::CPTG_DiffDrive_CS::saveToConfigFile(), mrpt::nav::CPTG_Holo_Blend::saveToConfigFile(), mrpt::nav::CPTG_DiffDrive_alpha::saveToConfigFile(), mrpt::nav::CPTG_DiffDrive_C::saveToConfigFile(), mrpt::utils::TStereoCamera::saveToConfigFile(), mrpt::utils::TCamera::saveToConfigFile(), mrpt::nav::CPTG_DiffDrive_CollisionGridBased::saveToConfigFile(), mrpt::nav::CParameterizedTrajectoryGenerator::saveToConfigFile(), mrpt::nav::CPTG_RobotShape_Polygonal::saveToConfigFile(), mrpt::nav::CPTG_RobotShape_Circular::saveToConfigFile(), mrpt::vision::TMultiResDescMatchOptions::saveToConfigFile(), mrpt::vision::TMultiResDescOptions::saveToConfigFile(), TEST(), and mrpt::gui::CPanelCameraSelection::writeConfigFromVideoSourcePanel().
|
inlineinherited |
Definition at line 70 of file CConfigFileBase.h.
|
inherited |
Definition at line 27 of file CConfigFileBase.cpp.
|
inherited |
Definition at line 31 of file CConfigFileBase.cpp.
|
protectedinherited |
Write a generic string with optional padding and a comment field ("// ...") at the end of the line.
Definition at line 37 of file CConfigFileBase.cpp.
References mrpt::format().
|
protectedvirtual |
A virtual method to write a generic string.
Implements mrpt::utils::CConfigFileBase.
Definition at line 115 of file CConfigFileMemory.cpp.
References MRPT_END, MRPT_START, THE_INI, and THROW_EXCEPTION.
|
private |
Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020 |