NERvDN Library  0.2.0.20160420-0019
NERvLibrary - Nerve Gear Developer Network
Getting Started with NERvSDK

This tutorial will show you the basic information of the NERvSDK and how to use the sample projects.

Directory Structure

Folders Descriptions
bin A minimal NERvGear environment for testing or debugging.
docs Guides and references for components, interfaces, files and etc.
include Header files of interfaces, templates and etc.
lib NERvSDK and NERvRES libraries for both VC and GCC.
samples Demo projects for both VS and Code::Blocks.

Compiling Demo Plug-in

To get started with the Demo Plug-in for 64 bit Windows, you could:

Visual Studio

  1. Open samples\SAO Utils Plugin Demo.sln with Vistual Studio.
  2. Switch into x64 solution platform.
  3. Build Plug-in Demo project.
  4. Copy samples\Release\Plug-in Demo\module64.dll to bin\win64\Plugins\Plug-in Demo.
  5. Run bin\win64\NERvSDK.exe to test the plug-in.

The sample solution and its projects require VS2013(VC12) or above, however you're still able to compile a plug-in with at least VS2003(VC7) according to the configurations of the sample projects.

Code::Blocks

  1. Open samples\SAO Utils Plugin Demo.workspace with Code::Blocks.
  2. Switch into win64 build target.
  3. Build Plug-in Demo project.
  4. Copy samples\Release\Plug-in Demo\module64.dll to bin\win64\Plugins\Plug-in Demo.
  5. Run bin\win64\NERvSDK.exe to test the plug-in.

Keywords

NERvSDK use both namespaces and macros to classify APIs and simplify codes.

Namespaces

NERvSDK enclose all the functions, classes, structures, templates and types in the NERvGear namespace.

Classify the APIs

We use sub-namespaces to arrange these APIs according to their category. For example, the 'NERvGear::UI' namespace includes all the user interface related functions, types and some other things.

Enumerators

We also use namespaces to enclose some enumerators or types for the purpose of readable codes. For example, the NERvGear::DATA namespace defines TYPE enumerator inside it, then we could use NERvGear::DATA::TYPE type to declare variables or parameters.

Functions

We use NERv as a prefix for all the C-Style API functions, such as NERvGear::NERvCreateObject(), NERvGear::NERvSound(), etc. In fact, these functions are exported with version signature like NERvGear::NERv1Sound(), you should always use the no version signature one in your code to link against the latest APIs.

Macros

Macros in form NVG_* are reserved and also part of the NERvSDK APIs, such as NVG_TEXT(), NVG_VERSION(), etc.

The Plug-in Manager

Plug-in Manager

The NERvSDK also provide a plug-in manager witch allows you to run, debug or view the components service and usage of your plug-in.