Reference

ACE_DLL_Strategy(3)

Defines the interface for specifying a creation strategy for a SVC_HANDLER based on dynamic linking of the SVC_HANDLER.

NAME

ACE_DLL_Strategy - Defines the interface for specifying a creation strategy for a SVC_HANDLER based on dynamic linking of the SVC_HANDLER.

SYNOPSIS

#include <ace/ACE_Strategies_T.h>
template<class SVC_HANDLER>
class ACE_DLL_Strategy : public ACE_Creation_Strategy<SVC_HANDLER>
{
  public:
    ACE_DLL_Strategy (void);
    ACE_DLL_Strategy (
        const char dll_name[],
        const char factory_function[],
        const char svc_name[],
        ACE_Service_Repository *,
        ACE_Thread_Manager * = 0
        );
    int open (
        const char dll_name[],
        const char factory_function[],
        const char svc_name[],
        ACE_Service_Repository *,
        ACE_Thread_Manager * = 0
        );
    virtual int make_svc_handler (SVC_HANDLER *&);
    void dump (void) const;
    ACE_ALLOC_HOOK_DECLARE;
  protected:
    typedef ACE_Creation_Strategy<SVC_HANDLER> inherited;
    char dll_name_[MAXPATHLEN + 1];
    char factory_function_[MAXPATHLEN + 1];
    char svc_name_[MAXNAMELEN + 1];
    ACE_Service_Repository *svc_rep_;
};

Intialization and termination methods.

ACE_DLL_Strategy (void);

"Do-nothing" constructor.

ACE_DLL_Strategy (
    const char dll_name[],
    const char factory_function[],
    const char svc_name[],
    ACE_Service_Repository *,
    ACE_Thread_Manager * = 0
    );

Initialize the DLL strategy based upon the service's DLL information contained in the svc_dll_info string.

int open (
    const char dll_name[],
    const char factory_function[],
    const char svc_name[],
    ACE_Service_Repository *,
    ACE_Thread_Manager * = 0
    );

Initialize the DLL strategy based upon the service's DLL information contained in the svc_dll_info string.

Factory method.

virtual int make_svc_handler (SVC_HANDLER *&);

Create a SVC_HANDLER by dynamically linking it from a DLL. Returns -1 on failure, else 0.

void dump (void) const;

Dump the state of an object.

ACE_ALLOC_HOOK_DECLARE;

Declare the dynamic allocation hooks.

AUTHOR

Doug Schmidt

LIBRARY

ace