diff options
Diffstat (limited to 'l10ntools/inc')
-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(); } }; // |