当前位置: 首页>>代码示例>>C++>>正文


C++ IObject::GetInterface方法代码示例

本文整理汇总了C++中IObject::GetInterface方法的典型用法代码示例。如果您正苦于以下问题:C++ IObject::GetInterface方法的具体用法?C++ IObject::GetInterface怎么用?C++ IObject::GetInterface使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IObject的用法示例。


在下文中一共展示了IObject::GetInterface方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Init

bool ConsoleGame::Init()
{
	//Initialise the RuntimeObjectSystem
	m_pRuntimeObjectSystem = new RuntimeObjectSystem;
	m_pCompilerLogger = new StdioLogSystem();
	if( !m_pRuntimeObjectSystem->Initialise(m_pCompilerLogger, 0) )
    {
        m_pRuntimeObjectSystem = 0;
        return false;
    }
	m_pRuntimeObjectSystem->GetObjectFactorySystem()->AddListener(this);


	// construct first object
	IObjectConstructor* pCtor = m_pRuntimeObjectSystem->GetObjectFactorySystem()->GetConstructor( "RuntimeObject01" );
	if( pCtor )
	{
		IObject* pObj = pCtor->Construct();
		pObj->GetInterface( &m_pUpdateable );
		if( 0 == m_pUpdateable )
		{
			delete pObj;
			m_pCompilerLogger->LogError("Error - no updateable interface found\n");
			return false;
		}
		m_ObjectId = pObj->GetObjectId();

	}

	return true;
}
开发者ID:Ashalah,项目名称:RuntimeCompiledCPlusPlus,代码行数:31,代码来源:ConsoleGame.cpp

示例2: OnConstructorsAdded

void ConsoleGame::OnConstructorsAdded()
{
	// This could have resulted in a change of object pointer, so release old and get new one.
	if( m_pUpdateable )
	{
		IObject* pObj = m_pRuntimeObjectSystem->GetObjectFactorySystem()->GetObject( m_ObjectId );
		pObj->GetInterface( &m_pUpdateable );
		if( 0 == m_pUpdateable )
		{
			delete pObj;
			m_pCompilerLogger->LogError( "Error - no updateable interface found\n");
		}
	}
}
开发者ID:Ashalah,项目名称:RuntimeCompiledCPlusPlus,代码行数:14,代码来源:ConsoleGame.cpp

示例3: setup


//.........这里部分代码省略.........

# ifdef TARGET_LINUX
  rCPP.AddIncludeDir("/usr/include/AL");
  rCPP.AddIncludeDir("/usr/include/cairo");
  rCPP.AddIncludeDir("/usr/include/gtk-3.0");
  rCPP.AddIncludeDir("/usr/include/atk-1.0");
  rCPP.AddIncludeDir("/usr/include/glib-2.0");
  rCPP.AddIncludeDir("/usr/lib/glib-2.0/include/");
  rCPP.AddIncludeDir("/usr/include/harfbuzz");
  rCPP.AddIncludeDir("/usr/include/pixman-1");
  rCPP.AddIncludeDir("/usr/include/libpng12");
  rCPP.AddIncludeDir("/usr/include/pango-1.0");
  rCPP.AddIncludeDir("/usr/include/freetype2");
  rCPP.AddIncludeDir("/usr/include/gio-unix-2.0");
  rCPP.AddIncludeDir("/usr/include/gstreamer-1.0");
  rCPP.AddIncludeDir("/usr/lib/gstreamer-1.0/include");
  rCPP.AddIncludeDir("/usr/lib/gstreamer-1.0/include/gst");
  rCPP.AddIncludeDir("/usr/include/gdk-pixbuf-2.0");
  rCPP.AddIncludeDir("/usr/include/at-spi2-atk/2.0");
  rCPP.AddIncludeDir("/usr/lib/x86_64-linux-gnu/glib-2.0/include");
