1 /******************************************************************************* 2 3 Extension for the ArgumentsExt Application extension. 4 5 Copyright: 6 Copyright (c) 2009-2016 dunnhumby Germany GmbH. 7 All rights reserved. 8 9 License: 10 Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. 11 Alternatively, this file may be distributed under the terms of the Tango 12 3-Clause BSD License (see LICENSE_BSD.txt for details). 13 14 *******************************************************************************/ 15 16 module ocean.util.app.ext.model.IArgumentsExtExtension; 17 18 19 20 21 import ocean.meta.types.Qualifiers; 22 23 public import ocean.util.app.model.IApplication; 24 public import ocean.text.Arguments : Arguments; 25 26 import ocean.util.app.model.IExtension; 27 28 29 30 /******************************************************************************* 31 32 Interface for extensions for the ArgumentsExt Application extension. 33 34 *******************************************************************************/ 35 36 interface IArgumentsExtExtension : IExtension 37 { 38 39 /*************************************************************************** 40 41 Function executed when command line arguments are set up (before 42 parsing). 43 44 Params: 45 app = application instance 46 args = command line arguments instance 47 48 ***************************************************************************/ 49 50 void setupArgs ( IApplication app, Arguments args ); 51 52 53 /*************************************************************************** 54 55 Function executed after parsing of command line args (whether the basic 56 parsing failed or succeeded) but before the call to validateArgs(). 57 58 Params: 59 app = application instance 60 args = command line arguments instance 61 62 ***************************************************************************/ 63 64 void preValidateArgs ( IApplication app, Arguments args ); 65 66 67 /*************************************************************************** 68 69 Function executed after parsing the command line arguments. 70 71 This function is only called if the arguments are valid so far. 72 73 Params: 74 app = application instance 75 args = command line arguments instance 76 77 Returns: 78 string with an error message if validation failed, null otherwise 79 80 ***************************************************************************/ 81 82 cstring validateArgs ( IApplication app, Arguments args ); 83 84 85 /*************************************************************************** 86 87 Function executed after (successfully) validating the command line 88 arguments. 89 90 Params: 91 app = application instance 92 args = command line arguments instance 93 94 ***************************************************************************/ 95 96 void processArgs ( IApplication app, Arguments args ); 97 98 }