Index: trunk/SophyaLib/SysTools/cexpre.cc
===================================================================
--- trunk/SophyaLib/SysTools/cexpre.cc	(revision 2593)
+++ trunk/SophyaLib/SysTools/cexpre.cc	(revision 2598)
@@ -68,4 +68,10 @@
 //---------------------------------------------------------
 //-----------  Expression changement de signe -------------
+/*! 
+  \internal 
+  \ingroup SysTools
+  \brief Class for handling change sign expression (-x)
+  \sa CExpressionEvaluator
+*/
 class CE_ChsExp : public CExprBase {
 public:
@@ -80,4 +86,10 @@
 
 //---------------------------------------------------------
+/*! 
+  \internal 
+  \ingroup SysTools
+  \brief Base class for binary operations on expressions
+  \sa CExpressionEvaluator
+*/
 class CE_BinExp : public CExprBase {
 public:
@@ -119,4 +131,10 @@
 
 //---------------------------------------------------------
+/*! 
+  \internal 
+  \ingroup SysTools
+  \brief Addition of two CExprBase (binary operation : x+y)
+  \sa CExpressionEvaluator
+*/
 class CE_AddExp : public CE_BinExp {
 public:
@@ -125,4 +143,10 @@
  }
 };
+/*! 
+  \internal 
+  \ingroup SysTools
+  \brief Multiplication of two CExprBase (binary operation : x*y)
+  \sa CExpressionEvaluator
+*/
 class CE_MulExp : public CE_BinExp {
 public:
@@ -130,4 +154,10 @@
   virtual double Evaluate() const { CheckThrow("CE_MulExp::Evaluate"); return _e1->Evaluate()*_e2->Evaluate(); }
 };
+/*! 
+  \internal 
+  \ingroup SysTools
+  \brief Subtraction of two CExprBase (binary operation : x-y)
+  \sa CExpressionEvaluator
+*/
 class CE_SubExp : public CE_BinExp {
 public:
@@ -135,4 +165,10 @@
   virtual double Evaluate() const { CheckThrow("CE_SubExp::Evaluate"); return _e1->Evaluate()-_e2->Evaluate(); }
 };
+/*! 
+  \internal 
+  \ingroup SysTools
+  \brief Division of two CExprBase (binary operation : x/y)
+  \sa CExpressionEvaluator
+*/
 class CE_DivExp : public CE_BinExp {
 public:
@@ -149,4 +185,10 @@
 //---------------------------------------------------------
 #define FMXARG 3
+/*! 
+  \internal 
+  \ingroup SysTools
+  \brief Function evaluation on other expression in the form f(), f(x), f(x,y), f(x,y,z)
+  \sa CExpressionEvaluator
+*/
 class CE_FuncExp : public CExprBase {
 public:
@@ -169,7 +211,7 @@
 
 // Les fonctions de generation de nombre aleatoire
-double _CE_rand01() { return drand01(); }
-double _CE_randpm1() { return drandpm1(); }
-double _CE_gaurand() { return GauRnd(0., 1.); }
+static double _CE_rand01() { return drand01(); }
+static double _CE_randpm1() { return drandpm1(); }
+static double _CE_gaurand() { return GauRnd(0., 1.); }
 //---------------------------------------------------------
 CE_FuncExp::CE_FuncExp(string const & func)
@@ -265,4 +307,42 @@
 
 //---------------------------------------------------------
+/*!
+  \class CExpressionEvaluator
+  \ingroup SysTools
+  \brief Class for evaluation of arithmetic expressions with C-like syntax.
+
+  This classes can handle the parsing of c-like arithmetic
+  expressions containing numerical constants, the four 
+  basic operations (addition +, subtraction -, multiplication *,
+  division /) and functions.
+  The numerical constants are also defined <tt> (Pi = M_PI E = M_E) </tt>.
+  The following functions from the standard math library and 
+  random generators are available:
+  
+  - sqrt fabs floor hypot
+  - exp log log10 pow 
+  - sin cos tan asin acos atan atan2
+  - sinh cosh tanh
+  - rand01() : Flat random number generator in the range [0 1]
+  - randpm1() : Flat random number generator in the range [-1 1]
+  - gaurand() : Gaussian random number generator (m=0, sigma=1)
+
+  Usage example : 
+  \code
+  #include "cexpre.h"
+  ...
+  string es = "4.+3*(cos(Pi/8.)+1.5)";
+  CExpressionEvaluator e(es);
+  cout << " Expression: " << e << " = " << e.Evaluate() << endl;
+  \endcode
+
+  Output : \n
+  <tt>  Expression: (4+(3*(cos((3.14159/8))+1.5))) = 11.2716 </tt>
+*/
+
+/*! 
+  Parse the string \c sex and builds an expression.
+  Can throw CExprException exception.
+*/
 CExpressionEvaluator::CExpressionEvaluator(string const & sex)
 {
@@ -293,5 +373,5 @@
 
 // cette fonction rearrange le stack des operations binaires en attente
-CExprBase* Arrange_CE_BinExpStack(stack<CE_BinExp* >& sbx, CExprBase* cex, CE_BinExp* nbx)
+static CExprBase* Arrange_CE_BinExpStack(stack<CE_BinExp* >& sbx, CExprBase* cex, CE_BinExp* nbx)
 {
   while ( !sbx.empty() && (nbx->Priority() <= sbx.top()->Priority()) ) {
@@ -305,5 +385,5 @@
 
 // cette fonction rearrange le stack des operations binaires en attente
-CExprBase* Arrange_CE_BinExpStack(stack<CE_BinExp* >& sbx, CExprBase* cex)
+static CExprBase* Arrange_CE_BinExpStack(stack<CE_BinExp* >& sbx, CExprBase* cex)
 {
   if (sbx.empty())  return cex;
