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

# TAO_Service_Type_Repository Class Reference

This class implements CosTradingRepos::ServiceTypeRepository IDL interface. More...

`#include <Service_Type_Repository.h>`

Collaboration diagram for TAO_Service_Type_Repository:

[legend]
List of all members.

## Public Methods
| TAO_Service_Type_Repository (ACE_Lock *lock=0)
| ~TAO_Service_Type_Repository (void)
virtual CosTradingRepos::ServiceTypeRepository::IncarnationNumber | incarnation (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) throw (CORBA::SystemException)
virtual CosTradingRepos::ServiceTypeRepository::IncarnationNumber | add_type (const char *name, const char *if_name, const CosTradingRepos::ServiceTypeRepository::PropStructSeq &props, const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq &super_types ACE_ENV_ARG_DECL_NOT_USED) throw (CORBA::SystemException, CosTrading::IllegalServiceType, CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch, CosTrading::IllegalPropertyName, CosTrading::DuplicatePropertyName, CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, CosTrading::UnknownServiceType, CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName)
virtual void | remove_type (const char *name ACE_ENV_ARG_DECL_NOT_USED) throw (CORBA::SystemException, CosTrading::IllegalServiceType, CosTrading::UnknownServiceType, CosTradingRepos::ServiceTypeRepository::HasSubTypes)
virtual CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq * | list_types (const CosTradingRepos::ServiceTypeRepository::SpecifiedServiceTypes &which_types ACE_ENV_ARG_DECL_NOT_USED) throw (CORBA::SystemException)
virtual CosTradingRepos::ServiceTypeRepository::TypeStruct * | describe_type (const char *name ACE_ENV_ARG_DECL_NOT_USED) throw (CORBA::SystemException, CosTrading::IllegalServiceType, CosTrading::UnknownServiceType)
virtual CosTradingRepos::ServiceTypeRepository::TypeStruct * | fully_describe_type (const char *name ACE_ENV_ARG_DECL_NOT_USED) throw (CORBA::SystemException, CosTrading::IllegalServiceType, CosTrading::UnknownServiceType)
virtual void | mask_type (const char *name ACE_ENV_ARG_DECL_NOT_USED) throw (CORBA::SystemException, CosTrading::IllegalServiceType, CosTrading::UnknownServiceType, CosTradingRepos::ServiceTypeRepository::AlreadyMasked)
virtual void | unmask_type (const char *name ACE_ENV_ARG_DECL_NOT_USED) throw (CORBA::SystemException, CosTrading::IllegalServiceType, CosTrading::UnknownServiceType, CosTradingRepos::ServiceTypeRepository::NotMasked)
## Private Types
typedef ACE_Hash_Map_Manager_Ex< TAO_String_Hash_Key, CosTradingRepos::ServiceTypeRepository::PropStruct *, ACE_Hash< TAO_String_Hash_Key >, ACE_Equal_To< TAO_String_Hash_Key >, ACE_Null_Mutex > | Prop_Map
typedef ACE_Hash_Map_Manager_Ex< TAO_String_Hash_Key, Type_Info *, ACE_Hash< TAO_String_Hash_Key >, ACE_Equal_To< TAO_String_Hash_Key >, ACE_Null_Mutex > | Service_Type_Map
typedef ACE_Hash_Map_Iterator_Ex< TAO_String_Hash_Key, Type_Info *, ACE_Hash< TAO_String_Hash_Key >, ACE_Equal_To< TAO_String_Hash_Key >, ACE_Null_Mutex > | Service_Type_Map_Iterator
## Private Methods
void | fully_describe_type_i (const CosTradingRepos::ServiceTypeRepository::TypeStruct &type_struct, CosTradingRepos::ServiceTypeRepository::PropStructSeq &props, CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq &super_types)
void | collect_inheritance_hierarchy (const CosTradingRepos::ServiceTypeRepository::TypeStruct &type_struct, TAO_String_Queue &target)
void | validate_properties (Prop_Map &prop_map, const CosTradingRepos::ServiceTypeRepository::PropStructSeq &props ACE_ENV_ARG_DECL_NOT_USED) throw (CosTrading::IllegalPropertyName, CosTrading::DuplicatePropertyName)
| Confirm that the properties in props have valid names, and aren't duplicated. Cram those properties into the prop_map. More...
void | validate_supertypes (Service_Type_Map &super_map, const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq &super_types ACE_ENV_ARG_DECL_NOT_USED) throw (CosTrading::IllegalServiceType, CosTrading::UnknownServiceType, CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName)
| Confirm that the each super type exists, and cram them into super_map. More...
void | validate_inheritance (Prop_Map &prop_map, const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq &super_types ACE_ENV_ARG_DECL_NOT_USED) throw (CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition)
| Ensure that properties of a super_type aren't having their types or retstrictions redefined. More...
void | update_type_map (const char *name, const char *if_name, const CosTradingRepos::ServiceTypeRepository::PropStructSeq &props, const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq &super_types, Prop_Map &prop_map, Service_Type_Map &super_map)
| Update the type map with the information contained in the TypeStruct, prop_map, and super_map. More...
| TAO_Service_Type_Repository (const TAO_Service_Type_Repository &)
TAO_Service_Type_Repository & | operator= (const TAO_Service_Type_Repository &)
## Private Attributes
ACE_Lock * | lock_
| Lock with which to serialize access to the service type map. More...
Service_Type_Map | type_map_
CosTradingRepos::ServiceTypeRepository::IncarnationNumber | incarnation_
| Incarnation number to be used for the next modification to the repository. More...

## Detailed Description

This class implements CosTradingRepos::ServiceTypeRepository IDL interface.

## Member Typedef Documentation

typedef ACE_Hash_Map_Manager_Ex<TAO_String_Hash_Key, CosTradingRepos::ServiceTypeRepository::PropStruct *, ACE_Hash<TAO_String_Hash_Key>, ACE_Equal_To<TAO_String_Hash_Key>, ACE_Null_Mutex> TAO_Service_Type_Repository::Prop_Map`[private]`

typedef ACE_Hash_Map_Manager_Ex<TAO_String_Hash_Key, Type_Info *, ACE_Hash<TAO_String_Hash_Key>, ACE_Equal_To<TAO_String_Hash_Key>, ACE_Null_Mutex> TAO_Service_Type_Repository::Service_Type_Map`[private]`

typedef ACE_Hash_Map_Iterator_Ex<TAO_String_Hash_Key, Type_Info *, ACE_Hash<TAO_String_Hash_Key>, ACE_Equal_To<TAO_String_Hash_Key>, ACE_Null_Mutex> TAO_Service_Type_Repository::Service_Type_Map_Iterator`[private]`

## Constructor & Destructor Documentation

TAO_Service_Type_Repository::TAO_Service_Type_Repository | ( | ACE_Lock * | lock = 0 | ) |

| Parameterize the Service_Type_Repository with a lock to serialize access to the type repository map. A reader/writer lock is probably best. The Service_Type_Repository assumes control of the lock.

TAO_Service_Type_Repository::~TAO_Service_Type_Repository | ( | void |  | ) |

TAO_Service_Type_Repository::TAO_Service_Type_Repository | ( | const TAO_Service_Type_Repository & |  | ) | `[private]`

## Member Function Documentation

CosTradingRepos::ServiceTypeRepository::IncarnationNumber TAO_Service_Type_Repository::add_type | ( | const char * | name,
|  | const char * | if_name,
|  | const CosTradingRepos::ServiceTypeRepository::PropStructSeq & | props,
|  | const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq &super_types | ACE_ENV_ARG_DECL
| ) | throw (CORBA::SystemException, CosTrading::IllegalServiceType, CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch, CosTrading::IllegalPropertyName, CosTrading::DuplicatePropertyName, CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, CosTrading::UnknownServiceType, CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName)`[virtual]`

| BEGIN SPEC The add_type operation enables the creation of new service types in the service type repository. The caller supplies the "name" for the new type, the identifier for the interface associated with instances of this service type, the properties definitions for this service type, and the service type names of the immediate super-types to this service type.

void TAO_Service_Type_Repository::collect_inheritance_hierarchy | ( | const CosTradingRepos::ServiceTypeRepository::TypeStruct & | type_struct,
|  | TAO_String_Queue & | target
| ) | `[private]`

CosTradingRepos::ServiceTypeRepository::TypeStruct * TAO_Service_Type_Repository::describe_type | ( | const char *name | ACE_ENV_ARG_DECL | ) | throw (CORBA::SystemException, CosTrading::IllegalServiceType, CosTrading::UnknownServiceType)`[virtual]`

| BEGIN SPEC The describe_type operation permits a client to obtain the details for a particular service type. If "name" is malformed, then the CosTrading::IllegalServiceType exception is raised. If "name" does not exist within the repository, then the CosTrading::UnknownServiceType exception is raised. END SPEC

CosTradingRepos::ServiceTypeRepository::TypeStruct * TAO_Service_Type_Repository::fully_describe_type | ( | const char *name | ACE_ENV_ARG_DECL | ) | throw (CORBA::SystemException, CosTrading::IllegalServiceType, CosTrading::UnknownServiceType)`[virtual]`

| BEGIN SPEC The fully_describe_type operation permits a client to obtain the details for a particular service type. The property sequence returned in the TypeStruct includes all properties inherited from the transitive closure of its super types; the sequence of super types in the TypeStruct contains the names of the types in the transitive closure of the super type relation. If "name" is malformed, then the CosTrading::IllegalServiceType exception is raised. If "name" does not exist within the repository, then the CosTrading::UnknownServiceType exception is raised. END SPEC

void TAO_Service_Type_Repository::fully_describe_type_i | ( | const CosTradingRepos::ServiceTypeRepository::TypeStruct & | type_struct,
|  | CosTradingRepos::ServiceTypeRepository::PropStructSeq & | props,
|  | CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq & | super_types
| ) | `[private]`

