hawxgamer

Untitled

Nov 25th, 2013
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.38 KB | None | 0 0
  1.  
  2.  
  3. #ifndef IECSYMBOLFACTORY_CLASS_H
  4. #define IECSYMBOLFACTORY_CLASS_H
  5.  
  6. #include <iostream>
  7. #include "parserfactory.h"
  8. #include "Type.h"
  9. #include "IECType.h"
  10. #include "JavaType.h"
  11. #include "IECvariable.h"
  12.  
  13. static std::string const IECTypeName="TYPE";
  14. static std::string const IECVarName="VAR";
  15. static std::string const IECTypefile = "IECTypes.sym";
  16. static std::string const IECVarfile = "IECVars.sym";
  17.  
  18.  
  19. class IECSymbolFactory: public parserfactory
  20. {
  21. public:
  22.  
  23.  
  24.     //free IECSymbolFactory instance
  25.     static void Delete();
  26.     //create IECSymbolFactory instance
  27.     static IECSymbolFactory& GetInstance();
  28.  
  29.     virtual Type* CreateType(std::string const& type);
  30.     virtual variable* CreateVariable(std::string const& name,Type* type);
  31.  
  32.     virtual std::string const& GetTypefile() const;
  33.     virtual std::string const& GetVarfile() const;
  34.  
  35.     // Check grammar for read type
  36.     virtual std::string const CheckType(std::string const& typeline);
  37.  
  38.     virtual TVariable const CheckVar(std::string const & typeline);
  39. private:
  40.  
  41.     //hide other CTors and assign operator
  42.     IECSymbolFactory();
  43.     virtual ~IECSymbolFactory(){};
  44.     IECSymbolFactory(const IECSymbolFactory & cIECSymbolFactory){};
  45.     IECSymbolFactory& operator= (IECSymbolFactory const & iecsymbolfactory){};
  46.  
  47.  
  48.     //pointer to IECSymbolFactory instance
  49.     static IECSymbolFactory *mInstance;
  50.     std::string mTypefile;
  51.     std::string mVarfile;
  52. };
  53.  
  54. #endif
Advertisement
Add Comment
Please, Sign In to add comment