Back to index

nordugrid-arc-nox  1.1.0~rc6
Functions | Variables
simpletype.cpp File Reference
#include <string>
#include <iostream>
#include <arc/XMLNode.h>
#include <arc/StringConv.h>
#include "schemaconv.h"

Go to the source code of this file.

Functions

void simpletypeprintnamed (const std::string &cppspace, const std::string &ntype, XMLNode stype, const std::string &ns, std::ostream &h_file, std::ostream &cpp_file)
void simpletypeprint (XMLNode stype, const std::string &ns, std::ostream &h_file, std::ostream &cpp_file)

Variables

static const char * simple_type_pattern_h
static const char * simple_type_pattern_cpp

Function Documentation

void simpletypeprint ( XMLNode  stype,
const std::string &  ns,
std::ostream &  h_file,
std::ostream &  cpp_file 
)

Definition at line 50 of file simpletype.cpp.

                                                                                                {
  std::string ntype;
  if(stype.Name() == "simpleType") {
    ntype = (std::string)(stype.Attribute("name"));
    h_file<<"//simple type: "<<ntype<<std::endl;
  } else if(stype.Name() == "complexType") {
    XMLNode extension = stype["xsd:simpleContent"]["xsd:extension"];
    if(!extension) return;
    ntype = (std::string)(stype.Attribute("name"));
    h_file<<"//complex type: "<<ntype<<" (simple content)"<<std::endl;
  } else {
    return;
  }
  simpletypeprintnamed("",ntype,stype,ns,h_file,cpp_file);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void simpletypeprintnamed ( const std::string &  cppspace,
const std::string &  ntype,
XMLNode  stype,
const std::string &  ns,
std::ostream &  h_file,
std::ostream &  cpp_file 
)

Definition at line 45 of file simpletype.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const char* simple_type_pattern_cpp [static]
Initial value:
"\
%1$s %1$s::New(Arc::XMLNode parent) {\n\
  Arc::NS ns;\n\
  ns[\"ns\"]=\"%2$s\";\n\
  %1$s el(parent.NewChild(\"ns:%1$s\",ns));\n\
  return el;\n\
}\n\
\n\
%1$s::%1$s(Arc::XMLNode node):Arc::XMLNode(node){\n\
  Arc::NS ns;\n\
  ns[\"ns\"]=\"%2$s\";\n\
  Namespaces(ns);\n\
}\n\
\n\
"

Definition at line 29 of file simpletype.cpp.

const char* simple_type_pattern_h [static]
Initial value:
"\
class %1$s: public Arc::XMLNode {\n\
 public:\n\
  static %1$s New(Arc::XMLNode parent);\n\
  %1$s(Arc::XMLNode node);\n\
};\n\
\n\
"

Definition at line 18 of file simpletype.cpp.