Go to the documentation of this file.
19 using namespace faudes;
25 std::cout << "fts2ftx: " << message << std::endl;
26 std::cout << "" << std::endl;
29 std::cout << "fts2ftx: version" << VersionString() << std::endl;
30 std::cout << "" << std::endl;
31 std::cout << "usage: fts2ftx [-t <ftype>] [-l <label>] [-o <outfile>] <infile>" << std::endl;
32 std::cout << "where " << std::endl;
33 std::cout << " <infile>: faudes token stream to convert" << std::endl;
34 std::cout << "" << std::endl;
35 std::cout << " -t <ftype>: faudes type of infile" << std::endl;
36 std::cout << " -l <label>: section label to read (defaults to entire file)" << std::endl;
37 std::cout << " -o <outfile>: file to write (defaults to infile with .ftx suffix)" << std::endl;
38 std::cout << "" << std::endl;
60 int main( int argc, char *argv[]) {
73 for( int i=1; i<argc; i++) {
74 std::string option(argv[i]);
76 if((option== "-t") || (option== "--ftype")) {
82 if((option== "-l") || (option== "--lable")) {
88 if((option== "-o") || (option== "--outfile")) {
94 if((option== "-v") || (option== "--verify")) {
109 if((option== "-?") || (option== "--help")) {
114 if(option.c_str()[0]== '-') {
120 usage_exit( "more than one filname specified");
131 if(basename.find_last_of( ".") !=std::string::npos) {
132 basename.resize(basename.find_last_of( "."));
135 mOutFile= basename+ ".ftx";
140 fobject-> Read(mInFile,mLabel);
144 std::cout << "fts2ftx: reporting faudes object of type " << mType << " (id " << typeid(*fobject).name() << ")" << std::endl;
155 fobject-> XWrite(mOutFile);
161 std::cout << "fts2ftx: reading back ftx output" << std::endl;
162 Type* readback = fobject-> New();
163 readback-> Read(mOutFile);
164 if(!(*fobject==*readback))
165 std::cout << "fts2ftx: warning: objects dont match (!)" << std::endl;
libFAUDES 2.26g
--- 2015.08.17
--- c++ api documentaion by doxygen
|