BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
__w
bdsim
bdsim
parser
newcolour.cc
1
/*
2
Beam Delivery Simulation (BDSIM) Copyright (C) BDSIM Collaboration, 2001 - 2026.
3
4
This file is part of BDSIM.
5
6
BDSIM is free software: you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published
8
by the Free Software Foundation version 3 of the License.
9
10
BDSIM is distributed in the hope that it will be useful, but
11
WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
#include "newcolour.h"
19
20
using namespace
GMAD
;
21
22
NewColour::NewColour
()
23
{
24
clear
();
25
PublishMembers
();
26
}
27
28
void
NewColour::clear
()
29
{
30
name =
""
;
31
red = 0;
32
green = 0;
33
blue = 0;
34
alpha = 1;
// so visible by default
35
}
36
37
void
NewColour::PublishMembers
()
38
{
39
publish
(
"name"
, &NewColour::name);
40
publish
(
"red"
, &NewColour::red);
41
publish
(
"green"
, &NewColour::green);
42
publish
(
"blue"
, &NewColour::blue);
43
publish
(
"alpha"
, &NewColour::alpha);
44
}
45
46
void
NewColour::print
()
const
47
{
48
std::cout <<
"colour: "
49
<<
"name "
<< name << std::endl
50
<<
"red "
<< red << std::endl
51
<<
"green "
<< green << std::endl
52
<<
"blue "
<< blue << std::endl
53
<<
"alpha "
<< alpha << std::endl;
54
}
GMAD::NewColour::print
void print() const
Print some properties.
Definition
newcolour.cc:46
GMAD::NewColour::NewColour
NewColour()
Constructor.
Definition
newcolour.cc:22
GMAD::NewColour::PublishMembers
void PublishMembers()
publish members
Definition
newcolour.cc:37
GMAD::NewColour::clear
void clear()
Reset.
Definition
newcolour.cc:28
GMAD::Published< NewColour >::publish
void publish(const std::string &name, T C::*mp)
Make pointer to member from class C and type T with accessible with a name.
Definition
published.h:93
GMAD
Parser namespace for GMAD language. Combination of Geant4 and MAD.
Definition
BDSBeamlineIntegral.hh:26
Generated on Thu Nov 12 2026 21:36:59 for BDSIM by
1.9.8