Duckcpp 2.1.0
Duckcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
dcpp::io::IAttributes Class Referenceabstract

Provides a generic interface for attributes and their values and the possibility to serialize them. More...

#include <duckcpp/core/engine/IAttributes.hpp>

Inheritance diagram for dcpp::io::IAttributes:
Inheritance graph
Collaboration diagram for dcpp::io::IAttributes:
Collaboration graph

Public Member Functions

virtual dcpp::uint32_kt getAttributeCount () const =0
 Returns amount of attributes in this collection of attributes.
 
virtual const dcpp::char_ktgetAttributeName (dcpp::int32_kt index) const =0
 
virtual E_ATTRIBUTE_TYPE getAttributeType (const dcpp::char_kt *attributeName) const =0
 
virtual E_ATTRIBUTE_TYPE getAttributeType (dcpp::int32_kt index) const =0
 
virtual const wchar_t * getAttributeTypeString (const dcpp::char_kt *attributeName, const wchar_t *defaultNotFound=L"unknown") const =0
 
virtual const wchar_t * getAttributeTypeString (dcpp::int32_kt index, const wchar_t *defaultNotFound=L"unknown") const =0
 
virtual bool existsAttribute (const dcpp::char_kt *attributeName) const =0
 Returns if an attribute with a name exists.
 
virtual dcpp::int32_kt findAttribute (const dcpp::char_kt *attributeName) const =0
 Returns attribute index from name, -1 if not found.
 
virtual void clear ()=0
 Removes all attributes.
 
virtual bool read (dcpp::io::IXMLReader *reader, bool readCurrentElementOnly=false, const wchar_t *elementName=0)=0
 
virtual bool write (dcpp::io::IXMLWriter *writer, bool writeXMLHeader=false, const wchar_t *elementName=0)=0
 
virtual void addInt (const dcpp::char_kt *attributeName, dcpp::int32_kt value)=0
 Adds an attribute as integer.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, dcpp::int32_kt value)=0
 Sets an attribute as integer value.
 
virtual dcpp::int32_kt getAttributeAsInt (const dcpp::char_kt *attributeName, dcpp::int32_kt defaultNotFound=0) const =0
 
virtual dcpp::int32_kt getAttributeAsInt (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, dcpp::int32_kt value)=0
 Sets an attribute as integer value.
 
virtual void addFloat (const dcpp::char_kt *attributeName, dcpp::float32_kt value)=0
 Adds an attribute as float.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, dcpp::float32_kt value)=0
 Sets a attribute as float value.
 
virtual dcpp::float32_kt getAttributeAsFloat (const dcpp::char_kt *attributeName, dcpp::float32_kt defaultNotFound=0.f) const =0
 
virtual dcpp::float32_kt getAttributeAsFloat (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, dcpp::float32_kt value)=0
 Sets an attribute as float value.
 
virtual void addString (const dcpp::char_kt *attributeName, const dcpp::char_kt *value)=0
 Adds an attribute as string.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, const dcpp::char_kt *value)=0
 
virtual dcpp::nub::string getAttributeAsString (const dcpp::char_kt *attributeName, const dcpp::nub::string &defaultNotFound=dcpp::nub::string()) const =0
 
virtual void getAttributeAsString (const dcpp::char_kt *attributeName, dcpp::char_kt *target) const =0
 
virtual dcpp::nub::string getAttributeAsString (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, const dcpp::char_kt *value)=0
 
virtual void addString (const dcpp::char_kt *attributeName, const wchar_t *value)=0
 Adds an attribute as string.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, const wchar_t *value)=0
 
virtual dcpp::nub::wstring getAttributeAsWstring (const dcpp::char_kt *attributeName, const dcpp::nub::wstring &defaultNotFound=dcpp::nub::wstring()) const =0
 
virtual void getAttributeAsWstring (const dcpp::char_kt *attributeName, wchar_t *target) const =0
 
virtual dcpp::nub::wstring getAttributeAsWstring (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, const wchar_t *value)=0
 
virtual void addBinary (const dcpp::char_kt *attributeName, void *data, dcpp::int32_kt dataSizeInBytes)=0
 Adds an attribute as binary data.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, void *data, dcpp::int32_kt dataSizeInBytes)=0
 Sets an attribute as binary data.
 
virtual void getAttributeAsBinaryData (const dcpp::char_kt *attributeName, void *outData, dcpp::int32_kt maxSizeInBytes) const =0
 Gets an attribute as binary data.
 
virtual void getAttributeAsBinaryData (dcpp::int32_kt index, void *outData, dcpp::int32_kt maxSizeInBytes) const =0
 Gets an attribute as binary data.
 
virtual void setAttribute (dcpp::int32_kt index, void *data, dcpp::int32_kt dataSizeInBytes)=0
 Sets an attribute as binary data.
 
virtual void addArray (const dcpp::char_kt *attributeName, const dcpp::nub::array< dcpp::nub::wstring > &value)=0
 Adds an attribute as wide string array.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, const dcpp::nub::array< dcpp::nub::wstring > &value)=0
 
virtual dcpp::nub::array< dcpp::nub::wstringgetAttributeAsArray (const dcpp::char_kt *attributeName, const dcpp::nub::array< dcpp::nub::wstring > &defaultNotFound=dcpp::nub::array< dcpp::nub::wstring >()) const =0
 
virtual dcpp::nub::array< dcpp::nub::wstringgetAttributeAsArray (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, const dcpp::nub::array< dcpp::nub::wstring > &value)=0
 Sets an attribute as an array of wide strings.
 
virtual void addBool (const dcpp::char_kt *attributeName, bool value)=0
 Adds an attribute as bool.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, bool value)=0
 Sets an attribute as boolean value.
 
virtual bool getAttributeAsBool (const dcpp::char_kt *attributeName, bool defaultNotFound=false) const =0
 
virtual bool getAttributeAsBool (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, bool value)=0
 Sets an attribute as boolean value.
 
virtual void addEnum (const dcpp::char_kt *attributeName, const dcpp::char_kt *enumValue, const dcpp::char_kt *const *enumerationLiterals)=0
 Adds an attribute as enum.
 
virtual void addEnum (const dcpp::char_kt *attributeName, dcpp::int32_kt enumValue, const dcpp::char_kt *const *enumerationLiterals)=0
 Adds an attribute as enum.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, const dcpp::char_kt *enumValue, const dcpp::char_kt *const *enumerationLiterals)=0
 Sets an attribute as enumeration.
 
virtual const dcpp::char_ktgetAttributeAsEnumeration (const dcpp::char_kt *attributeName, const dcpp::char_kt *defaultNotFound=0) const =0
 
virtual dcpp::int32_kt getAttributeAsEnumeration (const dcpp::char_kt *attributeName, const dcpp::char_kt *const *enumerationLiteralsToUse, dcpp::int32_kt defaultNotFound=-1) const =0
 Gets an attribute as enumeration.
 
virtual dcpp::int32_kt getAttributeAsEnumeration (dcpp::int32_kt index, const dcpp::char_kt *const *enumerationLiteralsToUse, dcpp::int32_kt defaultNotFound=-1) const =0
 Gets an attribute as enumeration.
 
virtual const dcpp::char_ktgetAttributeAsEnumeration (dcpp::int32_kt index) const =0
 
virtual void getAttributeEnumerationLiteralsOfEnumeration (const dcpp::char_kt *attributeName, dcpp::nub::array< dcpp::nub::string > &outLiterals) const =0
 
virtual void getAttributeEnumerationLiteralsOfEnumeration (dcpp::int32_kt index, dcpp::nub::array< dcpp::nub::string > &outLiterals) const =0
 
virtual void setAttribute (dcpp::int32_kt index, const dcpp::char_kt *enumValue, const dcpp::char_kt *const *enumerationLiterals)=0
 Sets an attribute as enumeration.
 
virtual void addColor (const dcpp::char_kt *attributeName, dcpp::video::SColor value)=0
 Adds an attribute as color.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, dcpp::video::SColor color)=0
 Sets a attribute as color.
 
virtual dcpp::video::SColor getAttributeAsColor (const dcpp::char_kt *attributeName, const dcpp::video::SColor &defaultNotFound=dcpp::video::SColor(0)) const =0
 
virtual dcpp::video::SColor getAttributeAsColor (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, dcpp::video::SColor color)=0
 Sets an attribute as color.
 
virtual void addColorf (const dcpp::char_kt *attributeName, dcpp::video::SColorf value)=0
 Adds an attribute as floating point color.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, dcpp::video::SColorf color)=0
 Sets a attribute as floating point color.
 
virtual dcpp::video::SColorf getAttributeAsColorf (const dcpp::char_kt *attributeName, const dcpp::video::SColorf &defaultNotFound=dcpp::video::SColorf(0)) const =0
 
virtual dcpp::video::SColorf getAttributeAsColorf (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, dcpp::video::SColorf color)=0
 Sets an attribute as floating point color.
 
virtual void addVector3d (const dcpp::char_kt *attributeName, const dcpp::nub::vector3df &value)=0
 Adds an attribute as 3d vector.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, const dcpp::nub::vector3df &v)=0
 Sets a attribute as 3d vector.
 
virtual dcpp::nub::vector3df getAttributeAsVector3d (const dcpp::char_kt *attributeName, const dcpp::nub::vector3df &defaultNotFound=dcpp::nub::vector3df(0, 0, 0)) const =0
 
