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 
00030 namespace Schema {
00031 
00032 class Group
00033 {
00034  public:
00035   Group();
00036   ~Group();
00037   Group(const Group & g);
00038   Group(const std::string & name,
00039         int minimum,
00040         int maximum);
00041   int getMin()const;
00042   void setMin(int m);
00043   
00044   int getMax() const;
00045   void setMax(int m);
00046   
00047   std::string getName()const;
00048   void setName(const std::string & n);
00049 
00050   void setAnnotation(const std::string & s);
00051   ContentModel * getContents()const;
00052   void setContents(const ContentModel* cm,bool isRef=false);
00053  private:
00054   int maxOccurs_;
00055   int minOccurs_;
00056   std::string name_;
00057   std::string annotation_;
00058   ContentModel * cm_;
00059   bool ref_;
00060 };
00061 
00062 
00063 inline
00064 std::string 
00065 Group::getName()const
00066 {
00067   return name_;
00068 }
00069 
00070 inline
00071 void
00072 Group::setName(const std::string &n)
00073 {
00074   name_=n;
00075 }
00076 
00077 inline
00078 void
00079 Group::setAnnotation(const std::string &s)
00080 {
00081   annotation_=s;
00082 }
00083 
00084 inline
00085 int 
00086 Group::getMax() const
00087 {
00088   return maxOccurs_;
00089 }
00090 
00091 inline
00092 int 
00093 Group::getMin() const
00094 {
00095   return minOccurs_;
00096 }
00097 
00098 inline
00099 void 
00100 Group::setMin(int m) 
00101 {
00102   minOccurs_=m;
00103   
00104 }
00105 
00106 inline
00107 void 
00108 Group::setMax(int m) 
00109 {
00110   maxOccurs_=m;
00111   
00112 }
00113 
00114 inline
00115 ContentModel * 
00116 Group::getContents()const
00117 {
00118   return cm_;
00119   
00120 }
00121 
00122 inline
00123 void
00124 Group::setContents(const ContentModel* cm,bool setRef)
00125 {
00126   cm_=const_cast<ContentModel*> (cm);
00127   ref_=setRef;
00128 }
00129 
00130 }
00131 #endif // GROUP_H

Generated on Mon Feb 6 23:02:42 2006 for wsdlpull by  doxygen 1.3.9.1