SeaBreeze
U32Vector.h
Go to the documentation of this file.
1 /***************************************************/
30 #ifndef SEABREEZE_U32VECTOR_H
31 #define SEABREEZE_U32VECTOR_H
32 
33 #include <vector>
34 #include "common/SeaBreeze.h"
35 #include "common/Data.h"
36 
37 /* This class requires a 32-bit integer type. This will need a little help
38  * to know what the target machine is, so this tries to work it out.
39  */
40 #ifdef _MSC_VER
41 /* Visual Studio */
42 typedef __int32 int32_t;
43 typedef unsigned __int32 uint32_t;
44 #else
45 /* C99 compatible */
46 #include <stdint.h>
47 #endif
48 
49 
50 namespace seabreeze {
51 
52  class U32Vector : public Data {
53  public:
54  U32Vector();
55  /* Constructor that makes a copy of the given vector for internal use */
56  U32Vector(const std::vector<uint32_t> &that);
57  U32Vector(unsigned int length);
58  virtual ~U32Vector();
59  /* Dimensionality of data. 0 for scalar, 1 for vector,
60  * 2 for a pair of related vectors (e.g. [X, Y] or matrix),
61  * 3 for 3D, etc.
62  */
63  virtual int getNumberOfDimensions();
64 
65  /* Get all of the unit descriptors associated with this Data. */
66  virtual std::vector<UnitDescriptor *> *getUnits();
67 
68  /* Get the data associated with this instance */
69  std::vector<uint32_t> &getU32Vector();
70 
71  private:
72  std::vector<uint32_t> *data;
73  };
74 
75 }
76 
77 #endif
Definition: Data.h:46
Encapsulates all SeaBreeze classes.
Definition: DeviceFactory.h:42
Definition: U32Vector.h:52