31 #define DEBUG_PPJPVP_ASSIGN 0
38 _m_jpvpQueue_p =
new priority_queue<JointPolicyValuePair*>();
44 while(_m_jpvpQueue_p->size() > 0)
46 delete _m_jpvpQueue_p->top();
47 _m_jpvpQueue_p->pop();
49 delete _m_jpvpQueue_p;
56 cout <<
"PolicyPoolJPolValPair& PolicyPoolJPolValPair::operator= \
59 if (
this == &o)
return *
this;
63 while(_m_jpvpQueue_p->size() > 0)
65 delete _m_jpvpQueue_p->top();
66 _m_jpvpQueue_p->pop();
68 *_m_jpvpQueue_p = *(o._m_jpvpQueue_p);
76 cout <<
"PolicyPoolInterface& PolicyPoolJPolValPair::operator= \
78 if (
this == &o)
return *
this;
82 return(
operator=(casted_o));
94 _m_jpvpQueue_p->push(jpv_empty);
100 if(_m_jpvpQueue_p->size() > 0)
103 _m_jpvpQueue_p->top();
107 throw E(
"Pool empty!");
112 _m_jpvpQueue_p->pop();
121 throw(
E(
"PolicyPoolJPolValPair::Insert could not cast input to JointPolicyValuePair"));
123 _m_jpvpQueue_p->push(jp);
132 throw(
E(
"PolicyPoolJPolValPair::Union could not cast input to PolicyPoolJPolValPair"));
143 priority_queue<JointPolicyValuePair*> * new_jpvpQueue_p =
144 new priority_queue<JointPolicyValuePair*>;
146 while(_m_jpvpQueue_p->size() > 0)
151 new_jpvpQueue_p->push(jpvp);
155 _m_jpvpQueue_p->pop();
158 delete _m_jpvpQueue_p;
159 _m_jpvpQueue_p = new_jpvpQueue_p;