Go to the documentation of this file.
23 XFileTemplate(
XFile *x_file,
const std::string &name,
const WindowsGuid &guid) :
82 write_text(std::ostream &out,
int indent_level)
const {
84 <<
"template " << get_name() <<
" {\n";
85 indent(out, indent_level + 2)
86 <<
"<" << _guid <<
">\n";
92 indent(out, indent_level + 2)
95 }
else if (!_options.empty()) {
97 indent(out, indent_level + 2);
100 Options::const_iterator ri;
101 for (ri = _options.begin(); ri != _options.end(); ++ri) {
103 out << delimiter <<
" "
104 << option->get_name() <<
" <" << option->
get_guid()
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
virtual void clear()
Removes all children from the node, and otherwise resets it to its initial state.
This represents the complete contents of an X file (file.x) in memory.
A single node of an X file.
virtual void clear()
Removes all children from the node, and otherwise resets it to its initial state.
TypeHandle is the identifier used to differentiate C++ class types.
virtual bool matches(const XFileNode *other) const
Returns true if the node, particularly a template node, is structurally equivalent to the other node ...
A template definition in the X file.
virtual bool has_guid() const
Returns true if this node has a GUID associated.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
virtual const WindowsGuid & get_guid() const
Returns the GUID associated with this template.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual bool matches(const XFileNode *other) const
Returns true if the node, particularly a template node, is structurally equivalent to the other node ...
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 is an implementation of the Windows GUID object, used everywhere as a world-unique identifier fo...