Abstact a dictionary to store and get attributes.  
 More...
#include <dict.h>
|  | 
|  | Dict () | 
|  | Creates a new empty dictionary. 
 | 
|  | 
|  | Dict (const string &attr, const double &attr_value) | 
|  | Creates a new dictionary with a initial pair.  More... 
 | 
|  | 
|  | Dict (const map< string, double > &m) | 
|  | Creates a new dictionary from a existing map container.  More... 
 | 
|  | 
| virtual | ~Dict () | 
|  | Destructor. 
 | 
|  | 
| const double | operator[] (const string &attr_name) const | 
|  | Enables the use of the [] on the instance to access values.  More... 
 | 
|  | 
| double & | operator[] (const string &attr_name) | 
|  | Enables the use of the [] on the instance to access values.  More... 
 | 
|  | 
| const bool | IsAttribute (const string &attr_name) const | 
|  | Query if a there is a key matching the argument on the dictionary. Return true on success, false on failure.  More... 
 | 
|  | 
| const unsigned int | NumAttributes () const | 
|  | Return the amount of pairs on the dictionary. 
 | 
|  | 
| void | AddAttribute (const string &attr_name, double const &attr_value) | 
|  | Adds a new pair to the dictionary.  More... 
 | 
|  | 
| const map< string, double > | GetAttributes () const | 
|  | Return a copy of the internal map container. 
 | 
|  | 
| void | SetAttributes (const map< string, double > attr_map) | 
|  | Overwrites or copy the argument on the internal container.  More... 
 | 
|  | 
| const double | GetAttribute (const string &attr_name) | 
|  | Return the value associated with the given key.  More... 
 | 
|  | 
Abstact a dictionary to store and get attributes. 
      
        
          | delphos::Dict::Dict | ( | const string & | attr, | 
        
          |  |  | const double & | attr_value | 
        
          |  | ) |  |  | 
      
 
Creates a new dictionary with a initial pair. 
- Parameters
- 
  
    | attr | The key for the initial pair. |  | attr_value | The value associated to the key. |  
 
 
 
      
        
          | delphos::Dict::Dict | ( | const map< string, double > & | m | ) |  | 
      
 
Creates a new dictionary from a existing map container. 
- Parameters
- 
  
    | m | A existing map-type container. |  
 
 
 
      
        
          | void delphos::Dict::AddAttribute | ( | const string & | attr_name, | 
        
          |  |  | double const & | attr_value | 
        
          |  | ) |  |  | 
      
 
Adds a new pair to the dictionary. 
- Parameters
- 
  
    | attr_name | The key (name) to be inserted. |  | attr_value | The value associated to the corresponding key (attr_name). |  
 
 
 
      
        
          | const double delphos::Dict::GetAttribute | ( | const string & | attr_name | ) |  | 
      
 
Return the value associated with the given key. 
- Parameters
- 
  
    | attr_name | The key (name) to be queried. |  
 
 
 
      
        
          | const bool delphos::Dict::IsAttribute | ( | const string & | attr_name | ) | const | 
      
 
Query if a there is a key matching the argument on the dictionary. Return true on success, false on failure. 
- Parameters
- 
  
    | attr_name | The key (name) to be queried. |  
 
 
 
      
        
          | const double delphos::Dict::operator[] | ( | const string & | attr_name | ) | const | 
      
 
Enables the use of the [] on the instance to access values. 
- Parameters
- 
  
    | attr_name | The key (name) to be queried. |  
 
 
 
      
        
          | double & delphos::Dict::operator[] | ( | const string & | attr_name | ) |  | 
      
 
Enables the use of the [] on the instance to access values. 
- Parameters
- 
  
    | attr_name | The key (name) to be queried. |  
 
 
 
      
        
          | void delphos::Dict::SetAttributes | ( | const map< string, double > | attr_map | ) |  | 
      
 
Overwrites or copy the argument on the internal container. 
- Parameters
- 
  
    | attr_map | the container to be inserted. |  
 
 
 
The documentation for this class was generated from the following files:
- /home/gmorales/dev/MineLink/BlockScheduling/core/trunk/utils/dict.h
- /home/gmorales/dev/MineLink/BlockScheduling/core/trunk/utils/dict.cpp