Commit c3eafb16 authored by Jan Möbius's avatar Jan Möbius

Function to get number of registered types

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7673 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 4d08bdc4
......@@ -192,6 +192,11 @@ QString typeName(DataType _id) {
}
}
/// Return the number of registered types
uint typeCount() {
return types.size();
}
/// Get the icon of a given dataType
QString typeIcon(QString _name) {
initialize();
......
......@@ -132,10 +132,24 @@ DataType addDataType(QString _name, QString _readableName);
DLLEXPORT
DataType typeId(QString _name);
/// Get the name of a type with given id
/** \brief Get the name of a type with given id
*
* The ids are organized in a bitfield. So use either the macro for getting the type id or
* use the id directly (they have to be power of 2! ... Bitfield)
*/
DLLEXPORT
QString typeName(DataType _id);
/** \brief Get the number of registered types
*
* This function will return the number of types registered to the core. You can use it to
* iterate over all types.
*
* \Note Remember that the types are organized in a bitfield!
*/
DLLEXPORT
uint typeCount();
/** @} */
//================================================================================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment