| 
    casacore
    
   | 
 
#include <JsonKVMap.h>
Public Types | |
| typedef std::map< String, JsonValue >::const_iterator | const_iterator | 
| Define the iterator types.   | |
| typedef std::map< String, JsonValue >::iterator | iterator | 
Public Member Functions | |
| JsonKVMap () | |
| Construct an empty map.   | |
| JsonKVMap (const JsonKVMap &that) | |
| Copy constructor (copy semantics)   | |
| ~JsonKVMap () | |
| JsonKVMap & | operator= (const JsonKVMap &that) | 
| Assignment (copy semantics)   | |
| Bool | isDefined (const String &name) const | 
| Is a key defined?   | |
| const JsonValue & | get (const String &name) const | 
| Get the value of a key.   | |
Get the typed value of a key  | |
Use the default if not existing.  | |
| Bool | getBool (const String &name, Bool defVal) const | 
| Int64 | getInt (const String &name, Int64 defVal) const | 
| double | getDouble (const String &name, double defVal) const | 
| DComplex | getDComplex (const String &name, const DComplex &defVal) const | 
| const String & | getString (const String &name, const String &defVal) const | 
| Record | toRecord () const | 
| Convert the map to a Record.   | |
Show the contents of the object | |
| void | show (ostream &) const | 
| ostream & | operator<< (ostream &, const JsonKVMap &) | 
Class to hold a collection of JSON key:value pairs.
Public interface
A JsonKVMap object is the result of a JSON file parsed by JsonParser. It is a map of name to a JsonValue object holding an arbitrary value (including a JsonKVMap for nested structs).
JsonKVMap has functions to test if a given field is present and to get its JsonValue. It also has functions to get a scalar value where a default value is used if the key is undefined.
JsonKVMap is derived from std::map, so all its functions are available. Iterators make standard iteration possible.
JSON is a commonly used interchange format.
Definition at line 70 of file JsonKVMap.h.
| typedef std::map<String,JsonValue>::const_iterator casacore::JsonKVMap::const_iterator | 
Define the iterator types.
Definition at line 74 of file JsonKVMap.h.
| typedef std::map<String,JsonValue>::iterator casacore::JsonKVMap::iterator | 
Definition at line 75 of file JsonKVMap.h.
| casacore::JsonKVMap::JsonKVMap | ( | ) | 
Construct an empty map.
| casacore::JsonKVMap::JsonKVMap | ( | const JsonKVMap & | that | ) | 
Copy constructor (copy semantics)
| casacore::JsonKVMap::~JsonKVMap | ( | ) | 
Get the value of a key.
An exception is thrown if undefined.
| DComplex casacore::JsonKVMap::getDComplex | ( | const String & | name, | 
| const DComplex & | defVal | ||
| ) | const | 
| double casacore::JsonKVMap::getDouble | ( | const String & | name, | 
| double | defVal | ||
| ) | const | 
Is a key defined?
Definition at line 89 of file JsonKVMap.h.
| void casacore::JsonKVMap::show | ( | ostream & | ) | const | 
      
  | 
  friend |