simplevector.h
Go to the documentation of this file.
1 //======================================================================
28 //======================================================================
29 
30 #ifndef SIMPLEVECTOR_H_
31 #define SIMPLEVECTOR_H_
32 
33 #include "sdhlibrary_settings.h"
34 
35 #if SDH_USE_VCC
36 # pragma warning(disable : 4290)
37 #endif
38 
39 //----------------------------------------------------------------------
40 // System Includes - include with <>
41 //----------------------------------------------------------------------
42 
43 
44 //----------------------------------------------------------------------
45 // Project Includes - include with ""
46 //----------------------------------------------------------------------
47 
48 #include "sdhexception.h"
49 
50 //----------------------------------------------------------------------
51 // Defines, enums, unions, structs,
52 //----------------------------------------------------------------------
53 
55 
56 
57 //----------------------------------------------------------------------
58 // Global variables
59 //----------------------------------------------------------------------
60 
61 
62 //----------------------------------------------------------------------
63 // Function implementation (function definitions)
64 //----------------------------------------------------------------------
65 
66 
67 //----------------------------------------------------------------------
68 // Class declarations
69 //----------------------------------------------------------------------
70 
75 {
76 public:
77  cSimpleVectorException( cMsg const & _msg )
78  : cSDHLibraryException( "cSimpleVectorException", _msg )
79  {}
80 };
81 //======================================================================
82 
83 
85 
91 class VCC_EXPORT cSimpleVector
92 {
93 public:
95  enum
96  {
98  };
99 
101  cSimpleVector();
102 
103 
105  cSimpleVector( int nb_values, char const* str );
106 
107 
109  cSimpleVector( int nb_values, int start_index, char const* str );
110 
112  cSimpleVector( int nb_values, int start_index, float* values );
113 
114 
116  void FromString( int nb_values, int start_index, char const* str );
117 
118 
120  double& operator[]( unsigned int index );
121 
122 
124  double& x(void);
125 
126 
128  double& y(void);
129 
130 
132  double& z(void);
133 
135  bool Valid( unsigned int index ) const;
136 
137 protected:
138 
139  double value[ eNUMBER_OF_ELEMENTS ];
140 
142  int valid;
143 
144 }; // cSimpleVector
145 //-----------------------------------------------------------------
146 
148 
149 #endif
150 
151 
152 //======================================================================
153 /*
154  Here are some settings for the emacs/xemacs editor (and can be safely ignored):
155  (e.g. to explicitely set C++ mode for *.h header files)
156 
157  Local Variables:
158  mode:C++
159  mode:ELSE
160  End:
161 */
162 //======================================================================
cSDHLibraryException
Base class for exceptions in the SDHLibrary-CPP.
Definition: sdhexception.h:132
NAMESPACE_SDH_END
#define NAMESPACE_SDH_END
Definition: sdhlibrary_settings.h:80
cSimpleVector
A simple vector implementation.
Definition: simplevector.h:91
cSimpleVectorException
Derived exception class for low-level simple vector related exceptions.
Definition: simplevector.h:74
cMsg
Class for short, fixed maximum length text messages.
Definition: sdhexception.h:77
eNUMBER_OF_ELEMENTS
@ eNUMBER_OF_ELEMENTS
Definition: sdhserial.cpp:58
NAMESPACE_SDH_START
#define NAMESPACE_SDH_START
Definition: sdhlibrary_settings.h:79
sdhexception.h
Interface of the exception base class #SDH::cSDHLibraryException and #SDH::cMsg.
cSimpleVectorException::cSimpleVectorException
cSimpleVectorException(cMsg const &_msg)
Definition: simplevector.h:77
cSimpleVector::valid
int valid
bit mask which values in value are valid
Definition: simplevector.h:142
sdhlibrary_settings.h
This file contains settings to make the SDHLibrary compile on differen systems:


sdhlibrary_cpp
Author(s): Dirk Osswald
autogenerated on Wed Mar 2 2022 01:00:58