/*==================================================================================================

                    Copyright (c) 2007 UGS
                             Unpublished - All rights reserved

====================================================================================================
File description:

    Filename: PropOperationDispatcher.hxx
    Module  : extensionframework

    This is the root interface class of the PropOperationDispatcher. It contains of all the generic methods
    for PropOperationDispatcher that can be reused by the derived classes.

====================================================================================================
   Date      Name                    Description of Change
$HISTORY$
==================================================================================================*/
#ifndef PropOperationDispatcher_HXX
#define PropOperationDispatcher_HXX


#include <string>

#include <extensionframework/OperationDispatcher.hxx>
#include <extensionframework/libextensionframework_exports.h>


class EIMObject;
class PropertyDescriptor;
class ImanProperty;


namespace Teamcenter
{
    class PropOperationDispatcher;
    class OperationDispatcher;
}


class EXTENSIONFRAMEWORK_API Teamcenter::PropOperationDispatcher : public Teamcenter::OperationDispatcher
{
    public:
        PropOperationDispatcher();
        virtual ~PropOperationDispatcher();
        static OperationDispatcher* constructor();

        /**
            Retrieves the OperationDispatcher for the first parent in the Type hierarchy that has a baseAction
            implementation different than the one present on input Type / Property / Message combination.
            It is meant for internal use only.
        */
        static int findParentPropOperationDispatcher( tag_t                 objectType,         /**< (I) The type. */
                                                      const std::string&    propertyName,       /**< (I) The property internal name. */
                                                      const std::string&    propOpernMsg,       /**< (I) The property operation message. */
                                                      int&                  propMsgIndex,       /**< (IO) The property operation message index. It is meant for internal use only. */
                                                      OperationDispatcher*& opPropOprnDisp      /**< (O) The evaluated property operation dispatcher. */
                                                    );

        // Project 011450 Changes
        void askDispatches( bool& condDispatch, bool& preDispatch, bool& baseDispatch, bool& postDispatch );
        ImanProperty*  askProperty( EIMObject* obj, PropertyDescriptor* pd ) const;
        void setName( const std::string& name );
        std::string  getName() const;

        virtual void getIntPreConditions(METHOD_message_t*  msgData, int* value, logical* isNull ) const;
        virtual void getIntPreActions(METHOD_message_t*  msgData, int* value, logical* isNull ) const;
        virtual void getIntBaseAction(METHOD_message_t*  msgData, int* value, logical* isNull ) const;
        virtual void getIntPostActions(METHOD_message_t*  msgData, int* value, logical* isNull ) const;
        virtual void getIntArrayPreConditions(METHOD_message_t*  msgData, int* num, int** value, logical** isNull ) const;
        virtual void getIntArrayPreActions(METHOD_message_t*  msgData, int* num, int** value, logical** isNull ) const;
        virtual void getIntArrayBaseAction(METHOD_message_t*  msgData, int* num, int** value, logical** isNull ) const;
        virtual void getIntArrayPostActions(METHOD_message_t*  msgData, int* num, int** value, logical** isNull ) const;

        virtual void getDoublePreConditions(METHOD_message_t*  msgData, double* value, logical* isNull ) const;
        virtual void getDoublePreActions(METHOD_message_t*  msgData, double* value, logical* isNull ) const;
        virtual void getDoubleBaseAction(METHOD_message_t*  msgData, double* value, logical* isNull ) const;
        virtual void getDoublePostActions(METHOD_message_t*  msgData, double* value, logical* isNull ) const;
        virtual void getDoubleArrayPreConditions(METHOD_message_t*  msgData, int* num, double** value, logical** isNull ) const;
        virtual void getDoubleArrayPreActions(METHOD_message_t*  msgData, int* num, double** value, logical** isNull ) const;
        virtual void getDoubleArrayBaseAction(METHOD_message_t*  msgData, int* num, double** value, logical** isNull ) const;
        virtual void getDoubleArrayPostActions(METHOD_message_t*  msgData, int* num, double** value, logical** isNull ) const;

