ocra-recipes
Doxygen documentation for the ocra-recipes repository
Public Member Functions | Protected Member Functions | List of all members
ocra::AbilitySet Class Reference

#include <AbilitySet.h>

Inheritance diagram for ocra::AbilitySet:
[legend]

Public Member Functions

AbilitySetadd (eFunctionAbility prop)
 
AbilitySetremove (eFunctionAbility prop)
 

Protected Member Functions

 AbilitySet (const std::vector< bool > &usageSet)
 
const std::vector< bool > & getUsageSet () const
 
 AbilitySet (eFunctionAbility prop0=FUN_VALUE, eFunctionAbility prop1=FUN_VALUE)
 
 AbilitySet (eFunctionAbility prop0, eFunctionAbility prop1, eFunctionAbility prop2, eFunctionAbility prop3=FUN_VALUE, eFunctionAbility prop4=FUN_VALUE)
 
 AbilitySet (eFunctionAbility prop0, eFunctionAbility prop1, eFunctionAbility prop2, eFunctionAbility prop3, eFunctionAbility prop4, eFunctionAbility prop5, eFunctionAbility prop6=FUN_VALUE, eFunctionAbility prop7=FUN_VALUE, eFunctionAbility prop8=FUN_VALUE, eFunctionAbility prop9=FUN_VALUE)
 

Friends

AbilitySet operator& (const AbilitySet a1, const AbilitySet a2)
 
AbilitySet operator| (const AbilitySet a1, const AbilitySet a2)
 

Detailed Description

This class simply encapsulates a vector of boolean, one for each element of eFunctionAbility (except PROP_NUMBER). The ith element of this vector is true when the corresponding ability has to be used.

This class is only meant to be a helper class to enumerate the abilities of a function at construction time.

Definition at line 19 of file AbilitySet.h.

Constructor & Destructor Documentation

ocra::AbilitySet::AbilitySet ( const std::vector< bool > &  usageSet)
inlineprotected

Constructor with a given vector a bool, which needs to be of size PROP_NUMBER

Definition at line 23 of file AbilitySet.h.

ocra::AbilitySet::AbilitySet ( eFunctionAbility  prop0 = FUN_VALUE,
eFunctionAbility  prop1 = FUN_VALUE 
)
inlineprotected

A set of constructors to take 1 to 10 eFunctionAbility elements. Giving one element indicates the corresponding ability is to be used. For example, AbilitySet(FUN_VALUE, PARTIAL_X, PARTIAL_T, FUN_DOT) build an AbilitySet with the booleans for the abilities FUN_VALUE, PARTIAL_X, PARTIAL_T and FUN_DOT set to true, and the others to false.

Definition at line 37 of file AbilitySet.h.

ocra::AbilitySet::AbilitySet ( eFunctionAbility  prop0,
eFunctionAbility  prop1,
eFunctionAbility  prop2,
eFunctionAbility  prop3 = FUN_VALUE,
eFunctionAbility  prop4 = FUN_VALUE 
)
inlineprotected

Definition at line 49 of file AbilitySet.h.

ocra::AbilitySet::AbilitySet ( eFunctionAbility  prop0,
eFunctionAbility  prop1,
eFunctionAbility  prop2,
eFunctionAbility  prop3,
eFunctionAbility  prop4,
eFunctionAbility  prop5,
eFunctionAbility  prop6 = FUN_VALUE,
eFunctionAbility  prop7 = FUN_VALUE,
eFunctionAbility  prop8 = FUN_VALUE,
eFunctionAbility  prop9 = FUN_VALUE 
)
inlineprotected

Definition at line 65 of file AbilitySet.h.

Member Function Documentation

AbilitySet& ocra::AbilitySet::add ( eFunctionAbility  prop)
inline

Add an Ability to the set.

Definition at line 96 of file AbilitySet.h.

const std::vector<bool>& ocra::AbilitySet::getUsageSet ( ) const
inlineprotected

Get the vector.

Definition at line 89 of file AbilitySet.h.

AbilitySet& ocra::AbilitySet::remove ( eFunctionAbility  prop)
inline

Remove the ability from the set.

Definition at line 103 of file AbilitySet.h.

Friends And Related Function Documentation

AbilitySet operator& ( const AbilitySet  a1,
const AbilitySet  a2 
)
friend

Element by element and and of two AbilitySet

Definition at line 119 of file AbilitySet.h.

AbilitySet operator| ( const AbilitySet  a1,
const AbilitySet  a2 
)
friend

Definition at line 130 of file AbilitySet.h.


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