blob: b6a0e90ea2dd73d0cad95bb26634330a3b50a3f2 (
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
61
62
63
64
65
66
|
// @(#) $Id$
#include "Policy_Validator.h"
#include "tao/Environment.h"
#include "tao/ORB_Core.h"
ACE_RCSID(tao, POA, "$Id$")
TAO_POA_Policy_Validator *TAO_POA_Policy_Validator::last_ = 0;
TAO_POA_Policy_Validator::TAO_POA_Policy_Validator (TAO_ORB_Core &orb_core)
: orb_core_ (orb_core),
next_ (0)
{
// No-Op.
}
TAO_POA_Policy_Validator::~TAO_POA_Policy_Validator (void)
{
delete this->next_;
}
void
TAO_POA_Policy_Validator::add_validator (TAO_POA_Policy_Validator *validator)
{
if (this->last_ == 0)
this->last_ = this->next_ = validator;
else
this->last_ = this->last_->next_ = validator;
}
void
TAO_POA_Policy_Validator::validate (TAO_Policy_Set &policies,
CORBA::Environment &ACE_TRY_ENV)
{
this->validate_impl (policies, ACE_TRY_ENV);
ACE_CHECK;
if (this->next_ != 0)
{
this->next_->validate (policies, ACE_TRY_ENV);
ACE_CHECK;
}
}
void
TAO_POA_Policy_Validator::merge_policies (TAO_Policy_Set &policies,
CORBA::Environment &ACE_TRY_ENV)
{
this->merge_policies_impl (policies, ACE_TRY_ENV);
ACE_CHECK;
if (this->next_ != 0)
{
this->next_->merge_policies (policies, ACE_TRY_ENV);
ACE_CHECK;
}
}
CORBA::Boolean
TAO_POA_Policy_Validator::legal_policy (CORBA::PolicyType type)
{
return (this->legal_policy_impl (type) ||
((this->next_ != 0) && this->next_->legal_policy_impl (type)));
}
|