|
|
|
A single field of a Distributed Class, either atomic or molecular.
More...
#include "dcField.h"
List of all members.
Public Member Functions |
|
| DCField (const string &name, DCClass *dclass) |
| virtual DCAtomicField * | as_atomic_field () |
| | Returns the same field pointer converted to an atomic field pointer, if this is in fact an atomic field; otherwise, returns NULL.
|
| virtual const DCAtomicField * | as_atomic_field () const |
| | Returns the same field pointer converted to an atomic field pointer, if this is in fact an atomic field; otherwise, returns NULL.
|
|
virtual DCField * | as_field () |
|
virtual const DCField * | as_field () const |
| virtual DCMolecularField * | as_molecular_field () |
| | Returns the same field pointer converted to a molecular field pointer, if this is in fact a molecular field; otherwise, returns NULL.
|
| virtual const DCMolecularField * | as_molecular_field () const |
| | Returns the same field pointer converted to a molecular field pointer, if this is in fact a molecular field; otherwise, returns NULL.
|
|
virtual DCParameter * | as_parameter () |
|
virtual const DCParameter * | as_parameter () const |
| string | format_data (const string &packed_data, bool show_field_names=true) |
| | Given a blob that represents the packed data for this field, returns a string formatting it for human consumption.
|
| virtual void | generate_hash (HashGenerator &hashgen) const |
| | Accumulates the properties of this field into the hash.
|
| DCClass * | get_class () const |
| | Returns the DCClass pointer for the class that contains this field.
|
| const string & | get_default_value () const |
| | Returns the default value for this field.
|
| int | get_number () const |
| | Returns a unique index number associated with this field.
|
| bool | has_default_value () const |
| | Returns true if a default value has been explicitly established for this field, false otherwise.
|
| bool | is_airecv () const |
| | Returns true if the "airecv" flag is set for this field, false otherwise.
|
| bool | is_bogus_field () const |
| | Returns true if the field has been flagged as a bogus field.
|
| bool | is_broadcast () const |
| | Returns true if the "broadcast" flag is set for this field, false otherwise.
|
| bool | is_clrecv () const |
| | Returns true if the "clrecv" flag is set for this field, false otherwise.
|
| bool | is_clsend () const |
| | Returns true if the "clsend" flag is set for this field, false otherwise.
|
| bool | is_db () const |
| | Returns true if the "db" flag is set for this field, false otherwise.
|
| bool | is_ownrecv () const |
| | Returns true if the "ownrecv" flag is set for this field, false otherwise.
|
| bool | is_ownsend () const |
| | Returns true if the "ownsend" flag is set for this field, false otherwise.
|
| bool | is_ram () const |
| | Returns true if the "ram" flag is set for this field, false otherwise.
|
| bool | is_required () const |
| | Returns true if the "required" flag is set for this field, false otherwise.
|
| void | output (ostream &out) const |
| | Write a string representation of this instance to <out>.
|
|
virtual void | output (ostream &out, bool brief) const =0 |
| virtual bool | pack_default_value (DCPackData &pack_data, bool &pack_error) const |
| | Packs the field's specified default value (or a sensible default if no value is specified) into the stream.
|
| string | parse_string (const string &formatted_string) |
| | Given a human-formatted string (for instance, as returned by format_data(), above) that represents the value of this field, parse the string and return the corresponding packed data.
|
| void | set_class (DCClass *dclass) |
| | Assigns the class pointer to this field.
|
| void | set_default_value (const string &default_value) |
| | Establishes a default value for this field.
|
| virtual void | set_name (const string &name) |
| | Sets the name of this field.
|
| void | set_number (int number) |
| | Assigns the unique number to this field.
|
| bool | validate_ranges (const string &packed_data) const |
| | Verifies that all of the packed values in the field data are within the specified ranges and that there are no extra bytes on the end of the record.
|
| void | write (ostream &out, int indent_level) const |
| | Write a string representation of this instance to <out>.
|
|
virtual void | write (ostream &out, bool brief, int indent_level) const =0 |
Protected Member Functions |
| void | refresh_default_value () |
| | Recomputes the default value of the field by repacking it.
|
Protected Attributes |
|
bool | _bogus_field |
|
DCClass * | _dclass |
|
bool | _default_value_stale |
|
bool | _has_default_value |
|
int | _number |
Detailed Description
A single field of a Distributed Class, either atomic or molecular.
Definition at line 40 of file dcField.h.
Member Function Documentation
Returns the same field pointer converted to an atomic field pointer, if this is in fact an atomic field; otherwise, returns NULL.
Reimplemented in DCAtomicField.
Definition at line 120 of file dcField.cxx.
Referenced by DCClass::add_field().
Returns the same field pointer converted to an atomic field pointer, if this is in fact an atomic field; otherwise, returns NULL.
Reimplemented in DCAtomicField.
Definition at line 132 of file dcField.cxx.
Returns the same field pointer converted to a molecular field pointer, if this is in fact a molecular field; otherwise, returns NULL.
Reimplemented in DCMolecularField.
Definition at line 144 of file dcField.cxx.
Returns the same field pointer converted to a molecular field pointer, if this is in fact a molecular field; otherwise, returns NULL.
Reimplemented in DCMolecularField.
Definition at line 156 of file dcField.cxx.
Returns the default value for this field.
If a default value has been explicitly set (e.g. has_default_value() returns true), returns that value; otherwise, returns an implicit default for the field.
Definition at line 60 of file dcField.I.
Returns a unique index number associated with this field.
This is defined implicitly when the .dc file(s) are read.
Definition at line 24 of file dcField.I.
Referenced by DCClass::add_field().
Returns true if the field has been flagged as a bogus field.
This is set for fields that are generated by the parser as placeholder for missing fields, as when reading a partial file; it should not occur in a normal valid dc file.
Definition at line 77 of file dcField.I.
Referenced by DCMolecularField::add_atomic().
Assigns the class pointer to this field.
This is normally called only by the DCClass interface as the field is added.
Definition at line 222 of file dcField.I.
Referenced by DCClass::add_field().
Establishes a default value for this field.
Definition at line 232 of file dcField.I.
| void DCField::write |
( |
ostream & |
out, |
|
|
int |
indent_level |
|
) |
| const [inline] |
The documentation for this class was generated from the following files:
| | |