libNuML  1.1.1
Library for reading / writing NuML documents
NUMLVisitor.h
Go to the documentation of this file.
1 /*
2 * ****************************************************************************
3 * This file is part of libNUML. Please visit http://code.google.com/p/numl/for more
4 * information about NUML, and the latest version of libNUML.
5 * Copyright (c) 2013 The University of Manchester.
6 *
7 * This library is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as published
9 * by the Free Software Foundation. A copy of the license agreement is
10 * provided in the file named "LICENSE.txt" included with this software
11 * distribution and also available online as http://www.gnu.org/licenses/lgpl.html
12 *
13 * Contributors:
14 * Joseph O. Dada, The University of Manchester - initial API and implementation
15 * ****************************************************************************
16 **/
17 
24 #ifndef NUMLVisitor_h
25 #define NUMLVisitor_h
26 
27 
28 
29 
30 
31 #include <numl/NUMLTypeCodes.h>
32 
33 #ifdef __cplusplus
35 
40 class NMBase;
41 
42 class NUMLDocument;
43 class OntologyTerm;class Constraint;
44 
45 
46 
47 //class Result;
48 class ResultComponent;
49 class Dimension;
50 class CompositeValue;
51 class Tuple;
52 class AtomicValue;
55 class TupleDescription;
56 class AtomicDescription;
57 
58 class NUMLList;
59 
60 
73 {
74 public:
75 
76  virtual ~NUMLVisitor ();
77 
78  virtual void visit (const NUMLDocument &x);
79  virtual void visit (const NUMLList &x, NUMLTypeCode_t type);
80 
81  virtual bool visit (const NMBase &x);
82  virtual bool visit (const OntologyTerm &x);
83 
84  // virtual bool visit (const Result &x);
85  virtual bool visit (const ResultComponent &x);
86  virtual bool visit (const Dimension &x);
87  virtual bool visit (const CompositeValue &x);
88  virtual bool visit (const AtomicValue &x);
89  virtual bool visit (const Tuple &x);
90  virtual bool visit (const DimensionDescription &x);
91  virtual bool visit (const CompositeDescription &x);
92  virtual bool visit (const AtomicDescription &x);
93  virtual bool visit (const TupleDescription &x);
94 
95 
96  virtual void leave (const NUMLDocument &x);
97  virtual void leave (const OntologyTerm &x);
98 
99  virtual void leave (const Tuple &x);
100 // virtual void leave (const Result &x);
101  virtual void leave (const ResultComponent &x);
102  virtual void leave (const Dimension &x);
103  virtual void leave (const DimensionDescription &x);
104  virtual void leave (const CompositeValue &x);
105  virtual void leave (const AtomicValue &x);
106  virtual void leave (const CompositeDescription &x);
107  virtual void leave (const TupleDescription &x);
108  virtual void leave (const AtomicDescription &x);
109 
110  virtual void leave (const NUMLList &x, NUMLTypeCode_t type);
111 };
112 
114 
115 #endif /* __cplusplus */
116 #endif /* NUMLVisitor_h */
This is the base class for all numl objects.
Definition: NMBase.h:70
stores the result component
Definition: ResultComponent.h:57
stores tuple information
Definition: Tuple.h:44
#define LIBNUML_CPP_NAMESPACE_BEGIN
Definition: libnuml-namespace.h:71
This class stores the atomic values.
Definition: AtomicValue.h:40
Parent class for the various NUML list classes e.g.
Definition: NUMLList.h:45
stores the tuple description
Definition: TupleDescription.h:44
NUMLTypeCode_t
An enumeration of NUML types to help identify NUML objects at runtime.
Definition: NUMLTypeCodes.h:33
This represents the numl document that contains all information.
Definition: NUMLDocument.h:106
virtual void visit(const NUMLDocument &x)
Definition: NUMLVisitor.cpp:29
Implementation of the Visitor design pattern, for operations on NUML objects.
Definition: NUMLVisitor.h:72
This class stores the atomic description.
Definition: AtomicDescription.h:42
ontology terms store information about what individual elements represents
Definition: OntologyTerm.h:44
This class stores the composite values.
Definition: CompositeValue.h:49
virtual ~NUMLVisitor()
Definition: NUMLVisitor.cpp:23
this class stores the dimension information
Definition: Dimension.h:53
#define LIBNUML_CPP_NAMESPACE_END
Definition: libnuml-namespace.h:72
This class stores the dimension description.
Definition: DimensionDescription.h:58
virtual void leave(const NUMLDocument &x)
Definition: NUMLVisitor.cpp:106
this class stores the component descriptions
Definition: CompositeDescription.h:57