Code Search for Developers
 
 
  

dll.cpp from NeoEngineNG at Krugle


Show dll.cpp syntax highlighted

/***************************************************************************
         dll.cpp  -  Dynamic library entry points and init/shutdown
                             -------------------
    begin                : Tue Jul 8 2003
    copyright            : (C) 2003 by Reality Rift Studios
    email                : mattias@realityrift.com
 ***************************************************************************

 The contents of this file are subject to the Mozilla Public License Version
 1.1 (the "License"); you may not use this file except in compliance with
 the License. You may obtain a copy of the License at 
 http://www.mozilla.org/MPL/

 Software distributed under the License is distributed on an "AS IS" basis,
 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 for the specific language governing rights and limitations under the
 License.

 The Original Code is the NeoEngine, NeoABT, dll.cpp

 The Initial Developer of the Original Code is Mattias Jansson.
 Portions created by Mattias Jansson are Copyright (C) 2003
 Reality Rift Studios. All Rights Reserved.

 ***************************************************************************/

#include "base.h"
#include "room.h"
#include "link.h"

#include <neoengine/module.h>

#ifdef HAVE_NEOCHUNKIO
#  include "chunk.h"
#  include <neochunkio/factory.h>
#endif

using namespace NeoEngine;
using namespace NeoChunkIO;
using namespace NeoABT;

namespace NeoABT
{

	ModuleStatic *g_pkStaticModule = 0;

	NEOABT_API int Initialize()
	{
#ifdef HAVE_NEOCHUNKIO
		ChunkFactory::RegisterChunkType( ABTChunkType::ABTROOM,       "abt",           ABTRoomChunk::Allocator       );
		ChunkFactory::RegisterChunkType( ABTChunkType::ABTGEOM,       "abtgeom",       ABTGeometryChunk::Allocator   );
#endif

		return 0;
	}


	NEOABT_API NeoEngine::Room *CreateRoom()
	{
		return new NeoABT::ABTRoom;
	}


	NEOABT_API int Shutdown()
	{
		delete g_pkStaticModule;
		return 0;
	}

	NEOABT_API void GetVersion( std::string *pstrName, int *piMajor, int *piMinor, int *piRevision )
	{
		*pstrName   = "Adaptive Binary Tree";
		*piMajor    = NEOABTVERSION_MAJOR;
		*piMinor    = NEOABTVERSION_MINOR;
		*piRevision = NEOABTVERSION_REVISION;
	}

	Link::Link()
	{
#if defined(WIN32) && defined(_DEBUG)
		g_pkStaticModule = new ModuleStatic( "neoabt_debug" );
#else
		g_pkStaticModule = new ModuleStatic( "neoabt" );
#endif

		g_pkStaticModule->m_Symbols.Insert( "CreateRoom", (void**)CreateRoom );
		g_pkStaticModule->m_Symbols.Insert( "Initialize", (void**)Initialize );
		g_pkStaticModule->m_Symbols.Insert( "Shutdown",   (void**)Shutdown   );
		g_pkStaticModule->m_Symbols.Insert( "GetVersion", (void**)GetVersion );

		NeoEngine::Core::GetModuleManager()->InsertModule( g_pkStaticModule );
	}

};




See more files for this project here

NeoEngineNG

NeoenEngine NG (Next Generation) is the evolution of neoengine one,it\'s a different development from NeoEngine2, it\'s a direct inherits from NeoEngine one.\n

Project homepage: http://sourceforge.net/projects/neoengineng
Programming language(s): C,C++
License: other

  Makefile.am
  SConscript
  base.h
  chunk.cpp
  chunk.h
  dll.cpp
  geometry.cpp
  geometry.h
  link.h
  neoabt-static.dev
  neoabt.cbp
  neoabt.dev
  neoabt.dsp
  neoabt.layout
  neoabt.vcproj
  node.cpp
  node.h
  room.cpp
  room.h