LuciadCPillar 2023.1.04
luciad::FeatureState Class Referencefinal

Representation of the state of a feature. More...

#include <luciad/layers/features/FeatureState.h>

Public Member Functions

const std::string & getName () const
 Returns the name of this FeatureState. More...
 
bool operator!= (const FeatureState &rhs) const
 
bool operator== (const FeatureState &rhs) const
 

Static Public Member Functions

static const FeatureStategetValue (const std::string &name)
 Returns the FeatureState with the given name. More...
 
static const std::vector< FeatureState > & getValues ()
 Lists all registered feature states, including the selection states that are available by default. More...
 
static const FeatureStatehover ()
 A feature state representing an object that is under the cursor. More...
 
static const FeatureStateregisterValue (std::string name)
 Registers a new FeatureState with the given name. More...
 
static const FeatureStateselected ()
 A feature state representing an object that is selected. More...
 

Detailed Description

Representation of the state of a feature.

By default the following states exist:

It is possible to register custom feature states using FeatureState::registerValue. You can use such custom feature states to style objects differently.

Member Function Documentation

◆ getName()

const std::string & luciad::FeatureState::getName ( ) const

Returns the name of this FeatureState.

Returns
the name of this FeatureState.

◆ getValue()

static const FeatureState & luciad::FeatureState::getValue ( const std::string &  name)
static

Returns the FeatureState with the given name.

If no such FeatureState exists, an exception will be thrown.

Parameters
namethe name of the FeatureState.
Returns
the FeatureState with the given name.
Exceptions
InvalidArgumentExceptionif there is no feature state for the given name.

◆ getValues()

static const std::vector< FeatureState > & luciad::FeatureState::getValues ( )
static

Lists all registered feature states, including the selection states that are available by default.

Returns
all registered feature states

◆ hover()

static const FeatureState & luciad::FeatureState::hover ( )
static

A feature state representing an object that is under the cursor.

◆ operator!=()

bool luciad::FeatureState::operator!= ( const FeatureState rhs) const

◆ operator==()

bool luciad::FeatureState::operator== ( const FeatureState rhs) const

◆ registerValue()

static const FeatureState & luciad::FeatureState::registerValue ( std::string  name)
static

Registers a new FeatureState with the given name.

It is not allows the register multiple FeatureStates with the same name. If not, an exception will be thrown.

Parameters
namethe name for the feature state. Must be unique.
Exceptions
InvalidArgumentExceptionif the value already exists.

◆ selected()

static const FeatureState & luciad::FeatureState::selected ( )
static

A feature state representing an object that is selected.