igtlHeaderMessage.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Open IGT Link Library
00004   Module:    $RCSfile: $
00005   Language:  C++
00006   Date:      $Date: $
00007   Version:   $Revision: $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010 
00011   This software is distributed WITHOUT ANY WARRANTY; without even
00012   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00013   PURPOSE.  See the above copyright notices for more information.
00014 
00015 =========================================================================*/
00016 
00017 #ifndef __igtlHeaderMessage_h
00018 #define __igtlHeaderMessage_h
00019 
00020 #include "igtlWin32Header.h"
00021 #include "igtlObject.h"
00022 #include "igtlMath.h"
00023 #include "igtlMessageBase.h"
00024 #include "igtlTypes.h"
00025 
00026 namespace igtl
00027 {
00028 
00029 class IGTLCommon_EXPORT HeaderMessage: public MessageBase
00030 {
00031 public:
00032   enum {
00033     POSITION_ONLY =  1,
00034     WITH_QUATERNION3,
00035     WITH_QUATERNION,
00036     ALL,
00037   };
00038 
00039 
00040 public:
00041   typedef HeaderMessage                Self;
00042   typedef MessageBase                    Superclass;
00043   typedef SmartPointer<Self>             Pointer;
00044   typedef SmartPointer<const Self>       ConstPointer;
00045 
00046   igtlTypeMacro(igtl::HeaderMessage, igtl::MessageBase);
00047   igtlNewMacro(igtl::HeaderMessage);
00048 
00049 
00050 public:
00051 
00052   void         Init();
00053   virtual int  SetMessageHeader(const MessageHeader* mb);
00054   int          SetDeviceType(const char* name);
00055   
00056 protected:
00057   HeaderMessage();
00058   ~HeaderMessage();
00059   
00060 protected:
00061 
00062   virtual int  GetBodyPackSize();
00063   virtual int  PackBody();
00064   virtual int  UnpackBody();
00065 
00066 };
00067 
00068 
00069 } // namespace igtl
00070 
00071 #endif // _igtlPositionMessage_h
00072 
00073 
00074 

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1