UniversalIndentGUI 1.2.0
VersionVisitor.h
Go to the documentation of this file.
00001 // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
00002 
00003 /****************************************************************************** 
00004  * 
00005  *  file:  VersionVisitor.h
00006  * 
00007  *  Copyright (c) 2003, Michael E. Smoot .
00008  *  All rights reverved.
00009  * 
00010  *  See the file COPYING in the top directory of this distribution for
00011  *  more information.
00012  *  
00013  *  THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 
00014  *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
00015  *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
00016  *  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
00017  *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
00018  *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
00019  *  DEALINGS IN THE SOFTWARE.  
00020  *  
00021  *****************************************************************************/ 
00022 
00023 
00024 #ifndef TCLAP_VERSION_VISITOR_H
00025 #define TCLAP_VERSION_VISITOR_H
00026 
00027 #include <tclap/CmdLineInterface.h>
00028 #include <tclap/CmdLineOutput.h>
00029 #include <tclap/Visitor.h>
00030 
00031 namespace TCLAP {
00032 
00037 class VersionVisitor: public Visitor
00038 {
00039     protected:
00040 
00044         CmdLineInterface* _cmd;
00045 
00049         CmdLineOutput** _out;
00050 
00051     public:
00052 
00058         VersionVisitor( CmdLineInterface* cmd, CmdLineOutput** out ) 
00059                 : Visitor(), _cmd( cmd ), _out( out ) { }
00060 
00065         void visit() { 
00066             (*_out)->version(*_cmd); 
00067             throw ExitException(0); 
00068         }
00069 
00070 };
00071 
00072 }
00073 
00074 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines