My Project
 All Classes Namespaces Functions Friends
Lifo.hxx
1 
12 #ifndef Lifo_HXX
13 #define Lifo_HXX
14 
15 #include <cstddef> // for __GLIBCXX__
16 
17 #ifdef __GLIBCXX__ // for memory management with shared_ptr
18 # include <tr1/memory>
19 #else
20 # ifdef __IBMCPP__
21 # define __IBMCPP_TR1__
22 # endif
23 # include <memory>
24 #endif
25 
26 #include "LifoException.hxx"
27 #include "Clcm.hxx"
28 extern "C" {
29 #include <dirent.h>
30 #include "cle2000.h"
31 }
32 #define LifoPtr boost::shared_ptr<Lifo>
33 
34 namespace ganlib {
35 
51 class Lifo {
52 public:
56  Lifo() throw(LifoException);
57 
60  ~Lifo() throw(LifoException);
61 
65  void pop() throw(LifoException);
66 
71  void pop(int_32 &myInteger) throw(LifoException);
72 
77  void pop(float_32 &myFloat) throw(LifoException);
78 
83  void pop(std::string &myString) throw(LifoException);
84 
89  void pop(double &myDouble) throw(LifoException);
90 
95  void pop(bool &myBool) throw(LifoException);
96 
101  void pop(ClcmPtr &myClcm) throw(LifoException);
102 
114  void pop(std::string myFile, std::string stype) throw(LifoException);
115 
121  void node(int_32 ipos, int_32 &myInteger) throw(LifoException);
122 
128  void node(int_32 ipos, float_32 &myFloat) throw(LifoException);
129 
135  void node(int_32 ipos, std::string &myString) throw(LifoException);
136 
142  void node(int_32 ipos, double &myDouble) throw(LifoException);
143 
149  void node(int_32 ipos, bool &myBool) throw(LifoException);
150 
156  void node(int_32 ipos, ClcmPtr &myClcm) throw(LifoException);
157 
170  void node(int_32 ipos, std::string node, std::string stype) throw(LifoException);
171 
177  void node(std::string sname, int_32 &myInteger) throw(LifoException);
178 
184  void node(std::string sname, float_32 &myFloat) throw(LifoException);
185 
191  void node(std::string sname, std::string &myString) throw(LifoException);
192 
198  void node(std::string sname, double &myDouble) throw(LifoException);
199 
205  void node(std::string sname, bool &myBool) throw(LifoException);
206 
212  void node(std::string sname, ClcmPtr &myClcm) throw(LifoException);
213 
226  void node(std::string sname, std::string node, std::string stype) throw(LifoException);
227 
232  std::string OSName(std::string sname) throw(LifoException);
233 
238  std::string OSName(int_32 ipos) throw(LifoException);
239 
244  std::string Name(int_32 ipos) throw(LifoException);
245 
252  int_32 typeNode(std::string sname) throw(LifoException);
253 
260  int_32 typeNode(int_32 ipos) throw(LifoException);
261 
266  int_32 accessNode(std::string sname) throw(LifoException);
267 
272  int_32 accessNode(int_32 ipos) throw(LifoException);
273 
278  void push(std::string sname, const int_32 myInteger) throw(LifoException);
279 
284  void push(std::string sname, const float myFloat) throw(LifoException);
285 
290  void push(std::string sname, const std::string myString) throw(LifoException);
291 
296  void push(std::string sname, const double_64 myDouble) throw(LifoException);
297 
302  void push(std::string sname, const bool myBool) throw(LifoException);
303 
309  void push(std::string sname, const ClcmPtr myClcm) throw(LifoException);
310 
321  void push(std::string sname, std::string myFile, std::string stype) throw(LifoException);
322 
334  void push(std::string sname, std::string myFile, std::string stype,
335  std::string OSname) throw(LifoException);
336 
343  void pushEmpty(std::string sname, std::string nodeType) throw(LifoException);
344 
351  void pushEmpty(std::string sname, std::string nodeType, std::string OSname) throw(LifoException);
352 
356  int_32 getMax();
357 
360  void lib() throw(LifoException);
361 
365  lifo *extract();
366 
367 private:
368  std::vector<ClcmPtr> *global_list; // container for the global references
369  lifo *addr; // address of the Lifo object
370 }; // class Lifo
371 
372 } // namespace ganlib
373 #endif