Progress
This commit is contained in:
@ -12,6 +12,9 @@ std::vector<std::string> UIGen::getRequiredFlags() {
|
||||
}
|
||||
|
||||
int32_t UIGen::start() {
|
||||
std::cout << "UI Gen tool is basically unfinished unfortunately" << std::endl;
|
||||
return 1;
|
||||
|
||||
// Open input file.
|
||||
File file(flags["input"]);
|
||||
std::string buffer;
|
||||
@ -31,27 +34,27 @@ int32_t UIGen::start() {
|
||||
return ret;
|
||||
}
|
||||
|
||||
// std::vector<std::string> lines;
|
||||
// RootGen::generate(&lines, &info, "");
|
||||
std::vector<std::string> lines;
|
||||
RootGen::generate(&lines, &info, "");
|
||||
|
||||
// // Generate buffer
|
||||
// std::string bufferOut;
|
||||
// auto itLine = lines.begin();
|
||||
// while(itLine != lines.end()) {
|
||||
// bufferOut += *itLine + "\n";
|
||||
// ++itLine;
|
||||
// }
|
||||
// Generate buffer
|
||||
std::string bufferOut;
|
||||
auto itLine = lines.begin();
|
||||
while(itLine != lines.end()) {
|
||||
bufferOut += *itLine + "\n";
|
||||
++itLine;
|
||||
}
|
||||
|
||||
// // Finished with XML data, now we can write data out.
|
||||
// Finished with XML data, now we can write data out.
|
||||
File fileOut(flags["output"] + ".hpp");
|
||||
if(!fileOut.mkdirp()) {
|
||||
std::cout << "Failed to make ui output dir" << std::endl;
|
||||
std::cout << "Failed to make scene output dir" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
if(!fileOut.writeString(bufferOut)) {
|
||||
std::cout << "Failed to generate scene " << fileOut.filename << std::endl;
|
||||
return 1;
|
||||
}
|
||||
// if(!fileOut.writeString(bufferOut)) {
|
||||
// std::cout << "Failed to generate scene " << fileOut.filename << std::endl;
|
||||
// return 1;
|
||||
// }
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user