NAME

ACE_Module - An abstraction for managing a bi-directional flow of messages.

SYNOPSIS


#include <ace/Module.h>


template<ACE_SYNCH_1>
class ACE_Module
{
  public:
    friend class ACE_Shutup_GPlusPlus; // Turn off g++ warning;
    enum{ M_DELETE = 1 };
    ACE_Module (void);
    ACE_Module (
        char *module_name,
        ACE_Task<ACE_SYNCH_2> *writer = 0,
        ACE_Task<ACE_SYNCH_2> *reader = 0,
        void *a = 0
        );
    int open (
        char *module_name,
        ACE_Task<ACE_SYNCH_2> *writer = 0,
        ACE_Task<ACE_SYNCH_2> *reader = 0,
        void *a = 0
        );
    int close (u_long flags = M_DELETE);
    ACE_Task<ACE_SYNCH_2> *writer (void);
    void writer (ACE_Task<ACE_SYNCH_2> *q);
    ACE_Task<ACE_SYNCH_2> *reader (void);
    void reader (ACE_Task<ACE_SYNCH_2> *q);
    ACE_Task<ACE_SYNCH_2> *sibling (ACE_Task<ACE_SYNCH_2> *orig);
    const char *name (void) const;
    void name (char *);
    void *arg (void) const;
    void arg (void *);
    void link (ACE_Module<ACE_SYNCH_2> *m);
    ACE_Module<ACE_SYNCH_2> *next (void);
    void next (ACE_Module<ACE_SYNCH_2> *m);
    void dump (void) const;
    ACE_ALLOC_HOOK_DECLARE;
  private:
    ~ACE_Module (void);
    ACE_Task<ACE_SYNCH_2> *q_pair_[2];
    char name_[MAXNAMLEN + 1];
    ACE_Module<ACE_SYNCH_2> *next_;
    void *arg_;
};

DESCRIPTION

This is based on the Module concept in System V Streams, which contains a pair of Tasks, one for handling upstream processing, one for handling downstream processing.

Initialization and termination methods.

ACE_Module (void);
ACE_Module (
    char *module_name,
    ACE_Task<ACE_SYNCH_2> *writer = 0,
    ACE_Task<ACE_SYNCH_2> *reader = 0,
    void *a = 0
    );
int open (
    char *module_name,
    ACE_Task<ACE_SYNCH_2> *writer = 0,
    ACE_Task<ACE_SYNCH_2> *reader = 0,
    void *a = 0
    );
int close (u_long flags = M_DELETE);

ACE_Task manipulation routines

ACE_Task<ACE_SYNCH_2> *writer (void);
void writer (ACE_Task<ACE_SYNCH_2> *q);
ACE_Task<ACE_SYNCH_2> *reader (void);
void reader (ACE_Task<ACE_SYNCH_2> *q);
ACE_Task<ACE_SYNCH_2> *sibling (ACE_Task<ACE_SYNCH_2> *orig);

Identify the module

const char *name (void) const;
void name (char *);

Argument to the Tasks.

void *arg (void) const;
void arg (void *);
void link (ACE_Module<ACE_SYNCH_2> *m);
ACE_Module<ACE_SYNCH_2> *next (void);
void next (ACE_Module<ACE_SYNCH_2> *m);
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;

AUTHOR

Doug Schmidt

LIBRARY

ace