OSDN Git Service

696db60b201a53462a58f820f90c67bfab93cb77
[moflib/moflib.git] / moflib-1.0 / moflib / moflib / mof / OnceEventCondition.cpp
1 #include "mof/OnceEventCondition.hpp"
2 #include "mof/utilities.hpp"
3
4 namespace mof
5 {
6     OnceEventCondition::OnceEventCondition( EventCondition* pBody )
7     : m_disposable( false ) , m_pBody( pBody )
8     {
9     }
10
11     OnceEventCondition::~OnceEventCondition( )
12     {
13         mof::safe_delete( m_pBody );
14     }
15
16     bool OnceEventCondition::test( )
17     {
18         bool result = m_pBody->test();
19         if( !m_disposable && result )m_disposable = true;
20         return result;
21     }
22
23     void OnceEventCondition::update( )
24     {
25         m_pBody->update();
26     }
27
28     bool OnceEventCondition::isDisposable( )
29     {
30         return m_disposable;
31     }
32
33
34
35 }
36