GLI  0.5.1
shared_array.hpp
Go to the documentation of this file.
1 
29 #ifndef GLI_SHARED_ARRAY_INCLUDED
30 #define GLI_SHARED_ARRAY_INCLUDED
31 
32 namespace gli
33 {
34  template <typename T>
36  {
37  public:
38  shared_array();
39  shared_array(shared_array const & SharedArray);
40  shared_array(T * Pointer);
41  virtual ~shared_array();
42 
43  void reset();
44  void reset(T * Pointer);
45 
46  T & operator*();
47  T * operator->();
48  T const & operator*() const;
49  T const * const operator->() const;
50 
51  T * get();
52  T const * const get() const;
53 
54  shared_array & operator=(shared_array const & SharedArray);
55  bool operator==(shared_array const & SharedArray) const;
56  bool operator!=(shared_array const & SharedArray) const;
57 
58  private:
59  long * Counter;
60  T * Pointer;
61  };
62 }//namespace gli
63 
64 #include "shared_array.inl"
65 
66 #endif //GLI_SHARED_ARRAY_INCLUDED
virtual ~shared_array()
bool operator!=(shared_array const &SharedArray) const
shared_array & operator=(shared_array const &SharedArray)
bool operator==(shared_array const &SharedArray) const