ACE_Service_Type_Impl(3)

ACE_Service_Type_Impl3

The abstract base class of the hierarchy that defines the contents of the ace_service_repository. the subclasses of this class allow the configuration of ace_service_objects, ace_modules, and ace_streams.

Usage

#include <ace/Service_Types.h>
class ACE_Service_Type_Impl
{
  public:
    ACE_Service_Type_Impl (
        void *object,
        const ASYS_TCHAR *s_name,
        u_int flags = 0,
        ACE_Service_Object_Exterminator gobbler = 0
        );
    virtual ~ACE_Service_Type_Impl (void);
    virtual int suspend (void) const = 0;
    virtual int resume (void) const = 0;
    virtual int init (int argc, ASYS_TCHAR *argv[]) const = 0;
    virtual int fini (void) const;
    virtual int info (ASYS_TCHAR **str, size_t len) const = 0;
    void *object (void) const;
    const ASYS_TCHAR *name (void) const;
    void name (const ASYS_TCHAR *);
    void dump (void) const;
    ACE_ALLOC_HOOK_DECLARE;
  protected:
    const ASYS_TCHAR *name_;
    void *obj_;
    ACE_Service_Object_Exterminator gobbler_;
    u_int flags_;
};

Overview

This class provides the root of the implementation hierarchy of the "Bridge" pattern. It maintains a pointer to the appropriate type of service implementation, i.e., ACE_Service_Object, ACE_Module, or ACE_Stream.

Initialization and termination methods.

ACE_Service_Type_Impl (
    void *object,
    const ASYS_TCHAR *s_name,
    u_int flags = 0,
    ACE_Service_Object_Exterminator gobbler = 0
    );
virtual ~ACE_Service_Type_Impl (void);

Pure virtual interface (must be defined by the subclass).

virtual int suspend (void) const = 0;
virtual int resume (void) const = 0;
virtual int init (int argc, ASYS_TCHAR *argv[]) const = 0;
virtual int fini (void) const;
virtual int info (ASYS_TCHAR **str, size_t len) const = 0;
void *object (void) const;

The pointer to the service.

const ASYS_TCHAR *name (void) const;

Get the name of the service.

void name (const ASYS_TCHAR *);

Set the name of the service.

void dump (void) const;

Dump the state of an object.

ACE_ALLOC_HOOK_DECLARE;

Declare the dynamic allocation hooks.

Library

ace

Author

Doug Schmidt

From libace-doc 5.0.7-4 in Debian 2.2 (Potato). Parsed by carta from the page's man source.