15 #ifndef XFILEDATANODETEMPLATE_H 16 #define XFILEDATANODETEMPLATE_H 18 #include "pandatoolbase.h" 19 #include "xFileDataNode.h" 20 #include "xFileTemplate.h" 21 #include "xFileParseData.h" 22 #include "pointerTo.h" 24 #include "pta_double.h" 50 virtual void write_text(ostream &out,
int indent_level)
const;
51 virtual void write_data(ostream &out,
int indent_level,
52 const char *separator)
const;
55 virtual int get_num_elements()
const;
63 NestedElements _nested_elements;
69 static void init_type() {
70 XFileDataNode::init_type();
71 register_type(_type_handle,
"XFileDataNodeTemplate",
72 XFileDataNode::get_class_type());
75 return get_class_type();
77 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
83 #include "xFileDataNodeTemplate.I" virtual bool add_element(XFileDataObject *element)
Adds the indicated element as a nested data element, if this data object type supports it...
virtual void write_text(ostream &out, int indent_level) const
Writes a suitable representation of this node to an .x file in text mode.
void add_parse_double(PTA_double double_list)
Adds the indicated list of doubles as a data element encountered in the parser.
void zero_fill()
Fills the data node with zero-valued elements appropriate to the template.
void add_parse_int(PTA_int int_list)
Adds the indicated list of ints as a data element encountered in the parser.
This is a node which contains all of the data elements defined by a template.
virtual void write_data(ostream &out, int indent_level, const char *separator) const
Writes a suitable representation of this node to an .x file in text mode.
void add_parse_string(const string &str)
Adds the indicated string as a data element encountered in the parser.
virtual bool is_complex_object() const
Returns true if this kind of data object is a complex object that can hold nested data elements...
bool finalize_parse_data()
Processes all of the data elements added by add_parse_*(), checks them for syntactic and semantic cor...
A container for a pvector of the above objects.
This is an abstract base class for an XFileNode which is also an XFileDataObject. ...
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.
The abstract base class for a number of different types of data elements that may be stored in the X ...