BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Colour definition for parser. More...
#include <newcolour.h>
Public Member Functions | |
NewColour () | |
Constructor. | |
void | clear () |
Reset. | |
void | print () const |
Print some properties. | |
template<typename T > | |
void | set_value (std::string property, T value) |
Set methods by property name and value. | |
![]() | |
bool | NameExists (const std::string &name) const |
Published< NewColour >::template AttributeMap< T > & | attribute_map () const |
Data Fields | |
std::string | name |
double | red |
double | green |
double | blue |
double | alpha |
Private Member Functions | |
void | PublishMembers () |
publish members | |
Additional Inherited Members | |
![]() | |
using | AttributeMap = typename std::unordered_map< std::string, T C::* > |
Define AttributeMap of string and class member pointer. | |
![]() | |
void | publish (const std::string &name, T C::*mp) |
Make pointer to member from class C and type T with accessible with a name. | |
void | set (NewColour *instance, const NewColour *instance2, const std::string &name) |
Set member with name of class instance to value of second instance. | |
AttributeMap< T > & | attribute_map () const |
Access method to static map for type T and class C. | |
T | get (const NewColour *instance, const std::string &name) const |
Get method for class C. | |
void | set (NewColour *instance, const std::string &name, double value) |
void | set (NewColour *instance, const std::string &name, GMAD::Array *const &value) |
void | set (NewColour *instance, const std::string &name, const T &value) |
Colour definition for parser.
This is called "newcolour" instead of colour to avoid the conflict with Element::colour for the parser.
Definition at line 39 of file newcolour.h.
NewColour::NewColour | ( | ) |
Constructor.
Definition at line 23 of file newcolour.cc.
References clear(), and PublishMembers().
void NewColour::clear | ( | ) |
Reset.
Definition at line 29 of file newcolour.cc.
Referenced by NewColour().
void NewColour::print | ( | ) | const |
Print some properties.
Definition at line 47 of file newcolour.cc.
|
private |
publish members
Definition at line 38 of file newcolour.cc.
References GMAD::Published< NewColour >::publish().
Referenced by NewColour().
void GMAD::NewColour::set_value | ( | std::string | property, |
T | value | ||
) |
Set methods by property name and value.
Definition at line 64 of file newcolour.h.
References GMAD::Published< NewColour >::set().
double GMAD::NewColour::alpha |
Definition at line 46 of file newcolour.h.
double GMAD::NewColour::blue |
Definition at line 45 of file newcolour.h.
double GMAD::NewColour::green |
Definition at line 44 of file newcolour.h.
std::string GMAD::NewColour::name |
Definition at line 42 of file newcolour.h.
double GMAD::NewColour::red |
Definition at line 43 of file newcolour.h.