15 #include "xFileDataObjectString.h"
16 #include "string_utils.h"
19 TypeHandle XFileDataObjectString::_type_handle;
26 XFileDataObjectString::
27 XFileDataObjectString(
const XFileDataDef *data_def,
const string &value) :
51 write_data(ostream &out,
int indent_level,
const char *separator)
const {
52 indent(out, indent_level);
54 out << separator <<
"\n";
63 void XFileDataObjectString::
64 set_string_value(
const string &string_value) {
65 _value = string_value;
74 string XFileDataObjectString::
75 get_string_value()
const {
86 void XFileDataObjectString::
87 enquote_string(ostream &out)
const {
93 string::const_iterator si;
94 for (si = _value.begin(); si != _value.end(); ++si) {
106 out <<
'\\' << (*si);
A definition of a single data element appearing within a template record.
virtual void output_data(ostream &out) const
Writes a suitable representation of this node to an .x file in text mode.
TypeHandle is the identifier used to differentiate C++ class types.
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.
The abstract base class for a number of different types of data elements that may be stored in the X ...