Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Options Class Reference

Maintains the global options. More...

`#include <Options.h>`

Collaboration diagram for Options:

[legend]
List of all members.

## Public Methods
| Options ()
| Default Constructor. More...
| ~Options ()
| Destructor. More...
int | init (int argc, ACE_TCHAR *argv[])
| Parse the command-line arguments and initialize the options. More...
int | service (void) const
| Service Mode. More...
unsigned int | debug (void) const
| Debug level for the Implementation Repository. More...
FILE * | output_file (void) const
| Returns the file where the IOR should be stored. More...
ACE_Configuration * | config (void) const
| Returns the configuration object. More...
const ACE_Time_Value & | startup_timeout (void) const
| Returns the timeout value for program starting. More...
const ACE_Time_Value & | ping_interval (void) const
| Returns the timeout value for program starting. More...
CORBA::ORB_ptr | orb (void) const
| Returns a pointer to the ORB. More...
int | multicast (void) const
| Will we listen for multicast location requests? More...
int | readonly (void) const
| Do we allow modifications to the servers? More...
## Private Methods
int | parse_args (int &argc, ACE_TCHAR *argv[])
| Parses and pulls out arguments for the ImR. More...
void | print_usage (void) const
| Print the usage information. More...
int | initialize_file_persistence (const ACE_TCHAR *filename)
| Initialize file persistence. More...
int | initialize_registry_persistence (void)
| Initialize Registry persistence. More...
int | initialize_non_persistence (void)
| Initialize default heap for no persistence. More...
int | run_service_command (const ACE_TCHAR *command)
| Run a service command. More...
int | load_registry_options (ACE_ARGV &orb_options)
| Loads ORB options from the registry. More...
## Private Attributes
ACE_Configuration * | config_
| The persistent configuration object. More...
unsigned int | debug_
| Debug level. More...
FILE * | ior_output_file_
| File where the IOR of the server object is stored. More...
int | multicast_
| Will we listen for multicast location requests? More...
CORBA::ORB_var | orb_
| The ORB for the Implementation Repository. More...
ACE_Time_Value | ping_interval_
| The amount of time between successive "are you started yet?" pings. More...
int | service_
| Are we running as a service? More...
ACE_Time_Value | startup_timeout_
| The amount of time to wait for a server to response after starting it. More...
int | readonly_
| Can the server_repository be modified? More...

## Detailed Description

Maintains the global options.

This is where all the settings for TAO's Implementation Repository is stored.

## Constructor & Destructor Documentation

Options::Options | ( |  | ) |

| Default Constructor. Assigns default values to all the member variables.

Options::~Options | ( |  | ) |

| Destructor. Just deletes this->config_.

## Member Function Documentation

ACE_Configuration * Options::config | ( | void |  | ) | const

| Returns the configuration object. Returns: The ACE_Configuration object that is used to store data.

unsigned int Options::debug | ( | void |  | ) | const

  | Debug level for the Implementation Repository. Return values:
  0 | Quiet
  1 | Trace messages
  2 | Detailed messages

int Options::init | ( | int | argc,
|  | ACE_TCHAR * | argv[]
| ) |

  | Parse the command-line arguments and initialize the options. Return values:
  0 | Success
  -1 | Error parsing args
  1 | Success but we should exit.

int Options::initialize_file_persistence | ( | const ACE_TCHAR * | filename | ) | `[private]`

  | Initialize file persistence. Here we assign an ACE_Configuration_Heap object using Parameters:
  filename | as the file.
  Return values:
  0 | Success
  -1 | Failure

int Options::initialize_non_persistence | ( | void |  | ) | `[private]`

  | Initialize default heap for no persistence. Initializes this->config_ to an opened ACE_Configuration_Heap. Return values:
  0 | Success
  -1 | Failure

int Options::initialize_registry_persistence | ( | void |  | ) | `[private]`

  | Initialize Registry persistence. Assigns a ACE_Configuration_Win32Registry to this->config_. On non-Win32 systems, just returns an error. Todo: Where in the registry should this be stored? Return values:
  0 | Success
  -1 | Failure

int Options::load_registry_options | ( | ACE_ARGV & | orb_options | ) | `[private]`

| Loads ORB options from the registry. The location we store options in is HKEY_LOCAL_MACHINE: SYSTEM\CurrentControlSet\Services\TAOImplRepo\Parameters The only key currently supported is ORBOptions Todo: Is there a better way to handle the hKey? (as in a auto_ptr)

int Options::multicast | ( | void |  | ) | const

  | Will we listen for multicast location requests? Return values:
  0 | Do not listen for multicast location requests.
  1 | Do Listen.

CORBA::ORB_ptr Options::orb | ( | void |  | ) | const

| Returns a pointer to the ORB. Returns: A pointer to the ORB.

FILE * Options::output_file | ( | void |  | ) | const

| Returns the file where the IOR should be stored. Returns: The file where the IOR will be stored.

int Options::parse_args | ( | int & | argc,
|  | ACE_TCHAR * | argv[]
| ) | `[private]`

  | Parses and pulls out arguments for the ImR. Return values:
  0 | Success
  -1 | Error parsing args
  1 | Success but we should exit.

const ACE_Time_Value & Options::ping_interval | ( | void |  | ) | const

| Returns the timeout value for program starting. Returns: The amount of time to wait between pings

void Options::print_usage | ( | void |  | ) | const`[private]`

| Print the usage information.

int Options::readonly | ( | void |  | ) | const

  | Do we allow modifications to the servers? Return values:
  0 | Normal operation.
  1 | Do not let server info be modified.

int Options::run_service_command | ( | const ACE_TCHAR * | command | ) | `[private]`

| Run a service command. Right now these include 'install' and 'remove'. Others, such as 'start' and 'stop' can be added, but the 'net' program in Windows already handles these commands. Todo: Finish implementing Options::run_service_command Update to unicode

int Options::service | ( | void |  | ) | const

  | Service Mode. Return values:
  0 | Run as standalone service
  1 | Run as a service (only on NT right now)

const ACE_Time_Value & Options::startup_timeout | ( | void |  | ) | const

| Returns the timeout value for program starting. Returns: The amount of time to wait for a server to start.

## Member Data Documentation

ACE_Configuration* Options::config_`[private]`

| The persistent configuration object.

unsigned int Options::debug_`[private]`

| Debug level.

FILE* Options::ior_output_file_`[private]`

| File where the IOR of the server object is stored.

int Options::multicast_`[private]`

| Will we listen for multicast location requests?

CORBA::ORB_var Options::orb_`[private]`

| The ORB for the Implementation Repository.

ACE_Time_Value Options::ping_interval_`[private]`

| The amount of time between successive "are you started yet?" pings.

int Options::readonly_`[private]`

| Can the server_repository be modified?

int Options::service_`[private]`

| Are we running as a service?

ACE_Time_Value Options::startup_timeout_`[private]`

| The amount of time to wait for a server to response after starting it.

The documentation for this class was generated from the following files:

- Options.h
- Options.cpp