diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-07-10 00:23:24 +0900 | 
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-07-10 00:23:24 +0900 | 
| commit | 5bb4d4359a52e9caf331f6001b953dc553df64df (patch) | |
| tree | 0e0ef61d88a17bf3fd53ee7bc32d3ec4b765b545 /src/tclap/.svn/text-base/CmdLineInterface.h.svn-base | |
| download | universal-indent-gui-tqt-5bb4d4359a52e9caf331f6001b953dc553df64df.tar.gz universal-indent-gui-tqt-5bb4d4359a52e9caf331f6001b953dc553df64df.zip | |
Initial import of UniversalIndentGUI 1.2.0 from Debian snapshot
(https://snapshot.debian.org/package/universalindentgui/1.2.0-1.1).
The code is available under GPL2 licence.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/tclap/.svn/text-base/CmdLineInterface.h.svn-base')
| -rwxr-xr-x | src/tclap/.svn/text-base/CmdLineInterface.h.svn-base | 150 | 
1 files changed, 150 insertions, 0 deletions
| diff --git a/src/tclap/.svn/text-base/CmdLineInterface.h.svn-base b/src/tclap/.svn/text-base/CmdLineInterface.h.svn-base new file mode 100755 index 0000000..1b25e9b --- /dev/null +++ b/src/tclap/.svn/text-base/CmdLineInterface.h.svn-base @@ -0,0 +1,150 @@ + +/******************************************************************************  + *  + *  file:  CmdLineInterface.h + *  + *  Copyright (c) 2003, Michael E. Smoot . + *  Copyright (c) 2004, Michael E. Smoot, Daniel Aarno. + *  All rights reverved. + * + *  See the file COPYING in the top directory of this distribution for + *  more information. + *   + *  THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS  + *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,  + *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL  + *  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER  + *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING  + *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER  + *  DEALINGS IN THE SOFTWARE.   + *   + *****************************************************************************/  + +#ifndef TCLAP_COMMANDLINE_INTERFACE_H +#define TCLAP_COMMANDLINE_INTERFACE_H + +#include <string> +#include <vector> +#include <list> +#include <iostream> +#include <algorithm> + + +namespace TCLAP { +      +class Arg; +class CmdLineOutput; +class XorHandler; + +/** + * The base class that manages the command line definition and passes + * along the parsing to the appropriate Arg classes. + */ +class CmdLineInterface +{ +	public: + +		/** +		 * Destructor +		 */ +		virtual ~CmdLineInterface() {} + +		/** +		 * Adds an argument to the list of arguments to be parsed. +		 * \param a - Argument to be added.  +		 */ +		virtual void add( Arg& a )=0; + +		/** +		 * An alternative add.  Functionally identical. +		 * \param a - Argument to be added.  +		 */ +		virtual void add( Arg* a )=0; + +		/** +		 * Add two Args that will be xor'd.   +		 * If this method is used, add does +		 * not need to be called. +		 * \param a - Argument to be added and xor'd.  +		 * \param b - Argument to be added and xor'd.  +		 */ +		virtual void xorAdd( Arg& a, Arg& b )=0; + +		/** +		 * Add a list of Args that will be xor'd.  If this method is used,  +		 * add does not need to be called. +		 * \param xors - List of Args to be added and xor'd.  +		 */ +		virtual void xorAdd( std::vector<Arg*>& xors )=0; + +		/** +		 * Parses the command line. +		 * \param argc - Number of arguments. +		 * \param argv - Array of arguments. +		 */ +		virtual void parse(int argc, const char * const * argv)=0; + +        /** +         * Parses the command line. +         * \param args - A vector of strings representing the args.  +         * args[0] is still the program name. +         */ +        void parse(std::vector<std::string>& args); + +		/** +		 * Returns the CmdLineOutput object. +		 */ +		virtual CmdLineOutput* getOutput()=0; + +		/** +		 * \param co - CmdLineOutput object that we want to use instead.  +		 */ +		virtual void setOutput(CmdLineOutput* co)=0; + +		/** +		 * Returns the version string. +		 */ +		virtual std::string& getVersion()=0; + +		/** +		 * Returns the program name string. +		 */ +		virtual std::string& getProgramName()=0; + +		/** +		 * Returns the argList.  +		 */ +		virtual std::list<Arg*>& getArgList()=0; + +		/** +		 * Returns the XorHandler.  +		 */ +		virtual XorHandler& getXorHandler()=0; + +		/** +		 * Returns the delimiter string. +		 */ +		virtual char getDelimiter()=0; + +		/** +		 * Returns the message string. +		 */ +		virtual std::string& getMessage()=0; + +		/** +		 * Indicates whether or not the help and version switches were created +		 * automatically. +		 */ +		virtual bool hasHelpAndVersion()=0; + +		/**  +		 * Resets the instance as if it had just been constructed so that the +		 * instance can be reused.  +		 */ +		virtual void reset()=0; +}; + +} //namespace + + +#endif  | 
