14 #ifndef XFILEDATADEF_H 15 #define XFILEDATADEF_H 61 virtual void write_text(std::ostream &out,
int indent_level)
const;
66 size_t &index,
size_t &sub_index)
const;
76 size_t &index,
size_t &sub_index)
const;
83 size_t &index,
size_t &sub_index)
const;
87 size_t &index,
size_t &sub_index)
const;
91 size_t &index,
size_t &sub_index)
const;
95 size_t &index,
size_t &sub_index)
const;
100 size_t &index,
size_t &sub_index,
101 UnpackMethod unpack_method)
const;
108 zero_fill_value(
int array_index, ZeroFillMethod zero_fill_method)
const;
121 static void init_type() {
122 XFileNode::init_type();
124 XFileNode::get_class_type());
127 return get_class_type();
129 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
This is our own Panda specialization on the default STL map.
void add_array_def(const XFileArrayDef &array_def)
Adds an additional array dimension to the data description.
Defines one level of array bounds for an associated XFileDataDef element.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
int get_num_array_defs() const
Returns the number of dimensions of array elements on this data object, or 0 if the data object is no...
A definition of a single data element appearing within a template record.
virtual bool matches(const XFileNode *other) const
Returns true if the node, particularly a template node, is structurally equivalent to the other node ...
Type get_data_type() const
Returns the primitive type of this element, or T_template if this represents a nested template object...
A single node of an X file.
virtual bool repack_data(XFileDataObject *object, const XFileParseDataList &parse_data_list, PrevData &prev_data, size_t &index, size_t &sub_index) const
This is called on the template that defines an object, once the data for the object has been parsed.
XFileTemplate * get_template() const
If get_data_type() returned T_template, this returns the particular template pointer that this object...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual bool fill_zero_data(XFileDataObject *object) const
This is similar to repack_data(), except it is used to fill the initial values for a newly-created te...
A container for a pvector of the above objects.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void clear()
Removes all children from the node, and otherwise resets it to its initial state.
virtual void write_text(std::ostream &out, int indent_level) const
Writes a suitable representation of this node to an .x file in text mode.
This represents the complete contents of an X file (file.x) in memory.
A template definition in the X file.
TypeHandle is the identifier used to differentiate C++ class types.
const XFileArrayDef & get_array_def(int i) const
Returns the description of the nth dimension of array elements on this data object.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The abstract base class for a number of different types of data elements that may be stored in the X ...