36 #define G_OP_ACCESS "GPhotons::operator[](int&)"
37 #define G_INSERT "GPhotons::insert(int&, GPhoton&)"
38 #define G_REMOVE "GPhotons::remove(int&)"
112 if (
this != &photons) {
142 #if defined(G_RANGE_CHECK)
143 if (index < 0 || index >=
size()) {
166 #if defined(G_RANGE_CHECK)
167 if (index < 0 || index >=
size()) {
244 #if defined(G_RANGE_CHECK)
252 if (index < 0 || index >=
size()) {
280 #if defined(G_RANGE_CHECK)
281 if (index < 0 || index >=
size()) {
310 int num = photons.
size();
316 for (
int i = 0; i < num; ++i) {
359 result.append(
"=== GPhotons ===");
367 for (
int i = 0; i <
size(); ++i) {
GPhotons * clone(void) const
Clone object.
bool is_empty(void) const
Signal if there are no photons.
void init_members(void)
Initialise class members.
void clear(void)
Clear container.
void remove(const int &index)
Remove photon from container.
void extend(const GPhotons &photons)
Append photon container.
std::vector< GPhoton > m_photons
List of photons.
Photon container class definition.
Class that handles photons.
void free_members(void)
Delete class members.
std::string print(const GChatter &chatter=NORMAL) const
Print photon container information.
GPhotons(void)
Void constructor.
GPhotons & operator=(const GPhotons &photons)
Assignment operator.
void copy_members(const GPhotons &photons)
Copy class members.
void insert(const int &index, const GPhoton &photon)
Insert photon into container.
void reserve(const int &num)
Reserve memory for photons in container.
GPhoton & operator[](const int &index)
Return reference to photon.
void append(const GPhoton &photon)
Append photon to container.
Exception handler interface definition.
virtual ~GPhotons(void)
Destructor.
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
int size(void) const
Return number of photons.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.