blob: 6428fec80723d78cfa2b10613cbd19536864a6cc (
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
|
// $Id$
#include "Property_Boolean.h"
#if ! defined (__ACE_INLINE__)
#include "Property_Boolean.inl"
#endif /* __ACE_INLINE__ */
ACE_RCSID(Notify, TAO_Notify_Property_Boolean, "$Id$")
#include "PropertySeq.h"
TAO_Notify_Property_Boolean::TAO_Notify_Property_Boolean (const char* name)
:name_ (name), valid_(0)
{
}
TAO_Notify_Property_Boolean::TAO_Notify_Property_Boolean (const char* name, CORBA::Boolean initial)
:name_ (name), value_ (initial), valid_ (1)
{
}
int
TAO_Notify_Property_Boolean::set (const TAO_Notify_PropertySeq& property_seq)
{
CosNotification::PropertyValue value;
if (property_seq.find (this->name_, value) == -1)
return -1;
value >>= CORBA::Any::to_boolean (this->value_);
return 0;
}
void
TAO_Notify_Property_Boolean::get (CosNotification::PropertySeq& prop_seq)
{
/// Make space
prop_seq.length (prop_seq.length () + 1);
prop_seq[prop_seq.length () - 1].value <<= CORBA::Any::from_boolean (this->value_);
}
|