CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
Genfun::Argument Class Reference

#include <Argument.hh>

Public Member Functions

 Argument (int ndim=0)
 
 Argument (const Argument &)
 
const Argumentoperator= (const Argument &)
 
 ~Argument ()
 
doubleoperator[] (int I)
 
const doubleoperator[] (int i) const
 
unsigned int dimension () const
 

Friends

std::ostream & operator<< (std::ostream &o, const Argument &a)
 

Detailed Description

Author

Definition at line 17 of file Argument.hh.

Constructor & Destructor Documentation

◆ Argument() [1/2]

Genfun::Argument::Argument ( int  ndim = 0)
inline

Definition at line 73 of file Argument.hh.

73 : _data(new std::vector<double>(ndim)) {
74 }

◆ Argument() [2/2]

Genfun::Argument::Argument ( const Argument right)
inline

Definition at line 48 of file Argument.hh.

48 :
49 _data(new std::vector<double>(*(right._data))){
50 }

◆ ~Argument()

Genfun::Argument::~Argument ( )
inline

Definition at line 76 of file Argument.hh.

76 {
77 delete _data;
78 }

Member Function Documentation

◆ dimension()

◆ operator=()

const Argument & Genfun::Argument::operator= ( const Argument right)
inline

Definition at line 52 of file Argument.hh.

52 {
53 if (this != &right) {
54 delete _data;
55 _data=NULL;
56 _data = new std::vector<double>(*(right._data));
57 }
58 return *this;
59 }

◆ operator[]() [1/2]

double & Genfun::Argument::operator[] ( int  I)
inline

Definition at line 65 of file Argument.hh.

65 {
66 return (*_data)[i];
67 }

◆ operator[]() [2/2]

const double & Genfun::Argument::operator[] ( int  i) const
inline

Definition at line 69 of file Argument.hh.

69 {
70 return (*_data)[i];
71 }

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  o,
const Argument a 
)
friend

Definition at line 81 of file Argument.hh.

81 {
82 std::ostream_iterator<double> oi(os,",");
83 std::copy (a._data->begin(),a._data->end(),oi);
84 return os;
85 }

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