Mercurial > hg > Members > kono > Cerium
changeset 456:9db30a515742
InitKey UpdateKey added
author | kazz@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Sat, 26 Sep 2009 02:53:44 +0900 |
parents | 8c2e255f7a6c |
children | 611c6f0d94a9 |
files | TaskManager/Test/test_render/spe/InitKey.cc TaskManager/Test/test_render/spe/InitKey.h TaskManager/Test/test_render/spe/UpdateKey.cc TaskManager/Test/test_render/spe/UpdateKey.h |
diffstat | 4 files changed, 61 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TaskManager/Test/test_render/spe/InitKey.cc Sat Sep 26 02:53:44 2009 +0900 @@ -0,0 +1,17 @@ +#include <stdlib.h> +#include <string.h> +#include "InitKey.h" +#include "Func.h" +#include "global_alloc.h" +#include "KeyStat.h" + +SchedDefineTask(InitKey); + +int +InitKey::run(SchedTask *smanager, void *rbuf , void *wbuf) +{ + + void *key = smanager->global_alloc(KEY_STATUS, sizeof(key_stat)); + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TaskManager/Test/test_render/spe/InitKey.h Sat Sep 26 02:53:44 2009 +0900 @@ -0,0 +1,13 @@ +#ifndef INCLUDED_TASK_INIT_KEY +#define INCLUDED_TASK_INIT_KEY + +#include "SchedTask.h" + +class InitKey : public SchedTask { +public: + SchedConstructor(InitKey); + + int run(SchedTask *smanager, void *rbuf, void *wbuf); +}; + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TaskManager/Test/test_render/spe/UpdateKey.cc Sat Sep 26 02:53:44 2009 +0900 @@ -0,0 +1,16 @@ +#include "TaskManager.h" +#include "KeyStat.h" +#include "UpdateKey.h" +#include "global_alloc.h" + +SchedDefineTask(UpdateKey); + +int +UpdateKey::run(SchedTask *smanager, void *rbuf, void *wbuf) +{ + key_stat *key = (key_stat*)smanager->get_input(rbuf, 0); + key_stat *gdata = (key_stat*)smanager->global_get(KEY_STATUS); + memcpy(gdata, key, sizeof(key_stat)); + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TaskManager/Test/test_render/spe/UpdateKey.h Sat Sep 26 02:53:44 2009 +0900 @@ -0,0 +1,15 @@ +#ifndef INCLUDED_TASK_UPDATE_KEY +#define INCLUDED_TASK_UPDATE_KEY +#include <string.h> +#include "SchedTask.h" +//#include "SceneGraphRoot.h" + +class UpdateKey : public SchedTask { +public: + SchedConstructor(UpdateKey); + + int run(SchedTask *smanager, void *rbuf, void *wbuf); + void setKeyStat(); +}; + +#endif