virtual dcpp::nub::vector3df getAttributeAsVector3d (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, const dcpp::nub::vector3df &v)=0
 Sets an attribute as vector.
 
virtual void addVector2d (const dcpp::char_kt *attributeName, const dcpp::nub::vector2df &value)=0
 Adds an attribute as 2d vector.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, const dcpp::nub::vector2df &v)=0
 Sets a attribute as 2d vector.
 
virtual dcpp::nub::vector2df getAttributeAsVector2d (const dcpp::char_kt *attributeName, const dcpp::nub::vector2df &defaultNotFound=dcpp::nub::vector2df(0, 0)) const =0
 
virtual dcpp::nub::vector2df getAttributeAsVector2d (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, const dcpp::nub::vector2df &v)=0
 Sets an attribute as 2d vector.
 
virtual void addPosition2d (const dcpp::char_kt *attributeName, const dcpp::nub::position2di &value)=0
 Adds an attribute as 2d position.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, const dcpp::nub::position2di &v)=0
 Sets a attribute as 2d position.
 
virtual dcpp::nub::position2di getAttributeAsPosition2d (const dcpp::char_kt *attributeName, const dcpp::nub::position2di &defaultNotFound=dcpp::nub::position2di(0, 0)) const =0
 
virtual dcpp::nub::position2di getAttributeAsPosition2d (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, const dcpp::nub::position2di &v)=0
 Sets an attribute as 2d position.
 
virtual void addRect (const dcpp::char_kt *attributeName, const dcpp::nub::recti &value)=0
 Adds an attribute as rectangle.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, const dcpp::nub::recti &v)=0
 Sets an attribute as rectangle.
 
virtual dcpp::nub::recti getAttributeAsRect (const dcpp::char_kt *attributeName, const dcpp::nub::recti &defaultNotFound=dcpp::nub::recti()) const =0
 
virtual dcpp::nub::recti getAttributeAsRect (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, const dcpp::nub::recti &v)=0
 Sets an attribute as rectangle.
 
virtual void addDimension2d (const dcpp::char_kt *attributeName, const dcpp::nub::dimension2du &value)=0
 Adds an attribute as dimension2d.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, const dcpp::nub::dimension2du &v)=0
 Sets an attribute as dimension2d.
 
virtual dcpp::nub::dimension2du getAttributeAsDimension2d (const dcpp::char_kt *attributeName, const dcpp::nub::dimension2du &defaultNotFound=dcpp::nub::dimension2du()) const =0
 
virtual dcpp::nub::dimension2du getAttributeAsDimension2d (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, const dcpp::nub::dimension2du &v)=0
 Sets an attribute as dimension2d.
 
virtual void addMatrix (const dcpp::char_kt *attributeName, const dcpp::nub::matrix4 &v)=0
 Adds an attribute as matrix.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, const dcpp::nub::matrix4 &v)=0
 Sets an attribute as matrix.
 
virtual dcpp::nub::matrix4 getAttributeAsMatrix (const dcpp::char_kt *attributeName, const dcpp::nub::matrix4 &defaultNotFound=dcpp::nub::matrix4()) const =0
 
virtual dcpp::nub::matrix4 getAttributeAsMatrix (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, const dcpp::nub::matrix4 &v)=0
 Sets an attribute as matrix.
 
virtual void addQuaternion (const dcpp::char_kt *attributeName, const dcpp::nub::quaternion &v)=0
 Adds an attribute as quaternion.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, const dcpp::nub::quaternion &v)=0
 Sets an attribute as quaternion.
 
virtual dcpp::nub::quaternion getAttributeAsQuaternion (const dcpp::char_kt *attributeName, const dcpp::nub::quaternion &defaultNotFound=dcpp::nub::quaternion(0, 1, 0, 0)) const =0
 
virtual dcpp::nub::quaternion getAttributeAsQuaternion (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, const dcpp::nub::quaternion &v)=0
 Sets an attribute as quaternion.
 
virtual void addBox3d (const dcpp::char_kt *attributeName, const dcpp::nub::aabbox3df &v)=0
 Adds an attribute as axis aligned bounding box.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, const dcpp::nub::aabbox3df &v)=0
 Sets an attribute as axis aligned bounding box.
 
virtual dcpp::nub::aabbox3df getAttributeAsBox3d (const dcpp::char_kt *attributeName, const dcpp::nub::aabbox3df &defaultNotFound=dcpp::nub::aabbox3df(0, 0, 0, 0, 0, 0)) const =0
 
virtual dcpp::nub::aabbox3df getAttributeAsBox3d (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, const dcpp::nub::aabbox3df &v)=0
 Sets an attribute as axis aligned bounding box.
 
virtual void addPlane3d (const dcpp::char_kt *attributeName, const dcpp::nub::plane3df &v)=0
 Adds an attribute as 3d plane.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, const dcpp::nub::plane3df &v)=0
 Sets an attribute as 3d plane.
 
