GCArray.h
Go to the documentation of this file.
1 /****************************************************************************
2  (c) 2014 by Teledyne DALSA
3  Section: Digital Imaging
4  Project: GCBase
5  Author: Eric Bourbonnais
6 
7 
8  License: This file is published under the license of the EMVA GenICam Standard Group.
9  A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
10  If for some reason you are missing this file please contact the EMVA or visit the website
11  (http://www.genicam.org) for a full copy.
12 
13  THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
14  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
17  OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23  POSSIBILITY OF SUCH DAMAGE.
24 
25 ****************************************************************************/
26 
27 #ifndef GCBASE_GCARRAY_H
28 #define GCBASE_GCARRAY_H
29 
30 #include <Base/GCTypes.h>
32 {
33  template< class T>
34  class gcarray
35  {
36  public:
37  gcarray( size_t size) : m_p( NULL)
38  {
39  if(size)
40  m_p = new T[size];
41  };
42  ~gcarray( ){ if(m_p) delete [] m_p;};
43  T* get() const {return m_p;} ;
44  T* operator *() {return m_p;} ;
45  T operator[](size_t idx) {return m_p[idx];} ;
46  private:
47  T* m_p;
48  };
49 
50 }
51 
52 #endif // GCBASE_GCARRAY_H
gcarray(size_t size)
Definition: GCArray.h:37
T operator[](size_t idx)
Definition: GCArray.h:45
Platform-dependent type definitions.


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Thu Jun 6 2019 19:10:54