Version: 9.15.0
typeParsers.hxx
Go to the documentation of this file.
1 // Copyright (C) 2006-2025 CEA, EDF
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 
20 #ifndef _TYPEPARSERS_HXX_
21 #define _TYPEPARSERS_HXX_
22 
23 #include "parserBase.hxx"
24 #include "TypeCode.hxx"
25 #include "factory.hxx"
26 
27 namespace YACS
28 {
29 
44 {
46  virtual void buildAttr(const XML_Char** attr);
47  virtual void pre ();
48  virtual void name(const std::string& name);
49  virtual void kind(const std::string& name);
50  virtual mytype post();
51  std::string _name;
52  std::string _kind;
53 };
54 
69 struct seqtypeParser:public parser
70 {
72  virtual void onStart(const XML_Char* el, const XML_Char** attr);
73  virtual void onEnd(const char *el,parser* child);
74  virtual void buildAttr(const XML_Char** attr);
75  void name(const std::string& name);
76  void content(const std::string& name);
79  std::string _name;
80 };
81 
99 {
101  virtual void onStart(const XML_Char* el, const XML_Char** attr);
102  virtual void onEnd(const char *el,parser* child);
103  virtual void buildAttr(const XML_Char** attr);
104  virtual void pre ();
105  virtual void name(const std::string& name);
106  virtual void id(const std::string& name);
107  virtual void base(const std::string& name);
108  virtual YACS::ENGINE::TypeCode * post();
109  std::string _name;
110  std::string _id;
111  std::list<YACS::ENGINE::TypeCodeObjref *> _ltc;
112 };
113 
129 {
131  virtual void buildAttr(const XML_Char** attr);
132  virtual void name(const std::string& name);
133  virtual void type(const std::string& name);
134  myprop post();
136 };
137 
155 {
157 
158  virtual void onStart(const XML_Char* el, const XML_Char** attr);
159  virtual void onEnd(const char *el,parser* child);
160  virtual void buildAttr(const XML_Char** attr);
161  virtual void pre ();
162  virtual void name(const std::string& name);
163  virtual void id(const std::string& name);
164  virtual void member (const myprop& prop);
165  virtual YACS::ENGINE::TypeCode * post();
166  std::string _name;
167  std::string _id;
168  std::vector<myprop> _members;
169 };
170 
171 }
172 
173 #endif
Base class for all type objects.
Definition: TypeCode.hxx:68
char XML_Char
Definition: parserBase.hxx:37
Class for member parser.
virtual void name(const std::string &name)
virtual void buildAttr(const XML_Char **attr)
virtual void type(const std::string &name)
static membertypeParser memberParser
Class for objref parser.
Definition: typeParsers.hxx:99
virtual void onStart(const XML_Char *el, const XML_Char **attr)
virtual void base(const std::string &name)
virtual void pre()
virtual void buildAttr(const XML_Char **attr)
virtual void name(const std::string &name)
virtual void id(const std::string &name)
virtual YACS::ENGINE::TypeCode * post()
static objtypeParser objParser
std::list< YACS::ENGINE::TypeCodeObjref * > _ltc
virtual void onEnd(const char *el, parser *child)
Class for sequence parser.
Definition: typeParsers.hxx:70
YACS::ENGINE::TypeCode * _contentType
Definition: typeParsers.hxx:78
virtual void buildAttr(const XML_Char **attr)
Definition: typeParsers.cxx:87
void content(const std::string &name)
void name(const std::string &name)
Definition: typeParsers.cxx:99
YACS::ENGINE::TypeCode * post()
static seqtypeParser seqParser
Definition: typeParsers.hxx:71
virtual void onStart(const XML_Char *el, const XML_Char **attr)
Definition: typeParsers.cxx:74
virtual void onEnd(const char *el, parser *child)
Definition: typeParsers.cxx:83
Class for struct parser.
virtual void onEnd(const char *el, parser *child)
virtual void onStart(const XML_Char *el, const XML_Char **attr)
virtual void member(const myprop &prop)
virtual YACS::ENGINE::TypeCode * post()
static structtypeParser structParser
virtual void name(const std::string &name)
virtual void id(const std::string &name)
virtual void buildAttr(const XML_Char **attr)
std::vector< myprop > _members
Class for type parser.
Definition: typeParsers.hxx:44
static typetypeParser typeParser
Definition: typeParsers.hxx:45
virtual void name(const std::string &name)
Definition: typeParsers.cxx:55
virtual void buildAttr(const XML_Char **attr)
Definition: typeParsers.cxx:42
virtual mytype post()
Definition: typeParsers.cxx:65
virtual void pre()
Definition: typeParsers.cxx:54
virtual void kind(const std::string &name)
Definition: typeParsers.cxx:60