virtual dcpp::nub::plane3df getAttributeAsPlane3d (const dcpp::char_kt *attributeName, const dcpp::nub::plane3df &defaultNotFound=dcpp::nub::plane3df(0, 0, 0, 0, 1, 0)) const =0
 
virtual dcpp::nub::plane3df getAttributeAsPlane3d (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, const dcpp::nub::plane3df &v)=0
 Sets an attribute as 3d plane.
 
virtual void addTriangle3d (const dcpp::char_kt *attributeName, const dcpp::nub::triangle3df &v)=0
 Adds an attribute as 3d triangle.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, const dcpp::nub::triangle3df &v)=0
 Sets an attribute as 3d trianle.
 
virtual dcpp::nub::triangle3df getAttributeAsTriangle3d (const dcpp::char_kt *attributeName, const dcpp::nub::triangle3df &defaultNotFound=dcpp::nub::triangle3df(dcpp::nub::vector3df(0, 0, 0), dcpp::nub::vector3df(0, 0, 0), dcpp::nub::vector3df(0, 0, 0))) const =0
 
virtual dcpp::nub::triangle3df getAttributeAsTriangle3d (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, const dcpp::nub::triangle3df &v)=0
 Sets an attribute as 3d triangle.
 
virtual void addLine2d (const dcpp::char_kt *attributeName, const dcpp::nub::line2df &v)=0
 Adds an attribute as a 2d line.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, const dcpp::nub::line2df &v)=0
 Sets an attribute as a 2d line.
 
virtual dcpp::nub::line2df getAttributeAsLine2d (const dcpp::char_kt *attributeName, const dcpp::nub::line2df &defaultNotFound=dcpp::nub::line2df(0, 0, 0, 0)) const =0
 
virtual dcpp::nub::line2df getAttributeAsLine2d (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, const dcpp::nub::line2df &v)=0
 Sets an attribute as a 2d line.
 
virtual void addLine3d (const dcpp::char_kt *attributeName, const dcpp::nub::line3df &v)=0
 Adds an attribute as a 3d line.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, const dcpp::nub::line3df &v)=0
 Sets an attribute as a 3d line.
 
virtual dcpp::nub::line3df getAttributeAsLine3d (const dcpp::char_kt *attributeName, const dcpp::nub::line3df &defaultNotFound=dcpp::nub::line3df(0, 0, 0, 0, 0, 0)) const =0
 
virtual dcpp::nub::line3df getAttributeAsLine3d (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, const dcpp::nub::line3df &v)=0
 Sets an attribute as a 3d line.
 
virtual void addTexture (const dcpp::char_kt *attributeName, dcpp::video::ITexture *texture, const dcpp::io::path &filename="")=0
 Adds an attribute as texture reference.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, dcpp::video::ITexture *texture, const dcpp::io::path &filename="")=0
 Sets an attribute as texture reference.
 
virtual dcpp::video::ITexturegetAttributeAsTexture (const dcpp::char_kt *attributeName, dcpp::video::ITexture *defaultNotFound=0) const =0
 
virtual dcpp::video::ITexturegetAttributeAsTexture (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, dcpp::video::ITexture *texture, const dcpp::io::path &filename="")=0
 Sets an attribute as texture reference.
 
virtual void addUserPointer (const dcpp::char_kt *attributeName, void *userPointer)=0
 Adds an attribute as user pointer.
 
virtual void setAttribute (const dcpp::char_kt *attributeName, void *userPointer)=0
 Sets an attribute as user pointer.
 
virtual void * getAttributeAsUserPointer (const dcpp::char_kt *attributeName, void *defaultNotFound=0) const =0
 
virtual void * getAttributeAsUserPointer (dcpp::int32_kt index) const =0
 
virtual void setAttribute (dcpp::int32_kt index, void *userPointer)=0
 Sets an attribute as user pointer.
 
- Public Member Functions inherited from dcpp::IReferenceCounted
 IReferenceCounted ()
 Constructor.
 
virtual ~IReferenceCounted ()
 Destructor.
 
void grab () const
 Grabs the object. Increments the reference counter by one.
 
bool drop () const
 Drops the object. Decrements the reference counter by one.
 
dcpp::int32_kt getReferenceCount () const
 Get the reference count.
 
const dcpp::char_ktgetDebugName () const
 Returns the debug name of the object.
 

Additional Inherited Members

- Protected Member Functions inherited from dcpp::IReferenceCounted
void setDebugName (const dcpp::char_kt *newName)
 Sets the debug name of the object.
 

Detailed Description

Provides a generic interface for attributes and their values and the possibility to serialize them.

Member Function Documentation

◆ getAttributeAsArray() [1/2]