        virtual void getCharPreConditions(METHOD_message_t*  msgData, char* value, logical* isNull ) const;
        virtual void getCharPreActions(METHOD_message_t*  msgData, char* value, logical* isNull ) const;
        virtual void getCharBaseAction(METHOD_message_t*  msgData, char* value, logical* isNull ) const;
        virtual void getCharPostActions(METHOD_message_t*  msgData, char* value, logical* isNull ) const;
        virtual void getCharArrayPreConditions(METHOD_message_t*  msgData, int* num, char** value, logical** isNull ) const;
        virtual void getCharArrayPreActions(METHOD_message_t*  msgData, int* num, char** value, logical** isNull ) const;
        virtual void getCharArrayBaseAction(METHOD_message_t*  msgData, int* num, char** value, logical** isNull ) const;
        virtual void getCharArrayPostActions(METHOD_message_t*  msgData, int* num, char** value, logical** isNull ) const;

        virtual void getStringPreConditions(METHOD_message_t*  msgData, char** value, logical* isNull ) const;
        virtual void getStringPreActions(METHOD_message_t*  msgData, char** value, logical* isNull ) const;
        virtual void getStringBaseAction(METHOD_message_t*  msgData, char** value, logical* isNull ) const;
        virtual void getStringPostActions(METHOD_message_t*  msgData, char** value, logical* isNull ) const;
        virtual void getStringArrayPreConditions(METHOD_message_t*  msgData, int* num, char*** value, logical** isNull ) const;
        virtual void getStringArrayPreActions(METHOD_message_t*  msgData,int* num,  char*** value, logical** isNull ) const;
        virtual void getStringArrayBaseAction(METHOD_message_t*  msgData, int* num, char*** value, logical** isNull ) const;
        virtual void getStringArrayPostActions(METHOD_message_t*  msgData, int* num, char*** value, logical** isNull ) const;

        virtual void getDatePreConditions(METHOD_message_t*  msgData, date_t* value, logical* isNull ) const;
        virtual void getDatePreActions(METHOD_message_t*  msgData, date_t* value, logical* isNull ) const;
        virtual void getDateBaseAction(METHOD_message_t*  msgData, date_t* value, logical* isNull ) const;
        virtual void getDatePostActions(METHOD_message_t*  msgData, date_t* value, logical* isNull ) const;
        virtual void getDateArrayPreConditions(METHOD_message_t*  msgData, int* num, date_t** value, logical** isNull ) const;
        virtual void getDateArrayPreActions(METHOD_message_t*  msgData, int* num, date_t** value, logical** isNull ) const;
        virtual void getDateArrayBaseAction(METHOD_message_t*  msgData, int* num, date_t** value, logical** isNull ) const;
        virtual void getDateArrayPostActions(METHOD_message_t*  msgData, int* num, date_t** value, logical** isNull ) const;

        virtual void getLogicalPreConditions(METHOD_message_t*  msgData, logical* value, logical* isNull ) const;
        virtual void getLogicalPreActions(METHOD_message_t*  msgData, logical* value, logical* isNull ) const;
        virtual void getLogicalBaseAction(METHOD_message_t*  msgData, logical* value, logical* isNull ) const;
        virtual void getLogicalPostActions(METHOD_message_t*  msgData, logical* value, logical* isNull ) const;
        virtual void getLogicalArrayPreConditions(METHOD_message_t*  msgData, int* num, logical** value, logical** isNull ) const;
        virtual void getLogicalArrayPreActions(METHOD_message_t*  msgData, int* num, logical** value, logical** isNull ) const;
        virtual void getLogicalArrayBaseAction(METHOD_message_t*  msgData, int* num, logical** value, logical** isNull ) const;
        virtual void getLogicalArrayPostActions(METHOD_message_t*  msgData, int* num, logical** value, logical** isNull ) const;

        virtual void getTagPreConditions(METHOD_message_t*  msgData, tag_t* value, logical* isNull ) const;
        virtual void getTagPreActions(METHOD_message_t*  msgData, tag_t* value, logical* isNull ) const;
        virtual void getTagBaseAction(METHOD_message_t*  msgData, tag_t* value, logical* isNull ) const;
        virtual void getTagPostActions(METHOD_message_t*  msgData, tag_t* value, logical* isNull ) const;
        virtual void getTagArrayPreConditions(METHOD_message_t*  msgData, int* num, tag_t** value, logical** isNull ) const;
        virtual void getTagArrayPreActions(METHOD_message_t*  msgData, int* num, tag_t** value, logical** isNull ) const;
        virtual void getTagArrayBaseAction(METHOD_message_t*  msgData, int* num, tag_t** value, logical** isNull ) const;
        virtual void getTagArrayPostActions(METHOD_message_t*  msgData, int* num, tag_t** value, logical** isNull ) const;

        virtual void setStringPreConditions( METHOD_message_t* msgData, const char* value, const logical isNull ) const;
        virtual void setStringPreActions( METHOD_message_t* msgData, const char* value, const logical isNull ) const;
        virtual void setStringPostActions( METHOD_message_t* msgData, const char* value, const logical isNull ) const;
        virtual void setStringBaseAction( METHOD_message_t* msgData, const char* value, const logical isNull ) const;
        virtual void setStringArrayPreConditions( METHOD_message_t* msgData, int num, const char** values,  const logical*  is_null ) const;
        virtual void setStringArrayPreActions( METHOD_message_t* msgData, int num, const char** values,  const logical*  is_null  ) const;
        virtual void setStringArrayPostActions( METHOD_message_t* msgData, int num, const char** values,  const logical*  is_null  ) const;
        virtual void setStringArrayBaseAction( METHOD_message_t* msgData, int num, const char** values,  const logical*  is_null  ) const;

        virtual void setDatePreConditions( METHOD_message_t* msgData, const date_t dateValue, const logical isNull ) const;
        virtual void setDatePreActions( METHOD_message_t* msgData, const date_t dateValue, const logical isNull ) const;
        virtual void setDatePostActions( METHOD_message_t* msgData, const date_t dateValue, const logical isNull ) const;
        virtual void setDateBaseAction( METHOD_message_t* msgData, const date_t dateValue, const logical isNull ) const;
        virtual void setDateArrayPreConditions(  METHOD_message_t* msgData, int num, const date_t* dateValues,  const logical* isNullVals ) const;
        virtual void setDateArrayPreActions(  METHOD_message_t* msgData, int num, const date_t* dateValues,  const logical* isNullVals ) const;
        virtual void setDateArrayPostActions(  METHOD_message_t* msgData, int num, const date_t* dateValues,  const logical* isNullVals ) const;
        virtual void setDateArrayBaseAction(  METHOD_message_t* msgData, int num, const date_t* dateValues,  const logical* isNullVals ) const;

        virtual void setDoublePreConditions( METHOD_message_t* msgData, const double doubleValue, const logical isNull ) const;
        virtual void setDoublePreActions( METHOD_message_t* msgData, const double doubleValue, const logical isNull ) const;
        virtual void setDoublePostActions( METHOD_message_t* msgData, const double doubleValue, const logical isNull ) const;
        virtual void setDoubleBaseAction( METHOD_message_t* msgData, const double doubleValue, const logical isNull ) const;
        virtual void setDoubleArrayPreConditions( METHOD_message_t* msgData, int num, const double* doubleValue, const logical* isNull ) const;
        virtual void setDoubleArrayPreActions( METHOD_message_t* msgData, int num, const double* doubleValue, const logical* isNull ) const;
        virtual void setDoubleArrayPostActions( METHOD_message_t* msgData, int num, const double* doubleValue, const logical* isNull ) const;
        virtual void setDoubleArrayBaseAction( METHOD_message_t* msgData, int num, const double* doubleValue, const logical* isNull ) const;

