[xsd-users] Re: xsd-users Digest, Vol 45, Issue 13

hjzheng818 hjzheng818 at 126.com
Mon Mar 23 02:49:47 EDT 2009


hello,i comple "exampels/cxx/tree/library/library.cxx" by command :
#xlC -I/home/publib/xsd-3.2.0-powerpc-aix/libxsd -I/home/publib/xerces-c-3.0.1-powerpc-aix-xlc-7.0/include -c driver.cxx library.cxx 
error info :
"/home/publib/xsd-3.2.0-powerpc-aix/libxsd/xsd/cxx/tree/serialization/unsigned-int.hxx", line 38.7: 1540-1283 (I) "template <class C> xsd::cxx::tree::operator<<(list_stream<C> &, unsigned int)" is not a viable candidate. 

why? 
thanks.


2009-03-23 



hjzheng818 



发件人: xsd-users-request 
发送时间: 2009-03-22  00:03:41 
收件人: xsd-users 
抄送: 
主题: xsd-users Digest, Vol 45, Issue 13 
 
Send xsd-users mailing list submissions to
xsd-users at codesynthesis.com
To subscribe or unsubscribe via the World Wide Web, visit
http://codesynthesis.com/mailman/listinfo/xsd-users
or, via email, send a message with subject or body 'help' to
xsd-users-request at codesynthesis.com
You can reach the person managing the list at
xsd-users-owner at codesynthesis.com
When replying, please edit your Subject line so it is more specific
than "Re: Contents of xsd-users digest..."
Today's Topics:
   1. Re: Storing sequence data in C++/Parser (Boris Kolpackov)
   2. prgram crashes on deletion xsd::cxx::tree::optional instance
      (Jan Klimke)
----------------------------------------------------------------------
Message: 1
Date: Fri, 20 Mar 2009 18:16:45 +0200
From: Boris Kolpackov <boris at codesynthesis.com>
Subject: Re: [xsd-users] Storing sequence data in C++/Parser
To: Vinaya Shrestha <vinayashrestha at gmail.com>
Cc: xsd-users at codesynthesis.com
Message-ID: <boris.20090320181404 at codesynthesis.com>
Content-Type: text/plain; charset=us-ascii
Hi Vinaya,
In the future please use a more descriptive subject line. For this and
other posting guidelines, see:
http://www.codesynthesis.com/support/posting-guidelines.xhtml
Vinaya Shrestha <vinayashrestha at gmail.com> writes:
> class Member_pimpl: public Member_pskel
> {
>         private:
>                string id;
>                string name;
>                string dob;
> };
>
> ...
>
> I have used these two classes to store the XML information. Things were
> fine, when there was a single member node. But as I added up more member
> nodes, I could not figure out how to store all the Member nodes.
The Member_pimpl parser will be called for each member element in your
XML document and it is up to you to make sure that the subsequent calls
don't override the data stored on the current iterator. You can, for
example, use std::vector to sore an entry for each member element:
class Member_pimpl: public Member_pskel
{
private:
  struct Member
  {
    string id;
    string name;
    string dob;
  };
  std::vector<Member> members_;
};
You can do
members_.push_back (Member ());
in pre() and then in id(), name(), and dob() fill in the members using
members_.back (), for example:
members_.back ().id = id;
Boris
------------------------------
Message: 2
Date: Sat, 21 Mar 2009 16:13:25 +0100
From: Jan Klimke <jan.klimke at hpi.uni-potsdam.de>
Subject: [xsd-users] prgram crashes on deletion
xsd::cxx::tree::optional instance
To: xsd-users at codesynthesis.com
Message-ID: <49C50415.40709 at hpi.uni-potsdam.de>
Content-Type: text/plain; charset=ISO-8859-15
Hi all,
i got a Problem when trying to delete an instance of an Object which
contains an xsd::cxx::tree::optional somewhere..
It seems like it tries to delete a pointer which is not set or already
deleted.
This does not happen every time whe i call delete on a csd-generated
object instance.
Do you have any hint where i could have a look at ?

Here are the last lines of my call stack, maybe it helps to answer my
question:
   
wfs_debug.dll!xsd::cxx::tree::optional<gml::AbstractFeatureType,0>::~optional<gml::AbstractFeatureType,0>() 
Line 111 + 0x32 bytes    C++
    
wfs_debug.dll!gml::FeaturePropertyTypeBase::~FeaturePropertyTypeBase() 
Line 659 + 0x83 bytes    C++
     wfs_debug.dll!gml::FeaturePropertyType::~FeaturePropertyType()  +
