OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
Attributes::BoolArray Class Reference

Parser for an attribute of type logical array. More...

#include <BoolArray.h>

Inheritance diagram for Attributes::BoolArray:
Inheritance graph
Collaboration diagram for Attributes::BoolArray:
Collaboration graph

Public Types

enum  OwnerType {
  ELEMENT , COMMAND , SUB_COMMAND , STATEMENT ,
  NONE
}
 

Public Member Functions

 BoolArray (const std::string &name, const std::string &help)
 Constructor.
 
virtual ~BoolArray ()
 
virtual const std::string & getType () const
 Return attribute type string `‘logical array’'.
 
virtual void parse (Attribute &, Statement &, bool) const
 Parse the attribute.
 
virtual void parseComponent (Attribute &, Statement &, bool, int) const
 Parse a component of the array.
 
virtual AttributeBasegetDefault () const
 Return default value.
 
virtual const std::string & getHelp () const
 Return help string.
 
virtual const std::string & getName () const
 Return attribute name.
 
bool isDeferred () const
 Return defer flag.
 
void setDeferred (bool)
 Set or reset defer flag.
 
bool isReadOnly () const
 Return read-only flag.
 
void setReadOnly (bool)
 Set or reset read-only flag.
 
void setPredefinedValues (const std::set< std::string > &, const std::string &)
 Add predefined strings values to the help.
 

Static Public Member Functions

static std::multimap< OwnerType, std::string > getOwner (const std::string &att)
 
static void addAttributeOwner (const std::string &owner, const OwnerType &type, const std::string &name)
 

Protected Attributes

const std::string itsName
 Attribute name.
 
const std::string itsHelp
 Help text.
 
std::shared_ptr< AttributeBaseitsDefault
 Default value.
 
bool is_deferred
 Defer flag.
 
bool is_readonly
 Read-only flag.
 

Private Member Functions

 BoolArray ()
 
 BoolArray (const BoolArray &)
 
void operator= (const BoolArray &)
 

Static Private Attributes

static std::multimap< std::string, std::pair< OwnerType, std::string > > attributeOwnerDictionary_s
 

Detailed Description

Parser for an attribute of type logical array.

Definition at line 31 of file BoolArray.h.

Member Enumeration Documentation

◆ OwnerType

Enumerator
ELEMENT 
COMMAND 
SUB_COMMAND 
STATEMENT 
NONE 

Definition at line 109 of file AttributeHandler.h.

Constructor & Destructor Documentation

◆ BoolArray() [1/3]

Attributes::BoolArray::BoolArray ( const std::string &  name,
const std::string &  help 
)

Constructor.

Definition at line 36 of file BoolArray.cpp.

◆ ~BoolArray()

Attributes::BoolArray::~BoolArray ( )
virtual

Definition at line 39 of file BoolArray.cpp.

◆ BoolArray() [2/3]

Attributes::BoolArray::BoolArray ( )
private

◆ BoolArray() [3/3]

Attributes::BoolArray::BoolArray ( const BoolArray )
private

Member Function Documentation

◆ addAttributeOwner()

void AttributeHandler::addAttributeOwner ( const std::string &  owner,
const OwnerType type,
const std::string &  name 
)
staticinherited

◆ getDefault()

AttributeBase * AttributeHandler::getDefault ( ) const
virtualinherited

Return default value.

Definition at line 40 of file AttributeHandler.cpp.

References AttributeHandler::itsDefault, and AttributeHandler::itsName.

◆ getHelp()

const std::string & AttributeHandler::getHelp ( ) const
virtualinherited

Return help string.

Definition at line 50 of file AttributeHandler.cpp.

References AttributeHandler::itsHelp.

Referenced by Attribute::getHelp().

◆ getName()

const std::string & AttributeHandler::getName ( ) const
virtualinherited

Return attribute name.

Definition at line 52 of file AttributeHandler.cpp.

References AttributeHandler::itsName.

◆ getOwner()

std::multimap< AttributeHandler::OwnerType, std::string > AttributeHandler::getOwner ( const std::string &  att)
staticinherited

Definition at line 84 of file AttributeHandler.cpp.

References AttributeHandler::attributeOwnerDictionary_s.

Referenced by OpalParser::getHint().

◆ getType()

const std::string & Attributes::BoolArray::getType ( ) const
virtual

Return attribute type string `‘logical array’'.

Implements AttributeHandler.

Definition at line 41 of file BoolArray.cpp.

◆ isDeferred()

bool AttributeHandler::isDeferred ( ) const
inherited

Return defer flag.

Definition at line 61 of file AttributeHandler.cpp.

References AttributeHandler::is_deferred.

Referenced by Attributes::Real::parse().

◆ isReadOnly()

bool AttributeHandler::isReadOnly ( ) const
inherited

Return read-only flag.

Definition at line 65 of file AttributeHandler.cpp.

References AttributeHandler::is_readonly.

◆ operator=()

void Attributes::BoolArray::operator= ( const BoolArray )
private

◆ parse()

void Attributes::BoolArray::parse ( Attribute attr,
Statement stat,
bool  eval 
) const
virtual

Parse the attribute.

Implements AttributeHandler.

Definition at line 46 of file BoolArray.cpp.

References AttributeHandler::is_deferred, Expressions::parseBoolArray(), and Attribute::set().

Here is the call graph for this function:

◆ parseComponent()

void Attributes::BoolArray::parseComponent ( Attribute attr,
Statement stat,
bool  eval,
int  index 
) const
virtual

Parse a component of the array.

Reimplemented from AttributeHandler.

Definition at line 60 of file BoolArray.cpp.

References Attribute::getBase(), Expressions::parseBool(), Attribute::set(), and Expressions::ADeferred< T >::setComponent().

Here is the call graph for this function:

◆ setDeferred()

void AttributeHandler::setDeferred ( bool  flag)
inherited

Set or reset defer flag.

Definition at line 63 of file AttributeHandler.cpp.

References AttributeHandler::is_deferred.

◆ setPredefinedValues()

void AttributeHandler::setPredefinedValues ( const std::set< std::string > &  predefinedValues,
const std::string &  defaultValue 
)
inherited

Add predefined strings values to the help.

Definition at line 69 of file AttributeHandler.cpp.

References AttributeHandler::itsHelp.

Referenced by Attributes::PredefinedString::PredefinedString().

◆ setReadOnly()

void AttributeHandler::setReadOnly ( bool  flag)
inherited

Set or reset read-only flag.

Definition at line 67 of file AttributeHandler.cpp.

References AttributeHandler::is_readonly.

Member Data Documentation

◆ attributeOwnerDictionary_s

std::multimap< std::string, std::pair< AttributeHandler::OwnerType, std::string > > AttributeHandler::attributeOwnerDictionary_s
staticprivateinherited

◆ is_deferred

bool AttributeHandler::is_deferred
protectedinherited

◆ is_readonly

bool AttributeHandler::is_readonly
protectedinherited

Read-only flag.

Definition at line 129 of file AttributeHandler.h.

Referenced by AttributeHandler::isReadOnly(), and AttributeHandler::setReadOnly().

◆ itsDefault

std::shared_ptr<AttributeBase> AttributeHandler::itsDefault
protectedinherited

Default value.

Definition at line 123 of file AttributeHandler.h.

Referenced by AttributeHandler::getDefault().

◆ itsHelp

const std::string AttributeHandler::itsHelp
protectedinherited

◆ itsName

const std::string AttributeHandler::itsName
protectedinherited

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