summaryrefslogtreecommitdiff
path: root/modules/CIAO/DAnCE/RepositoryManager/Options.h
blob: 845e339cedd3dc71a54b5eacd66401b1a7f3da39 (plain)
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
91
92
93
// $Id$

/* -*- C++ -*- */

//=============================================================================
/**
 *  @file    Options.h
 *
 *  $Id$
 *
 *   TheOptions is an Options class wrapped into an ACE_Singleton
 *   with Null_Mutex because the client is single-threaded.
 *
 *
 *  @author Stoyan Paunov
 */
//=============================================================================


#ifndef RM_OPTIONS_H
#define RM_OPTIONS_H

#include "ace/Get_Opt.h"
#include "ace/SString.h"    //for ACE_CString
#include "ace/Singleton.h"  //for ACE_Singleton
#include "ace/Null_Mutex.h" //for ACE_Null_Mutex

//forward declaration
class Options;

typedef ACE_Singleton <Options, ACE_Null_Mutex> TheOptions;

class Options
{
public:

  ///constructor
  Options (void);

  /// parses commandline arguments
  bool parse_args (int argc, ACE_TCHAR *argv[]);

  /// Name of package
  ACE_CString name_;

  /// Name of package
  ACE_CString uuid_;

  /// Type of package
  ACE_CString type_;

  /// specifies the local path for install
  ACE_CString path_;

  /// delete the name_
  bool delete_;

  /// installs the name_
  bool install_;

  /// creates the name_
  bool create_;

  /// finds the name_
  bool find_;

  /// get all Names
  bool all_names_;

  /// get all types
  bool all_types_;

  /// find all names by type
  bool names_by_type_;

  /// shutdown the RepositoryManagerDemon
  bool shutdown_;

  // use naming service
  bool register_with_ns_;

  // use ior file
  bool write_to_ior_;

  // Name of RepoMan
  ACE_CString repoman_name_;

protected:
  //usage function
  void usage (void);
};

#endif /* RM_OPTIONS_H */