Changeset 11054 for code/branches/cpp11_v3/src/libraries/core/LuaState.h
- Timestamp:
- Jan 10, 2016, 1:54:11 PM (9 years ago)
- Location:
- code/branches/cpp11_v3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v3
- Property svn:mergeinfo changed
-
code/branches/cpp11_v3/src/libraries/core/LuaState.h
r10265 r11054 47 47 #include <string> 48 48 #include <vector> 49 #include < boost/shared_ptr.hpp>49 #include <memory> 50 50 51 51 #include "util/Output.h" … … 79 79 80 80 bool doFile(const std::string& filename); // tolua_export 81 bool doString(const std::string& code, const s hared_ptr<ResourceInfo>& sourceFileInfo =shared_ptr<ResourceInfo>());81 bool doString(const std::string& code, const std::shared_ptr<ResourceInfo>& sourceFileInfo = std::shared_ptr<ResourceInfo>()); 82 82 83 83 bool includeFile(const std::string& filename); // tolua_export 84 bool includeString(const std::string& code, const s hared_ptr<ResourceInfo>& sourceFileInfo =shared_ptr<ResourceInfo>());84 bool includeString(const std::string& code, const std::shared_ptr<ResourceInfo>& sourceFileInfo = std::shared_ptr<ResourceInfo>()); 85 85 86 86 void luaPrint(const std::string& str); // tolua_export … … 94 94 void clearOutput() { output_.clear(); } // tolua_export 95 95 96 void setTraceMap(s hared_ptr<std::vector<std::vector<std::pair<std::string, size_t> > >> map)97 { map-> push_back(std::vector<std::pair<std::string, size_t> >()); lineTrace_ = map; }96 void setTraceMap(std::shared_ptr<std::vector<std::vector<std::pair<std::string, size_t>>>> map) 97 { map->emplace_back(); lineTrace_ = map; } 98 98 99 99 void setIncludeParser(std::string (*function)(const std::string&)) { includeParseFunction_ = function; } 100 100 lua_State* getInternalLuaState() { return luaState_; } 101 101 102 void setDefaultResourceInfo(const s hared_ptr<ResourceInfo>& sourceFileInfo) { this->sourceFileInfo_ = sourceFileInfo; }103 const s hared_ptr<ResourceInfo>& getDefaultResourceInfo() { return this->sourceFileInfo_; }102 void setDefaultResourceInfo(const std::shared_ptr<ResourceInfo>& sourceFileInfo) { this->sourceFileInfo_ = sourceFileInfo; } 103 const std::shared_ptr<ResourceInfo>& getDefaultResourceInfo() { return this->sourceFileInfo_; } 104 104 105 105 LuaFunctor* createLuaFunctor(const std::string& code) { return new LuaFunctor(code, this); } // tolua_export … … 115 115 116 116 private: 117 s hared_ptr<ResourceInfo> getFileInfo(const std::string& filename);118 s hared_ptr<std::vector<std::vector<std::pair<std::string, size_t> > >> lineTrace_;117 std::shared_ptr<ResourceInfo> getFileInfo(const std::string& filename); 118 std::shared_ptr<std::vector<std::vector<std::pair<std::string, size_t>>>> lineTrace_; 119 119 120 120 std::stringstream output_; 121 121 lua_State* luaState_; 122 122 bool bIsRunning_; 123 s hared_ptr<ResourceInfo> sourceFileInfo_;123 std::shared_ptr<ResourceInfo> sourceFileInfo_; 124 124 std::map<std::string, std::string> sourceCodeMap_; 125 125 std::string (*includeParseFunction_)(const std::string&);
Note: See TracChangeset
for help on using the changeset viewer.