Class ssq::Instance
Class List > ssq > Instance
Squirrel intance of class object.
#include <instance.hpp>
Inherits the following classes: ssq::Object
Inherited by the following classes: ssq::SqWeakRef
Public Functions
Type | Name |
---|---|
Instance () Constructs empty invalid instance. | |
Instance (HSQUIRRELVM vm) Constructs empty instance. | |
Instance (const Object & object) Converts Object toInstance . | |
Instance (const Instance & other) Copy constructor. | |
Instance (Instance && other) Move constructor. | |
Class | getClass () Returns the class associated with this instance. |
Instance & | operator= (const Instance & other) Copy assingment operator. |
Instance & | operator= (Instance && other) Move assingment operator. |
virtual | ~Instance () = default Destructor. |
ssq::Object
Public Functions inherited fromType | Name |
---|---|
Object () Creates an empty object with null VM . | |
Object (HSQUIRRELVM vm) Creates an empty object. | |
Object (const Object & other) Copy constructor to copy the object reference. | |
Object (Object && other) Move constructor. | |
Object | find (const char * name) const Finds object within this object. |
const HSQUIRRELVM & | getHandle () const Returns the Squirrel virtual machine handle associated with this instance. |
const HSQOBJECT & | getRaw () const Returns raw Squirrel object reference. |
HSQOBJECT & | getRaw () Returns raw Squirrel object reference. |
Type | getType () const Returns the type of the object. |
const char * | getTypeStr () const Returns the type of the object in string format. |
size_t | getTypeTag () const Returns the typetag associated with this object. |
bool | isEmpty () const Checks if the object is empty. |
bool | isNull () const Returns true if the object is nullptr. |
Object & | operator= (const Object & other) Copy assingment operator. |
Object & | operator= (Object && other) Move assingment operator. |
void | reset () Releases the object and resets it to empty. |
void | swap (Object & other) Swaps two objects. |
T | to () const Returns an arbitary value of this object. |
Array | toArray () const Returns the Array value of this object. |
bool | toBool () const Returns the boolean value of this object. |
Class | toClass () const Returns the Class value of this object. |
float | toFloat () const Returns the float value of this object. |
Function | toFunction () const Returns the Function value of this object. |
Instance | toInstance () const Returns the Instance value of this object. |
int32_t | toInt () const Returns the integer value of this object. |
T | toPtrUnsafe () const Unsafe cast this object into any pointer of type T. |
std::string | toString () const Returns the string value of this object. |
Table | toTable () const Returns the Table value of this object. |
virtual | ~Object () |
ssq::Object
Protected Attributes inherited fromType | Name |
---|---|
HSQOBJECT | obj |
HSQUIRRELVM | vm |
bool | weak |
Public Functions Documentation
function Instance [1/5]
ssq::Instance::Instance ()
function Instance [2/5]
ssq::Instance::Instance (
HSQUIRRELVM vm
)
function Instance [3/5]
explicit ssq::Instance::Instance (
const Object & object
)
Exception:
- TypeException if the Object is not type of an instance
function Instance [4/5]
ssq::Instance::Instance (
const Instance & other
)
function Instance [5/5]
ssq::Instance::Instance (
Instance && other
)
function getClass
Class ssq::Instance::getClass ()
Exception:
- TypeException if something went wrong
function operator=
Instance & ssq::Instance::operator= (
const Instance & other
)
function operator=
Instance & ssq::Instance::operator= (
Instance && other
)
function ~Instance
virtual ssq::Instance::~Instance () = default
The documentation for this class was generated from the following file include/simplesquirrel/instance.hpp