]> www.ginac.de Git - ginac.git/blobdiff - ginac/constant.h
- made nops() return unsigned instead of int
[ginac.git] / ginac / constant.h
index f6adc64910ff5d985dac45e34801d9113993f835..99cbe99928506d55abaa6c5d49ddf266f9692b8d 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's constant types and some special constants. */
 
 /*
- *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -30,6 +30,8 @@
 namespace GiNaC {
 #endif // ndef NO_GINAC_NAMESPACE
 
+typedef ex (*evalffunctype)(void);
+    
 /** This class holds constants, symbols with specific numerical value. Each
  *  object of this class must either provide their own function to evaluate it
  *  to class numeric or provide the constant as a numeric (if it's an exact
@@ -51,7 +53,7 @@ protected:
 
     // other constructors
 public:
-    constant(string const & initname, ex (*efun)()=0);
+    constant(string const & initname, evalffunctype efun=0);
     constant(string const & initname, numeric const & initnumber);
 
     // functions overriding virtual functions from bases classes
@@ -77,7 +79,7 @@ protected:
 
 private:
     string name;
-    ex (*ef)();
+    evalffunctype ef;
     numeric * number;
     // bool fct_assigned;
     unsigned serial;  //!< unique serial number for comparision