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

A collection of routines to construct object Attributes and retrieve. More...

Classes

class  Bool
 Parser for attribute of type logical. More...
 
class  BoolArray
 Parser for an attribute of type logical array. More...
 
class  Place
 Parser for an attribute of type place reference. More...
 
class  PredefinedString
 Parser for an attribute of type string. More...
 
class  Range
 Parser for an attribute of type range definition. More...
 
class  Real
 Parser for an attribute of type real. More...
 
class  RealArray
 Parser for an attribute of type real array. More...
 
class  Reference
 Parser for an attribute of type attribute reference. More...
 
class  String
 Parser for an attribute of type string. More...
 
class  StringArray
 Parser for an attribute of type string array. More...
 
class  TableRow
 Parser for an attribute of type table row reference. More...
 
class  TokenList
 Parser for an attribute of type token list. More...
 
class  TokenListArray
 Parser for an attribute of type token list array. More...
 
class  UpperCaseString
 Parser for an attribute of type string. More...
 
class  UpperCaseStringArray
 Parser for an attribute of type string array. More...
 

Functions

Attribute makeBool (const std::string &name, const std::string &help)
 Make logical attribute.
 
Attribute makeBool (const std::string &name, const std::string &help, bool initial)
 Make logical attribute.
 
bool getBool (const Attribute &)
 Return logical value.
 
void setBool (Attribute &, bool)
 Set logical value.
 
Attribute makeBoolArray (const std::string &name, const std::string &help)
 Create a logical array attribute.
 
std::vector< bool > getBoolArray (const Attribute &)
 Get logical array value.
 
void setBoolArray (Attribute &, const std::vector< bool > &)
 Set logical array value.
 
Attribute makePlace (const std::string &name, const std::string &help)
 Create a place attribute.
 
PlaceRep getPlace (const Attribute &)
 Get place value.
 
void setPlace (Attribute &, const PlaceRep &)
 Set place value.
 
Attribute makeRange (const std::string &name, const std::string &help)
 Create a range attribute.
 
RangeRep getRange (const Attribute &)
 Get range value.
 
void setRange (Attribute &, const RangeRep &)
 Set range value.
 
Attribute makeReal (const std::string &name, const std::string &help)
 Make real attribute.
 
Attribute makeReal (const std::string &name, const std::string &help, double initial)
 Make real attribute.
 
double getReal (const Attribute &attr)
 Return real value.
 
void setReal (Attribute &attr, double val)
 Set real value.
 
Attribute makeRealArray (const std::string &name, const std::string &help)
 Create real array attribute.
 
std::vector< double > getRealArray (const Attribute &)
 Get array value.
 
void setRealArray (Attribute &, const std::vector< double > &)
 Set array value.
 
Attribute makeReference (const std::string &name, const std::string &help)
 Create a reference attribute.
 
Attribute makeString (const std::string &name, const std::string &help)
 Make string attribute.
 
Attribute makeString (const std::string &name, const std::string &help, const std::string &initial)
 Make string attribute.
 
std::string getString (const Attribute &attr)
 Get string value.
 
void setString (Attribute &attr, const std::string &val)
 Set string value.
 
Attribute makePredefinedString (const std::string &name, const std::string &help, const std::initializer_list< std::string > &predefinedStrings)
 Make predefined string attribute.
 
Attribute makePredefinedString (const std::string &name, const std::string &help, const std::initializer_list< std::string > &predefinedStrings, const std::string &initial)
 Make predefined string attribute.
 
void setPredefinedString (Attribute &attr, const std::string &val)
 Set predefined string value.
 
Attribute makeUpperCaseString (const std::string &name, const std::string &help)
 Make uppercase string attribute.
 
Attribute makeUpperCaseString (const std::string &name, const std::string &help, const std::string &initial)
 Make uppercase string attribute.
 
void setUpperCaseString (Attribute &attr, const std::string &val)
 Set uppercase string value.
 
Attribute makeStringArray (const std::string &name, const std::string &help)
 Create a string array attribute.
 
std::vector< std::string > getStringArray (const Attribute &)
 Get string array value.
 
void setStringArray (Attribute &, const std::vector< std::string > &)
 Set string array value.
 
Attribute makeUpperCaseStringArray (const std::string &name, const std::string &help)
 Make uppercase string array attribute.
 
void setUpperCaseStringArray (Attribute &, const std::vector< std::string > &)
 Set upper case string array value.
 
Attribute makeTableRow (const std::string &name, const std::string &help)
 Create a table row attribute.
 
TableRowRep getTableRow (const Attribute &)
 Get table row value.
 
void setTableRow (Attribute &, const TableRowRep &)
 Set table row value.
 
Attribute makeTokenList (const std::string &name, const std::string &help)
 Make token list attribute.
 
std::list< TokengetTokenList (const Attribute &attr)
 Return token list value.
 
void setTokenList (Attribute &attr, const std::list< Token > &)
 Set token list value.
 
Attribute makeTokenListArray (const std::string &name, const std::string &help)
 Make token list attribute.
 
std::vector< std::list< Token > > getTokenListArray (const Attribute &attr)
 Return token list array value.
 
void setTokenListArray (Attribute &attr, const std::vector< std::list< Token > > &)
 Set token list array value.
 

Detailed Description

A collection of routines to construct object Attributes and retrieve.

Function Documentation

◆ getBool()

◆ getBoolArray()

std::vector< bool > Attributes::getBoolArray ( const Attribute attr)

Get logical array value.

Definition at line 140 of file Attributes.cpp.

References Attribute::getBase(), Attribute::getName(), and Attribute::isBaseAllocated().

Here is the call graph for this function:

◆ getPlace()

PlaceRep Attributes::getPlace ( const Attribute attr)

Get place value.

Definition at line 174 of file Attributes.cpp.

References Attribute::getBase(), Attribute::getName(), and Attribute::isBaseAllocated().

Here is the call graph for this function:

◆ getRange()

RangeRep Attributes::getRange ( const Attribute attr)

Get range value.

Definition at line 205 of file Attributes.cpp.

References Attribute::getBase(), Attribute::getName(), and Attribute::isBaseAllocated().

Referenced by Select::select().

Here is the call graph for this function:

◆ getReal()

double Attributes::getReal ( const Attribute attr)

Return real value.

Definition at line 240 of file Attributes.cpp.

References Expressions::SRefAttr< T >::evaluate(), Attribute::getBase(), Attribute::getHandler(), Attribute::getName(), and Attribute::isBaseAllocated().

Referenced by DumpEMFields::buildGrid(), Option::execute(), Beam::execute(), TrackCmd::execute(), SequenceParser::findNeighbourPositions(), BoundaryGeometry::getA(), BoundaryGeometry::getB(), BinningCmd::getBinningAlpha(), BinningCmd::getBinningBeta(), FieldSolverCmd::getBoxIncr(), Beam::getBunchCharge(), BoundaryGeometry::getC(), Beam::getCharge(), Beam::getCurrent(), BinningCmd::getDesiredWidth(), TrackCmd::getDTAU(), TrackCmd::getDTSCINIT(), BinningCmd::getDumpBinsFrequency(), Distribution::getEmissionSteps(), Beam::getFrequency(), BoundaryGeometry::getL1(), BoundaryGeometry::getL2(), BoundaryGeometry::getLength(), OpalElement::getLength(), Line::getLength(), Sequence::getLength(), Beam::getMass(), BinningCmd::getMaxBins(), Beam::getNumAlloc(), FieldSolverCmd::getNX(), FieldSolverCmd::getNY(), FieldSolverCmd::getNZ(), EmissionSource::getP0(), EmissionSource::getR0(), RealConstant::getReal(), RealVariable::getReal(), BoundaryGeometry::getS(), TrackCmd::getStepsPerTurn(), EmissionSource::getT0(), TrackCmd::getT0(), BinningCmd::getTablePrintFrequency(), EmissionSource::getZerofaceMaxSteps(), EmissionSource::getZeroFacePlaneDumpFrequency(), TrackCmd::getZStart(), BoundaryGeometry::initialize(), OpalFilter::initOpalFilter(), Line::parse(), Beam::print(), OpalFilter::print(), DumpEMFields::print(), BoundaryGeometry::printInfo(), FieldSolverCmd::printInfo(), OpalElement::printMultipoleStrength(), Distribution::setAttributes(), Distribution::setDistParametersFlatTop(), Distribution::setSigmaP_m(), Distribution::setSigmaR_m(), OpalCavity::update(), OpalConstantEFieldCavity::update(), OpalDrift::update(), OpalElement::update(), OpalMonitor::update(), OpalProbe::update(), OpalQuadrupole::update(), OpalRBend::update(), OpalRingDefinition::update(), OpalSBend::update(), OpalSolenoid::update(), OpalTravelingWave::update(), OpalVacuum::update(), OpalVerticalFFAMagnet::update(), Beam::update(), BinningCmd::update(), OpalLaser::update(), OpalMultipoleT::update(), OpalPolynomialTimeDependence::update(), OpalSplineTimeDependence::update(), OpalVariableRFCavity::update(), and OpalElement::updateUnknown().

