Synopsis - Cross-Reference

File: /tests/Parsers/IDL/input/CosNaming.idl
  1
  2#ifndef _CosNaming_IDL_
  3#define _CosNaming_IDL_
  4
  5#pragma prefix "omg.org"
  6
  7//. a CosNaming module
  8module CosNaming
  9{
 10  //. an Istring typedef
 11  typedef string Istring;
 12  //. a NameComponent struct.
 13  //. with a multi-line comment.
 14  struct NameComponent
 15  {
 16    //. an id member
 17    Istring id;
 18    //. a kind member
 19    Istring kind;
 20  };
 21
 22  //. a Name type.
 23  //. This is a sequence of NameComponents
 24  //. so it forms a scoped name of sorts
 25  typedef sequence<NameComponent> Name;
 26  //. a BindingType enum
 27  enum BindingType
 28  {
 29    nobject,
 30    ncontext
 31  };
 32
 33  //. a Binding struct
 34  struct Binding
 35  {
 36    //. a binding_name member
 37    Name binding_name;
 38    //. a binding_type member
 39    BindingType binding_type;
 40  };
 41
 42  //. a BindingList type
 43  typedef sequence<Binding> BindingList;
 44
 45  interface BindingIterator;
 46
 47  //. a NamingContext interface
 48  interface NamingContext
 49    {
 50      //. a NotFoundReason enum
 51      enum NotFoundReason
 52      {
 53	missing_node,
 54	not_context,
 55	not_object
 56      };
 57
 58      //. an exception
 59      exception NotFound
 60	{
 61	  NotFoundReason why;
 62	  Name rest_of_name;
 63	};
 64      
 65      exception CannotProceed
 66	{
 67	  NamingContext ctx;
 68	  Name rest_of_name;
 69	};
 70      
 71      exception InvalidName{};
 72      exception AlreadyBound{};
 73      exception NotEmpty{};
 74      
 75      //. and the bind method...
 76      void bind(in Name n, in Object obj)
 77	raises(NotFound, CannotProceed, InvalidName, AlreadyBound);
 78      void rebind(in Name n, in Object obj)
 79	raises(NotFound, CannotProceed, InvalidName);
 80      void bind_context(in Name n, in NamingContext nc)
 81	raises(NotFound, CannotProceed, InvalidName, AlreadyBound);
 82      void rebind_context(in Name n, in NamingContext nc)
 83	raises(NotFound, CannotProceed, InvalidName);
 84      Object resolve(in Name n)
 85	raises(NotFound, CannotProceed, InvalidName);
 86      void unbind(in Name n)
 87	raises(NotFound, CannotProceed, InvalidName);
 88      NamingContext new_context();
 89      NamingContext bind_new_context(in Name n)
 90	raises(NotFound, AlreadyBound, CannotProceed, InvalidName);
 91      void destroy()
 92	raises(NotEmpty);
 93      void list(in unsigned long how_many, out BindingList bl, out BindingIterator bi);
 94    };
 95  
 96  interface BindingIterator
 97    {
 98      boolean next_one(out Binding b);
 99      boolean next_n(in unsigned long how_many, out BindingList bl);
100      void destroy();
101    };
102};
103
104#endif /* !_CosNaming_IDL_ */