Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Update tclap #132

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
itk-v4.8.0_use_system_libraries-off:
<<: *build-settings
docker:
- image: slicer/slicerexecutionmodel:${CIRCLE_JOB}
- image: hjmjohnson/slicerexecutionmodel:${CIRCLE_JOB}
steps:
- checkout
- run:
Expand All @@ -16,7 +16,7 @@ jobs:
itk-v4.10.1_use_system_libraries-off:
<<: *build-settings
docker:
- image: slicer/slicerexecutionmodel:${CIRCLE_JOB}
- image: hjmjohnson/slicerexecutionmodel:${CIRCLE_JOB}
steps:
- checkout
- run:
Expand All @@ -28,7 +28,7 @@ jobs:
itk-v4.13.0_use_system_libraries-off:
<<: *build-settings
docker:
- image: slicer/slicerexecutionmodel:${CIRCLE_JOB}
- image: hjmjohnson/slicerexecutionmodel:${CIRCLE_JOB}
steps:
- checkout
- run:
Expand All @@ -41,7 +41,7 @@ jobs:
itk-master_use_system_libraries-off:
<<: *build-settings
docker:
- image: slicer/slicerexecutionmodel:${CIRCLE_JOB}
- image: hjmjohnson/slicerexecutionmodel:${CIRCLE_JOB}
steps:
- checkout
- run:
Expand Down
4 changes: 3 additions & 1 deletion tclap/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
project(TCLAP LANGUAGES CXX)

project(TCLAP VERSION 1.2.2
LANGUAGES CXX)

# --------------------------------------------------------------------------
# Install headers
Expand Down
3 changes: 3 additions & 0 deletions tclap/docs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ if DOC
all:
@DOXYGEN@ Doxyfile

manual: manual.xml
xsltproc -o manual.html --stringparam html.stylesheet style.css /usr/share/xml/docbook/stylesheet/docbook-xsl/html/docbook.xsl manual.xml

else

all:
Expand Down
2 changes: 1 addition & 1 deletion tclap/docs/README
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
To generate the manual from the docbook xml you need and xslt processor
and an xsl file that defines the output. For example:

xsltproc --stringparam html.stylesheet style.css /Users/mes/software/docbook-xsl-1.71.1/xhtml/docbook.xsl manual.xml > manual.html
xsltproc --stringparam html.stylesheet style.css /usr/share/xml/docbook/stylesheet/docbook-xsl/html/docbook.xsl manual.xml > manual.html
2 changes: 1 addition & 1 deletion tclap/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h3>Links</h3>
<li>Read the <a href="html/index.html">API documentation</a></li><br/>
<li>Visit the
<a href="http://sourceforge.net/projects/tclap/">SourceForge project page</a></li><br/>
<li>Send <a href="mailto:mes5k@users.sourceforge.net">feedback, comments, patches, etc.</a></li></br>
<li>Send <a href="https://sourceforge.net/p/tclap/_list/tickets">feedback, comments, patches, etc.</a></li></br>
</ul>
</div>
<div class="main">
Expand Down
118 changes: 58 additions & 60 deletions tclap/docs/manual.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tclap/docs/manual.xml
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ The code would look like this:

<programlisting>

UnlabeledValueArg&lt;float&gt; nolabel( "name", "unlabeled test", 3.14,
UnlabeledValueArg&lt;float&gt; nolabel( "name", "unlabeled test", true, 3.14,
"nameString" );
cmd.add( nolabel );

Expand Down
2 changes: 1 addition & 1 deletion tclap/examples/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test13_SOURCES = test13.cpp
test14_SOURCES = test14.cpp
test15_SOURCES = test15.cpp
test16_SOURCES = test16.cpp
test17_SOURCES = test17.cpp test17-a.cpp
test17_SOURCES = test-hard-1.cpp test-hard-2.cpp
test18_SOURCES = test18.cpp
test19_SOURCES = test19.cpp
test20_SOURCES = test20.cpp
Expand Down
1 change: 1 addition & 0 deletions tclap/include/tclap/ArgException.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* file: ArgException.h
*
* Copyright (c) 2003, Michael E. Smoot .
* Copyright (c) 2017 Google LLC
* All rights reserved.
*
* See the file COPYING in the top directory of this distribution for
Expand Down
1 change: 1 addition & 0 deletions tclap/include/tclap/ArgTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* file: ArgTraits.h
*
* Copyright (c) 2007, Daniel Aarno, Michael E. Smoot .
* Copyright (c) 2017 Google LLC
* All rights reserved.
*
* See the file COPYING in the top directory of this distribution for
Expand Down
41 changes: 21 additions & 20 deletions tclap/include/tclap/CmdLine.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ inline CmdLine::CmdLine(const std::string& m,
_constructor();
}

CmdLine::~CmdLine()
inline CmdLine::~CmdLine()
{
ClearContainer(_argDeleteOnExitList);
ClearContainer(_visitorDeleteOnExitList);
Expand All @@ -366,7 +366,7 @@ CmdLine::~CmdLine()
}
}

void CmdLine::_constructor()
inline void CmdLine::_constructor()
{
_output = new StdOutput;

Expand Down Expand Up @@ -403,7 +403,7 @@ void CmdLine::_constructor()
deleteOnExit(v);
}

void CmdLine::xorAdd( const std::vector<Arg*>& ors )
inline void CmdLine::xorAdd( const std::vector<Arg*>& ors )
{
_xorHandler.add( ors );

Expand All @@ -415,20 +415,20 @@ void CmdLine::xorAdd( const std::vector<Arg*>& ors )
}
}

void CmdLine::xorAdd( Arg& a, Arg& b )
inline void CmdLine::xorAdd( Arg& a, Arg& b )
{
std::vector<Arg*> ors;
ors.push_back( &a );
ors.push_back( &b );
xorAdd( ors );
}

void CmdLine::add( Arg& a )
inline void CmdLine::add( Arg& a )
{
add( &a );
}

void CmdLine::add( Arg* a )
inline void CmdLine::add( Arg* a )
{
for( ArgListIterator it = _argList.begin(); it != _argList.end(); it++ )
if ( *a == *(*it) )
Expand All @@ -442,7 +442,8 @@ void CmdLine::add( Arg* a )
_numRequired++;
}

void CmdLine::parse(int argc, const char * const * argv)

inline void CmdLine::parse(int argc, const char * const * argv)
{
// this step is necessary so that we have easy access to
// mutable strings.
Expand Down Expand Up @@ -520,7 +521,7 @@ inline void CmdLine::parse(std::vector<std::string>& args)
exit(estat);
}

bool CmdLine::_emptyCombined(const std::string& s)
inline bool CmdLine::_emptyCombined(const std::string& s)
{
if ( s.length() > 0 && s[0] != Arg::flagStartChar() )
return false;
Expand All @@ -532,7 +533,7 @@ bool CmdLine::_emptyCombined(const std::string& s)
return true;
}

void CmdLine::missingArgsException()
inline void CmdLine::missingArgsException()
{
int count = 0;

Expand All @@ -559,60 +560,60 @@ void CmdLine::missingArgsException()
throw(CmdLineParseException(msg));
}

void CmdLine::deleteOnExit(Arg* ptr)
inline void CmdLine::deleteOnExit(Arg* ptr)
{
_argDeleteOnExitList.push_back(ptr);
}

void CmdLine::deleteOnExit(Visitor* ptr)
inline void CmdLine::deleteOnExit(Visitor* ptr)
{
_visitorDeleteOnExitList.push_back(ptr);
}

CmdLineOutput* CmdLine::getOutput()
inline CmdLineOutput* CmdLine::getOutput()
{
return _output;
}

void CmdLine::setOutput(CmdLineOutput* co)
inline void CmdLine::setOutput(CmdLineOutput* co)
{
if ( !_userSetOutput )
delete _output;
_userSetOutput = true;
_output = co;
}

std::string& CmdLine::getVersion()
inline std::string& CmdLine::getVersion()
{
return _version;
}

std::string& CmdLine::getProgramName()
inline std::string& CmdLine::getProgramName()
{
return _progName;
}

std::list<Arg*>& CmdLine::getArgList()
inline std::list<Arg*>& CmdLine::getArgList()
{
return _argList;
}

XorHandler& CmdLine::getXorHandler()
inline XorHandler& CmdLine::getXorHandler()
{
return _xorHandler;
}

char CmdLine::getDelimiter()
inline char CmdLine::getDelimiter()
{
return _delimiter;
}

std::string& CmdLine::getMessage()
inline std::string& CmdLine::getMessage()
{
return _message;
}

bool CmdLine::hasHelpAndVersion()
inline bool CmdLine::hasHelpAndVersion()
{
return _helpAndVersion;
}
Expand Down
1 change: 1 addition & 0 deletions tclap/include/tclap/CmdLineInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*
* Copyright (c) 2003, Michael E. Smoot .
* Copyright (c) 2004, Michael E. Smoot, Daniel Aarno.
* Copyright (c) 2017, Google LLC
* All rights reserved.
*
* See the file COPYING in the top directory of this distribution for
Expand Down
1 change: 1 addition & 0 deletions tclap/include/tclap/CmdLineOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* file: CmdLineOutput.h
*
* Copyright (c) 2004, Michael E. Smoot
* Copyright (c) 2017, Google LLC
* All rights reserved.
*
* See the file COPYING in the top directory of this distribution for
Expand Down
1 change: 1 addition & 0 deletions tclap/include/tclap/Constraint.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* file: Constraint.h
*
* Copyright (c) 2005, Michael E. Smoot
* Copyright (c) 2017, Google LLC
* All rights reserved.
*
* See the file COPYING in the top directory of this distribution for
Expand Down
1 change: 1 addition & 0 deletions tclap/include/tclap/DocBookOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* file: DocBookOutput.h
*
* Copyright (c) 2004, Michael E. Smoot
* Copyright (c) 2017, Google LLC
* All rights reserved.
*
* See the file COPYING in the top directory of this distribution for
Expand Down
1 change: 1 addition & 0 deletions tclap/include/tclap/MultiArg.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* Copyright (c) 2003, Michael E. Smoot .
* Copyright (c) 2004, Michael E. Smoot, Daniel Aarno.
* Copyright (c) 2017, Google LLC
* All rights reserved.
*
* See the file COPYING in the top directory of this distribution for
Expand Down
1 change: 1 addition & 0 deletions tclap/include/tclap/MultiSwitchArg.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Copyright (c) 2003, Michael E. Smoot .
* Copyright (c) 2004, Michael E. Smoot, Daniel Aarno.
* Copyright (c) 2005, Michael E. Smoot, Daniel Aarno, Erik Zeek.
* Copyright (c) 2017, Google LLC
* All rights reserved.
*
* See the file COPYING in the top directory of this distribution for
Expand Down
1 change: 1 addition & 0 deletions tclap/include/tclap/StandardTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* file: StandardTraits.h
*
* Copyright (c) 2007, Daniel Aarno, Michael E. Smoot .
* Copyright (c) 2017, Google LLC
* All rights reserved.
*
* See the file COPYING in the top directory of this distribution for
Expand Down
3 changes: 2 additions & 1 deletion tclap/include/tclap/StdOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* file: StdOutput.h
*
* Copyright (c) 2004, Michael E. Smoot
* Copyright (c) 2017, Google LLC
* All rights reserved.
*
* See the file COPYING in the top directory of this distribution for
Expand Down Expand Up @@ -168,7 +169,7 @@ StdOutput::_shortUsage( CmdLineInterface& _cmd,
XorHandler xorHandler = _cmd.getXorHandler();
std::vector< std::vector<Arg*> > xorList = xorHandler.getXorList();

std::string s = progName;
std::string s = progName + " ";

spacePrint( os, s, 75, 2, 6 );
s.clear();
Expand Down
1 change: 1 addition & 0 deletions tclap/include/tclap/SwitchArg.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* Copyright (c) 2003, Michael E. Smoot .
* Copyright (c) 2004, Michael E. Smoot, Daniel Aarno.
* Copyright (c) 2017, Google LLC
* All rights reserved.
*
* See the file COPYING in the top directory of this distribution for
Expand Down
1 change: 1 addition & 0 deletions tclap/include/tclap/UnlabeledMultiArg.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* file: UnlabeledMultiArg.h
*
* Copyright (c) 2003, Michael E. Smoot.
* Copyright (c) 2017, Google LLC
* All rights reserved.
*
* See the file COPYING in the top directory of this distribution for
Expand Down
1 change: 1 addition & 0 deletions tclap/include/tclap/UnlabeledValueArg.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*
* Copyright (c) 2003, Michael E. Smoot .
* Copyright (c) 2004, Michael E. Smoot, Daniel Aarno.
* Copyright (c) 2017, Google LLC
* All rights reserved.
*
* See the file COPYING in the top directory of this distribution for
Expand Down
1 change: 1 addition & 0 deletions tclap/include/tclap/ValueArg.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* Copyright (c) 2003, Michael E. Smoot .
* Copyright (c) 2004, Michael E. Smoot, Daniel Aarno.
* Copyright (c) 2017, Google LLC
* All rights reserved.
*
* See the file COPYING in the top directory of this distribution for
Expand Down
5 changes: 3 additions & 2 deletions tclap/include/tclap/ValuesConstraint.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* file: ValuesConstraint.h
*
* Copyright (c) 2005, Michael E. Smoot
* Copyright (c) 2017, Google LLC
* All rights reserved.
*
* See the file COPYING in the top directory of this distribution for
Expand Down Expand Up @@ -54,7 +55,7 @@ class ValuesConstraint : public Constraint<T>
* Constructor.
* \param allowed - vector of allowed values.
*/
ValuesConstraint(std::vector<T>& allowed);
ValuesConstraint(std::vector<T>const& allowed);

/**
* Virtual destructor.
Expand Down Expand Up @@ -93,7 +94,7 @@ class ValuesConstraint : public Constraint<T>
};

template<class T>
ValuesConstraint<T>::ValuesConstraint(std::vector<T>& allowed)
ValuesConstraint<T>::ValuesConstraint(std::vector<T> const& allowed)
: _allowed(allowed),
_typeDesc("")
{
Expand Down
1 change: 1 addition & 0 deletions tclap/include/tclap/Visitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* file: Visitor.h
*
* Copyright (c) 2003, Michael E. Smoot .
* Copyright (c) 2017, Google LLC
* All rights reserved.
*
* See the file COPYING in the top directory of this distribution for
Expand Down
Loading