AGX Dynamics  2.37.3.2
LocalVector.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGX_LOCALVECTOR_H
18 #define AGX_LOCALVECTOR_H
19 
20 #include <agx/Vector.h>
22 
23 #include <agxData/Type.h>
24 
25 
26 namespace agxData
27 {
42  template <typename T>
43  class LocalVector : public agx::VectorPOD<T, agx::ThreadLocalAllocator>
44  {
45  public:
46  LocalVector();
47  LocalVector(size_t size, const T& value = T());
48  LocalVector(const LocalVector<T>& other);
49  LocalVector(LocalVector<T>&& other);
50  };
51 
52 
53  /* Implementation */
54 
55 
56  template <typename T>
58  : agx::VectorPOD<T, agx::ThreadLocalAllocator>()
59  {
60  }
61 
62  template <typename T>
63  AGX_FORCE_INLINE LocalVector<T>::LocalVector(size_t size, const T& value)
64  : agx::VectorPOD<T, agx::ThreadLocalAllocator>(size, value)
65  {
66  }
67 
68  template <typename T>
70  : agx::VectorPOD<T, agx::ThreadLocalAllocator>(other)
71  {
72  }
73 
74  template <typename T>
76  : agx::VectorPOD<T, agx::ThreadLocalAllocator>(std::move(other))
77  {
78  }
79 }
80 
81 
83 
84 #endif /* AGX_LOCALVECTOR_H */
VectorPOD(const agx::ThreadLocalAllocator &allocator=agx::ThreadLocalAllocator())
Definition: Vector.h:1093
STL namespace.
#define AGX_FORCE_INLINE
Definition: Object.h:59
Vector containing &#39;raw&#39; data.
Definition: Vector.h:245
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Contains classes for low level data storage for AGX.
Definition: Container.h:23
#define AGX_TEMPLATED_TYPE_BINDING(_Type, _Name)
Definition: Type.h:192
size_t size() const
Definition: Container.h:134
Local scope vector.
Definition: LocalVector.h:43