Panda3D
 All Classes Functions Variables Enumerations
Public Member Functions | Public Attributes | Protected Member Functions
DCSwitch::SwitchFields Class Reference
Inheritance diagram for DCSwitch::SwitchFields:
DCPackerInterface

List of all members.

Public Member Functions

 SwitchFields (const string &name)
bool add_field (DCField *field)
 Adds a field to this case.
bool do_check_match_switch_case (const SwitchFields *other) const
 Returns true if this case matches the indicated case, false otherwise.
virtual DCPackerInterfaceget_nested_field (int n) const
 Returns the DCPackerInterface object that represents the nth nested field.
void output (ostream &out, bool brief) const
void write (ostream &out, bool brief, int indent_level) const

Public Attributes

Fields _fields
FieldsByName _fields_by_name
bool _has_default_value

Protected Member Functions

virtual bool do_check_match (const DCPackerInterface *other) const
 Returns true if the other interface is bitwise the same as this one--that is, a uint32 only matches a uint32, etc.

Detailed Description

Definition at line 81 of file dcSwitch.h.


Member Function Documentation

Adds a field to this case.

Returns true if successful, false if the field duplicates a field already named within this case. This is normally called only by the parser.

Definition at line 689 of file dcSwitch.cxx.

References DCPackerInterface::get_fixed_byte_size(), DCPackerInterface::get_name(), DCField::has_default_value(), DCPackerInterface::has_fixed_byte_size(), DCPackerInterface::has_fixed_structure(), and DCPackerInterface::has_range_limits().

Referenced by DCSwitch::add_field().

bool DCSwitch::SwitchFields::do_check_match ( const DCPackerInterface other) const [protected, virtual]

Returns true if the other interface is bitwise the same as this one--that is, a uint32 only matches a uint32, etc.

Names of components, and range limits, are not compared.

Implements DCPackerInterface.

Definition at line 791 of file dcSwitch.cxx.

Returns true if this case matches the indicated case, false otherwise.

This is only intended to be called internally from DCSwitch::do_check_match_switch().

Definition at line 729 of file dcSwitch.cxx.

Returns the DCPackerInterface object that represents the nth nested field.

This may return NULL if there is no such field (but it shouldn't do this if n is in the range 0 <= n < get_num_nested_fields()).

Reimplemented from DCPackerInterface.

Definition at line 675 of file dcSwitch.cxx.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations