#include <disti_metadata.h>
The Attribute Dictionary is a container for DistiAttributeBase derived objects
Allows for easy access to the contained class type
Adds the specified Attribute to the list. The object passed in becomes the responsibility of this class, and should NOT be deleted by the caller. It will be deleted by this class as needed
Removes all elements in the list, deleting the data as it goes
Returns the current number of elements in the dictionary
Returns the number of elements with the same name in the dictionary
Removes the attribute specified by name from the dictionary and deletes the data. This does actually delete the attribute.
Returns the DistiAttributeBase* for the specified name If not found it returns NULL
virtual bool IsEqual |
( |
const AttributeName & |
name, |
|
|
const long |
val |
|
) |
| const |
|
virtual |
Retuns a comparison of val with ValueInt() of the attribute looked up by name Returns false if not found
Assignment operator Copies the values for all items which have matching names. All others are ignored
Equality operator Compares length, names and values. order does not matter
virtual bool Read |
( |
std::istream & |
instr | ) |
|
|
virtual |
Reads multiple attributes from the stream expecting the form: "NAME: VALUE" Returns true if something was found and set.
virtual void ReadStrings |
( |
std::istream & |
instr | ) |
|
|
virtual |
Reads a stream, expecting each line to be of the form NAME: SomeStringValue For each line a new DistiAttribute<std::string> is created, and the remaining line is placed as it's value. This is intended for special uses and is not considered the 'normal' mode of operation
virtual std::istream& ReadValue |
( |
const AttributeName & |
name, |
|
|
std::istream & |
instr |
|
) |
| |
|
virtual |
Removes the attribute specified by name This does NOT actually delete the attribute, just removes it from the dictionary.
static bool ScanToken |
( |
std::istream & |
instr, |
|
|
std::string & |
result |
|
) |
| |
|
static |
Static method used for parsing a stream Used internally and Exposed here so others can use it.
static void SpacingDec |
( |
| ) |
|
|
static |
Static, Decrements the current spacing
static void SpacingInc |
( |
| ) |
|
|
static |
Static, Increments the current spacing
static std::string SpacingString |
( |
| ) |
|
|
static |
Static, Returns a string containing the current spacing
static void SpacingZero |
( |
| ) |
|
|
static |
Static, Sets the spacing to zero
virtual std::string ValueString |
( |
const AttributeName & |
name | ) |
const |
|
virtual |
Returns the std::string value of the attribute specified by name Returns "" if not found Internally it uses ValueString() from the attribute
virtual void ValueString |
( |
const AttributeName & |
name, |
|
|
const std::string & |
val |
|
) |
| |
|
virtual |
Sets the attribute of named 'name' to the value of 'val' If name is not found, there is no indication
virtual void Write |
( |
std::ostream & |
outstr, |
|
|
bool |
changedDataOnly = false |
|
) |
| |
|
virtual |
Writes all items in the dictionary to the stream in the form: "NAME: VALUE" If changedDataOnly is true, only items which return ValueChanged() == true will be written.
virtual std::ostream& WriteValue |
( |
const AttributeName & |
name, |
|
|
std::ostream & |
outstr |
|
) |
| |
|
virtual |
double _currentFileVersionPrimary |
|
static |
Used as needed for version specific parsing Whenever a version is parsed, the results should be stored here. This does add order dependency.
Note: These are not set or used by the DistiAttribDict class they are here to be set and accessed by the derived Attributes. Since they are shared by all instances of DistiAttribDict, they are only valid while the dictionary is parsing a file.
Static, data for formating output
The documentation for this class was generated from the following file: