MIDAS
Loading...
Searching...
No Matches
A Class Reference
Collaboration diagram for A:

Public Member Functions

 A (const A &a)
 
A operator= (A &&a)=delete
 
 A (std::initializer_list< std::pair< std::string, A > > list)
 
 A (std::initializer_list< int > list)
 
 A (std::initializer_list< double > list)
 
 A (std::initializer_list< bool > list)
 
 A (int leaf)
 
 A (double leaf)
 
 A (bool leaf)
 
 A (const char *leaf)
 
void print (int level=0)
 

Private Attributes

std::vector< std::pair< std::string, A > > _elem
 
const datatype type
 
int intmember
 
double doublemember
 
bool boolmember
 
std::string stringmember
 
std::vector< intintvec
 
std::vector< doubledoublevec
 
std::vector< boolboolvec
 

Detailed Description

Definition at line 9 of file test_init.cxx.

Constructor & Destructor Documentation

◆ A() [1/9]

A::A ( const A a)
inline

Definition at line 24 of file test_init.cxx.

24 : type{a.type} {
29// intvec = a.intvec;
30// doublevec = a.doublevec;
31// boolvec = a.boolvec;
32 }
int intmember
Definition test_init.cxx:14
const datatype type
Definition test_init.cxx:13
bool boolmember
Definition test_init.cxx:16
double doublemember
Definition test_init.cxx:15
std::string stringmember
Definition test_init.cxx:17

◆ A() [2/9]

A::A ( std::initializer_list< std::pair< std::string, A > >  list)
inline

Definition at line 37 of file test_init.cxx.

37 :type(DIR){
38 for(auto x : list)
40 }
std::vector< std::pair< std::string, A > > _elem
Definition test_init.cxx:12
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)
Definition rmidas.h:24
@ DIR
Definition test_init.cxx:7
static te_expr * list(state *s)
Definition tinyexpr.c:567
Here is the call graph for this function:

◆ A() [3/9]

A::A ( std::initializer_list< int list)
inline

Definition at line 43 of file test_init.cxx.

43 :type(INT_ARR){
44 for(auto & element : list){
45 intvec.push_back(element);
46 }
47 }
std::vector< int > intvec
Definition test_init.cxx:18
INT element
Definition mchart.cxx:40
@ INT_ARR
Definition test_init.cxx:7
Here is the call graph for this function:

◆ A() [4/9]

A::A ( std::initializer_list< double list)
inline

Definition at line 49 of file test_init.cxx.

50 for(auto & element : list){
51 doublevec.push_back(element);
52 }
53 }
std::vector< double > doublevec
Definition test_init.cxx:19
@ DOUBLE_ARR
Definition test_init.cxx:7
Here is the call graph for this function:

◆ A() [5/9]

A::A ( std::initializer_list< bool list)
inline

Definition at line 55 of file test_init.cxx.

55 :type(BOOL_ARR){
56 for(auto & element : list){
57 boolvec.push_back(element);
58 }
59 }
std::vector< bool > boolvec
Definition test_init.cxx:20
@ BOOL_ARR
Definition test_init.cxx:7
Here is the call graph for this function:

◆ A() [6/9]

A::A ( int  leaf)
inline

Definition at line 61 of file test_init.cxx.

62 }
int INT
Definition midas.h:129

◆ A() [7/9]

A::A ( double  leaf)
inline

Definition at line 63 of file test_init.cxx.

64 }
@ DOUBLE
Definition test_init.cxx:7

◆ A() [8/9]

A::A ( bool  leaf)
inline

Definition at line 65 of file test_init.cxx.

66 }
DWORD BOOL
Definition midas.h:105

◆ A() [9/9]

A::A ( const char leaf)
inline

Definition at line 67 of file test_init.cxx.

68 }
@ STRING
Definition test_init.cxx:7

Member Function Documentation

◆ operator=()

A A::operator= ( A &&  a)
delete

◆ print()

void A::print ( int  level = 0)
inline

Definition at line 70 of file test_init.cxx.

70 {
71 switch(type){
72 case DIR:
73 std::cout << std::endl;
74 for(int i=0 ; i<_elem.size() ; i++){
75 for(int i=0; i < level; i++)
76 std::cout << " ";
77 std::cout << _elem[i].first << ": ";
78 _elem[i].second.print(level+1);
79 }
80 break;
81 case INT:
82 std::cout << intmember << std::endl;
83 break;
84 case DOUBLE:
85 std::cout << doublemember << std::endl;
86 break;
87 case STRING:
88 std::cout << "\"" << stringmember << "\"" << std::endl;
89 break;
90 case BOOL:
91 std::cout << boolmember << std::endl;
92 break;
93 case INT_ARR:
94 for(auto & x : intvec)
95 std::cout << x << " ";
96 std::cout<< std::endl;
97 break;
98 case DOUBLE_ARR:
99 for(auto & x : doublevec)
100 std::cout << x << " ";
101 std::cout<< std::endl;
102 break;
103 case BOOL_ARR:
104 for(auto x : boolvec)
105 std::cout << x << " ";
106 std::cout<< std::endl;
107 break;
108 case UNDEF:
109 break;
110 }
111 };
INT i
Definition mdump.cxx:32
@ UNDEF
Definition test_init.cxx:7
@ BOOL
Definition test_init.cxx:7
@ INT
Definition test_init.cxx:7
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _elem

std::vector<std::pair<std::string,A> > A::_elem
private

Definition at line 12 of file test_init.cxx.

◆ boolmember

bool A::boolmember
private

Definition at line 16 of file test_init.cxx.

◆ boolvec

std::vector<bool> A::boolvec
private

Definition at line 20 of file test_init.cxx.

◆ doublemember

double A::doublemember
private

Definition at line 15 of file test_init.cxx.

◆ doublevec

std::vector<double> A::doublevec
private

Definition at line 19 of file test_init.cxx.

◆ intmember

int A::intmember
private

Definition at line 14 of file test_init.cxx.

◆ intvec

std::vector<int> A::intvec
private

Definition at line 18 of file test_init.cxx.

◆ stringmember

std::string A::stringmember
private

Definition at line 17 of file test_init.cxx.

◆ type

const datatype A::type
private

Definition at line 13 of file test_init.cxx.


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