00001 #include "OSDLModel.h"
00002
00003 #include "OSDLEvents.h"
00004 #include "OSDLScheduler.h"
00005
00006 #include "Ceylan.h"
00007
00008
00009 using std::string ;
00010 using std::list ;
00011
00012 using namespace Ceylan::Log ;
00013
00014
00015 using namespace OSDL::Events ;
00016 using namespace OSDL::Engine ;
00017
00018 using namespace OSDL::MVC ;
00019
00020
00021
00022 Model::Model( bool autoRegister, Period period,
00023 ObjectSchedulingPolicy policy, Weight weight )
00024 throw( SchedulingException ) :
00025 ActiveObject( period, policy, weight )
00026 {
00027
00028 if ( autoRegister )
00029 Scheduler::GetExistingScheduler().registerObject( * this ) ;
00030
00031 }
00032
00033
00034 Model::Model( bool autoRegister, const list<SimulationTick> & triggeringTicks,
00035 bool absolutlyDefined, ObjectSchedulingPolicy policy, Weight weight )
00036 throw(SchedulingException ) :
00037 ActiveObject( triggeringTicks, absolutlyDefined, policy, weight )
00038 {
00039
00040 if ( autoRegister )
00041 Scheduler::GetExistingScheduler().registerObject( * this ) ;
00042
00043 }
00044
00045
00046 Model::Model( bool autoRegister, SimulationTick triggerTick,
00047 bool absolutlyDefined, ObjectSchedulingPolicy policy,
00048 Weight weight )
00049 throw( SchedulingException ) :
00050 ActiveObject( triggerTick, absolutlyDefined, policy, weight )
00051 {
00052
00053 if ( autoRegister )
00054 Scheduler::GetExistingScheduler().registerObject( * this ) ;
00055
00056 }
00057
00058
00059 Model::~Model() throw()
00060 {
00061
00062 }
00063
00064
00065 const string Model::toString( Ceylan::VerbosityLevels level ) const throw()
00066 {
00067 return "OSDL MVC Model, which is a specialized scheduled Ceylan Model : "
00068 + Ceylan::Model::toString( level ) ;
00069 }
00070