nx_server_plugin_sdk 1.0 Server Plugin SDK

Public Member Functions | List of all members
nx::sdk::LibContext Class Referencefinal

`#include <lib_context.h>`

Inheritance diagram for nx::sdk::LibContext:

## Public Member Functions
virtual void | setName (const char *name) override
virtual void | setRefCountableRegistry (IRefCountableRegistry *refCountableRegistry) override
const std::string & | name () const
IRefCountableRegistry * | refCountableRegistry () const

## Detailed Description

Context which has a dedicated instance in each plugin dynamic library, and one more instance in the Server. Provides some services to a library which uses the SDK (a plugin or the Server), like detecting memory leaks of ref-countable objects, or keeping a name to be used for the logging prefix in the library.

## Member Function Documentation

## ◆ refCountableRegistry()

IRefCountableRegistry* nx::sdk::LibContext::refCountableRegistry | ( |  | ) | const
| inline

Returns
  Null if the registry has not been set.

## ◆ setName()

void nx::sdk::LibContext::setName | ( | const char * | name | ) |
| override virtual

For the LibContext of a plugin, called by the Server immediately after loading the plugin dynamic library. For the LibContext of the Server, called before any involving of the SDK.

Implements nx::sdk::ILibContext.

## ◆ setRefCountableRegistry()

void nx::sdk::LibContext::setRefCountableRegistry | ( | IRefCountableRegistry * | refCountableRegistry | ) |
| override virtual

Called by the Server after setName().

Parameters

  refCountableRegistry | Will be deleted in the LibContext destructor. Can be null if the leak detection is not enabled.

Implements nx::sdk::ILibContext.

The documentation for this class was generated from the following files:

- src/nx/sdk/helpers/lib_context.h
- src/nx/sdk/helpers/lib_context.cpp