File: CosLifeCycle.idl

package info (click to toggle)
omniorb-dfsg 4.2.2-1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 14,628 kB
  • sloc: cpp: 109,677; python: 24,939; ansic: 14,136; sh: 2,743; makefile: 96
file content (76 lines) | stat: -rw-r--r-- 2,078 bytes parent folder | download | duplicates (11)
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
71
72
73
74
75
76
//File: CosLifeCycle.idl
//Part of the LifeCycle Service
// Note: if your IDL compiler does not yet support the 
//   CORBA 2.3 Feature "Escaped Identifiers" (which provides 
//   for the addition of new keywords to IDL, compile this 
//   module with the preprocessor definition 
//   "NO_ESCAPED_IDENTIFIERS". With many compilers this 
//   would be done a qualifier on the command line, 
//   something like -DNO_ESCAPED_IDENTIFIERS

#ifndef _COS_LIFE_CYCLE_IDL_
#define _COS_LIFE_CYCLE_IDL_

// omniORB specific pragmas to insert extra includes into the stub header.
#pragma hh #include "COS_sysdep.h"

#include <CosNaming.idl>

#pragma prefix "omg.org"

module CosLifeCycle{

	typedef CosNaming::Name Key; 
#ifdef __OMNIIDL__
	typedef Object _Factory;
#else
	typedef Object Factory;
#endif
	typedef sequence <Factory> Factories;
	typedef struct NVP {	 
		CosNaming::Istring	name; 
		any 				value; 
	} NameValuePair;
	typedef sequence <NameValuePair> Criteria;

	exception NoFactory {
		Key search_key;
	};
	exception NotCopyable { string reason; };
	exception NotMovable { string reason; };
	exception NotRemovable { string reason; };
	exception InvalidCriteria{ Criteria invalid_criteria; };
	exception CannotMeetCriteria { Criteria unmet_criteria;	};

	interface FactoryFinder {
		Factories find_factories(in Key factory_key)
			raises(NoFactory);
	};

	interface LifeCycleObject {
		LifeCycleObject copy(in FactoryFinder there, 
							 in Criteria the_criteria)
			raises(NoFactory, NotCopyable, InvalidCriteria,
				 CannotMeetCriteria);
		void move(in FactoryFinder there, 
				  in Criteria the_criteria)
			raises(NoFactory, NotMovable, InvalidCriteria,
				 CannotMeetCriteria);
		void remove()
			raises(NotRemovable);
	};

	interface GenericFactory {		
#ifdef NO_ESCAPED_IDENTIFIERS
		boolean supports(in Key k);
#else
		boolean _supports(in Key k);
#endif
		Object create_object(			
				in Key 			k, 
				in Criteria		the_criteria) 				
			raises (NoFactory, InvalidCriteria, 										
				CannotMeetCriteria);
	};
};
#endif /* ifndef _COS_LIFE_CYCLE_IDL_ */