Om  1.0.0
A universal framework for multimedia simulation
Public Types | Public Member Functions | List of all members
om::resources::PrototypeFlags Class Reference

A class that encapsulates the different boolean flags that Prototype can have. More...

#include <omResourcePrototypeFlags.h>

Public Types

enum  Flag { UNDEFINED = 0, ENABLED = (1 << 0), SHARED = (1 << 1), DEFAULT = UNDEFINED }
 An enum that specifies the different prototype flags. More...
 

Public Member Functions

 PrototypeFlags ()
 Create a new prototype flags object with no flags set. More...
 
 PrototypeFlags (Flag flag)
 Create a new prototype flags object with the specified flag value initially set. More...
 
 PrototypeFlags (UInt32 newFlags)
 Create a new prototype flags object with the specified initial combined flags value. More...
 
 operator UInt32 () const
 Convert this prototype flags object to an integer value. More...
 
Bool isSet (Flag flag) const
 Return whether or not the specified flag value is set for this flags object. More...
 
void set (Flag flag, Bool newIsSet)
 Set whether or not the specified flag value is set for this flags object. More...
 

Detailed Description

A class that encapsulates the different boolean flags that Prototype can have.

These flags provide boolean parameters for resource prototypes. Flags are indicated by setting a single bit of a 32-bit unsigned integer to 1.

Enum values for the different flags are defined as members of the class. Typically, the user would bitwise-OR the flag enum values together to produce a final set of set flags.

Member Enumeration Documentation

An enum that specifies the different prototype flags.

Enumerator
UNDEFINED 

The flag value when all flags are not set.

ENABLED 

A flag indicating the prototype component is enabled.

SHARED 

A flag indicating that the prototype component should be shared globally.

If the flag is not set, the prototype component is copied when the prototype is instanced.

DEFAULT 

The default flags to use for a prototype.

Constructor & Destructor Documentation

om::resources::PrototypeFlags::PrototypeFlags ( )
inline

Create a new prototype flags object with no flags set.

om::resources::PrototypeFlags::PrototypeFlags ( Flag  flag)
inline

Create a new prototype flags object with the specified flag value initially set.

om::resources::PrototypeFlags::PrototypeFlags ( UInt32  newFlags)
inline

Create a new prototype flags object with the specified initial combined flags value.

Member Function Documentation

om::resources::PrototypeFlags::operator UInt32 ( ) const
inline

Convert this prototype flags object to an integer value.

This operator is provided so that the CollisionFlags shape can be used as an integer value for bitwise logical operations.

Bool om::resources::PrototypeFlags::isSet ( Flag  flag) const
inline

Return whether or not the specified flag value is set for this flags object.

void om::resources::PrototypeFlags::set ( Flag  flag,
Bool  newIsSet 
)
inline

Set whether or not the specified flag value is set for this flags object.


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