diff options
author | Joseph Powers <jpowers27@cox.net> | 2011-01-22 19:50:28 -0800 |
---|---|---|
committer | Joseph Powers <jpowers27@cox.net> | 2011-01-22 19:50:28 -0800 |
commit | 6d6ff5db3399667b2d110dfdae0109977760c0a4 (patch) | |
tree | 7de94c1db7470884fb1ab74b254831ad89a4481e /l10ntools/inc/cfgmerge.hxx | |
parent | 5759fc6c7cc428c319de95e4702ecda9afd2b085 (diff) |
Remove DECLARE_LIST( CfgStackList, CfgStackData* )
Diffstat (limited to 'l10ntools/inc/cfgmerge.hxx')
-rw-r--r-- | l10ntools/inc/cfgmerge.hxx | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/l10ntools/inc/cfgmerge.hxx b/l10ntools/inc/cfgmerge.hxx index 2416cc5d2c69..62dd70c43f5d 100644 --- a/l10ntools/inc/cfgmerge.hxx +++ b/l10ntools/inc/cfgmerge.hxx @@ -32,6 +32,7 @@ #include <tools/string.hxx> #include <tools/list.hxx> #include <hash_map> +#include <vector> typedef std::hash_map<ByteString , ByteString , hashByteString,equalByteString> ByteStringHashMap; @@ -69,21 +70,32 @@ public: // class CfgStack // -DECLARE_LIST( CfgStackList, CfgStackData * ) +typedef ::std::vector< CfgStackData* > CfgStackList; -class CfgStack : public CfgStackList +class CfgStack { +private: + CfgStackList maList; + public: - CfgStack() : CfgStackList( 10, 10 ) {} + CfgStack() {} ~CfgStack(); - ULONG Push( CfgStackData *pStackData ); + size_t Push( CfgStackData *pStackData ); CfgStackData *Push( const ByteString &rTag, const ByteString &rId ); - CfgStackData *Pop() { return Remove( Count() - 1 ); } + CfgStackData *Pop() + { + if ( maList.empty() ) return NULL; + CfgStackData* temp = maList.back(); + maList.pop_back(); + return temp; + } + + CfgStackData *GetStackData( size_t nPos = LIST_APPEND ); - CfgStackData *GetStackData( ULONG nPos = LIST_APPEND ); + ByteString GetAccessPath( size_t nPos = LIST_APPEND ); - ByteString GetAccessPath( ULONG nPos = LIST_APPEND ); + size_t size() const { return maList.size(); } }; // |