Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

ModelElement.hpp

Go to the documentation of this file.
00001 /* 00002 * Copyright (C) 2004 Andrew Sutton 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public 00015 * License along with this library; if not, write to: 00016 * 00017 * The Free Software Foundation, Inc. 00018 * 59 Temple Place, Suite 330 00019 * Boston, MA 02111-1307 USA 00020 * 00021 * Contact: 00022 * Andrew Sutton asutton@cs.kent.edu 00023 */ 00024 00025 #ifndef MODEL_MODELELEMENT_HPP 00026 #define MODEL_MODELELEMENT_HPP 00027 00028 // OMF includes 00029 #include <OMF/ModelObject.hpp> 00030 00031 // Model includes 00032 #include <Model/ModelPackage.hpp> 00033 00034 namespace Model 00035 { 00036 // forward declarations 00037 class Namespace; 00038 class Constraint; 00039 00048 class ModelElement : virtual public OMF::ModelObject 00049 { 00050 public: 00051 typedef OMF::BasicClass<ModelElement, OMF::Abstract> Proxy; 00052 00053 ModelElement(); 00054 virtual ~ModelElement(); 00055 00056 const OMF::String &name() const; 00057 void setName(const OMF::String &name); 00058 void clearName(); 00059 00060 const OMF::String &annotation() const; 00061 void setAnnotation(const OMF::String &annotation); 00062 void clearAnnotation(); 00063 00064 const OMF::Set &requiredElements() const; 00065 void addRequiredElements(ModelElement *element); 00066 void removeRequiredElements(ModelElement *element); 00067 void clearRequiredElements(); 00068 00069 const OMF::Set &constraints() const; 00070 void addConstraints(Constraint *constraint); 00071 void removeConstraints(Constraint *constraint); 00072 void clearConstraints(); 00073 00074 Namespace *container(); 00075 void setContainer(Namespace *container); 00076 void clearContainer(); 00077 00085 const OMF::List &qualifiedName(); 00086 00101 OMF::Set findRequiredElements(const OMF::Set &kinds, 00102 const OMF::Boolean &recursive); 00103 00115 OMF::Boolean isRequiredBecause(ModelElement *otherElement, 00116 OMF::String &reason); 00117 00126 OMF::Boolean isFrozen(); 00127 00139 OMF::Boolean isVisible(ModelElement *otherElement); 00140 00141 private: 00142 OMF::String _name; 00143 OMF::String _annotation; 00144 OMF::List _qualifiedName; 00145 OMF::Set _requiredElements; 00146 OMF::Set _constraints; 00147 Namespace *_container; 00148 }; 00149 } 00150 00151 #endif

Generated on Fri Sep 10 13:07:33 2004 for OpenModelingFramework by doxygen 1.3.8