GenApi 3.5.1
Autovector.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// (c) 2012 by Teledyne DALSA
3// Author: Eric Bourbonnais
4//
5// License: This file is published under the license of the EMVA GenICam Standard Group.
6// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
7// If for some reason you are missing this file please contact the EMVA or visit the website
8// (http://www.genicam.org) for a full copy.
9//
10// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
11// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
12// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
13// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
14// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
15// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
16// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
17// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
18// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
20// POSSIBILITY OF SUCH DAMAGE.
21//
22//-----------------------------------------------------------------------------
29
30
31#ifndef GENAPI_AUTOVECTOR_H
32#define GENAPI_AUTOVECTOR_H
33
34#include <vector>
35#include <Base/GCTypes.h>
36#include <GenApi/GenApiDll.h>
37
38#if defined (_WIN32)
39 typedef long ATOMIC_VARIABLE;
40#elif (defined(__GNUC__) && (defined (__linux__)) || defined (__APPLE__)) || defined(VXWORKS)
41 typedef uint32_t ATOMIC_VARIABLE;
42#else
43# error Unsupported platform
44#endif
45
46namespace GENAPI_NAMESPACE
47{
52 class GENAPI_DECL int64_autovector_t
53 {
54 public:
55 explicit int64_autovector_t();
57 explicit int64_autovector_t( size_t n );
58 virtual ~int64_autovector_t( void );
59
61
62 int64_t& operator[]( size_t uiIndex );
63 const int64_t& operator[]( size_t uiIndex ) const;
64 size_t size( void ) const;
65 protected:
66 std::vector<int64_t>* _pv;
67 ATOMIC_VARIABLE* _pCount;
68 };
69
74 class GENAPI_DECL double_autovector_t
75 {
76 public:
77 explicit double_autovector_t();
79 explicit double_autovector_t( size_t n );
80 virtual ~double_autovector_t( void );
81
83
84 double& operator[]( size_t uiIndex );
85 const double& operator[]( size_t uiIndex ) const;
86 size_t size( void )const;
87 protected:
88 std::vector<double>* _pv;
89 ATOMIC_VARIABLE* _pCount;
90 };
91}
92
93#endif // GENAPI_AUTOVECTOR_H
Platform-dependent type definitions.
declspec's to be used for GenApi Windows dll
virtual IBoolean & operator=(bool Value)
Set node value.
Definition IBoolean.h:62
Vector of doubles with reference counting.
Definition Autovector.h:75
Vector of integers with reference counting.
Definition Autovector.h:53