#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
Copies the values for all items which have matching names between this object and dict. All other values are ignored
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
bool IsEqual |
( |
const AttributeName & |
name, |
|
|
const long |
val |
|
) |
| const |
Retuns a comparison of val with ValueInt() of the attribute looked up by name Returns false if not found
Copies the values for all items which have matching names between this object and dict. All other values are ignored
- Deprecated:
- Use CopyCommonValues() instead.
Equality operator Compares length, names and values. order does not matter
bool Read |
( |
std::istream & |
instr | ) |
|
Reads multiple attributes from the stream expecting the form: "NAME: VALUE" Returns true if something was found and set.
bool ReadAndCaptureMissing |
( |
std::istream & |
instr, |
|
|
std::stringstream * |
missingStream |
|
) |
| |
Reads multiple attributes from the stream expecting the form: "NAME: VALUE" missing stream is filled with attributes that were not in the dictionary Returns true if something was found and set.
void ReadStrings |
( |
std::istream & |
instr | ) |
|
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
std::istream& ReadValue |
( |
const AttributeName & |
name, |
|
|
std::istream & |
instr |
|
) |
| |
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
Returns the std::string value of the attribute specified by name Returns "" if not found Internally it uses ValueString() from the attribute
void ValueString |
( |
const AttributeName & |
name, |
|
|
const std::string & |
val |
|
) |
| |
Sets the attribute of named 'name' to the value of 'val' If name is not found, there is no indication
void Write |
( |
std::ostream & |
outstr, |
|
|
bool |
changedDataOnly = false |
|
) |
| |
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.
std::ostream& WriteValue |
( |
const AttributeName & |
name, |
|
|
std::ostream & |
outstr |
|
) |
| |
unsigned int _currentFileVersionBuild |
|
static |
unsigned int _currentFileVersionMajor |
|
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.
unsigned int _currentFileVersionMinor |
|
static |
double _currentFileVersionPrimary |
|
static |
- Deprecated:
- Do not use. Will be removed in a later version.
long _currentFileVersionSecondary |
|
static |
- Deprecated:
- Do not use. Will be removed in a later version.
Static, data for formating output
The documentation for this class was generated from the following file: