// **********************************************************************
//
// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.4.2
//
// <auto-generated>
//
// Generated from file `Current.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//

#ifndef __Ice_Current_h__
#define __Ice_Current_h__

#include <Ice/LocalObjectF.h>
#include <Ice/ProxyF.h>
#include <Ice/ObjectF.h>
#include <Ice/Exception.h>
#include <Ice/LocalObject.h>
#include <IceUtil/ScopedArray.h>
#include <Ice/ObjectAdapterF.h>
#include <Ice/ConnectionF.h>
#include <Ice/Identity.h>
#include <Ice/UndefSysMacros.h>

#ifndef ICE_IGNORE_VERSION
#   if ICE_INT_VERSION / 100 != 304
#       error Ice version mismatch!
#   endif
#   if ICE_INT_VERSION % 100 > 50
#       error Beta header file detected
#   endif
#   if ICE_INT_VERSION % 100 < 2
#       error Ice patch level mismatch!
#   endif
#endif

#ifndef ICE_API
#   ifdef ICE_API_EXPORTS
#       define ICE_API ICE_DECLSPEC_EXPORT
#   else
#       define ICE_API ICE_DECLSPEC_IMPORT
#   endif
#endif

namespace IceInternal
{

}

namespace Ice
{

typedef ::std::map< ::std::string, ::std::string> Context;
ICE_API void __writeContext(::IceInternal::BasicStream*, const Context&);
ICE_API void __readContext(::IceInternal::BasicStream*, Context&);

enum OperationMode
{
    Normal,
    Nonmutating,
    Idempotent
};

ICE_API void __write(::IceInternal::BasicStream*, OperationMode);
ICE_API void __read(::IceInternal::BasicStream*, OperationMode&);

struct Current
{
    ::Ice::ObjectAdapterPtr adapter;
    ::Ice::ConnectionPtr con;
    ::Ice::Identity id;
    ::std::string facet;
    ::std::string operation;
    ::Ice::OperationMode mode;
    ::Ice::Context ctx;
    ::Ice::Int requestId;

    bool operator==(const Current& __rhs) const
    {
        if(this == &__rhs)
        {
            return true;
        }
        if(adapter != __rhs.adapter)
        {
            return false;
        }
        if(con != __rhs.con)
        {
            return false;
        }
        if(id != __rhs.id)
        {
            return false;
        }
        if(facet != __rhs.facet)
        {
            return false;
        }
        if(operation != __rhs.operation)
        {
            return false;
        }
        if(mode != __rhs.mode)
        {
            return false;
        }
        if(ctx != __rhs.ctx)
        {
            return false;
        }
        if(requestId != __rhs.requestId)
        {
            return false;
        }
        return true;
    }

    bool operator<(const Current& __rhs) const
    {
        if(this == &__rhs)
        {
            return false;
        }
        if(adapter < __rhs.adapter)
        {
            return true;
        }
        else if(__rhs.adapter < adapter)
        {
            return false;
        }
        if(con < __rhs.con)
        {
            return true;
        }
        else if(__rhs.con < con)
        {
            return false;
        }
        if(id < __rhs.id)
        {
            return true;
        }
        else if(__rhs.id < id)
        {
            return false;
        }
        if(facet < __rhs.facet)
        {
            return true;
        }
        else if(__rhs.facet < facet)
        {
            return false;
        }
        if(operation < __rhs.operation)
        {
            return true;
        }
        else if(__rhs.operation < operation)
        {
            return false;
        }
        if(mode < __rhs.mode)
        {
            return true;
        }
        else if(__rhs.mode < mode)
        {
            return false;
        }
        if(ctx < __rhs.ctx)
        {
            return true;
        }
        else if(__rhs.ctx < ctx)
        {
            return false;
        }
        if(requestId < __rhs.requestId)
        {
            return true;
        }
        else if(__rhs.requestId < requestId)
        {
            return false;
        }
        return false;
    }

    bool operator!=(const Current& __rhs) const
    {
        return !operator==(__rhs);
    }
    bool operator<=(const Current& __rhs) const
    {
        return operator<(__rhs) || operator==(__rhs);
    }
    bool operator>(const Current& __rhs) const
    {
        return !operator<(__rhs) && !operator==(__rhs);
    }
    bool operator>=(const Current& __rhs) const
    {
        return !operator<(__rhs);
    }
};

}

#endif
