interface_info.h

00001 
00002 /***************************************************************************
00003  *  interface_info.h - BlackBoard Interface Info
00004  *
00005  *  Created: Mon Mar 03 15:43:45 2008 (after topic switch)
00006  *  Copyright  2006-2008  Tim Niemueller [www.niemueller.de]
00007  *
00008  ****************************************************************************/
00009 
00010 /*  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version. A runtime exception applies to
00014  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00015  *
00016  *  This program is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU Library General Public License for more details.
00020  *
00021  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00022  */
00023 
00024 #ifndef __INTERFACE_INTERFACE_INFO_H_
00025 #define __INTERFACE_INTERFACE_INFO_H_
00026 
00027 #include <list>
00028 
00029 namespace fawkes {
00030 
00031 class InterfaceInfo
00032 {
00033  public:
00034   InterfaceInfo(const char *type, const char *id, const unsigned char *hash,
00035                 unsigned int serial, bool has_writer, unsigned int num_readers);
00036   InterfaceInfo(const InterfaceInfo &i);
00037   ~InterfaceInfo();
00038 
00039   const char *           type() const;
00040   const char *           id() const;
00041   const unsigned char *  hash() const;
00042   bool                   has_writer() const;
00043   unsigned int           num_readers() const;
00044   unsigned int           serial() const;
00045 
00046   bool operator<(const InterfaceInfo &ii) const;
00047 
00048  private:
00049   char          *__type;
00050   char          *__id;
00051   unsigned char *__hash;
00052   bool           __has_writer;
00053   unsigned int   __num_readers;
00054   unsigned int   __serial;
00055 };
00056 
00057 
00058 class InterfaceInfoList : public std::list<InterfaceInfo>
00059 {
00060  public:
00061   void append(const char *type, const char *id, const unsigned char *hash,
00062               unsigned int serial, bool has_writer, unsigned int num_readers);
00063 };
00064 
00065 } // end namespace fawkes
00066 
00067 #endif

Generated on Tue Feb 22 13:31:26 2011 for Fawkes API by  doxygen 1.4.7