0x2b bytes    C++
     wfs_debug.dll!gml::FeaturePropertyType::`vector deleting
destructor'()  + 0x69 bytes    C++
>    wfs_debug.dll!xsd::cxx::tree::sequence_common::ptr::~ptr()  Line
772 + 0x36 bytes    C++
     wfs_debug.dll!xsd::cxx::tree::sequence_common::ptr::`scalar
deleting destructor'()  + 0x2b bytes    C++
    
wfs_debug.dll!std::_Destroy<xsd::cxx::tree::sequence_common::ptr>(xsd::cxx::tree::sequence_common::ptr
* _Ptr=0x0eb41e78)  Line 60    C++
    
wfs_debug.dll!std::allocator<xsd::cxx::tree::sequence_common::ptr>::destroy(xsd::cxx::tree::sequence_common::ptr
* _Ptr=0x0eb41e78)  Line 160 + 0x9 bytes    C++
    
wfs_debug.dll!std::_Destroy_range<std::allocator<xsd::cxx::tree::sequence_common::ptr>
>(xsd::cxx::tree::sequence_common::ptr * _First=0x0eb41e78,
xsd::cxx::tree::sequence_common::ptr * _Last=0x0eb41e7c,
std::allocator<xsd::cxx::tree::sequence_common::ptr> & _Al={...},
std::_Nonscalar_ptr_iterator_tag __formal={...})  Line 234 + 0xc
bytes    C++
    
wfs_debug.dll!std::_Destroy_range<std::allocator<xsd::cxx::tree::sequence_common::ptr>
>(xsd::cxx::tree::sequence_common::ptr * _First=0x0eb41e78,
xsd::cxx::tree::sequence_common::ptr * _Last=0x0eb41e7c,
std::allocator<xsd::cxx::tree::sequence_common::ptr> & _Al={...})  Line
225 + 0x2f bytes    C++
    
wfs_debug.dll!std::vector<xsd::cxx::tree::sequence_common::ptr,std::allocator<xsd::cxx::tree::sequence_common::ptr>
>::_Destroy(xsd::cxx::tree::sequence_common::ptr * _First=0x0eb41e78,
xsd::cxx::tree::sequence_common::ptr * _Last=0x0eb41e7c)  Line 1119 +
0x14 bytes    C++
    
wfs_debug.dll!std::vector<xsd::cxx::tree::sequence_common::ptr,std::allocator<xsd::cxx::tree::sequence_common::ptr>
>::_Tidy()  Line 1132    C++
    
wfs_debug.dll!std::vector<xsd::cxx::tree::sequence_common::ptr,std::allocator<xsd::cxx::tree::sequence_common::ptr>
>::~vector<xsd::cxx::tree::sequence_common::ptr,std::allocator<xsd::cxx::tree::sequence_common::ptr>
>()  Line 560    C++
     wfs_debug.dll!xsd::cxx::tree::sequence_common::~sequence_common() 
+ 0x2e bytes    C++
    
wfs_debug.dll!xsd::cxx::tree::sequence<gml::FeaturePropertyType,0>::~sequence<gml::FeaturePropertyType,0>() 
+ 0x2b bytes    C++
    
wfs_debug.dll!schemas::coll::CommentBaseTypeBase::~CommentBaseTypeBase() 
Line 1755 + 0x8c bytes    C++
    
wfs_debug.dll!schemas::coll::CommentBaseTypeImpl<schemas::coll::CommentBaseTypeBase>::~CommentBaseTypeImpl<schemas::coll::CommentBaseTypeBase>() 
+ 0x2b bytes    C++
     wfs_debug.dll!schemas::coll::CommentType::~CommentType()  Line 2005
+ 0x2f bytes    C++
    
wfs_debug.dll!schemas::coll::TextCommentTypeBase::~TextCommentTypeBase() 
Line 2194 + 0x1d bytes    C++
    
wfs_debug.dll!schemas::coll::TextCommentTypeImpl<schemas::coll::TextCommentTypeBase>::~TextCommentTypeImpl<schemas::coll::TextCommentTypeBase>() 
+ 0x2b bytes    C++
    
wfs_debug.dll!schemas::coll::TextCommentTypeImpl<schemas::coll::TextCommentTypeBase>::`vector
deleting destructor'()  + 0x6c bytes    C++
Kind regards,
Jan
------------------------------
_______________________________________________
xsd-users mailing list
xsd-users at codesynthesis.com
http://codesynthesis.com/mailman/listinfo/xsd-users
End of xsd-users Digest, Vol 45, Issue 13
*****************************************


More information about the xsd-users mailing list