#include <arser/arser.h>
#include <foder/FileLoader.h>
#include <circledump/Dump.h>
#include <iostream>
Go to the source code of this file.
|
int | entry (int argc, char **argv) |
|
◆ entry()
int entry |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 23 of file Driver.cpp.
24{
26 arser.add_argument(
"circle").help(
"Circle file path to dump");
27
28 try
29 {
30 arser.parse(argc, argv);
31 }
32 catch (const std::runtime_error &err)
33 {
34 std::cout << err.what() << '\n';
36 return 255;
37 }
38
39 std::string circle_path =
arser.get<std::string>(
"circle");
40
42 std::vector<char> modelData = fileLoader.
load();
43 const circle::Model *circlemodel = circle::GetModel(modelData.data());
44
45 if (circlemodel == nullptr)
46 {
47 std::cerr << "ERROR: Failed to load circle '" << circle_path << "'" << std::endl;
48 return 255;
49 }
50
51 std::cout << "Dump: " << circle_path << std::endl << std::endl;
52
54 modelex.
model = circlemodel;
56
57 std::cout << modelex << std::endl;
58
59 return 0;
60}
DataBuffer load(void) const
const circle::Model * model
const std::vector< char > * rawdata
References foder::FileLoader::load(), circledump::ModelEx::model, and circledump::ModelEx::rawdata.