Holds a set of attributes.
More...
#include <Attributes.hpp>
|
| | Attributes () |
| | Constructor. More...
|
| |
| virtual | ~Attributes () |
| | Destructor. More...
|
| |
| template<typename KeyT , typename ValueT > |
| AttrMap< KeyT, ValueT > & | attrMap (const QString &name, bool saveRequired=true) |
| | Get the attribute, if it does not exist create it and add to the set If it exists, and if so load it from the byte array. More...
|
| |
| template<typename KeyT , typename ValueT > |
| const AttrMap< KeyT, ValueT > * | getAttrMap (const QString &name) const |
| | Try to get a constant pointer to an attribute. More...
|
| |
| bool | saveRequired (const QString &name) const |
| | Get a reference to the attribute's save status, it will be created if it doesn't exist. More...
|
| |
| bool | setSaveRequired (const QString &name, bool saveReq) |
| |
| void | erase (const QString &name) |
| | Erase an attribute. More...
|
| |
| void | clear () |
| | Clear the attributes. More...
|
| |
| bool | write (QIODevice &file) |
| | Write the attributes to a file. More...
|
| |
| bool | read (QIODevice &file, bool clearAttr=true) |
| | Read the attributes from a file. More...
|
| |
| bool | read (QIODevice &file, IntVtxMap *vMap, IntCellMap *cMap, bool clearAttr=true) |
| | Read the attributes from a file. More...
|
| |
| bool | saveVtxCellMaps (IntVtxMap *vMap, IntCellMap *cMap, bool clearAttr) |
| | Set the saveId-vertex map for loading vertex and Index attributes Since the readAttr and writeAttr are global functions, attributes with vertex, or cell keys will need these tables. More...
|
| |
| virtual size_t | size (QString _name) |
| |
| QStringList | getAttrList () const |
| | Return a list of attribute names. More...
|
| |
| QStringList | clearNotparsedAttrList () const |
| | Return a list of unparsed attribute names. More...
|
| |
Holds a set of attributes.
Attributes are a collection of maps (Attribute objects). FIXME: what are the constraints on attributes?
Definition at line 917 of file Attributes.hpp.
◆ Attributes()
| mgx::Attributes::Attributes |
( |
| ) |
|
|
inline |
Constructor.
- Parameters
-
| name | Name of the attribute |
Definition at line 1098 of file Attributes.hpp.
◆ ~Attributes()
| virtual mgx::Attributes::~Attributes |
( |
| ) |
|
|
inlinevirtual |
◆ attrMap()
template<typename KeyT , typename ValueT >
| AttrMap<KeyT, ValueT>& mgx::Attributes::attrMap |
( |
const QString & |
name, |
|
|
bool |
saveRequired = true |
|
) |
| |
|
inline |
Get the attribute, if it does not exist create it and add to the set If it exists, and if so load it from the byte array.
- Parameters
-
| name | Name of the attribute |
Definition at line 1116 of file Attributes.hpp.
◆ clear()
| void mgx::Attributes::clear |
( |
| ) |
|
|
inline |
Clear the attributes.
- Parameters
-
| name | Name of the attribute |
Definition at line 1191 of file Attributes.hpp.
◆ clearNotparsedAttrList()
| QStringList mgx::Attributes::clearNotparsedAttrList |
( |
| ) |
const |
|
inline |
Return a list of unparsed attribute names.
Definition at line 1418 of file Attributes.hpp.
◆ erase()
| void mgx::Attributes::erase |
( |
const QString & |
name | ) |
|
|
inline |
Erase an attribute.
- Parameters
-
| name | Name of the attribute |
Definition at line 1178 of file Attributes.hpp.
◆ getAttrList()
| QStringList mgx::Attributes::getAttrList |
( |
| ) |
const |
|
inline |
◆ getAttrMap()
template<typename KeyT , typename ValueT >
| const AttrMap<KeyT, ValueT>* mgx::Attributes::getAttrMap |
( |
const QString & |
name | ) |
const |
|
inline |
Try to get a constant pointer to an attribute.
Return null if nothing exists under name or if existing data has another type.
Definition at line 1151 of file Attributes.hpp.
◆ read() [1/2]
| bool mgx::Attributes::read |
( |
QIODevice & |
file, |
|
|
bool |
clearAttr = true |
|
) |
| |
|
inline |
Read the attributes from a file.
- Parameters
-
| file | The file to read |
| clearAttr | Clear the existing attributes first |
Definition at line 1287 of file Attributes.hpp.
◆ read() [2/2]
| bool mgx::Attributes::read |
( |
QIODevice & |
file, |
|
|
IntVtxMap * |
vMap, |
|
|
IntCellMap * |
cMap, |
|
|
bool |
clearAttr = true |
|
) |
| |
|
inline |
Read the attributes from a file.
- Parameters
-
| file | The file to read |
| vMap | Map saveIds to vertices |
| clear | Clear the existing attributes first |
Definition at line 1350 of file Attributes.hpp.
◆ saveRequired()
| bool mgx::Attributes::saveRequired |
( |
const QString & |
name | ) |
const |
|
inline |
Get a reference to the attribute's save status, it will be created if it doesn't exist.
- Parameters
-
| name | Name of the attribute |
Definition at line 1165 of file Attributes.hpp.
◆ saveVtxCellMaps()
Set the saveId-vertex map for loading vertex and Index attributes Since the readAttr and writeAttr are global functions, attributes with vertex, or cell keys will need these tables.
Definition at line 1364 of file Attributes.hpp.
◆ setSaveRequired()
| bool mgx::Attributes::setSaveRequired |
( |
const QString & |
name, |
|
|
bool |
saveReq |
|
) |
| |
|
inline |
◆ size()
| virtual size_t mgx::Attributes::size |
( |
QString |
_name | ) |
|
|
inlinevirtual |
◆ write()
| bool mgx::Attributes::write |
( |
QIODevice & |
file | ) |
|
|
inline |
Write the attributes to a file.
- Parameters
-
Definition at line 1223 of file Attributes.hpp.
The documentation for this class was generated from the following file: