#include <dcAtomicField.h>
Inheritance diagram for DCAtomicField:
Public Types | |
typedef pvector< ElementType > | Elements |
enum | Flags { F_required = 0x0001, F_broadcast = 0x0002, F_p2p = 0x0004, F_ram = 0x0008, F_db = 0x0010, F_clsend = 0x0020, F_clrecv = 0x0040, F_ownsend = 0x0080 } |
Public Member Functions | |
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. | |
int | get_num_elements () const |
Returns the number of elements of the atomic field. | |
DCSubatomicType | get_element_type (int n) const |
Returns the numeric type of the nth element of the field. | |
string | get_element_name (int n) const |
Returns the name of the nth element of the field. | |
int | get_element_divisor (int n) const |
Returns the divisor associated with the nth element of the field. | |
string | get_element_default (int n) const |
Returns the pre-formatted default value associated with the nth element of the field. | |
bool | has_element_default (int n) const |
Returns true if the nth element of the field has a default value specified, false otherwise. | |
bool | is_required () const |
Returns true if the "required" flag is set for this field, false otherwise. | |
bool | is_broadcast () const |
Returns true if the "broadcast" flag is set for this field, false otherwise. | |
bool | is_p2p () const |
Returns true if the "p2p" 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_db () const |
Returns true if the "db" 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_clrecv () const |
Returns true if the "clrecv" 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. | |
DCAtomicField () | |
virtual void | write (ostream &out, int indent_level=0) const |
Generates a parseable description of the object to the indicated output stream. | |
virtual void | generate_hash (HashGenerator &hash) const |
Accumulates the properties of this field into the hash. | |
int | get_number () const |
Returns a unique index number associated with this field. | |
const string & | get_name () const |
Returns the name of this field. | |
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. | |
Public Attributes | |
Elements | _elements |
int | _flags |
int | _number |
string | _name |
This defines an interface to the Distributed Class, and is always implemented as a remote procedure method.
Definition at line 43 of file dcAtomicField.h.
|
Definition at line 94 of file dcAtomicField.h. |
|
Definition at line 97 of file dcAtomicField.h. |
|
Definition at line 708 of file dcAtomicField.cxx. |
|
Returns the same field pointer converted to an atomic field pointer, if this is in fact an atomic field; otherwise, returns NULL.
Reimplemented from DCField. Definition at line 431 of file dcAtomicField.cxx. References _elements, has_element_default(), nassertr, ST_int16array, ST_int32array, and ST_int8array. |
|
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 85 of file dcField.cxx. |
|
Accumulates the properties of this field into the hash.
Reimplemented from DCField. Definition at line 778 of file dcAtomicField.cxx. |
|
Returns the pre-formatted default value associated with the nth element of the field. This is only valid if has_element_default() returns true, in which case this string represents the bytes that should be assigned to the field as a default value. If the element is an array-type element, the returned value will include the two-byte length preceding the array data. Definition at line 531 of file dcAtomicField.cxx. |
|
Returns the divisor associated with the nth element of the field. This implements an implicit fixed-point system; floating-point values are to be multiplied by this value before encoding into a packet, and divided by this number after decoding. Definition at line 501 of file dcAtomicField.cxx. |
|
Returns the name of the nth element of the field. This name is strictly for documentary purposes; it does not generally affect operation. If a name is not specified, this will be the empty string. Definition at line 479 of file dcAtomicField.cxx. References _flags, and F_required. |
|
Returns the numeric type of the nth element of the field.
Definition at line 459 of file dcAtomicField.cxx. |
|
Returns the name of this field.
Definition at line 51 of file dcField.cxx. References NULL. |
|
Returns the number of elements of the atomic field.
Definition at line 444 of file dcAtomicField.cxx. References length, ST_blob, ST_string, ST_uint16array, ST_uint32array, ST_uint32uint8array, and ST_uint8array. |
|
Returns a unique index number associated with this field. This is defined implicitly when the .dc file(s) are read. Definition at line 38 of file dcField.cxx. References DCField::_name. |
|
Returns true if the nth element of the field has a default value specified, false otherwise.
Definition at line 575 of file dcAtomicField.cxx. References _flags. Referenced by as_atomic_field(). |
|
Returns true if the "broadcast" flag is set for this field, false otherwise.
Definition at line 606 of file dcAtomicField.cxx. |
|
Returns true if the "clrecv" flag is set for this field, false otherwise.
Definition at line 681 of file dcAtomicField.cxx. |
|
Returns true if the "clsend" flag is set for this field, false otherwise.
Definition at line 666 of file dcAtomicField.cxx. |
|
Returns true if the "db" flag is set for this field, false otherwise.
Definition at line 651 of file dcAtomicField.cxx. |
|
Returns true if the "ownsend" flag is set for this field, false otherwise.
Definition at line 696 of file dcAtomicField.cxx. |
|
Returns true if the "p2p" flag is set for this field, false otherwise.
Definition at line 621 of file dcAtomicField.cxx. |
|
Returns true if the "ram" flag is set for this field, false otherwise.
Definition at line 636 of file dcAtomicField.cxx. References _elements. |
|
Returns true if the "required" flag is set for this field, false otherwise.
Definition at line 591 of file dcAtomicField.cxx. References _elements. |
|
Generates a parseable description of the object to the indicated output stream.
Implements DCField. Definition at line 724 of file dcAtomicField.cxx. |
|
Definition at line 95 of file dcAtomicField.h. Referenced by as_atomic_field(), is_ram(), and is_required(). |
|
Definition at line 108 of file dcAtomicField.h. Referenced by get_element_default(), get_element_divisor(), get_element_name(), has_element_default(), is_broadcast(), and is_p2p(). |
|
Definition at line 55 of file dcField.h. Referenced by DCMolecularField::get_atomic(), and DCField::get_number(). |
|
|