ACE
6.4.2
|
Contains all framework components used by an application. More...
#include <Framework_Component.h>
Public Types | |
enum | { DEFAULT_SIZE = ACE_DEFAULT_FRAMEWORK_REPOSITORY_SIZE } |
Public Member Functions | |
~ACE_Framework_Repository (void) | |
int | open (int size=DEFAULT_SIZE) |
Initialize the repository. More... | |
int | close (void) |
int | register_component (ACE_Framework_Component *fc) |
int | remove_component (const ACE_TCHAR *name) |
int | remove_dll_components (const ACE_TCHAR *dll_name) |
Remove all components associated with a particular dll. More... | |
int | current_size (void) const |
Return the current size of the repository. More... | |
int | total_size (void) const |
Return the total size of the repository. More... | |
void | dump (void) const |
Dump the state of an object. More... | |
Static Public Member Functions | |
static ACE_Framework_Repository * | instance (int size=ACE_Framework_Repository::DEFAULT_SIZE) |
Get pointer to a process-wide ACE_Framework_Repository. More... | |
static void | close_singleton (void) |
Delete the dynamically allocated Singleton. More... | |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. More... | |
Protected Member Functions | |
ACE_Framework_Repository (int size=ACE_Framework_Repository::DEFAULT_SIZE) | |
Initialize the repository. More... | |
Private Member Functions | |
int | remove_dll_components_i (const ACE_TCHAR *dll_name) |
Actually removes the dll components, must be called with locks held. More... | |
void | compact (void) |
Private Member Functions inherited from ACE_Copy_Disabled | |
ACE_Copy_Disabled (void) | |
Default constructor. More... | |
Private Attributes | |
ACE_Framework_Component ** | component_vector_ |
Contains all the framework components. More... | |
int | current_size_ |
Current number of components. More... | |
int | total_size_ |
Maximum number of components. More... | |
ACE_SYNCH_MUTEX | lock_ |
Synchronization variable for the repository. More... | |
Static Private Attributes | |
static ACE_Framework_Repository * | repository_ = 0 |
Pointer to a process-wide ACE_Framework_Repository. More... | |
static sig_atomic_t | shutting_down_ = 0 |
Friends | |
class | ACE_Framework_Component |
Contains all framework components used by an application.
This class contains a vector of ACE_Framework_Component *'s. On destruction, framework components are destroyed in the reverse order that they were added originally.
ACE_Framework_Repository::~ACE_Framework_Repository | ( | void | ) |
Close down the repository and free up dynamically allocated resources.
|
protected |
Initialize the repository.
int ACE_Framework_Repository::close | ( | void | ) |
Close down the repository and free up dynamically allocated resources, also called by dtor.
|
static |
Delete the dynamically allocated Singleton.
|
private |
Compact component_vector_ after components have been removed__maintains order.
|
inline |
Return the current size of the repository.
void ACE_Framework_Repository::dump | ( | void | ) | const |
Dump the state of an object.
|
static |
Get pointer to a process-wide ACE_Framework_Repository.
int ACE_Framework_Repository::open | ( | int | size = DEFAULT_SIZE | ) |
Initialize the repository.
int ACE_Framework_Repository::register_component | ( | ACE_Framework_Component * | fc | ) |
Insert a new component. Returns -1 when the repository is full and 0 on success.
int ACE_Framework_Repository::remove_component | ( | const ACE_TCHAR * | name | ) |
Remove a component. Returns -1 on error or if component not found and 0 on success.
int ACE_Framework_Repository::remove_dll_components | ( | const ACE_TCHAR * | dll_name | ) |
Remove all components associated with a particular dll.
|
private |
Actually removes the dll components, must be called with locks held.
|
inline |
Return the total size of the repository.
|
friend |
ACE_Framework_Repository::ACE_ALLOC_HOOK_DECLARE |
Declare the dynamic allocation hooks.
|
private |
Contains all the framework components.
|
private |
Current number of components.
|
private |
Synchronization variable for the repository.
|
staticprivate |
Pointer to a process-wide ACE_Framework_Repository.
|
staticprivate |
Flag set when repository is the process of shutting down. This is necessary to keep from self-deadlocking since some of the components might make calls back to the repository to unload their components, e.g., ACE_DLL_Manager.
|
private |
Maximum number of components.