0022904: Clean up sccsid variables
[occt.git] / src / ExprIntrp / ExprIntrp_Generator.cxx
CommitLineData
7fd59977 1// Copyright: Matra-Datavision 1992
2// File: ExprIntrp_Generator.cxx
3// Created: Mon Jul 20 17:06:29 1992
4// Author: Arnaud BOUZY
5// <adn>
6
7#include <ExprIntrp_Generator.ixx>
8//#include <ExprIntrp_yaccanal.hxx>
9#include <ExprIntrp_Analysis.hxx>
10#include <TCollection_AsciiString.hxx>
11
12Standard_EXPORT ExprIntrp_Analysis ExprIntrp_Recept;
13
14
15ExprIntrp_Generator::ExprIntrp_Generator()
16{
17}
18
19void ExprIntrp_Generator::Use(const Handle(Expr_NamedFunction)& func)
20{
21 myFunctions.Append(func);
22}
23
24void ExprIntrp_Generator::Use(const Handle(Expr_NamedExpression)& named)
25{
26 myNamed.Append(named);
27}
28
29const ExprIntrp_SequenceOfNamedFunction& ExprIntrp_Generator::GetFunctions() const
30{
31 return myFunctions;
32}
33
34const ExprIntrp_SequenceOfNamedExpression & ExprIntrp_Generator::GetNamed() const
35{
36 return myNamed;
37}
38
39Handle(Expr_NamedFunction) ExprIntrp_Generator::GetFunction (const TCollection_AsciiString& name) const
40{
41 for (Standard_Integer i=1; i<= myFunctions.Length(); i++) {
42 if (name == myFunctions(i)->GetName()) {
43 return myFunctions(i);
44 }
45 }
46 Handle(Expr_NamedFunction) curfunc;
47 return curfunc;
48}
49
50Handle(Expr_NamedExpression) ExprIntrp_Generator::GetNamed (const TCollection_AsciiString& name) const
51{
52 for (Standard_Integer i=1;i<=myNamed.Length();i++){
53 if (name == myNamed(i)->GetName()) {
54 return myNamed(i);
55 }
56 }
57 Handle(Expr_NamedExpression) curexp;
58 return curexp;
59}
60