Here is the call graph for this function:

◆ getRealArray()

◆ getString()

std::string Attributes::getString ( const Attribute attr)

Get string value.

Definition at line 328 of file Attributes.cpp.

References Expressions::SRefAttr< T >::evaluate(), Attribute::getBase(), Attribute::getHandler(), OpalData::getInstance(), Attribute::getName(), Attribute::isBaseAllocated(), and Util::toUpper().

Referenced by BoundaryGeometry::BoundaryGeometry(), BoundaryGeometry::BoundaryGeometry(), DumpEMFields::buildGrid(), FieldSolverCmd::constructBCHandler(), BinningCmd::dumpBinsToFile(), Call::execute(), Echo::execute(), Help::execute(), Option::execute(), PSystem::execute(), Select::execute(), System::execute(), Title::execute(), TrackCmd::execute(), TrackRun::execute(), SequenceParser::findNeighbourPositions(), OpalElement::getApert(), FieldSolverCmd::getBinsName(), Beam::getDaughterBeamName(), EmissionSource::getDistributionName(), BinningCmd::getDumpBinsFileName(), EmissionSource::getEmissionModel(), Beam::getEmissionSourceListName(), Distribution::getFilename(), BoundaryGeometry::getFilename(), BinningCmd::getParameter(), OpalElement::getParticleMatterInteraction(), Beam::getParticleName(), Sequence::getReference(), StringConstant::getString(), TrackCmd::getTimeIntegrator(), BoundaryGeometry::getTopology(), FieldSolverCmd::getType(), OpalElement::getTypeName(), OpalElement::getWakeF(), OpalFilter::initOpalFilter(), Sequence::parse(), DumpEMFields::parseCoordinateSystem(), Beam::print(), OpalFilter::print(), DumpEMFields::print(), BoundaryGeometry::printInfo(), FieldSolverCmd::printInfo(), Select::select(), Distribution::setDistType(), TrackRun::setRunMethod(), TrackRun::setupBoundaryGeometry(), TEST(), OpalCavity::update(), OpalMonitor::update(), OpalProbe::update(), OpalRBend::update(), OpalSBend::update(), OpalSolenoid::update(), OpalTravelingWave::update(), OpalVacuum::update(), BinningCmd::update(), OpalMultipoleT::update(), and OpalVariableRFCavity::update().

Here is the call graph for this function:

◆ getStringArray()

std::vector< std::string > Attributes::getStringArray ( const Attribute attr)

◆ getTableRow()

TableRowRep Attributes::getTableRow ( const Attribute attr)

Get table row value.

Definition at line 555 of file Attributes.cpp.

References Attribute::getBase(), Attribute::getName(), and Attribute::isBaseAllocated().

Here is the call graph for this function:

◆ getTokenList()

std::list< Token > Attributes::getTokenList ( const Attribute attr)

Return token list value.

Definition at line 586 of file Attributes.cpp.

References Attribute::getBase(), Attribute::getHandler(), Attribute::getName(), and Attribute::isBaseAllocated().

Here is the call graph for this function:

◆ getTokenListArray()

std::vector< std::list< Token > > Attributes::getTokenListArray ( const Attribute attr)

Return token list array value.

Definition at line 618 of file Attributes.cpp.

References Attribute::getBase(), Attribute::getHandler(), Attribute::getName(), and Attribute::isBaseAllocated().

Here is the call graph for this function:

◆ makeBool() [1/2]

◆ makeBool() [2/2]

Attribute Attributes::makeBool ( const std::string &  name,
const std::string &  help,
bool  ini 
)

Make logical attribute.

Definition at line 95 of file Attributes.cpp.

◆ makeBoolArray()

Attribute Attributes::makeBoolArray ( const std::string &  name,
const std::string &  help 
)

Create a logical array attribute.

Definition at line 136 of file Attributes.cpp.

◆ makePlace()

Attribute Attributes::makePlace ( const std::string &  name,
const std::string &  help 
)

Create a place attribute.

Definition at line 170 of file Attributes.cpp.

◆ makePredefinedString() [1/2]

Attribute Attributes::makePredefinedString ( const std::string &  name,
const std::string &  help,
const std::initializer_list< std::string > &  predefinedStrings 
)

◆ makePredefinedString() [2/2]

