summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Trading_Service/Service_Type_Exporter.h
blob: 6a9fd615794ce0a9c13a3db8facc4ba1d749867b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// $Id$

// ========================================================================
//
// = FILE  
//     Offer_Exporter.h
//
// = DESCRIPTION
//    Class that tests the Trading Service's Service Type Repository
//
// = AUTHOR
//     Seth Widoff <sbw1@cs.wustl.edu>
//
// ======================================================================= 

#ifndef TAO_SERVICE_TYPE_EXPORTER_H
#define TAO_SERVICE_TYPE_EXPORTER_H

#include "TT_Info.h"

class TAO_Service_Type_Exporter
{
public:

  typedef CosTradingRepos::ServiceTypeRepository SERVICE_TYPE_REPOS;
  
  TAO_Service_Type_Exporter (CosTradingRepos::ServiceTypeRepository_ptr str);

  void remove_all_types (CORBA::Environment& _env)
    TAO_THROW_SPEC ((CORBA::SystemException,
		     CosTrading::IllegalServiceType, 
		     CosTrading::UnknownServiceType, 
		     SERVICE_TYPE_REPOS::HasSubTypes));
  
  void add_all_types (CORBA::Environment& _env)
    TAO_THROW_SPEC ((CORBA::SystemException,
		     CosTrading::IllegalServiceType, 
		     SERVICE_TYPE_REPOS::ServiceTypeExists, 
		     SERVICE_TYPE_REPOS::InterfaceTypeMismatch, 
		     CosTrading::IllegalPropertyName, 
		     CosTrading::DuplicatePropertyName, 
		     SERVICE_TYPE_REPOS::ValueTypeRedefinition, 
		     CosTrading::UnknownServiceType, 
		     SERVICE_TYPE_REPOS::DuplicateServiceTypeName));

  void list_all_types (CORBA::Environment& _env)
    TAO_THROW_SPEC ((CORBA::SystemException));

  void describe_all_types (CORBA::Environment& _env)
  TAO_THROW_SPEC ((CORBA::SystemException,
		   CosTrading::IllegalServiceType, 
		   CosTrading::UnknownServiceType));

  void fully_describe_all_types (CORBA::Environment& _env)
    TAO_THROW_SPEC ((CORBA::SystemException, 
		     CosTrading::IllegalServiceType, 
		     CosTrading::UnknownServiceType));
  
private:

  void create_types (void);

  void dump_typestruct (const char* typename,
			const SERVICE_TYPE_REPOS::TypeStruct& type_struct) const;
  
  CosTradingRepos::ServiceTypeRepository_var repos_;
  SERVICE_TYPE_REPOS::TypeStruct type_structs_[NUM_TYPES];
};

#endif /* TAO_SERVICE_TYPE_EXPORTER_H */