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

Group.h

Go to the documentation of this file.
00001 /* 
00002  * wsdlpull - A C++ parser  for WSDL  (Web services description language)
00003  * Copyright (C) 2005-2007 Vivek Krishna
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Library General Public
00016  * License along with this library; if not, write to the Free
00017  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018  *
00019  */
00020 
00021 #ifndef GROUP_H
00022 #define GROUP_H
00023 // *********************************************************************
00024 // Include files:
00025 // *********************************************************************
00026 #include <string>
00027 #include <schemaparser/Schema.h>
00028 #include <schemaparser/ContentModel.h>
00029 using namespace std;
00030 
00031 class Group
00032 {
00033  public:
00034   Group();
00035   ~Group();
00036   Group(const Group & g);
00037   Group(const std::string & name,
00038         int min,
00039         int max);
00040   int min()const;
00041   void setMin(int m);
00042   
00043   int max() const;
00044   void setMax(int m);
00045   
00046   string getName()const;
00047   void setName(const string & n);
00048 
00049   void setAnnotation(const string & s);
00050   ContentModel * getContents()const;
00051   void setContents(const ContentModel* cm,bool isRef=false);
00052  private:
00053   int maxOccurs_;
00054   int minOccurs_;
00055   std::string name_;
00056   std::string annotation_;
00057   ContentModel * cm_;
00058   bool ref_;
00059 };
00060 
00061 
00062 inline
00063 string 
00064 Group::getName()const
00065 {
00066   return name_;
00067 }
00068 
00069 inline
00070 void
00071 Group::setName(const string &n)
00072 {
00073   name_=n;
00074 }
00075 
00076 inline
00077 void
00078 Group::setAnnotation(const string &s)
00079 {
00080   annotation_=s;
00081 }
00082 
00083 inline
00084 int 
00085 Group::max() const 
00086 {
00087   return maxOccurs_;
00088 }
00089 
00090 inline
00091 int 
00092 Group::min() const
00093 {
00094   return minOccurs_;
00095 }
00096 
00097 inline
00098 void 
00099 Group::setMin(int m) 
00100 {
00101   minOccurs_=m;
00102   
00103 }
00104 
00105 inline
00106 void 
00107 Group::setMax(int m) 
00108 {
00109   maxOccurs_=m;
00110   
00111 }
00112 
00113 inline
00114 ContentModel * 
00115 Group::getContents()const
00116 {
00117   return cm_;
00118   
00119 }
00120 
00121 inline
00122 void
00123 Group::setContents(const ContentModel* cm,bool setRef)
00124 {
00125   cm_=const_cast<ContentModel*> (cm);
00126   ref_=setRef;
00127 }
00128 
00129 #endif // GROUP_H

Generated on Sun Oct 16 10:11:52 2005 for wsdlpull by  doxygen 1.3.9.1