VR-Forces 4.0.4 Class Documentation
include/vrfutil/stringReplacementTable.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2000 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: stringReplacementTable.h,v $ $Revision: 1.3 $ $State: Exp $
00007 *******************************************************************************/
00008 #ifndef DtStringReplacementTable_H_
00009 #define DtStringReplacementTable_H_
00010 #include "vrfutil/vrfutilDefines.h"
00011 
00014 
00015 #include "vrfutil/scenarioMergeProject.h"
00016 
00018 #include <map>
00019 
00021 #include <vlutil/vlFilename.h>
00022 
00027 class DT_DLL_vrfutil DtStringReplacementTable
00028 {
00029 public:
00030    
00035    typedef std::map<DtString, DtString > ReplacementMap;
00036    typedef ReplacementMap::iterator Iterator;
00037    typedef ReplacementMap::const_iterator const_Iterator;
00038 
00039 public:
00040 
00042    DtStringReplacementTable();
00043 
00045    virtual ~DtStringReplacementTable();
00046 
00048    DtStringReplacementTable(
00049       const DtStringReplacementTable& orig);
00050 
00052    DtStringReplacementTable& operator=(
00053       const DtStringReplacementTable& orig);
00054 
00055 public:
00056 
00062    virtual void add(const DtString& toFind,
00063       const DtString& replaceWith);
00064 
00065    virtual DtStringReplacementTable::const_Iterator begin() const;
00066 
00067    virtual void clear();
00068 
00069    virtual DtStringReplacementTable::const_Iterator end() const;
00070 
00071    virtual const DtFilename& filename() const;
00072    virtual void setFilename(const DtFilename& fn);
00073 
00079    virtual const DtString& findReplacementFor(
00080       const DtString& sToFind);
00081 
00082    virtual bool readFile();
00083    virtual bool readFile(const DtFilename& fn);
00084 
00085    virtual void remove(const DtString& toFind);
00086 
00087 protected:
00088 
00089 
00090 protected:
00091 
00092 
00093 protected:
00094    
00095    DtFilename     myFilename;
00096    ReplacementMap myReplacementMap;
00097 
00098 };
00099 
00100 #endif
00101 

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)