TAO_CosTrader  2.0.8
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
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:
Collaboration graph
[legend]

List of all members.

Classes

class  Type_Info
 Storage structure for information pertinent to the type. More...

Public Member Functions

 TAO_Service_Type_Repository (ACE_Lock *lock=0)
 ~TAO_Service_Type_Repository (void)
virtual
CosTradingRepos::ServiceTypeRepository::IncarnationNumber 
incarnation (void)
virtual
CosTradingRepos::ServiceTypeRepository::IncarnationNumber 
add_type (const char *name, const char *if_name, const CosTradingRepos::ServiceTypeRepository::PropStructSeq &props, const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq &super_types)
virtual void remove_type (const char *name)
virtual
CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq
list_types (const CosTradingRepos::ServiceTypeRepository::SpecifiedServiceTypes &which_types)
virtual
CosTradingRepos::ServiceTypeRepository::TypeStruct
describe_type (const char *name)
virtual
CosTradingRepos::ServiceTypeRepository::TypeStruct
fully_describe_type (const char *name)
virtual void mask_type (const char *name)
virtual void unmask_type (const char *name)

Private Types

typedef
ACE_Hash_Map_Manager_Ex
< CORBA::String_var,
CosTradingRepos::ServiceTypeRepository::PropStruct
*, ACE_Hash< CORBA::String_var >
, ACE_Equal_To
< CORBA::String_var >
, ACE_Null_Mutex
Prop_Map
typedef
ACE_Hash_Map_Manager_Ex
< CORBA::String_var, Type_Info
*, ACE_Hash< CORBA::String_var >
, ACE_Equal_To
< CORBA::String_var >
, ACE_Null_Mutex
Service_Type_Map
typedef
ACE_Hash_Map_Iterator_Ex
< CORBA::String_var, Type_Info
*, ACE_Hash< CORBA::String_var >
, ACE_Equal_To
< CORBA::String_var >
, ACE_Null_Mutex
Service_Type_Map_Iterator

Private Member Functions

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)
void validate_supertypes (Service_Type_Map &super_map, const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq &super_types)
 Confirm that the each super type exists, and cram them into super_map.
void validate_inheritance (Prop_Map &prop_map, const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq &super_types)
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)
 TAO_Service_Type_Repository (const TAO_Service_Type_Repository &)
TAO_Service_Type_Repositoryoperator= (const TAO_Service_Type_Repository &)

Private Attributes

ACE_Locklock_
 Lock with which to serialize access to the service type map.
Service_Type_Map type_map_
CosTradingRepos::ServiceTypeRepository::IncarnationNumber incarnation_

Detailed Description

This class implements CosTradingRepos::ServiceTypeRepository IDL interface.


Member Typedef Documentation


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 
) [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) [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) [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 ( void  ) [virtual]
CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq * TAO_Service_Type_Repository::list_types ( const CosTradingRepos::ServiceTypeRepository::SpecifiedServiceTypes which_types) [virtual]
void TAO_Service_Type_Repository::mask_type ( const char *  name) [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) [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) [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 
) [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 
) [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 
) [private]

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


Member Data Documentation

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

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

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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines