// **********************************************************************
//
// Generated by the ORBacus IDL-to-C++ Translator
//
// Copyright (c) 1998
// Object-Oriented Concepts, Inc.
// Billerica, MA, USA
//
// Copyright (c) 1998
// Object-Oriented Concepts GmbH
// Ettlingen, Germany
//
// All Rights Reserved
//
// **********************************************************************

// Version: 3.0
// License: non-commercial

#ifndef __PolicyManager_h__
#define __PolicyManager_h__

#include <OB/Policy.h>
#include <OB/Current.h>

//
// IDL:omg.org/CORBA:1.0
//

//
// IDL:omg.org/CORBA/Policy:1.0
//
class CORBA_Policy;
typedef CORBA_Policy* CORBA_Policy_ptr;
typedef CORBA_Policy* CORBA_PolicyRef;
void OBDuplicate(CORBA_Policy_ptr);
void OBRelease(CORBA_Policy_ptr);
typedef OBObjVar< CORBA_Policy > CORBA_Policy_var;

//
// IDL:omg.org/CORBA/Current:1.0
//
class CORBA_Current;
typedef CORBA_Current* CORBA_Current_ptr;
typedef CORBA_Current* CORBA_CurrentRef;
void OBDuplicate(CORBA_Current_ptr);
void OBRelease(CORBA_Current_ptr);
typedef OBObjVar< CORBA_Current > CORBA_Current_var;

//
// IDL:omg.org/CORBA/PolicyManager:1.0
//
class CORBA_PolicyManager;
typedef CORBA_PolicyManager* CORBA_PolicyManager_ptr;
typedef CORBA_PolicyManager* CORBA_PolicyManagerRef;
void OBDuplicate(CORBA_PolicyManager_ptr);
void OBRelease(CORBA_PolicyManager_ptr);
typedef OBObjVar< CORBA_PolicyManager > CORBA_PolicyManager_var;

//
// IDL:omg.org/CORBA/PolicyErrorCode:1.0
//
typedef CORBA_Short CORBA_PolicyErrorCode;

//
// IDL:omg.org/CORBA/BAD_POLICY:1.0
//
OB_IMPORT extern const CORBA_PolicyErrorCode CORBA_BAD_POLICY;

//
// IDL:omg.org/CORBA/UNSUPPORTED_POLICY:1.0
//
OB_IMPORT extern const CORBA_PolicyErrorCode CORBA_UNSUPPORTED_POLICY;

//
// IDL:omg.org/CORBA/BAD_TYPE:1.0
//
OB_IMPORT extern const CORBA_PolicyErrorCode CORBA_BAD_TYPE;

//
// IDL:omg.org/CORBA/BAD_VALUE:1.0
//
OB_IMPORT extern const CORBA_PolicyErrorCode CORBA_BAD_VALUE;

//
// IDL:omg.org/CORBA/UNSUPPORTED_VALUE:1.0
//
OB_IMPORT extern const CORBA_PolicyErrorCode CORBA_UNSUPPORTED_VALUE;

//
// IDL:omg.org/CORBA/PolicyError:1.0
//
struct CORBA_PolicyError : public CORBA_UserException
{
#ifdef OB_CLEAR_MEM
    CORBA_PolicyError();
#else
    CORBA_PolicyError() { }
#endif
    CORBA_PolicyError(const CORBA_PolicyError&);
    CORBA_PolicyError(CORBA_PolicyErrorCode);
    virtual ~CORBA_PolicyError() { }
    CORBA_PolicyError& operator=(const CORBA_PolicyError&);

    static CORBA_PolicyError* _narrow(CORBA_Exception*);
#ifdef HAVE_NO_RTTI
    virtual void* _OB_narrowHelp(const char*) const;
#endif
    virtual const char* _OB_typeId() const;
    virtual CORBA_Exception* _OB_clone() const;

    CORBA_PolicyErrorCode reason;
};

//
// IDL:omg.org/CORBA/PolicyManager:1.0
//
class CORBA_PolicyManager : virtual public CORBA_Object
{
    CORBA_PolicyManager(const CORBA_PolicyManager&);
    void operator=(const CORBA_PolicyManager&);

public:

    CORBA_PolicyManager() { }

    static inline CORBA_PolicyManager_ptr
    _duplicate(CORBA_PolicyManager_ptr p)
    {
        if(p)
            p -> _OB_incRef();
        return p;
    }

    static inline CORBA_PolicyManager_ptr
    _nil()
    {
        return 0;
    }

    static CORBA_PolicyManager_ptr _narrow(CORBA_Object_ptr);
    virtual void* _OB_narrowHelp(const char*) const;
    virtual const char* _OB_typeId() const;

    //
    // IDL:omg.org/CORBA/PolicyManager/InvalidPolicies:1.0
    //
    struct InvalidPolicies : public CORBA_UserException
    {
        InvalidPolicies() { }
        InvalidPolicies(const InvalidPolicies&);
        InvalidPolicies(const OBFixSeq< CORBA_UShort >&);
        virtual ~InvalidPolicies() { }
        InvalidPolicies& operator=(const InvalidPolicies&);

        static InvalidPolicies* _narrow(CORBA_Exception*);
#ifdef HAVE_NO_RTTI
        virtual void* _OB_narrowHelp(const char*) const;
#endif
        virtual const char* _OB_typeId() const;
        virtual CORBA_Exception* _OB_clone() const;

        OBFixSeq< CORBA_UShort > indices;
    };

    //
    // IDL:omg.org/CORBA/PolicyManager/get_policy_override:1.0
    //
    virtual CORBA_Policy_ptr get_policy_override(CORBA_PolicyType t) = 0;

    //
    // IDL:omg.org/CORBA/PolicyManager/get_specific_policy_overrides:1.0
    //
    virtual CORBA_PolicyList* get_specific_policy_overrides(const CORBA_PolicyTypeSeq& ts) = 0;

    //
    // IDL:omg.org/CORBA/PolicyManager/get_all_policy_overrides:1.0
    //
    virtual CORBA_PolicyList* get_all_policy_overrides() = 0;

    //
    // IDL:omg.org/CORBA/PolicyManager/add_policy_overrides:1.0
    //
    virtual void add_policy_overrides(const CORBA_PolicyList& policies) = 0;

    //
    // IDL:omg.org/CORBA/PolicyManager/remove_policy_overrides:1.0
    //
    virtual void remove_policy_overrides(const CORBA_PolicyTypeSeq& ts) = 0;

    //
    // IDL:omg.org/CORBA/PolicyManager/replace_all_policy_overrides:1.0
    //
    virtual void replace_all_policy_overrides(const CORBA_PolicyList& policies) = 0;
};

//
// IDL:omg.org/CORBA/PolicyError:1.0
//

//
// IDL:omg.org/CORBA/PolicyManager:1.0
//
inline void
CORBA_release(CORBA_PolicyManager_ptr p)
{
    if(p)
        p -> _OB_decRef();
}

inline CORBA_Boolean
CORBA_is_nil(CORBA_PolicyManager_ptr p)
{
    return p == 0;
}

//
// IDL:omg.org/CORBA/PolicyManager/InvalidPolicies:1.0
//

//
// OBObjSeq< CORBA_Policy >
//
#ifndef OB_use_OBObjSeq_CORBA__Policy
#define OB_use_OBObjSeq_CORBA__Policy
#define OB_use_OBObjSeq_CORBA__Policy_from_PolicyManager_h

#endif

#endif
