Developer Documentation
DataType Class Reference

Predefined datatypes. More...

#include <OpenFlipper/common/DataTypes.hh>

Public Member Functions

 DataType (const unsigned int &_i)
 
 DataType (const DataType &_i)=default
 
bool operator!= (const unsigned int &_i) const
 
bool operator!= (const DataType &_i) const
 
bool operator== (const unsigned int &_i) const
 
bool operator== (const DataType &_i) const
 
DataTypeoperator= (const unsigned int &_i)
 
DataTypeoperator= (const DataType &_i)=default
 
bool operator< (const unsigned int &_i) const
 
bool operator< (const DataType &_i) const
 
DataTypeoperator|= (const unsigned int &_i)
 
DataTypeoperator|= (const DataType &_i)
 
bool operator& (const unsigned int &_i) const
 
bool operator& (const DataType &_i) const
 
DataType operator! ()
 
bool contains (const DataType &_i) const
 
DataType operator| (const DataType &_i) const
 
DataType operator++ (int _unused)
 
DataTypeoperator++ ()
 
unsigned int value () const
 
QString name () const
 Return the name of this type as text. More...
 

Private Attributes

unsigned int field
 

Detailed Description

Predefined datatypes.

Here are several datatypes which have predefined ids. This might be changed to runtime added datatypes in the future.

the internal DataType class

Normally we could use an unsigned int here. But QT can't register an typedef unsigned int DataType as DataType and will recognize it as unsigned int and therefore DataType will still be unknown to QtScript. To overcome this Problem, we reimplement a wrapper around the int and provide additional functionality such as returning the name of the type directly

Definition at line 83 of file DataTypes.hh.

Constructor & Destructor Documentation

◆ DataType() [1/2]

DataType::DataType ( )

Definition at line 302 of file Types.cc.

◆ DataType() [2/2]

DataType::DataType ( const unsigned int &  _i)

Definition at line 307 of file Types.cc.

Member Function Documentation

◆ contains()

bool DataType::contains ( const DataType _i) const

Definition at line 369 of file Types.cc.

◆ name()

QString DataType::name ( ) const

Return the name of this type as text.

Definition at line 411 of file Types.cc.

◆ operator!()

DataType DataType::operator! ( )

Definition at line 361 of file Types.cc.

◆ operator!=() [1/2]

bool DataType::operator!= ( const DataType _i) const

Definition at line 318 of file Types.cc.

◆ operator!=() [2/2]

bool DataType::operator!= ( const unsigned int &  _i) const

Definition at line 314 of file Types.cc.

◆ operator&() [1/2]

bool DataType::operator& ( const DataType _i) const

Definition at line 355 of file Types.cc.

◆ operator&() [2/2]

bool DataType::operator& ( const unsigned int &  _i) const

Definition at line 351 of file Types.cc.

◆ operator++() [1/2]

DataType & DataType::operator++ ( )

Definition at line 400 of file Types.cc.

◆ operator++() [2/2]

DataType DataType::operator++ ( int  _unused)

Definition at line 394 of file Types.cc.

◆ operator<() [1/2]

bool DataType::operator< ( const DataType _i) const

Definition at line 345 of file Types.cc.

◆ operator<() [2/2]

bool DataType::operator< ( const unsigned int &  _i) const

Definition at line 341 of file Types.cc.

◆ operator=()

DataType & DataType::operator= ( const unsigned int &  _i)

Definition at line 334 of file Types.cc.

◆ operator==() [1/2]

bool DataType::operator== ( const DataType _i) const

Definition at line 328 of file Types.cc.

◆ operator==() [2/2]

bool DataType::operator== ( const unsigned int &  _i) const

Definition at line 324 of file Types.cc.

◆ operator|()

DataType DataType::operator| ( const DataType _i) const

Definition at line 388 of file Types.cc.

◆ operator|=() [1/2]

DataType & DataType::operator|= ( const DataType _i)

Definition at line 381 of file Types.cc.

◆ operator|=() [2/2]

DataType & DataType::operator|= ( const unsigned int &  _i)

Definition at line 376 of file Types.cc.

◆ value()

unsigned int DataType::value ( ) const

return the internal representation of the type which is an unsigned int at the moment.

You should avoid using this directly as the internal representation might change in the future

Definition at line 407 of file Types.cc.

Member Data Documentation

◆ field

unsigned int DataType::field
private

Definition at line 128 of file DataTypes.hh.


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