virtual dcpp::nub::array< dcpp::nub::wstring > dcpp::io::IAttributes::getAttributeAsArray ( const dcpp::char_kt attributeName,
const dcpp::nub::array< dcpp::nub::wstring > &  defaultNotFound = dcpp::nub::arraydcpp::nub::wstring >() 
) const
pure virtual

Gets an attribute as an array of wide strings.

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute() or defaultNotFound if attribute is not set.

◆ getAttributeAsArray() [2/2]

virtual dcpp::nub::array< dcpp::nub::wstring > dcpp::io::IAttributes::getAttributeAsArray ( dcpp::int32_kt  index) const
pure virtual

Returns attribute value as an array of wide strings by index.

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsBinaryData() [1/2]

virtual void dcpp::io::IAttributes::getAttributeAsBinaryData ( const dcpp::char_kt attributeName,
void *  outData,
dcpp::int32_kt  maxSizeInBytes 
) const
pure virtual

Gets an attribute as binary data.

Parameters
attributeNameName of the attribute to get.
outDataPointer to buffer where data shall be stored.
maxSizeInBytesMaximum number of bytes to write into outData.

◆ getAttributeAsBinaryData() [2/2]

virtual void dcpp::io::IAttributes::getAttributeAsBinaryData ( dcpp::int32_kt  index,
void *  outData,
dcpp::int32_kt  maxSizeInBytes 
) const
pure virtual

Gets an attribute as binary data.

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.
outDataPointer to buffer where data shall be stored.
maxSizeInBytesMaximum number of bytes to write into outData.

◆ getAttributeAsBool() [1/2]

virtual bool dcpp::io::IAttributes::getAttributeAsBool ( const dcpp::char_kt attributeName,
bool  defaultNotFound = false 
) const
pure virtual

Gets an attribute as boolean value

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsBool() [2/2]

virtual bool dcpp::io::IAttributes::getAttributeAsBool ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as boolean value

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsBox3d() [1/2]

virtual dcpp::nub::aabbox3df dcpp::io::IAttributes::getAttributeAsBox3d ( const dcpp::char_kt attributeName,
const dcpp::nub::aabbox3df defaultNotFound = dcpp::nub::aabbox3df(0, 0, 0, 0, 0, 0) 
) const
pure virtual

Gets an attribute as a axis aligned bounding box

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsBox3d() [2/2]

virtual dcpp::nub::aabbox3df dcpp::io::IAttributes::getAttributeAsBox3d ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as axis aligned bounding box

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsColor() [1/2]

virtual dcpp::video::SColor dcpp::io::IAttributes::getAttributeAsColor ( const dcpp::char_kt attributeName,
const dcpp::video::SColor defaultNotFound = dcpp::video::SColor(0) 
) const
pure virtual

Gets an attribute as color

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsColor() [2/2]

virtual dcpp::video::SColor dcpp::io::IAttributes::getAttributeAsColor ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as color

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsColorf() [1/2]

virtual dcpp::video::SColorf dcpp::io::IAttributes::getAttributeAsColorf ( const dcpp::char_kt attributeName,
const dcpp::video::SColorf defaultNotFound = dcpp::video::SColorf(0) 
) const
pure virtual

Gets an attribute as floating point color

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsColorf() [2/2]

virtual dcpp::video::SColorf dcpp::io::IAttributes::getAttributeAsColorf ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as floating point color

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsDimension2d() [1/2]

virtual dcpp::nub::dimension2du dcpp::io::IAttributes::getAttributeAsDimension2d ( const dcpp::char_kt attributeName,
const dcpp::nub::dimension2du defaultNotFound = dcpp::nub::dimension2du() 
) const
pure virtual

Gets an attribute as dimension2d

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsDimension2d() [2/2]

virtual dcpp::nub::dimension2du dcpp::io::IAttributes::getAttributeAsDimension2d ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as dimension2d

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsEnumeration() [1/4]

virtual dcpp::int32_kt dcpp::io::IAttributes::getAttributeAsEnumeration ( const dcpp::char_kt attributeName,
const dcpp::char_kt *const *  enumerationLiteralsToUse,
dcpp::int32_kt  defaultNotFound = -1 
) const
pure virtual

Gets an attribute as enumeration.

Parameters
attributeNameName of the attribute to get.
enumerationLiteralsToUseUse these enumeration literals to get the index value instead of the set ones. This is useful when the attribute list maybe was read from an xml file, and only contains the enumeration string, but no information about its index.
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsEnumeration() [2/4]

virtual const dcpp::char_kt * dcpp::io::IAttributes::getAttributeAsEnumeration ( const dcpp::char_kt attributeName,
const dcpp::char_kt defaultNotFound = 0 
) const
pure virtual

Gets an attribute as enumeration

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsEnumeration() [3/4]

virtual const dcpp::char_kt * dcpp::io::IAttributes::getAttributeAsEnumeration ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as enumeration

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsEnumeration() [4/4]

virtual dcpp::int32_kt dcpp::io::IAttributes::getAttributeAsEnumeration ( dcpp::int32_kt  index,
const dcpp::char_kt *const *  enumerationLiteralsToUse,
dcpp::int32_kt  defaultNotFound = -1 
) const
pure virtual

Gets an attribute as enumeration.

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.
enumerationLiteralsToUseUse these enumeration literals to get the index value instead of the set ones. This is useful when the attribute list maybe was read from an xml file, and only contains the enumeration string, but no information about its index.
defaultNotFoundValue returned when the attribute referenced by the index was not found.
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsFloat() [1/2]

virtual dcpp::float32_kt dcpp::io::IAttributes::getAttributeAsFloat ( const dcpp::char_kt attributeName,
dcpp::float32_kt  defaultNotFound = 0.f 
) const
pure virtual

Gets an attribute as float value

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsFloat() [2/2]

virtual dcpp::float32_kt dcpp::io::IAttributes::getAttributeAsFloat ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as float value

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsInt() [1/2]

virtual dcpp::int32_kt dcpp::io::IAttributes::getAttributeAsInt ( const dcpp::char_kt attributeName,
dcpp::int32_kt  defaultNotFound = 0 
) const
pure virtual

Gets an attribute as integer value

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsInt() [2/2]

virtual dcpp::int32_kt dcpp::io::IAttributes::getAttributeAsInt ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as integer value

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsLine2d() [1/2]

virtual dcpp::nub::line2df dcpp::io::IAttributes::getAttributeAsLine2d ( const dcpp::char_kt attributeName,
const dcpp::nub::line2df defaultNotFound = dcpp::nub::line2df(0, 0, 0, 0) 
) const
pure virtual

Gets an attribute as a 2d line

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsLine2d() [2/2]

virtual dcpp::nub::line2df dcpp::io::IAttributes::getAttributeAsLine2d ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as a 2d line

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsLine3d() [1/2]

virtual dcpp::nub::line3df dcpp::io::IAttributes::getAttributeAsLine3d ( const dcpp::char_kt attributeName,
const dcpp::nub::line3df defaultNotFound = dcpp::nub::line3df(0, 0, 0, 0, 0, 0) 
) const
pure virtual

Gets an attribute as a 3d line

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsLine3d() [2/2]

virtual dcpp::nub::line3df dcpp::io::IAttributes::getAttributeAsLine3d ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as a 3d line

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsMatrix() [1/2]

virtual dcpp::nub::matrix4 dcpp::io::IAttributes::getAttributeAsMatrix ( const dcpp::char_kt attributeName,
const dcpp::nub::matrix4 defaultNotFound = dcpp::nub::matrix4() 
) const
pure virtual

Gets an attribute as a matrix4

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsMatrix() [2/2]

virtual dcpp::nub::matrix4 dcpp::io::IAttributes::getAttributeAsMatrix ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as matrix

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsPlane3d() [1/2]

virtual dcpp::nub::plane3df dcpp::io::IAttributes::getAttributeAsPlane3d ( const dcpp::char_kt attributeName,
const dcpp::nub::plane3df defaultNotFound = dcpp::nub::plane3df(0, 0, 0, 0, 1, 0) 
) const
pure virtual

Gets an attribute as a 3d plane

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsPlane3d() [2/2]

virtual dcpp::nub::plane3df dcpp::io::IAttributes::getAttributeAsPlane3d ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as 3d plane

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsPosition2d() [1/2]

virtual dcpp::nub::position2di dcpp::io::IAttributes::getAttributeAsPosition2d ( const dcpp::char_kt attributeName,
const dcpp::nub::position2di defaultNotFound = dcpp::nub::position2di(0, 0) 
) const
pure virtual

Gets an attribute as position

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsPosition2d() [2/2]

virtual dcpp::nub::position2di dcpp::io::IAttributes::getAttributeAsPosition2d ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as position

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsQuaternion() [1/2]

virtual dcpp::nub::quaternion dcpp::io::IAttributes::getAttributeAsQuaternion ( const dcpp::char_kt attributeName,
const dcpp::nub::quaternion defaultNotFound = dcpp::nub::quaternion(0, 1, 0, 0) 
) const
pure virtual

Gets an attribute as a quaternion

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsQuaternion() [2/2]

virtual dcpp::nub::quaternion dcpp::io::IAttributes::getAttributeAsQuaternion ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as quaternion

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsRect() [1/2]

virtual dcpp::nub::recti dcpp::io::IAttributes::getAttributeAsRect ( const dcpp::char_kt attributeName,
const dcpp::nub::recti defaultNotFound = dcpp::nub::recti() 
) const
pure virtual

Gets an attribute as rectangle

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsRect() [2/2]

virtual dcpp::nub::recti dcpp::io::IAttributes::getAttributeAsRect ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as rectangle

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsString() [1/3]

virtual dcpp::nub::string dcpp::io::IAttributes::getAttributeAsString ( const dcpp::char_kt attributeName,
const dcpp::nub::string defaultNotFound = dcpp::nub::string() 
) const
pure virtual

Gets an attribute as string.

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute() or defaultNotFound if attribute is not set.

◆ getAttributeAsString() [2/3]

virtual void dcpp::io::IAttributes::getAttributeAsString ( const dcpp::char_kt attributeName,
dcpp::char_kt target 
) const
pure virtual

Gets an attribute as string.

Parameters
attributeNameName of the attribute to get.
targetBuffer where the string is copied to.

◆ getAttributeAsString() [3/3]

virtual dcpp::nub::string dcpp::io::IAttributes::getAttributeAsString ( dcpp::int32_kt  index) const
pure virtual

Returns attribute value as string by index.

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsTexture() [1/2]

virtual dcpp::video::ITexture * dcpp::io::IAttributes::getAttributeAsTexture ( const dcpp::char_kt attributeName,
dcpp::video::ITexture defaultNotFound = 0 
) const
pure virtual

Gets an attribute as texture reference

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found

◆ getAttributeAsTexture() [2/2]

virtual dcpp::video::ITexture * dcpp::io::IAttributes::getAttributeAsTexture ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as texture reference

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsTriangle3d() [1/2]

virtual dcpp::nub::triangle3df dcpp::io::IAttributes::getAttributeAsTriangle3d ( const dcpp::char_kt attributeName,
const dcpp::nub::triangle3df defaultNotFound = dcpp::nub::triangle3df(dcpp::nub::vector3df(0, 0, 0), dcpp::nub::vector3df(0, 0, 0), dcpp::nub::vector3df(0, 0, 0)) 
) const
pure virtual

Gets an attribute as a 3d triangle

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsTriangle3d() [2/2]

virtual dcpp::nub::triangle3df dcpp::io::IAttributes::getAttributeAsTriangle3d ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as 3d triangle

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsUserPointer() [1/2]

virtual void * dcpp::io::IAttributes::getAttributeAsUserPointer ( const dcpp::char_kt attributeName,
void *  defaultNotFound = 0 
) const
pure virtual

Gets an attribute as user pointer

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found

◆ getAttributeAsUserPointer() [2/2]

virtual void * dcpp::io::IAttributes::getAttributeAsUserPointer ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as user pointer

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsVector2d() [1/2]

virtual dcpp::nub::vector2df dcpp::io::IAttributes::getAttributeAsVector2d ( const dcpp::char_kt attributeName,
const dcpp::nub::vector2df defaultNotFound = dcpp::nub::vector2df(0, 0) 
) const
pure virtual

Gets an attribute as vector

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsVector2d() [2/2]

virtual dcpp::nub::vector2df dcpp::io::IAttributes::getAttributeAsVector2d ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as position

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsVector3d() [1/2]

virtual dcpp::nub::vector3df dcpp::io::IAttributes::getAttributeAsVector3d ( const dcpp::char_kt attributeName,
const dcpp::nub::vector3df defaultNotFound = dcpp::nub::vector3df(0, 0, 0) 
) const
pure virtual

Gets an attribute as 3d vector

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute()

◆ getAttributeAsVector3d() [2/2]

virtual dcpp::nub::vector3df dcpp::io::IAttributes::getAttributeAsVector3d ( dcpp::int32_kt  index) const
pure virtual

Gets an attribute as 3d vector

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeAsWstring() [1/3]

virtual dcpp::nub::wstring dcpp::io::IAttributes::getAttributeAsWstring ( const dcpp::char_kt attributeName,
const dcpp::nub::wstring defaultNotFound = dcpp::nub::wstring() 
) const
pure virtual

Gets an attribute as string.

Parameters
attributeNameName of the attribute to get.
defaultNotFoundValue returned when attributeName was not found
Returns
Returns value of the attribute previously set by setAttribute() or defaultNotFound if attribute is not set.

◆ getAttributeAsWstring() [2/3]

virtual void dcpp::io::IAttributes::getAttributeAsWstring ( const dcpp::char_kt attributeName,
wchar_t *  target 
) const
pure virtual

Gets an attribute as string.

Parameters
attributeNameName of the attribute to get.
targetBuffer where the string is copied to.

◆ getAttributeAsWstring() [3/3]

virtual dcpp::nub::wstring dcpp::io::IAttributes::getAttributeAsWstring ( dcpp::int32_kt  index) const
pure virtual

Returns attribute value as string by index.

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeEnumerationLiteralsOfEnumeration() [1/2]

