Go to the documentation of this file.
14 #ifndef XFILETEMPLATE_H
15 #define XFILETEMPLATE_H
38 virtual void write_text(std::ostream &out,
int indent_level)
const;
63 static void init_type() {
64 XFileNode::init_type();
66 XFileNode::get_class_type());
69 return get_class_type();
71 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
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.
This is our own Panda specialization on the default STL vector.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
This represents the complete contents of an X file (file.x) in memory.
bool is_standard() const
Returns true if this particular template is one of the "standard" templates defined by standardTempla...
A single node of an X file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void set_open(bool open)
Sets whether the template is considered "open" or not.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A template definition in the X file.
A definition of a single data element appearing within a template record.
virtual bool has_guid() const
Returns true if this node has a GUID associated.
void add_option(XFileTemplate *option)
Adds a new type to the list of allowable types of child nodes for an instance of this template.
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.
bool get_open() const
Returns whether the template is considered "open" or not.
virtual bool is_template_def() const
Returns true if this node represents the definition of some template.
int get_num_options() const
Returns the number of templates on the options list.
virtual const WindowsGuid & get_guid() const
Returns the GUID associated with this template.
XFileTemplate * get_option(int n) const
Returns the nth template on the options list.
virtual bool matches(const XFileNode *other) const
Returns true if the node, particularly a template node, is structurally equivalent to the other node ...
This is an implementation of the Windows GUID object, used everywhere as a world-unique identifier fo...