VR-Forces 4.1.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
tdbutil
arguments.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2004 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
/*******************************************************************************
6
** $RCSfile: arguments.h,v $ $Revision: 1.2 $ $State: Exp $
7
*******************************************************************************/
8
#ifndef arguments_H_
9
#define arguments_H_
10
11
//
12
// \file arguments.h
13
// \brief This file contains the declaration of the DtArguments class.
14
//
15
16
#include "
tdbutil/tdbUtilDefines.h
"
17
#include <vlutil/vlConfig.h>
18
#include <list>
19
#include <string>
20
21
22
//
23
// Class to create a list of arguments from specified source. It serves to abstract
24
// away the original source of the arguments (argc/argv, a string, a file, etc).
25
// Currently, only processes a command line (argc/argv), but could easily be extended
26
// to process a file, string, etc.
27
class
DT_DLL_tdbutil
DtArguments
28
{
29
public
:
30
typedef
std::string
DtArgument
;
31
typedef
std::list<DtArgument>
DtArgumentContainer
;
32
typedef
DtArgumentContainer::iterator
DtArgumentIter
;
33
typedef
DtArgumentContainer::const_iterator
DtArgumentConstIter
;
34
35
// Reads the arguments from the old argc/argv convention for int main().
36
// \note The program name, is @b not read into the arguments list as it is
37
// not considered an argument. If needed, the user should read that
38
// out of argv[0] them self.
39
DtArguments
(
int
argc,
const
char
*argv[]);
40
41
virtual
~
DtArguments
();
42
43
private
:
44
// not implemented
45
DtArguments
& operator=(
const
DtArguments
& other);
46
DtArguments
(
const
DtArguments
& other);
47
48
49
public
:
50
51
DtArgumentConstIter
begin()
const
;
52
DtArgumentConstIter
end()
const
;
53
54
unsigned
numArguments()
const
;
55
56
57
private
:
58
59
void
addArgument(
const
std::string& argument);
60
61
// the list of arguments, in order specified
62
DtArgumentContainer
myArguments
;
63
};
64
65
66
#endif
Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)