Nebula
Loading...
Searching...
No Matches
Attr::Attribute Class Reference

#include <attribute.h>

Detailed Description

A compiletime-typesafe key/value pair.

Inherits Util::KeyValuePair< AttrId, Util::Variant >.

Public Member Functions

 Attribute ()
 default constructor
 
 Attribute (const Attribute &rhs)
 copy constructor
 
 Attribute (const AttrId &id)
 construct from typeless attribute id
 
 Attribute (Util::KeyValuePair< AttrId, Util::Variant > const &kvp)
 construct from kvp
 
 Attribute (const BoolAttrId &id, bool val)
 construct from bool
 
 Attribute (const FloatAttrId &id, float val)
 construct from float
 
 Attribute (const IntAttrId &id, int val)
 construct from int
 
 Attribute (const UIntAttrId &id, uint val)
 construct from uint attribute id
 
 Attribute (const Mat4AttrId &id, const Math::mat4 &val)
 construct from matrix44
 
 Attribute (const StringAttrId &id, const Util::String &val)
 construct from string
 
 Attribute (const Vec4AttrId &id, const Math::vec4 &val)
 construct from float4
 
 Attribute (const GuidAttrId &id, const Util::Guid &val)
 construct from guid
 
 Attribute (const BlobAttrId &id, const Util::Blob &val)
 construct from blob
 
void SetAttrId (const AttrId &id)
 set attribute id
 
const AttrIdGetAttrId () const
 get attribute id
 
const Util::StringGetName () const
 get name of attribute
 
const Util::FourCCGetFourCC () const
 get fourcc of attribute
 
ValueType GetValueType () const
 get value type of attribute
 
AccessMode GetAccessMode () const
 get access mode of attribute
 
void Clear ()
 clear the attribute's value
 
void operator= (const Attribute &rhs)
 assignment operator
 
void operator= (bool rhs)
 bool assignment operator
 
void operator= (float rhs)
 float assignment operator
 
void operator= (int rhs)
 int assignment operator
 
void operator= (const Math::mat4 &rhs)
 matrix44 assignment operator
 
void operator= (const Util::String &rhs)
 string assignment operator
 
void operator= (const Math::vec4 &rhs)
 float4 assignment operator
 
void operator= (const Util::Guid &rhs)
 guid assignment operator
 
void operator= (const Util::Blob &rhs)
 blob assignment operator
 
bool operator== (const Attribute &rhs) const
 equality operator
 
bool operator== (const Util::String &rhs) const
 string equality operator
 
bool operator== (int rhs) const
 int equality operator
 
bool operator== (float rhs) const
 float equality operator
 
bool operator== (bool rhs) const
 bool equality operator
 
bool operator== (const Math::vec4 &rhs) const
 float4 equality operator
 
bool operator== (const Util::Guid &rhs) const
 guid equality operator
 
bool operator!= (const Attribute &rhs) const
 equality operator
 
bool operator!= (const Util::String &rhs) const
 string equality operator
 
bool operator!= (int rhs) const
 int equality operator
 
bool operator!= (float rhs) const
 float equality operator
 
bool operator!= (bool rhs) const
 bool equality operator
 
bool operator!= (const Math::vec4 &rhs) const
 float4 equality operator
 
bool operator!= (const Util::Guid &rhs) const
 guid equality operator
 
void SetBool (bool val)
 set bool content
 
bool GetBool () const
 get bool content
 
void SetInt (int val)
 set int content
 
int GetInt () const
 get int content
 
void SetUInt (uint val)
 set int content
 
uint GetUInt () const
 get int content
 
void SetFloat (float val)
 set float content
 
float GetFloat () const
 get float content
 
void SetString (const Util::String &val)
 set string content
 
const Util::StringGetString () const
 get string content
 
void SetMat4 (const Math::mat4 &val)
 set matrix44 value
 
const Math::mat4GetMat4 () const
 get matrix44 value
 
void SetVec4 (const Math::vec4 &val)
 set float4 value
 
Math::vec4 GetVec4 () const
 get float4 value
 
void SetGuid (const Util::Guid &val)
 set guid value
 
const Util::GuidGetGuid () const
 get guid value
 
void SetBlob (const Util::Blob &val)
 set blob value
 
const Util::BlobGetBlob () const
 get blob value
 
void SetValue (const Util::Variant &val)
 set generic value
 
const Util::VariantGetValue () const
 get generic value
 
void SetValueFromString (const Util::String &str)
 set value from string (convert as necessary)
 
Util::String ValueAsString () const
 convert the content to a string
 
- Public Member Functions inherited from Util::KeyValuePair< AttrId, Util::Variant >
 KeyValuePair ()
 default constructor
 
 KeyValuePair (const AttrId &k, const Util::Variant &v)
 constructor with key and value
 
 KeyValuePair (const AttrId &k)
 constructor with key and undefined value
 
 KeyValuePair (const KeyValuePair< AttrId, Util::Variant > &rhs)
 copy constructor
 
 KeyValuePair (KeyValuePair< AttrId, Util::Variant > &&rhs) noexcept
 move constructor
 
void operator= (const KeyValuePair< AttrId, Util::Variant > &rhs)
 assignment operator
 
void operator= (KeyValuePair< AttrId, Util::Variant > &&rhs) noexcept
 move assignment operator
 
bool operator== (const KeyValuePair< AttrId, Util::Variant > &rhs) const
 equality operator
 
bool operator== (const AttrId &rhs) const
 equality operator
 
bool operator!= (const KeyValuePair< AttrId, Util::Variant > &rhs) const
 inequality operator
 
bool operator!= (const AttrId &rhs) const
 inequality operator
 
bool operator> (const KeyValuePair< AttrId, Util::Variant > &rhs) const
 greater operator
 
bool operator> (const AttrId &rhs) const
 greater operator
 
bool operator>= (const KeyValuePair< AttrId, Util::Variant > &rhs) const
 greater-or-equal operator
 
bool operator>= (const AttrId &rhs) const
 greater-or-equal operator
 
bool operator< (const KeyValuePair< AttrId, Util::Variant > &rhs) const
 lesser operator
 
bool operator< (const AttrId &rhs) const
 lesser operator
 
bool operator<= (const KeyValuePair< AttrId, Util::Variant > &rhs) const
 lesser-or-equal operator
 
bool operator<= (const AttrId &rhs) const
 lesser-or-equal operator
 
Util::VariantValue ()
 read/write access to value
 
const Util::VariantValue () const
 read access to key
 
const AttrId & Key () const
 read access to key
 

Static Public Member Functions

static ValueType StringToValueType (const Util::String &s)
 convert string to type
 
static Util::String ValueTypeToString (ValueType t)
 convert type to string
 

Additional Inherited Members

- Public Attributes inherited from Util::KeyValuePair< AttrId, Util::Variant >
AttrId keyData
 
Util::Variant valueData
 

Constructor & Destructor Documentation

◆ Attribute() [1/13]

Attr::Attribute::Attribute ( )
inline

default constructor

◆ Attribute() [2/13]

Attr::Attribute::Attribute ( const Attribute & rhs)
inline

copy constructor

◆ Attribute() [3/13]

Attr::Attribute::Attribute ( const AttrId & id)
inline

construct from typeless attribute id

◆ Attribute() [4/13]

Attr::Attribute::Attribute ( Util::KeyValuePair< AttrId, Util::Variant > const & kvp)
inline

construct from kvp

◆ Attribute() [5/13]

Attr::Attribute::Attribute ( const BoolAttrId & id,
bool val )
inline

construct from bool

◆ Attribute() [6/13]

Attr::Attribute::Attribute ( const FloatAttrId & id,
float val )
inline

construct from float

◆ Attribute() [7/13]

Attr::Attribute::Attribute ( const IntAttrId & id,
int val )
inline

construct from int

◆ Attribute() [8/13]

Attr::Attribute::Attribute ( const UIntAttrId & id,
uint val )
inline

construct from uint attribute id

◆ Attribute() [9/13]

Attr::Attribute::Attribute ( const Mat4AttrId & id,
const Math::mat4 & val )
inline

construct from matrix44

◆ Attribute() [10/13]

Attr::Attribute::Attribute ( const StringAttrId & id,
const Util::String & val )
inline

construct from string

◆ Attribute() [11/13]

Attr::Attribute::Attribute ( const Vec4AttrId & id,
const Math::vec4 & val )
inline

construct from float4

◆ Attribute() [12/13]

Attr::Attribute::Attribute ( const GuidAttrId & id,
const Util::Guid & val )
inline

construct from guid

◆ Attribute() [13/13]

Attr::Attribute::Attribute ( const BlobAttrId & id,
const Util::Blob & val )
inline

construct from blob

Member Function Documentation

◆ Clear()

void Attr::Attribute::Clear ( )
inline

clear the attribute's value

◆ GetAccessMode()

AccessMode Attr::Attribute::GetAccessMode ( ) const
inline

get access mode of attribute

◆ GetAttrId()

const AttrId & Attr::Attribute::GetAttrId ( ) const
inline

get attribute id

◆ GetBlob()

const Util::Blob & Attr::Attribute::GetBlob ( ) const
inline

get blob value

◆ GetBool()

bool Attr::Attribute::GetBool ( ) const
inline

get bool content

◆ GetFloat()

float Attr::Attribute::GetFloat ( ) const
inline

get float content

◆ GetFourCC()

const Util::FourCC & Attr::Attribute::GetFourCC ( ) const
inline

get fourcc of attribute

◆ GetGuid()

const Util::Guid & Attr::Attribute::GetGuid ( ) const
inline

get guid value

◆ GetInt()

int Attr::Attribute::GetInt ( ) const
inline

get int content

◆ GetMat4()

const Math::mat4 & Attr::Attribute::GetMat4 ( ) const
inline

get matrix44 value

◆ GetName()

const Util::String & Attr::Attribute::GetName ( ) const
inline

get name of attribute

◆ GetString()

const Util::String & Attr::Attribute::GetString ( ) const
inline

get string content

◆ GetUInt()

uint Attr::Attribute::GetUInt ( ) const
inline

get int content

◆ GetValue()

const Util::Variant & Attr::Attribute::GetValue ( ) const
inline

get generic value

◆ GetValueType()

ValueType Attr::Attribute::GetValueType ( ) const
inline

get value type of attribute

◆ GetVec4()

Math::vec4 Attr::Attribute::GetVec4 ( ) const
inline

get float4 value

◆ operator!=() [1/7]

bool Attr::Attribute::operator!= ( bool rhs) const

bool equality operator

◆ operator!=() [2/7]

bool Attr::Attribute::operator!= ( const Attribute & rhs) const
inline

equality operator

◆ operator!=() [3/7]

bool Attr::Attribute::operator!= ( const Math::vec4 & rhs) const
inline

float4 equality operator

◆ operator!=() [4/7]

bool Attr::Attribute::operator!= ( const Util::Guid & rhs) const
inline

guid equality operator

◆ operator!=() [5/7]

bool Attr::Attribute::operator!= ( const Util::String & rhs) const
inline

string equality operator

◆ operator!=() [6/7]

bool Attr::Attribute::operator!= ( float rhs) const
inline

float equality operator

◆ operator!=() [7/7]

bool Attr::Attribute::operator!= ( int rhs) const
inline

int equality operator

◆ operator=() [1/9]

void Attr::Attribute::operator= ( bool rhs)
inline

bool assignment operator

◆ operator=() [2/9]

void Attr::Attribute::operator= ( const Attribute & rhs)
inline

assignment operator

◆ operator=() [3/9]

void Attr::Attribute::operator= ( const Math::mat4 & rhs)
inline

matrix44 assignment operator

◆ operator=() [4/9]

void Attr::Attribute::operator= ( const Math::vec4 & rhs)
inline

float4 assignment operator

◆ operator=() [5/9]

void Attr::Attribute::operator= ( const Util::Blob & rhs)
inline

blob assignment operator

◆ operator=() [6/9]

void Attr::Attribute::operator= ( const Util::Guid & rhs)
inline

guid assignment operator

◆ operator=() [7/9]

void Attr::Attribute::operator= ( const Util::String & rhs)
inline

string assignment operator

◆ operator=() [8/9]

void Attr::Attribute::operator= ( float rhs)
inline

float assignment operator

◆ operator=() [9/9]

void Attr::Attribute::operator= ( int rhs)
inline

int assignment operator

◆ operator==() [1/7]

bool Attr::Attribute::operator== ( bool rhs) const
inline

bool equality operator

◆ operator==() [2/7]

bool Attr::Attribute::operator== ( const Attribute & rhs) const
inline

equality operator

◆ operator==() [3/7]

bool Attr::Attribute::operator== ( const Math::vec4 & rhs) const
inline

float4 equality operator

◆ operator==() [4/7]

bool Attr::Attribute::operator== ( const Util::Guid & rhs) const
inline

guid equality operator

◆ operator==() [5/7]

bool Attr::Attribute::operator== ( const Util::String & rhs) const
inline

string equality operator

◆ operator==() [6/7]

bool Attr::Attribute::operator== ( float rhs) const
inline

float equality operator

◆ operator==() [7/7]

bool Attr::Attribute::operator== ( int rhs) const
inline

int equality operator

◆ SetAttrId()

void Attr::Attribute::SetAttrId ( const AttrId & id)
inline

set attribute id

◆ SetBlob()

void Attr::Attribute::SetBlob ( const Util::Blob & val)
inline

set blob value

◆ SetBool()

void Attr::Attribute::SetBool ( bool val)
inline

set bool content

◆ SetFloat()

void Attr::Attribute::SetFloat ( float val)
inline

set float content

◆ SetGuid()

void Attr::Attribute::SetGuid ( const Util::Guid & val)
inline

set guid value

◆ SetInt()

void Attr::Attribute::SetInt ( int val)
inline

set int content

◆ SetMat4()

void Attr::Attribute::SetMat4 ( const Math::mat4 & val)
inline

set matrix44 value

◆ SetString()

void Attr::Attribute::SetString ( const Util::String & val)
inline

set string content

◆ SetUInt()

void Attr::Attribute::SetUInt ( uint val)
inline

set int content

◆ SetValue()

void Attr::Attribute::SetValue ( const Util::Variant & val)
inline

set generic value

◆ SetValueFromString()

void Attr::Attribute::SetValueFromString ( const Util::String & str)
inline

set value from string (convert as necessary)

◆ SetVec4()

void Attr::Attribute::SetVec4 ( const Math::vec4 & val)
inline

set float4 value

◆ StringToValueType()

ValueType Attr::Attribute::StringToValueType ( const Util::String & s)
inlinestatic

convert string to type

◆ ValueAsString()

Util::String Attr::Attribute::ValueAsString ( ) const
inline

convert the content to a string

◆ ValueTypeToString()

Util::String Attr::Attribute::ValueTypeToString ( ValueType t)
inlinestatic

convert type to string


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