Common SDK Classes


CPluginFactory

Inheritance: FUnknown <- IPluginFactory <- CPluginFactory
Include File:  pluginfactory.h

CPluginFactory is a simple Plug-In factory implementation.

Methods:


CPluginFactory::registerClass

bool registerClass (
	PClassInfo* info,
	FUnknown* (*createFunc)(void*),
	void* context = 0)

Registers a Plug-In class, returns true for success.

Parameters:

info Class information (name, Unique Identifier,...)
createFunc C-style function, which can create an instance of this class
context Variable passed on to the create function.


CPlugParams

Inheritance: none
Include File:  plugparams.h

CPlugParams is a helper class which maintains a set of parameters e.g. when implementing a controller object.

Constructors:

Methods:


Constructors

If you pass on a controller to the constructor, all parameters added will be automatically connected.


Adding parameters

CParameter* add (CParameter* p, long tag, const char* name)
CParameter* addParam (long tag, const char* name)
CIntParameter* addIntParam (long tag, const char* name, long min = 0, long max = 1)
CStringParameter* addStringParam (long tag, const char* name)
CStringListParameter* addListParam (long tag, const char* name, const char** strings = 0)

add Add a parameter object, created "outside"
addParam Adds an On/Off parameter
addIntParam Adds an integer parameter
addStringParam Adds a string parameter
addListParam Adds a list parameter

Remarks:

The container does not addRef the parameters on adding. They are released in the destructor.


Get parameters

long total const ();
CParameter* at (long index) const;
bool getName (long index, char str[128]) const;
CParameter* getParameter (const char* name) const;
CParameter* getParameter (long tag) const;

total Returns the number of parameters
at Gets parameter by index
getName Copies the name of the parameter at the specified index
getParameter (const char*) Gets parameter by name
getParameter (long) Gets parameter by tag

Remarks:

The index depends on the order in which you added the parameter objects. It may be different from the parameter tag!


CParameter

Inheritance: CParameter <- IParameter
Include File:  plugparams.h

The SDK provides basic parameter classes, which should meet most of your requirements:

CParameter two-state (On/Off) parameter base class
CIntParameter integer parameter
CStringParameter string parameter
CStringListParameter string list parameter

Additional Methods:

enableUpdates enable/disable parameter updates
initValue
initString
set parameter value, without updating the target. This avoids recursion when modifying a parameter value inside a parameterChanged call.
setNormalized
getNormalized
set or get the parameter as normalized floating point value (range from 0.0 to 1.0)



Copyright ©2004 Steinberg Media Technologies GmbH. All Rights Reserved.
Last Modified: