Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

IO_Cntl_Msg.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //==========================================================================
00004 /**
00005  *  @file    IO_Cntl_Msg.h
00006  *
00007  *  $Id: IO_Cntl_Msg.h,v 1.1.1.4 2003/02/21 18:36:32 chad Exp $
00008  *
00009  *  @author Doug Schmidt
00010  */
00011 //==========================================================================
00012 
00013 
00014 #ifndef ACE_IO_CNTL_MSG_H
00015 #define ACE_IO_CNTL_MSG_H
00016 
00017 #include "ace/pre.h"
00018 
00019 #include "ace/ACE_export.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 #include "ace/OS.h"
00026 
00027 /**
00028  * @class ACE_IO_Cntl_Msg
00029  *
00030  * @brief Data format for IOCTL messages
00031  */
00032 class ACE_Export ACE_IO_Cntl_Msg
00033 {
00034 public:
00035   enum
00036   {
00037     /// Set the low water mark.
00038     SET_LWM    = 1,
00039     /// Get the low water mark.
00040     GET_LWM    = 2,
00041     /// Set the high water mark.
00042     SET_HWM    = 3,
00043     /// Get the high water mark.
00044     GET_HWM    = 4,
00045     /// Link modules
00046     MOD_LINK   = 5,
00047     /// Unlink modules
00048     MOD_UNLINK = 6 
00049   };
00050 
00051   typedef u_short ACE_IO_Cntl_Cmds;
00052 
00053   // = Initialization method.
00054   /// Initialize the control message.
00055   ACE_IO_Cntl_Msg (ACE_IO_Cntl_Cmds c) { this->cmd_ = c; }
00056 
00057   // = Get/set methods
00058 
00059   /// Get command.
00060   ACE_IO_Cntl_Cmds cmd (void) { return this->cmd_; }
00061 
00062   /// Set command.
00063   void cmd (ACE_IO_Cntl_Cmds c) { this->cmd_ = c; }
00064 
00065   /// Get count.
00066   size_t count (void) { return this->count_; }
00067 
00068   /// Set count.
00069   void count (size_t c) { this->count_ = c; }
00070 
00071   /// Get error.
00072   int error (void) { return this->error_; }
00073 
00074   /// Set error.
00075   void error (int e) { this->error_ = e; }
00076 
00077   /// Get return value.
00078   int rval (void) { return this->rval_; }
00079 
00080   /// Set return value.
00081   void rval (int r) { this->rval_ = r; }
00082 
00083   /// Dump the state of an object.
00084   void dump (void) const;
00085 
00086   /// Declare the dynamic allocation hooks.
00087   ACE_ALLOC_HOOK_DECLARE;
00088 
00089 private:
00090   /// Command.
00091   ACE_IO_Cntl_Cmds cmd_;
00092 
00093   /// Count.
00094   size_t count_;
00095 
00096   /// Error.
00097   int error_;
00098 
00099   /// Return value
00100   int rval_;
00101 };
00102 
00103 #include "ace/post.h"
00104 
00105 #endif /* ACE_IO_CNTL_MSG_H */

Generated on Mon Jun 16 11:19:53 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002