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

Generated by  doxygen 1.6.2