diff options
Diffstat (limited to 'Source/cmVariableWatch.h')
-rw-r--r-- | Source/cmVariableWatch.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/Source/cmVariableWatch.h b/Source/cmVariableWatch.h index 15e8f90..7f97c28 100644 --- a/Source/cmVariableWatch.h +++ b/Source/cmVariableWatch.h @@ -19,6 +19,8 @@ #include "cmStandardIncludes.h" +class cmMakefile; + /** \class cmVariableWatch * \brief Helper class for watching of variable accesses. * @@ -28,7 +30,7 @@ class cmVariableWatch { public: typedef void (*WatchMethod)(const std::string& variable, int access_type, - void* client_data); + void* client_data, const char* newValue, const cmMakefile* mf); cmVariableWatch(); ~cmVariableWatch(); @@ -43,20 +45,26 @@ public: /** * This method is called when variable is accessed */ - void VariableAccessed(const std::string& variable, int access_type) const; + void VariableAccessed(const std::string& variable, int access_type, + const char* newValue, const cmMakefile* mf) const; /** * Different access types. */ enum { - VARIABLE_READ_ACCESS, - UNKNOWN_VARIABLE_READ_ACCESS, - ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS, - VARIABLE_MODIFIED_ACCESS, - VARIABLE_REMOVED_ACCESS, - NO_ACCESS + VARIABLE_READ_ACCESS = 0, + UNKNOWN_VARIABLE_READ_ACCESS, + ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS, + VARIABLE_MODIFIED_ACCESS, + VARIABLE_REMOVED_ACCESS, + NO_ACCESS }; + + /** + * Return the access as string + */ + static const char* GetAccessAsString(int access_type); protected: struct Pair |