| Build a sequence aggregating the property names from all supertypes of the type, and a sequence representing the transitive closure of the super type relation.

CosTradingRepos::ServiceTypeRepository::IncarnationNumber TAO_Service_Type_Repository::incarnation | ( | ACE_ENV_SINGLE_ARG_DECL_NOT_USED |  | ) | throw (CORBA::SystemException)`[virtual]`

CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq * TAO_Service_Type_Repository::list_types | ( | const CosTradingRepos::ServiceTypeRepository::SpecifiedServiceTypes &which_types | ACE_ENV_ARG_DECL | ) | throw (CORBA::SystemException)`[virtual]`

void TAO_Service_Type_Repository::mask_type | ( | const char *name | ACE_ENV_ARG_DECL | ) | throw (CORBA::SystemException, CosTrading::IllegalServiceType, CosTrading::UnknownServiceType, CosTradingRepos::ServiceTypeRepository::AlreadyMasked)`[virtual]`

| BEGIN SPEC The mask_type operation permits the deprecation of a particular type (i.e., after being masked, exporters will no longer be able to advertise offers of that particular type). The type continues to exist in the service repository due to other service types being derived from it. If "name" is malformed, then the CosTrading::IllegalServiceType exception is raised. If "name" does not exist within the repository, then the CosTrading::UnknownServiceType exception is raised. If the type is currently in the masked state, then the AlreadyMasked exception is raised. END SPEC

TAO_Service_Type_Repository& TAO_Service_Type_Repository::operator= | ( | const TAO_Service_Type_Repository & |  | ) | `[private]`

void TAO_Service_Type_Repository::remove_type | ( | const char *name | ACE_ENV_ARG_DECL | ) | throw (CORBA::SystemException, CosTrading::IllegalServiceType, CosTrading::UnknownServiceType, CosTradingRepos::ServiceTypeRepository::HasSubTypes)`[virtual]`

| BEGIN SPEC The remove_type operation removes the named type from the service type repository. If "name" is malformed, then the CosTrading::IllegalServiceType exception is raised. If "name" does not exist within the repository, then the CosTrading::UnknownServiceType exception is raised. If "name" has a service type which has been derived from it, then the HasSubTypes exception is raised. END SPEC

void TAO_Service_Type_Repository::unmask_type | ( | const char *name | ACE_ENV_ARG_DECL | ) | throw (CORBA::SystemException, CosTrading::IllegalServiceType, CosTrading::UnknownServiceType, CosTradingRepos::ServiceTypeRepository::NotMasked)`[virtual]`

| BEGIN SPEC The unmask_type undeprecates a type (i.e., after being unmasked, exporters will be able to resume advertisement of offers of that particular type). If "name" is malformed, then the CosTrading::IllegalServiceType exception is raised. If "name" does not exist within the repository, then the CosTrading::UnknownServiceType exception is raised. If the type is not currently in the masked state, then the NotMasked exception is raised. END SPEC

void TAO_Service_Type_Repository::update_type_map | ( | const char * | name,
|  | const char * | if_name,
|  | const CosTradingRepos::ServiceTypeRepository::PropStructSeq & | props,
|  | const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq & | super_types,
|  | Prop_Map & | prop_map,
|  | Service_Type_Map & | super_map
| ) | `[private]`

| Update the type map with the information contained in the TypeStruct, prop_map, and super_map.

void TAO_Service_Type_Repository::validate_inheritance | ( | Prop_Map & | prop_map,
|  | const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq &super_types | ACE_ENV_ARG_DECL
| ) | throw (CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition)`[private]`

| Ensure that properties of a super_type aren't having their types or retstrictions redefined.

void TAO_Service_Type_Repository::validate_properties | ( | Prop_Map & | prop_map,
|  | const CosTradingRepos::ServiceTypeRepository::PropStructSeq &props | ACE_ENV_ARG_DECL
| ) | throw (CosTrading::IllegalPropertyName, CosTrading::DuplicatePropertyName)`[private]`

| Confirm that the properties in props have valid names, and aren't duplicated. Cram those properties into the prop_map.

void TAO_Service_Type_Repository::validate_supertypes | ( | Service_Type_Map & | super_map,
|  | const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq &super_types | ACE_ENV_ARG_DECL
| ) | throw (CosTrading::IllegalServiceType, CosTrading::UnknownServiceType, CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName)`[private]`

| Confirm that the each super type exists, and cram them into super_map.

## Member Data Documentation

CosTradingRepos::ServiceTypeRepository::IncarnationNumber TAO_Service_Type_Repository::incarnation_`[private]`

| Incarnation number to be used for the next modification to the repository.

ACE_Lock* TAO_Service_Type_Repository::lock_`[private]`

| Lock with which to serialize access to the service type map.

Service_Type_Map TAO_Service_Type_Repository::type_map_`[private]`

| Stores information for each service type in the repository. This is a mapping from service type name to a Type_Info struct which serves as a storage for various information for the given type.

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

- Service_Type_Repository.h
- Service_Type_Repository.cpp