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

# ACE_Service_Repository Class Reference

Contains all the services offered by a Service Configurator-based application. More...

`#include <Service_Repository.h>`

Collaboration diagram for ACE_Service_Repository:

[legend]
List of all members.

## Public Types
enum | { DEFAULT_SIZE = ACE_DEFAULT_SERVICE_REPOSITORY_SIZE }
## Public Methods
| ACE_Service_Repository (void)
| Initialize the repository.
| ACE_Service_Repository (int size)
| Initialize the repository.
int | open (int size=DEFAULT_SIZE)
| Initialize the repository.
| ~ACE_Service_Repository (void)
int | close (void)
int | fini (void)
int | insert (const ACE_Service_Type *)
int | find (const ACE_TCHAR name[], const ACE_Service_Type **srp=0, int ignore_suspended=1)
int | remove (const ACE_TCHAR[])
| Remove an existing service record.
int | resume (const ACE_TCHAR[], const ACE_Service_Type **=0)
| Resume a service record.
int | suspend (const ACE_TCHAR[], const ACE_Service_Type **=0)
| Suspend a service record.
int | current_size (void) const
| Return the current size of the repository.
int | total_size (void) const
| Return the total size of the repository.
void | dump (void) const
| Dump the state of an object.
## Static Public Methods
ACE_Service_Repository * | instance (int size=ACE_Service_Repository::DEFAULT_SIZE)
| Get pointer to a process-wide <ACE_Service_Repository>.
ACE_Service_Repository * | instance (ACE_Service_Repository *)
void | close_singleton (void)
| Delete the dynamically allocated Singleton.
## Public Attributes
| ACE_ALLOC_HOOK_DECLARE
| Declare the dynamic allocation hooks.
## Private Methods
int | find_i (const ACE_TCHAR service_name[], const ACE_Service_Type **=0, int ignore_suspended=1)
## Private Attributes
const ACE_Service_Type ** | service_vector_
| Contains all the configured services.
int | current_size_
| Current number of services.
int | total_size_
| Maximum number of services.
## Static Private Attributes
ACE_Service_Repository * | svc_rep_ = 0
| Pointer to a process-wide <ACE_Service_Repository>.
int | delete_svc_rep_ = 0
| Must delete the <svc_rep_> if non-0.
## Friends
class | ACE_Service_Repository_Iterator

## Detailed Description

Contains all the services offered by a Service Configurator-based application.

This class contains a vector of <ACE_Service_Types> *'s and allows an administrative entity to centrally manage and control the behavior of application services. Note that if services are removed from the middle of the repository the order won't necessarily be maintained since the <remove> method performs compaction. However, the common case is not to remove services, so typically they are deleted in the reverse order that they were added originally.

## Member Enumeration Documentation

anonymous enum

  | Enumeration values:
  DEFAULT_SIZE |

## Constructor & Destructor Documentation

ACE_Service_Repository::ACE_Service_Repository | ( | void |  | ) |

| Initialize the repository.

ACE_Service_Repository::ACE_Service_Repository | ( | int | size | ) |

| Initialize the repository.

ACE_Service_Repository::~ACE_Service_Repository | ( | void |  | ) |

| Close down the repository and free up dynamically allocated resources.

## Member Function Documentation

int ACE_Service_Repository::close | ( | void |  | ) |

| Close down the repository and free up dynamically allocated resources.

void ACE_Service_Repository::close_singleton | ( | void |  | ) | `[static]`

| Delete the dynamically allocated Singleton.

ACE_INLINE int ACE_Service_Repository::current_size | ( | void |  | ) | const

| Return the current size of the repository.

void ACE_Service_Repository::dump | ( | void |  | ) | const

| Dump the state of an object.

int ACE_Service_Repository::find | ( | const ACE_TCHAR | name[],
|  | const ACE_Service_Type ** | srp = 0,
|  | int | ignore_suspended = 1
| ) |

| Locate an entry with <name> in the table. If <ignore_suspended> is set then only consider services marked as resumed. If the caller wants the located entry, pass back a pointer to the located entry via <srp>. If <name> is not found, -1 is returned. If <name> is found, but it is suspended and the caller wants to ignore suspended services a -2 is returned.

int ACE_Service_Repository::find_i | ( | const ACE_TCHAR | service_name[],
|  | const ACE_Service_Type ** | = 0,
|  | int | ignore_suspended = 1
| ) | `[private]`

| Locates <service_name>. Must be called without locks being held...

int ACE_Service_Repository::fini | ( | void |  | ) |

| Finalize all the services by calling <fini> and deleting dynamically allocated services.

int ACE_Service_Repository::insert | ( | const ACE_Service_Type * |  | ) |

| Insert a new service record. Returns -1 when the service repository is full and 0 on success.

ACE_Service_Repository * ACE_Service_Repository::instance | ( | ACE_Service_Repository * |  | ) | `[static]`

| Set pointer to a process-wide <ACE_Service_Repository> and return existing pointer.

ACE_Service_Repository * ACE_Service_Repository::instance | ( | int | size = ACE_Service_Repository::DEFAULT_SIZE | ) | `[static]`

| Get pointer to a process-wide <ACE_Service_Repository>.

int ACE_Service_Repository::open | ( | int | size = DEFAULT_SIZE | ) |

| Initialize the repository.

int ACE_Service_Repository::remove | ( | const | ACE_TCHAR[] | ) |

| Remove an existing service record.

int ACE_Service_Repository::resume | ( | const | ACE_TCHAR[],
|  | const ACE_Service_Type ** | = 0
| ) |

| Resume a service record.

int ACE_Service_Repository::suspend | ( | const | ACE_TCHAR[],
|  | const ACE_Service_Type ** | = 0
| ) |

| Suspend a service record.

ACE_INLINE int ACE_Service_Repository::total_size | ( | void |  | ) | const

| Return the total size of the repository.

## Friends And Related Function Documentation

friend class ACE_Service_Repository_Iterator`[friend]`

## Member Data Documentation

ACE_Service_Repository::ACE_ALLOC_HOOK_DECLARE

| Declare the dynamic allocation hooks.

int ACE_Service_Repository::current_size_`[private]`

| Current number of services.

int ACE_Service_Repository::delete_svc_rep_ = 0`[static, private]`

| Must delete the <svc_rep_> if non-0.

const ACE_Service_Type** ACE_Service_Repository::service_vector_`[private]`

| Contains all the configured services.

ACE_Service_Repository * ACE_Service_Repository::svc_rep_ = 0`[static, private]`

| Pointer to a process-wide <ACE_Service_Repository>.

int ACE_Service_Repository::total_size_`[private]`

| Maximum number of services.

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

- /export2/deucetmp/bala/release_try/ACE_wrappers/ace/Service_Repository.h
- /export2/deucetmp/bala/release_try/ACE_wrappers/ace/Service_Repository.cpp
- /export2/deucetmp/bala/release_try/ACE_wrappers/ace/Service_Repository.i