|
Katana Plug-in APIs 0.1
|
The base class of all Attributes. More...
#include <FnAttributeBase.h>
Public Member Functions | |
| Attribute () | |
| bool | isValid () const |
| uint64_t | getSize () const |
| FnKatAttributeType | getType () const |
| std::string | getXML () const |
| void | getBinary (std::vector< char > *buffer) const |
| bool | writeAttributeStream (void *stream, FnAttributeWriteStreamFunc func, FnKatStreamType streamType) const |
Static Public Member Functions | |
| static Attribute | parseXML (const char *xml) |
| static Attribute | parseBinary (const char *buffer, size_t size) |
| static Attribute | readAttributeStream (void *stream, FnAttributeReadStreamFunc func, FnKatStreamType streamType) |
The base class of all Attributes.
| Foundry::Katana::Attribute::Attribute | ( | ) | [inline] |
Create empty attribute class (isValid() == false).
| void Foundry::Katana::Attribute::getBinary | ( | std::vector< char > * | buffer | ) | const |
Returns an binary representation of the attribute.
| uint64_t Foundry::Katana::Attribute::getSize | ( | ) | const [inline] |
Returns the total memory in bytes that was allocated when the attribute was created.
For GroupAttribute, this value includes, apart from the allocated size of the group internals, also the size of all its children. If an attribute is included more than once in the group, the size of said attribute will be added just as many times as it appears.
Releasing the last reference to the attribute will potentially free as much data as returned by this function.
| FnKatAttributeType Foundry::Katana::Attribute::getType | ( | ) | const [inline] |
Returns the Type of Attribute
Referenced by Foundry::Katana::FnOpDescription::OptionalAttrDescription::setDefaultValue().
| std::string Foundry::Katana::Attribute::getXML | ( | ) | const |
Returns an xml representation of the attribute.
| bool Foundry::Katana::Attribute::isValid | ( | ) | const [inline] |
Returns true if this attribute is valid.
Referenced by Foundry::Katana::GroupBuilder::deepUpdate(), Foundry::Katana::ViewerAPI::PickedAttrsMap::fromGroupAttribute(), GLCoiManipulator::matches(), and Foundry::Katana::GroupBuilder::update().
| static Attribute Foundry::Katana::Attribute::parseBinary | ( | const char * | buffer, |
| size_t | size | ||
| ) | [static] |
Returns an Attribute from a binary representation.
| static Attribute Foundry::Katana::Attribute::parseXML | ( | const char * | xml | ) | [static] |
Returns an Attribute from an XML representation.
| static Attribute Foundry::Katana::Attribute::readAttributeStream | ( | void * | stream, |
| FnAttributeReadStreamFunc | func, | ||
| FnKatStreamType | streamType | ||
| ) | [static] |
Returns an Attribute read from the stream provided.
| stream | Opaque pointer to stream object. |
| func | Function to read bytes from stream object. |
| streamType | How to read the stream either as XML or binary. |
| bool Foundry::Katana::Attribute::writeAttributeStream | ( | void * | stream, |
| FnAttributeWriteStreamFunc | func, | ||
| FnKatStreamType | streamType | ||
| ) | const |
Writes an Attribute to the stream provided. Returns true for success, false for failure.
| stream | Opaque pointer to stream object. |
| func | Function to write bytes to stream object. |
| streamType | How to write the stream either as XML or binary. |
1.7.3