~ubuntu-branches/ubuntu/karmic/firebird2.1/karmic

« back to all changes in this revision

Viewing changes to src/config/Args.h

  • Committer: Bazaar Package Importer
  • Author(s): Damyan Ivanov
  • Date: 2008-05-26 23:59:25 UTC
  • Revision ID: james.westby@ubuntu.com-20080526235925-2pnqj6nxpppoeaer
Tags: upstream-2.1.0.17798-0.ds2
ImportĀ upstreamĀ versionĀ 2.1.0.17798-0.ds2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  
 
3
 *     The contents of this file are subject to the Initial 
 
4
 *     Developer's Public License Version 1.0 (the "License"); 
 
5
 *     you may not use this file except in compliance with the 
 
6
 *     License. You may obtain a copy of the License at 
 
7
 *     http://www.ibphoenix.com/idpl.html. 
 
8
 *
 
9
 *     Software distributed under the License is distributed on 
 
10
 *     an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either 
 
11
 *     express or implied.  See the License for the specific 
 
12
 *     language governing rights and limitations under the License.
 
13
 *
 
14
 *     The contents of this file or any work derived from this file
 
15
 *     may not be distributed under any other license whatsoever 
 
16
 *     without the express prior written permission of the original 
 
17
 *     author.
 
18
 *
 
19
 *
 
20
 *  The Original Code was created by James A. Starkey for IBPhoenix.
 
21
 *
 
22
 *  Copyright (c) 1997 - 2000, 2001, 2003 James A. Starkey
 
23
 *  Copyright (c) 1997 - 2000, 2001, 2003 Netfrastructure, Inc.
 
24
 *  All Rights Reserved.
 
25
 */
 
26
// Args.h: interface for the Args class.
 
27
//
 
28
//////////////////////////////////////////////////////////////////////
 
29
 
 
30
#if !defined(AFX_ARGS_H__7C584339_5A11_4040_889B_417B607C858B__INCLUDED_)
 
31
#define AFX_ARGS_H__7C584339_5A11_4040_889B_417B607C858B__INCLUDED_
 
32
 
 
33
//#include "JString.h"  // Added by ClassView
 
34
#if defined _MSC_VER  && _MSC_VER >= 1000
 
35
#pragma once
 
36
#endif // _MSC_VER > 1000
 
37
 
 
38
struct Switches 
 
39
        {
 
40
    const char  *string;
 
41
        bool            *boolean;
 
42
        char            **argument;
 
43
        const char      *argName;
 
44
        const char      *description;
 
45
        };
 
46
 
 
47
#define WORD_ARG(value,name)    "", NULL, &value, name, NULL,
 
48
#define ARG_ARG(sw,value,help)  sw, NULL, &value, NULL, help,
 
49
#define SW_ARG(sw,value,help)   sw, &value,NULL,  NULL, help,
 
50
 
 
51
class Args  
 
52
{
 
53
public:
 
54
        static bool readPassword (const char *msg, char *pw1, int length);
 
55
        static bool readPasswords(const char *msg, char *pw1, int length);
 
56
        static void printHelp (const char *helpText, const Switches *switches);
 
57
        static void init (const Switches *switches);
 
58
        static void parse (const Switches *switches, int argc, char **argv);
 
59
        Args();
 
60
        virtual ~Args();
 
61
 
 
62
};
 
63
 
 
64
#endif // !defined(AFX_ARGS_H__7C584339_5A11_4040_889B_417B607C858B__INCLUDED_)