sipxmedialib  Version 3.3
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
MpResourceConstructor Class Referenceabstract

MpResourceConstructor is used to construct a spcific resource type. More...

#include <MpResourceConstructor.h>

Inheritance diagram for MpResourceConstructor:
Inheritance graph
[legend]
Collaboration diagram for MpResourceConstructor:
Collaboration graph
[legend]

Public Member Functions

 MpResourceConstructor (const UtlString &resourceType, int minInputs=1, int maxInputs=1, int minOutputs=1, int maxOutputs=1)
 
virtual ~MpResourceConstructor ()
 
virtual OsStatus newResource (const UtlString &resourceName, int maxResourcesToCreate, int &numResourcesCreated, MpResource *resourcesCreated[])=0
 Create new resource(s) More...
 

Protected Attributes

int mMinInputs
 
int mMaxInputs
 
int mMinOutputs
 
int mMaxOutputs
 

Private Member Functions

 MpResourceConstructor ()
 Disable default constructor. More...
 
 MpResourceConstructor (const MpResourceConstructor &rMpResourceConstructor)
 
MpResourceConstructoroperator= (const MpResourceConstructor &rhs)
 

Detailed Description

MpResourceConstructor is used to construct a spcific resource type.

MpResourceConstructors is an abstract class. Derived types construct a specific type of MpResource.

Constructor & Destructor Documentation

MpResourceConstructor ( const UtlString &  resourceType,
int  minInputs = 1,
int  maxInputs = 1,
int  minOutputs = 1,
int  maxOutputs = 1 
)
inline

Constructor

virtual ~MpResourceConstructor ( )
inlinevirtual

Destructor

MpResourceConstructor ( )
private

Disable default constructor.

MpResourceConstructor ( const MpResourceConstructor rMpResourceConstructor)
private

Disabled copy constructor

Member Function Documentation

virtual OsStatus newResource ( const UtlString &  resourceName,
int  maxResourcesToCreate,
int &  numResourcesCreated,
MpResource resourcesCreated[] 
)
pure virtual

Create new resource(s)

Creates one or more resources as defined by the implementation of the resource constructor (typically of different resource types as opposed to duplicates). Some resources are created in sets as they work together in some way. This interface allows the constructor to create multiple resources and assocate or initialize them together.

Parameters
[in]resourceName- name to give the new resource, must be unique to the target flowgraph that this resource is to be inserted.
[in]maxResourcesToCreate- the size of the resourcesCreated passed in
[out]numResourcesCreated- the actual number of resource created and contained in the resourcesCreated array
[out]resourcesCreated- array containing the created resources.

Implemented in MprSpeakerSelectorConstructor, MpAudioResourceConstructor, MprToOutputDeviceWithAecConstructor, MprBridgeConstructor, MprFromInputDeviceConstructor, MprRtpInputConnectionConstructor, MprSplitterConstructor, MprToOutputDeviceConstructor, MprNullAecConstructor, MprRtpOutputConnectionConstructor, MprSpeexPreProcessConstructor, MprToneGenConstructor, MprNullConstructor, MprDecodeConstructor, MprHookConstructor, MprDelayConstructor, MprEncodeConstructor, MprFromFileConstructor, MprVadConstructor, MprVoiceActivityNotifierConstructor, MprToneDetectConstructor, MprNotchFilterConstructor, and MprRecorderConstructor.

MpResourceConstructor& operator= ( const MpResourceConstructor rhs)
private

Disable assignment operator

Member Data Documentation

int mMinInputs
protected
int mMaxInputs
protected
int mMinOutputs
protected
int mMaxOutputs
protected