SHAPER  9.12.0
ModelAPI_FeatureStateMessage Class Reference

Contains the state information about the feature: is it enabled or disabled. More...

Inheritance diagram for ModelAPI_FeatureStateMessage:
Inheritance graph

Public Member Functions

MODELAPI_EXPORT ModelAPI_FeatureStateMessage (const Events_ID theID, const void *theSender=0)
 Creates an empty message. More...
 
virtual MODELAPI_EXPORT ~ModelAPI_FeatureStateMessage ()
 The virtual destructor. More...
 
MODELAPI_EXPORT std::shared_ptr< ModelAPI_Featurefeature () const
 Returns the feature this message is related to. More...
 
MODELAPI_EXPORT void setFeature (std::shared_ptr< ModelAPI_Feature > &theFeature)
 Stores the feature this message is related to. More...
 
MODELAPI_EXPORT bool hasState (const std::string &theFeatureId) const
 Returns true if feature has specific state. More...
 
MODELAPI_EXPORT bool state (const std::string &theFeatureId, bool theDefault=false) const
 Returns true if feature is enabled. More...
 
MODELAPI_EXPORT void setState (const std::string &theFeatureId, bool theValue)
 Stores the feature state. More...
 
MODELAPI_EXPORT std::list< std::string > features () const
 Returns all feature IDs with states. More...
 
const Events_IDeventID () const
 Returns identifier of the message. More...
 
void * sender () const
 Returns sender of the message or NULL if it is anonymous message. More...
 

Detailed Description

Contains the state information about the feature: is it enabled or disabled.

Constructor & Destructor Documentation

◆ ModelAPI_FeatureStateMessage()

ModelAPI_FeatureStateMessage::ModelAPI_FeatureStateMessage ( const Events_ID  theID,
const void *  theSender = 0 
)

Creates an empty message.

◆ ~ModelAPI_FeatureStateMessage()

ModelAPI_FeatureStateMessage::~ModelAPI_FeatureStateMessage ( )
virtual

The virtual destructor.

Member Function Documentation

◆ feature()

std::shared_ptr< ModelAPI_Feature > ModelAPI_FeatureStateMessage::feature ( ) const

Returns the feature this message is related to.

◆ setFeature()

void ModelAPI_FeatureStateMessage::setFeature ( std::shared_ptr< ModelAPI_Feature > &  theFeature)

Stores the feature this message is related to.

◆ hasState()

bool ModelAPI_FeatureStateMessage::hasState ( const std::string &  theFeatureId) const

Returns true if feature has specific state.

◆ state()

bool ModelAPI_FeatureStateMessage::state ( const std::string &  theFeatureId,
bool  theDefault = false 
) const

Returns true if feature is enabled.

◆ setState()

void ModelAPI_FeatureStateMessage::setState ( const std::string &  theFeatureId,
bool  theValue 
)

Stores the feature state.

◆ features()

std::list< std::string > ModelAPI_FeatureStateMessage::features ( ) const

Returns all feature IDs with states.

◆ eventID()

const Events_ID& Events_Message::eventID ( ) const
inlineinherited

Returns identifier of the message.

◆ sender()

void* Events_Message::sender ( ) const
inlineinherited

Returns sender of the message or NULL if it is anonymous message.