mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-02-21 20:27:13 +01:00
Implement the pure typename meta-methods in buffer type using the standard method.
This commit is contained in:
parent
7fde39fb6d
commit
d059d0d1ac
@ -18,6 +18,9 @@
|
|||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
namespace SqMod {
|
namespace SqMod {
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
SQMODE_DECL_TYPENAME(Typename, _SC("SqBuffer"))
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void SqBuffer::WriteInt64(const SLongInt & val)
|
void SqBuffer::WriteInt64(const SLongInt & val)
|
||||||
{
|
{
|
||||||
@ -368,11 +371,13 @@ Vector4 SqBuffer::ReadVector4()
|
|||||||
// ================================================================================================
|
// ================================================================================================
|
||||||
void Register_Buffer(HSQUIRRELVM vm)
|
void Register_Buffer(HSQUIRRELVM vm)
|
||||||
{
|
{
|
||||||
RootTable(vm).Bind(_SC("SqBuffer"),
|
RootTable(vm).Bind(Typename::Str,
|
||||||
Class< SqBuffer >(vm, _SC("SqBuffer"))
|
Class< SqBuffer >(vm, Typename::Str)
|
||||||
// Constructors
|
// Constructors
|
||||||
.Ctor()
|
.Ctor()
|
||||||
.Ctor< SQInteger >()
|
.Ctor< SQInteger >()
|
||||||
|
// Core Meta-methods
|
||||||
|
.SquirrelFunc(_SC("_typename"), &Typename::Fn)
|
||||||
// Properties
|
// Properties
|
||||||
.Prop(_SC("Front"), &SqBuffer::GetFront, &SqBuffer::SetFront)
|
.Prop(_SC("Front"), &SqBuffer::GetFront, &SqBuffer::SetFront)
|
||||||
.Prop(_SC("Next"), &SqBuffer::GetNext, &SqBuffer::SetNext)
|
.Prop(_SC("Next"), &SqBuffer::GetNext, &SqBuffer::SetNext)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user