GCStringVector.h
Go to the documentation of this file.
00001 /****************************************************************************
00002  (c) 2005 by STEMMER IMAGING
00003 
00004  //  License: This file is published under the license of the EMVA GenICam  Standard Group.
00005  //  A text file describing the legal terms is included in  your installation as 'GenICam_license.pdf'.
00006  //  If for some reason you are missing  this file please contact the EMVA or visit the website
00007  //  (http://www.genicam.org) for a full copy.
00008  //
00009  //  THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
00010  //  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00011  //  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00012  //  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD  GROUP
00013  //  OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,  SPECIAL,
00014  //  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT  LIMITED TO,
00015  //  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  DATA, OR PROFITS;
00016  //  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY  THEORY OF LIABILITY,
00017  //  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE)
00018  //  ARISING IN ANY WAY OUT OF THE USE  OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00019  //  POSSIBILITY OF SUCH DAMAGE.
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         // Nested types
00052         // ---------------------------------------------------------------------------
00053     public:
00054         class GCBASE_API const_iterator
00055         {
00056             // Ctor / Dtor
00057             // -------------------------------------------------------------------------
00058         public:
00059             const_iterator(gcstring *pStr = 0);
00060 
00061             // Operators
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             // Member
00086             // -------------------------------------------------------------------------
00087         protected:
00088             gcstring *              _ps;
00089         };
00090 
00091         class GCBASE_API iterator :
00092             public const_iterator
00093         {
00094             // Ctor / Dtor
00095             // -------------------------------------------------------------------------
00096         public:
00097             iterator(gcstring *pStr = 0);
00098 
00099             // Operators
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         // Ctor / Dtor
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         // Element access
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         virtual bool              contains(const gcstring &str)     const;
00152 
00153         // Do not use the methods below - they only exist for
00154         // backwards compatibility
00155         virtual gcstring_vector & assign(const gcstring_vector &obj);
00156         virtual void              erase(size_t uiIndex);
00157         virtual void              insert(size_t uiIndex, const gcstring &str);
00158 
00159 
00160         // Operators
00161         // ---------------------------------------------------------------------------
00162     public:
00163         gcstring_vector &         operator =        (const gcstring_vector &obj);
00164         gcstring &                operator []       (size_t uiIndex);
00165         const gcstring &          operator []       (size_t uiIndex)        const;
00166         void                      operator delete   (void *pWhere);
00167         void *                    operator new      (size_t uiSize);
00168 
00169         // Member
00170         // ---------------------------------------------------------------------------
00171     private:
00172         void *                    _pv;
00173     };
00174 
00175 }
00176 
00177 
00178 
00179 #else
00180 #   error No known support for shared libraries
00181 #endif
00182 
00183 #pragma pack(pop)
00184 
00185 #endif // GENICAM_GCSTRINGLIST_H


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Thu Jun 6 2019 18:42:47