X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=tool%2Ftool.h;h=0333c0d8845594e51e11a25efe23515cff10cd6f;hb=HEAD;hp=99e8297770ef9fd6cfd6a6e12c0f9cf0a2e680c4;hpb=db9c49893c2a9475cb5efa4a53bc481a5f66231f;p=libs%2Fdatafile.git diff --git a/tool/tool.h b/tool/tool.h index 99e8297..354456c 100644 --- a/tool/tool.h +++ b/tool/tool.h @@ -1,22 +1,41 @@ -/* $Id$ - -This file is part of libmspdatafile -Copyright © 2008 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ +#ifndef TOOL_H_ +#define TOOL_H_ #include #include +#include -class DataTool: public Msp::Application +class DataTool: public Msp::RegisteredApplication { private: - std::string in_fn; + std::list in_fns; std::string out_fn; bool binary; + bool compile; + unsigned float_size; + bool compress; + bool pack; + bool unpack; + bool builtin; + std::string builtin_ns; + std::string builtin_module; + bool debug; + public: DataTool(int argc, char **argv); - int main(); - static Application::RegApp reg; + virtual int main(); +private: + void do_transfer(); + void do_compile(); + void do_pack(); + void do_unpack(); + void do_generate_builtin(); + Msp::IO::Base *open_output(const std::string &); + Msp::IO::Base *open_input(const std::string &); +public: + bool is_compressed() const { return compress; } + Msp::DataFile::Writer *create_writer(Msp::IO::Base &); }; + +#endif