Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <common/c_lua.h>
- namespace codename6
- {
- c_difftime::c_difftime()
- {
- }
- c_difftime::c_difftime(const c_difftime &v) : super(v)
- {
- }
- void c_difftime::Assign(const void *v)
- {
- super::Assign(v);
- }
- const char *c_difftime::ClassName() const
- {
- return "c_difftime";
- }
- const void *c_difftime::Clone(uint64_t opt) const
- {
- return new c_difftime(*this);
- }
- bool c_difftime::Inherited(const char *clsname) const
- {
- if(strcmp(c_difftime::ClassName(),clsname)==0) return true;
- return super::Inherited(clsname);
- }
- uint64_t c_difftime::write(std::ostream &s) const
- {
- uint64_t pos = s.tellp();
- super::write(s);
- return (uint64_t)s.tellp()-pos;
- }
- uint64_t c_difftime::read(std::istream &s)
- {
- uint64_t pos = s.tellg();
- super::read(s);
- return (uint64_t)s.tellg()-pos;
- }
- int c_difftime::from_lua(void *LL,int idx)
- {
- lua_State *L = (lua_State *)LL;
- int ret = 0;
- ret += super::from_lua(LL,idx+ret);
- return ret;
- }
- int c_difftime::to_lua(void *LL)
- {
- lua_State *L = (lua_State *)LL;
- int ret = 0;
- ret += super::to_lua(LL);
- return ret;
- }
- int c_difftime::on_lua_command_call(const char *cmd,void *LL)
- {
- lua_State *L = (lua_State *)LL;
- STR_SWITCH_BEGIN(cmd)
- CASE("c_difftime::Assign")
- {
- const void * v = (const void *)luaL_checkinteger(L,3);
- c_difftime::Assign(v);
- return 0;
- }
- STR_SWITCH_END()
- return super::on_lua_command_call(cmd,L);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement