rename ExampleInterface -> CommonExampleInterface to be a little bit more consistent in 'CommonInterfaces' naming

This commit is contained in:
erwin coumans
2015-04-29 13:33:26 -07:00
parent 4ed666a72a
commit 40375983d6
56 changed files with 87 additions and 85 deletions

View File

@@ -10,7 +10,7 @@ public:
EmptyExample m_emptyExample;
virtual ExampleInterface* getCurrentExample()
virtual CommonExampleInterface* getCurrentExample()
{
return &m_emptyExample;
}

View File

@@ -1,16 +1,16 @@
#ifndef EMPTY_EXAMPLE_H
#define EMPTY_EXAMPLE_H
#include "../CommonInterfaces/ExampleInterface.h"
#include "../CommonInterfaces/CommonExampleInterface.h"
class EmptyExample : public ExampleInterface
class EmptyExample : public CommonExampleInterface
{
public:
EmptyExample() {}
virtual ~EmptyExample(){}
static ExampleInterface* CreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
static CommonExampleInterface* CreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{
return new EmptyExample;
}

View File

@@ -1,7 +1,7 @@
#ifndef EXAMPLE_BROWSER_GUI_H
#define EXAMPLE_BROWSER_GUI_H
#include "../CommonInterfaces/ExampleInterface.h"
#include "../CommonInterfaces/CommonExampleInterface.h"
class ExampleBrowserInterface
{
@@ -9,7 +9,7 @@ class ExampleBrowserInterface
virtual ~ExampleBrowserInterface() {}
virtual ExampleInterface* getCurrentExample() = 0;
virtual CommonExampleInterface* getCurrentExample() = 0;
virtual bool init(int argc, char* argv[])=0;

View File

@@ -32,7 +32,7 @@ struct ExampleEntry
int m_menuLevel;
const char* m_name;
const char* m_description;
ExampleInterface::CreateFunc* m_createFunc;
CommonExampleInterface::CreateFunc* m_createFunc;
int m_option;
ExampleEntry(int menuLevel, const char* name)
@@ -40,7 +40,7 @@ struct ExampleEntry
{
}
ExampleEntry(int menuLevel, const char* name,const char* description, ExampleInterface::CreateFunc* createFunc, int option=0)
ExampleEntry(int menuLevel, const char* name,const char* description, CommonExampleInterface::CreateFunc* createFunc, int option=0)
:m_menuLevel(menuLevel), m_name(name), m_description(description), m_createFunc(createFunc), m_option(option)
{
}
@@ -207,7 +207,7 @@ void ExampleEntries::initExampleEntries()
}
void ExampleEntries::registerExampleEntry(int menuLevel, const char* name,const char* description, ExampleInterface::CreateFunc* createFunc, int option)
void ExampleEntries::registerExampleEntry(int menuLevel, const char* name,const char* description, CommonExampleInterface::CreateFunc* createFunc, int option)
{
ExampleEntry e( menuLevel,name,description, createFunc, option);
gAdditionalRegisteredExamples.push_back(e);
@@ -218,7 +218,7 @@ int ExampleEntries::getNumRegisteredExamples()
return m_data->m_allExamples.size();
}
ExampleInterface::CreateFunc* ExampleEntries::getExampleCreateFunc(int index)
CommonExampleInterface::CreateFunc* ExampleEntries::getExampleCreateFunc(int index)
{
return m_data->m_allExamples[index].m_createFunc;
}

View File

@@ -2,7 +2,7 @@
#ifndef EXAMPLE_ENTRIES_H
#define EXAMPLE_ENTRIES_H
#include "../CommonInterfaces/ExampleInterface.h"
#include "../CommonInterfaces/CommonExampleInterface.h"
@@ -17,13 +17,13 @@ public:
ExampleEntries();
virtual ~ExampleEntries();
static void registerExampleEntry(int menuLevel, const char* name,const char* description, ExampleInterface::CreateFunc* createFunc, int option=0);
static void registerExampleEntry(int menuLevel, const char* name,const char* description, CommonExampleInterface::CreateFunc* createFunc, int option=0);
void initExampleEntries();
int getNumRegisteredExamples();
ExampleInterface::CreateFunc* getExampleCreateFunc(int index);
CommonExampleInterface::CreateFunc* getExampleCreateFunc(int index);
const char* getExampleName(int index);

View File

@@ -27,7 +27,7 @@
#include "GwenGUISupport/GwenTextureWindow.h"
#include "GwenGUISupport/GraphingTexture.h"
#include "../CommonInterfaces/Common2dCanvasInterface.h"
#include "../CommonInterfaces/ExampleInterface.h"
#include "../CommonInterfaces/CommonExampleInterface.h"
#include "Bullet3Common/b3CommandLineArgs.h"
#include "../OpenGLWindow/SimpleCamera.h"
#include "../OpenGLWindow/SimpleOpenGL2Renderer.h"
@@ -48,7 +48,7 @@ const char* startFileName = "bulletDemo.txt";
static GwenUserInterface* gui = 0;
static int sCurrentDemoIndex = 0;
static int sCurrentHightlighted = 0;
static ExampleInterface* sCurrentDemo = 0;
static CommonExampleInterface* sCurrentDemo = 0;
static b3AlignedObjectArray<const char*> allNames;
static class ExampleEntries* gAllExamples=0;
@@ -233,7 +233,7 @@ void selectDemo(int demoIndex)
delete s_guiHelper;
s_guiHelper = 0;
}
ExampleInterface::CreateFunc* func = gAllExamples->getExampleCreateFunc(demoIndex);
CommonExampleInterface::CreateFunc* func = gAllExamples->getExampleCreateFunc(demoIndex);
if (func)
{
s_parameterInterface->removeAllParameters();
@@ -696,7 +696,7 @@ bool OpenGLExampleBrowser::init(int argc, char* argv[])
ExampleInterface* OpenGLExampleBrowser::getCurrentExample()
CommonExampleInterface* OpenGLExampleBrowser::getCurrentExample()
{
btAssert(sCurrentDemo);
return sCurrentDemo;

View File

@@ -10,7 +10,7 @@ public:
OpenGLExampleBrowser(class ExampleEntries* examples);
virtual ~OpenGLExampleBrowser();
virtual ExampleInterface* getCurrentExample();
virtual CommonExampleInterface* getCurrentExample();
virtual bool init(int argc, char* argv[]);