]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModelAPI/ModelAPI_Expression.cpp
Salome HOME
Porting to SALOME_8.2.0 : Debug visualization selection for AIS_Trihedron axes.
[modules/shaper.git] / src / ModelAPI / ModelAPI_Expression.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModelAPI_Expression.cpp
4 // Created:     5 Aug 2015
5 // Author:      Sergey POKHODENKO
6
7 #include "ModelAPI_Expression.h"
8
9 ModelAPI_Expression::ModelAPI_Expression()
10 {
11
12 }
13
14 ModelAPI_Expression::~ModelAPI_Expression()
15 {
16
17 }
18
19 bool ModelAPI_Expression::isInitialized()
20 {
21   return myIsInitialized;
22 }
23
24 void ModelAPI_Expression::setInitialized()
25 {
26   myIsInitialized = true;
27 }
28
29 ModelAPI_ExpressionDouble::ModelAPI_ExpressionDouble()
30 {
31
32 }
33
34 ModelAPI_ExpressionInteger::ModelAPI_ExpressionInteger()
35 {
36
37
38 }
39 bool ModelAPI_Expression::isVariable(const std::string& theString)
40 {
41   if (theString.empty())
42     return false;
43   std::string::const_iterator it = theString.begin();
44   if (!(isalpha(*it) || (*it) == '_') || it == theString.end())
45     return false;
46   it++;
47   for ( ; it != theString.end(); ++it ) {
48     if(!(isalnum(*it) || (*it) == '_')) {
49       return false;
50     }
51   }
52   return true;
53 }
54