summaryrefslogtreecommitdiff
path: root/include/class.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-01-17 22:19:08 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-01-17 22:19:08 +0100
commit5fd8b29a1981d2d4f7c4e9925729fbe9f1c558bb (patch)
treee0738b3ebb653d1a7ae8a8c1f62f309f1895bfe5 /include/class.h
parent821e65d876cc0ce2b32471791b02d9f7cc784c99 (diff)
added initial implementation for registering constants
Diffstat (limited to 'include/class.h')
-rw-r--r--include/class.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/class.h b/include/class.h
index e11074c..2c875fa 100644
--- a/include/class.h
+++ b/include/class.h
@@ -91,12 +91,16 @@ public:
/**
* Add a static method to a class
*
- * In C++ a static method is just a plain function, that only at compile
- * time has access to the private variables. You can therefore also supply
- * global functions as static method, and real static methods (that do not
- * even have to come from the same class.
+ * In C++ a static method is in reality just a plain function, that at
+ * compile time has access to private properties of the class that it is a
+ * static member of.
*
- * In PHP scripts, the function will only be callable as real static method
+ * Because a C++ static method is not a real method with a 'this' pointer,
+ * it has the same signature as a normal C++ (non-method) function. Therefore,
+ * you can register real static member functions (&MyClass::myMethod) as well
+ * as normal functions (myFunction) as class methods.
+ *
+ * In PHP scripts, such functions will be callable as static class methods
*
* @param name Name of the method
* @param method The actual method