本文整理汇总了C++中RTTI_SINGLE函数的典型用法代码示例。如果您正苦于以下问题:C++ RTTI_SINGLE函数的具体用法?C++ RTTI_SINGLE怎么用?C++ RTTI_SINGLE使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RTTI_SINGLE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RTTI_SINGLE
//----------------------------------------------------------------//
MOAITileDeck2D::MOAITileDeck2D () {
RTTI_SINGLE ( MOAIDeck2D )
this->SetContentMask ( MOAIProp::CAN_DRAW );
this->mRect.Init ( -0.5f, -0.5f, 0.5f, 0.5f );
}
示例2: mTimerState
//----------------------------------------------------------------//
MOAISim::MOAISim () :
mTimerState ( RESUMING ),
mDeviceTime ( 0.0f ),
mStep ( 0.01f ),
mTime ( 0.0f ),
mFrameTime ( 0.0 ),
mFrameRate ( 0.0f ),
mFrameRateIdx ( 0 ),
mClearFlags ( GL_COLOR_BUFFER_BIT ),
mClearColor ( 0xff000000 ) {
RTTI_SINGLE ( USLuaObject )
this->mDeviceTime = USDeviceTime::GetTimeInSeconds ();
// Start Lua
USLuaRuntime& luaRuntime = USLuaRuntime::Get ();
luaRuntime.Open ();
luaRuntime.LoadLibs ( "moai" );
for ( u32 i = 0; i < FPS_BUFFER_SIZE; ++i ) {
this->mFrameRateBuffer [ i ] = 0.0f;
}
}
示例3: RTTI_SINGLE
//----------------------------------------------------------------//
MOAIScriptDeck::MOAIScriptDeck () {
RTTI_SINGLE ( MOAIDeck )
this->mRect.Init ( 0.0f, 0.0f, 0.0f, 0.0f );
this->mDefaultShaderID = MOAIShaderMgr::LINE_SHADER;
}
示例4: mCullFunc
//----------------------------------------------------------------//
MOAIGfxDevice::MOAIGfxDevice () :
mCullFunc ( 0 ),
mDepthFunc ( 0 ),
mDepthMask ( true ),
mBlendEnabled ( 0 ),
mBuffer ( 0 ),
mClearFlags ( GL_COLOR_BUFFER_BIT ),
mClearColor ( 0xff000000 ),
mClearColorNode ( 0 ),
mCpuVertexTransform ( false ),
mCpuUVTransform ( false ),
mDefaultFrameBuffer ( 0 ),
mDeviceScale ( 1.0f ),
mHasContext ( false ),
mHeight ( 0 ),
mIsFramebufferSupported ( 0 ),
mIsOpenGLES ( false ),
mIsProgrammable ( false ),
mMajorVersion ( 0 ),
mMaxPrims ( 0 ),
mMinorVersion ( 0 ),
mFinalColor32 ( 0xffffffff ),
mPenWidth ( 1.0f ),
mPointSize ( 1.0f ),
mPrimCount ( 0 ),
mPrimSize ( 0 ),
mPrimTop ( 0 ),
mPrimType ( GL_POINTS ),
mShader ( 0 ),
mSize ( 0 ),
mActiveTextures ( 0 ),
mTextureMemoryUsage ( 0 ),
mMaxTextureSize ( 0 ),
mTop ( 0 ),
mUVMtxInput ( UV_STAGE_MODEL ),
mUVMtxOutput ( UV_STAGE_MODEL ),
mVertexFormat ( 0 ),
mVertexMtxInput ( VTX_STAGE_MODEL ),
mVertexMtxOutput ( VTX_STAGE_MODEL ),
mWidth ( 0 ) {
RTTI_SINGLE ( MOAIGlobalEventSource )
this->Reserve ( DEFAULT_BUFFER_SIZE );
for ( u32 i = 0; i < TOTAL_VTX_TRANSFORMS; ++i ) {
this->mVertexTransforms [ i ].Ident ();
}
this->mUVTransform.Ident ();
this->mCpuVertexTransformMtx.Ident ();
this->mAmbientColor.Set ( 1.0f, 1.0f, 1.0f, 1.0f );
this->mFinalColor.Set ( 1.0f, 1.0f, 1.0f, 1.0f );
this->mPenColor.Set ( 1.0f, 1.0f, 1.0f, 1.0f );
this->mViewRect.Init ( 0.0f, 0.0f, 0.0f, 0.0f );
this->mScissorRect.Init ( 0.0f, 0.0f, 0.0f, 0.0f );
}
示例5: RTTI_SINGLE
//----------------------------------------------------------------//
MOAIGfxQuad2D::MOAIGfxQuad2D () {
RTTI_SINGLE ( MOAIDeck2D )
this->SetContentMask ( MOAIProp::CAN_DRAW );
// set up rects to draw a unit tile centered at the origin
this->mRect.Init ( -0.5f, -0.5f, 0.5f, 0.5f );
this->mUVRect.Init ( 0.0f, 1.0f, 1.0f, 0.0f );
}
示例6: mDefaultTimeout
//----------------------------------------------------------------//
MOAIHttpTaskCurl::MOAIHttpTaskCurl () :
mDefaultTimeout ( 10 ),
mEasyHandle ( 0 ),
mHeaderList ( 0 ),
mStream ( 0 ) {
RTTI_SINGLE ( MOAIHttpTaskBase )
this->Reset ();
}
示例7: RTTI_SINGLE
//----------------------------------------------------------------//
MOAIGetTouchesAndroid::MOAIGetTouchesAndroid () {
RTTI_SINGLE ( MOAILuaObject );
}
示例8: while
MOAITaskThread* taskThread = ( MOAITaskThread* )param;
while ( threadState.IsRunning ()) {
taskThread->Process ();
MOAIThread::Sleep ();
}
}
//================================================================//
// MOAITaskThread
//================================================================//
//----------------------------------------------------------------//
MOAITaskThread::MOAITaskThread () {
RTTI_SINGLE ( MOAITaskQueue )
}
//----------------------------------------------------------------//
MOAITaskThread::~MOAITaskThread () {
this->Stop ();
}
//----------------------------------------------------------------//
void MOAITaskThread::PushTask ( MOAITask& task ) {
MOAITaskQueue::PushTask ( task );
this->mThread.Start ( _main, this, 0 );
}
示例9: RTTI_SINGLE
self->SetDependentMember ( self->mSourceTransform, sourceTransform );
self->SetDependentMember ( self->mSourceLayer, sourceLayer );
self->SetDependentMember ( self->mDestLayer, destLayer );
return 0;
}
//================================================================//
// MOAILayerBridge
//================================================================//
//----------------------------------------------------------------//
MOAILayerBridge::MOAILayerBridge () {
RTTI_SINGLE ( MOAITransform )
}
//----------------------------------------------------------------//
MOAILayerBridge::~MOAILayerBridge () {
}
//----------------------------------------------------------------//
void MOAILayerBridge::OnDepNodeUpdate () {
if ( !( this->mSourceTransform && this->mSourceLayer && this->mDestLayer )) return;
//this->mLocalToWorldMtx = this->mSourceTransform->GetLocalToWorldMtx ();
//
//USAffine3D mtx;
//
示例10: RTTI_SINGLE
//----------------------------------------------------------------//
MOAIGfxQuadDeck2D::MOAIGfxQuadDeck2D () {
RTTI_SINGLE ( MOAIDeck2D )
this->SetContentMask ( MOAIProp::CAN_DRAW );
}
示例11: RTTI_SINGLE
//----------------------------------------------------------------//
MOAISurfaceDeck2D::MOAISurfaceDeck2D () {
RTTI_SINGLE ( MOAIDeck )
this->SetContentMask ( MOAIProp::CAN_DRAW_DEBUG | MOAIProp::CAN_GATHER_SURFACES );
}
示例12: RTTI_SINGLE
gfxDevice.BeginPrim ();
for ( u32 i = 0; i < count; ++i ) {
u32 v = i << 1;
gfxDevice.WriteVtx ( verts [ v ], verts [ v + 1 ], 0.0f );
gfxDevice.WriteFinalColor4b ();
}
gfxDevice.EndPrim ();
}
//----------------------------------------------------------------//
MOAIDraw::MOAIDraw () {
RTTI_SINGLE ( MOAILuaObject )
}
//----------------------------------------------------------------//
MOAIDraw::~MOAIDraw () {
}
//----------------------------------------------------------------//
void MOAIDraw::RegisterLuaClass ( MOAILuaState& state ) {
UNUSED ( state );
luaL_Reg regTable [] = {
{ "drawAnimCurve", _drawAnimCurve },
//{ "drawAxisGrid", _drawAxisGrid }, // TODO
{ "drawBoxOutline", _drawBoxOutline },
{ "drawCircle", _drawCircle },
示例13: RTTI_SINGLE
//----------------------------------------------------------------//
USFont* MOAIFont::Bind () {
USDrawBuffer& drawbuffer = USDrawBuffer::Get ();
if ( drawbuffer.SetTexture ( &this->mTexture )) {
return this;
}
return 0;
}
//----------------------------------------------------------------//
MOAIFont::MOAIFont () {
RTTI_SINGLE ( USLuaObject )
}
//----------------------------------------------------------------//
MOAIFont::~MOAIFont () {
}
//----------------------------------------------------------------//
void MOAIFont::LoadFont ( MOAIDataBuffer& fontImageData, cc8* charCodes ) {
USImage image;
USFontRipper ripper;
ripper.RipAndReturn ( fontImageData, *this, image, charCodes );
this->mTexture.Init ( image );
this->mTexture.SetFilter ( GL_LINEAR, GL_LINEAR );
}
示例14: RTTI_SINGLE
//----------------------------------------------------------------//
MOAITapjoyAndroid::MOAITapjoyAndroid () {
RTTI_SINGLE ( MOAIGlobalEventSource )
this->SetClass ( "com/ziplinegames/moai/MoaiTapjoy" );
}
示例15: RTTI_SINGLE
MOAIHusky::MOAIHusky() {
RTTI_SINGLE ( MOAILuaObject );
_map = new LoaderHandleMap();
_currentHuskyHandle = NULL;
_instance = NULL;
_fHuskyName = NULL;
_fHuskyShutdown = NULL;
_huskyCapabilities = 0;
#ifdef __APPLE__
const char* extension = ".dylib";
/** Grab the directory the exectuable is in, by default we want to load Huskies from where the moai exe is **/
NSString *executablePath = [[[[NSProcessInfo processInfo] arguments] objectAtIndex:0] stringByDeletingLastPathComponent];
const char *dirname = [executablePath fileSystemRepresentation];
unsigned long dirlength = strlen(dirname);
DIR *dir = opendir(dirname);
struct dirent *ent;
/** Cycle through the entries in the directory **/
while((ent = readdir(dir)) != NULL) {
/** Is this entry a regular file? **/
if (ent->d_type == DT_REG) {
if (endsWith(ent->d_name, extension)) {
/** We need a full path to load the dll **/
unsigned long filenamelength = strlen(ent->d_name);
char* fullpath = (char*)malloc(sizeof(char) * (filenamelength + dirlength + 2));
strcpy(fullpath, dirname);
strcat(fullpath, "/");
strcat(fullpath, ent->d_name);
void* dll_handle = dlopen(fullpath, RTLD_LOCAL|RTLD_LAZY);
free(fullpath);
/** Got a handle? try to get the husky entry points **/
if (dll_handle) {
HuskyGetStaticInstance* fHuskyInstance = (HuskyGetStaticInstance*)dlsym(dll_handle, "getHuskyInstance");
HuskyGetName* fHuskyName = (HuskyGetName*)dlsym(dll_handle, "getHuskyName");
HuskyShutdownStaticInstance* fHuskyShutdown;
fHuskyShutdown = (HuskyShutdownStaticInstance*)dlsym(dll_handle, "shutdownHuskyInstance");
if (fHuskyName && fHuskyInstance && fHuskyShutdown) {
/** Got Husky Entry points? great, now record this handle so we can use it later **/
HuskyLoaderHandle *handleObj = new HuskyLoaderHandle(dll_handle);
std::string *name = new std::string(fHuskyName());
if (_currentHuskyHandle == NULL) {
_currentHuskyHandle = handleObj->dllhandle;
_instance = fHuskyInstance();
_fHuskyName = fHuskyName;
_fHuskyShutdown = fHuskyShutdown;
_instance->setObserver(this);
_huskyCapabilities = _instance->getCapabilities();
}
_map->insert(LoaderHandleMap::value_type(*name, *handleObj));
}
}
}
}
}
#elif WIN32
LPTSTR extension = "\*.dll";
LPTSTR search;
DWORD length = 255;
search = (LPTSTR)malloc(sizeof(char) * length);
DWORD result = GetModuleFileName(NULL, search, length - 1);
if (result == 0) {
strcpy(search, ".");
}
PathRemoveFileSpec(search);
PathAppend(search, extension);
WIN32_FIND_DATA findfiledata;
HANDLE hFind = FindFirstFile(search, &findfiledata);
if (hFind != INVALID_HANDLE_VALUE ) {
do {
HMODULE dll_handle = LoadLibrary(findfiledata.cFileName);
if (dll_handle) {
HuskyGetStaticInstance* fHuskyInstance = (HuskyGetStaticInstance*)GetProcAddress(dll_handle, "getHuskyInstance");
HuskyGetName* fHuskyName = (HuskyGetName*)GetProcAddress(dll_handle, "getHuskyName");
HuskyShutdownStaticInstance* fHuskyShutdown;
fHuskyShutdown = (HuskyShutdownStaticInstance*)GetProcAddress(dll_handle, "shutdownHuskyInstance");
if (fHuskyName && fHuskyInstance && fHuskyShutdown) {
HuskyLoaderHandle *handleObj = new HuskyLoaderHandle(dll_handle);
std::string *name = new std::string(fHuskyName());
if (_currentHuskyHandle == NULL) {
_currentHuskyHandle = handleObj->dllhandle;
_instance = fHuskyInstance();
_fHuskyName = fHuskyName;
_fHuskyShutdown = fHuskyShutdown;
_instance->setObserver(this);
_huskyCapabilities = _instance->getCapabilities();
}
_map->insert(LoaderHandleMap::value_type(*name, *handleObj));
}
}
} while(FindNextFile(hFind, &findfiledata) != 0);
FindClose(hFind);
//.........这里部分代码省略.........