Panda3D
Public Member Functions | Static Public Member Functions | List of all members
XFileDataObjectString Class Reference

An string-valued data element. More...

#include "xFileDataObjectString.h"

Inheritance diagram for XFileDataObjectString:
XFileDataObject ReferenceCount MemoryBase

Public Member Functions

 XFileDataObjectString (const XFileDataDef *data_def, const std::string &value)
 
virtual TypeHandle force_init_type ()
 
virtual TypeHandle get_type () const
 
virtual void output_data (std::ostream &out) const
 Writes a suitable representation of this node to an .x file in text mode. More...
 
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. More...
 
- Public Member Functions inherited from XFileDataObject
 XFileDataObject (const XFileDataDef *data_def=nullptr)
 
XFileDataObjectadd_Coords2d (XFile *x_file, const LVecBase2d &coords)
 Appends a new Coords2d instance. More...
 
XFileDataObjectadd_double (double double_value)
 Appends a new floating-point value to the data object, if it makes sense to do so. More...
 
virtual bool add_element (XFileDataObject *element)
 Adds the indicated element as a nested data element, if this data object type supports it. More...
 
XFileDataObjectadd_IndexedColor (XFile *x_file, int index, const LColor &color)
 Appends a new IndexedColor instance. More...
 
XFileDataObjectadd_int (int int_value)
 Appends a new integer value to the data object, if it makes sense to do so. More...
 
XFileDataObjectadd_MeshFace (XFile *x_file)
 Appends a new MeshFace instance. More...
 
XFileDataObjectadd_string (const std::string &string_value)
 Appends a new string value to the data object, if it makes sense to do so. More...
 
XFileDataObjectadd_Vector (XFile *x_file, const LVecBase3d &vector)
 Appends a new Vector instance. More...
 
double d () const
 Unambiguously returns the object's representation as a double, or 0.0 if the object has no double representation. More...
 
const XFileDataDefget_data_def () const
 Returns the data object that this object is represented by, if any, or NULL if there is none. More...
 
virtual std::string get_type_name () const
 Returns a string that represents the type of object this data object represents. More...
 
int i () const
 Unambiguously returns the object's representation as an integer, or 0 if the object has no integer representation. More...
 
virtual bool is_complex_object () const
 Returns true if this kind of data object is a complex object that can hold nested data elements, false otherwise. More...
 
LMatrix4d mat4 () const
 Returns the object's representation as an LMatrix4d. More...
 
const XFileDataObjectoperator [] (int n) const
 Returns the nth nested object within this object. More...
 
const XFileDataObjectoperator [] (const std::string &name) const
 Returns the named nested object within this object. More...
 
XFileDataObjectoperator [] (int n)
 Returns the nth nested object within this object. More...
 
XFileDataObjectoperator [] (const std::string &name)
 Returns the named nested object within this object. More...
 
void operator= (int int_value)
 Stores the indicated integer value into the object, if it makes sense to do so. More...
 
void operator= (double double_value)
 Stores the indicated floating-point value into the object, if it makes sense to do so. More...
 
void operator= (const std::string &string_value)
 Stores the indicated string value into the object, if it makes sense to do so. More...
 
void operator= (const LVecBase2d &vec)
 Stores the indicated Vec2 value into the object, if it makes sense to do so. More...
 
void operator= (const LVecBase3d &vec)
 Stores the indicated Vec3 value into the object, if it makes sense to do so. More...
 
void operator= (const LVecBase4d &vec)
 Stores the indicated Vec4 value into the object, if it makes sense to do so. More...
 
void operator= (const LMatrix4d &mat)
 Stores the indicated Matrix value into the object, if it makes sense to do so. More...
 
std::string s () const
 Unambiguously returns the object's representation as a string, or empty string if the object has no string representation. More...
 
void set (int int_value)
 Stores the indicated integer value into the object, if it makes sense to do so. More...
 
void set (double double_value)
 Stores the indicated floating-point value into the object, if it makes sense to do so. More...
 
void set (const std::string &string_value)
 Stores the indicated string value into the object, if it makes sense to do so. More...
 
void set (const LVecBase2d &vec)
 Stores the indicated Vec2 value into the object, if it makes sense to do so. More...
 
void set (const LVecBase3d &vec)
 Stores the indicated Vec3 value into the object, if it makes sense to do so. More...
 
void set (const LVecBase4d &vec)
 Stores the indicated Vec4 value into the object, if it makes sense to do so. More...
 
void set (const LMatrix4d &mat)
 Stores the indicated Matrix value into the object, if it makes sense to do so. More...
 
int size () const
 Returns the number of nested data objects within this object. More...
 
LVecBase2d vec2 () const
 Returns the object's representation as an LVecBase2d. More...
 
LVecBase3d vec3 () const
 Returns the object's representation as an LVecBase3d. More...
 
LVecBase4d vec4 () const
 Returns the object's representation as an LVecBase4d. More...
 
- Public Member Functions inherited from ReferenceCount
int get_ref_count () const
 
WeakReferenceListget_weak_list () const
 Returns the WeakReferenceList associated with this ReferenceCount object. More...
 
bool has_weak_list () const
 Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More...
 
void local_object ()
 This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More...
 
void ref () const
 Explicitly increments the reference count. More...
 
bool ref_if_nonzero () const
 Atomically increases the reference count of this object if it is not zero. More...
 
bool test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus. More...
 
bool test_ref_count_nonzero () const
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More...
 
virtual bool unref () const
 Explicitly decrements the reference count. More...
 
WeakReferenceListweak_ref ()
 Adds the indicated PointerToVoid as a weak reference to this object. More...
 
void weak_unref ()
 Removes the indicated PointerToVoid as a weak reference to this object. More...
 

Static Public Member Functions

static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from XFileDataObject
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from ReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 

Additional Inherited Members

- Public Attributes inherited from ReferenceCount
 get_ref_count
 Returns the current reference count. More...
 

Detailed Description

An string-valued data element.

This matches one string data member of a template, or a single element of an string array.

Definition at line 24 of file xFileDataObjectString.h.

Member Function Documentation

◆ output_data()

void XFileDataObjectString::output_data ( std::ostream &  out) const
virtual

Writes a suitable representation of this node to an .x file in text mode.

Reimplemented from XFileDataObject.

Definition at line 36 of file xFileDataObjectString.cxx.

◆ write_data()

void XFileDataObjectString::write_data ( std::ostream &  out,
int  indent_level,
const char *  separator 
) const
virtual

Writes a suitable representation of this node to an .x file in text mode.

Reimplemented from XFileDataObject.

Definition at line 44 of file xFileDataObjectString.cxx.

References indent().


The documentation for this class was generated from the following files: