blob: 1f94919e1a2af25f6a4d115006e15aae2e3b0906 (
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
|
// $Id$
// ============================================================================
//
// = LIBRARY
//
// = FILENAME
// any_test_i.cpp
//
// = AUTHOR
// Michael Kircher
//
// ============================================================================
#include "tao/corba.h"
#include "ace/Containers.h"
#include "any_test_i.h"
#include "NavWeapC.h"
#include "AnyAnalyser.h"
// Constructor
Any_Test_i::Any_Test_i (const char *obj_name)
{
}
// Destructor
Any_Test_i::~Any_Test_i (void)
{
}
void
Any_Test_i::try_an_any (const CORBA::Any &a, CORBA::Environment &env)
{
TAO_TRY
{
ACE_DEBUG ((LM_DEBUG, "Call to try_an_any succeeded!\n"));
AnyAnalyser anyAnalyser_ = AnyAnalyser ("stdout");
TAO_CHECK_ENV;
Weapons *weapons_ = 0;
if (a.type()->equal(_tc_Weapons,TAO_TRY_ENV)) {
weapons_ = (Weapons *)a.value();
cout << "ID: " << a.type()->id(TAO_TRY_ENV) << endl;
cout << "CompTime: " << weapons_->computation_time << endl;
cout << "Adr CompTime: " << &(weapons_->computation_time) << endl;
}
anyAnalyser_.printAny (a);
}
TAO_CATCHANY
{
ACE_ERROR ((LM_ERROR, "(%t)Error in extracting the data.\n"));
}
TAO_ENDTRY;
}
|