00001 #ifndef SCHEDULING_COMMON_CLASS
00002 #define SCHEDULING_COMMON_CLASS
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "scheduling_dll.h"
00019
00020 #include <basis/object_base.h>
00021
00022
00023 class schedulable;
00024
00026
00027 class SCHEDULING_CLASS_STYLE scheduling_common : public virtual object_base
00028 {
00029 public:
00031 enum outcomes {
00032 OKAY = common::OKAY,
00034 UNINITIALIZED = common::UNINITIALIZED,
00036 TIME_OUT = common::TIMED_OUT,
00038 FAILURE = common::FAILURE,
00040 NOT_FOUND = common::NOT_FOUND,
00042 BAD_INPUT = common::BAD_INPUT,
00044 NO_SPACE = common::NO_SPACE,
00046
00047 DEFINE_OUTCOME(POSTPONE, -61, "Operation is postponed; try again later"),
00049 DEFINE_OUTCOME(CANCEL, -62, "This item has been cancelled"),
00051 DEFINE_OUTCOME(FINISHED, -63, "This item's scheduling is complete"),
00053 DEFINE_OUTCOME(MORE_LEFT, -64, "There are still more items left to "
00054 "schedule that didn't fit in current timeslice"),
00056 DEFINE_OUTCOME(NO_ACTOR, -65, "The actor responsible for this item was "
00057 "missing.")
00059 };
00060
00061 IMPLEMENT_CLASS_NAME("scheduling_common");
00062
00063 static const char *outcome_name(const outcome &to_name);
00065 };
00066
00067 #endif
00068