+/* $Id: session.hpp,v 1.9 2005-10-25 11:48:30 adam Exp $
+ Copyright (c) 2005, Index Data.
+
+%LICENSE%
+ */
#ifndef SESSION_HPP
#define SESSION_HPP
/// copy session including old id
Session(const Session &s) : m_id(s.m_id), m_close(s.m_close) {};
- Session& operator=(const Session &s) {
+ Session& operator=(const Session &s) {
if (this != &s)
{
m_id = s.m_id;
}
return *this;
}
+
+ bool operator<(const Session &s) const {
+ return m_id < s.m_id ? true : false;
+ }
unsigned long id() const {
return m_id;
void close() {
m_close = true;
};
-
+
+ bool operator == (Session &ses) const {
+ return ses.m_id == m_id;
+ }
private:
unsigned long int m_id;
* Local variables:
* c-basic-offset: 4
* indent-tabs-mode: nil
+ * c-file-style: "stroustrup"
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
*/