blob: b14d86d57745c186d504867d2a957803840009de (
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
|
// $Id$
#include "Command.h"
#include "ace/Log_Msg.h"
#include "tao/corba.h"
ACE_RCSID(lib, TAO_Command, "$id$")
TAO_NS_Command::TAO_NS_Command (void)
:next_ (0), command_ (INVALID)
{
}
TAO_NS_Command::~TAO_NS_Command ()
{
}
void
TAO_NS_Command::init (ACE_Arg_Shifter& /*arg_shifter*/)
{
// default: do nothing.
}
void
TAO_NS_Command::next (TAO_NS_Command* command)
{
this->next_ = command;
}
void
TAO_NS_Command::execute (ACE_ENV_SINGLE_ARG_DECL)
{
if (this->command_ == INVALID)
{
ACE_DEBUG ((LM_DEBUG, "Invalid command: %s\n", this->get_name ()));
}
else
{
ACE_DEBUG ((LM_DEBUG, "Executing command: %s\n", this->get_name ()));
ACE_TRY
{
this->execute_i (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
{
ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
ACE_LIB_TEXT("Exception running command\n"));
}
ACE_ENDTRY;
}
if (this->next_)
this->next_->execute (ACE_ENV_SINGLE_ARG_PARAMETER);
}
|