FX::FXIPCMsg Struct Reference
[Inter Process Communication & Data Transport]

#include <FXIPC.h>

Inheritance diagram for FX::FXIPCMsg:

FX::FXIPCMsg_Disconnect FX::FXIPCMsg_ErrorOccurred FX::FXIPCMsg_Unhandled FX::FXIPCMsgHolder FX::TnFXSQLDBIPCMsgsI::BindParameter FX::TnFXSQLDBIPCMsgsI::BindParameterAck FX::TnFXSQLDBIPCMsgsI::Close FX::TnFXSQLDBIPCMsgsI::CloseAck FX::TnFXSQLDBIPCMsgsI::CloseCursor FX::TnFXSQLDBIPCMsgsI::CopyCursor FX::TnFXSQLDBIPCMsgsI::CopyCursorAck FX::TnFXSQLDBIPCMsgsI::Execute FX::TnFXSQLDBIPCMsgsI::ExecuteAck FX::TnFXSQLDBIPCMsgsI::Open FX::TnFXSQLDBIPCMsgsI::OpenAck FX::TnFXSQLDBIPCMsgsI::PrepareStatement FX::TnFXSQLDBIPCMsgsI::PrepareStatementAck FX::TnFXSQLDBIPCMsgsI::RequestColHeaders FX::TnFXSQLDBIPCMsgsI::RequestColHeadersAck FX::TnFXSQLDBIPCMsgsI::RequestColTypes FX::TnFXSQLDBIPCMsgsI::RequestColTypesAck FX::TnFXSQLDBIPCMsgsI::RequestKey FX::TnFXSQLDBIPCMsgsI::RequestKeyAck FX::TnFXSQLDBIPCMsgsI::RequestRows FX::TnFXSQLDBIPCMsgsI::RequestRowsAck FX::TnFXSQLDBIPCMsgsI::UnprepareStatement List of all members.

Detailed Description

A base IPC message.

Some fields are marked optional - this means they are set externally to FXIPCMsg eg; by FX::FXIPCChannel which sets them all. You must define

void   endianise(FXStream &s) const;
void deendianise(FXStream &s);
... in your subclasses of FXIPCMsg, the first serialising your message's contents to stream s and the latter unserialising them. They aren't virtual because (a) to avoid virtual table overheads (b) endianise() is per-derived-type and so using a templated type extractor we can pass the endianise() method then and (c) per-derived-type deendianise() is registered with FX::FXIPCMsgRegistry. Therefore there is no useful reason to make them virtual.

All FXIPCMsg subclasses must provide a default constructor or else the chunk register code won't compile.

You can use this structure yourself - or more likely let FX::FXIPCChannel do it all for you. There is an optional routing field which isn't used unless you set it to something.

Definition at line 184 of file FXIPC.h.

Public Types

 FlagsWantAck
 FlagsGZipped
 FlagsHasRouting
 FlagsIsBigEndian
enum  Flags { FlagsWantAck, FlagsGZipped, FlagsHasRouting, FlagsIsBigEndian }

Public Member Functions

bool operator== (const FXIPCMsg &o) const throw ()
bool operator!= (const FXIPCMsg &o) const throw ()
int headerLength () const throw ()
FXuint length () const throw ()
FXuint msgType () const throw ()
bool hasAck () const throw ()
FXuint msgId () const throw ()
void setMsgId (FXuint id) throw ()
bool wantsAck () const throw ()
bool gzipped () const throw ()
void setGZipped (bool v) throw ()
bool hasRouting () const throw ()
FXuint routing () const throw ()
void setRouting (FXuint no) throw ()
bool inBigEndian () const throw ()
FXucharoriginalData () const throw ()
void write (FXStream &s) const
void read (FXStream &s)

Static Public Attributes

static const FXuint minHeaderLength
static const FXuint maxHeaderLength

Protected Member Functions

 FXIPCMsg (FXuint _type, FXuchar _msgrev=0)
 FXIPCMsg (FXuint _type, FXuint _id, FXuchar _msgrev=0)
 FXIPCMsg (const FXIPCMsg &o, FXuint _type=0)
 ~FXIPCMsg ()

Friends

class FXIPCChannel
class FXIPCChannelIndirector


The documentation for this struct was generated from the following file:
(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:34:32 2009 for TnFOX by doxygen v1.4.7