Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
orxonox::ConfigFileEntryValue Class Reference

This class represents a normal value in the config file. More...

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/config/ConfigFileEntryValue.h>

Inheritance diagram for orxonox::ConfigFileEntryValue:
orxonox::ConfigFileEntry orxonox::ConfigFileEntryVectorValue

Public Member Functions

 ConfigFileEntryValue (const std::string &name, const std::string &value="", bool bString=false, const std::string &additionalComment="")
 Constructor: Initializes the entry. More...
 
virtual ~ConfigFileEntryValue ()=default
 Destructor. More...
 
virtual const std::string & getFileEntry () const override
 Returns the line as it will be stored in the config file. More...
 
virtual const std::string & getKeyString () const
 Returns the "key" of the value (in this case it's just the name of the entry, but for vectors it's different) More...
 
virtual const std::string & getName () const override
 Returns the name of the entry. More...
 
virtual const std::string & getValue () const override
 Returns the value of the entry. More...
 
virtual void setComment (const std::string &comment) override
 Changes the comment of the entry (will be placed after the value) More...
 
virtual void setString (bool bString) override
 Defines if this entry is treated as string which means some special treatment of special characters. More...
 
virtual void setValue (const std::string &value) override
 Changes the value of the entry. More...
 
- Public Member Functions inherited from orxonox::ConfigFileEntry
virtual ~ConfigFileEntry ()=default
 Destructor. More...
 
virtual unsigned int getIndex () const
 Returns the index of the entry in a vector (used only if it is a vector) More...
 

Protected Member Functions

virtual void update ()
 Updates the string that will be stored in the file after one of it's components (name, value, comment) has changed. More...
 

Protected Attributes

std::string additionalComment_
 The additional comment. More...
 
bool bString_
 If true, the value is treated as string which means some special treatment of special characters. More...
 
std::string fileEntry_
 The string as it will be stored in the config file. More...
 
const std::string name_
 The name of the value. More...
 
std::string value_
 The value. More...
 

Detailed Description

This class represents a normal value in the config file.

Constructor & Destructor Documentation

orxonox::ConfigFileEntryValue::ConfigFileEntryValue ( const std::string &  name,
const std::string &  value = "",
bool  bString = false,
const std::string &  additionalComment = "" 
)
inline

Constructor: Initializes the entry.

Parameters
nameThe name of the entry
valueThe value of the entry
bStringIf true, the value is treated as string which means some special treatment of special characters.
additionalCommentAn optional comment that will be placed behind the value in the config file
virtual orxonox::ConfigFileEntryValue::~ConfigFileEntryValue ( )
inlinevirtualdefault

Destructor.

Member Function Documentation

virtual const std::string& orxonox::ConfigFileEntryValue::getFileEntry ( ) const
inlineoverridevirtual

Returns the line as it will be stored in the config file.

Implements orxonox::ConfigFileEntry.

virtual const std::string& orxonox::ConfigFileEntryValue::getKeyString ( ) const
inlinevirtual

Returns the "key" of the value (in this case it's just the name of the entry, but for vectors it's different)

Reimplemented in orxonox::ConfigFileEntryVectorValue.

virtual const std::string& orxonox::ConfigFileEntryValue::getName ( ) const
inlineoverridevirtual

Returns the name of the entry.

Implements orxonox::ConfigFileEntry.

virtual const std::string& orxonox::ConfigFileEntryValue::getValue ( ) const
inlineoverridevirtual

Returns the value of the entry.

Implements orxonox::ConfigFileEntry.

virtual void orxonox::ConfigFileEntryValue::setComment ( const std::string &  comment)
inlineoverridevirtual

Changes the comment of the entry (will be placed after the value)

Implements orxonox::ConfigFileEntry.

virtual void orxonox::ConfigFileEntryValue::setString ( bool  bString)
inlineoverridevirtual

Defines if this entry is treated as string which means some special treatment of special characters.

Implements orxonox::ConfigFileEntry.

virtual void orxonox::ConfigFileEntryValue::setValue ( const std::string &  value)
inlineoverridevirtual

Changes the value of the entry.

Implements orxonox::ConfigFileEntry.

void orxonox::ConfigFileEntryValue::update ( )
protectedvirtual

Updates the string that will be stored in the file after one of it's components (name, value, comment) has changed.

Reimplemented in orxonox::ConfigFileEntryVectorValue.

Member Data Documentation

std::string orxonox::ConfigFileEntryValue::additionalComment_
protected

The additional comment.

bool orxonox::ConfigFileEntryValue::bString_
protected

If true, the value is treated as string which means some special treatment of special characters.

std::string orxonox::ConfigFileEntryValue::fileEntry_
protected

The string as it will be stored in the config file.

const std::string orxonox::ConfigFileEntryValue::name_
protected

The name of the value.

std::string orxonox::ConfigFileEntryValue::value_
protected

The value.


The documentation for this class was generated from the following files: