PLY reader/writer  1.2.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
Public Member Functions | Public Attributes | List of all members
PLY::Element Struct Reference

The description of an Element in the Header. More...

#include <header.h>

Public Member Functions

 Element ()
 Default constructor.
 
 Element (const char *n)
 Instantiated constructor. More...
 
void add_property (const Property &prop)
 Add a Property to the Element. More...
 
bool find_index (const char *name, size_t &index) const
 Find the index of a Property. More...
 
Propertyfind_property (const char *name)
 Find a Property. More...
 

Public Attributes

std::string name
 The name of the Element.
 
size_t num
 Number of Objects of the Element.
 
std::vector< Propertyprops
 Vector of Properties of the Element.
 
bool store
 Whether to store this Element.
 

Detailed Description

The description of an Element in the Header.

Each Element contains a number of Properties. These Properties should be described in the Header.

Note that an Element does not contain any actual data, only the description of how this data is organized. The data itself is stored in an Object.

See Also
Property, Header and Object.

Constructor & Destructor Documentation

PLY::Element::Element ( const char *  n)
inline

Instantiated constructor.

Parameters
nthe name of the Element.

Member Function Documentation

void PLY::Element::add_property ( const Property prop)
inline

Add a Property to the Element.

Parameters
propthe Property to add.
bool PLY::Element::find_index ( const char *  name,
size_t &  index 
) const

Find the index of a Property.

Parameters
namethe name of the Property to find.
[out]indexthe index of the Property.
Returns
true if the name refers to a Property of this Element.
Property * PLY::Element::find_property ( const char *  name)

Find a Property.

Parameters
namethe name of the Property to find.
Returns
the Property, or NULL if the Element does not contain the Property.

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