Reference

ACE_Service_Type_Impl(3)

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.

NAME

ACE_Service_Type_Impl - 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.

SYNOPSIS

#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_;
};

DESCRIPTION

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.

AUTHOR

Doug Schmidt

LIBRARY

ace