/*==============================================================================
                Copyright (c) 2003-2005 UGS Corporation
                   Unpublished - All Rights Reserved
 ==============================================================================*/

/**
    @file

    This header file defines the error codes used by the CXPOM module.
    Most of these error codes are for programming errors.
    This interface acts like a relay.
    For each CXX object there should be one and only one attached POM instance.
    Therefore, errors are returned when the relay is asked to do something,
    and the POM instance is not yet attached.
*/

/*  */

#ifndef CXPOM_ERRORS_H
#define CXPOM_ERRORS_H

#include <common/emh_const.h>
#include <cxpom/libcxpom_exports.h>

/**
    @defgroup CXPOM_ERRORS CXPOM Errors
    @{
*/

#define CXPOM_error_base                EMH_CXPOM_error_base

#define CXPOM_attr_already_defined      (CXPOM_error_base + 1)
#define CXPOM_no_memory                 (CXPOM_error_base + 2)

/**
    This is a programming error tht is returned when you try to attach a
    CXX object to another POM object without duly disassociating yourself
    with the first. For instance doing a create twice on Enquiry will return
    this error.
*/
#define CXPOM_already_done              (CXPOM_error_base + 3)

/** Programming error: no POM instance to send message to. */
#define CXPOM_unattached_object         (CXPOM_error_base + 4)

/**
    The operation (e.g. set test value on a derived enquiry) is not
    allowed. Values may only be set for enquiry objects that were created,
    not derived by operators such as ! or | or &
*/
#define CXPOM_invalid_operation         (CXPOM_error_base + 5)

#define CXPOM_value_not_in_list         (CXPOM_error_base + 6)

#define CXPOM_invalid_tag               (CXPOM_error_base + 7)

/** The class id was not one that has been defined */
#define CXPOM_invalid_class_id          (CXPOM_error_base + 8)

/**
    This error is generated by workspacesearcher if no criteria information
    is given and the execute member function is invoked. Possible user is
    find dialog. That actually does not do anything.
*/
#define CXPOM_no_search_criteria        (CXPOM_error_base + 9)

/**
    Error generated by TMObject when it recognizes a call to
    find the POMObject* address for a deleted tag
*/
#define CXPOM_object_deleted            (CXPOM_error_base + 10)

#define CXPOM_invalid_class_name        (CXPOM_error_base + 11)
#define CXPOM_invalid_attribute_name    (CXPOM_error_base + 12)
#define CXPOM_invalid_attribute         (CXPOM_error_base + 13)
#define CXPOM_no_export_class           (CXPOM_error_base + 14)
#define CXPOM_no_export_index           (CXPOM_error_base + 15)
#define CXPOM_no_export_attribute       (CXPOM_error_base + 16)
#define CXPOM_invalid_string            (CXPOM_error_base + 17)
#define CXPOM_no_load_object            (CXPOM_error_base + 18)
#define CXPOM_invalid_assignment        (CXPOM_error_base + 19)
#define CXPOM_invalid_op_on_class       (CXPOM_error_base + 20)
#define CXPOM_invalid_array_size        (CXPOM_error_base + 21)
#define CXPOM_invalid_array_index       (CXPOM_error_base + 22)

/** Generated from Tag::isValid when given a class name to match */
#define CXPOM_wrong_class               (CXPOM_error_base + 23)

#define CXPOM_input_array_too_small     (CXPOM_error_base + 24)
#define CXPOM_invalid_value             (CXPOM_error_base + 25)

#define CXPOM_no_lock_object            (CXPOM_error_base + 26)
#define CXPOM_no_lock_remote            (CXPOM_error_base + 27)
#define CXPOM_no_load_remote            (CXPOM_error_base + 28)
#define CXPOM_no_delete_this_site       (CXPOM_error_base + 29)

#define CXPOM_longtext_not_locked       (CXPOM_error_base + 30)
#define CXPOM_quota_init_failed         (CXPOM_error_base + 31)
#define CXPOM_locked_by                 (CXPOM_error_base + 32)

/** @} */

#include <cxpom/libcxpom_undef.h>
#endif
