OpenMW
apps/opencs/model/world/scriptcontext.hpp
Go to the documentation of this file.
00001 #ifndef CSM_WORLD_SCRIPTCONTEXT_H
00002 #define CSM_WORLD_SCRIPTCONTEXT_H
00003 
00004 #include <string>
00005 #include <vector>
00006 
00007 #include <components/compiler/context.hpp>
00008 
00009 namespace CSMWorld
00010 {
00011     class Data;
00012 
00013     class ScriptContext : public Compiler::Context
00014     {
00015             const Data& mData;
00016             mutable std::vector<std::string> mIds;
00017             mutable bool mIdsUpdated;
00018 
00019         public:
00020 
00021             ScriptContext (const Data& data);
00022 
00023             virtual bool canDeclareLocals() const;
00025 
00026             virtual char getGlobalType (const std::string& name) const;
00028 
00029             virtual char getMemberType (const std::string& name, const std::string& id) const;
00031 
00032             virtual bool isId (const std::string& name) const;
00034 
00035             void invalidateIds();
00036     };
00037 }
00038 
00039 #endif