        virtual void setIntPreConditions( METHOD_message_t* msgData, const int intValue, const logical isNull ) const;
        virtual void setIntPreActions( METHOD_message_t* msgData, const int intValue, const logical isNull ) const;
        virtual void setIntPostActions( METHOD_message_t* msgData, const int intValue, const logical isNull ) const;
        virtual void setIntBaseAction( METHOD_message_t* msgData, const int intValue, const logical isNull ) const;
        virtual void setIntArrayPreConditions( METHOD_message_t* msgData, int num, const int* intValues,  const logical* isNullVals ) const;
        virtual void setIntArrayPreActions( METHOD_message_t* msgData, int num, const int* intValues,  const logical* isNullVals ) const;
        virtual void setIntArrayPostActions( METHOD_message_t* msgData, int num, const int* intValues,  const logical* isNullVals ) const;
        virtual void setIntArrayBaseAction( METHOD_message_t* msgData, int num, const int* intValues,  const logical* isNullVals ) const;

        virtual void setLogicalPreConditions( METHOD_message_t* msgData, const logical boolValue, const logical isNull ) const;
        virtual void setLogicalPreActions( METHOD_message_t* msgData, const logical boolValue, const logical isNull ) const;
        virtual void setLogicalPostActions( METHOD_message_t* msgData, const logical boolValue, const logical isNull ) const;
        virtual void setLogicalBaseAction( METHOD_message_t* msgData, const logical boolValue, const logical isNull ) const;
        virtual void setLogicalArrayPreConditions( METHOD_message_t* msgData, int num, const logical* boolValues,  const logical* isNullVals ) const;
        virtual void setLogicalArrayPreActions( METHOD_message_t* msgData, int num, const logical* boolValues,  const logical* isNullVals ) const;
        virtual void setLogicalArrayPostActions( METHOD_message_t* msgData, int num, const logical* boolValues,  const logical* isNullVals ) const;
        virtual void setLogicalArrayBaseAction( METHOD_message_t* msgData, int num, const logical* boolValues,  const logical* isNullVals ) const;

        virtual void setTagPreConditions( METHOD_message_t* msgData, const tag_t tagValue, const logical isNull ) const;
        virtual void setTagPreActions( METHOD_message_t* msgData, const tag_t tagValue, const logical isNull ) const;
        virtual void setTagPostActions( METHOD_message_t* msgData, const tag_t tagValue, const logical isNull ) const;
        virtual void setTagBaseAction( METHOD_message_t* msgData, const tag_t tagValue, const logical isNull ) const;
        virtual void setTagArrayPreConditions( METHOD_message_t* msgData, int num, const tag_t* tagValues,  const logical* isNullVals ) const;
        virtual void setTagArrayPreActions( METHOD_message_t* msgData, int num, const tag_t* tagValues,  const logical* isNullVals ) const;
        virtual void setTagArrayPostActions( METHOD_message_t* msgData, int num, const tag_t* tagValues,  const logical* isNullVals ) const;
        virtual void setTagArrayBaseAction( METHOD_message_t* msgData, int num, const tag_t* tagValues,  const logical* isNullVals ) const;

        virtual void setCharPreConditions( METHOD_message_t* msgData, const char charValue, const logical isNull ) const;
        virtual void setCharPreActions( METHOD_message_t* msgData, const char charValue, const logical isNull ) const;
        virtual void setCharPostActions( METHOD_message_t* msgData, const char charValue, const logical isNull ) const;
        virtual void setCharBaseAction( METHOD_message_t* msgData, const char charValue, const logical isNull ) const;
        virtual void setCharArrayPreConditions( METHOD_message_t* msgData, int num, const char* charValues,  const logical* isNullVals ) const;
        virtual void setCharArrayPreActions( METHOD_message_t* msgData, int num, const char* charValues,  const logical* isNullVals ) const;
        virtual void setCharArrayPostActions( METHOD_message_t* msgData, int num, const char* charValues,  const logical* isNullVals ) const;
        virtual void setCharArrayBaseAction( METHOD_message_t* msgData, int num, const char* charValues,  const logical* isNullVals ) const;
        void setIsMatchAllBaseAction(bool);
        bool isMatchAllBaseAction() const;


    protected:
        void setupMessageData( tag_t  object_tag,  METHOD_message_t &  msgData ) const;
        void setupPropMessageData( tag_t object_tag,  METHOD_message_t &  msgData ) const;


    private:
        std::string     m_propName;
        bool            m_isMatchAllBaseAction;
};


#include <extensionframework/libextensionframework_undef.h>
#endif //PropOperationDispatcher_HXX
