├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── COPYING.txt ├── README.md ├── lib └── tclap-1.2.2 │ ├── AUTHORS │ ├── COPYING │ ├── ChangeLog │ ├── INSTALL │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ ├── NEWS │ ├── README │ ├── aclocal.m4 │ ├── config.log │ ├── config.status │ ├── config │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ ├── ac_cxx_have_long_long.m4 │ ├── ac_cxx_have_sstream.m4 │ ├── ac_cxx_have_strstream.m4 │ ├── ac_cxx_namespaces.m4 │ ├── ac_cxx_warn_effective_cxx.m4 │ ├── bb_enable_doxygen.m4 │ ├── config.h │ ├── config.h.in │ ├── depcomp │ ├── install-sh │ ├── missing │ ├── mkinstalldirs │ ├── stamp-h1 │ └── test-driver │ ├── configure │ ├── configure.in │ ├── docs │ ├── Doxyfile │ ├── Doxyfile.in │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── index.html │ ├── manual.html │ ├── manual.xml │ └── style.css │ ├── examples │ ├── .deps │ │ ├── test1.Po │ │ ├── test10.Po │ │ ├── test11.Po │ │ ├── test12.Po │ │ ├── test13.Po │ │ ├── test14.Po │ │ ├── test15.Po │ │ ├── test16.Po │ │ ├── test17-a.Po │ │ ├── test17.Po │ │ ├── test18.Po │ │ ├── test19.Po │ │ ├── test2.Po │ │ ├── test20.Po │ │ ├── test21.Po │ │ ├── test3.Po │ │ ├── test4.Po │ │ ├── test5.Po │ │ ├── test6.Po │ │ ├── test7.Po │ │ ├── test8.Po │ │ └── test9.Po │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ ├── test1 │ ├── test1.cpp │ ├── test1.o │ ├── test10 │ ├── test10.cpp │ ├── test10.o │ ├── test11 │ ├── test11.cpp │ ├── test11.o │ ├── test12 │ ├── test12.cpp │ ├── test12.o │ ├── test13 │ ├── test13.cpp │ ├── test13.o │ ├── test14 │ ├── test14.cpp │ ├── test14.o │ ├── test15 │ ├── test15.cpp │ ├── test15.o │ ├── test16 │ ├── test16.cpp │ ├── test16.o │ ├── test17 │ ├── test17-a.cpp │ ├── test17-a.o │ ├── test17.cpp │ ├── test17.o │ ├── test18 │ ├── test18.cpp │ ├── test18.o │ ├── test19 │ ├── test19.cpp │ ├── test19.o │ ├── test2 │ ├── test2.cpp │ ├── test2.o │ ├── test20 │ ├── test20.cpp │ ├── test20.o │ ├── test21 │ ├── test21.cpp │ ├── test21.o │ ├── test3 │ ├── test3.cpp │ ├── test3.o │ ├── test4 │ ├── test4.cpp │ ├── test4.o │ ├── test5 │ ├── test5.cpp │ ├── test5.o │ ├── test6 │ ├── test6.cpp │ ├── test6.o │ ├── test7 │ ├── test7.cpp │ ├── test7.o │ ├── test8 │ ├── test8.cpp │ ├── test8.o │ ├── test9 │ ├── test9.cpp │ └── test9.o │ ├── include │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ └── tclap │ │ ├── Arg.h │ │ ├── ArgException.h │ │ ├── ArgTraits.h │ │ ├── CmdLine.h │ │ ├── CmdLineInterface.h │ │ ├── CmdLineOutput.h │ │ ├── Constraint.h │ │ ├── DocBookOutput.h │ │ ├── HelpVisitor.h │ │ ├── IgnoreRestVisitor.h │ │ ├── Makefile │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── MultiArg.h │ │ ├── MultiSwitchArg.h │ │ ├── OptionalUnlabeledTracker.h │ │ ├── StandardTraits.h │ │ ├── StdOutput.h │ │ ├── SwitchArg.h │ │ ├── UnlabeledMultiArg.h │ │ ├── UnlabeledValueArg.h │ │ ├── ValueArg.h │ │ ├── ValuesConstraint.h │ │ ├── VersionVisitor.h │ │ ├── Visitor.h │ │ ├── XorHandler.h │ │ ├── ZshCompletionOutput.h │ │ └── sstream.h │ ├── msc │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── examples │ │ ├── Makefile │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── test1.vcproj │ │ ├── test2.vcproj │ │ ├── test3.vcproj │ │ ├── test4.vcproj │ │ ├── test5.vcproj │ │ ├── test6.vcproj │ │ ├── test7.vcproj │ │ └── test8.vcproj │ ├── tclap-beta.ncb │ ├── tclap-beta.sln │ ├── tclap-beta.suo │ └── tclap-beta.vcproj │ ├── tclap.pc │ ├── tclap.pc.in │ └── tests │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ ├── test1.out │ ├── test1.sh │ ├── test10.out │ ├── test10.sh │ ├── test11.out │ ├── test11.sh │ ├── test12.out │ ├── test12.sh │ ├── test13.out │ ├── test13.sh │ ├── test14.out │ ├── test14.sh │ ├── test15.out │ ├── test15.sh │ ├── test16.out │ ├── test16.sh │ ├── test17.out │ ├── test17.sh │ ├── test18.out │ ├── test18.sh │ ├── test19.out │ ├── test19.sh │ ├── test2.out │ ├── test2.sh │ ├── test20.out │ ├── test20.sh │ ├── test21.out │ ├── test21.sh │ ├── test22.out │ ├── test22.sh │ ├── test23.out │ ├── test23.sh │ ├── test24.out │ ├── test24.sh │ ├── test25.out │ ├── test25.sh │ ├── test26.out │ ├── test26.sh │ ├── test27.out │ ├── test27.sh │ ├── test28.out │ ├── test28.sh │ ├── test29.out │ ├── test29.sh │ ├── test3.out │ ├── test3.sh │ ├── test30.out │ ├── test30.sh │ ├── test31.out │ ├── test31.sh │ ├── test32.out │ ├── test32.sh │ ├── test33.out │ ├── test33.sh │ ├── test34.out │ ├── test34.sh │ ├── test35.out │ ├── test35.sh │ ├── test36.out │ ├── test36.sh │ ├── test37.out │ ├── test37.sh │ ├── test38.out │ ├── test38.sh │ ├── test39.out │ ├── test39.sh │ ├── test4.out │ ├── test4.sh │ ├── test40.out │ ├── test40.sh │ ├── test41.out │ ├── test41.sh │ ├── test42.out │ ├── test42.sh │ ├── test43.out │ ├── test43.sh │ ├── test44.out │ ├── test44.sh │ ├── test45.out │ ├── test45.sh │ ├── test46.out │ ├── test46.sh │ ├── test47.out │ ├── test47.sh │ ├── test48.out │ ├── test48.sh │ ├── test49.out │ ├── test49.sh │ ├── test5.out │ ├── test5.sh │ ├── test50.out │ ├── test50.sh │ ├── test51.out │ ├── test51.sh │ ├── test52.out │ ├── test52.sh │ ├── test53.out │ ├── test53.sh │ ├── test54.out │ ├── test54.sh │ ├── test55.out │ ├── test55.sh │ ├── test56.out │ ├── test56.sh │ ├── test57.out │ ├── test57.sh │ ├── test58.out │ ├── test58.sh │ ├── test59.out │ ├── test59.sh │ ├── test6.out │ ├── test6.sh │ ├── test60.out │ ├── test60.sh │ ├── test61.out │ ├── test61.sh │ ├── test62.out │ ├── test62.sh │ ├── test63.out │ ├── test63.sh │ ├── test64.out │ ├── test64.sh │ ├── test65.out │ ├── test65.sh │ ├── test66.out │ ├── test66.sh │ ├── test67.out │ ├── test67.sh │ ├── test68.out │ ├── test68.sh │ ├── test69.out │ ├── test69.sh │ ├── test7.out │ ├── test7.sh │ ├── test70.out │ ├── test70.sh │ ├── test71.out │ ├── test71.sh │ ├── test72.out │ ├── test72.sh │ ├── test73.out │ ├── test73.sh │ ├── test74.out │ ├── test74.sh │ ├── test75.out │ ├── test75.sh │ ├── test76.out │ ├── test76.sh │ ├── test77.out │ ├── test77.sh │ ├── test78.out │ ├── test78.sh │ ├── test79.out │ ├── test79.sh │ ├── test8.out │ ├── test8.sh │ ├── test9.out │ └── test9.sh ├── src ├── CMakeLists.txt ├── client │ ├── CMakeLists.txt │ └── srcuml.cpp ├── generator │ ├── CMakeLists.txt │ ├── dot_outputter.hpp │ ├── layout_design.txt │ ├── orig_files │ │ ├── SvgPrinter-PJcpp.txt │ │ ├── SvgPrinter-PJhpp.txt │ │ ├── cft │ │ │ ├── cft.dot │ │ │ ├── cft.hpp │ │ │ ├── cft.hpp.xml │ │ │ ├── cft.svg │ │ │ ├── cft.yuml │ │ │ ├── stereo.hpp.xml │ │ │ └── stereo.xml │ │ ├── cft2 │ │ │ ├── cft2.dot │ │ │ ├── cft2.hpp │ │ │ ├── cft2.hpp.xml │ │ │ └── cft2.yuml │ │ ├── comment2attr.py │ │ ├── stereotype.xsl │ │ ├── stereotype_attr.xsl │ │ └── stereotype_base.xsl │ ├── srcuml_attribute.hpp │ ├── srcuml_class.hpp │ ├── srcuml_dispatcher.hpp │ ├── srcuml_handler.hpp │ ├── srcuml_operation.hpp │ ├── srcuml_outputter.hpp │ ├── srcuml_parameter.hpp │ ├── srcuml_relationship.hpp │ ├── srcuml_type.hpp │ ├── srcuml_utilities.cpp │ ├── srcuml_utilities.hpp │ ├── static_outputter.hpp │ ├── svg_helper.hpp │ ├── svg_multi_outputter.hpp │ ├── svg_outputter.hpp │ ├── svg_printer.cpp │ ├── svg_printer.hpp │ ├── svg_sugiyama_outputter.hpp │ ├── svg_three_outputter.hpp │ ├── test │ │ ├── car_shop │ │ │ ├── car.auto.xml │ │ │ ├── car.manual.xml │ │ │ ├── car.srcml.xml │ │ │ └── src │ │ │ │ ├── a_car.hpp │ │ │ │ ├── customer.hpp │ │ │ │ ├── employee.hpp │ │ │ │ ├── manufacturer.hpp │ │ │ │ ├── part.hpp │ │ │ │ ├── register.hpp │ │ │ │ ├── shop.hpp │ │ │ │ ├── string.hpp │ │ │ │ ├── ui.hpp │ │ │ │ └── wheel.hpp │ │ ├── process.txt │ │ ├── stereotype_files │ │ │ ├── classtype.xsl │ │ │ ├── stereotype.xsl │ │ │ ├── stereotype_attr.xsl │ │ │ └── stereotype_base.xsl │ │ └── test_inherit │ │ │ └── inherit.cpp │ └── yuml_outputter.hpp └── yUML_to_DOT │ ├── srcYUML2graphViz.g4 │ ├── srcYUML2graphViz.py │ ├── srcYUML2graphVizBaseListener.java │ ├── srcYUML2graphViz_old.g4 │ ├── srcYUMLrelay.py │ ├── srcYUMLrelay_Backup.py │ └── test │ ├── class_file_test.dot │ ├── class_file_test.hpp │ ├── class_file_test.hpp.xml │ ├── example_1.hpp │ ├── example_2.hpp │ ├── example_3.hpp │ ├── example_4.hpp │ └── srcgraph └── test ├── CMakeLists.txt ├── driver ├── CMakeLists.txt ├── tester.cpp └── tester.hpp └── suite ├── CMakeLists.txt ├── test_attribute.cpp ├── test_datatype.cpp ├── test_dependencies.cpp ├── test_empty.cpp ├── test_interface.cpp ├── test_numeric.cpp └── test_relationships.cpp /.gitignore: -------------------------------------------------------------------------------- 1 | #Files that should not be commited 2 | srcYUML2graphViz.tokens 3 | srcYUML2graphVizLexer.py 4 | srcYUML2graphVizLexer.pyc 5 | srcYUML2graphVizLexer.tokens 6 | srcYUML2graphVizListener.py 7 | srcYUML2graphVizListener.pyc 8 | srcYUML2graphVizParser.py 9 | srcYUML2graphVizParser.pyc 10 | build/* 11 | research/* 12 | *.pyc 13 | *.png 14 | *.jpg 15 | *.pdf 16 | *.sublime-project 17 | *.sublime-workspace 18 | 19 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ogdf"] 2 | path = ogdf 3 | url = https://github.com/ogdf/ogdf.git 4 | [submodule "srcDispatch"] 5 | path = srcDispatch 6 | url = https://github.com/srcML/srcDispatch.git 7 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ## 2 | # CMakeLists.txt 3 | # 4 | # Copyright (C) 2015-2016 srcML, LLC. (www.srcML.org) 5 | # 6 | # This file is part of srcUML. 7 | # 8 | # srcUML is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | 13 | # srcUML is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | 18 | # You should have received a copy of the GNU General Public License 19 | # along with srcUML. If not, see . 20 | 21 | cmake_minimum_required(VERSION 2.8) 22 | project(srcUML) 23 | 24 | enable_testing() 25 | 26 | #find needed libraries 27 | find_package(LibXml2 REQUIRED) 28 | 29 | find_package(Boost COMPONENTS program_options filesystem system REQUIRED) 30 | 31 | # include needed includes 32 | include_directories(${LIBXML2_INCLUDE_DIR}) 33 | #include_directories(${OGDF}) 34 | add_definitions("-std=c++1y") 35 | # add_definitions("-pthread") 36 | 37 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) 38 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) 39 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) 40 | 41 | add_subdirectory(srcDispatch/CMake) 42 | add_subdirectory(ogdf) 43 | 44 | include_directories(${DISPATCH_INCLUDE_DIR} src/generator test/driver ogdf/include ${CMAKE_BINARY_DIR}/ogdf/include ${Boost_INCLUDE_DIR}) 45 | 46 | add_subdirectory(src) 47 | add_subdirectory(test) 48 | 49 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### srcUML 2 | * A tool for efficiently reverse engineering accurate UML class diagrams. 3 | 4 | ### Cloning 5 | * The project uses srcSAX and srcSAXEventDispatch as submodules. The repo most be cloned with the `--recursive` option to clone the submodules. The following is an example command: 6 | ```bash 7 | git clone --recursive https://github.com/srcML/srcUML.git 8 | ``` 9 | 10 | ### Build 11 | The project utilizes CMake for building. 12 | The following provide examples of how to build. srcuml will be placed in the ./bin directory in all cases. 13 | 14 | ```bash 15 | # in-source build 16 | cmake . 17 | make 18 | 19 | # out-of-source build 20 | mkdir srcuml_build 21 | cd srcuml_build 22 | cmake path_to_srcUML_repo 23 | make 24 | 25 | # release mode 26 | mkdir srcuml_build 27 | cd srcuml_build 28 | cmake -DCMAKE_BUILD_TYPE=Release path_to_srcUML_repo 29 | make 30 | ``` 31 | 32 | ### Note 33 | * The current build is dependent on srcML 1.0 (not yet publicly released). 34 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | original author: Michael E. Smoot 3 | invaluable contributions: Daniel Aarno 4 | more contributions: Erik Zeek 5 | more contributions: Fabien Carmagnac (Tinbergen-AM) 6 | outstanding editing: Carol Smoot 7 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/COPYING: -------------------------------------------------------------------------------- 1 | 2 | 3 | Copyright (c) 2003 Michael E. Smoot 4 | Copyright (c) 2004 Daniel Aarno 5 | Copyright (c) 2017 Google Inc. 6 | 7 | Permission is hereby granted, free of charge, to any person 8 | obtaining a copy of this software and associated documentation 9 | files (the "Software"), to deal in the Software without restriction, 10 | including without limitation the rights to use, copy, modify, merge, 11 | publish, distribute, sublicense, and/or sell copies of the Software, 12 | and to permit persons to whom the Software is furnished to do so, 13 | subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 20 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 21 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 22 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 23 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | THE SOFTWARE. 26 | 27 | 28 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | ACLOCAL_AMFLAGS = -I config 3 | 4 | SUBDIRS = include examples docs tests msc config 5 | 6 | pkgconfigdir = $(libdir)/pkgconfig 7 | pkgconfig_DATA = $(PACKAGE).pc 8 | EXTRA_DIST = $(PACKAGE).pc.in 9 | 10 | DISTCLEANFILES = $(PACKAGE).pc 11 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/README: -------------------------------------------------------------------------------- 1 | 2 | TCLAP - Templatized Command Line Argument Parser 3 | 4 | This is a simple C++ library that facilitates parsing command line 5 | arguments in a type independent manner. It doesn't conform exactly 6 | to either the GNU or POSIX standards, although it is close. See 7 | docs/manual.html for descriptions of how things work or look at the 8 | simple examples in the examples dir. 9 | 10 | To find out what the latest changes are read the NEWS file in this directory. 11 | 12 | 13 | Any and all feedback is welcome to: Mike Smoot 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/config/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | EXTRA_DIST = ac_cxx_have_sstream.m4\ 3 | ac_cxx_have_strstream.m4\ 4 | ac_cxx_namespaces.m4\ 5 | bb_enable_doxygen.m4 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/config/ac_cxx_have_long_long.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis AC_CXX_HAVE_LONG_LONG 2 | dnl 3 | dnl If the C++ implementation have a long long type 4 | dnl 5 | AC_DEFUN([AC_CXX_HAVE_LONG_LONG], 6 | [AC_LANG_SAVE 7 | AC_LANG_CPLUSPLUS 8 | AC_TRY_COMPILE([],[long long x = 1; return 0;], 9 | ac_cv_cxx_have_long_long=yes, ac_cv_cxx_have_long_long=no) 10 | 11 | if test "$ac_cv_cxx_have_long_long" = yes; then 12 | AC_DEFINE(HAVE_LONG_LONG, 1, 13 | [define if the C++ implementation have long long]) 14 | else 15 | AC_DEFINE(HAVE_LONG_LONG, 0, 16 | [define if the C++ implementation have long long]) 17 | fi 18 | AC_LANG_RESTORE 19 | ]) 20 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/config/ac_cxx_have_sstream.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis AC_CXX_HAVE_SSTREAM 2 | dnl 3 | dnl If the C++ library has a working stringstream, define HAVE_SSTREAM. 4 | dnl 5 | dnl @author Ben Stanley 6 | dnl @version $Id: ac_cxx_have_sstream.m4,v 1.2 2006/02/22 02:10:28 zeekec Exp $ 7 | dnl 8 | AC_DEFUN([AC_CXX_HAVE_SSTREAM], 9 | [AC_REQUIRE([AC_CXX_NAMESPACES]) 10 | AC_LANG_SAVE 11 | AC_LANG_CPLUSPLUS 12 | AC_CHECK_HEADERS(sstream) 13 | AC_CACHE_CHECK([whether the STL defines stringstream], 14 | [ac_cv_cxx_have_sstream], 15 | [AC_TRY_COMPILE([#include 16 | #ifdef HAVE_NAMESPACES 17 | using namespace std; 18 | #endif],[stringstream message; message << "Hello"; return 0;], 19 | ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no) 20 | ]) 21 | if test "$ac_cv_cxx_have_sstream" = yes; then 22 | AC_DEFINE(HAVE_SSTREAM,1,[define if the compiler has stringstream]) 23 | fi 24 | AC_LANG_RESTORE 25 | ]) 26 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/config/ac_cxx_have_strstream.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis AC_CXX_HAVE_STRSTREAM 2 | dnl 3 | dnl If the C++ library has a working strstream, define HAVE_CLASS_STRSTREAM. 4 | dnl 5 | dnl Adapted from ac_cxx_have_sstream.m4 by Steve Robbins 6 | dnl 7 | AC_DEFUN([AC_CXX_HAVE_STRSTREAM], 8 | [AC_REQUIRE([AC_CXX_NAMESPACES]) 9 | AC_LANG_SAVE 10 | AC_LANG_CPLUSPLUS 11 | AC_CHECK_HEADERS(strstream) 12 | AC_CACHE_CHECK([whether the STL defines strstream], 13 | [ac_cv_cxx_have_class_strstream], 14 | [AC_TRY_COMPILE([#if HAVE_STRSTREAM 15 | # include 16 | #else 17 | # include 18 | #endif 19 | #ifdef HAVE_NAMESPACES 20 | using namespace std; 21 | #endif],[ostrstream message; message << "Hello"; return 0;], 22 | ac_cv_cxx_have_class_strstream=yes, ac_cv_cxx_have_class_strstream=no) 23 | ]) 24 | if test "$ac_cv_cxx_have_class_strstream" = yes; then 25 | AC_DEFINE(HAVE_CLASS_STRSTREAM,1,[define if the library defines strstream]) 26 | fi 27 | AC_LANG_RESTORE 28 | ]) 29 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/config/ac_cxx_namespaces.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis AC_CXX_NAMESPACES 2 | dnl 3 | dnl If the compiler can prevent names clashes using namespaces, define 4 | dnl HAVE_NAMESPACES. 5 | dnl 6 | dnl @version $Id: ac_cxx_namespaces.m4,v 1.1 2003/03/19 02:40:00 mes5k Exp $ 7 | dnl @author Luc Maisonobe 8 | dnl 9 | AC_DEFUN([AC_CXX_NAMESPACES], 10 | [AC_CACHE_CHECK(whether the compiler implements namespaces, 11 | ac_cv_cxx_namespaces, 12 | [AC_LANG_SAVE 13 | AC_LANG_CPLUSPLUS 14 | AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], 15 | [using namespace Outer::Inner; return i;], 16 | ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) 17 | AC_LANG_RESTORE 18 | ]) 19 | if test "$ac_cv_cxx_namespaces" = yes; then 20 | AC_DEFINE(HAVE_NAMESPACES,1,[define to 1 if the compiler implements namespaces]) 21 | fi 22 | ]) 23 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/config/ac_cxx_warn_effective_cxx.m4: -------------------------------------------------------------------------------- 1 | dnl HAVE_WARN_EFFECTIVE_CXX 2 | dnl ---------------------- 3 | dnl 4 | dnl If the C++ compiler accepts the `-Weffc++' flag, 5 | dnl set output variable `WARN_EFFECTIVE_CXX' to `-Weffc++' and 6 | dnl `WARN_NO_EFFECTIVE_CXX' to `-Wno-effc++'. Otherwise, 7 | dnl leave both empty. 8 | dnl 9 | AC_DEFUN([HAVE_WARN_EFFECTIVE_CXX], 10 | [ 11 | AC_REQUIRE([AC_PROG_CXX]) 12 | AC_MSG_CHECKING([whether the C++ compiler (${CXX}) accepts -Weffc++]) 13 | AC_CACHE_VAL([cv_warn_effective_cxx], 14 | [ 15 | AC_LANG_SAVE 16 | AC_LANG_CPLUSPLUS 17 | save_cxxflags="$CXXFLAGS" 18 | CXXFLAGS="$CXXFLAGS -Weffc++" 19 | AC_TRY_COMPILE([],[main();], 20 | [cv_warn_effective_cxx=yes], [cv_warn_effective_cxx=no]) 21 | CXXFLAGS="$save_cxxflags" 22 | AC_LANG_RESTORE 23 | ]) 24 | AC_MSG_RESULT([$cv_warn_effective_cxx]) 25 | if test "$cv_warn_effective_cxx" = yes; then 26 | WARN_EFFECTIVE_CXX=-Weffc++ 27 | WARN_NO_EFFECTIVE_CXX=-Wno-effc++ 28 | fi 29 | AC_SUBST([WARN_EFFECTIVE_CXX]) 30 | AC_SUBST([WARN_NO_EFFECTIVE_CXX]) 31 | ]) 32 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/config/bb_enable_doxygen.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([BB_ENABLE_DOXYGEN], 2 | [ 3 | AC_ARG_ENABLE(doxygen, [--enable-doxygen enable documentation generation with doxygen (auto)]) 4 | if test "x$enable_doxygen" = xno; then 5 | enable_doc=no 6 | else 7 | AC_PATH_PROG(DOXYGEN, doxygen, , $PATH) 8 | if test x$DOXYGEN = x; then 9 | if test "x$enable_doxygen" = xyes; then 10 | AC_MSG_ERROR([could not find doxygen]) 11 | fi 12 | enable_doc=no 13 | else 14 | enable_doc=yes 15 | fi 16 | fi 17 | AM_CONDITIONAL(DOC, test x$enable_doc = xyes) 18 | ]) 19 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/config/config.h: -------------------------------------------------------------------------------- 1 | /* config/config.h. Generated from config.h.in by configure. */ 2 | /* config/config.h.in. Generated from configure.in by autoheader. */ 3 | 4 | /* define if the library defines strstream */ 5 | #define HAVE_CLASS_STRSTREAM 1 6 | 7 | /* Define to 1 if you have the header file. */ 8 | #define HAVE_INTTYPES_H 1 9 | 10 | /* define if the C++ implementation have long long */ 11 | #define HAVE_LONG_LONG 1 12 | 13 | /* Define to 1 if you have the header file. */ 14 | #define HAVE_MEMORY_H 1 15 | 16 | /* define to 1 if the compiler implements namespaces */ 17 | #define HAVE_NAMESPACES 1 18 | 19 | /* define if the compiler has stringstream */ 20 | #define HAVE_SSTREAM 1 21 | 22 | /* Define to 1 if you have the header file. */ 23 | #define HAVE_STDINT_H 1 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #define HAVE_STDLIB_H 1 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #define HAVE_STRINGS_H 1 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #define HAVE_STRING_H 1 33 | 34 | /* Define to 1 if you have the header file. */ 35 | #define HAVE_STRSTREAM 1 36 | 37 | /* Define to 1 if you have the header file. */ 38 | #define HAVE_SYS_STAT_H 1 39 | 40 | /* Define to 1 if you have the header file. */ 41 | #define HAVE_SYS_TYPES_H 1 42 | 43 | /* Define to 1 if you have the header file. */ 44 | #define HAVE_UNISTD_H 1 45 | 46 | /* Name of package */ 47 | #define PACKAGE "tclap" 48 | 49 | /* Define to the address where bug reports for this package should be sent. */ 50 | #define PACKAGE_BUGREPORT "" 51 | 52 | /* Define to the full name of this package. */ 53 | #define PACKAGE_NAME "" 54 | 55 | /* Define to the full name and version of this package. */ 56 | #define PACKAGE_STRING "" 57 | 58 | /* Define to the one symbol short name of this package. */ 59 | #define PACKAGE_TARNAME "" 60 | 61 | /* Define to the home page for this package. */ 62 | #define PACKAGE_URL "" 63 | 64 | /* Define to the version of this package. */ 65 | #define PACKAGE_VERSION "" 66 | 67 | /* Define to 1 if you have the ANSI C header files. */ 68 | #define STDC_HEADERS 1 69 | 70 | /* Version number of package */ 71 | #define VERSION "1.2.2" 72 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/config/config.h.in: -------------------------------------------------------------------------------- 1 | /* config/config.h.in. Generated from configure.in by autoheader. */ 2 | 3 | /* define if the library defines strstream */ 4 | #undef HAVE_CLASS_STRSTREAM 5 | 6 | /* Define to 1 if you have the header file. */ 7 | #undef HAVE_INTTYPES_H 8 | 9 | /* define if the C++ implementation have long long */ 10 | #undef HAVE_LONG_LONG 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #undef HAVE_MEMORY_H 14 | 15 | /* define to 1 if the compiler implements namespaces */ 16 | #undef HAVE_NAMESPACES 17 | 18 | /* define if the compiler has stringstream */ 19 | #undef HAVE_SSTREAM 20 | 21 | /* Define to 1 if you have the header file. */ 22 | #undef HAVE_STDINT_H 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #undef HAVE_STDLIB_H 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_STRINGS_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_STRING_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #undef HAVE_STRSTREAM 35 | 36 | /* Define to 1 if you have the header file. */ 37 | #undef HAVE_SYS_STAT_H 38 | 39 | /* Define to 1 if you have the header file. */ 40 | #undef HAVE_SYS_TYPES_H 41 | 42 | /* Define to 1 if you have the header file. */ 43 | #undef HAVE_UNISTD_H 44 | 45 | /* Name of package */ 46 | #undef PACKAGE 47 | 48 | /* Define to the address where bug reports for this package should be sent. */ 49 | #undef PACKAGE_BUGREPORT 50 | 51 | /* Define to the full name of this package. */ 52 | #undef PACKAGE_NAME 53 | 54 | /* Define to the full name and version of this package. */ 55 | #undef PACKAGE_STRING 56 | 57 | /* Define to the one symbol short name of this package. */ 58 | #undef PACKAGE_TARNAME 59 | 60 | /* Define to the home page for this package. */ 61 | #undef PACKAGE_URL 62 | 63 | /* Define to the version of this package. */ 64 | #undef PACKAGE_VERSION 65 | 66 | /* Define to 1 if you have the ANSI C header files. */ 67 | #undef STDC_HEADERS 68 | 69 | /* Version number of package */ 70 | #undef VERSION 71 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/config/mkinstalldirs: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # mkinstalldirs --- make directory hierarchy 3 | # Author: Noah Friedman 4 | # Created: 1993-05-16 5 | # Public domain 6 | 7 | # $Id: mkinstalldirs,v 1.1 2003/04/03 18:13:41 mes5k Exp $ 8 | 9 | errstatus=0 10 | 11 | for file 12 | do 13 | set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` 14 | shift 15 | 16 | pathcomp= 17 | for d 18 | do 19 | pathcomp="$pathcomp$d" 20 | case "$pathcomp" in 21 | -* ) pathcomp=./$pathcomp ;; 22 | esac 23 | 24 | if test ! -d "$pathcomp"; then 25 | echo "mkdir $pathcomp" 26 | 27 | mkdir "$pathcomp" || lasterr=$? 28 | 29 | if test ! -d "$pathcomp"; then 30 | errstatus=$lasterr 31 | fi 32 | fi 33 | 34 | pathcomp="$pathcomp/" 35 | done 36 | done 37 | 38 | exit $errstatus 39 | 40 | # mkinstalldirs ends here 41 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/config/stamp-h1: -------------------------------------------------------------------------------- 1 | timestamp for config/config.h 2 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/configure.in: -------------------------------------------------------------------------------- 1 | AC_INIT(Makefile.am) 2 | #AC_PREREQ(2.50) 3 | AC_CONFIG_AUX_DIR(config) 4 | AM_CONFIG_HEADER(config/config.h) 5 | AM_INIT_AUTOMAKE(tclap,1.2.2) 6 | AC_PROG_CXX 7 | AC_CXX_HAVE_SSTREAM 8 | AC_CXX_HAVE_STRSTREAM 9 | AC_CXX_HAVE_LONG_LONG 10 | AC_CHECK_PROG(DOT,dot,YES,NO) 11 | AC_PROG_RANLIB 12 | AC_PROG_INSTALL 13 | BB_ENABLE_DOXYGEN 14 | 15 | HAVE_WARN_EFFECTIVE_CXX 16 | CXXFLAGS="$CXXFLAGS $WARN_EFFECTIVE_CXX" 17 | 18 | AM_CONDITIONAL([HAVE_GNU_COMPILERS], [test x$ac_cv_cxx_compiler_gnu = xyes]) 19 | 20 | AC_OUTPUT([ Makefile \ 21 | tclap.pc \ 22 | examples/Makefile \ 23 | include/Makefile \ 24 | include/tclap/Makefile \ 25 | config/Makefile \ 26 | docs/Makefile \ 27 | docs/Doxyfile \ 28 | msc/Makefile \ 29 | msc/examples/Makefile \ 30 | tests/Makefile], \ 31 | [chmod a+x $ac_top_srcdir/tests/*.sh]) 32 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/docs/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | if DOC 3 | 4 | all: 5 | @DOXYGEN@ Doxyfile 6 | 7 | else 8 | 9 | all: 10 | 11 | endif 12 | 13 | EXTRA_DIST = manual.xml 14 | dist_doc_DATA = index.html manual.html style.css 15 | docdir = ${datadir}/doc/${PACKAGE} 16 | 17 | install-data-local : 18 | $(mkdir_p) $(DESTDIR)$(docdir) 19 | cp -R $(abs_srcdir)/html $(DESTDIR)$(docdir) 20 | 21 | uninstall-local : 22 | chmod -R o+w $(DESTDIR)$(docdir) 23 | rm -rf $(DESTDIR)$(docdir) 24 | 25 | dist-hook : 26 | $(mkdir_p) $(distdir) 27 | cp -R $(abs_srcdir)/html $(distdir) 28 | 29 | clean-local: 30 | $(RM) -rf $(abs_builddir)/html/* 31 | $(RM) -rf $(abs_builddir)/doxygen_sqlite3.db 32 | 33 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/docs/README: -------------------------------------------------------------------------------- 1 | 2 | To generate the manual from the docbook xml you need and xslt processor 3 | and an xsl file that defines the output. For example: 4 | 5 | xsltproc --stringparam html.stylesheet style.css /Users/mes/software/docbook-xsl-1.71.1/xhtml/docbook.xsl manual.xml > manual.html 6 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/docs/style.css: -------------------------------------------------------------------------------- 1 | /* 2 | color:#ffffff; white 3 | color:#e0e0e0; light gray 4 | color:#f8f8f8; light gray 5 | color:#003366; dark blue 6 | color:#555555; gray 7 | color:#ff9933; light orange 8 | color:#cc3300; red/brown/orange 9 | color:#660066; purple 10 | color:#669900; green 11 | */ 12 | 13 | a { 14 | color:#003366; 15 | text-decoration:underline; 16 | } 17 | 18 | a:hover { 19 | color:#ff9933; 20 | } 21 | 22 | body { 23 | font-family: verdana, tahoma, helvetica, arial, sans-serif; 24 | font-size: 90%; 25 | background-color:#ffffff; 26 | margin: 1em; 27 | } 28 | 29 | pre { 30 | font-family: courier, serif; 31 | background-color:#f8f8f8; 32 | margin: 1.5em; 33 | font-size:90%; 34 | } 35 | 36 | ul { 37 | list-style: circle outside; 38 | font-stretch:extra-expanded; 39 | /* font-size:90%;*/ 40 | } 41 | 42 | ul.menu { /* inherits from ul */ 43 | padding-left: 1em; 44 | } 45 | 46 | 47 | em { 48 | color:#ff9933; 49 | font-size:110%; 50 | } 51 | 52 | h1,h2,h3{ 53 | color:#ff9933; 54 | } 55 | 56 | h1 { 57 | border-color:#d0d0d0; 58 | border-style:solid; 59 | border-width:1px; 60 | font-weight:bold; 61 | padding: 0.2em; 62 | background-color:#f8f8f8 63 | } 64 | 65 | h2 { 66 | font-size:120%; 67 | font-weight:bold; 68 | border-bottom-style:solid; 69 | border-bottom-width:1px; 70 | border-bottom-color:#d0d0d0; 71 | } 72 | 73 | h3 { 74 | font-size:110%; 75 | font-weight:bold; 76 | font-style:italic; 77 | } 78 | 79 | tt { 80 | font-family: courier, serif; 81 | } 82 | 83 | tt.classname { 84 | font-weight:bold; 85 | } 86 | 87 | tt.constant { 88 | font-weight:bold; 89 | } 90 | 91 | 92 | p { 93 | line-height: 1.5em; 94 | } 95 | 96 | 97 | div.links{ 98 | float: left; 99 | clear: left; 100 | width: 12em; 101 | background-color:#f8f8f8; 102 | border-style:solid; 103 | border-width:1px; 104 | border-color:#d0d0d0; 105 | margin-bottom: 0.5em; 106 | padding: 0.5em 0.5em 0.5em 0.5em; 107 | margin: 0.5em 0.5em 0em 0em; 108 | } 109 | 110 | div.main{ 111 | border-style:solid; 112 | border-width:1px; 113 | border-color:#d0d0d0; 114 | margin: 0.5em 0em 0.5em 14em; 115 | padding: 0.5em 0.5em 0.5em 0.5em; 116 | } 117 | 118 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | noinst_PROGRAMS = test1 test2 test3 test4 test5 test6 test7 test8 test9 \ 3 | test10 test11 test12 test13 test14 test15 test16 \ 4 | test17 test18 test19 test20 test21 5 | 6 | test1_SOURCES = test1.cpp 7 | test2_SOURCES = test2.cpp 8 | test3_SOURCES = test3.cpp 9 | test4_SOURCES = test4.cpp 10 | test5_SOURCES = test5.cpp 11 | test6_SOURCES = test6.cpp 12 | test7_SOURCES = test7.cpp 13 | test8_SOURCES = test8.cpp 14 | test9_SOURCES = test9.cpp 15 | test10_SOURCES = test10.cpp 16 | test11_SOURCES = test11.cpp 17 | test12_SOURCES = test12.cpp 18 | test13_SOURCES = test13.cpp 19 | test14_SOURCES = test14.cpp 20 | test15_SOURCES = test15.cpp 21 | test16_SOURCES = test16.cpp 22 | test17_SOURCES = test17.cpp test17-a.cpp 23 | test18_SOURCES = test18.cpp 24 | test19_SOURCES = test19.cpp 25 | test20_SOURCES = test20.cpp 26 | test21_SOURCES = test21.cpp 27 | 28 | AM_CPPFLAGS = -I$(top_srcdir)/include 29 | 30 | if HAVE_GNU_COMPILERS 31 | AM_CXXFLAGS = -Wall -Wextra 32 | endif 33 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test1 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "tclap/CmdLine.h" 5 | 6 | using namespace TCLAP; 7 | using namespace std; 8 | 9 | int main(int argc, char** argv) 10 | { 11 | // Wrap everything in a try block. Do this every time, 12 | // because exceptions will be thrown for problems. 13 | try { 14 | 15 | // Define the command line object. 16 | CmdLine cmd("Command description message", ' ', "0.9"); 17 | 18 | // Define a value argument and add it to the command line. 19 | ValueArg nameArg("n","name","Name to print",true,"homer","string"); 20 | cmd.add( nameArg ); 21 | 22 | // Define a switch and add it to the command line. 23 | SwitchArg reverseSwitch("r","reverse","Print name backwards", false); 24 | cmd.add( reverseSwitch ); 25 | 26 | // Parse the args. 27 | cmd.parse( argc, argv ); 28 | 29 | // Get the value parsed by each arg. 30 | string name = nameArg.getValue(); 31 | bool reverseName = reverseSwitch.getValue(); 32 | 33 | // Do what you intend too... 34 | if ( reverseName ) 35 | { 36 | reverse(name.begin(),name.end()); 37 | cout << "My name (spelled backwards) is: " << name << endl; 38 | } 39 | else 40 | cout << "My name is: " << name << endl; 41 | 42 | 43 | } catch (ArgException &e) // catch any exceptions 44 | { cerr << "error: " << e.error() << " for arg " << e.argId() << endl; } 45 | } 46 | 47 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test1.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test1.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test10: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test10 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test10.cpp: -------------------------------------------------------------------------------- 1 | // Test only makes sure we can use different argv types for the 2 | // parser. Don't run, just compile. 3 | 4 | #include "tclap/CmdLine.h" 5 | 6 | using namespace TCLAP; 7 | int main() 8 | { 9 | char *argv5[] = {(char*)"Foo", 0}; 10 | const char *argv6[] = {"Foo", 0}; 11 | const char * const argv7[] = {"Foo", 0}; 12 | char **argv1 = argv5; 13 | const char **argv2 = argv6; 14 | const char * const * argv3 = argv7; 15 | const char * const * const argv4 = argv7; 16 | 17 | CmdLine cmd("Command description message", ' ', "0.9"); 18 | cmd.parse(0, argv1); 19 | cmd.parse(0, argv2); 20 | cmd.parse(0, argv3); 21 | cmd.parse(0, argv4); 22 | cmd.parse(0, argv5); 23 | cmd.parse(0, argv6); 24 | cmd.parse(0, argv7); 25 | } 26 | 27 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test10.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test10.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test11: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test11 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test11.cpp: -------------------------------------------------------------------------------- 1 | #include "tclap/CmdLine.h" 2 | #include 3 | 4 | #include 5 | 6 | using namespace TCLAP; 7 | 8 | // Define a simple 3D vector type 9 | struct Vect3D { 10 | double v[3]; 11 | 12 | // operator= will be used to assign to the vector 13 | Vect3D& operator=(const std::string &str) 14 | { 15 | std::istringstream iss(str); 16 | if (!(iss >> v[0] >> v[1] >> v[2])) 17 | throw TCLAP::ArgParseException(str + " is not a 3D vector"); 18 | 19 | return *this; 20 | } 21 | 22 | std::ostream& print(std::ostream &os) const 23 | { 24 | std::copy(v, v + 3, std::ostream_iterator(os, " ")); 25 | return os; 26 | } 27 | }; 28 | 29 | // Create an ArgTraits for the 3D vector type that declares it to be 30 | // of string like type 31 | namespace TCLAP { 32 | template<> 33 | struct ArgTraits { 34 | typedef StringLike ValueCategory; 35 | }; 36 | } 37 | 38 | int main(int argc, char *argv[]) 39 | { 40 | CmdLine cmd("Command description message", ' ', "0.9"); 41 | ValueArg vec("v", "vect", "vector", 42 | true, Vect3D(), "3D vector", cmd); 43 | 44 | try { 45 | cmd.parse(argc, argv); 46 | } catch(std::exception &e) { 47 | std::cout << e.what() << std::endl; 48 | return EXIT_FAILURE; 49 | } 50 | 51 | vec.getValue().print(std::cout); 52 | std::cout << std::endl; 53 | } 54 | 55 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test11.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test11.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test12 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test12.cpp: -------------------------------------------------------------------------------- 1 | #include "tclap/CmdLine.h" 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | using namespace TCLAP; 8 | 9 | // Define a simple 3D vector type 10 | struct Vect3D { 11 | double v[3]; 12 | 13 | // operator= will be used to assign to the vector 14 | Vect3D& operator=(const std::string &str) 15 | { 16 | std::istringstream iss(str); 17 | if (!(iss >> v[0] >> v[1] >> v[2])) 18 | throw TCLAP::ArgParseException(str + " is not a 3D vector"); 19 | 20 | return *this; 21 | } 22 | 23 | std::ostream& print(std::ostream &os) const 24 | { 25 | std::copy(v, v + 3, std::ostream_iterator(os, " ")); 26 | return os; 27 | } 28 | 29 | }; 30 | 31 | std::ostream& operator<<(std::ostream &os, const Vect3D &v) 32 | { 33 | return v.print(os); 34 | } 35 | 36 | // Create an ArgTraits for the 3D vector type that declares it to be 37 | // of string like type 38 | namespace TCLAP { 39 | template<> 40 | struct ArgTraits { 41 | typedef StringLike ValueCategory; 42 | }; 43 | } 44 | 45 | int main(int argc, char *argv[]) 46 | { 47 | CmdLine cmd("Command description message", ' ', "0.9"); 48 | MultiArg vec("v", "vect", "vector", 49 | true, "3D vector", cmd); 50 | 51 | try { 52 | cmd.parse(argc, argv); 53 | } catch(std::exception &e) { 54 | std::cout << e.what() << std::endl; 55 | return EXIT_FAILURE; 56 | } 57 | 58 | std::copy(vec.begin(), vec.end(), 59 | std::ostream_iterator(std::cout, "\n")); 60 | 61 | std::cout << "REVERSED" << std::endl; 62 | 63 | // use alt. form getValue() 64 | std::vector v(vec.getValue()); 65 | std::reverse(v.begin(), v.end()); 66 | 67 | std::copy(v.begin(), v.end(), 68 | std::ostream_iterator(std::cout, "\n")); 69 | } 70 | 71 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test12.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test12.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test13: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test13 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test13.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | 6 | using namespace TCLAP; 7 | 8 | // 9 | // This file tests that we can parse args from a vector 10 | // of strings rather than argv. This also tests a bug 11 | // where a single element in the vector contains both 12 | // the flag and value AND the value contains the flag 13 | // from another switch arg. This would fool the parser 14 | // into thinking that the string was a combined switches 15 | // string rather than a flag value combo. 16 | // 17 | // This should not print an error 18 | // 19 | // Contributed by Nico Lugil. 20 | // 21 | int main() 22 | { 23 | 24 | try 25 | { 26 | CmdLine cmd("Test", ' ', "not versioned",true); 27 | 28 | MultiArg Arg("X","fli","fli module",false,"string"); 29 | cmd.add(Arg); 30 | MultiSwitchArg ArgMultiSwitch("d","long_d","example"); 31 | cmd.add(ArgMultiSwitch); 32 | 33 | std::vector in; 34 | in.push_back("prog name"); 35 | in.push_back("-X module"); 36 | cmd.parse(in); 37 | 38 | std::vector s = Arg.getValue(); 39 | for(unsigned int i = 0 ; i < s.size() ; i++) 40 | { 41 | std::cout << s[i] << "\n"; 42 | } 43 | std::cout << "MultiSwtichArg was found " << ArgMultiSwitch.getValue() << " times.\n"; 44 | 45 | } 46 | catch (ArgException &e) // catch any exceptions 47 | { 48 | std::cerr << "error: " << e.error() << " for arg " << e.argId() << std::endl; 49 | } 50 | 51 | std::cout << "done...\n"; 52 | 53 | return 0; 54 | } 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test13.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test13.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test14: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test14 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test14.cpp: -------------------------------------------------------------------------------- 1 | #include "tclap/CmdLine.h" 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | // Define a simple 3D vector type 8 | template 9 | struct Vect : public TCLAP::StringLikeTrait { 10 | //typedef TCLAP::StringLike ValueCategory; 11 | T v[LEN]; 12 | 13 | // operator= will be used to assign to the vector 14 | Vect& operator=(const std::string &str) 15 | { 16 | std::istringstream iss(str); 17 | for (size_t n = 0; n < LEN; n++) { 18 | if (!(iss >> v[n])) { 19 | std::ostringstream oss; 20 | oss << " is not a vector of size " << LEN; 21 | throw TCLAP::ArgParseException(str + oss.str()); 22 | } 23 | } 24 | 25 | if (!iss.eof()) { 26 | std::ostringstream oss; 27 | oss << " is not a vector of size " << LEN; 28 | throw TCLAP::ArgParseException(str + oss.str()); 29 | } 30 | 31 | return *this; 32 | } 33 | 34 | std::ostream& print(std::ostream &os) const 35 | { 36 | std::copy(v, v + LEN, std::ostream_iterator(os, " ")); 37 | return os; 38 | } 39 | 40 | }; 41 | 42 | int main(int argc, char *argv[]) 43 | { 44 | TCLAP::CmdLine cmd("Command description message", ' ', "0.9"); 45 | TCLAP::ValueArg< Vect > vec("v", "vect", "vector", 46 | true, Vect(), 47 | "3D vector", cmd); 48 | 49 | try { 50 | cmd.parse(argc, argv); 51 | } catch(std::exception &e) { 52 | std::cout << e.what() << std::endl; 53 | return EXIT_FAILURE; 54 | } 55 | 56 | vec.getValue().print(std::cout); 57 | std::cout << std::endl; 58 | } 59 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test14.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test14.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test15: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test15 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test15.cpp: -------------------------------------------------------------------------------- 1 | #include "tclap/CmdLine.h" 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | // Define a simple 3D vector type 8 | template 9 | struct Vect { 10 | typedef TCLAP::StringLike ValueCategory; 11 | T v[LEN]; 12 | 13 | // operator= will be used to assign to the vector 14 | Vect& operator=(const std::string &str) 15 | { 16 | std::istringstream iss(str); 17 | for (size_t n = 0; n < LEN; n++) { 18 | if (!(iss >> v[n])) { 19 | std::ostringstream oss; 20 | oss << " is not a vector of size " << LEN; 21 | throw TCLAP::ArgParseException(str + oss.str()); 22 | } 23 | } 24 | 25 | if (!iss.eof()) { 26 | std::ostringstream oss; 27 | oss << " is not a vector of size " << LEN; 28 | throw TCLAP::ArgParseException(str + oss.str()); 29 | } 30 | 31 | return *this; 32 | } 33 | 34 | std::ostream& print(std::ostream &os) const 35 | { 36 | std::copy(v, v + LEN, std::ostream_iterator(os, " ")); 37 | return os; 38 | } 39 | 40 | }; 41 | 42 | int main(int argc, char *argv[]) 43 | { 44 | TCLAP::CmdLine cmd("Command description message", ' ', "0.9"); 45 | TCLAP::ValueArg< Vect > vec("v", "vect", "vector", 46 | true, Vect(), 47 | "3D vector", cmd); 48 | 49 | try { 50 | cmd.parse(argc, argv); 51 | } catch(std::exception &e) { 52 | std::cout << e.what() << std::endl; 53 | return EXIT_FAILURE; 54 | } 55 | 56 | vec.getValue().print(std::cout); 57 | std::cout << std::endl; 58 | } 59 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test15.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test15.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test16: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test16 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test16.cpp: -------------------------------------------------------------------------------- 1 | #include "tclap/CmdLine.h" 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | namespace TCLAP { 8 | template<> 9 | struct ArgTraits< std::vector > { 10 | typedef StringLike ValueCategory; 11 | }; 12 | 13 | template<> 14 | void SetString< std::vector >(std::vector &v, 15 | const std::string &s) 16 | { 17 | std::istringstream iss(s); 18 | while (iss) { 19 | double tmp; 20 | iss >> tmp; 21 | v.push_back(tmp); 22 | } 23 | } 24 | } 25 | 26 | int main(int argc, char *argv[]) 27 | { 28 | TCLAP::CmdLine cmd("Command description message", ' ', "0.9"); 29 | TCLAP::ValueArg< std::vector > vec("v", "vect", "vector", 30 | true, std::vector(), 31 | "3D vector", cmd); 32 | try { 33 | cmd.parse(argc, argv); 34 | } catch(std::exception &e) { 35 | std::cout << e.what() << std::endl; 36 | return EXIT_FAILURE; 37 | } 38 | 39 | const std::vector &v = vec.getValue(); 40 | std::copy(v.begin(), v.end(), 41 | std::ostream_iterator(std::cout, "\n")); 42 | std::cout << std::endl; 43 | } 44 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test16.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test16.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test17: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test17 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test17-a.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test17-a.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test17-a.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test17.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { } 4 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test17.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test17.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test18: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test18 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test18.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "tclap/CmdLine.h" 5 | 6 | using namespace TCLAP; 7 | using namespace std; 8 | 9 | int main(int argc, char** argv) 10 | { 11 | try { 12 | 13 | CmdLine cmd("Command description message", ' ', "0.9", true); 14 | 15 | cmd.setExceptionHandling(false); 16 | 17 | cmd.parse(argc, argv); 18 | 19 | } catch (ArgException &e) { // catch any exceptions 20 | cerr << "error: " << e.error() << " for arg " << e.argId() << endl; 21 | return 1; 22 | } catch (ExitException &e) { // catch any exceptions 23 | cerr << "Exiting on ExitException." << endl; 24 | return e.getExitStatus(); 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test18.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test18.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test19: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test19 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test19.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #define TCLAP_SETBASE_ZERO 1 4 | 5 | #include "tclap/CmdLine.h" 6 | #include 7 | #include 8 | 9 | 10 | using namespace TCLAP; 11 | using namespace std; 12 | 13 | int main(int argc, char** argv) 14 | { 15 | 16 | try { 17 | 18 | CmdLine cmd("this is a message", ' ', "0.99" ); 19 | 20 | ValueArg itest("i", "intTest", "integer test", true, 5, "int"); 21 | cmd.add( itest ); 22 | 23 | // 24 | // Parse the command line. 25 | // 26 | cmd.parse(argc,argv); 27 | 28 | // 29 | // Set variables 30 | // 31 | int _intTest = itest.getValue(); 32 | cout << "found int: " << _intTest << endl; 33 | 34 | } catch ( ArgException& e ) 35 | { cout << "ERROR: " << e.error() << " " << e.argId() << endl; } 36 | } 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test19.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test19.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test2 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test2.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "tclap/CmdLine.h" 4 | #include 5 | #include 6 | 7 | using namespace TCLAP; 8 | using namespace std; 9 | 10 | int _intTest; 11 | float _floatTest; 12 | bool _boolTestA; 13 | bool _boolTestB; 14 | bool _boolTestC; 15 | string _stringTest; 16 | string _utest; 17 | 18 | void parseOptions(int argc, char** argv); 19 | 20 | int main(int argc, char** argv) 21 | { 22 | 23 | parseOptions(argc,argv); 24 | 25 | cout << "for float we got : " << _floatTest << endl 26 | << "for int we got : " << _intTest<< endl 27 | << "for string we got : " << _stringTest<< endl 28 | << "for ulabeled we got : " << _utest << endl 29 | << "for bool A we got : " << _boolTestA << endl 30 | << "for bool B we got : " << _boolTestB << endl 31 | << "for bool C we got : " << _boolTestC << endl; 32 | 33 | } 34 | 35 | 36 | void parseOptions(int argc, char** argv) 37 | { 38 | try { 39 | 40 | CmdLine cmd("this is a message", ' ', "0.99" ); 41 | 42 | // 43 | // Define arguments 44 | // 45 | 46 | SwitchArg btest("B","existTestB", "tests for the existence of B", false); 47 | cmd.add( btest ); 48 | 49 | SwitchArg ctest("C","existTestC", "tests for the existence of C", false); 50 | cmd.add( ctest ); 51 | 52 | SwitchArg atest("A","existTestA", "tests for the existence of A", false); 53 | cmd.add( atest ); 54 | 55 | ValueArg stest("s","stringTest","string test",true,"homer", 56 | "string"); 57 | cmd.add( stest ); 58 | 59 | ValueArg itest("i", "intTest", "integer test", true, 5, "int"); 60 | cmd.add( itest ); 61 | 62 | ValueArg ftest("f", "floatTest", "float test", false, 3.7, "float"); 63 | cmd.add( ftest ); 64 | 65 | UnlabeledValueArg utest("unTest","unlabeld test", true, 66 | "default","string"); 67 | cmd.add( utest ); 68 | 69 | UnlabeledMultiArg mtest("fileName", "file names", false, "string"); 70 | cmd.add( mtest ); 71 | 72 | // 73 | // Parse the command line. 74 | // 75 | cmd.parse(argc,argv); 76 | 77 | // 78 | // Set variables 79 | // 80 | _intTest = itest.getValue(); 81 | _floatTest = ftest.getValue(); 82 | _stringTest = stest.getValue(); 83 | _boolTestB = btest.getValue(); 84 | _boolTestC = ctest.getValue(); 85 | _boolTestA = atest.getValue(); 86 | _utest = utest.getValue(); 87 | 88 | vector v = mtest.getValue(); 89 | for ( int i = 0; static_cast(i) < v.size(); i++ ) 90 | cout << i << " " << v[i] << endl; 91 | 92 | } catch ( ArgException& e ) 93 | { cout << "ERROR: " << e.error() << " " << e.argId() << endl; } 94 | } 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test2.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test2.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test20: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test20 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test20.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace TCLAP; 7 | using namespace std; 8 | 9 | int main(int argc, char** argv) 10 | { 11 | // Wrap everything in a try block. Do this every time, 12 | // because exceptions will be thrown for problems. 13 | try { 14 | 15 | // Define the command line object. 16 | CmdLine cmd("Command description message", '=', "0.9"); 17 | 18 | SwitchArg atmcSwitch("a", "atmc", "aContinuous time semantics", false); 19 | SwitchArg btmcSwitch("b", "btmc", "bDiscrete time semantics", false); 20 | cmd.xorAdd(atmcSwitch, btmcSwitch); 21 | 22 | // Parse the args. 23 | cmd.parse( argc, argv ); 24 | 25 | } catch (ArgException &e) // catch any exceptions 26 | { cerr << "error: " << e.error() << " for arg " << e.argId() << endl; } 27 | } 28 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test20.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test20.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test21: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test21 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test21.cpp: -------------------------------------------------------------------------------- 1 | 2 | // This illustrates how to change the flag and name start strings. 3 | // Note that these defines need to happen *before* tclap is included! 4 | #define TCLAP_NAMESTARTSTRING "~~" 5 | #define TCLAP_FLAGSTARTSTRING "/" 6 | 7 | #include 8 | #include 9 | #include 10 | #include "tclap/CmdLine.h" 11 | 12 | using namespace TCLAP; 13 | using namespace std; 14 | 15 | int main(int argc, char** argv) 16 | { 17 | // Wrap everything in a try block. Do this every time, 18 | // because exceptions will be thrown for problems. 19 | try { 20 | 21 | // Define the command line object. 22 | CmdLine cmd("Command description message", ' ', "0.9"); 23 | 24 | // Define a value argument and add it to the command line. 25 | ValueArg nameArg("n","name","Name to print",true,"homer","string"); 26 | cmd.add( nameArg ); 27 | 28 | // Define a switch and add it to the command line. 29 | SwitchArg reverseSwitch("r","reverse","Print name backwards", false); 30 | cmd.add( reverseSwitch ); 31 | 32 | // Parse the args. 33 | cmd.parse( argc, argv ); 34 | 35 | // Get the value parsed by each arg. 36 | string name = nameArg.getValue(); 37 | bool reverseName = reverseSwitch.getValue(); 38 | 39 | // Do what you intend too... 40 | if ( reverseName ) 41 | { 42 | reverse(name.begin(),name.end()); 43 | cout << "My name (spelled backwards) is: " << name << endl; 44 | } 45 | else 46 | cout << "My name is: " << name << endl; 47 | 48 | 49 | } catch (ArgException &e) // catch any exceptions 50 | { cerr << "error: " << e.error() << " for arg " << e.argId() << endl; } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test21.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test21.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test3 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test3.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "tclap/CmdLine.h" 4 | #include 5 | #include 6 | 7 | using namespace TCLAP; 8 | using namespace std; 9 | 10 | bool _boolTestB; 11 | string _stringTest; 12 | string _utest; 13 | string _ztest; 14 | 15 | void parseOptions(int argc, char** argv); 16 | 17 | int main(int argc, char** argv) 18 | { 19 | 20 | parseOptions(argc,argv); 21 | 22 | cout << "for string we got : " << _stringTest<< endl 23 | << "for ulabeled one we got : " << _utest << endl 24 | << "for ulabeled two we got : " << _ztest << endl 25 | << "for bool B we got : " << _boolTestB << endl; 26 | 27 | } 28 | 29 | 30 | void parseOptions(int argc, char** argv) 31 | { 32 | try { 33 | 34 | CmdLine cmd("this is a message", '=', "0.99" ); 35 | 36 | // 37 | // Define arguments 38 | // 39 | 40 | SwitchArg btest("B","existTestB", "exist Test B", false); 41 | cmd.add( btest ); 42 | 43 | ValueArg stest("", "stringTest", "string test", true, "homer", 44 | "string"); 45 | cmd.add( stest ); 46 | 47 | UnlabeledValueArg utest("unTest1","unlabeled test one", true, 48 | "default","string"); 49 | cmd.add( utest ); 50 | 51 | UnlabeledValueArg ztest("unTest2","unlabeled test two", true, 52 | "default","string"); 53 | cmd.add( ztest ); 54 | 55 | MultiArg itest("i", "intTest", "multi int test", false,"int" ); 56 | cmd.add( itest ); 57 | 58 | MultiArg ftest("f", "floatTest", "multi float test", false,"float" ); 59 | cmd.add( ftest ); 60 | 61 | UnlabeledMultiArg mtest("fileName","file names",false, 62 | "fileNameString"); 63 | cmd.add( mtest ); 64 | // 65 | // Parse the command line. 66 | // 67 | cmd.parse(argc,argv); 68 | 69 | 70 | // 71 | // Set variables 72 | // 73 | _stringTest = stest.getValue(); 74 | _boolTestB = btest.getValue(); 75 | _utest = utest.getValue(); 76 | _ztest = ztest.getValue(); 77 | 78 | vector vi = itest.getValue(); 79 | for ( int i = 0; static_cast(i) < vi.size(); i++ ) 80 | cout << "[-i] " << i << " " << vi[i] << endl; 81 | 82 | vector vf = ftest.getValue(); 83 | for ( int i = 0; static_cast(i) < vf.size(); i++ ) 84 | cout << "[-f] " << i << " " << vf[i] << endl; 85 | 86 | vector v = mtest.getValue(); 87 | for ( int i = 0; static_cast(i) < v.size(); i++ ) 88 | cout << "[ ] " << i << " " << v[i] << endl; 89 | 90 | } catch ( ArgException& e ) 91 | { cout << "ERROR: " << e.error() << " " << e.argId() << endl; } 92 | } 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test3.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test3.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test4 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test4.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "tclap/CmdLine.h" 4 | #include "tclap/DocBookOutput.h" 5 | #include "tclap/ZshCompletionOutput.h" 6 | #include 7 | #include 8 | 9 | using namespace TCLAP; 10 | using namespace std; 11 | 12 | 13 | // This exemplifies how the output class can be overridden to provide 14 | // user defined output. 15 | class MyOutput : public StdOutput 16 | { 17 | public: 18 | 19 | virtual void failure(CmdLineInterface& c, ArgException& e) 20 | { 21 | static_cast(c); // Ignore input, don't warn 22 | cerr << "my failure message: " << endl 23 | << e.what() << endl; 24 | exit(1); 25 | } 26 | 27 | virtual void usage(CmdLineInterface& c) 28 | { 29 | cout << "my usage message:" << endl; 30 | list args = c.getArgList(); 31 | for (ArgListIterator it = args.begin(); it != args.end(); it++) 32 | cout << (*it)->longID() 33 | << " (" << (*it)->getDescription() << ")" << endl; 34 | } 35 | 36 | virtual void version(CmdLineInterface& c) 37 | { 38 | static_cast(c); // Ignore input, don't warn 39 | cout << "my version message: 0.1" << endl; 40 | } 41 | }; 42 | 43 | 44 | bool _boolTestB; 45 | bool _boolTestA; 46 | string _stringTest; 47 | 48 | void parseOptions(int argc, char** argv); 49 | 50 | int main(int argc, char** argv) 51 | { 52 | 53 | parseOptions(argc,argv); 54 | 55 | cout << "for string we got : " << _stringTest<< endl 56 | << "for bool B we got : " << _boolTestB << endl 57 | << "for bool A we got : " << _boolTestA << endl; 58 | 59 | } 60 | 61 | 62 | void parseOptions(int argc, char** argv) 63 | { 64 | try { 65 | 66 | CmdLine cmd("this is a message", ' ', "0.99" ); 67 | 68 | // set the output 69 | MyOutput my; 70 | //ZshCompletionOutput my; 71 | //DocBookOutput my; 72 | cmd.setOutput(&my); 73 | 74 | // 75 | // Define arguments 76 | // 77 | 78 | SwitchArg btest("B","sB", "exist Test B", false); 79 | SwitchArg atest("A","sA", "exist Test A", false); 80 | 81 | ValueArg stest("s", "Bs", "string test", true, "homer", 82 | "string"); 83 | cmd.add( stest ); 84 | cmd.add( btest ); 85 | cmd.add( atest ); 86 | 87 | // 88 | // Parse the command line. 89 | // 90 | cmd.parse(argc,argv); 91 | 92 | 93 | // 94 | // Set variables 95 | // 96 | _stringTest = stest.getValue(); 97 | _boolTestB = btest.getValue(); 98 | _boolTestA = atest.getValue(); 99 | 100 | 101 | } catch ( ArgException& e ) 102 | { cout << "ERROR: " << e.error() << " " << e.argId() << endl; } 103 | } 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test4.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test4.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test5 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test5.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "tclap/CmdLine.h" 4 | #include 5 | #include 6 | 7 | using namespace TCLAP; 8 | using namespace std; 9 | 10 | string _orTest; 11 | string _orTest2; 12 | string _testc; 13 | bool _testd; 14 | 15 | void parseOptions(int argc, char** argv); 16 | 17 | int main(int argc, char** argv) 18 | { 19 | 20 | parseOptions(argc,argv); 21 | 22 | cout << "for A OR B we got : " << _orTest<< endl 23 | << "for string C we got : " << _testc << endl 24 | << "for string D we got : " << _testd << endl 25 | << "for E or F or G we got: " << _orTest2 << endl; 26 | 27 | } 28 | 29 | 30 | void parseOptions(int argc, char** argv) 31 | { 32 | try { 33 | 34 | CmdLine cmd("this is a message", ' ', "0.99" ); 35 | 36 | // 37 | // Define arguments 38 | // 39 | 40 | ValueArg atest("a", "aaa", "or test a", true, "homer", "string"); 41 | ValueArg btest("b", "bbb", "or test b", true, "homer", "string"); 42 | cmd.xorAdd( atest, btest ); 43 | 44 | ValueArg ctest("c", "ccc", "c test", true, "homer", "string"); 45 | cmd.add( ctest ); 46 | 47 | SwitchArg dtest("", "ddd", "d test", false); 48 | cmd.add( dtest ); 49 | 50 | ValueArg etest("", "eee", "e test", false, "homer", "string"); 51 | ValueArg ftest("", "fff", "f test", false, "homer", "string"); 52 | ValueArg gtest("g", "ggg", "g test", false, "homer", "string"); 53 | vector xorlist; 54 | xorlist.push_back(&etest); 55 | xorlist.push_back(&ftest); 56 | xorlist.push_back(>est); 57 | cmd.xorAdd( xorlist ); 58 | 59 | MultiArg itest("i", "iii", "or test i", true, "string"); 60 | MultiArg jtest("j", "jjj", "or test j", true, "string"); 61 | cmd.xorAdd( itest, jtest ); 62 | 63 | // 64 | // Parse the command line. 65 | // 66 | cmd.parse(argc,argv); 67 | 68 | 69 | // 70 | // Set variables 71 | // 72 | 73 | if ( atest.isSet() ) 74 | _orTest = atest.getValue(); 75 | else if ( btest.isSet() ) 76 | _orTest = btest.getValue(); 77 | else 78 | // Should never get here because TCLAP will note that one of the 79 | // required args above has not been set. 80 | throw("very bad things..."); 81 | 82 | _testc = ctest.getValue(); 83 | _testd = dtest.getValue(); 84 | 85 | if ( etest.isSet() ) 86 | _orTest2 = etest.getValue(); 87 | else if ( ftest.isSet() ) 88 | _orTest2 = ftest.getValue(); 89 | else if ( gtest.isSet() ) 90 | _orTest2 = gtest.getValue(); 91 | else 92 | throw("still bad"); 93 | 94 | if ( jtest.isSet() ) 95 | { 96 | cout << "for J:" << endl; 97 | vector v = jtest.getValue(); 98 | for ( int z = 0; static_cast(z) < v.size(); z++ ) 99 | cout << " " << z << " " << v[z] << endl; 100 | } 101 | else if ( itest.isSet() ) 102 | { 103 | cout << "for I:" << endl; 104 | vector v = itest.getValue(); 105 | for ( int z = 0; static_cast(z) < v.size(); z++ ) 106 | cout << " " << z << " " << v[z] << endl; 107 | } 108 | else 109 | throw("yup, still bad"); 110 | 111 | 112 | 113 | } catch ( ArgException& e ) 114 | { cout << "ERROR: " << e.error() << " " << e.argId() << endl; } 115 | } 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test5.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test5.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test6 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test6.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "tclap/CmdLine.h" 3 | 4 | using namespace TCLAP; 5 | using namespace std; 6 | 7 | int main(int argc, char** argv) 8 | { 9 | // Wrap everything in a try block. Do this every time, 10 | // because exceptions will be thrown for problems. 11 | try { 12 | 13 | // Define the command line object. 14 | CmdLine cmd("Command description message", ' ', "0.9"); 15 | 16 | vector allowed; 17 | allowed.push_back("homer"); 18 | allowed.push_back("marge"); 19 | allowed.push_back("bart"); 20 | allowed.push_back("lisa"); 21 | allowed.push_back("maggie"); 22 | ValuesConstraint allowedVals( allowed ); 23 | 24 | ValueArg nameArg("n","name","Name to print",true,"homer", 25 | &allowedVals); 26 | cmd.add( nameArg ); 27 | 28 | vector iallowed; 29 | iallowed.push_back(1); 30 | iallowed.push_back(2); 31 | iallowed.push_back(3); 32 | ValuesConstraint iallowedVals( iallowed ); 33 | 34 | UnlabeledValueArg intArg("times","Number of times to print",true,1, 35 | &iallowedVals,false); 36 | cmd.add( intArg ); 37 | 38 | // Parse the args. 39 | cmd.parse( argc, argv ); 40 | 41 | // Get the value parsed by each arg. 42 | int num = intArg.getValue(); 43 | string name = nameArg.getValue(); 44 | 45 | for ( int i = 0; i < num; i++ ) 46 | cout << "My name is " << name << endl; 47 | 48 | } catch ( ArgException& e) // catch any exceptions 49 | { cerr << "error: " << e.error() << " for arg " << e.argId() << endl; } 50 | } 51 | 52 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test6.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test6.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test7 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test7.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test7.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test8 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test8.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "tclap/CmdLine.h" 4 | #include 5 | #include 6 | 7 | using namespace TCLAP; 8 | using namespace std; 9 | 10 | bool _boolTestB; 11 | string _stringTest; 12 | string _utest; 13 | string _ztest; 14 | 15 | void parseOptions(int argc, char** argv); 16 | 17 | int main(int argc, char** argv) 18 | { 19 | 20 | parseOptions(argc,argv); 21 | 22 | cout << "for string we got : " << _stringTest<< endl 23 | << "for ulabeled one we got : " << _utest << endl 24 | << "for ulabeled two we got : " << _ztest << endl 25 | << "for bool B we got : " << _boolTestB << endl; 26 | 27 | } 28 | 29 | 30 | void parseOptions(int argc, char** argv) 31 | { 32 | try { 33 | 34 | CmdLine cmd("this is a message", '=', "0.99" ); 35 | 36 | // 37 | // Define arguments 38 | // 39 | 40 | SwitchArg btest("B","existTestB", "exist Test B", cmd, false); 41 | 42 | ValueArg stest("s", "stringTest", "string test", true, "homer", 43 | "string", cmd ); 44 | 45 | UnlabeledValueArg utest("unTest1","unlabeled test one", true, 46 | "default","string", cmd ); 47 | 48 | UnlabeledValueArg ztest("unTest2","unlabeled test two", true, 49 | "default","string", cmd ); 50 | 51 | MultiArg itest("i", "intTest", "multi int test", false,"int", cmd ); 52 | 53 | MultiArg ftest("f", "floatTest", "multi float test", false,"float", 54 | cmd ); 55 | 56 | UnlabeledMultiArg mtest("fileName","file names", false, 57 | "fileNameString", cmd); 58 | // 59 | // Parse the command line. 60 | // 61 | cmd.parse(argc,argv); 62 | 63 | 64 | // 65 | // Set variables 66 | // 67 | _stringTest = stest.getValue(); 68 | _boolTestB = btest.getValue(); 69 | _utest = utest.getValue(); 70 | _ztest = ztest.getValue(); 71 | 72 | vector vi = itest.getValue(); 73 | for ( int i = 0; static_cast(i) < vi.size(); i++ ) 74 | cout << "[-i] " << i << " " << vi[i] << endl; 75 | 76 | vector vf = ftest.getValue(); 77 | for ( int i = 0; static_cast(i) < vf.size(); i++ ) 78 | cout << "[-f] " << i << " " << vf[i] << endl; 79 | 80 | vector v = mtest.getValue(); 81 | for ( int i = 0; static_cast(i) < v.size(); i++ ) 82 | cout << "[ ] " << i << " " << v[i] << endl; 83 | 84 | } catch ( ArgException& e ) 85 | { cout << "ERROR: " << e.error() << " " << e.argId() << endl; } 86 | } 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test8.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test8.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test9 -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test9.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "tclap/CmdLine.h" 5 | 6 | using namespace TCLAP; 7 | using namespace std; 8 | 9 | int main(int argc, char** argv) 10 | { 11 | try { 12 | 13 | CmdLine cmd("Command description message", ' ', "0.9",false); 14 | 15 | SwitchArg reverseSwitch("r","reverse","REVERSE instead of FORWARDS", false); 16 | cmd.add( reverseSwitch ); 17 | 18 | MultiSwitchArg verbose("V","verbose","Level of verbosity"); 19 | cmd.add( verbose ); 20 | 21 | MultiSwitchArg noise("N","noise","Level of noise",5); 22 | cmd.add( noise ); 23 | 24 | UnlabeledValueArg word("word","a random word", false, "string", 25 | "won't see this",false); 26 | cmd.add( word ); 27 | 28 | // Uncommenting the next arg will (correctly) cause an exception 29 | // to be thrown. 30 | 31 | // UnlabeledMultiArg badword("badword","a bad word", false,"string"); 32 | // 33 | // cmd.add( badword ); 34 | 35 | cmd.parse( argc, argv ); 36 | 37 | bool reverseName = reverseSwitch.getValue(); 38 | 39 | if ( reverseName ) 40 | cout << "REVERSE" << endl; 41 | else 42 | cout << "FORWARD" << endl; 43 | 44 | if ( verbose.isSet() ) 45 | cout << "Verbose level: " << verbose.getValue() << endl; 46 | 47 | if ( noise.isSet() ) 48 | cout << "Noise level: " << noise.getValue() << endl; 49 | 50 | if ( word.isSet() ) 51 | cout << "Word: " << word.getValue() << endl; 52 | 53 | } catch (ArgException &e) // catch any exceptions 54 | { cerr << "error: " << e.error() << " for arg " << e.argId() << endl; } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/examples/test9.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/examples/test9.o -------------------------------------------------------------------------------- /lib/tclap-1.2.2/include/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = tclap 2 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/include/tclap/ArgTraits.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | /****************************************************************************** 4 | * 5 | * file: ArgTraits.h 6 | * 7 | * Copyright (c) 2007, Daniel Aarno, Michael E. Smoot . 8 | * All rights reserved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | // This is an internal tclap file, you should probably not have to 24 | // include this directly 25 | 26 | #ifndef TCLAP_ARGTRAITS_H 27 | #define TCLAP_ARGTRAITS_H 28 | 29 | namespace TCLAP { 30 | 31 | // We use two empty structs to get compile type specialization 32 | // function to work 33 | 34 | /** 35 | * A value like argument value type is a value that can be set using 36 | * operator>>. This is the default value type. 37 | */ 38 | struct ValueLike { 39 | typedef ValueLike ValueCategory; 40 | virtual ~ValueLike() {} 41 | }; 42 | 43 | /** 44 | * A string like argument value type is a value that can be set using 45 | * operator=(string). Useful if the value type contains spaces which 46 | * will be broken up into individual tokens by operator>>. 47 | */ 48 | struct StringLike { 49 | virtual ~StringLike() {} 50 | }; 51 | 52 | /** 53 | * A class can inherit from this object to make it have string like 54 | * traits. This is a compile time thing and does not add any overhead 55 | * to the inherenting class. 56 | */ 57 | struct StringLikeTrait { 58 | typedef StringLike ValueCategory; 59 | virtual ~StringLikeTrait() {} 60 | }; 61 | 62 | /** 63 | * A class can inherit from this object to make it have value like 64 | * traits. This is a compile time thing and does not add any overhead 65 | * to the inherenting class. 66 | */ 67 | struct ValueLikeTrait { 68 | typedef ValueLike ValueCategory; 69 | virtual ~ValueLikeTrait() {} 70 | }; 71 | 72 | /** 73 | * Arg traits are used to get compile type specialization when parsing 74 | * argument values. Using an ArgTraits you can specify the way that 75 | * values gets assigned to any particular type during parsing. The two 76 | * supported types are StringLike and ValueLike. 77 | */ 78 | template 79 | struct ArgTraits { 80 | typedef typename T::ValueCategory ValueCategory; 81 | virtual ~ArgTraits() {} 82 | //typedef ValueLike ValueCategory; 83 | }; 84 | 85 | } // namespace 86 | 87 | #endif 88 | 89 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/include/tclap/CmdLineOutput.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /****************************************************************************** 4 | * 5 | * file: CmdLineOutput.h 6 | * 7 | * Copyright (c) 2004, Michael E. Smoot 8 | * All rights reserved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | #ifndef TCLAP_CMDLINEOUTPUT_H 24 | #define TCLAP_CMDLINEOUTPUT_H 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | namespace TCLAP { 34 | 35 | class CmdLineInterface; 36 | class ArgException; 37 | 38 | /** 39 | * The interface that any output object must implement. 40 | */ 41 | class CmdLineOutput 42 | { 43 | 44 | public: 45 | 46 | /** 47 | * Virtual destructor. 48 | */ 49 | virtual ~CmdLineOutput() {} 50 | 51 | /** 52 | * Generates some sort of output for the USAGE. 53 | * \param c - The CmdLine object the output is generated for. 54 | */ 55 | virtual void usage(CmdLineInterface& c)=0; 56 | 57 | /** 58 | * Generates some sort of output for the version. 59 | * \param c - The CmdLine object the output is generated for. 60 | */ 61 | virtual void version(CmdLineInterface& c)=0; 62 | 63 | /** 64 | * Generates some sort of output for a failure. 65 | * \param c - The CmdLine object the output is generated for. 66 | * \param e - The ArgException that caused the failure. 67 | */ 68 | virtual void failure( CmdLineInterface& c, 69 | ArgException& e )=0; 70 | 71 | }; 72 | 73 | } //namespace TCLAP 74 | #endif 75 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/include/tclap/Constraint.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: Constraint.h 5 | * 6 | * Copyright (c) 2005, Michael E. Smoot 7 | * All rights reserved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | #ifndef TCLAP_CONSTRAINT_H 23 | #define TCLAP_CONSTRAINT_H 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | namespace TCLAP { 33 | 34 | /** 35 | * The interface that defines the interaction between the Arg and Constraint. 36 | */ 37 | template 38 | class Constraint 39 | { 40 | 41 | public: 42 | /** 43 | * Returns a description of the Constraint. 44 | */ 45 | virtual std::string description() const =0; 46 | 47 | /** 48 | * Returns the short ID for the Constraint. 49 | */ 50 | virtual std::string shortID() const =0; 51 | 52 | /** 53 | * The method used to verify that the value parsed from the command 54 | * line meets the constraint. 55 | * \param value - The value that will be checked. 56 | */ 57 | virtual bool check(const T& value) const =0; 58 | 59 | /** 60 | * Destructor. 61 | * Silences warnings about Constraint being a base class with virtual 62 | * functions but without a virtual destructor. 63 | */ 64 | virtual ~Constraint() { ; } 65 | }; 66 | 67 | } //namespace TCLAP 68 | #endif 69 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/include/tclap/HelpVisitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: HelpVisitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reserved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | #ifndef TCLAP_HELP_VISITOR_H 23 | #define TCLAP_HELP_VISITOR_H 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | /** 32 | * A Visitor object that calls the usage method of the given CmdLineOutput 33 | * object for the specified CmdLine object. 34 | */ 35 | class HelpVisitor: public Visitor 36 | { 37 | private: 38 | /** 39 | * Prevent accidental copying. 40 | */ 41 | HelpVisitor(const HelpVisitor& rhs); 42 | HelpVisitor& operator=(const HelpVisitor& rhs); 43 | 44 | protected: 45 | 46 | /** 47 | * The CmdLine the output will be generated for. 48 | */ 49 | CmdLineInterface* _cmd; 50 | 51 | /** 52 | * The output object. 53 | */ 54 | CmdLineOutput** _out; 55 | 56 | public: 57 | 58 | /** 59 | * Constructor. 60 | * \param cmd - The CmdLine the output will be generated for. 61 | * \param out - The type of output. 62 | */ 63 | HelpVisitor(CmdLineInterface* cmd, CmdLineOutput** out) 64 | : Visitor(), _cmd( cmd ), _out( out ) { } 65 | 66 | /** 67 | * Calls the usage method of the CmdLineOutput for the 68 | * specified CmdLine. 69 | */ 70 | void visit() { (*_out)->usage(*_cmd); throw ExitException(0); } 71 | 72 | }; 73 | 74 | } 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/include/tclap/IgnoreRestVisitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: IgnoreRestVisitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reserved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef TCLAP_IGNORE_REST_VISITOR_H 24 | #define TCLAP_IGNORE_REST_VISITOR_H 25 | 26 | #include 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | /** 32 | * A Visitor that tells the CmdLine to begin ignoring arguments after 33 | * this one is parsed. 34 | */ 35 | class IgnoreRestVisitor: public Visitor 36 | { 37 | public: 38 | 39 | /** 40 | * Constructor. 41 | */ 42 | IgnoreRestVisitor() : Visitor() {} 43 | 44 | /** 45 | * Sets Arg::_ignoreRest. 46 | */ 47 | void visit() { Arg::beginIgnoring(); } 48 | }; 49 | 50 | } 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/include/tclap/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | libtclapincludedir = $(includedir)/tclap 3 | 4 | libtclapinclude_HEADERS = \ 5 | CmdLineInterface.h \ 6 | ArgException.h \ 7 | CmdLine.h \ 8 | XorHandler.h \ 9 | MultiArg.h \ 10 | UnlabeledMultiArg.h \ 11 | ValueArg.h \ 12 | UnlabeledValueArg.h \ 13 | Visitor.h Arg.h \ 14 | HelpVisitor.h \ 15 | SwitchArg.h \ 16 | MultiSwitchArg.h \ 17 | VersionVisitor.h \ 18 | IgnoreRestVisitor.h \ 19 | CmdLineOutput.h \ 20 | StdOutput.h \ 21 | DocBookOutput.h \ 22 | ZshCompletionOutput.h \ 23 | OptionalUnlabeledTracker.h \ 24 | Constraint.h \ 25 | ValuesConstraint.h \ 26 | ArgTraits.h \ 27 | StandardTraits.h \ 28 | sstream.h 29 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/include/tclap/OptionalUnlabeledTracker.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /****************************************************************************** 4 | * 5 | * file: OptionalUnlabeledTracker.h 6 | * 7 | * Copyright (c) 2005, Michael E. Smoot . 8 | * All rights reserved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | 24 | #ifndef TCLAP_OPTIONAL_UNLABELED_TRACKER_H 25 | #define TCLAP_OPTIONAL_UNLABELED_TRACKER_H 26 | 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | class OptionalUnlabeledTracker 32 | { 33 | 34 | public: 35 | 36 | static void check( bool req, const std::string& argName ); 37 | 38 | static void gotOptional() { alreadyOptionalRef() = true; } 39 | 40 | static bool& alreadyOptional() { return alreadyOptionalRef(); } 41 | 42 | private: 43 | 44 | static bool& alreadyOptionalRef() { static bool ct = false; return ct; } 45 | }; 46 | 47 | 48 | inline void OptionalUnlabeledTracker::check( bool req, const std::string& argName ) 49 | { 50 | if ( OptionalUnlabeledTracker::alreadyOptional() ) 51 | throw( SpecificationException( 52 | "You can't specify ANY Unlabeled Arg following an optional Unlabeled Arg", 53 | argName ) ); 54 | 55 | if ( !req ) 56 | OptionalUnlabeledTracker::gotOptional(); 57 | } 58 | 59 | 60 | } // namespace TCLAP 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/include/tclap/VersionVisitor.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | /****************************************************************************** 4 | * 5 | * file: VersionVisitor.h 6 | * 7 | * Copyright (c) 2003, Michael E. Smoot . 8 | * All rights reserved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | 24 | #ifndef TCLAP_VERSION_VISITOR_H 25 | #define TCLAP_VERSION_VISITOR_H 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | namespace TCLAP { 32 | 33 | /** 34 | * A Visitor that will call the version method of the given CmdLineOutput 35 | * for the specified CmdLine object and then exit. 36 | */ 37 | class VersionVisitor: public Visitor 38 | { 39 | private: 40 | /** 41 | * Prevent accidental copying 42 | */ 43 | VersionVisitor(const VersionVisitor& rhs); 44 | VersionVisitor& operator=(const VersionVisitor& rhs); 45 | 46 | protected: 47 | 48 | /** 49 | * The CmdLine of interest. 50 | */ 51 | CmdLineInterface* _cmd; 52 | 53 | /** 54 | * The output object. 55 | */ 56 | CmdLineOutput** _out; 57 | 58 | public: 59 | 60 | /** 61 | * Constructor. 62 | * \param cmd - The CmdLine the output is generated for. 63 | * \param out - The type of output. 64 | */ 65 | VersionVisitor( CmdLineInterface* cmd, CmdLineOutput** out ) 66 | : Visitor(), _cmd( cmd ), _out( out ) { } 67 | 68 | /** 69 | * Calls the version method of the output object using the 70 | * specified CmdLine. 71 | */ 72 | void visit() { 73 | (*_out)->version(*_cmd); 74 | throw ExitException(0); 75 | } 76 | 77 | }; 78 | 79 | } 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/include/tclap/Visitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: Visitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reserved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef TCLAP_VISITOR_H 24 | #define TCLAP_VISITOR_H 25 | 26 | namespace TCLAP { 27 | 28 | /** 29 | * A base class that defines the interface for visitors. 30 | */ 31 | class Visitor 32 | { 33 | public: 34 | 35 | /** 36 | * Constructor. Does nothing. 37 | */ 38 | Visitor() { } 39 | 40 | /** 41 | * Destructor. Does nothing. 42 | */ 43 | virtual ~Visitor() { } 44 | 45 | /** 46 | * Does nothing. Should be overridden by child. 47 | */ 48 | virtual void visit() { } 49 | }; 50 | 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/include/tclap/sstream.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | /****************************************************************************** 4 | * 5 | * file: sstream.h 6 | * 7 | * Copyright (c) 2003, Michael E. Smoot . 8 | * Copyright (c) 2004, Michael E. Smoot, Daniel Aarno . 9 | * Copyright (c) 2017 Google Inc. 10 | * All rights reserved. 11 | * 12 | * See the file COPYING in the top directory of this distribution for 13 | * more information. 14 | * 15 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | * DEALINGS IN THE SOFTWARE. 22 | * 23 | *****************************************************************************/ 24 | 25 | #ifndef TCLAP_SSTREAM_H 26 | #define TCLAP_SSTREAM_H 27 | 28 | #if !defined(HAVE_STRSTREAM) 29 | // Assume sstream is available if strstream is not specified 30 | // (https://sourceforge.net/p/tclap/bugs/23/) 31 | #define HAVE_SSTREAM 32 | #endif 33 | 34 | #if defined(HAVE_SSTREAM) 35 | #include 36 | namespace TCLAP { 37 | typedef std::istringstream istringstream; 38 | typedef std::ostringstream ostringstream; 39 | } 40 | #elif defined(HAVE_STRSTREAM) 41 | #include 42 | namespace TCLAP { 43 | typedef std::istrstream istringstream; 44 | typedef std::ostrstream ostringstream; 45 | } 46 | #else 47 | #error "Need a stringstream (sstream or strstream) to compile!" 48 | #endif 49 | 50 | #endif // TCLAP_SSTREAM_H 51 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/msc/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = examples 2 | 3 | EXTRA_DIST = README\ 4 | tclap-beta.ncb\ 5 | tclap-beta.sln\ 6 | tclap-beta.suo\ 7 | tclap-beta.vcproj 8 | 9 | 10 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/msc/README: -------------------------------------------------------------------------------- 1 | 2 | Disclaimer! 3 | =========== 4 | 5 | The various files included in the subdirectory for provided as a courtesy 6 | to Microsoft Visual Studio users. The files were contributed by a thoughtful 7 | user and were not created by the authors of this project. Moreover, the 8 | (current) authors have no way of maintaining, improving or even using the 9 | files. 10 | 11 | ** This means we can't answer any questions about the files! ** 12 | 13 | That said, we have several reports of people successfully using the TCLAP 14 | library on various Windows platforms. As long as you use a reasonably modern 15 | compiler (and Visual C++ apparently is), you shouldn't have any trouble. 16 | 17 | Good luck! 18 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/msc/examples/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | EXTRA_DIST = test1.vcproj\ 3 | test2.vcproj\ 4 | test3.vcproj\ 5 | test4.vcproj\ 6 | test5.vcproj\ 7 | test6.vcproj\ 8 | test7.vcproj\ 9 | test8.vcproj 10 | 11 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/msc/tclap-beta.ncb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/msc/tclap-beta.ncb -------------------------------------------------------------------------------- /lib/tclap-1.2.2/msc/tclap-beta.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/lib/tclap-1.2.2/msc/tclap-beta.suo -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tclap.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr/local 2 | includedir=${prefix}/include 3 | 4 | Name: tclap 5 | Description: Templatized C++ Command Line Parser 6 | Version: 1.2.2 7 | Cflags: -I${includedir} 8 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tclap.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | includedir=@includedir@ 3 | 4 | Name: tclap 5 | Description: Templatized C++ Command Line Parser 6 | Version: @VERSION@ 7 | Cflags: -I${includedir} 8 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | 3 | TESTS = test1.sh \ 4 | test2.sh \ 5 | test3.sh \ 6 | test4.sh \ 7 | test5.sh \ 8 | test6.sh \ 9 | test7.sh \ 10 | test8.sh \ 11 | test9.sh \ 12 | test10.sh \ 13 | test11.sh \ 14 | test12.sh \ 15 | test13.sh \ 16 | test14.sh \ 17 | test15.sh \ 18 | test16.sh \ 19 | test17.sh \ 20 | test18.sh \ 21 | test19.sh \ 22 | test20.sh \ 23 | test21.sh \ 24 | test22.sh \ 25 | test23.sh \ 26 | test24.sh \ 27 | test25.sh \ 28 | test26.sh \ 29 | test27.sh \ 30 | test28.sh \ 31 | test29.sh \ 32 | test30.sh \ 33 | test31.sh \ 34 | test32.sh \ 35 | test33.sh \ 36 | test34.sh \ 37 | test35.sh \ 38 | test36.sh \ 39 | test37.sh \ 40 | test38.sh \ 41 | test39.sh \ 42 | test40.sh \ 43 | test41.sh \ 44 | test42.sh \ 45 | test43.sh \ 46 | test44.sh \ 47 | test45.sh \ 48 | test46.sh \ 49 | test47.sh \ 50 | test48.sh \ 51 | test49.sh \ 52 | test50.sh \ 53 | test51.sh \ 54 | test52.sh \ 55 | test53.sh \ 56 | test54.sh \ 57 | test55.sh \ 58 | test56.sh \ 59 | test57.sh \ 60 | test58.sh \ 61 | test59.sh \ 62 | test60.sh \ 63 | test61.sh \ 64 | test62.sh \ 65 | test63.sh \ 66 | test64.sh \ 67 | test65.sh \ 68 | test66.sh \ 69 | test67.sh \ 70 | test68.sh \ 71 | test69.sh \ 72 | test70.sh \ 73 | test71.sh \ 74 | test72.sh \ 75 | test73.sh \ 76 | test74.sh \ 77 | test75.sh \ 78 | test76.sh \ 79 | test77.sh \ 80 | test78.sh \ 81 | test79.sh 82 | 83 | EXTRA_DIST = $(TESTS) \ 84 | test1.out \ 85 | test2.out \ 86 | test3.out \ 87 | test4.out \ 88 | test5.out \ 89 | test6.out \ 90 | test7.out \ 91 | test8.out \ 92 | test9.out \ 93 | test10.out \ 94 | test11.out \ 95 | test12.out \ 96 | test13.out \ 97 | test14.out \ 98 | test15.out \ 99 | test16.out \ 100 | test17.out \ 101 | test18.out \ 102 | test19.out \ 103 | test20.out \ 104 | test21.out \ 105 | test22.out \ 106 | test23.out \ 107 | test24.out \ 108 | test25.out \ 109 | test26.out \ 110 | test27.out \ 111 | test28.out \ 112 | test29.out \ 113 | test30.out \ 114 | test31.out \ 115 | test32.out \ 116 | test33.out \ 117 | test34.out \ 118 | test35.out \ 119 | test36.out \ 120 | test37.out \ 121 | test38.out \ 122 | test39.out \ 123 | test40.out \ 124 | test41.out \ 125 | test42.out \ 126 | test43.out \ 127 | test44.out \ 128 | test45.out \ 129 | test46.out \ 130 | test47.out \ 131 | test48.out \ 132 | test49.out \ 133 | test50.out \ 134 | test51.out \ 135 | test52.out \ 136 | test53.out \ 137 | test54.out \ 138 | test55.out \ 139 | test56.out \ 140 | test57.out \ 141 | test58.out \ 142 | test59.out \ 143 | test60.out \ 144 | test61.out \ 145 | test62.out \ 146 | test63.out \ 147 | test64.out \ 148 | test65.out \ 149 | test66.out \ 150 | test67.out \ 151 | test68.out \ 152 | test69.out \ 153 | test70.out \ 154 | test71.out \ 155 | test72.out \ 156 | test73.out \ 157 | test74.out \ 158 | test75.out \ 159 | test76.out \ 160 | test77.out \ 161 | test78.out \ 162 | test79.out 163 | 164 | CLEANFILES = tmp.out 165 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test1.out: -------------------------------------------------------------------------------- 1 | My name (spelled backwards) is: ekim 2 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test1 -r -n mike > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test1.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test10.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: 2 | Required argument missing: unTest 3 | 4 | Brief USAGE: 5 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 6 | [--version] [-h] ... 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test2 --help 10 | 11 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test10.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test2 -i 10 -s hello > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test10.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test11.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -i (--intTest) 2 | Argument already set! 3 | 4 | Brief USAGE: 5 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 6 | [--version] [-h] ... 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test2 --help 10 | 11 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test11.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test2 -i 10 -s hello -i 9 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test11.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test12.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -f (--floatTest) 2 | Couldn't read argument value from string 'nine' 3 | 4 | Brief USAGE: 5 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 6 | [--version] [-h] ... 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test2 --help 10 | 11 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test12.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test2 -i 10 -s hello -f nine > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test12.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test13.out: -------------------------------------------------------------------------------- 1 | [-i] 0 9 2 | [-i] 1 8 3 | [ ] 0 bart 4 | for string we got : bill 5 | for ulabeled one we got : homer 6 | for ulabeled two we got : marge 7 | for bool B we got : 1 8 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test13.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test3 --stringTest=bill -i=9 -i=8 -B homer marge bart > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test13.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test14.out: -------------------------------------------------------------------------------- 1 | [ ] 0 bart 2 | [ ] 1 one 3 | [ ] 2 two 4 | for string we got : aaa 5 | for ulabeled one we got : homer 6 | for ulabeled two we got : marge 7 | for bool B we got : 0 8 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test14.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test3 --stringTest=aaa homer marge bart -- one two > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test14.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test15.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: (--stringTest) 2 | Couldn't find delimiter for this argument! 3 | 4 | Brief USAGE: 5 | ../examples/test3 [-f=] ... [-i=] ... 6 | --stringTest= [-B] [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test3 --help 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test15.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test3 --stringTest bbb homer marge bart -- -hv two > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test15.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test16.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: (--stringTest) 2 | Couldn't find delimiter for this argument! 3 | 4 | Brief USAGE: 5 | ../examples/test3 [-f=] ... [-i=] ... 6 | --stringTest= [-B] [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test3 --help 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test16.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test3 --stringTest one homer -B -Bh > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test16.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test17.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: 2 | Required argument missing: unTest2 3 | 4 | Brief USAGE: 5 | ../examples/test3 [-f=] ... [-i=] ... 6 | --stringTest= [-B] [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test3 --help 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test17.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test3 --stringTest=one homer -B > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test17.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test18.out: -------------------------------------------------------------------------------- 1 | my failure message: 2 | -s -- Couldn't find match for argument 3 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test18.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test4 -Bs --Bs asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test18.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test19.out: -------------------------------------------------------------------------------- 1 | for string we got : asdf 2 | for bool B we got : 1 3 | for bool A we got : 1 4 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test19.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test4 -BA --Bs asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test19.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test2.out: -------------------------------------------------------------------------------- 1 | My name is: mike 2 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test1 -n mike > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test2.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test20.out: -------------------------------------------------------------------------------- 1 | for I: 2 | 0 sss 3 | 1 fdsf 4 | for A OR B we got : asdf 5 | for string C we got : fdas 6 | for string D we got : 0 7 | for E or F or G we got: blah 8 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test20.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test5 -a asdf -c fdas --eee blah -i sss -i fdsf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test20.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test21.out: -------------------------------------------------------------------------------- 1 | for J: 2 | 0 homer 3 | for A OR B we got : asdf 4 | for string C we got : fdas 5 | for string D we got : 0 6 | for E or F or G we got: asdf 7 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test21.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test5 -b asdf -c fdas -g asdf -j homer > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test21.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test22.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -b (--bbb) 2 | Mutually exclusive argument already set! 3 | 4 | Brief USAGE: 5 | ../examples/test5 {-a |-b } {--eee |--fff 6 | |-g } {-i ... |-j 7 | ... } [--ddd] -c [--] [--version] [-h] 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test5 --help 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test22.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test5 -a fdsa -b asdf -c fdas > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test22.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test23.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -d 2 | Couldn't find match for argument 3 | 4 | Brief USAGE: 5 | ../examples/test5 {-a |-b } {--eee |--fff 6 | |-g } {-i ... |-j 7 | ... } [--ddd] -c [--] [--version] [-h] 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test5 --help 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test23.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test5 -d junk -c fdas > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test23.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test24.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -b (--bbb) 2 | Mutually exclusive argument already set! 3 | 4 | Brief USAGE: 5 | ../examples/test5 {-a |-b } {--eee |--fff 6 | |-g } {-i ... |-j 7 | ... } [--ddd] -c [--] [--version] [-h] 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test5 --help 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test24.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test5 --aaa dilbert -b asdf -c fdas > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test24.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test25.out: -------------------------------------------------------------------------------- 1 | for I: 2 | 0 one 3 | 1 two 4 | for A OR B we got : asdf 5 | for string C we got : fdas 6 | for string D we got : 0 7 | for E or F or G we got: blah 8 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test25.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test5 --aaa asdf -c fdas --fff blah -i one -i two > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test25.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test26.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -f (--floatTest) 2 | More than one valid value parsed from string '4..2' 3 | 4 | Brief USAGE: 5 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 6 | [--version] [-h] ... 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test2 --help 10 | 11 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test26.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test2 -i 2 -f 4..2 -s asdf asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test26.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test27.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -f (--floatTest) 2 | More than one valid value parsed from string '4.0.2' 3 | 4 | Brief USAGE: 5 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 6 | [--version] [-h] ... 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test2 --help 10 | 11 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test27.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test2 -i 2 -f 4.0.2 -s asdf asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test27.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test28.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -i (--intTest) 2 | Couldn't read argument value from string '2a' 3 | 4 | Brief USAGE: 5 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 6 | [--version] [-h] ... 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test2 --help 10 | 11 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test28.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test2 -i 2a -f 4.2 -s asdf asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test28.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test29.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -i (--intTest) 2 | Couldn't read argument value from string '0xA' 3 | 4 | Brief USAGE: 5 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 6 | [--version] [-h] ... 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test2 --help 10 | 11 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test29.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure... no hex here, but see test19.cpp for how to use hex 4 | ../examples/test2 -i 0xA -f 4.2 -s asdf asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test29.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test3.out: -------------------------------------------------------------------------------- 1 | My name (spelled backwards) is: ekim 2 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test1 -n mike -r > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test3.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test30.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -i (--intTest) 2 | Couldn't read argument value from string '2.1' 3 | 4 | Brief USAGE: 5 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 6 | [--version] [-h] ... 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test2 --help 10 | 11 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test30.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test2 -i 2.1 -f 4.2 -s asdf asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test30.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test31.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -i (--intTest) 2 | Couldn't read argument value from string '9a' 3 | 4 | Brief USAGE: 5 | ../examples/test3 [-f=] ... [-i=] ... 6 | --stringTest= [-B] [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test3 --help 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test31.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test3 -i=9a -i=1 -s=asdf asdf asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test31.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test32.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -f (--floatTest) 2 | More than one valid value parsed from string '1.0.0' 3 | 4 | Brief USAGE: 5 | ../examples/test3 [-f=] ... [-i=] ... 6 | --stringTest= [-B] [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test3 --help 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test32.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test3 -f=9 -f=1.0.0 -s=asdf asdf asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test32.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test33.out: -------------------------------------------------------------------------------- 1 | for J: 2 | 0 o 3 | 1 t 4 | for A OR B we got : asdf 5 | for string C we got : fdas 6 | for string D we got : 1 7 | for E or F or G we got: blah 8 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test33.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test5 -a asdf -c fdas --eee blah --ddd -j o --jjj t > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test33.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test34.out: -------------------------------------------------------------------------------- 1 | My name is homer 2 | My name is homer 3 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test34.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test6 -n homer 2 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test34.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test35.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -n (--name) 2 | Value 'mike' does not meet constraint: homer|marge|bart|lisa|maggie 3 | 4 | Brief USAGE: 5 | ../examples/test6 -n [--] [--version] 6 | [-h] <1|2|3> 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test6 --help 10 | 11 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test35.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test6 -n mike 2 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test35.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test36.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: (--times) 2 | Value '6' does not meet constraint: 1|2|3 3 | 4 | Brief USAGE: 5 | ../examples/test6 -n [--] [--version] 6 | [-h] <1|2|3> 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test6 --help 10 | 11 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test36.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test6 -n homer 6 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test36.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test37.out: -------------------------------------------------------------------------------- 1 | Got num 2 2 | Got num 1 3 | Got num 3 4 | Got name homer 5 | Got name marge 6 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test37.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test7 -n homer 2 -n marge 1 3 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test37.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test38.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -n (--name) 2 | Value 'mike' does not meet constraint: homer|marge|bart|lisa|maggie 3 | 4 | Brief USAGE: 5 | ThisIsAVeryLongProgramNameDesignedToTestSpacePrintWhichUsedToHaveProblem 6 | sWithLongProgramNamesIThinkItIsNowL 7 | ongEnough [-l ] [-u ] [-b ] [-z 9 | ] [-x ] [-s 10 | ] [-d] [-g ] [-f ] -n ... [--] 13 | [--version] [-h] <1|2|3> ... 14 | 15 | For complete USAGE and HELP type: 16 | ThisIsAVeryLongProgramNameDesignedToTestSpacePrintWhichUsedToHaveProblemsWithLongProgramNamesIThinkItIsNowLongEnough --help 17 | 18 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test38.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test7 -n mike 2 1 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test38.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test39.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: (--times) 2 | Value '6' does not meet constraint: 1|2|3 3 | 4 | Brief USAGE: 5 | ThisIsAVeryLongProgramNameDesignedToTestSpacePrintWhichUsedToHaveProblem 6 | sWithLongProgramNamesIThinkItIsNowL 7 | ongEnough [-l ] [-u ] [-b ] [-z 9 | ] [-x ] [-s 10 | ] [-d] [-g ] [-f ] -n ... [--] 13 | [--version] [-h] <1|2|3> ... 14 | 15 | For complete USAGE and HELP type: 16 | ThisIsAVeryLongProgramNameDesignedToTestSpacePrintWhichUsedToHaveProblemsWithLongProgramNamesIThinkItIsNowLongEnough --help 17 | 18 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test39.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test7 2 -n homer -n bart 6 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test39.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test4.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: 2 | Required argument missing: name 3 | 4 | Brief USAGE: 5 | ../examples/test1 [-r] -n [--] [--version] [-h] 6 | 7 | For complete USAGE and HELP type: 8 | ../examples/test1 --help 9 | 10 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test4.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test1 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test4.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test40.out: -------------------------------------------------------------------------------- 1 | 2 | USAGE: 3 | 4 | ../examples/test1 [-r] -n [--] [--version] [-h] 5 | 6 | 7 | Where: 8 | 9 | -r, --reverse 10 | Print name backwards 11 | 12 | -n , --name 13 | (required) Name to print 14 | 15 | --, --ignore_rest 16 | Ignores the rest of the labeled arguments following this flag. 17 | 18 | --version 19 | Displays version information and exits. 20 | 21 | -h, --help 22 | Displays usage information and exits. 23 | 24 | 25 | Command description message 26 | 27 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test40.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test1 --help > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test40.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test41.out: -------------------------------------------------------------------------------- 1 | 2 | USAGE: 3 | 4 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 5 | [--version] [-h] ... 6 | 7 | 8 | Where: 9 | 10 | -f , --floatTest 11 | float test 12 | 13 | -i , --intTest 14 | (required) integer test 15 | 16 | -s , --stringTest 17 | (required) string test 18 | 19 | -A, --existTestA 20 | tests for the existence of A 21 | 22 | -C, --existTestC 23 | tests for the existence of C 24 | 25 | -B, --existTestB 26 | tests for the existence of B 27 | 28 | --, --ignore_rest 29 | Ignores the rest of the labeled arguments following this flag. 30 | 31 | --version 32 | Displays version information and exits. 33 | 34 | -h, --help 35 | Displays usage information and exits. 36 | 37 | 38 | (required) unlabeld test 39 | 40 | (accepted multiple times) 41 | file names 42 | 43 | 44 | this is a message 45 | 46 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test41.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test2 --help > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test41.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test42.out: -------------------------------------------------------------------------------- 1 | 2 | USAGE: 3 | 4 | ../examples/test3 [-f=] ... [-i=] ... 5 | --stringTest= [-B] [--] [--version] [-h] 6 | ... 7 | 8 | 9 | Where: 10 | 11 | -f=, --floatTest= (accepted multiple times) 12 | multi float test 13 | 14 | -i=, --intTest= (accepted multiple times) 15 | multi int test 16 | 17 | --stringTest= 18 | (required) string test 19 | 20 | -B, --existTestB 21 | exist Test B 22 | 23 | --, --ignore_rest 24 | Ignores the rest of the labeled arguments following this flag. 25 | 26 | --version 27 | Displays version information and exits. 28 | 29 | -h, --help 30 | Displays usage information and exits. 31 | 32 | 33 | (required) unlabeled test one 34 | 35 | 36 | (required) unlabeled test two 37 | 38 | (accepted multiple times) 39 | file names 40 | 41 | 42 | this is a message 43 | 44 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test42.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test3 --help > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test42.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test43.out: -------------------------------------------------------------------------------- 1 | my usage message: 2 | -A, --sA (exist Test A) 3 | -B, --sB (exist Test B) 4 | -s , --Bs ((required) string test) 5 | --, --ignore_rest (Ignores the rest of the labeled arguments following this flag.) 6 | --version (Displays version information and exits.) 7 | -h, --help (Displays usage information and exits.) 8 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test43.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test4 --help > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test43.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test44.out: -------------------------------------------------------------------------------- 1 | 2 | USAGE: 3 | 4 | ../examples/test5 {-a |-b } {--eee |--fff 5 | |-g } {-i ... |-j 6 | ... } [--ddd] -c [--] [--version] [-h] 7 | 8 | 9 | Where: 10 | 11 | -a , --aaa 12 | (OR required) or test a 13 | -- OR -- 14 | -b , --bbb 15 | (OR required) or test b 16 | 17 | 18 | --eee 19 | (OR required) e test 20 | -- OR -- 21 | --fff 22 | (OR required) f test 23 | -- OR -- 24 | -g , --ggg 25 | (OR required) g test 26 | 27 | 28 | -i , --iii (accepted multiple times) 29 | (OR required) or test i 30 | -- OR -- 31 | -j , --jjj (accepted multiple times) 32 | (OR required) or test j 33 | 34 | 35 | --ddd 36 | d test 37 | 38 | -c , --ccc 39 | (required) c test 40 | 41 | --, --ignore_rest 42 | Ignores the rest of the labeled arguments following this flag. 43 | 44 | --version 45 | Displays version information and exits. 46 | 47 | -h, --help 48 | Displays usage information and exits. 49 | 50 | 51 | this is a message 52 | 53 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test44.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test5 --help > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test44.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test45.out: -------------------------------------------------------------------------------- 1 | 2 | USAGE: 3 | 4 | ../examples/test6 -n [--] [--version] 5 | [-h] <1|2|3> 6 | 7 | 8 | Where: 9 | 10 | -n , --name 12 | (required) Name to print 13 | 14 | --, --ignore_rest 15 | Ignores the rest of the labeled arguments following this flag. 16 | 17 | --version 18 | Displays version information and exits. 19 | 20 | -h, --help 21 | Displays usage information and exits. 22 | 23 | <1|2|3> 24 | (required) Number of times to print 25 | 26 | 27 | Command description message 28 | 29 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test45.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test6 --help > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test45.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test46.out: -------------------------------------------------------------------------------- 1 | 2 | USAGE: 3 | 4 | ThisIsAVeryLongProgramNameDesignedToTestSpacePrintWhichUsedToHaveProblem 5 | sWithLongProgramNamesIThinkItIsNowL 6 | ongEnough [-l ] [-u ] [-b ] [-z 8 | ] [-x ] [-s 9 | ] [-d] [-g ] [-f ] -n ... [--] 12 | [--version] [-h] <1|2|3> ... 13 | 14 | 15 | Where: 16 | 17 | -l , --limit 18 | Max number of alignments allowed 19 | 20 | -u , --upperBound 21 | upper percentage bound 22 | 23 | -b , --lowerBound 24 | lower percentage bound 25 | 26 | -z , --filename2 27 | Sequence 2 filename (FASTA format) 28 | 29 | -x , --filename1 30 | Sequence 1 filename (FASTA format) 31 | 32 | -s , --scoring--Matrix 33 | Scoring Matrix name 34 | 35 | -d, --isDna 36 | The input sequences are DNA 37 | 38 | -g , --gap-Extend 39 | The cost for each extension of a gap 40 | 41 | -f , --gapCreate 42 | The cost of creating a gap 43 | 44 | -n , --name (accepted multiple times) 46 | (required) Name to print. This is a long, nonsensical message to test 47 | line wrapping. Hopefully it works. 48 | 49 | --, --ignore_rest 50 | Ignores the rest of the labeled arguments following this flag. 51 | 52 | --version 53 | Displays version information and exits. 54 | 55 | -h, --help 56 | Displays usage information and exits. 57 | 58 | <1|2|3> (accepted multiple times) 59 | Number of times to print 60 | 61 | 62 | Command description message. This is a long multi-line message meant to 63 | test line wrapping. This is more text that doesn't really do anything 64 | besides take up lots of space that otherwise might be used for something 65 | real. That should be enough, don't you think? 66 | 67 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test46.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test7 --help > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test46.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test47.out: -------------------------------------------------------------------------------- 1 | [-i] 0 9 2 | [-i] 1 8 3 | [ ] 0 bart 4 | for string we got : bill 5 | for ulabeled one we got : homer 6 | for ulabeled two we got : marge 7 | for bool B we got : 1 8 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test47.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test8 -s=bill -i=9 -i=8 -B homer marge bart > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test47.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test48.out: -------------------------------------------------------------------------------- 1 | [ ] 0 bart 2 | [ ] 1 one 3 | [ ] 2 two 4 | for string we got : aaa 5 | for ulabeled one we got : homer 6 | for ulabeled two we got : marge 7 | for bool B we got : 0 8 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test48.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test8 -s=aaa homer marge bart -- one two > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test48.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test49.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -s (--stringTest) 2 | Couldn't find delimiter for this argument! 3 | 4 | Brief USAGE: 5 | ../examples/test8 [-f=] ... [-i=] ... -s= [-B] 6 | [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test8 --help 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test49.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test8 -s bbb homer marge bart -- -hv two > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test49.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test5.out: -------------------------------------------------------------------------------- 1 | 0 bart 2 | 1 lisa 3 | for float we got : 3.7 4 | for int we got : 10 5 | for string we got : homer 6 | for ulabeled we got : marge 7 | for bool A we got : 0 8 | for bool B we got : 0 9 | for bool C we got : 0 10 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test2 -i 10 -s homer marge bart lisa > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test5.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test50.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -s (--stringTest) 2 | Couldn't find delimiter for this argument! 3 | 4 | Brief USAGE: 5 | ../examples/test8 [-f=] ... [-i=] ... -s= [-B] 6 | [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test8 --help 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test50.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test8 -s one homer -B -Bh > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test50.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test51.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: 2 | Required argument missing: unTest2 3 | 4 | Brief USAGE: 5 | ../examples/test8 [-f=] ... [-i=] ... -s= [-B] 6 | [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test8 --help 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test51.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test8 -s=one homer -B > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test51.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test52.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -i (--intTest) 2 | Couldn't read argument value from string '9a' 3 | 4 | Brief USAGE: 5 | ../examples/test8 [-f=] ... [-i=] ... -s= [-B] 6 | [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test8 --help 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test52.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test8 -i=9a -i=1 -s=asdf asdf asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test52.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test53.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -f (--floatTest) 2 | More than one valid value parsed from string '1.0.0' 3 | 4 | Brief USAGE: 5 | ../examples/test8 [-f=] ... [-i=] ... -s= [-B] 6 | [--] [--version] [-h] 7 | ... 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test8 --help 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test53.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test8 -f=9 -f=1.0.0 -s=asdf asdf asdf > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test53.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test54.out: -------------------------------------------------------------------------------- 1 | 2 | USAGE: 3 | 4 | ../examples/test8 [-f=] ... [-i=] ... -s= [-B] 5 | [--] [--version] [-h] 6 | ... 7 | 8 | 9 | Where: 10 | 11 | -f=, --floatTest= (accepted multiple times) 12 | multi float test 13 | 14 | -i=, --intTest= (accepted multiple times) 15 | multi int test 16 | 17 | -s=, --stringTest= 18 | (required) string test 19 | 20 | -B, --existTestB 21 | exist Test B 22 | 23 | --, --ignore_rest 24 | Ignores the rest of the labeled arguments following this flag. 25 | 26 | --version 27 | Displays version information and exits. 28 | 29 | -h, --help 30 | Displays usage information and exits. 31 | 32 | 33 | (required) unlabeled test one 34 | 35 | 36 | (required) unlabeled test two 37 | 38 | (accepted multiple times) 39 | file names 40 | 41 | 42 | this is a message 43 | 44 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test54.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test8 --help > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test54.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test55.out: -------------------------------------------------------------------------------- 1 | [ ] 0 zero 2 | [ ] 1 one 3 | for string we got : asdf 4 | for ulabeled one we got : - 5 | for ulabeled two we got : asdf 6 | for bool B we got : 0 7 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test55.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test3 --stringTest=asdf - asdf zero one > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test55.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test56.out: -------------------------------------------------------------------------------- 1 | 0 one 2 | 1 two 3 | for float we got : 3.7 4 | for int we got : 1 5 | for string we got : fdsa 6 | for ulabeled we got : - 7 | for bool A we got : 0 8 | for bool B we got : 0 9 | for bool C we got : 0 10 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test56.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test2 -i 1 - -s fdsa one two > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test56.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test57.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -i (--iii) 2 | Mutually exclusive argument already set! 3 | 4 | Brief USAGE: 5 | ../examples/test5 {-a |-b } {--eee |--fff 6 | |-g } {-i ... |-j 7 | ... } [--ddd] -c [--] [--version] [-h] 8 | 9 | For complete USAGE and HELP type: 10 | ../examples/test5 --help 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test57.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | # This used to fail on the "Too many arguments!" but now fails sooner, 5 | # and on a more approriate error. 6 | ../examples/test5 --aaa asdf -c fdas --fff blah -i one -i two -j huh > tmp.out 2>&1 7 | 8 | if cmp -s tmp.out $srcdir/test57.out; then 9 | exit 0 10 | else 11 | exit 1 12 | fi 13 | 14 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test58.out: -------------------------------------------------------------------------------- 1 | FORWARD 2 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test58.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test9 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test58.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test59.out: -------------------------------------------------------------------------------- 1 | REVERSE 2 | Verbose level: 3 3 | Noise level: 7 4 | Word: blah 5 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test59.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test9 -VVV -N --noise -r blah > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test59.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test6.out: -------------------------------------------------------------------------------- 1 | for float we got : 3.7 2 | for int we got : 10 3 | for string we got : hello 4 | for ulabeled we got : goodbye 5 | for bool A we got : 1 6 | for bool B we got : 1 7 | for bool C we got : 1 8 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test6.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test2 -i 10 -s hello goodbye -ABC > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test6.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test60.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -r (--reverse) 2 | Argument already set! 3 | 4 | 5 | USAGE: 6 | 7 | ../examples/test9 [-N] ... [-V] ... [-r] [--] 8 | 9 | 10 | Where: 11 | 12 | -N, --noise (accepted multiple times) 13 | Level of noise 14 | 15 | -V, --verbose (accepted multiple times) 16 | Level of verbosity 17 | 18 | -r, --reverse 19 | REVERSE instead of FORWARDS 20 | 21 | --, --ignore_rest 22 | Ignores the rest of the labeled arguments following this flag. 23 | 24 | 25 | a random word 26 | 27 | 28 | Command description message 29 | 30 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test60.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure 4 | ../examples/test9 -VVV -N --noise -rr > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test60.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test61.out: -------------------------------------------------------------------------------- 1 | for float we got : 3.7 2 | for int we got : 10 3 | for string we got : hello 4 | for ulabeled we got : -1 -1 5 | for bool A we got : 0 6 | for bool B we got : 0 7 | for bool C we got : 0 8 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test61.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this tests a bug in handling of - chars in Unlabeled args 4 | # success 5 | ../examples/test2 -i 10 -s hello "-1 -1" > tmp.out 2>&1 6 | 7 | if cmp -s tmp.out $srcdir/test61.out; then 8 | exit 0 9 | else 10 | exit 1 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test62.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: 2 | Required arguments missing: intTest, stringTest, unTest 3 | 4 | Brief USAGE: 5 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 6 | [--version] [-h] ... 7 | 8 | For complete USAGE and HELP type: 9 | ../examples/test2 --help 10 | 11 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test62.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this tests whether all required args are listed as 4 | # missing when no arguments are specified 5 | # failure 6 | ../examples/test2 > tmp.out 2>&1 7 | 8 | if cmp -s tmp.out $srcdir/test62.out; then 9 | exit 0 10 | else 11 | exit 1 12 | fi 13 | 14 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test63.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: 2 | Required argument missing: vect 3 | 4 | Brief USAGE: 5 | ../examples/test11 -v <3D vector> [--] [--version] [-h] 6 | 7 | For complete USAGE and HELP type: 8 | ../examples/test11 --help 9 | 10 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test63.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this tests whether all required args are listed as 4 | # missing when no arguments are specified 5 | # failure 6 | ../examples/test11 > tmp.out 2>&1 7 | 8 | if cmp -s tmp.out $srcdir/test63.out; then 9 | exit 0 10 | else 11 | exit 1 12 | fi 13 | 14 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test64.out: -------------------------------------------------------------------------------- 1 | 1 2 3 2 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this tests whether all required args are listed as 4 | # missing when no arguments are specified 5 | # failure 6 | ../examples/test11 -v "1 2 3" > tmp.out 2>&1 7 | 8 | if cmp -s tmp.out $srcdir/test64.out; then 9 | exit 0 10 | else 11 | exit 1 12 | fi 13 | 14 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test65.out: -------------------------------------------------------------------------------- 1 | 1 2 3 2 | 4 5 6 3 | 7 8 9 4 | -1 0.2 0.4 5 | REVERSED 6 | -1 0.2 0.4 7 | 7 8 9 8 | 4 5 6 9 | 1 2 3 10 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test65.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this tests whether all required args are listed as 4 | # missing when no arguments are specified 5 | # failure 6 | ../examples/test12 -v "1 2 3" -v "4 5 6" -v "7 8 9" -v "-1 0.2 0.4" \ 7 | > tmp.out 2>&1 8 | 9 | if cmp -s tmp.out $srcdir/test65.out; then 10 | exit 0 11 | else 12 | exit 1 13 | fi 14 | 15 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test66.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: 2 | Required argument missing: vect 3 | 4 | Brief USAGE: 5 | ../examples/test12 -v <3D vector> ... [--] [--version] [-h] 6 | 7 | For complete USAGE and HELP type: 8 | ../examples/test12 --help 9 | 10 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test66.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this tests whether all required args are listed as 4 | # missing when no arguments are specified 5 | # failure 6 | ../examples/test12 > tmp.out 2>&1 7 | 8 | if cmp -s tmp.out $srcdir/test66.out; then 9 | exit 0 10 | else 11 | exit 1 12 | fi 13 | 14 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test67.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -v (--vect) 2 | a 1 0.3 is not a 3D vector 3 | 4 | Brief USAGE: 5 | ../examples/test12 -v <3D vector> ... [--] [--version] [-h] 6 | 7 | For complete USAGE and HELP type: 8 | ../examples/test12 --help 9 | 10 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test67.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this tests whether all required args are listed as 4 | # missing when no arguments are specified 5 | # failure 6 | ../examples/test12 -v "a 1 0.3" > tmp.out 2>&1 7 | 8 | if cmp -s tmp.out $srcdir/test67.out; then 9 | exit 0 10 | else 11 | exit 1 12 | fi 13 | 14 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test68.out: -------------------------------------------------------------------------------- 1 | module 2 | MultiSwtichArg was found 0 times. 3 | done... 4 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test68.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this tests whether we can parse args from 4 | # a vector of strings and that combined switch 5 | # handling doesn't get fooled if the delimiter 6 | # is in the string 7 | # success 8 | ../examples/test13 > tmp.out 2>&1 9 | 10 | if cmp -s tmp.out $srcdir/test68.out; then 11 | exit 0 12 | else 13 | exit 1 14 | fi 15 | 16 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test69.out: -------------------------------------------------------------------------------- 1 | error: Couldn't find match for argument for arg Argument: --bob 2 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test69.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Checks that parsing exceptions are properly 4 | # propagated to the caller. 5 | ../examples/test18 --bob > tmp.out 2>&1 6 | 7 | if cmp -s tmp.out $srcdir/test69.out; then 8 | exit 0 9 | else 10 | exit 1 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test7.out: -------------------------------------------------------------------------------- 1 | 2 | USAGE: 3 | 4 | ../examples/test2 [-f ] -i -s [-A] [-C] [-B] [--] 5 | [--version] [-h] ... 6 | 7 | 8 | Where: 9 | 10 | -f , --floatTest 11 | float test 12 | 13 | -i , --intTest 14 | (required) integer test 15 | 16 | -s , --stringTest 17 | (required) string test 18 | 19 | -A, --existTestA 20 | tests for the existence of A 21 | 22 | -C, --existTestC 23 | tests for the existence of C 24 | 25 | -B, --existTestB 26 | tests for the existence of B 27 | 28 | --, --ignore_rest 29 | Ignores the rest of the labeled arguments following this flag. 30 | 31 | --version 32 | Displays version information and exits. 33 | 34 | -h, --help 35 | Displays usage information and exits. 36 | 37 | 38 | (required) unlabeld test 39 | 40 | (accepted multiple times) 41 | file names 42 | 43 | 44 | this is a message 45 | 46 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test7.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test2 -i 10 -s hello goodbye -hABC > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test7.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test70.out: -------------------------------------------------------------------------------- 1 | 2 | USAGE: 3 | 4 | ../examples/test18 [--] [--version] [-h] 5 | 6 | 7 | Where: 8 | 9 | --, --ignore_rest 10 | Ignores the rest of the labeled arguments following this flag. 11 | 12 | --version 13 | Displays version information and exits. 14 | 15 | -h, --help 16 | Displays usage information and exits. 17 | 18 | 19 | Command description message 20 | 21 | Exiting on ExitException. 22 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test70.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Checks that parsing exceptions are properly 4 | # propagated to the caller. 5 | ../examples/test18 --help > tmp.out 2>&1 6 | 7 | if cmp -s tmp.out $srcdir/test70.out; then 8 | exit 0 9 | else 10 | exit 1 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test71.out: -------------------------------------------------------------------------------- 1 | found int: 10 2 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test71.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success test hex 4 | ../examples/test19 -i 0xA > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test71.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test72.out: -------------------------------------------------------------------------------- 1 | found int: 10 2 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test72.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success test octal 4 | ../examples/test19 -i 012 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test72.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test73.out: -------------------------------------------------------------------------------- 1 | for float we got : 3.7 2 | for int we got : 1 3 | for string we got : asdf 4 | for ulabeled we got : fff*fff 5 | for bool A we got : 0 6 | for bool B we got : 0 7 | for bool C we got : 0 8 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test73.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success tests whether * in UnlabeledValueArg passes 4 | ../examples/test2 -i 1 -s asdf fff*fff > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test73.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test74.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -b (--btmc) 2 | Mutually exclusive argument already set! 3 | 4 | Brief USAGE: 5 | ../examples/test20 {-a|-b} [--] [--version] [-h] 6 | 7 | For complete USAGE and HELP type: 8 | ../examples/test20 --help 9 | 10 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test74.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure validates that the correct error message 4 | # is displayed for XOR'd args 5 | ../examples/test20 -a -b > tmp.out 2>&1 6 | 7 | if cmp -s tmp.out $srcdir/test74.out; then 8 | exit 0 9 | else 10 | exit 1 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test75.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -a (--atmc) 2 | Mutually exclusive argument already set! 3 | 4 | Brief USAGE: 5 | ../examples/test20 {-a|-b} [--] [--version] [-h] 6 | 7 | For complete USAGE and HELP type: 8 | ../examples/test20 --help 9 | 10 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test75.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure validates that the correct error message 4 | # is displayed for XOR'd args 5 | ../examples/test20 -b -a > tmp.out 2>&1 6 | 7 | if cmp -s tmp.out $srcdir/test75.out; then 8 | exit 0 9 | else 10 | exit 1 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test76.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -b (--btmc) 2 | Mutually exclusive argument already set! 3 | 4 | Brief USAGE: 5 | ../examples/test20 {-a|-b} [--] [--version] [-h] 6 | 7 | For complete USAGE and HELP type: 8 | ../examples/test20 --help 9 | 10 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test76.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure validates that the correct error message 4 | # is displayed for XOR'd args 5 | ../examples/test20 -ba > tmp.out 2>&1 6 | 7 | if cmp -s tmp.out $srcdir/test76.out; then 8 | exit 0 9 | else 10 | exit 1 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test77.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: Argument: -b (--btmc) 2 | Mutually exclusive argument already set! 3 | 4 | Brief USAGE: 5 | ../examples/test20 {-a|-b} [--] [--version] [-h] 6 | 7 | For complete USAGE and HELP type: 8 | ../examples/test20 --help 9 | 10 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test77.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # failure validates that the correct error message 4 | # is displayed for XOR'd args 5 | ../examples/test20 -ab > tmp.out 2>&1 6 | 7 | if cmp -s tmp.out $srcdir/test77.out; then 8 | exit 0 9 | else 10 | exit 1 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test78.out: -------------------------------------------------------------------------------- 1 | My name (spelled backwards) is: ekim 2 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test78.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test21 ~~reverse /n mike > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test78.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test79.out: -------------------------------------------------------------------------------- 1 | PARSE ERROR: 2 | Required argument missing: name 3 | 4 | Brief USAGE: 5 | ../examples/test21 [/r] /n [//] [~~version] [/h] 6 | 7 | For complete USAGE and HELP type: 8 | ../examples/test21 ~~help 9 | 10 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test79.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test21 > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test79.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test8.out: -------------------------------------------------------------------------------- 1 | 2 | ../examples/test2 version: 0.99 3 | 4 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test8.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test2 --version > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test8.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test9.out: -------------------------------------------------------------------------------- 1 | 0 -hv 2 | 1 one 3 | 2 two 4 | for float we got : 3.7 5 | for int we got : 10 6 | for string we got : hello 7 | for ulabeled we got : goodbye 8 | for bool A we got : 0 9 | for bool B we got : 0 10 | for bool C we got : 0 11 | -------------------------------------------------------------------------------- /lib/tclap-1.2.2/tests/test9.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # success 4 | ../examples/test2 -i 10 -s hello goodbye -- -hv one two > tmp.out 2>&1 5 | 6 | if cmp -s tmp.out $srcdir/test9.out; then 7 | exit 0 8 | else 9 | exit 1 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ## 2 | # CMakeLists.txt 3 | # 4 | # Copyright (C) 2015-2016 srcML, LLC. (www.srcML.org) 5 | # 6 | # This file is part of srcUML. 7 | # 8 | # srcUML is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | 13 | # srcUML is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | 18 | # You should have received a copy of the GNU General Public License 19 | # along with srcUML. If not, see . 20 | 21 | file(GLOB SRCUML_SOURCE *.cpp) 22 | file(GLOB SRCUML_HEADER *.hpp) 23 | 24 | add_subdirectory(generator) 25 | add_subdirectory(client) 26 | -------------------------------------------------------------------------------- /src/client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ## 2 | # CMakeLists.txt 3 | # 4 | # Copyright (C) 2016 srcML, LLC. (www.srcML.org) 5 | # 6 | # This file is part of srcUML. 7 | # 8 | # srcUML is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | 13 | # srcUML is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | 18 | # You should have received a copy of the GNU General Public License 19 | # along with srcUML. If not, see . 20 | 21 | file(GLOB CLIENT_SOURCE *.cpp) 22 | file(GLOB CLIENT_HEADER *.hpp) 23 | 24 | add_executable(srcuml $ ${CLIENT_SOURCE} ${CLIENT_HEADER}) 25 | link_directories(/usr/local/lib /usr/local/lib/x86_64-linux-gnu) 26 | target_link_libraries(srcuml srcsaxeventdispatch srcsax_static ${LIBXML2_LIBRARIES} ${Boost_LIBRARIES} OGDF COIN pthread) 27 | -------------------------------------------------------------------------------- /src/generator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ## 2 | # CMakeLists.txt 3 | # 4 | # Copyright (C) 2016 srcML, LLC. (www.srcML.org) 5 | # 6 | # This file is part of srcUML. 7 | # 8 | # srcUML is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | 13 | # srcUML is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | 18 | # You should have received a copy of the GNU General Public License 19 | # along with srcUML. If not, see . 20 | 21 | # glob does one time thing, possibly won't find changes to certain things...** may 22 | 23 | 24 | file(GLOB GENERATOR_SOURCE *.cpp) 25 | file(GLOB GENERATOR_HEADER *.hpp) 26 | 27 | add_library(generator OBJECT ${GENERATOR_HEADERS} ${GENERATOR_SOURCE}) 28 | 29 | -------------------------------------------------------------------------------- /src/generator/layout_design.txt: -------------------------------------------------------------------------------- 1 | Algorithm Layout Plan 2 | P.J. Leyden 3 | 02/06/2019 4 | 5 | I will have three layout definitions: 6 | 7 | 1) Multi-Cluster Layout 8 | - This layout will have clusters based on relationship data and stereotype. 9 | Closely related classes will end up clustered. 10 | - For instance, the printer part of a graph generator might be clustered with its components 11 | close together. 12 | - Each class will have a tinted box and label representing it's stereotype. 13 | - Each individual cluster will have a line crossing algorithm run on it 14 | - All clusters will act as a single node an the overall will have a LCM alg. run. 15 | 16 | 2) Three-Cluster Layout 17 | - This layout will have three areas 18 | - Boundary = contains classes that are interacted with 19 | - Control = contains classes used for control 20 | - Entity = contains classes that contain data or represent real-life objects 21 | - The different clusters will have boxes surounding them that will be tinted 22 | different colors depending on the catagory 23 | - Boundary - Blue 24 | - Control - Red 25 | - Entity - Green 26 | - Each individual cluster will have a line crossing algorithm run on it 27 | 28 | 3) Sugiyama Layout 29 | 30 | Relationships 31 | - Association (Solid Line | Open Arrow) 32 | - Bi-Directional 33 | - Uni-Directional 34 | - Reflexive 35 | - Aggregation (Solid Line | Hollow Diamond) 36 | - When a class is a container or collection of other classes but the contained 37 | classes do not have a strong lifecycle dependecy on the container. 38 | - Composition (Solid Line | Filled Diamond) 39 | - When a class is a container or collection of other classes but the contained 40 | classes do not have a strong lifecycle dependecy on the container. 41 | 42 | - Inheritance (Solid Line | Full Arrow) 43 | - Indicates a relation where one class (the subclass) is a specialized form of the 44 | other (the superclass). 45 | 46 | - Realization (Dash Line | Full Arrow) 47 | - Relation bewteen two classes where one realizes the behvaior specified by the other. 48 | 49 | - Dependency (Dash Line | Open Arrow) 50 | - If the definition of one element changes then the other may change. 51 | 52 | - Relationship Heirarchy 53 | - 1) [Realization/Generalization] && Composition->Aggregation->Directed(Binary)->Directed(Unary) 54 | - 2) [Realization/Generalization] && Directed(Binary)->Composition->Aggregation->Directed(Unary) 55 | - If Dependency is the only relation, show. 56 | 57 | - Multiplicity does not fall under the heirarchy as it doesn't affect the line or arrowhead. 58 | -------------------------------------------------------------------------------- /src/generator/orig_files/cft/cft.dot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srcML/srcUML/5d6bb0d5a7c04b4857afcd601ba53fb64b58409a/src/generator/orig_files/cft/cft.dot -------------------------------------------------------------------------------- /src/generator/orig_files/cft/cft.hpp: -------------------------------------------------------------------------------- 1 | class String { 2 | public: 3 | String(){} 4 | String(const String&){} 5 | ~String(){} 6 | 7 | String& operator=(const String&){} 8 | }; 9 | //==================================================== 10 | class Window{ 11 | public: 12 | virtual void draw() = 0; 13 | virtual void minimize() = 0; 14 | virtual void maximize() = 0; 15 | }; 16 | //==================================================== 17 | class MyOperatingSystemWindow : public Window{ 18 | public: 19 | MyOperatingSystemWindow(){} 20 | private: 21 | String name; 22 | WindowID ID; 23 | }; 24 | //==================================================== 25 | class MyApplicationWindow : public MyOperatingSystemWindow { 26 | public: 27 | MyApplicationWindow(); 28 | private: 29 | List myApplicationContent; 30 | }; 31 | //==================================================== 32 | class WindowID { 33 | private: 34 | String cool; 35 | }; 36 | //==================================================== 37 | class Content { 38 | public: 39 | virtual void setContent(String &newContent) {} 40 | void displayContent(); 41 | private: 42 | String currentContent; 43 | }; 44 | 45 | -------------------------------------------------------------------------------- /src/generator/orig_files/cft/cft.yuml: -------------------------------------------------------------------------------- 1 | [«datatype»\nString] 2 | [«interface»\nWindow||+ draw();+ minimize();+ maximize();] 3 | [ {abstract}\nMyOperatingSystemWindow|- name: String;- ID: WindowID;] 4 | [ {abstract}\nMyApplicationWindow|- myApplicationContent: Content;] 5 | [«datatype»\nWindowID|- cool: String;] 6 | [«datatype»\nContent|- currentContent: String;|+ setContent(inout newContent: String);+ displayContent();] 7 | [«interface»\nWindow]^-[ {abstract}\nMyOperatingSystemWindow] 8 | [ {abstract}\nMyOperatingSystemWindow]^-[ {abstract}\nMyApplicationWindow] 9 | [ {abstract}\nMyOperatingSystemWindow]++-name>[«datatype»\nString] 10 | [ {abstract}\nMyOperatingSystemWindow]++-ID>[«datatype»\nWindowID] 11 | [ {abstract}\nMyApplicationWindow]++-myApplicationContent>[«datatype»\nContent] 12 | [«datatype»\nWindowID]++-cool>[«datatype»\nString] 13 | [«datatype»\nContent]++-currentContent>[«datatype»\nString] 14 | [«datatype»\nContent]-.->[«datatype»\nString] 15 | -------------------------------------------------------------------------------- /src/generator/orig_files/cft2/cft2.dot: -------------------------------------------------------------------------------- 1 | digraph hierarchy { 2 | node[shape=record,style=filled,fillcolor=gray95] 3 | edge[dir="both", arrowtail="empty", arrowhead="empty", labeldistance="2.0"] 4 | class0[label = "{ «datatype»\nString}"] 5 | } 6 | -------------------------------------------------------------------------------- /src/generator/orig_files/cft2/cft2.hpp: -------------------------------------------------------------------------------- 1 | class String { 2 | public: 3 | String(){} 4 | String(const String&){} 5 | ~String(){} 6 | 7 | String& operator=(const String&){} 8 | }; -------------------------------------------------------------------------------- /src/generator/orig_files/cft2/cft2.hpp.xml: -------------------------------------------------------------------------------- 1 | 2 | class String { 3 | public: 4 | String(){} 5 | String(const String&){} 6 | ~String(){} 7 | 8 | String& operator=(const String&){} 9 | }; 10 | -------------------------------------------------------------------------------- /src/generator/orig_files/cft2/cft2.yuml: -------------------------------------------------------------------------------- 1 | [«datatype»\nString] 2 | -------------------------------------------------------------------------------- /src/generator/orig_files/comment2attr.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | from xml.sax import * 4 | import sys 5 | 6 | class myHandler(ContentHandler): 7 | 8 | cur_element = None 9 | 10 | def startDocument(self): 11 | print("Doc Started\n") 12 | 13 | def startElement(self, name, attrs): 14 | if name == "name": 15 | self.cur_element = "name" 16 | print( attrs.getNames()[0] + '\t' + attrs.getValue( attrs.getNames()[0] ) ) 17 | else: 18 | self.cur_element = None 19 | 20 | def characters(self, content): 21 | if self.cur_element == "comment" && content == "String": 22 | 23 | 24 | 25 | 26 | xml_file = open(sys.argv[1]) 27 | handler = myHandler() 28 | #handler.startDocument() 29 | 30 | parse(xml_file, handler) 31 | -------------------------------------------------------------------------------- /src/generator/srcuml_dispatcher.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @file srcuml_dispatcher.hpp 3 | * 4 | * @copyright Copyright (C) 2016 srcML, LLC. (www.srcML.org) 5 | * 6 | * This file is part of srcUML. 7 | * 8 | * srcUML is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * srcUML is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with srcUML. If not, see . 20 | */ 21 | 22 | #ifndef INCLUDED_SRCUML_DISPATCHER_HPP 23 | #define INCLUDED_SRCUML_DISPATCHER_HPP 24 | 25 | #include 26 | 27 | template 28 | class srcuml_dispatcher : public srcSAXEventDispatch::srcSAXSingleEventDispatcher { 29 | 30 | private: 31 | bool dispatched; 32 | 33 | public: 34 | 35 | srcuml_dispatcher(srcSAXEventDispatch::PolicyListener * listener) 36 | : srcSAXEventDispatch::srcSAXSingleEventDispatcher(listener) { 37 | srcSAXEventDispatch::srcSAXEventDispatcher::RemoveEvents({"if", "for", "while", "typedef", "call", "macro", "init", "expr_stmt", "member_list" }); 38 | } 39 | 40 | }; 41 | 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/generator/srcuml_outputter.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @file srcuml_outputter.hpp 3 | * 4 | * @copyright Copyright (C) 2016 srcML, LLC. (www.srcML.org) 5 | * 6 | * This file is part of srcUML. 7 | * 8 | * srcUML is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * srcUML is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with srcUML. If not, see . 20 | */ 21 | 22 | #ifndef INCLUDED_SRCUML_OUTPUTTER_HPP 23 | #define INCLUDED_SRCUML_OUTPUTTER_HPP 24 | 25 | #include 26 | #include 27 | 28 | 29 | class srcuml_outputter { 30 | 31 | public: 32 | 33 | virtual bool output(std::ostream & out, std::vector> & classes) = 0; 34 | 35 | virtual srcuml_relationships analyze_relationships(std::vector> & classes) { 36 | 37 | return srcuml_relationships(classes); 38 | 39 | } 40 | 41 | }; 42 | 43 | #endif -------------------------------------------------------------------------------- /src/generator/srcuml_utilities.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @file srcuml_utilities.cpp 3 | * 4 | * @copyright Copyright (C) 2016 srcML, LLC. (www.srcML.org) 5 | * 6 | * This file is part of srcUML. 7 | * 8 | * srcUML is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * srcUML is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with srcUML. If not, see . 20 | */ 21 | 22 | #include 23 | 24 | #include 25 | 26 | namespace srcuml { 27 | 28 | std::string & trim(std::string & str) { 29 | 30 | str.erase(str.begin(), std::find_if_not(str.begin(), str.end(), isspace)); 31 | while(!str.empty() && isspace(str.back())) 32 | str.pop_back(); 33 | 34 | return str; 35 | 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/generator/srcuml_utilities.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @file srcuml_utilities.hpp 3 | * 4 | * @copyright Copyright (C) 2016 srcML, LLC. (www.srcML.org) 5 | * 6 | * This file is part of srcUML. 7 | * 8 | * srcUML is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * srcUML is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with srcUML. If not, see . 20 | */ 21 | 22 | #ifndef INCLUDED_SRCUML_UTILITIES_HPP 23 | #define INCLUDED_SRCUML_UTILITIES_HPP 24 | 25 | #include 26 | 27 | namespace srcuml { 28 | 29 | std::string & trim(std::string & str); 30 | 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/generator/static_outputter.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @file static_outputter.hpp 3 | * 4 | * @copyright Copyright (C) 2016 srcML, LLC. (www.srcML.org) 5 | * 6 | * This file is part of srcUML. 7 | * 8 | * srcUML is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * srcUML is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with srcUML. If not, see . 20 | */ 21 | 22 | #ifndef INCLUDED_STATIC_OUTPUTTER_HPP 23 | #define INCLUDED_STATIC_OUTPUTTER_HPP 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | #define COMBINING_LOW_LINE "\u0332" 30 | class static_outputter { 31 | 32 | public: 33 | 34 | static std::size_t num_utf_bytes(const unsigned char & character) { 35 | 36 | if(character > 0xC0 && character <= 0xdf) return 2; 37 | if(character > 0xE0 && character <= 0xef) return 3; 38 | if(character > 0xF0 && character <= 0xf4) return 4; 39 | 40 | return 1; 41 | } 42 | 43 | template 44 | static std::ostream & output(std::ostream & out, const T & t) { 45 | 46 | std::ostringstream str_out; 47 | str_out << t; 48 | 49 | const std::string & str = str_out.str(); 50 | std::size_t size = str.size(); 51 | for(std::size_t pos = 0; pos < size;) { 52 | 53 | std::size_t num_bytes = num_utf_bytes(str[pos]); 54 | 55 | while(num_bytes--) 56 | out << str[pos++]; 57 | 58 | out << COMBINING_LOW_LINE; 59 | 60 | } 61 | 62 | return out; 63 | 64 | } 65 | 66 | }; 67 | 68 | 69 | template <> 70 | std::ostream & static_outputter::output(std::ostream & out, const std::string & t) { 71 | 72 | const std::string & str = t; 73 | std::size_t size = str.size(); 74 | for(std::size_t pos = 0; pos < size;) { 75 | 76 | std::size_t num_bytes = static_outputter::num_utf_bytes(str[pos]); 77 | 78 | while(num_bytes--) 79 | out << str[pos++]; 80 | 81 | out << COMBINING_LOW_LINE; 82 | 83 | } 84 | 85 | return out; 86 | 87 | } 88 | #undef COMBINING_LOW_LINE 89 | #endif 90 | 91 | -------------------------------------------------------------------------------- /src/generator/svg_helper.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ogdf_outputter.hpp 3 | * 4 | * @copyright Copyright (C) 2016 srcML, LLC. (www.srcML.org) 5 | * 6 | * This file is part of srcUML. 7 | * 8 | * srcUML is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * srcUML is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with srcUML. If not, see . 20 | */ 21 | #ifndef INCLUDED_SVG_HELPER_HPP 22 | #define INCLUDED_SVG_HELPER_HPP 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | //srcUML_Requirements 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | //OGDF_Requirements 38 | //Basic_Graph_Include================================================ 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | //=================================================================== 45 | 46 | //Cluster_Graph_Include============================================== 47 | #include 48 | #include 49 | //=================================================================== 50 | 51 | using namespace ogdf; 52 | using namespace ogdf::internal; 53 | 54 | enum EndType { FilledTriangle, HollowTriangle, FilledDiamond, HollowDiamond }; 55 | 56 | class svg_helper{ 57 | private: 58 | 59 | std::map> node_xy; 60 | std::map> node_rc; 61 | //in pair its source then target end 62 | std::map> edge_end_st; 63 | 64 | public: 65 | 66 | //Constructor 67 | svg_helper(); 68 | }; 69 | 70 | #endif -------------------------------------------------------------------------------- /src/generator/test/car_shop/src/a_car.hpp: -------------------------------------------------------------------------------- 1 | #include "part.hpp" 2 | #include 3 | 4 | class A_Car{ 5 | private: 6 | Part* parts; 7 | }; -------------------------------------------------------------------------------- /src/generator/test/car_shop/src/customer.hpp: -------------------------------------------------------------------------------- 1 | #include "string.hpp" 2 | 3 | class Customer{ 4 | private: 5 | String name; 6 | String address; 7 | String credit_card; 8 | 9 | public: 10 | Customer(); 11 | Customer(String name); 12 | 13 | void set_credit(String); 14 | String get_credit(); 15 | 16 | }; -------------------------------------------------------------------------------- /src/generator/test/car_shop/src/employee.hpp: -------------------------------------------------------------------------------- 1 | #include "customer.hpp" 2 | #include "shop.hpp" 3 | 4 | class Employee : public Customer{ 5 | private: 6 | int employee_id; 7 | Shop *shop_of_work; 8 | 9 | public: 10 | Employee(); 11 | 12 | }; -------------------------------------------------------------------------------- /src/generator/test/car_shop/src/manufacturer.hpp: -------------------------------------------------------------------------------- 1 | #include "part.hpp" 2 | #include 3 | 4 | class Manufacturer { 5 | private: 6 | String name; 7 | Part* part_types; 8 | 9 | public: 10 | Manufacturer(){}; 11 | }; -------------------------------------------------------------------------------- /src/generator/test/car_shop/src/part.hpp: -------------------------------------------------------------------------------- 1 | #include "string.hpp" 2 | 3 | class Part{ 4 | private: 5 | int id_number; 6 | String name; 7 | String type; 8 | 9 | public: 10 | //virtual Part() = 0; 11 | virtual void register_dimensions() = 0; 12 | 13 | }; -------------------------------------------------------------------------------- /src/generator/test/car_shop/src/register.hpp: -------------------------------------------------------------------------------- 1 | #include "ui.hpp" 2 | #include "manufacturer.hpp" 3 | #include "part.hpp" 4 | #include "shop.hpp" 5 | 6 | class Register{ 7 | private: 8 | MyApplicationWindow main; 9 | Shop shop; 10 | Manufacturer manu; 11 | Employee emp; 12 | public: 13 | Register(); 14 | void register_store_info(Shop); 15 | void order_parts(Part, Manufacturer); 16 | void register_employee(Employee); 17 | 18 | 19 | }; -------------------------------------------------------------------------------- /src/generator/test/car_shop/src/shop.hpp: -------------------------------------------------------------------------------- 1 | #include "manufacturer.hpp" 2 | #include "employee.hpp" 3 | #include 4 | 5 | class Shop{ 6 | private: 7 | Manufacturer *supplier; 8 | int* employee_ids; 9 | 10 | public: 11 | Shop(); 12 | void add_employee(const Employee&); 13 | void add_manu(const Manufacturer&); 14 | }; -------------------------------------------------------------------------------- /src/generator/test/car_shop/src/string.hpp: -------------------------------------------------------------------------------- 1 | class String{ 2 | private: 3 | char* str; 4 | int stringSize; 5 | public: 6 | String(){stringSize = 0; str = nullptr;} 7 | }; -------------------------------------------------------------------------------- /src/generator/test/car_shop/src/ui.hpp: -------------------------------------------------------------------------------- 1 | //==================================================== 2 | class Window{ 3 | public: 4 | virtual void draw() = 0; 5 | virtual void minimize() = 0; 6 | virtual void maximize() = 0; 7 | }; 8 | //==================================================== 9 | class MyOperatingSystemWindow : public Window{ 10 | public: 11 | MyOperatingSystemWindow(){} 12 | private: 13 | std::string name; 14 | WindowID ID; 15 | }; 16 | //==================================================== 17 | class MyApplicationWindow : public MyOperatingSystemWindow { 18 | public: 19 | MyApplicationWindow(); 20 | private: 21 | List myApplicationContent; 22 | }; 23 | //==================================================== 24 | class WindowID { 25 | private: 26 | std::string cool; 27 | }; 28 | //==================================================== 29 | class Content { 30 | public: 31 | virtual void setContent(std::string &newContent) {} 32 | void displayContent(); 33 | private: 34 | std::string currentContent; 35 | }; 36 | 37 | -------------------------------------------------------------------------------- /src/generator/test/car_shop/src/wheel.hpp: -------------------------------------------------------------------------------- 1 | #include "part.hpp" 2 | 3 | class Wheel : public Part{ 4 | public: 5 | Wheel(){}; 6 | void register_dimension(){}; 7 | 8 | }; -------------------------------------------------------------------------------- /src/generator/test/process.txt: -------------------------------------------------------------------------------- 1 | // calculate stereotypes for functions 2 | python stereotype.py -i [input.xml] -o [output.xml] 3 | 4 | // calculate class stereotypes and add them as comments 5 | xsltproc ../stereotype_files/classtype.xsl [.auto.xml] -ofile_name.typed.xml -------------------------------------------------------------------------------- /src/generator/test/test_inherit/inherit.cpp: -------------------------------------------------------------------------------- 1 | class Doc{ 2 | public: 3 | void draw() = 0; 4 | void size(){return size_;} 5 | private: 6 | int size_; 7 | }; 8 | 9 | class MyDoc: public Doc{ 10 | public: 11 | void draw()override{} 12 | void size()override{} 13 | }; 14 | -------------------------------------------------------------------------------- /src/yUML_to_DOT/srcYUML2graphViz.g4: -------------------------------------------------------------------------------- 1 | /** 2 | * @file srcYUMLgraphViz.g4 3 | * 4 | * @copyright Copyright (C) 2015-2016 srcML, LLC. (www.srcML.org) 5 | * 6 | * This file is part of srcYUML. 7 | * 8 | * srcYUML is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * srcYUML is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with srcYUML. If not, see . 20 | */ 21 | 22 | grammar srcYUML2graphViz; 23 | 24 | yuml 25 | : ( classDef | relationship | NEWLINE )+ EOF 26 | ; 27 | 28 | relationship 29 | : classDef relation classDef 30 | ; 31 | 32 | classDef 33 | : '[' classID ( '|' variables ('|' methods )? )? ']' 34 | ; 35 | 36 | relation 37 | : aggregation | composition | realization | generalization | dependency 38 | ; 39 | 40 | aggregation 41 | : relationText '<' relationText '>' relationText '-' relationText '>' 42 | ; 43 | 44 | composition 45 | : relationText '+' relationText '+' relationText '-' relationText '>' 46 | ; 47 | 48 | realization 49 | : relationText '^' relationText '-' relationText '.' relationText '-' 50 | ; 51 | 52 | generalization 53 | : relationText '^' relationText '-' 54 | ; 55 | 56 | dependency 57 | : relationText '-' relationText '.' relationText '-' relationText '>' 58 | ; 59 | 60 | classID 61 | : text 62 | ; 63 | 64 | variables 65 | : vmText 66 | ; 67 | 68 | methods 69 | : vmText 70 | ; 71 | 72 | text 73 | : ( LETTER | NUMBER | UNICODE | '{' | '}' | '~' | ('\t') | ('\r') | ('\b') | ('-') | ('+') | ('#') | ('<') | ('>') | '(' | ')' | ';' | ':' | ' ' | '*' | '[' | ']' | '«' | '»' | ('،') )* 74 | ; 75 | 76 | vmText 77 | : ( LETTER | NUMBER | UNICODE | '{' | '}' | '~' | ('\t') | ('\r') | ('\b') | ('-') | ('+') | ('#') | ('<') | ('>') | '(' | ')' | ':' | ';' | ' ' | '*' | '[' | ']' | '«' | '»' | ('،') | ('.'))* 78 | ; 79 | 80 | relationText 81 | : ( LETTER | NUMBER | UNICODE | '{' | '}' | '~' | ('\t') | ('\r') | ('\b') | ('#') | '(' | ')' | ':' | ' ' | '*' | '[' | ']' | '«' | '»' | ('،') | ('.'))* 82 | ; 83 | 84 | UNICODE 85 | :[\u0020-\u002A\u002C-\u002C\u002F-\u003A\u003D-\u003D\u003F-\u005A\u005C-\u005C\u005F-\u007B\u007D-\uFFFD] 86 | ; 87 | 88 | LETTER 89 | : [a-zA-Z] 90 | ; 91 | 92 | NUMBER 93 | : [0-9] 94 | ; 95 | 96 | NEWLINE 97 | : ( '\n' ) 98 | ; 99 | -------------------------------------------------------------------------------- /src/yUML_to_DOT/srcYUML2graphViz.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2 2 | # srcYUML2graphViz.py 3 | # 4 | # Copyright (C) 2015-2016 srcML, LLC. (www.srcML.org) 5 | # 6 | # This file is part of srcYUML. 7 | # 8 | # srcYUML is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | 13 | # srcYUML is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | 18 | # You should have received a copy of the GNU General Public License 19 | # along with srcYUML. If not, see . 20 | 21 | from antlr4 import * 22 | from antlr4.tree.Trees import Trees 23 | from srcYUMLrelay import Relay 24 | from srcYUML2graphVizLexer import srcYUML2graphVizLexer 25 | from srcYUML2graphVizParser import srcYUML2graphVizParser 26 | from srcYUML2graphVizListener import srcYUML2graphVizListener 27 | from kitchen.text.converters import to_unicode 28 | 29 | def main(argv): 30 | if len(argv) == 3: 31 | output = open(argv[2], 'w') 32 | 33 | elif len(argv) == 2: 34 | print("Default output file used: \"output.txt\"") 35 | output = open("output.txt", 'w') 36 | 37 | else: 38 | print("Usage: ./srcYUML2graphViz.py [inputFile] [outputFile]") 39 | exit(1) 40 | 41 | 42 | output.write("digraph hierarchy {\nsize=\"5, 5\"\n") 43 | output.write("node[shape=record,style=filled,fillcolor=gray95]\n") 44 | output.write("edge[dir=\"both\", arrowtail=\"empty\", arrowhead=\"empty\", labeldistance=\"2.0\"]\n") 45 | 46 | 47 | file = open(argv[1], "rb") #rb is R-read and B-binary 48 | input_str = to_unicode(file.read()) 49 | file.close() 50 | input = InputStream(input_str) 51 | lexer = srcYUML2graphVizLexer(input) 52 | stream = CommonTokenStream(lexer) 53 | parser = srcYUML2graphVizParser(stream) 54 | tree = parser.yuml() 55 | relay = Relay(output)#realization of Listener 56 | walker = ParseTreeWalker() 57 | walker.walk(relay, tree) 58 | #enterYuml(self, tree) 59 | #ok here is where I need to start learning to navigate the parse tree 60 | #print(Trees.toStringTree(tree, None, parser)) 61 | 62 | output.close() 63 | 64 | if __name__ == '__main__': 65 | import sys 66 | main(sys.argv) 67 | -------------------------------------------------------------------------------- /src/yUML_to_DOT/srcYUML2graphViz_old.g4: -------------------------------------------------------------------------------- 1 | /** 2 | * @file srcYUMLgraphViz.g4 3 | * 4 | * @copyright Copyright (C) 2015-2016 srcML, LLC. (www.srcML.org) 5 | * 6 | * This file is part of srcYUML. 7 | * 8 | * srcYUML is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * srcYUML is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with srcYUML. If not, see . 20 | */ 21 | 22 | grammar srcYUML2graphViz; 23 | 24 | yuml 25 | : ( classDef | relationship | NEWLINE )+ EOF 26 | ; 27 | 28 | classDef 29 | : '[' classID ( '|' variables ('|' methods )? )? ']' 30 | ; 31 | 32 | relationship 33 | : classDef ( aggregation | composition | realization | generalization ) classDef 34 | ; 35 | 36 | aggregation 37 | : relationText '+' relationText '-' relationText '>' relationText 38 | ; 39 | 40 | composition 41 | : relationText '+' relationText '+' relationText '-' relationText '>' 42 | ; 43 | 44 | realization 45 | : relationText '^' relationText '-' relationText '.' relationText '-' 46 | ; 47 | 48 | generalization 49 | : relationText '^' relationText '-' relationText 50 | ; 51 | 52 | classID 53 | : text 54 | ; 55 | 56 | variables 57 | : vmText 58 | ; 59 | 60 | methods 61 | : vmText 62 | ; 63 | 64 | text 65 | : ( LETTER | NUMBER | ';' | '[' | ']' | '«' | '»' | ' ' )* 66 | ; 67 | 68 | vmText 69 | : ( LETTER | NUMBER | ';' | ' ' )* 70 | ; 71 | 72 | relationText 73 | : ( LETTER | NUMBER )* 74 | ; 75 | 76 | LETTER 77 | : [a-zA-Z] 78 | ; 79 | 80 | NUMBER 81 | : [0-9] 82 | ; 83 | 84 | UNICODE 85 | :[\u0020-\u002A\u002C-\u002C\u002F-\u003A\u003D-\u003D\u003F-\u005A\u005C-\u005C\u005F-\u007B\u007D-\uFFFF] 86 | ; 87 | 88 | NEWLINE 89 | : ( '\n' ) 90 | ; 91 | -------------------------------------------------------------------------------- /src/yUML_to_DOT/test/class_file_test.dot: -------------------------------------------------------------------------------- 1 | digraph hierarchy { 2 | node[shape=record,style=filled,fillcolor=gray95] 3 | edge[dir="both", arrowtail="empty", arrowhead="empty", labeldistance="2.0"] 4 | class0[label = "{ «datatype»\nString}"] 5 | class1[label = "{ «interface»\nWindow||+ draw()\n+ minimize()\n+ maximize()\n}"] 6 | class2[label = "{ {abstract}\nMyOperatingSystemWindow|- name: String\n- ID: WindowID\n}"] 7 | class3[label = "{ {abstract}\nMyApplicationWindow|- myApplicationContent: Content\n}"] 8 | class4[label = "{ «datatype»\nWindowID|- cool: String\n}"] 9 | class5[label = "{ «datatype»\nContent|- currentContent: String\n|+ setContent(inout newContent: String)\n+ displayContent()\n}"] 10 | class1->class2[arrowhead="none"] 11 | class2->class3[arrowhead="none"] 12 | class2->class0[arrowhead="vee", arrowtail="diamond"] 13 | class2->class4[arrowhead="vee", arrowtail="diamond"] 14 | class3->class5[arrowhead="vee", arrowtail="diamond"] 15 | class4->class0[arrowhead="vee", arrowtail="diamond"] 16 | class5->class0[arrowhead="vee", arrowtail="diamond"] 17 | class5->class0[arrowhead="vee", arrowtail="none", style="dashed"] 18 | } 19 | -------------------------------------------------------------------------------- /src/yUML_to_DOT/test/class_file_test.hpp: -------------------------------------------------------------------------------- 1 | class String { 2 | public: 3 | String(){} 4 | String(const String&){} 5 | ~String(){} 6 | 7 | String& operator=(const String&){} 8 | }; 9 | //==================================================== 10 | class Window{ 11 | public: 12 | virtual void draw() = 0; 13 | virtual void minimize() = 0; 14 | virtual void maximize() = 0; 15 | }; 16 | //==================================================== 17 | class MyOperatingSystemWindow : public Window{ 18 | public: 19 | MyOperatingSystemWindow(){} 20 | private: 21 | String name; 22 | WindowID ID; 23 | }; 24 | //==================================================== 25 | class MyApplicationWindow : public MyOperatingSystemWindow { 26 | public: 27 | MyApplicationWindow(); 28 | private: 29 | List myApplicationContent; 30 | }; 31 | //==================================================== 32 | class WindowID { 33 | private: 34 | String cool; 35 | }; 36 | //==================================================== 37 | class Content { 38 | public: 39 | virtual void setContent(String &newContent) {} 40 | void displayContent(); 41 | private: 42 | String currentContent; 43 | }; 44 | 45 | -------------------------------------------------------------------------------- /src/yUML_to_DOT/test/example_1.hpp: -------------------------------------------------------------------------------- 1 | class String{ 2 | bool operator+(const String&); 3 | bool operator+(const int&); 4 | bool operator+(const std::string&); 5 | bool operator+(const float&); 6 | }; 7 | 8 | class Person{ 9 | public: 10 | Person(); 11 | String getFirst(); 12 | String getMiddle(); 13 | String getLast(); 14 | bool setFirst(const String&); 15 | bool setMiddle(const String&); 16 | bool setLast(const String&); 17 | private: 18 | String first; 19 | String middle; 20 | String &last; 21 | }; 22 | -------------------------------------------------------------------------------- /src/yUML_to_DOT/test/example_2.hpp: -------------------------------------------------------------------------------- 1 | class foo{ 2 | public: 3 | int x; 4 | int y; 5 | 6 | }; 7 | 8 | class bar: foo{ 9 | public: 10 | void foo1(foo &myFoo){ 11 | foo anotherFoo; 12 | }; 13 | void foo2(const foo thisFoo){ 14 | foo moreFoo; 15 | } 16 | private: 17 | foo mainFoo; 18 | foo finalFoo; 19 | 20 | }; 21 | -------------------------------------------------------------------------------- /src/yUML_to_DOT/test/example_3.hpp: -------------------------------------------------------------------------------- 1 | /* Composite Design Pattern example. 2 | * 3 | * * Compose objects into tree structures to represent 4 | * whole-part hierarchies in a manner that lets clients 5 | * treat objects and compositions uniformly. 6 | */ 7 | 8 | #include 9 | #include 10 | using std::cout; 11 | using std::vector; 12 | 13 | //=========================================================================== 14 | // Class definitions 15 | 16 | //--------------------------------------------------------------------------- 17 | class Component 18 | { 19 | public: 20 | virtual ~Component() {} 21 | virtual void operation() = 0; // {cout << "Override in all.\n"; } 22 | virtual void Add(Component*) {cout << "Implement in Composite.\n"; } 23 | virtual void Remove(Component*) {cout << "Implement in Composite.\n"; } 24 | virtual void GetChild(int) {cout << "Implement in Composite.\n"; } 25 | }; 26 | 27 | //--------------------------------------------------------------------------- 28 | // Leaf class. 29 | class Leaf: public Component 30 | { 31 | public: 32 | virtual void operation() 33 | { cout << "Leaf operation.\n"; } 34 | }; 35 | 36 | //--------------------------------------------------------------------------- 37 | // Composite class. 38 | class Composite: public Component 39 | { 40 | public: 41 | virtual void operation() 42 | { 43 | for (int idx = 0; idx < _components.size(); ++idx) 44 | _components[idx]->operation(); 45 | cout << "Composite operation.\n"; 46 | } 47 | virtual void Add(Component* c) { _components.push_back(c); } 48 | virtual void Remove(Component*) { } // Implement 49 | virtual void GetChild(int) { } // Implement 50 | 51 | private: 52 | vector _components; 53 | }; 54 | 55 | //--------------------------------------------------------------------------- 56 | // Client class. 57 | class Client 58 | { 59 | public: 60 | Client() { _component =new Composite(); } 61 | ~Client() { delete _component; } 62 | 63 | void do_something() 64 | { 65 | // Create some leaf nodes 66 | Component *leaf1 = new Leaf(); 67 | Component *leaf2 = new Leaf(); 68 | Component *leaf3 = new Leaf(); 69 | 70 | // Interior node 71 | Component *composite1 = new Composite(); 72 | composite1->Add(leaf1); 73 | composite1->Add(leaf2); 74 | composite1->Add(leaf3); 75 | 76 | // Root 77 | Component *leaf4 = new Leaf(); 78 | _component->Add(composite1); 79 | _component->Add(leaf4); 80 | _component->operation(); 81 | } 82 | 83 | private: 84 | Component* _component; 85 | }; 86 | 87 | //=========================================================================== 88 | // Using the classes 89 | 90 | int main() 91 | { 92 | Client client; 93 | 94 | client.do_something(); 95 | } -------------------------------------------------------------------------------- /src/yUML_to_DOT/test/example_4.hpp: -------------------------------------------------------------------------------- 1 | class taco{ 2 | public: 3 | virtual void make() = 0; 4 | virtual void eat() = 0; 5 | virtual void addCheese() = 0; 6 | virtual void addMeat() = 0; 7 | }; 8 | 9 | class myTaco: taco{ 10 | public: 11 | void make(){ 12 | count++; 13 | myTaco theTaco; 14 | }; 15 | void eat(){ 16 | count--; 17 | }; 18 | void addCheese(){ 19 | cheese = "American"; 20 | }; 21 | void addMeat(){ 22 | meat = "ham"; 23 | }; 24 | private: 25 | std::string cheese; 26 | std::string meat; 27 | std::string count; 28 | bool eaten; 29 | }; -------------------------------------------------------------------------------- /src/yUML_to_DOT/test/srcgraph: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2 2 | 3 | import sys, os, time, argparse 4 | import subprocess as sp 5 | def parse_args(): 6 | parser = argparse.ArgumentParser(description = 'Program for converting source code\nto a useful UML diagram') 7 | parser.add_argument('input') 8 | parser.add_argument('-o', '--output', default = 'pic.pdf', help = 'Define an output file') 9 | parser.add_argument('-t', '--type', default = 'pdf', help = 'Must be either: [pdf, jpg, png]') 10 | parser.add_argument('-c', '--cmd', default = 'evince', help = 'Specify a cmd to run the result with') 11 | #parser.add_argument('-k', '--keep', default = 'True', help = 'keep extra files') 12 | 13 | return parser.parse_args() 14 | 15 | def main(argv): 16 | 17 | options = parse_args() 18 | 19 | sp.call(['srcml', '--register-ext', 'h=C++', options.input, '-o', 'class_file_test.hpp.xml'])# '--register-ext', 'h=C++', 20 | print "[= Finished srcml..." 21 | sp.call(['srcuml', 'class_file_test.hpp.xml', 'class_file_test.dot']) 22 | print "[= Finished srcyuml..." 23 | #sp.call(['srcYUML2graphViz.py', 'class_file_test.hpp.yuml', 'class_file_test.outxt']) 24 | #print "[= Finished conversion..." 25 | 26 | if options.type == 'pdf': 27 | sp.call(['dot', '-T', options.type, 'class_file_test.dot', '-o', options.output]) 28 | 29 | else: 30 | sp.call(['dot', '-T', options.type, '-Gdpi=1500', 'class_file_test.dot', '-o', options.output]) 31 | options.cmd = 'eog' 32 | 33 | print "[= Finished picture..." 34 | #sp.call(['rm', 'class_file_test.hpp.xml', 'class_file_test.hpp.yuml', 'class_file_test.outxt']) 35 | 36 | print "[= Removed extra files..." 37 | print "[= Completed!" 38 | sp.call([options.cmd, options.output]) 39 | 40 | 41 | if __name__ == '__main__': 42 | main(sys.argv) 43 | -------------------------------------------------------------------------------- /test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ## 2 | # CMakeLists.txt 3 | # 4 | # Copyright (C) 2016 srcML, LLC. (www.srcML.org) 5 | # 6 | # This file is part of srcUML. 7 | # 8 | # srcUML is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | 13 | # srcUML is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | 18 | # You should have received a copy of the GNU General Public License 19 | # along with srcUML. If not, see . 20 | 21 | add_subdirectory(driver) 22 | add_subdirectory(suite) -------------------------------------------------------------------------------- /test/driver/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ## 2 | # CMakeLists.txt 3 | # 4 | # Copyright (C) 2016 srcML, LLC. (www.srcML.org) 5 | # 6 | # This file is part of srcUML. 7 | # 8 | # srcUML is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | 13 | # srcUML is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | 18 | # You should have received a copy of the GNU General Public License 19 | # along with srcUML. If not, see . 20 | 21 | add_library(tester OBJECT tester.cpp tester.hpp) 22 | -------------------------------------------------------------------------------- /test/driver/tester.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @file tester.hpp 3 | * 4 | * @copyright Copyright (C) 2016 srcML, LLC. (www.srcML.org) 5 | * 6 | * This file is part of srcUML. 7 | * 8 | * srcUML is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * srcUML is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with srcUML. If not, see . 20 | */ 21 | 22 | #ifndef INCLUDED_TESTER_HPP 23 | #define INCLUDED_TESTER_HPP 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | class tester_t { 30 | 31 | private: 32 | 33 | static const size_t COLUMN_SIZE; 34 | 35 | std::string name; 36 | size_t test_count; 37 | size_t number_passed; 38 | 39 | std::vector> test_results; 40 | 41 | 42 | // intermediate test variables 43 | std::string source_code; 44 | std::string srcml; 45 | std::string yuml; 46 | 47 | public: 48 | 49 | tester_t(const std::string & name); 50 | 51 | tester_t & src2srcml(const std::string & src); 52 | tester_t & run(); 53 | tester_t & test(const std::string & expected_yuml); 54 | 55 | size_t results() const; 56 | 57 | }; 58 | 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /test/suite/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ## 2 | # CMakeLists.txt 3 | # 4 | # Copyright (C) 2016 srcML, LLC. (www.srcML.org) 5 | # 6 | # This file is part of srcUML. 7 | # 8 | # srcUML is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | 13 | # srcUML is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | 18 | # You should have received a copy of the GNU General Public License 19 | # along with srcUML. If not, see . 20 | 21 | # 22 | # add_srcuml_test 23 | # Creates a srcuml test from a given file with a given name. 24 | # - FILE_NAME the name of the unit test file. 25 | # All arguments after the file name are considered to be linker arguments. 26 | # 27 | # 28 | macro(add_srcuml_test TEST_FILE) 29 | 30 | get_filename_component(TEST_NAME_WITH_EXTENSION ${TEST_FILE} NAME) 31 | string(FIND ${TEST_NAME_WITH_EXTENSION} "." EXTENSION_BEGIN) 32 | string(SUBSTRING ${TEST_NAME_WITH_EXTENSION} 0 ${EXTENSION_BEGIN} TEST_NAME) 33 | 34 | add_executable(${TEST_NAME} ${TEST_FILE} $ $) 35 | target_link_libraries(${TEST_NAME} srcsaxeventdispatch srcsax_static srcml ${LIBXML2_LIBRARIES} ${ARGN} OGDF COIN) 36 | add_test(NAME ${TEST_NAME} COMMAND $) 37 | set_target_properties(${TEST_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) 38 | 39 | endmacro() 40 | 41 | add_srcuml_test(test_empty.cpp) 42 | add_srcuml_test(test_datatype.cpp) 43 | add_srcuml_test(test_interface.cpp) 44 | add_srcuml_test(test_numeric.cpp) 45 | add_srcuml_test(test_attribute.cpp) 46 | add_srcuml_test(test_relationships.cpp) 47 | add_srcuml_test(test_dependencies.cpp) 48 | -------------------------------------------------------------------------------- /test/suite/test_dependencies.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @file test_numeric.cpp 3 | * 4 | * @copyright Copyright (C) 2016 srcML, LLC. (www.srcML.org) 5 | * 6 | * This file is part of srcUML. 7 | * 8 | * srcUML is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * srcUML is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with srcUML. If not, see . 20 | */ 21 | 22 | #include 23 | 24 | int main(int argc, char * argv[]) { 25 | 26 | tester_t tester("dependencies"); 27 | 28 | for(const std::string& class_type : {"class", "struct"}){ 29 | 30 | tester.src2srcml(class_type + " foo{private: void f(bar a){}; };" + class_type + " bar{};").run().test("[«datatype»;foo||- f(a: bar);]\n[«datatype»;bar]\n[«datatype»;foo]-.->[«datatype»;bar]\n"); 31 | tester.src2srcml(class_type + " foo{private: void f(){bar a;}; };" + class_type + " bar{};").run().test("[«datatype»;foo||- f();]\n[«datatype»;bar]\n[«datatype»;foo]-.->[«datatype»;bar]\n"); 32 | tester.src2srcml(class_type + " foo{private: void f(bar a){bar b;}; };" + class_type + " bar{};").run().test("[«datatype»;foo||- f(a: bar);]\n[«datatype»;bar]\n[«datatype»;foo]-.->[«datatype»;bar]\n"); 33 | tester.src2srcml(class_type + " foo{private: void f(bar a, pan b){};};" + class_type + " bar{};" + class_type + " pan{};").run().test("[«datatype»;foo||- f(a: bar, b: pan);]\n[«datatype»;bar]\n[«datatype»;pan]\n[«datatype»;foo]-.->[«datatype»;bar]\n[«datatype»;foo]-.->[«datatype»;pan]\n"); 34 | tester.src2srcml(class_type + " foo{private: void f(bar a){pan b;};};" + class_type + " bar{};" + class_type + " pan{};").run().test("[«datatype»;foo||- f(a: bar);]\n[«datatype»;bar]\n[«datatype»;pan]\n[«datatype»;foo]-.->[«datatype»;bar]\n[«datatype»;foo]-.->[«datatype»;pan]\n"); 35 | tester.src2srcml(class_type + " foo{private: void f(){bar a; pan b;};};" + class_type + " bar{};" + class_type + " pan{};").run().test("[«datatype»;foo||- f();]\n[«datatype»;bar]\n[«datatype»;pan]\n[«datatype»;foo]-.->[«datatype»;bar]\n[«datatype»;foo]-.->[«datatype»;pan]\n"); 36 | tester.src2srcml(class_type + " foo{private: void f(bar a){}; void g(pan a){}; };" + class_type + " bar{};" + class_type + " pan{};").run().test("[«datatype»;foo||- f(a: bar);- g(a: pan);]\n[«datatype»;bar]\n[«datatype»;pan]\n[«datatype»;foo]-.->[«datatype»;bar]\n[«datatype»;foo]-.->[«datatype»;pan]\n"); 37 | 38 | } 39 | 40 | return tester.results(); 41 | 42 | } -------------------------------------------------------------------------------- /test/suite/test_empty.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @file test_empty.cpp 3 | * 4 | * @copyright Copyright (C) 2016 srcML, LLC. (www.srcML.org) 5 | * 6 | * This file is part of srcUML. 7 | * 8 | * srcUML is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * srcUML is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with srcUML. If not, see . 20 | */ 21 | 22 | #include 23 | 24 | int main(int argc, char * argv[]) { 25 | 26 | tester_t tester("empty"); 27 | 28 | for(const std::string & class_type : { "class", "struct" }) { 29 | 30 | tester.src2srcml(class_type + " foo {};").run().test("[«datatype»;foo]\n"); 31 | 32 | } 33 | 34 | return tester.results(); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /test/suite/test_relationships.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @file test_numeric.cpp 3 | * 4 | * @copyright Copyright (C) 2016 srcML, LLC. (www.srcML.org) 5 | * 6 | * This file is part of srcUML. 7 | * 8 | * srcUML is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * srcUML is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with srcUML. If not, see . 20 | */ 21 | 22 | #include 23 | 24 | int main(int argc, char * argv[]) { 25 | 26 | tester_t tester("relationships"); 27 | 28 | //tester.src2srcml("class Parent{}; class Child: public Parent{};").run().test("[][Parent]^-[Child]"); 29 | //tester.src2srcml("class Parent{}; class Child: public Parent{}; class Grandchild: public Child{};lass Parent{}; class Child: public Parent{}; class Grandchild: public Child{};").run().test("") 30 | 31 | return tester.results(); 32 | 33 | } --------------------------------------------------------------------------------