Poco::JS::Core

class ModuleRegistry

File Information

Library: JS/Core
Package: Execution
Header: Poco/JS/Core/ModuleRegistry.h

Description

A registry of native JavaScript modules.

Inheritance

Direct Base Classes: Poco::RefCountedObject

All Base Classes: Poco::RefCountedObject

Member Summary

Member Functions: findModule, registerModule, unregisterModule

Inherited Functions: duplicate, referenceCount, release

Types Aliases

Ptr

using Ptr = Poco::AutoPtr < ModuleRegistry >;

Constructors

ModuleRegistry

ModuleRegistry();

Creates the ModuleRegistry.

Destructor

~ModuleRegistry virtual

~ModuleRegistry();

Destroys the ModuleRegistry.

Member Functions

findModule

Module::Ptr findModule(
    const std::string & name
) const;

Searches for a Module with the given name.

Returns a pointer to the Module if found, otherwise returns a null pointer.

registerModule

void registerModule(
    const std::string & name,
    Module::Ptr pModule
);

Registers the given Module under the given name.

Throws a Poco::ExistsException if another module with the same name has already been registered.

unregisterModule

void unregisterModule(
    const std::string & name
);

Unregisters the module with the given name.

Securely control IoT edge devices from anywhere   Connect a Device