[xsd-users] FW: map files and extended types...

Dingelstad, John john.dingelstad at dhv.com
Sat Jul 17 10:37:19 EDT 2010


HI Boris,

 

I'm using the C++ parser to process DATEXII files.

 

Unfortunately this proves to be a hell of a job to set all the required mappings and after a slow start, I finally made some progress. Unfortunately I now got struck again and don't know to get further.

 

The issue I am trying to solve is related to the following piece of xsd code

      <xs:element name="measurementSpecificCharacteristics" maxOccurs="unbounded">

        <xs:complexType>

          <xs:complexContent>

            <xs:extension base="D2LogicalModel:MeasurementSpecificCharacteristics">

              <xs:attribute name="index" type="xs:int" use="required"/>

            </xs:extension>

          </xs:complexContent>

        </xs:complexType>

      </xs:element>

 

If defined the following object for D2LogicalModel:MeasurementSpecificCharacteristics

 

class MeasurementSpecificCharacteristics

{

public:

      MeasurementSpecificCharacteristics(float period, const std::string& specificLane, ::MeasuredOrDerivedDataTypeEnum specificMeasurementValueType, const ::VehicleCharacteristics& specificVehicleCharacteristics) : _period(period), _specificLane(specificLane), _specificMeasurementValueType(specificMeasurementValueType), _specificVehicleCharacteristics(specificVehicleCharacteristics)

      {

      }

 

//...

 

private:

      float                                     _period;

      std::string                               _specificLane;

      ::MeasuredOrDerivedDataTypeEnum     _specificMeasurementValueType;

      ::VehicleCharacteristics            _specificVehicleCharacteristics;

};

 

 

And the implementation is as follow:

 

      void MeasurementSpecificCharacteristics_pimpl::period(float period)

      {

            _period = period;

      }

 

      void MeasurementSpecificCharacteristics_pimpl::specificLane(const std::string& specificLane)

      {

            _specificLane = specificLane;

      }

 

      void MeasurementSpecificCharacteristics_pimpl::specificMeasurementValueType(::MeasuredOrDerivedDataTypeEnum specificMeasurementValueType)

      {

            _specificMeasurementValueType = specificMeasurementValueType;

      }

 

      void MeasurementSpecificCharacteristics_pimpl::specificVehicleCharacteristics(const ::VehicleCharacteristics& specificVehicleCharacteristics)

      {

            _specificVehicleCharacteristics = specificVehicleCharacteristics;

      }

 

      ::MeasurementSpecificCharacteristics MeasurementSpecificCharacteristics_pimpl::post_MeasurementSpecificCharacteristics ()

      {

            return ::MeasurementSpecificCharacteristics(_period, _specificLane, _specificMeasurementValueType, _specificVehicleCharacteristics);

      }

 

When I compile my code, I get an error stating datex2::measurementSpecificCharacteristics_pimpl' : no appropriate default constructor available

 

This seems to be due to the fact of the private variables I've declared in MeasurementSpecificCharacteristics_pimpl for _period etc. 

 

Anyway, what I want is to pass on the data of the MeasurementSpecificCharacteristics object along with the index to the MeasurementSiteRecord but have no clue ho to achive this is as all attempts to define a measurementSpecificCharacteristics object and/or altering the measurementSpecificCharacteristics_pimpl results in more problems... 

 

Can you please help me out on how I can deal with this issue? I've been looking in the examples as well but didn't find anything related to this in combination with map files

 

Many thanks in advance,

John Dingelstad







DISCLAIMER
===========================================================================
This e-mail and the information it contains are confidential and meant only for the use of
the addressee(s); disclosure or copying is strictly prohibited. If you are not addressed,
but in the possession of this e-mail, please notify the sender immediately.
===========================================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DATEXII Parsers.zip
Type: application/zip
Size: 295165 bytes
Desc: DATEXII Parsers.zip
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20100717/e17e0592/DATEXIIParsers-0001.zip


More information about the xsd-users mailing list