 |
Gorgon Game Engine
|
Go to the documentation of this file.
9 #include "../Scripting.h"
11 namespace Gorgon {
namespace Scripting {
42 virtual bool ReadLine(std::string &,
bool newline) = 0;
74 virtual bool ReadLine(std::string &input,
bool newline)
override final {
76 std::cout<<std::setw(3)<<line<<prompt;
78 return bool(std::getline(std::cin, input));
92 throw std::runtime_error(
"Cannot accept binary code from the console");
108 virtual bool ReadLine(std::string &input,
bool)
override final {
109 return bool(std::getline(stream,input));
117 std::istream &stream;
124 auto loc=filename.find_last_of(
'.');
126 if(loc!=filename.npos)
127 ext=filename.substr(loc);
132 if(ext.length()>=3 && ext.substr(0,3)==
"gsb") {
135 else if(ext.length()>=3 && ext.substr(0,3)==
"gsc") {
138 else if(ext.length()>=3 && ext.substr(0,3)==
"gsi") {
146 if(!file.is_open()) {
147 throw std::runtime_error(
"Cannot open file");
Root namespace for Gorgon Game Engine.
Definition: Any.h:19