|
LuxCore
2.0
|
A container for multiple Property. More...
#include <properties.h>

Public Member Functions | |
| Properties () | |
| Properties (const std::string &fileName) | |
| Sets the list of Property from a text file . More... | |
| ~Properties () | |
| unsigned int | GetSize () const |
| Returns the number of Property in this container. More... | |
| Properties & | Set (const Property &prop) |
| Sets a single Property. More... | |
| Properties & | operator<< (const Property &prop) |
| Sets a single Property. More... | |
| Properties & | Set (const Properties &prop) |
| Sets the list of Property. More... | |
| Properties & | operator<< (const Properties &props) |
| Sets the list of Property. More... | |
| Properties & | Set (const Properties &props, const std::string &prefix) |
| Sets the list of Property while adding a prefix to all names. More... | |
| Properties & | SetFromStream (std::istream &stream) |
| Sets the list of Property coming from a stream. More... | |
| Properties & | SetFromFile (const std::string &fileName) |
| Sets the list of Property coming from a file. More... | |
| Properties & | SetFromString (const std::string &propDefinitions) |
| Sets the list of Property coming from a std::string. More... | |
| Properties & | Clear () |
| Removes all Property from the container. More... | |
| const std::vector< std::string > & | GetAllNames () const |
| Returns all Property names defined. More... | |
| std::vector< std::string > | GetAllNames (const std::string &prefix) const |
| Returns all Property names that start with a specific prefix. More... | |
| std::vector< std::string > | GetAllNamesRE (const std::string ®ularExpression) const |
| Returns all Property unique names that match the passed regular expression. More... | |
| std::vector< std::string > | GetAllUniqueSubNames (const std::string &prefix) const |
| Returns all Property unique names that start with a specific prefix. More... | |
| bool | HaveNames (const std::string &prefix) const |
| Returns if there are at least a Property starting for specific prefix. More... | |
| bool | HaveNamesRE (const std::string ®ularExpression) const |
| Returns all a copy of all Property with a name starting with a specific prefix. More... | |
| Properties | GetAllProperties (const std::string &prefix) const |
| Returns a copy of all Property with a name matching the passed regular expression. More... | |
| const Property & | Get (const std::string &propName) const |
| Returns a property. More... | |
| const Property & | Get (const Property &defaultProp) const |
| Returns a Property with the same name of the passed Property if it has been defined or the passed Property itself (i.e. the default values). More... | |
| bool | IsDefined (const std::string &propName) const |
| Returns if a Property with the given name has been defined. More... | |
| void | Delete (const std::string &propName) |
| Deletes a Property with the given name. More... | |
| void | DeleteAll (const std::vector< std::string > &propNames) |
| Deletes all listed Property. More... | |
| std::string | ToString () const |
| Converts all Properties in a string. More... | |
Private Attributes | |
| std::vector< std::string > | names |
| std::map< std::string, Property > | props |
A container for multiple Property.
Properties is a container for instances of Property class. It keeps also track of the insertion order.
Definition at line 502 of file properties.h.
|
inline |
Definition at line 504 of file properties.h.
| luxrays::Properties::Properties | ( | const std::string & | fileName | ) |
Sets the list of Property from a text file .
| fileName | is the name of the file to read. |
|
inline |
Definition at line 511 of file properties.h.
| Properties& luxrays::Properties::Clear | ( | ) |
Removes all Property from the container.
| void luxrays::Properties::Delete | ( | const std::string & | propName | ) |
| void luxrays::Properties::DeleteAll | ( | const std::vector< std::string > & | propNames | ) |
| const Property& luxrays::Properties::Get | ( | const std::string & | propName | ) | const |
| const std::vector<std::string>& luxrays::Properties::GetAllNames | ( | ) | const |
| std::vector<std::string> luxrays::Properties::GetAllNames | ( | const std::string & | prefix | ) | const |
| std::vector<std::string> luxrays::Properties::GetAllNamesRE | ( | const std::string & | regularExpression | ) | const |
| Properties luxrays::Properties::GetAllProperties | ( | const std::string & | prefix | ) | const |
| std::vector<std::string> luxrays::Properties::GetAllUniqueSubNames | ( | const std::string & | prefix | ) | const |
Returns all Property unique names that start with a specific prefix.
For instance, given the the following names:
GetAllUniqueSubNames("test") will return:
| prefix | of the Property names to return. |
| unsigned int luxrays::Properties::GetSize | ( | ) | const |
| bool luxrays::Properties::HaveNames | ( | const std::string & | prefix | ) | const |
| bool luxrays::Properties::HaveNamesRE | ( | const std::string & | regularExpression | ) | const |
| bool luxrays::Properties::IsDefined | ( | const std::string & | propName | ) | const |
| Properties& luxrays::Properties::operator<< | ( | const Property & | prop | ) |
| Properties& luxrays::Properties::operator<< | ( | const Properties & | props | ) |
| Properties& luxrays::Properties::Set | ( | const Property & | prop | ) |
| Properties& luxrays::Properties::Set | ( | const Properties & | prop | ) |
| Properties& luxrays::Properties::Set | ( | const Properties & | props, |
| const std::string & | prefix | ||
| ) |
| Properties& luxrays::Properties::SetFromFile | ( | const std::string & | fileName | ) |
Sets the list of Property coming from a file.
| fileName | is the name of the file to read. |
| Properties& luxrays::Properties::SetFromStream | ( | std::istream & | stream | ) |
Sets the list of Property coming from a stream.
| stream | is the input stream to read. |
| Properties& luxrays::Properties::SetFromString | ( | const std::string & | propDefinitions | ) |
| std::string luxrays::Properties::ToString | ( | ) | const |
Converts all Properties in a string.
Referenced by luxrays::operator<<().
|
private |
Definition at line 713 of file properties.h.
|
private |
Definition at line 714 of file properties.h.