SimpleType Class Reference

#include <SimpleType.h>

Inheritance diagram for SimpleType:

Inheritance graph
[legend]
Collaboration diagram for SimpleType:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SimpleType (const Wsdl &wsdl, const Xml::XmlNode &node, const std::string &name="", const std::string &ns_prefix="")
 ~SimpleType ()
const std::string & Name () const
const std::string Documentation () const
void CreateInterface (FILE *fil, int lvl=1) const
const std::string CType () const

Private Attributes

std::string m_name
std::list< std::pair
< std::string, std::string > > 
m_enum


Detailed Description

Definition at line 32 of file SimpleType.h.


Constructor & Destructor Documentation

SimpleType::SimpleType ( const Wsdl wsdl,
const Xml::XmlNode &  node,
const std::string &  name = "",
const std::string &  ns_prefix = "" 
)

Definition at line 30 of file SimpleType.cpp.

References TypeBase::Documentation(), m_enum, and TypeBase::SetType().

00031 : TypeBase(wsdl, node, ns_prefix, Split(name).Type)
00032 , m_name(!name.empty() ? name : node.PropertyExists("name") ? node.GetProperty("name") : "")
00033 {
00034         Xml::XmlNode n(node, "restriction");
00035         if (n)
00036         {
00037                 if (n.PropertyExists("base"))
00038                 {
00039                         std::string type = n.GetProperty("base");
00040                         SetType(type);
00041                 }
00042                 Xml::XmlNode n2(n, "enumeration");
00043                 while (n2)
00044                 {
00045                         std::string value = n2.GetProperty("value");
00046                         std::string doc = TypeBase::Documentation(n2);
00047                         m_enum.push_back(std::pair<std::string, std::string>(value, doc));
00048                         ++n2;
00049                 }
00050         }
00051 }

SimpleType::~SimpleType (  ) 

Definition at line 54 of file SimpleType.cpp.

00055 {
00056 }


Member Function Documentation

const std::string& SimpleType::Name (  )  const [inline]

Definition at line 38 of file SimpleType.h.

References m_name.

00038 { return m_name; }

const std::string SimpleType::Documentation (  )  const

Definition at line 59 of file SimpleType.cpp.

References TypeBase::Documentation(), and TypeBase::m_node.

00060 {
00061         return TypeBase::Documentation(m_node);
00062 }

void SimpleType::CreateInterface ( FILE *  fil,
int  lvl = 1 
) const

Definition at line 65 of file SimpleType.cpp.

References CType(), and m_name.

Referenced by Wsdl::CreateInterface(), and ComplexType::CreateInterface().

00066 {
00067         for (int i = 0; i < lvl; i++)
00068                 fprintf(fil, "\t");
00069         fprintf(fil, "typedef %s %s;\n\n", CType().c_str(), Split(m_name).CName.c_str());
00070 }

const std::string SimpleType::CType (  )  const


Member Data Documentation

std::string SimpleType::m_name [private]

Definition at line 46 of file SimpleType.h.

Referenced by CreateInterface(), and Name().

std::list<std::pair<std::string, std::string> > SimpleType::m_enum [private]

Definition at line 47 of file SimpleType.h.

Referenced by SimpleType().


The documentation for this class was generated from the following files:

Generated on Sun Oct 11 10:57:20 2009 for Xml Schema class generator by  doxygen 1.5.5