Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions

XFileDataObjectArray Class Reference

An array of nested data elements. More...

#include "xFileDataObjectArray.h"

Inheritance diagram for XFileDataObjectArray:
XFileDataObject ReferenceCount MemoryBase

List of all members.

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 (ostream &out, int indent_level, const char *separator) const
 Writes a suitable representation of this node to an .x file in text mode.

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()

Protected Member Functions

virtual XFileDataObjectget_element (int n)
 Returns the nth nested data element within the object.
virtual int get_num_elements () const
 Returns the number of nested data elements within the object.

Detailed Description

An array of nested data elements.

Definition at line 25 of file xFileDataObjectArray.h.


Member Function Documentation

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 42 of file xFileDataObjectArray.cxx.

XFileDataObject * XFileDataObjectArray::get_element ( int  n) [protected, virtual]

Returns the nth nested data element within the object.

Reimplemented from XFileDataObject.

Definition at line 116 of file xFileDataObjectArray.cxx.

int XFileDataObjectArray::get_num_elements ( ) const [protected, virtual]

Returns the number of nested data elements within the object.

This may be, e.g. the size of the array, if it is an array.

Reimplemented from XFileDataObject.

Definition at line 105 of file xFileDataObjectArray.cxx.

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 29 of file xFileDataObjectArray.cxx.

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

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


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations