14#ifndef XFILEDATANODETEMPLATE_H
15#define XFILEDATANODETEMPLATE_H
46 virtual void write_text(std::ostream &out,
int indent_level)
const;
47 virtual void write_data(std::ostream &out,
int indent_level,
48 const char *separator)
const;
51 virtual int get_num_elements()
const;
65 static void init_type() {
66 XFileDataNode::init_type();
68 XFileDataNode::get_class_type());
71 return get_class_type();
73 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
TypeHandle is the identifier used to differentiate C++ class types.
This is a node which contains all of the data elements defined by a template.
virtual void write_data(std::ostream &out, int indent_level, const char *separator) const
Writes a suitable representation of this node to an .x file in text mode.
bool finalize_parse_data()
Processes all of the data elements added by add_parse_*(), checks them for syntactic and semantic cor...
void add_parse_double(PTA_double double_list)
Adds the indicated list of doubles as a data element encountered in the parser.
virtual bool add_element(XFileDataObject *element)
Adds the indicated element as a nested data element, if this data object type supports it.
void zero_fill()
Fills the data node with zero-valued elements appropriate to the template.
virtual bool is_complex_object() const
Returns true if this kind of data object is a complex object that can hold nested data elements,...
void add_parse_int(PTA_int int_list)
Adds the indicated list of ints as a data element encountered in the parser.
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.
void add_parse_string(const std::string &str)
Adds the indicated string as a data element encountered in the parser.
This is an abstract base class for an XFileNode which is also an XFileDataObject.
The abstract base class for a number of different types of data elements that may be stored in the X ...
A container for a pvector of the above objects.
A template definition in the X file.
This represents the complete contents of an X file (file.x) in memory.
This is our own Panda specialization on the default STL vector.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.