VieSched++
VieVS VLBI Scheduling Software
VieVS::ParameterSetup Class Reference

representation of a setup in parameter.xml file More...

#include <ParameterSetup.h>

Public Types

enum  Transition { Transition::smooth, Transition::hard }
 list of all possible transition types More...
 

Public Member Functions

 ParameterSetup ()
 empty default constructor More...
 
 ParameterSetup (unsigned int start, unsigned int end)
 constructor for root object More...
 
 ParameterSetup (const std::string &parameterName, const std::string &memberName, unsigned int start, unsigned int end, Transition transition=Transition::smooth)
 constructor for setup with single member More...
 
 ParameterSetup (const std::string &parameterName, const std::string &groupName, const std::vector< std::string > &groupMembers, unsigned int start, unsigned int end, Transition transition=Transition::smooth)
 constructor for setup with group member More...
 
const std::string & getParameterName () const
 getter for parameter name More...
 
const std::string & getMemberName () const
 getter for member name More...
 
unsigned int getStart () const
 getter for start time More...
 
unsigned int getEnd () const
 getter for end time More...
 
const std::vector< std::string > & getMembers () const
 getter for member More...
 
const std::vector< ParameterSetup > & getChildren () const
 getter for setup childrens More...
 
std::vector< ParameterSetup > & refChildren ()
 reference for setup childrens More...
 
Transition getTransition () const
 getter for transition type More...
 
int isValidChild (const ParameterSetup &other) const
 checks if this setup is a valid child of other setup More...
 
int isValidSibling (const ParameterSetup &other) const
 checks if this setup is a valid siblig of other setup More...
 
int addChild (ParameterSetup c)
 add a child setup to current setup More...
 
boost::optional< ParameterSetup & > search (int thisLevel, int level, const std::string &parameterName, const std::string &memberName, const std::vector< std::string > &members, Transition transition, unsigned int start, unsigned int end)
 search parameter child More...
 
bool deleteChild (int thisLevel, int level, const std::string &parameterName, const std::string &memberName, const std::vector< std::string > &members, Transition transition, unsigned int start, unsigned int end)
 delete parameter setup More...
 

Private Member Functions

bool isEqual (std::string parameterName, std::string memberName, std::vector< std::string > members, ParameterSetup::Transition transition, unsigned int start, unsigned int end)
 check if parameters are equal More...
 

Private Attributes

std::string parameterName_
 parameter name More...
 
std::string memberName_
 member name More...
 
std::vector< std::string > members_
 list of all members More...
 
Transition transition_
 transition type More...
 
unsigned int start_
 start time in seconds since session start More...
 
unsigned int end_
 end time in seconds since session start More...
 
std::vector< ParameterSetupchildrens_
 list of all setup children More...
 

Detailed Description

representation of a setup in parameter.xml file

Author
Matthias Schartner
Date
24.08.17.

Member Enumeration Documentation

list of all possible transition types

Author
Matthias Schartner
Enumerator
smooth 

soft transition

hard 

hard transition

Constructor & Destructor Documentation

ParameterSetup::ParameterSetup ( )

empty default constructor

Author
Matthias Schartner
ParameterSetup::ParameterSetup ( unsigned int  start,
unsigned int  end 
)

constructor for root object

Author
Matthias Schartner
Parameters
startstart ot this setup in seconds since start
endend of this setup in seconds since start
ParameterSetup::ParameterSetup ( const std::string &  parameterName,
const std::string &  memberName,
unsigned int  start,
unsigned int  end,
Transition  transition = Transition::smooth 
)

constructor for setup with single member

Author
Matthias Schartner
Parameters
parameterNamename of the parameter object
memberNamename of the member
startstart ot this setup in seconds since start
endend of this setup in seconds since start
transitiontransition type
ParameterSetup::ParameterSetup ( const std::string &  parameterName,
const std::string &  groupName,
const std::vector< std::string > &  groupMembers,
unsigned int  start,
unsigned int  end,
Transition  transition = Transition::smooth 
)

constructor for setup with group member

Author
Matthias Schartner
Parameters
parameterNamename of the parameter object
groupNamename of the group
groupMembersname of the group members
startstart ot this setup in seconds since start
endend of this setup in seconds since start
transitiontransition type

Member Function Documentation

int ParameterSetup::addChild ( ParameterSetup  c)

add a child setup to current setup

Author
Matthias Schartner
Parameters
cchild setup object
Returns
error code or 0 if everything is ok

Here is the call graph for this function:

Here is the caller graph for this function:

bool ParameterSetup::deleteChild ( int  thisLevel,
int  level,
const std::string &  parameterName,
const std::string &  memberName,
const std::vector< std::string > &  members,
Transition  transition,
unsigned int  start,
unsigned int  end 
)

delete parameter setup

Author
Matthias Schartner
Parameters
thisLevelcurrent parameter level
leveltarget level
parameterNametarget parameter name
memberNametarget member name
memberstarget members
transitiontarget transition type
starttarget start time
endtarget end time
Returns
if deleted, otherwise false

Here is the caller graph for this function:

const std::vector<ParameterSetup>& VieVS::ParameterSetup::getChildren ( ) const
inline

getter for setup childrens

Author
Matthias Schartner
Returns
all setup childrens of this setup

Here is the caller graph for this function:

unsigned int VieVS::ParameterSetup::getEnd ( ) const
inline

getter for end time

Author
Matthias Schartner
Returns
end time in seconds since start

Here is the caller graph for this function:

const std::string& VieVS::ParameterSetup::getMemberName ( ) const
inline

getter for member name

Author
Matthias Schartner
Returns
name of group member

Here is the caller graph for this function:

const std::vector<std::string>& VieVS::ParameterSetup::getMembers ( ) const
inline

getter for member

Author
Matthias Schartner
Returns
list of all members

Here is the caller graph for this function:

const std::string& VieVS::ParameterSetup::getParameterName ( ) const
inline

getter for parameter name

Author
Matthias Schartner
Returns
parameter name

Here is the caller graph for this function:

unsigned int VieVS::ParameterSetup::getStart ( ) const
inline

getter for start time

Author
Matthias Schartner
Returns
start time in seconds since start

Here is the caller graph for this function:

Transition VieVS::ParameterSetup::getTransition ( ) const
inline

getter for transition type

Author
Matthias Schartner
Returns
transition type

Here is the call graph for this function:

Here is the caller graph for this function:

bool ParameterSetup::isEqual ( std::string  parameterName,
std::string  memberName,
std::vector< std::string >  members,
ParameterSetup::Transition  transition,
unsigned int  start,
unsigned int  end 
)
private

check if parameters are equal

Author
Matthias Schartner
Parameters
parameterNametarget parameter name
memberNametarget member name
memberstarget members
transitiontarget transition type
starttarget start time
endtarget end time
Returns
true if equal, otherwise false

Here is the caller graph for this function:

int ParameterSetup::isValidChild ( const ParameterSetup other) const

checks if this setup is a valid child of other setup

Author
Matthias Schartner
Parameters
otherother setup
Returns
error code or 0 if everything is ok

Here is the call graph for this function:

Here is the caller graph for this function:

int ParameterSetup::isValidSibling ( const ParameterSetup other) const

checks if this setup is a valid siblig of other setup

Author
Matthias Schartner
Parameters
otherother setup
Returns
error code or 0 if everything is ok

Here is the call graph for this function:

Here is the caller graph for this function:

std::vector<ParameterSetup>& VieVS::ParameterSetup::refChildren ( )
inline

reference for setup childrens

Author
Matthias Schartner
Returns
reference to all setup childrens of this setup
boost::optional< ParameterSetup & > ParameterSetup::search ( int  thisLevel,
int  level,
const std::string &  parameterName,
const std::string &  memberName,
const std::vector< std::string > &  members,
ParameterSetup::Transition  transition,
unsigned int  start,
unsigned int  end 
)

search parameter child

Author
Matthias Schartner
Parameters
thisLevelcurrent parameter level
leveltarget level
parameterNametarget parameter name
memberNametarget member name
memberstarget members
transitiontarget transition type
starttarget start time
endtarget end time
Returns
parameter setup if found

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

std::vector<ParameterSetup> VieVS::ParameterSetup::childrens_
private

list of all setup children

unsigned int VieVS::ParameterSetup::end_
private

end time in seconds since session start

std::string VieVS::ParameterSetup::memberName_
private

member name

std::vector<std::string> VieVS::ParameterSetup::members_
private

list of all members

std::string VieVS::ParameterSetup::parameterName_
private

parameter name

unsigned int VieVS::ParameterSetup::start_
private

start time in seconds since session start

Transition VieVS::ParameterSetup::transition_
private

transition type


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