virtual void dcpp::io::IAttributes::getAttributeEnumerationLiteralsOfEnumeration ( const dcpp::char_kt attributeName,
dcpp::nub::array< dcpp::nub::string > &  outLiterals 
) const
pure virtual

Gets the list of enumeration literals of an enumeration attribute

Parameters
attributeNameName of the attribute to get.
outLiteralsSet of strings to choose the enum name from.

◆ getAttributeEnumerationLiteralsOfEnumeration() [2/2]

virtual void dcpp::io::IAttributes::getAttributeEnumerationLiteralsOfEnumeration ( dcpp::int32_kt  index,
dcpp::nub::array< dcpp::nub::string > &  outLiterals 
) const
pure virtual

Gets the list of enumeration literals of an enumeration attribute

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.
outLiteralsSet of strings to choose the enum name from.

◆ getAttributeName()

virtual const dcpp::char_kt * dcpp::io::IAttributes::getAttributeName ( dcpp::int32_kt  index) const
pure virtual

Returns attribute name by index.

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeType() [1/2]

virtual E_ATTRIBUTE_TYPE dcpp::io::IAttributes::getAttributeType ( const dcpp::char_kt attributeName) const
pure virtual

Returns the type of an attribute

Parameters
attributeNameName for the attribute

◆ getAttributeType() [2/2]

virtual E_ATTRIBUTE_TYPE dcpp::io::IAttributes::getAttributeType ( dcpp::int32_kt  index) const
pure virtual

Returns attribute type by index.

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.

◆ getAttributeTypeString() [1/2]

virtual const wchar_t * dcpp::io::IAttributes::getAttributeTypeString ( const dcpp::char_kt attributeName,
const wchar_t *  defaultNotFound = L"unknown" 
) const
pure virtual

Returns the type string of the attribute

Parameters
attributeNameString for the attribute type
defaultNotFoundValue returned when attributeName was not found

◆ getAttributeTypeString() [2/2]

virtual const wchar_t * dcpp::io::IAttributes::getAttributeTypeString ( dcpp::int32_kt  index,
const wchar_t *  defaultNotFound = L"unknown" 
) const
pure virtual

Returns the type string of the attribute by index.

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.
defaultNotFoundValue returned for an invalid index

◆ read()

virtual bool dcpp::io::IAttributes::read ( dcpp::io::IXMLReader reader,
bool  readCurrentElementOnly = false,
const wchar_t *  elementName = 0 
)
pure virtual

Reads attributes from a xml file.

Parameters
readerThe XML reader to read from
readCurrentElementOnlyIf set to true, reading only works if current element has the name 'attributes' or the name specified using elementName.
elementNameThe surrounding element name. If it is null, the default one, "attributes" will be taken. If set to false, the first appearing list of attributes are read.

◆ setAttribute() [1/5]

virtual void dcpp::io::IAttributes::setAttribute ( const dcpp::char_kt attributeName,
const dcpp::char_kt value 
)
pure virtual

Sets an attribute value as string.

Parameters
attributeNameName for the attribute
valueValue for the attribute. Set this to 0 to delete the attribute

◆ setAttribute() [2/5]

virtual void dcpp::io::IAttributes::setAttribute ( const dcpp::char_kt attributeName,
const dcpp::nub::array< dcpp::nub::wstring > &  value 
)
pure virtual

Sets an attribute value as a wide string array.

Parameters
attributeNameName for the attribute
valueValue for the attribute. Set this to 0 to delete the attribute

◆ setAttribute() [3/5]

virtual void dcpp::io::IAttributes::setAttribute ( const dcpp::char_kt attributeName,
const wchar_t *  value 
)
pure virtual

Sets an attribute value as string.

Parameters
attributeNameName for the attribute
valueValue for the attribute. Set this to 0 to delete the attribute

◆ setAttribute() [4/5]

virtual void dcpp::io::IAttributes::setAttribute ( dcpp::int32_kt  index,
const dcpp::char_kt value 
)
pure virtual

Sets an attribute value as string.

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.
valueString to which the attribute is set.

◆ setAttribute() [5/5]

virtual void dcpp::io::IAttributes::setAttribute ( dcpp::int32_kt  index,
const wchar_t *  value 
)
pure virtual

Sets an attribute value as string.

Parameters
indexIndex value, must be between 0 and getAttributeCount()-1.
valueString to which the attribute is set.

◆ write()

virtual bool dcpp::io::IAttributes::write ( dcpp::io::IXMLWriter writer,
bool  writeXMLHeader = false,
const wchar_t *  elementName = 0 
)
pure virtual

Write these attributes into a xml file

Parameters
writerThe XML writer to write to
writeXMLHeaderWrites a header to the XML file, required if at the beginning of the file
elementNameThe surrounding element name. If it is null, the default one, "attributes" will be taken.

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

Duckcpp    @cppfx.xyz