C++
Based on the XML Schema.
CodeSynthesis XSD is an open-source, cross-platform W3C XML Schema to C++ data binding compiler.
Windows Batch File
set XSD_HOME=..\..\model_based\xsd_variants
set XSD_EXE_FOLDER=C:\Programs\c++xsd\xsd-4.2.0-x86_64-windows10\bin
rem set XSD_EXE_FOLDER=E:\DDI\CDI\SyntaxRepresentation\encoding\c++\xsd-4.2.0-x86_64-windows10\bin
%XSD_EXE_FOLDER%\xsd.exe cxx-tree --root-element DDICDIModels %XSD_HOME%\ddi-cdi_42_noXsdTypeInName.xsd
rem %XSD_EXE_FOLDER%\xsd.exe cxx-tree --root-element DDICDIModels %XSD_HOME%\ddi-cdi_43_noXsdTypeInName.xsd
rem %XSD_EXE_FOLDER%\xsd.exe cxx-tree --root-element DDICDIModels %XSD_HOME%\ddi-cdi_44_noXsdTypeInName.xsd
rem %XSD_EXE_FOLDER%\xsd.exe cxx-tree --root-element DDICDIModels %XSD_HOME%\ddi-cdi_45_noXsdTypeInName.xsd
set XSD_HOME=
set XSD_EXE_FOLDER=
Source file run_xsd.cmd
Generated Files
A code file and a header file are generated for C++.
C++ Code File Fragment
#include <xsd/cxx/pre.hxx>
#include "ddi-cdi_44_noXsdTypeInName.hxx"
namespace XMLSchema
{
// DDICDIModels
//
const DDICDIModels::Activity_sequence& DDICDIModels::
Activity () const
{
return this->Activity_;
}
DDICDIModels::Activity_sequence& DDICDIModels::
Activity ()
{
return this->Activity_;
}
void DDICDIModels::
Activity (const Activity_sequence& s)
{
this->Activity_ = s;
}
Source file ddi-cdi.cxx
C++ Header File Fragment
// AuthorizationSource
//
typedef ::XMLSchema::AuthorizationSource AuthorizationSource_type;
typedef ::xsd::cxx::tree::sequence< AuthorizationSource_type > AuthorizationSource_sequence;
typedef AuthorizationSource_sequence::iterator AuthorizationSource_iterator;
typedef AuthorizationSource_sequence::const_iterator AuthorizationSource_const_iterator;
typedef ::xsd::cxx::tree::traits< AuthorizationSource_type, char > AuthorizationSource_traits;
const AuthorizationSource_sequence&
AuthorizationSource () const;
AuthorizationSource_sequence&
AuthorizationSource ();
void
AuthorizationSource (const AuthorizationSource_sequence& s);
// Category
//
typedef ::XMLSchema::Category Category_type;
typedef ::xsd::cxx::tree::sequence< Category_type > Category_sequence;
Source file ddi-cdi.hxx