summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/CosLifeCycle.idl
blob: 6a1610c36f7951d3f1fb81e93006289b4da33a9b (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/* -*- C++ -*- */

//=============================================================================
/**
 *  @file    CosLifeCycle.idl
 *
 *  Described in CORBAservices: Common Object Services Specification,
 *  chapter 6.
 *  The life cycle service description can be downloaded from:
 *    ftp://www.omg.org/pub/docs/formal/97-12-13.pdf
 *  The original IDL file can be downloaded from:
 *    ftp://www.omg.org/pub/docs/formal/97-11-02.idl
 *
 *
 *  @author OMG
 *  @author Torben Worm <tworm@cs.wustl.edu>
 *  @author and Michael Kircher <mk1@cec.wustl.edu>
 */
//=============================================================================


#ifndef TAO_LIFECYCLE_IDL
#define TAO_LIFECYCLE_IDL

// OMG IDL for CosLifeCycle Module, page 6-10 in
// Includes the following interfaces:
//   FactoryFinder, LifeCycleObject, GenericFactory

#include "CosNaming.idl"

#pragma prefix "omg.org"

module CosLifeCycle
{
  // = TITLE
  //     CosLifeCycle
  //
  // = DESCRIPTION
  //     This idl file describes the life cycle service.
  //     The purpose of the life cycle service is to

  typedef CosNaming::Name Key;
  typedef Object _Factory;
  typedef sequence <_Factory> Factories;

  struct NameValuePair
  {
    CosNaming::Istring name;
    any value;
  };

  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
    {
      // = TITLE
      //   @@ Please fill in.
      // = DESCRIPTION
      //   @@ Please fill in.

      Factories find_factories (in Key factory_key)
        raises (NoFactory);
    };

  interface LifeCycleObject
    {
      // = TITLE
      //   @@ Please fill in.
      // = DESCRIPTION
      //   @@ Please fill in.

      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
    {
      // = TITLE
      //   @@ Please fill in.
      // = DESCRIPTION
      //   @@ Please fill in.

      boolean _supports (in Key k);
      Object create_object (in Key k,
                            in Criteria the_criteria)
        raises (NoFactory, InvalidCriteria, CannotMeetCriteria);
    };
};

// Criteria, page 6-17:
/*
typedef struct NVP
{
  CosNaming::Istring name;
  any value;
} NameValuePair;

typedef sequence <NameValuePair> Criteria;
*/

#endif /* TAO_LIFECYCLE_IDL */