Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00027
00028
00029
00030 #ifndef GENICAM_GCSTRINGLIST_H
00031 #define GENICAM_GCSTRINGLIST_H
00032
00033 #include <Base/GCTypes.h>
00034 #include <Base/GCString.h>
00035
00036 #pragma pack(push, 8)
00037
00038
00039 #if defined (_WIN32) || (defined (__GNUC__) && (defined (__linux__) || defined(__APPLE__) || defined(VXWORKS)))
00040
00041
00042 namespace GENICAM_NAMESPACE
00043 {
00044
00049 class GCBASE_API gcstring_vector
00050 {
00051
00052
00053 public:
00054 class GCBASE_API const_iterator
00055 {
00056
00057
00058 public:
00059 const_iterator(gcstring *pStr = 0);
00060
00061
00062
00063 public:
00064 const gcstring & operator * (void) const;
00065 const gcstring * operator -> (void) const;
00066 const_iterator & operator ++ (void);
00067 const_iterator operator ++ (int);
00068 const_iterator & operator -- (void);
00069 const_iterator operator -- (int);
00070 const_iterator & operator += (intptr_t iInc);
00071 const_iterator operator + (intptr_t iInc) const;
00072 const_iterator & operator -= (intptr_t iDec);
00073 intptr_t operator - (const const_iterator &iter) const;
00074 const_iterator operator - (intptr_t iDec) const;
00075 const gcstring & operator [] (intptr_t iIndex) const;
00076 bool operator == (const const_iterator &iter) const;
00077 bool operator != (const const_iterator &iter) const;
00078 bool operator < (const const_iterator &iter) const;
00079 bool operator > (const const_iterator &iter) const;
00080 bool operator <= (const const_iterator &iter) const;
00081 bool operator >= (const const_iterator &iter) const;
00082 GCBASE_API
00083 friend const_iterator operator + (intptr_t iInc, const const_iterator &iter);
00084
00085
00086
00087 protected:
00088 gcstring * _ps;
00089 };
00090
00091 class GCBASE_API iterator :
00092 public const_iterator
00093 {
00094
00095
00096 public:
00097 iterator(gcstring *pStr = 0);
00098
00099
00100
00101 public:
00102 gcstring & operator * (void) const;
00103 gcstring * operator -> (void) const;
00104 iterator & operator ++ (void);
00105 iterator operator ++ (int);
00106 iterator & operator -- (void);
00107 iterator operator -- (int);
00108 iterator & operator += (intptr_t iInc);
00109 iterator operator + (intptr_t iInc) const;
00110 iterator & operator -= (intptr_t iDec);
00111 intptr_t operator - (const iterator &iter) const;
00112 iterator operator - (intptr_t iDec) const;
00113 gcstring & operator [] (intptr_t iIndex) const;
00114 GCBASE_API
00115 friend iterator operator + (intptr_t iInc, const iterator &iter);
00116 };
00117
00118
00119
00120 public:
00121 gcstring_vector(void);
00122 explicit gcstring_vector(size_t uiSize, const gcstring &str = gcstring());
00123 gcstring_vector(const gcstring_vector &obj);
00124 virtual ~gcstring_vector(void);
00125
00126
00127
00128 public:
00129 virtual void assign(size_t n, const gcstring &val);
00130 virtual void clear(void);
00131 virtual iterator erase(iterator pos);
00132 virtual gcstring & at(size_t uiIndex);
00133 virtual const gcstring & at(size_t uiIndex) const;
00134 virtual gcstring & back(void);
00135 virtual const gcstring & back(void) const;
00136 virtual iterator begin(void);
00137 virtual const_iterator begin(void) const;
00138 virtual size_t capacity(void) const;
00139 virtual iterator end(void);
00140 virtual const_iterator end(void) const;
00141 virtual gcstring & front(void);
00142 virtual const gcstring & front(void) const;
00143 virtual size_t max_size(void) const;
00144 virtual size_t size(void) const;
00145 virtual iterator insert(iterator pos, const gcstring &str);
00146 virtual bool empty(void) const;
00147 virtual void pop_back(void);
00148 virtual void push_back(const gcstring &str);
00149 virtual void resize(size_t uiSize, const gcstring &str = gcstring());
00150 virtual void reserve(size_t uiSize);
00151
00152
00153
00154 virtual gcstring_vector & assign(const gcstring_vector &obj);
00155 virtual void erase(size_t uiIndex);
00156 virtual void insert(size_t uiIndex, const gcstring &str);
00157
00158
00159
00160
00161 public:
00162 gcstring_vector & operator = (const gcstring_vector &obj);
00163 gcstring & operator [] (size_t uiIndex);
00164 const gcstring & operator [] (size_t uiIndex) const;
00165 void operator delete (void *pWhere);
00166 void * operator new (size_t uiSize);
00167
00168
00169
00170 private:
00171 void * _pv;
00172 };
00173 }
00174
00175
00176 #else
00177 # error No known support for shared libraries
00178 #endif
00179
00180 #pragma pack(pop)
00181
00182 #endif // GENICAM_GCSTRINGLIST_H