BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Data Fields | Private Member Functions
GMAD::NewColour Class Reference

Colour definition for parser. More...

#include <newcolour.h>

Inheritance diagram for GMAD::NewColour:
Inheritance graph
Collaboration diagram for GMAD::NewColour:
Collaboration graph

Public Member Functions

 NewColour ()
 Constructor. More...
 
void clear ()
 Reset. More...
 
void print () const
 Print some properties. More...
 
template<typename T >
void set_value (std::string property, T value)
 Set methods by property name and value. More...
 
- Public Member Functions inherited from GMAD::Published< NewColour >
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 More...
 

Additional Inherited Members

- Protected Types inherited from GMAD::Published< NewColour >
using AttributeMap = typename std::unordered_map< std::string, T C::* >
 Define AttributeMap of string and class member pointer. More...
 
- Protected Member Functions inherited from GMAD::Published< NewColour >
void publish (const std::string &name, T C::*mp)
 Make pointer to member from class C and type T with accessible with a name. More...
 
void set (NewColour *instance, const NewColour *instance2, const std::string &name)
 Set member with name of class instance to value of second instance. More...
 
AttributeMap< T > & attribute_map () const
 Access method to static map for type T and class C.
 
get (const NewColour *instance, const std::string &name) const
 Get method for class C. More...
 
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)
 

Detailed Description

Colour definition for parser.

This is called "newcolour" instead of colour to avoid the conflict with Element::colour for the parser.

Author
Laurie Nevay

Definition at line 39 of file newcolour.h.

Constructor & Destructor Documentation

◆ NewColour()

NewColour::NewColour ( )

Constructor.

Definition at line 23 of file newcolour.cc.

References clear(), and PublishMembers().

Here is the call graph for this function:

Member Function Documentation

◆ clear()

void NewColour::clear ( )

Reset.

Definition at line 29 of file newcolour.cc.

Referenced by NewColour().

Here is the caller graph for this function:

◆ print()

void NewColour::print ( ) const

Print some properties.

Definition at line 47 of file newcolour.cc.

◆ PublishMembers()

void NewColour::PublishMembers ( )
private

publish members

Definition at line 38 of file newcolour.cc.

References GMAD::Published< NewColour >::publish().

Referenced by NewColour().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_value()

template<typename T >
void GMAD::NewColour::set_value ( std::string  property,
value 
)

Set methods by property name and value.

Definition at line 64 of file newcolour.h.

References GMAD::Published< NewColour >::set().

Here is the call graph for this function:

Field Documentation

◆ alpha

double GMAD::NewColour::alpha

Definition at line 46 of file newcolour.h.

◆ blue

double GMAD::NewColour::blue

Definition at line 45 of file newcolour.h.

◆ green

double GMAD::NewColour::green

Definition at line 44 of file newcolour.h.

◆ name

std::string GMAD::NewColour::name

Definition at line 42 of file newcolour.h.

◆ red

double GMAD::NewColour::red

Definition at line 43 of file newcolour.h.


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