18 TypeHandle XFileDataObjectDouble::_type_handle;
23 XFileDataObjectDouble::
24 XFileDataObjectDouble(
const XFileDataDef *data_def,
double value) :
35 out << get_string_value();
42 write_data(std::ostream &out,
int indent_level,
const char *separator)
const {
44 << get_string_value() << separator <<
"\n";
50 void XFileDataObjectDouble::
51 set_int_value(
int int_value) {
52 _value = (double)int_value;
58 void XFileDataObjectDouble::
59 set_double_value(
double double_value) {
60 _value = double_value;
66 int XFileDataObjectDouble::
67 get_int_value()
const {
74 double XFileDataObjectDouble::
75 get_double_value()
const {
82 std::string XFileDataObjectDouble::
83 get_string_value()
const {
88 sprintf(buffer,
"%f", _value);
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A definition of a single data element appearing within a template record.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
virtual void output_data(std::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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The abstract base class for a number of different types of data elements that may be stored in the X ...