
00001 //***************************************************************************** 00002 // File : gzDistEvaluator.h 00003 // Module : gzDistribution 00004 // Description : Declaration of gzDistEvaluatorInterface 00005 // Author : Christian Andersson 00006 // Product : GizmoDistribution 2.1.1 00007 // 00008 // Copyright © 2004 - Saab Training Systems AB, Sweden 00009 // 00010 // NOTE: GizmoDistribution is a toolkit used for implementing distributed 00011 // objects and events in C++ 00012 // 00013 // 00014 // Revision History... 00015 // 00016 // Who Date Description 00017 // 00018 // CAN 040203 Created file 00019 // 00020 //****************************************************************************** 00021 #ifndef __GZ_DIST_EVALUATOR_H__ 00022 #define __GZ_DIST_EVALUATOR_H__ 00023 00028 // Includes 00029 #include "gzDistBase.h" 00030 00031 00032 // Evaluator types (for internal use) 00033 enum gzDistEvaluatorType 00034 { 00035 GZ_DIST_EVALUATOR_NEW_OBJECT = 1, // Evaluation of new objects 00036 GZ_DIST_EVALUATOR_REMOVE_OBJECT, // Evaluation of removed objects 00037 GZ_DIST_EVALUATOR_UPDATE_OBJECT, // Evaluation of updated objects 00038 GZ_DIST_EVALUATOR_REMOVE_ATTRIBUTES // Evaluation of removed attributes in objects 00039 }; 00040 00041 00042 //****************************************************************************** 00043 // Class : gzDistEvaluatorInterface 00044 // 00045 // Purpose : The base def class of a gzDistributionSession. 00046 // 00047 // Notes : - 00048 // 00049 // Revision History... 00050 // 00051 // Who Date Description 00052 // 00053 // CAN 040203 Created 00054 // 00055 //****************************************************************************** 00057 00065 class gzDistEvaluatorInterface : public gzDistThreadSafeReference 00066 { 00067 public: 00068 00070 GZ_DIST_EXPORT virtual ~gzDistEvaluatorInterface(); 00071 00073 00077 GZ_DIST_EXPORT virtual gzBool onNewObject(gzDistObject* object, gzDistSession* session); 00078 00080 00083 GZ_DIST_EXPORT virtual gzBool onRemoveObject(gzDistObject* object); 00084 00086 00090 GZ_DIST_EXPORT virtual gzBool onUpdateObject(gzDistTransaction* transaction, gzDistObject* object); 00091 00093 00097 GZ_DIST_EXPORT virtual gzBool onRemoveAttributes(gzDistTransaction* transaction, gzDistObject* object); 00098 00100 00102 GZ_DIST_EXPORT virtual gzVoid onResult(gzBool result); 00103 00105 00106 GZ_DIST_EXPORT gzType* getEvaluatorClassType(); 00107 00108 protected: 00109 00111 00112 GZ_DIST_EXPORT gzDistEvaluatorInterface(gzType* classType); 00113 00114 private: 00115 00116 // The type to evaluate 00117 gzType* m_classType; 00118 }; 00119 00120 00121 #endif