--- parser3/src/classes/Attic/random.C 2001/04/28 08:43:48 1.10 +++ parser3/src/classes/Attic/random.C 2001/05/15 10:01:25 1.12 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: random.C,v 1.10 2001/04/28 08:43:48 paf Exp $ + $Id: random.C,v 1.12 2001/05/15 10:01:25 parser Exp $ */ #include "pa_config_includes.h" @@ -22,14 +22,12 @@ class MRandom : public Methoded { public: MRandom(Pool& pool); +public: // Methoded bool used_directly() { return true; } }; // methods -/** ^random.generate[] - ^random.generate(range) -*/ static void _generate(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); @@ -53,8 +51,8 @@ MRandom::MRandom(Pool& apool) : Methoded srand(getpid()+time(NULL)); rand(); - // ^random.generate[] - // ^random.generate(range) + // ^random:generate[] + // ^random:generate(range) add_native_method("generate", Method::CT_STATIC, _generate, 1, 1); }