# endif

  rCPP.AddIncludeDir("../of/src/freeimage");
  rCPP.AddIncludeDir("../of/src/freeimage/OpenEXR");
  rCPP.AddIncludeDir("../of/src/freeimage/OpenEXR/Half");
  rCPP.AddIncludeDir("../of/src/freeimage/OpenEXR/Iex");
  rCPP.AddIncludeDir("../of/src/freeimage/OpenEXR/IlmImf");
  rCPP.AddIncludeDir("../of/src/freeimage/OpenEXR/IlmThread");
  rCPP.AddIncludeDir("../of/src/freeimage/OpenEXR/Imath");
  rCPP.AddIncludeDir("../of/src/rtaudio");
  rCPP.AddIncludeDir("../of/src/rtaudio/include");
  rCPP.AddIncludeDir("../of/src/utf8cpp");
  rCPP.AddIncludeDir("../of/src/utf8cpp/include");
  rCPP.AddIncludeDir("../of/src/utf8cpp/include/utf8");
  rCPP.AddIncludeDir("../of/src/glew");
  rCPP.AddIncludeDir("../of/src/glew/include");
  rCPP.AddIncludeDir("../of/src/glfw");
  rCPP.AddIncludeDir("../of/src/glfw/include");
  rCPP.AddIncludeDir("../of/src/glfw/include/GLFW");
  rCPP.AddIncludeDir("../of/src/kissfft");
  rCPP.AddIncludeDir("../of/src/kissfft/tools");
  rCPP.AddIncludeDir("../of/src/poco");
  rCPP.AddIncludeDir("../of/src/poco/Crypto/include");
  rCPP.AddIncludeDir("../of/src/poco/Foundation/include");
  rCPP.AddIncludeDir("../of/src/poco/Net/include");
  rCPP.AddIncludeDir("../of/src/poco/NetSSL_OpenSSL/include");
  rCPP.AddIncludeDir("../of/src/poco/Util/include");
  rCPP.AddIncludeDir("../of/src/poco/XML/include");
  rCPP.AddIncludeDir("../of/src/poco/Zip/include");
  rCPP.AddIncludeDir("../of/src/rtaudio");
  rCPP.AddIncludeDir("../of/src/rtaudio/include");
  rCPP.AddIncludeDir("../of/src/libtess2");
  rCPP.AddIncludeDir("../of/src/libtess2/Include");
  rCPP.AddIncludeDir("../of/src/libtess2/Sources");
  rCPP.AddIncludeDir("../of/src/openframeworks");
  rCPP.AddIncludeDir("of/src/openframeworks");
  rCPP.AddIncludeDir("../of/src/openframeworks/3d");
  rCPP.AddIncludeDir("../of/src/openframeworks/app");
  rCPP.AddIncludeDir("../of/src/openframeworks/communication");
  rCPP.AddIncludeDir("../of/src/openframeworks/events");
  rCPP.AddIncludeDir("../of/src/openframeworks/gl");
  rCPP.AddIncludeDir("../of/src/openframeworks/graphics");
  rCPP.AddIncludeDir("../of/src/openframeworks/math");
  rCPP.AddIncludeDir("../of/src/openframeworks/sound");
  rCPP.AddIncludeDir("../of/src/openframeworks/types");
  rCPP.AddIncludeDir("../of/src/openframeworks/utils");
  rCPP.AddIncludeDir("../of/src/openframeworks/video");

  rCPP.AddIncludeDir("RuntimeCompiledCPlusPlus/Aurora");
  rCPP.AddIncludeDir("addons/ofxImGui/src");
  rCPP.AddIncludeDir("addons/ofxImGui/libs/imgui/src");
  rCPP.AddIncludeDir("../of/addons/ofxAssimpModelLoader/src");
  rCPP.AddIncludeDir("../of/addons/ofxAssimpModelLoader/libs/assimp/include/");
  rCPP.AddIncludeDir("./");

  {
    ofDirectory dir(ofFilePath::getCurrentExeDir() + "..");
    dir.listDir();
    vector<ofFile> files = dir.getFiles();
    for (ofFile& file : files)
    {
      if (file.isDirectory() &&
          file.getBaseName().substr(0,3) == "ofx")
      {
        rCPP.AddIncludeDir(&(file.path())[0]);
        rCPP.AddIncludeDir(&(file.path() + "/src")[0]);
      }
    }
  }

  rCPP.GetObjectFactorySystem()->AddListener(this);

  {
    IObject* rObject = rCPP.GetObjectFactorySystem()->GetConstructor("ofApp")->Construct();
    rObject->GetInterface(&rAPP);
    rOID = rObject->GetObjectId();
  }

  rAPP->setup();
}
开发者ID:origamidance,项目名称:ofxGeoFramework,代码行数:101,代码来源:ofLive.cpp


注:本文中的IObject::GetInterface方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。