Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
interface_info.h
1 
2 /***************************************************************************
3  * interface_info.h - BlackBoard Interface Info
4  *
5  * Created: Mon Mar 03 15:43:45 2008 (after topic switch)
6  * Copyright 2006-2008 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef __INTERFACE_INTERFACE_INFO_H_
25 #define __INTERFACE_INTERFACE_INFO_H_
26 
27 #include <list>
28 
29 namespace fawkes {
30 
32 {
33  public:
34  InterfaceInfo(const char *type, const char *id, const unsigned char *hash,
35  unsigned int serial, bool has_writer, unsigned int num_readers);
36  InterfaceInfo(const InterfaceInfo &i);
38 
39  const char * type() const;
40  const char * id() const;
41  const unsigned char * hash() const;
42  bool has_writer() const;
43  unsigned int num_readers() const;
44  unsigned int serial() const;
45 
46  bool operator<(const InterfaceInfo &ii) const;
47 
48  private:
49  char *__type;
50  char *__id;
51  unsigned char *__hash;
52  bool __has_writer;
53  unsigned int __num_readers;
54  unsigned int __serial;
55 };
56 
57 
58 class InterfaceInfoList : public std::list<InterfaceInfo>
59 {
60  public:
61  void append(const char *type, const char *id, const unsigned char *hash,
62  unsigned int serial, bool has_writer, unsigned int num_readers);
63 };
64 
65 } // end namespace fawkes
66 
67 #endif
const char * id() const
Get interface ID.
const char * type() const
Get interface type.
bool operator<(const InterfaceInfo &ii) const
&lt; operator This compares two interface infos with respect to the less than (&lt;) relation considering t...
bool has_writer() const
Check if there is a writer.
Interface information list.
unsigned int serial() const
Get interface instance serial.
~InterfaceInfo()
Destructor.
InterfaceInfo(const char *type, const char *id, const unsigned char *hash, unsigned int serial, bool has_writer, unsigned int num_readers)
Constructor.
void append(const char *type, const char *id, const unsigned char *hash, unsigned int serial, bool has_writer, unsigned int num_readers)
Append an interface info.
unsigned int num_readers() const
Get number of readers.
const unsigned char * hash() const
Get interface version hash.
Interface info.