Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
XFileDataObjectArray Class Reference

An array of nested data elements. More...

`#include "xFileDataObjectArray.h"`

Inheritance diagram for XFileDataObjectArray:

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

## 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.

## Detailed Description

An array of nested data elements.

Definition at line 23 of file xFileDataObjectArray.h.

## Constructor & Destructor Documentation

## ◆ XFileDataObjectArray()

XFileDataObjectArray::XFileDataObjectArray | ( | const XFileDataDef * | data_def | ) |
| inline

Definition at line 17 of file xFileDataObjectArray.I.

## Member Function Documentation

## ◆ add_element()

bool XFileDataObjectArray::add_element | ( | XFileDataObject * | element | ) |
| virtual

Adds the indicated element as a nested data element, if this data object type supports it.

Returns true if added successfully, false if the data object type does not support nested data elements.

Reimplemented from XFileDataObject.

Definition at line 34 of file xFileDataObjectArray.cxx.

## ◆ force_init_type()

virtual TypeHandle XFileDataObjectArray::force_init_type | ( |  | ) |
| inline virtual

Reimplemented from XFileDataObject.

Definition at line 54 of file xFileDataObjectArray.h.

## ◆ get_class_type()

static TypeHandle XFileDataObjectArray::get_class_type | ( |  | ) |
| inline static

Definition at line 43 of file xFileDataObjectArray.h.

## ◆ get_type()

virtual TypeHandle XFileDataObjectArray::get_type | ( |  | ) | const
| inline virtual

Reimplemented from XFileDataObject.

Definition at line 51 of file xFileDataObjectArray.h.

## ◆ init_type()

static void XFileDataObjectArray::init_type | ( |  | ) |
| inline static

Definition at line 46 of file xFileDataObjectArray.h.

## ◆ is_complex_object()

bool XFileDataObjectArray::is_complex_object | ( |  | ) | const
| virtual

Returns true if this kind of data object is a complex object that can hold nested data elements, false otherwise.

Reimplemented from XFileDataObject.

Definition at line 24 of file xFileDataObjectArray.cxx.

## ◆ write_data()

void XFileDataObjectArray::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 43 of file xFileDataObjectArray.cxx.

References XFileDataObject::i(), indent(), and XFileDataObject::is_complex_object().

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

- pandatool/src/xfile/xFileDataObjectArray.h
- pandatool/src/xfile/xFileDataObjectArray.cxx
- pandatool/src/xfile/xFileDataObjectArray.I