Poco::OSP

class ServiceFactory

File Information

Library: OSP
Package: Service
Header: Poco/OSP/ServiceFactory.h

Description

A ServiceFactory is a special Service that, as its name implies, acts as a factory for Service objects.

If a subclass of ServiceFactory is registered as a service, the factory will be used to create a new instance of the service whenever the service is requested from the ServiceRegistry.

Inheritance

Direct Base Classes: Service

All Base Classes: Service, Poco::RefCountedObject

Member Summary

Member Functions: createService, isA, type

Inherited Functions: duplicate, isA, referenceCount, release, type

Constructors

ServiceFactory protected

ServiceFactory();

Creates the ServiceFactory.

Destructor

~ServiceFactory protected virtual

~ServiceFactory();

Destroys the ServiceFactory.

Member Functions

createService virtual

virtual Service::Ptr createService() = 0;

Creates and returns a new instance of a Service.

isA virtual

bool isA(
    const std::type_info & otherType
) const;

type virtual

const std::type_info & type() const;