5 #if !defined(__ACE_INLINE__)
7 #endif /* __ACE_INLINE__ */
9 Database_i::~Database_i ()
11 delete[] this->elements_
;
15 Database_i::set (Test::Index i
,
16 const Test::OctetSeq
& seq
,
17 CORBA::Double verification_token
,
18 CORBA::Double_out returned_token
)
20 if (i
>= this->max_range_
)
21 throw Test::OutOfRange (0, this->max_range_
);
23 returned_token
= verification_token
;
25 #if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
26 CORBA::ULong len
= seq
.length ();
27 // CORBA::ULong max = seq.maximum ();
28 ACE_Message_Block
*mb
= seq
.mb ();
31 this->elements_
[i
] = seq
;
35 this->elements_
[i
].replace (len
, seq
.mb ());
38 this->elements_
[i
] = seq
;
39 #endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
43 Database_i::get (Test::Index i
)
45 if (i
>= this->max_range_
)
46 throw Test::OutOfRange (0, this->max_range_
);
48 Test::OctetSeq
* copy
= 0;
49 ACE_NEW_THROW_EX (copy
,
50 Test::OctetSeq (this->elements_
[i
]),
56 Database_i::get_crc (Test::Index i
)
58 if (i
>= this->max_range_
)
59 throw Test::OutOfRange (0, this->max_range_
);
61 return ACE::crc32 (this->elements_
[i
].get_buffer (),
62 this->elements_
[i
].length ());
66 Database_i::shutdown ()
68 this->orb_
->shutdown ();