本文整理汇总了C++中Table::GetVM方法的典型用法代码示例。如果您正苦于以下问题:C++ Table::GetVM方法的具体用法?C++ Table::GetVM怎么用?C++ Table::GetVM使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Table
的用法示例。
在下文中一共展示了Table::GetVM方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Register_Constants
// ================================================================================================
void Register_Constants(Table & ircns)
{
RegisterEnum(ircns.GetVM(), _SC("SqIrcEvent"), g_IrcEvent, SQENUMCOUNT(g_IrcEvent));
RegisterEnum(ircns.GetVM(), _SC("SqIrcErr"), g_IrcErr, SQENUMCOUNT(g_IrcErr));
RegisterEnum(ircns.GetVM(), _SC("SqIrcOpt"), g_IrcOpt, SQENUMCOUNT(g_IrcOpt));
RegisterEnum(ircns.GetVM(), _SC("SqIrcRFC"), g_IrcRFC, SQENUMCOUNT(g_IrcRFC));
}
示例2: Register_SockAddr
// ================================================================================================
void Register_SockAddr(Table & mmns)
{
mmns.Bind(_SC("SockAddr"),
Class< SockAddr, NoCopy< SockAddr > >(mmns.GetVM(), _SC("SqMMSockAddr"))
// Constructors
.Ctor()
.Ctor< CSStr >()
// Meta-methods
.SquirrelFunc(_SC("_typename"), &SockAddr::Typename)
.Func(_SC("_tostring"), &SockAddr::ToString)
// Properties
.Prop(_SC("IsValid"), &SockAddr::IsValid)
.Prop(_SC("Address"), &SockAddr::GetAddress)
);
}
示例3: Register_LookupResult
// ================================================================================================
void Register_LookupResult(Table & mmns)
{
mmns.Bind(_SC("LookupResult"),
Class< LookupResult >(mmns.GetVM(), _SC("SqMMLookupResult"))
// Constructors
.Ctor()
.Ctor< const LookupResult & >()
// Meta-methods
.SquirrelFunc(_SC("_typename"), &LookupResult::Typename)
.Func(_SC("_tostring"), &LookupResult::ToString)
// Properties
.Prop(_SC("IsValid"), &LookupResult::IsValid)
.Prop(_SC("Database"), &LookupResult::GetDatabase)
.Prop(_SC("References"), &LookupResult::GetRefCount)
.Prop(_SC("FoundEntry"), &LookupResult::FoundEntry)
.Prop(_SC("NetMask"), &LookupResult::GetNetMask)
.Prop(_SC("EntryDataList"), &LookupResult::GetEntryDataList)
// Member methods
.Func(_SC("Release"), &LookupResult::Release)
// Squirrel functions
.SquirrelFunc(_SC("GetValue"), &LookupResult::GetValue)
);
}