00001
00019 #ifndef INC_SPATMOD_IMAGESTAGEARRAY_H
00020 #define INC_SPATMOD_IMAGESTAGEARRAY_H
00021
00022 namespace SPATMOD {
00023 namespace IMAGE {
00024
00025 class STAGE;
00026 class STAGE_AUTOPTR;
00027
00028
00029
00032 class STAGE_ARRAY {
00033 public:
00034
00036 STAGE_ARRAY (
00037 ) : m_array(0), m_numitems(0) { }
00038
00040 explicit STAGE_ARRAY (
00041 unsigned numitems
00042 );
00043
00045 ~STAGE_ARRAY ();
00046
00048 const STAGE_AUTOPTR& operator[] (
00049 unsigned idx
00050 ) const;
00051
00053 STAGE_AUTOPTR& operator[] (
00054 unsigned idx
00055 );
00056
00058 void Append (
00059 STAGE* pStage,
00060 bool TakeOwnership
00061 );
00062
00064 void Append (
00065 STAGE_AUTOPTR& StagePtr,
00066 bool TakeOwnership
00067 );
00068
00070 void Assign (
00071 STAGE_ARRAY& source,
00072 bool TakeOwnership
00073 );
00074
00076 void Clear (
00077 );
00078
00080 unsigned GetNumItems (
00081 ) const { return (m_numitems); }
00082
00084 void SetItem (
00085 unsigned index,
00086 STAGE* pStage,
00087 bool TakeOwnership
00088 );
00089
00091 void SetItem (
00092 unsigned index,
00093 STAGE_AUTOPTR& StagePtr,
00094 bool TakeOwnership
00095 );
00096
00097 private:
00098 #ifndef GENERATING_DOXYGEN_OUTPUT
00099 STAGE_AUTOPTR *m_array;
00100 unsigned m_numitems;
00101
00102 STAGE_ARRAY (const STAGE_ARRAY&);
00103 STAGE_ARRAY& operator= (const STAGE_ARRAY&);
00104 #endif // GENERATING_DOXYGEN_OUTPUT
00105 };
00106
00107
00108
00109 }
00110 }
00111
00112 #endif // INC_SPATMOD_IMAGESTAGEARRAY_H