buffer_key.cpp

Go to the documentation of this file.
00001 #ifndef BUFFER_KEY_IMPLEMENTATION_FILE
00002 #define BUFFER_KEY_IMPLEMENTATION_FILE
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : buffer_key                                                        *
00007 *  Author : Chris Koeritz                                                     *
00008 *                                                                             *
00009 *******************************************************************************
00010 * Copyright (c) 1992-$now By Author.  This program is free software; you can  *
00011 * redistribute it and/or modify it under the terms of the GNU General Public  *
00012 * License as published by the Free Software Foundation; either version 2 of   *
00013 * the License or (at your option) any later version.  This is online at:      *
00014 *     http://www.fsf.org/copyleft/gpl.html                                    *
00015 * Please send any updates to: fred@gruntose.com                               *
00016 \*****************************************************************************/
00017 
00018 #include "buffer_key.h"
00019 #include "implem_only.h"
00020 
00021 istring buffer_key::text_form() const
00022 {
00023   return istring(istring::SPRINTF, "buff_id=%d, conn_id=%d, msg_id=%d",
00024       buff_id.raw_id(), connection, msg_id);
00025 }
00026 
00027 bool buffer_key::identical(const buffer_key &to_compare) const
00028 {
00029   return (connection == to_compare.connection)
00030       && (msg_id == to_compare.msg_id)
00031       && (buff_id == to_compare.buff_id);
00032 }
00033 
00034 bool buffer_key::same_buffer_id(const buffer_key &to_compare) const
00035 { return buff_id == to_compare.buff_id; }
00036 
00037 bool buffer_key::same_connection(const buffer_key &to_compare) const
00038 { return connection == to_compare.connection; }
00039 
00040 bool buffer_key::same_connection_and_message(const buffer_key &to_compare) const
00041 {
00042   return (connection == to_compare.connection)
00043       && (msg_id == to_compare.msg_id);
00044 }
00045 
00046 
00047 #endif //BUFFER_KEY_IMPLEMENTATION_FILE
00048 

Generated on Fri Nov 28 04:28:52 2008 for HOOPLE Libraries by  doxygen 1.5.1