forked from OpenDDS/OpenDDS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOptions.h
More file actions
90 lines (71 loc) · 1.97 KB
/
Copy pathOptions.h
File metadata and controls
90 lines (71 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// -*- C++ -*-
//
/*
*
*
* Distributed under the OpenDDS License.
* See: http://www.opendds.org/license.html
*/
#ifndef OPTIONS_H
#define OPTIONS_H
// Needed here to avoid the pragma below when necessary.
#include /**/ "ace/pre.h"
#include /**/ "ace/config-all.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include <iosfwd>
#include <string>
#include <map>
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Configuration_Heap;
class ACE_Configuration_Section_Key;
ACE_END_VERSIONED_NAMESPACE_DECL
namespace Monitor {
/**
* @class Options
*
* @brief manage execution options
*
* This class extracts option information from the command line and makes
* it available to the process.
*
* Options extracted by this class are:
*
* -v
* Be verbose when executing.
*
* NOTE: The order on the command line determines the final value of a
* configurable element. This means that if more than one value is
* given on the command line the rightmost value will be used.
* Likewise if a value is configured on both the command line and
* in a configuration file, the processing order is honored.
* This means that it is preferable to specify the configuration
* file first on the command line so that the remaining values
* can override the values from the command line.
*/
class Options {
public:
Options( int argc, ACE_TCHAR** argv, char** envp = 0);
virtual ~Options();
/// Indication of configuration status.
operator bool() const;
/// @name Option processing information.
/// @{
/// Verbosity.
bool verbose() const;
/// Configuration status.
bool configured() const;
/// @}
/// Instrumentation domain.
long domain() const;
private:
/// Test verbosity.
bool verbose_;
/// Success of configuration steps.
bool configured_;
/// Instrumentation domain.
long domain_;
};
} // End of namespace Monitor
#endif // OPTIONS_H