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

A Value representing a Property. More...

#include <object.h>

Inheritance diagram for PLY::Value:
PLY::AnyValue PLY::FloatValue

Public Member Functions

bool copy (const Property &prop, Value &to, const Property &to_prop) const
 Copy the data to another Value. More...
 
Methods for scalar Values.
virtual bool get_scalar (const Property &prop, double &value) const
 Get the scalar value. More...
 
virtual bool set_scalar (const Property &prop, const double &value)
 Set the scalar value. More...
 
Methods for list Values.
virtual bool get_size (const Property &prop, size_t &size) const
 Get the size of the list Value. More...
 
virtual bool get_item (const Property &prop, const size_t &num, double &value) const
 Get an item of the list Value. More...
 
virtual bool set_size (const Property &prop, const size_t &size)
 Prepare the list Value to recieve a number of items. More...
 
virtual bool set_item (const Property &prop, const size_t &num, const double &value)
 Set an item of the list Value. More...
 
Methods for string Values.
virtual bool get_string (const Property &prop, char *str) const
 Get the string Value. More...
 
virtual bool set_string (const Property &prop, const char *str)
 Set the string Value. More...
 

Detailed Description

A Value representing a Property.

Note that a Property describes how the Value should be interpreted.

Member Function Documentation

bool PLY::Value::copy ( const Property prop,
Value to,
const Property to_prop 
) const

Copy the data to another Value.

Note this only works if both Values have Properties of the same type.

Parameters
propthe Property describing this Value.
[out]tothe Value to copy to.
to_propthe Property of the other Value.
Returns
true if the Value could be copied.
virtual bool PLY::Value::get_item ( const Property prop,
const size_t &  num,
double &  value 
) const
inlinevirtual

Get an item of the list Value.

Parameters
propthe Property describing the Value.
numthe index of the item.
[out]valuethe value.
Returns
true if the item could be read.

Reimplemented in PLY::AnyValue.

virtual bool PLY::Value::get_scalar ( const Property prop,
double &  value 
) const
inlinevirtual

Get the scalar value.

Parameters
propthe Property describing the Value.
[out]valuethe value.
Returns
true if the Value could be read.

Reimplemented in PLY::FloatValue, and PLY::AnyValue.

virtual bool PLY::Value::get_size ( const Property prop,
size_t &  size 
) const
inlinevirtual

Get the size of the list Value.

Parameters
propthe Property describing the Value.
[out]sizethe size of the list.
Returns
true if the size could be read.

Reimplemented in PLY::AnyValue.

virtual bool PLY::Value::get_string ( const Property prop,
char *  str 
) const
inlinevirtual

Get the string Value.

Parameters
propthe Property describing the Value.
[out]strthe string. This array should be long enough to contain the string.
Returns
true if the string could be read.

Reimplemented in PLY::AnyValue.

virtual bool PLY::Value::set_item ( const Property prop,
const size_t &  num,
const double &  value 
)
inlinevirtual

Set an item of the list Value.

Parameters
propthe Property describing the Value.
numthe index of the item.
valuethe value.
Returns
true if the item could be written.

Reimplemented in PLY::AnyValue.

virtual bool PLY::Value::set_scalar ( const Property prop,
const double &  value 
)
inlinevirtual

Set the scalar value.

Parameters
propthe Property describing the Value.
valuethe value.
Returns
true if the Value could be set.

Reimplemented in PLY::FloatValue, and PLY::AnyValue.

virtual bool PLY::Value::set_size ( const Property prop,
const size_t &  size 
)
inlinevirtual

Prepare the list Value to recieve a number of items.

Parameters
propthe Property describing the Value.
sizethe expected size of the list.
Returns
true if the size could be written.

Reimplemented in PLY::AnyValue.

virtual bool PLY::Value::set_string ( const Property prop,
const char *  str 
)
inlinevirtual

Set the string Value.

Parameters
propthe Property describing the Value.
strthe string value.
Returns
true if the string could be written.

Reimplemented in PLY::AnyValue.


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