sbitlist.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef __SBITLIST_H
  2. #define __SBITLIST_H
  3. #include <api/script/objects/rootobj.h>
  4. #include <api/script/script.h>
  5. #include <api/script/objects/rootobject.h>
  6. class BitList;
  7. #define SBITLIST_SCRIPTPARENT RootObjectInstance
  8. class BitlistScriptController : public ScriptObjectControllerI {
  9. public:
  10. virtual const wchar_t *getClassName();
  11. virtual const wchar_t *getAncestorClassName();
  12. virtual ScriptObjectController *getAncestorController() { return rootScriptObjectController; }
  13. virtual int getNumFunctions();
  14. virtual const function_descriptor_struct *getExportedFunctions();
  15. virtual GUID getClassGuid();
  16. virtual ScriptObject *instantiate();
  17. virtual void destroy(ScriptObject *o);
  18. virtual void *encapsulate(ScriptObject *o);
  19. virtual void deencapsulate(void *o);
  20. private:
  21. static function_descriptor_struct exportedFunction[];
  22. };
  23. extern BitlistScriptController *bitlistController;
  24. class SBitlist : public SBITLIST_SCRIPTPARENT {
  25. public:
  26. SBitlist();
  27. virtual ~SBitlist();
  28. BitList *getBitList();
  29. private:
  30. BitList *list;
  31. public:
  32. static scriptVar script_vcpu_getitem(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar n);
  33. static scriptVar script_vcpu_setitem(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar n, scriptVar v);
  34. static scriptVar script_vcpu_setsize(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar newsize);
  35. static scriptVar script_vcpu_getsize(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  36. };
  37. #endif