Attribute Attributes::makePredefinedString ( const std::string &  name,
const std::string &  help,
const std::initializer_list< std::string > &  predefinedStrings,
const std::string &  initial 
)

Make predefined string attribute.

Definition at line 404 of file Attributes.cpp.

References Util::toUpper().

Here is the call graph for this function:

◆ makeRange()

Attribute Attributes::makeRange ( const std::string &  name,
const std::string &  help 
)

Create a range attribute.

Definition at line 201 of file Attributes.cpp.

Referenced by Select::Select().

◆ makeReal() [1/2]

◆ makeReal() [2/2]

Attribute Attributes::makeReal ( const std::string &  name,
const std::string &  help,
double  initial 
)

Make real attribute.

Definition at line 236 of file Attributes.cpp.

◆ makeRealArray()

◆ makeReference()

Attribute Attributes::makeReference ( const std::string &  name,
const std::string &  help 
)

Create a reference attribute.

Definition at line 312 of file Attributes.cpp.

◆ makeString() [1/2]

◆ makeString() [2/2]

Attribute Attributes::makeString ( const std::string &  name,
const std::string &  help,
const std::string &  initial 
)

Make string attribute.

Definition at line 323 of file Attributes.cpp.

◆ makeStringArray()

Attribute Attributes::makeStringArray ( const std::string &  name,
const std::string &  help 
)

Create a string array attribute.

Definition at line 461 of file Attributes.cpp.

Referenced by TrackCmd::TrackCmd().

◆ makeTableRow()

Attribute Attributes::makeTableRow ( const std::string &  name,
const std::string &  help 
)

Create a table row attribute.

Definition at line 551 of file Attributes.cpp.

◆ makeTokenList()

Attribute Attributes::makeTokenList ( const std::string &  name,
const std::string &  help 
)

Make token list attribute.

Definition at line 582 of file Attributes.cpp.

◆ makeTokenListArray()

Attribute Attributes::makeTokenListArray ( const std::string &  name,
const std::string &  help 
)

Make token list attribute.

Definition at line 614 of file Attributes.cpp.

◆ makeUpperCaseString() [1/2]

Attribute Attributes::makeUpperCaseString ( const std::string &  name,
const std::string &  help 
)

Make uppercase string attribute.

Definition at line 433 of file Attributes.cpp.

Referenced by OpalMultipoleT::OpalMultipoleT(), and OpalVariableRFCavity::OpalVariableRFCavity().

◆ makeUpperCaseString() [2/2]

Attribute Attributes::makeUpperCaseString ( const std::string &  name,
const std::string &  help,
const std::string &  initial 
)

Make uppercase string attribute.

Definition at line 437 of file Attributes.cpp.

References Util::toUpper().

Here is the call graph for this function:

◆ makeUpperCaseStringArray()

Attribute Attributes::makeUpperCaseStringArray ( const std::string &  name,
const std::string &  help 
)

Make uppercase string array attribute.

Definition at line 527 of file Attributes.cpp.

Referenced by Beam::Beam().

◆ setBool()

void Attributes::setBool ( Attribute attr,
bool  val 
)

◆ setBoolArray()

void Attributes::setBoolArray ( Attribute attr,
const std::vector< bool > &  value 
)

Set logical array value.

Definition at line 155 of file Attributes.cpp.

References Attribute::getHandler(), Attribute::getName(), and Attribute::set().

Here is the call graph for this function:

◆ setPlace()

void Attributes::setPlace ( Attribute attr,
const PlaceRep rep 
)

Set place value.

Definition at line 188 of file Attributes.cpp.

References Attribute::getHandler(), Attribute::getName(), and Attribute::set().

Here is the call graph for this function:

◆ setPredefinedString()

void Attributes::setPredefinedString ( Attribute attr,
const std::string &  val 
)

Set predefined string value.

Definition at line 413 of file Attributes.cpp.

References Expressions::SValue< T >::evaluate(), Attribute::getBase(), Attribute::getHandler(), Attribute::getName(), Attribute::isBaseAllocated(), Attribute::set(), Expressions::SRefAttr< T >::set(), and Util::toUpper().

Referenced by Option::Option(), Attributes::PredefinedString::parse(), TestMultipoleT::TestableFieldSolverCmd::setBCX(), TestMultipoleTCurvedConstRadius::TestableFieldSolverCmd::setBCX(), TestMultipoleTStraight::TestableFieldSolverCmd::setBCX(), SolenoidPlacementTest::TestableFieldSolverCmd::setBCX(), TestVariableRFCavity::TestableFieldSolverCmd::setBCX(), OrbitThreaderTest::TestableFieldSolverCmd::setBCX(), OpalBeamlinePlacementTest::TestableFieldSolverCmd::setBCX(), TestMultipoleT::TestableFieldSolverCmd::setBCY(), TestMultipoleTCurvedConstRadius::TestableFieldSolverCmd::setBCY(), TestMultipoleTStraight::TestableFieldSolverCmd::setBCY(), SolenoidPlacementTest::TestableFieldSolverCmd::setBCY(), TestVariableRFCavity::TestableFieldSolverCmd::setBCY(), OrbitThreaderTest::TestableFieldSolverCmd::setBCY(), OpalBeamlinePlacementTest::TestableFieldSolverCmd::setBCY(), TestMultipoleT::TestableFieldSolverCmd::setBCZ(), TestMultipoleTCurvedConstRadius::TestableFieldSolverCmd::setBCZ(), TestMultipoleTStraight::TestableFieldSolverCmd::setBCZ(), SolenoidPlacementTest::TestableFieldSolverCmd::setBCZ(), TestVariableRFCavity::TestableFieldSolverCmd::setBCZ(), OrbitThreaderTest::TestableFieldSolverCmd::setBCZ(), OpalBeamlinePlacementTest::TestableFieldSolverCmd::setBCZ(), TestableBinningCmd::setParameterString(), TestMultipoleT::TestableFieldSolverCmd::setType(), TestMultipoleTCurvedConstRadius::TestableFieldSolverCmd::setType(), TestMultipoleTStraight::TestableFieldSolverCmd::setType(), SolenoidPlacementTest::TestableFieldSolverCmd::setType(), TestVariableRFCavity::TestableFieldSolverCmd::setType(), OrbitThreaderTest::TestableFieldSolverCmd::setType(), and OpalBeamlinePlacementTest::TestableFieldSolverCmd::setType().

Here is the call graph for this function:

◆ setRange()

void Attributes::setRange ( Attribute attr,
const RangeRep rep 
)

Set range value.

Definition at line 219 of file Attributes.cpp.

References Attribute::getHandler(), Attribute::getName(), and Attribute::set().

Here is the call graph for this function:

◆ setReal()

◆ setRealArray()

void Attributes::setRealArray ( Attribute attr,
const std::vector< double > &  value 
)

Set array value.

Definition at line 297 of file Attributes.cpp.

References Attribute::getHandler(), Attribute::getName(), and Attribute::set().

Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), and TEST_F().

Here is the call graph for this function:

◆ setString()

void Attributes::setString ( Attribute attr,
const std::string &  val 
)

◆ setStringArray()

void Attributes::setStringArray ( Attribute attr,
const std::vector< std::string > &  value 
)

Set string array value.

Definition at line 514 of file Attributes.cpp.

References Attribute::getHandler(), Attribute::getName(), and Attribute::set().

Referenced by Attributes::StringArray::parse(), and Attributes::StringArray::parseComponent().

Here is the call graph for this function:

◆ setTableRow()

void Attributes::setTableRow ( Attribute attr,
const TableRowRep rep 
)

Set table row value.

Definition at line 569 of file Attributes.cpp.

References Attribute::getHandler(), Attribute::getName(), and Attribute::set().

Here is the call graph for this function:

◆ setTokenList()

void Attributes::setTokenList ( Attribute attr,
const std::list< Token > &  val 
)

Set token list value.

Definition at line 601 of file Attributes.cpp.

References Attribute::getHandler(), Attribute::getName(), and Attribute::set().

Here is the call graph for this function:

◆ setTokenListArray()

void Attributes::setTokenListArray ( Attribute attr,
const std::vector< std::list< Token > > &  value 
)

Set token list array value.

Definition at line 633 of file Attributes.cpp.

References Attribute::set().

Referenced by Attributes::TokenListArray::parse(), and Attributes::TokenListArray::parseComponent().

Here is the call graph for this function:

◆ setUpperCaseString()

void Attributes::setUpperCaseString ( Attribute attr,
const std::string &  val 
)

◆ setUpperCaseStringArray()

void Attributes::setUpperCaseStringArray ( Attribute attr,
const std::vector< std::string > &  value 
)

Set upper case string array value.

Definition at line 531 of file Attributes.cpp.

References Attribute::getHandler(), Attribute::getName(), and Attribute::set().

Referenced by Attributes::UpperCaseStringArray::parse(), and Attributes::UpperCaseStringArray::parseComponent().

Here is the call graph for this function: