diff options
author | Joseph Powers <jpowers27@cox.net> | 2011-01-24 20:30:49 -0800 |
---|---|---|
committer | Joseph Powers <jpowers27@cox.net> | 2011-01-24 20:30:49 -0800 |
commit | fa5ddda2406ec23d88dd38f59b80c4463fbbc873 (patch) | |
tree | 5cf8f5d7fcb0a7e1d1e8ff61f2fd6b57e05d1913 /rsc/inc | |
parent | 5772e5eca11eff0b5fdf7415d57590da04bfd257 (diff) |
Remove DECLARE_LIST( RscSubDefList, RscDefine * )
Diffstat (limited to 'rsc/inc')
-rw-r--r-- | rsc/inc/rscdef.hxx | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/rsc/inc/rscdef.hxx b/rsc/inc/rscdef.hxx index 993a54e2c4e9..7a8cf52b4017 100644 --- a/rsc/inc/rscdef.hxx +++ b/rsc/inc/rscdef.hxx @@ -30,6 +30,7 @@ #include <tools/unqidx.hxx> #include <rsctree.hxx> +#include <vector> /****************** C L A S S E S ****************************************/ class RscExpression; @@ -152,21 +153,28 @@ public: ByteString GetMacro(); }; -DECLARE_LIST( RscSubDefList, RscDefine * ) +typedef ::std::vector< RscDefine* > RscSubDefList; -class RscDefineList : public RscSubDefList { +class RscDefineList { friend class RscFile; friend class RscFileTab; private: + RscSubDefList maList; // pExpression wird auf jedenfall Eigentum der Liste RscDefine * New( ULONG lFileKey, const ByteString & rDefName, - INT32 lDefId, ULONG lPos ); + INT32 lDefId, size_t lPos ); RscDefine * New( ULONG lFileKey, const ByteString & rDefName, - RscExpression * pExpression, ULONG lPos ); + RscExpression * pExpression, size_t lPos ); BOOL Befor( const RscDefine * pFree, const RscDefine * pDepend ); BOOL Remove( RscDefine * pDef ); - BOOL Remove( ULONG nIndex ); + BOOL Remove( size_t nIndex ); BOOL Remove(); + size_t GetPos( RscDefine* item ) { + for ( size_t i = 0, n = maList.size(); i < n; ++i ) + if ( maList[ i ] == item ) + return i; + return size_t(-1); + } public: void WriteAll( FILE * fOutput ); }; @@ -244,9 +252,9 @@ public: RscDefine * FindDef( ULONG lKey, const ByteString & ); BOOL Depend( ULONG lDepend, ULONG lFree ); - BOOL TestDef( ULONG lFileKey, ULONG lPos, + BOOL TestDef( ULONG lFileKey, size_t lPos, const RscDefine * pDefDec ); - BOOL TestDef( ULONG lFileKey, ULONG lPos, + BOOL TestDef( ULONG lFileKey, size_t lPos, const RscExpression * pExpDec ); RscDefine * NewDef( ULONG lKey, const ByteString & rDefName, |