- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Options Class Reference

Maintains the global options. More...

`#include <Locator_Options.h>`

Collaboration diagram for Options:

[legend]
List of all members.

## Public Types
enum | SERVICE_COMMAND { SC_NONE, SC_INSTALL, SC_REMOVE }
enum | RepoMode { REPO_NONE, REPO_XML_FILE, REPO_HEAP_FILE, REPO_REGISTRY }
## Public Member Functions
| Options ()
int | init (int argc, char *argv[])
| Parse the command-line arguments and initialize the options.
int | init_from_registry ()
| This version should only be used when run as an nt service.
bool | service (void) const
| Service Mode.
unsigned int | debug (void) const
| Debug level for the Implementation Repository.
const ACE_TString & | ior_filename (void) const
| Returns the file where the IOR should be stored.
bool | multicast (void) const
| Will we listen for multicast location requests?
SERVICE_COMMAND | service_command (void) const
| The nt service command to run (install/remove).
int | save_registry_options ()
const char * | cmdline (void) const
const ACE_TString & | persist_file_name (void) const
bool | readonly (void) const
| Do we allow modifications to the servers?
RepoMode | repository_mode (void) const
bool | repository_erase (void) const
| Do we wish to clear out the repository.
ACE_Time_Value | startup_timeout (void) const
| Returns the timeout value for program starting.
ACE_Time_Value | ping_interval (void) const
## Private Member Functions
int | parse_args (int &argc, char *argv[])
| Parses and pulls out arguments for the ImR.
void | print_usage (void) const
| Print the usage information.
int | run_service_command (const ACE_TString &cmdline)
| Run a service command.
int | load_registry_options ()
## Private Attributes
RepoMode | repo_mode_
bool | erase_repo_
unsigned int | debug_
| Debug level.
ACE_TString | ior_output_file_
| File where the IOR of the server object is stored.
bool | multicast_
| Will we listen for multicast location requests?
bool | service_
| Are we running as a service?
ACE_Time_Value | ping_interval_
| The amount of time between successive "are you started yet?" pings.
ACE_Time_Value | startup_timeout_
| The amount of time to wait for a server to response after starting it.
bool | readonly_
| Can the server_repository be modified?
SERVICE_COMMAND | service_command_
| SC_NONE, SC_INSTALL, SC_REMOVE, ...
ACE_CString | cmdline_
| Our extra command line arguments.
ACE_TString | persist_file_name_
| The persistent XML file name.

## Detailed Description

Maintains the global options.

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

## Member Enumeration Documentation

enum Options::RepoMode

Enumerator:

  REPO_NONE |
  REPO_XML_FILE |
  REPO_HEAP_FILE |
  REPO_REGISTRY |

enum Options::SERVICE_COMMAND

Enumerator:

  SC_NONE |
  SC_INSTALL |
  SC_REMOVE |

## Constructor & Destructor Documentation

Options::Options | ( |  | ) |

## Member Function Documentation

const char * Options::cmdline | ( | void |  | ) | const

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

Debug level for the Implementation Repository.

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

Parse the command-line arguments and initialize the options.

int Options::init_from_registry | ( |  | ) |

This version should only be used when run as an nt service.

const ACE_CString & Options::ior_filename | ( | void |  | ) | const

Returns the file where the IOR should be stored.

int Options::load_registry_options | ( |  | ) | `[private]`

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

Will we listen for multicast location requests?

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

Parses and pulls out arguments for the ImR.

const ACE_CString & Options::persist_file_name | ( | void |  | ) | const

File that contains the activator related information that the persistent locator has to save.

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

If the server hasn't been verified for a while, then we'll ping it. Note : No timers are currently used. We simply ping() during indirect invocations, if this interval has elapsed.

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

Print the usage information.

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

Do we allow modifications to the servers?

bool Options::repository_erase | ( | void |  | ) | const

Do we wish to clear out the repository.

Options::RepoMode Options::repository_mode | ( | void |  | ) | const

int Options::run_service_command | ( | const ACE_TString & | cmdline | ) | `[private]`

Run a service command.

int Options::save_registry_options | ( |  | ) |

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

Service Mode.

Options::SERVICE_COMMAND Options::service_command | ( | void |  | ) | const

The nt service command to run (install/remove).

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

Returns the timeout value for program starting.

## Member Data Documentation

ACE_CString Options::cmdline_`[private]`

Our extra command line arguments.

unsigned int Options::debug_`[private]`

Debug level.

bool Options::erase_repo_`[private]`

ACE_TString Options::ior_output_file_`[private]`

File where the IOR of the server object is stored.

bool Options::multicast_`[private]`

Will we listen for multicast location requests?

ACE_TString Options::persist_file_name_`[private]`

The persistent XML file name.

ACE_Time_Value Options::ping_interval_`[private]`

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

bool Options::readonly_`[private]`

Can the server_repository be modified?

RepoMode Options::repo_mode_`[private]`

bool Options::service_`[private]`

Are we running as a service?

SERVICE_COMMAND Options::service_command_`[private]`

SC_NONE, SC_INSTALL, SC_REMOVE, ...

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:

- Locator_Options.h
- Locator_Options.cpp