GCStringVector.h
Go to the documentation of this file.
1 /****************************************************************************
2  (c) 2005 by STEMMER IMAGING
3 
4  // License: This file is published under the license of the EMVA GenICam Standard Group.
5  // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
6  // If for some reason you are missing this file please contact the EMVA or visit the website
7  // (http://www.genicam.org) for a full copy.
8  //
9  // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
10  // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
11  // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12  // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
13  // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
14  // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
15  // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
16  // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
17  // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
18  // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
19  // POSSIBILITY OF SUCH DAMAGE.
20 
21 
22  ****************************************************************************/
23 
27 
28 
29 
30 #ifndef GENICAM_GCSTRINGLIST_H
31 #define GENICAM_GCSTRINGLIST_H
32 
33 #include <Base/GCTypes.h>
34 #include <Base/GCString.h>
35 
36 #pragma pack(push, 8)
37 
38 
39 #if defined (_WIN32) || (defined (__GNUC__) && (defined (__linux__) || defined(__APPLE__) || defined(VXWORKS)))
40 
41 
42 namespace GENICAM_NAMESPACE
43 {
44 
49  class GCBASE_API gcstring_vector
50  {
51  // Nested types
52  // ---------------------------------------------------------------------------
53  public:
54  class GCBASE_API const_iterator
55  {
56  // Ctor / Dtor
57  // -------------------------------------------------------------------------
58  public:
59  const_iterator(gcstring *pStr = 0);
60 
61  // Operators
62  // -------------------------------------------------------------------------
63  public:
64  const gcstring & operator * (void) const;
65  const gcstring * operator -> (void) const;
66  const_iterator & operator ++ (void);
67  const_iterator operator ++ (int);
68  const_iterator & operator -- (void);
69  const_iterator operator -- (int);
70  const_iterator & operator += (intptr_t iInc);
71  const_iterator operator + (intptr_t iInc) const;
72  const_iterator & operator -= (intptr_t iDec);
73  intptr_t operator - (const const_iterator &iter) const;
74  const_iterator operator - (intptr_t iDec) const;
75  const gcstring & operator [] (intptr_t iIndex) const;
76  bool operator == (const const_iterator &iter) const;
77  bool operator != (const const_iterator &iter) const;
78  bool operator < (const const_iterator &iter) const;
79  bool operator > (const const_iterator &iter) const;
80  bool operator <= (const const_iterator &iter) const;
81  bool operator >= (const const_iterator &iter) const;
82  GCBASE_API
83  friend const_iterator operator + (intptr_t iInc, const const_iterator &iter);
84 
85  // Member
86  // -------------------------------------------------------------------------
87  protected:
88  gcstring * _ps;
89  };
90 
91  class GCBASE_API iterator :
92  public const_iterator
93  {
94  // Ctor / Dtor
95  // -------------------------------------------------------------------------
96  public:
97  iterator(gcstring *pStr = 0);
98 
99  // Operators
100  // -------------------------------------------------------------------------
101  public:
102  gcstring & operator * (void) const;
103  gcstring * operator -> (void) const;
104  iterator & operator ++ (void);
105  iterator operator ++ (int);
106  iterator & operator -- (void);
107  iterator operator -- (int);
108  iterator & operator += (intptr_t iInc);
109  iterator operator + (intptr_t iInc) const;
110  iterator & operator -= (intptr_t iDec);
111  intptr_t operator - (const iterator &iter) const;
112  iterator operator - (intptr_t iDec) const;
113  gcstring & operator [] (intptr_t iIndex) const;
114  GCBASE_API
115  friend iterator operator + (intptr_t iInc, const iterator &iter);
116  };
117 
118  // Ctor / Dtor
119  // ---------------------------------------------------------------------------
120  public:
121  gcstring_vector(void);
122  explicit gcstring_vector(size_t uiSize, const gcstring &str = gcstring());
123  gcstring_vector(const gcstring_vector &obj);
124  virtual ~gcstring_vector(void);
125 
126  // Element access
127  // ---------------------------------------------------------------------------
128  public:
129  virtual void assign(size_t n, const gcstring &val);
130  virtual void clear(void);
131  virtual iterator erase(iterator pos);
132  virtual gcstring & at(size_t uiIndex);
133  virtual const gcstring & at(size_t uiIndex) const;
134  virtual gcstring & back(void);
135  virtual const gcstring & back(void) const;
136  virtual iterator begin(void);
137  virtual const_iterator begin(void) const;
138  virtual size_t capacity(void) const;
139  virtual iterator end(void);
140  virtual const_iterator end(void) const;
141  virtual gcstring & front(void);
142  virtual const gcstring & front(void) const;
143  virtual size_t max_size(void) const;
144  virtual size_t size(void) const;
145  virtual iterator insert(iterator pos, const gcstring &str);
146  virtual bool empty(void) const;
147  virtual void pop_back(void);
148  virtual void push_back(const gcstring &str);
149  virtual void resize(size_t uiSize, const gcstring &str = gcstring());
150  virtual void reserve(size_t uiSize);
151  virtual bool contains(const gcstring &str) const;
152 
153  // Do not use the methods below - they only exist for
154  // backwards compatibility
155  virtual gcstring_vector & assign(const gcstring_vector &obj);
156  virtual void erase(size_t uiIndex);
157  virtual void insert(size_t uiIndex, const gcstring &str);
158 
159 
160  // Operators
161  // ---------------------------------------------------------------------------
162  public:
163  gcstring_vector & operator = (const gcstring_vector &obj);
164  gcstring & operator [] (size_t uiIndex);
165  const gcstring & operator [] (size_t uiIndex) const;
166  void operator delete (void *pWhere);
167  void * operator new (size_t uiSize);
168 
169  // Member
170  // ---------------------------------------------------------------------------
171  private:
172  void * _pv;
173  };
174 
175 }
176 
177 
178 
179 #else
180 # error No known support for shared libraries
181 #endif
182 
183 #pragma pack(pop)
184 
185 #endif // GENICAM_GCSTRINGLIST_H
bool operator!=(const MyAlloc< T1 > &, const MyAlloc< T2 > &)
Definition: gcmemory.h:103
virtual void operator=(bool Value)
Set node value.
Definition: IBoolean.h:64
bool operator==(const MyAlloc< T1 > &, const MyAlloc< T2 > &)
Definition: gcmemory.h:98
virtual GENICAM_NAMESPACE::gcstring operator*()=0
Get string node value.
Portable string implementation.
Platform-dependent type definitions.


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Mar 17 2021 02:48:40