C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
Flags<Enum> is a template class where Enum is an enumarated type. Flags is used to store enumeration value combinations in C3D Vision. More...
#include <vsn_flags.h>
Public Types | |
typedef Enum | enum_type |
Typedef for Enum template type. Copy constructor of Flags object. | |
Public Member Functions | |
Flags (Enum f) | |
Flags object constructor with flag parameter for storing data. | |
Flags (Zero=0) | |
Flags object constructor with no defined flags. | |
Flags (Flag f) | |
Flags object constructor initialized by integer value. | |
Flags (int f) | |
Flags object constructor initialized by integer value. | |
Flags & | operator= (const Flags &f) |
Copies all flags to object and returns reference to that object. | |
Flags & | operator&= (int mask) |
Performs bitwise AND-operation with mask and saves result in Flags object. Returns reference to the object. | |
Flags & | operator&= (uint mask) |
Оverloaded function. | |
Flags & | operator|= (Flags f) |
Performs bitwise OR-operation with another object and saves result in Flags object. Returns reference to the object. | |
Flags & | operator|= (Enum f) |
Оverloaded function. | |
Flags & | operator|= (int f) |
Оverloaded function. | |
Flags & | operator^= (Flags f) |
Performs bitwise XOR-operation with another Flags object and saves result in Flags object. Returns reference to the object. | |
Flags & | operator^= (Enum f) |
Оverloaded function. | |
operator int () const | |
Returns integer value saved in Flags object. | |
Flags | operator| (Flags f) const |
Returns Flags object containing result of bitwise OR-operation on the object. | |
Flags | operator| (Enum f) const |
Оverloaded function. | |
Flags | operator^ (Flags f) const |
Returns Flags object containing result of bitwise XOR-operation on the object. | |
Flags | operator^ (Enum f) const |
Оverloaded function. | |
Flags | operator& (int mask) const |
Returns Flags object containing result of AND-operation performed. | |
Flags | operator& (uint mask) const |
Оverloaded function. | |
Flags | operator& (Enum f) const |
Оverloaded function. | |
Flags | operator~ () const |
Returns Flags object containing bitwise complement of the object. | |
bool | operator! () const |
True if flag is set, i.e. if value stored in Flags object is 0, otherwise, False. | |
bool | CheckFlag (Enum f) const |
True if flag is set. | |
Flags<Enum> is a template class where Enum is an enumarated type. Flags is used to store enumeration value combinations in C3D Vision.
С++ conventional approach for storing Enum value OR-combinations defines using int or uint variables. The inconvenience of that approach is an absence of type checking. Any value of enumeration can be OR-operation with another value of enumeration and it can be passed in function taking int or uint variables.