[xsde-users] Q: Overriding an optional field (BaseURL)

Rangarajan, Ravi_Sowmian raviraja at qti.qualcomm.com
Tue Jul 15 14:47:03 EDT 2014


Hi Boris,
Thanks so much for your response. I have included the errors I get for option 1, which you think should work. I have also tried few other options and errors for those included below. It will be great to hear from you on what is missing and get it resolved.
Thanks
Ravi

1)
*baseUrlIter = customBaseUrl

Mymodule.cpp:1417: error: no match for operator= in baseUrlIter.xsd::cxx::tree::iterator_adapter<I, T>::operator* [with I = __gnu_cxx::__normal_iterator<xsd::cxx::tree::sequence_common::ptr*, std::vector<xsd::cxx::tree::sequence_common::ptr, std::allocator<xsd::cxx::tree::sequence_common::ptr> > >, T = mpd_2011::BaseURLType]() = customBaseUrl

../../../../../lib/eps/epc/bmsc/xsd/MPD2.h:3646: note: candidates are: mpd_2011::BaseURLType& mpd_2011::BaseURLType::operator=(const mpd_2011::BaseURLType&)
In file included from ../../../../../thirdParty/codesynthesis/libxsd/xsd/cxx/tree/list.hxx:16,
                 from ../../../../../thirdParty/codesynthesis/libxsd/xsd/cxx/tree/types.hxx:26,
                 from ../../../../../lib/eps/epc/bmsc/xsd/xml.h:62,
                 from Mymodule.h:39,
                 from Mymodule.cpp:43

The other alternatives I have thought about (not successful yet in getting either to work) are:

a)
(*baseUrlIter).serviceLocation.set(customBaseUrl);
(*baseUrlIter).byteRange.set("")

c)
construct an object of type BaseUrlType say newBaseUrl and then assign to
(*baseUrlIter) = newBaseUrl;

But am getting errors below for option a and I haven't been successful constructing a BaseURLType object that can be assigned to (*baseUrlIter).

Mymodule.cpp:1150: error: burlIter.xsd::cxx::tree::iterator_adapter<I, T>::operator* [with I = __gnu_cxx::__normal_iterator<xsd::cxx::tree::sequence_common::ptr*, std::vector<xsd::cxx::tree::sequence_common::ptr, std::allocator<xsd::cxx::tree::sequence_common::ptr> > >, T = mpd_2011::BaseURLType]()->mpd_2011::BaseURLType::serviceLocation does not have class type

-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com] 
Sent: Monday, July 14, 2014 11:46 PM
To: Rangarajan, Ravi_Sowmian
Cc: xsde-users at codesynthesis.com
Subject: Re: [xsde-users] Q: Overriding an optional field (BaseURL)

Hi Ravi,

Rangarajan, Ravi_Sowmian <raviraja at qti.qualcomm.com> writes:

> If I do  *baseUrlIter = customBaseUrl, it doesn't like it. 

This should work. Specifically:

MPD_2011::MPDtype::BaseURL_sequence &BaseURLseq = myMPD->BaseURL(); MPD_2011::MPDtype::BaseURL_iterator baseUrlIter = BaseURLseq.begin(); if (baseUrlIter != BaseURLseq.end()) {
  *baseUrlIter = customBaseUrl;
}

If this still doesn't work, can you be more specific than "it doesn't like it" (i.e., compiler error, runtime behaviour is wrong, etc)?

Boris



More information about the xsde-users mailing list