1 #include "tao/DynamicInterface/Context.h"
2 #include "tao/AnyTypeCode/TypeCode.h"
3 #include "tao/CORBA_String.h"
4 #include "tao/SystemException.h"
5 #include "ace/Guard_T.h"
7 #if !defined (__ACE_INLINE__)
8 # include "tao/DynamicInterface/Context.inl"
9 #endif /* ! __ACE_INLINE__ */
11 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
14 CORBA::Context::_incr_refcount ()
20 CORBA::Context::_decr_refcount ()
22 CORBA::ULong
const new_count
= --this->refcount_
;
31 CORBA::Context::context_name () const
33 throw ::CORBA::NO_IMPLEMENT (TAO::VMCID
, CORBA::COMPLETED_NO
);
37 CORBA::Context::parent () const
39 throw ::CORBA::NO_IMPLEMENT (TAO::VMCID
, CORBA::COMPLETED_NO
);
43 CORBA::Context::create_child (const char * /* child_ctx_name */,
44 CORBA::Context_out
/* child_ctx */)
46 throw ::CORBA::NO_IMPLEMENT (TAO::VMCID
, CORBA::COMPLETED_NO
);
50 CORBA::Context::set_one_value (const char * /* propname */,
51 const CORBA::Any
& /* propvalue */)
53 throw ::CORBA::NO_IMPLEMENT (TAO::VMCID
, CORBA::COMPLETED_NO
);
57 CORBA::Context::set_values (CORBA::NVList_ptr
)
59 throw ::CORBA::NO_IMPLEMENT (TAO::VMCID
, CORBA::COMPLETED_NO
);
63 CORBA::Context::delete_values (const char * /* propname */)
65 throw ::CORBA::NO_IMPLEMENT (TAO::VMCID
, CORBA::COMPLETED_NO
);
69 CORBA::Context::get_values (const char * /* start_scope */,
70 CORBA::Flags
/* op_flags */,
71 const char * /* pattern */,
72 CORBA::NVList_ptr
& /* values */)
74 throw ::CORBA::NO_IMPLEMENT (TAO::VMCID
, CORBA::COMPLETED_NO
);
77 CORBA::ContextList::ContextList (CORBA::ULong len
, char* *ctx_list
)
80 for (CORBA::ULong i
=0; i
< len
; i
++)
82 this->add (ctx_list
[i
]);
86 CORBA::ContextList::~ContextList ()
88 for (CORBA::ULong i
= 0; i
< this->count (); ++i
)
92 if (this->ctx_list_
.get (ctx
, i
) == -1)
97 CORBA::string_free (*ctx
);
102 CORBA::ContextList::add (char *ctx
)
104 this->ctx_list_
.enqueue_tail (CORBA::string_dup (ctx
));
108 CORBA::ContextList::add_consume (char *ctx
)
110 this->ctx_list_
.enqueue_tail (ctx
);
114 CORBA::ContextList::item (CORBA::ULong slot
)
118 if (this->ctx_list_
.get (ctx
, slot
) == -1)
120 throw ::CORBA::TypeCode::Bounds ();
124 return CORBA::string_dup (*ctx
);
129 CORBA::ContextList::remove (CORBA::ULong
)
131 throw ::CORBA::NO_IMPLEMENT ();
134 CORBA::ContextList_ptr
135 CORBA::ContextList::_duplicate ()
142 CORBA::ContextList::_destroy ()
144 CORBA::ULong
const current
= --this->refcount_
;
153 CORBA::ContextList::_incr_refcount ()
159 CORBA::ContextList::_decr_refcount ()
163 if (this->refcount_
!= 0)
169 TAO_END_VERSIONED_NAMESPACE_DECL