CARMA C++
ArrayMapBase.h
Go to the documentation of this file.
1 #ifndef SZA_UTIL_ARRAYMAPBASE_H
2 #define SZA_UTIL_ARRAYMAPBASE_H
3 
11 #include "carma/szaarrayutils/szaregs.h"
12 
13 namespace sza {
14  namespace util {
15 
16  // An object which any class needing a copy of the SZA Array map
17  // should instantiate. This class manages a single static copy of
18  // the SZA array map, which is allocated on the first construction
19  // of this class, and deleted only when the last reference to any
20  // such object is deleted.
21 
22  class ArrayMapBase {
23  public:
24 
28  ArrayMapBase();
29 
33  ArrayMapBase(ArrayMapBase& arrayMap);
34 
38  virtual ~ArrayMapBase();
39 
43  inline SzaArrayMap* arrayMap() {
44  return arrayMap_;
45  }
46 
47  private:
48 
49  // The underlying array map object
50 
51  static SzaArrayMap* arrayMap_;
52 
53  // A reference count
54 
55  static unsigned refCount_;
56 
57  }; // End class ArrayMapBase
58 
59  } // End namespace util
60 } // End namespace sza
61 
62 
63 
64 #endif // End #ifndef SZA_UTIL_ARRAYMAPBASE_H