ServiceDescriptor#

class ServiceDescriptor#

Public Types

using Ptr = std::unique_ptr<ServiceDescriptor>#

Public Functions

ServiceDescriptor(TypeId serviceTypeId, ServiceLifeTime lifetime, IServiceFactory::Ptr implementationFactory)#

Construct a new service descriptor object.

implementationFactory cannot be null, otherwise constructor will throw exception

Throws:

sb::di::NullPointerException

ServiceDescriptor(const ServiceDescriptor &other) = default#
ServiceDescriptor(ServiceDescriptor&&) = default#
ServiceDescriptor &operator=(const ServiceDescriptor &other) = default#
ServiceDescriptor &operator=(ServiceDescriptor &&other) = default#
const ServiceLifeTime &getLifeTime() const#

Get the lifetime object.

TypeId getServiceTypeId() const#

Get the service TypeId.

TypeId getImplementationTypeId() const#

Get the service implementation TypeId.

const IServiceFactory &getImplementationFactory() const#

Get the service implementation factory.

bool operator!=(const ServiceDescriptor &descriptor) const#
bool operator==(const ServiceDescriptor &descriptor) const#