UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
zd_coord_obj_stream.hpp
1 /* zd_coord_obj_stream.hpp */
2 /* $Id: zd_coord_obj_stream.hpp,v 1.2 2007/04/13 19:57:50 vlad Exp $ */
3 #ifndef __zd_coord_obj_stream_hpp
4 #define __zd_coord_obj_stream_hpp
5 
6 #include "zqb_types.h"
7 #include "zd_document.hpp"
8 
9 
15 class ZdCoordObjStream : public ZdDocument
16 {
17 public:
18 
21  {
22  int i;
23  float f;
24  char c;
25  };
26 
29  {
31  coordId(0), argType(Z_T_INT32) {/* nothing to do */}
32 
33  int coordId;
34  ZqbType argType;
35  std::vector<CoordArgVal> args;
36  };
37 
39  typedef std::vector<CoordSelection> CoordSelectionVec;
40 
42  ZdCoordObjStream (const char* szDocName = NULL);
43 
44 
46  virtual void setCustomCoord(int iCoordId);
47 
49  virtual int getCustomCoord() const {return 0;}
50 
51 
55  virtual void setFirstOrder (int iCoordId,
56  ZqbOrder eOrder = Z_O_ASCENT);
57 
59  virtual bool getFirstOrder (int &iCoordId, ZqbOrder &eOrder) const;
60 
61 
67  virtual void setSecondaryOrder (int iSecondaryId,
68  ZqbOrder eOrder = Z_O_ASCENT);
69 
71  virtual bool getSecondaryOrder (int &iCoordId, ZqbOrder &eOrder) const;
72 
78  virtual void setTertiaryOrder (int iTertiaryId,
79  ZqbOrder eOrder = Z_O_ASCENT);
80 
82  virtual bool getTertiaryOrder (int &iCoordId, ZqbOrder &eOrder) const;
83 
84 
86  virtual void setCoordsSelection(const CoordSelectionVec &selCoords);
87 
90  virtual const CoordSelectionVec& getCoordsSelection() const;
91 
92 
94  virtual void setInvisibleCoordinates(const CoordSelectionVec &unvisibleCoords);
95 
97  virtual const CoordSelectionVec& getInvisibleCoordinates() const;
98 
99 
102  virtual bool getCoordRange (double c[2]) = 0;
103 
105  virtual double averageCoordStep () = 0;
106 
108  virtual int maxEnsembleLength () = 0;
109 
110 
111  /*
112  * Iterator methods.
113  */
114 
117  virtual bool goFirstCoord () = 0;
118 
121  virtual bool goNextCoord () = 0;
122 
125  virtual double coord () = 0;
126 
128  virtual bool visibleCoord () { return true; }
129 
132  virtual int ensembleLength () = 0;
133 
138  virtual void* custom (int ens_index = 0,
139  ZqbType* pRetType = NULL);
140 
141 
144  virtual ZqbType coordTypeFromId(int coordId) const;
145 
146 private:
147 
148  CoordSelectionVec m_dummy_cs_vec;
149 
151  static int s_iNameCounter;
152 
154  static const char *s_szOwnType;
155 
156 };
157 
158 
159 #endif /* zd_coord_obj_stream.hpp */
virtual bool visibleCoord()
Definition: zd_coord_obj_stream.hpp:128
virtual int maxEnsembleLength()=0
virtual double averageCoordStep()=0
virtual void setSecondaryOrder(int iSecondaryId, ZqbOrder eOrder=Z_O_ASCENT)
virtual int ensembleLength()=0
ZdCoordObjStream(const char *szDocName=NULL)
virtual bool getFirstOrder(int &iCoordId, ZqbOrder &eOrder) const
virtual int getCustomCoord() const
Definition: zd_coord_obj_stream.hpp:49
virtual const CoordSelectionVec & getInvisibleCoordinates() const
virtual void setCustomCoord(int iCoordId, ZqbOrder eOrder=Z_O_ASCENT)
virtual bool getCoordRange(double c[2])=0
virtual void setInvisibleCoordinates(const CoordSelectionVec &unvisibleCoords)
Definition: zd_coord_obj_stream.hpp:15
virtual ZqbType coordTypeFromId(int coordId) const
char c
Definition: zd_coord_obj_stream.hpp:24
ZqbType argType
Definition: zd_coord_obj_stream.hpp:34
virtual bool getTertiaryOrder(int &iCoordId, ZqbOrder &eOrder) const
Definition: zd_coord_obj_stream.hpp:28
Definition: zd_document.hpp:16
int coordId
Definition: zd_coord_obj_stream.hpp:33
virtual double coord()=0
std::vector< CoordArgVal > args
Definition: zd_coord_obj_stream.hpp:35
virtual void setFirstOrder(int iCoordId, ZqbOrder eOrder=Z_O_ASCENT)
virtual bool goNextCoord()=0
virtual void * custom(int ens_index=0, ZqbType *pRetType=NULL)
Definition: zd_coord_obj_stream.hpp:80
virtual const CoordSelectionVec & getCoordsSelection() const
Definition: zd_coord_obj_stream.hpp:20
virtual void setCoordsSelection(const CoordSelectionVec &selCoords)
int i
Definition: zd_coord_obj_stream.hpp:22
std::vector< CoordSelection > CoordSelectionVec
Definition: zd_coord_obj_stream.hpp:39
virtual void setTertiaryOrder(int iTertiaryId, ZqbOrder eOrder=Z_O_ASCENT)
virtual bool goFirstCoord()=0
virtual bool getSecondaryOrder(int &iCoordId, ZqbOrder &eOrder) const
float f
Definition: zd_coord_obj_stream.hpp:23