00001 00005 /* 00006 Copyright (C) 2008-2009 Anders Hedstrom 00007 00008 This program is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU General Public License 00010 as published by the Free Software Foundation; either version 2 00011 of the License, or (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program; if not, write to the Free Software 00020 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00021 */ 00022 #ifndef _Attribute_H 00023 #define _Attribute_H 00024 00025 #include <string> 00026 #include <list> 00027 #include "TypeBase.h" 00028 00029 class Wsdl; 00030 00031 class Attribute : public TypeBase 00032 { 00033 public: 00034 Attribute(const Wsdl& wsdl, const Xml::XmlNode& node, const std::string& name = "", const std::string& ns_prefix = ""); 00035 ~Attribute(); 00036 00037 const std::string& Name() const { return m_name; } 00038 const std::string& BaseType() const { return m_base_type; } 00039 const std::string Documentation() const; 00040 00041 const std::string CType() const; 00042 const std::string CName() const; 00043 const std::string CName1up() const; 00044 00045 bool IsOptional() const; 00046 bool IsSimpleType() const; 00047 00048 const std::string CType_decl() const; 00049 const std::string CType_in() const; 00050 const std::string CType_out() const; 00051 const std::string DefaultValue() const; 00052 00053 bool DefaultIsSet() const { return m_b_default_is_set; } 00054 bool FixedIsSet() const { return m_b_fixed_is_set; } 00055 00056 const std::string& Default() const { return m_default; } 00057 const std::string& Fixed() const { return m_fixed; } 00058 00059 private: 00060 std::string m_name; 00061 std::string m_base_type; 00062 std::string m_use; 00063 std::string m_default; 00064 bool m_b_default_is_set; 00065 std::string m_fixed; 00066 bool m_b_fixed_is_set; 00067 }; 00068 00069 00070 00071 00072 #endif // _Attribute_H