00001 #ifndef IGUANA_FRAMEWORK_IG_BROWSER_METHODS_H
00002 # define IGUANA_FRAMEWORK_IG_BROWSER_METHODS_H
00003
00004
00005
00006 # include "Iguana/Framework/interface/config.h"
00007 # include "classlib/utils/MultiMethod.h"
00008 # include <string>
00009
00010
00011
00012
00013
00014 class IgRepContext;
00015 class IgRepresentable;
00016 class IgModel;
00017 class IgRep;
00018
00019 namespace lat { class XTypeInfo; }
00020
00021
00022
00023
00024
00030 class IGUANA_FRAMEWORK_API IgBrowserMethods
00031 {
00032 public:
00033
00034 static std::string key (const char *model, const char *object);
00035
00036 static IgRepContext *represent (IgRepresentable *, IgModel *);
00037 static void commit (IgRep *, IgRepresentable *, unsigned);
00038 static void update (IgRepresentable *, IgRep *, unsigned);
00039 static void expand (IgRepresentable *, IgRep *);
00040 static void invalidate (IgRepresentable *, IgModel *, unsigned);
00041
00042
00043
00044 static MMM_DECLARE (IgRepContext *,doRepresent,
00045 (IgRepresentable *, IgModel *));
00046 MULTIMETHOD_DECLARE (static,IgRepContext *,doRepresent,2,0,
00047 (IgRepresentable,IgModel));
00048
00049
00050
00051 static MMM_DECLARE (void,doCommit,(IgRep *, IgRepresentable *, unsigned));
00052 MULTIMETHOD_DECLARE (static,void,doCommit,2,1,(IgRep,IgRepresentable,unsigned));
00053
00054
00055
00056 static MMM_DECLARE (void,doUpdate,(IgRepresentable *, IgRep *, unsigned));
00057 MULTIMETHOD_DECLARE (static,void,doUpdate,2,1,(IgRepresentable,IgRep,unsigned));
00058
00059
00060 static MMM_DECLARE (void,doExpand,(IgRepresentable *, IgRep *));
00061 MULTIMETHOD_DECLARE (static,void,doExpand,2,0,(IgRepresentable,IgRep));
00062
00063
00064
00065 static MMM_DECLARE (void,doInvalidate,(IgRepresentable *, IgModel *, unsigned));
00066 MULTIMETHOD_DECLARE (static,void,doInvalidate,1,2,(IgRepresentable,IgModel *,unsigned));
00067
00068 private:
00069 static void preload (const lat::XTypeInfo *objtype,
00070 const lat::XTypeInfo *modtype);
00071 };
00072
00073
00074
00075
00076 #endif // IGUANA_FRAMEWORK_IG_BROWSER_METHODS_H