37 virtual const DCSwitch *as_switch()
const;
39 const std::string &get_name()
const;
40 DCField *get_key_parameter()
const;
42 int get_num_cases()
const;
43 int get_case_by_value(
const vector_uchar &case_value)
const;
47 vector_uchar get_value(
int case_index)
const;
48 int get_num_fields(
int case_index)
const;
49 DCField *get_field(
int case_index,
int n)
const;
50 DCField *get_field_by_name(
int case_index,
const std::string &name)
const;
53 bool is_field_valid()
const;
54 int add_case(
const vector_uchar &value);
55 void add_invalid_case();
60 const DCPackerInterface *apply_switch(
const char *value_data,
size_t length)
const;
62 virtual void output(std::ostream &out,
bool brief)
const;
63 virtual void write(std::ostream &out,
bool brief,
int indent_level)
const;
64 void output_instance(std::ostream &out,
bool brief,
const std::string &prename,
65 const std::string &name,
const std::string &postname)
const;
66 void write_instance(std::ostream &out,
bool brief,
int indent_level,
67 const std::string &prename,
const std::string &name,
68 const std::string &postname)
const;
70 virtual bool pack_default_value(
DCPackData &pack_data,
bool &pack_error)
const;
72 bool do_check_match_switch(
const DCSwitch *other)
const;
85 bool do_check_match_switch_case(
const SwitchFields *other)
const;
87 void output(std::ostream &out,
bool brief)
const;
88 void write(std::ostream &out,
bool brief,
int indent_level)
const;
95 FieldsByName _fields_by_name;
96 bool _has_default_value;
104 bool do_check_match_switch_case(
const SwitchCase *other)
const;
125 CaseFields _case_fields;
130 Fields _nested_fields;
136 CaseFields _current_fields;
141 CasesByValue _cases_by_value;
This is our own Panda specialization on the default STL map.
This is a block of data that receives the results of DCPacker.
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
A single field of a Distributed Class, either atomic or molecular.
This represents a switch statement, which can appear inside a class body and represents two or more a...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is our own Panda specialization on the default STL vector.
Represents the type specification for a single parameter within a field specification.
This is a common interface for a declaration in a DC file.
This class generates an arbitrary hash number from a sequence of ints.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void write(std::ostream &out, int indent_level) const
Write a string representation of this instance to <out>.
This defines the internal interface for packing values into a DCField.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.