From 9a764d4ed5606c5f171ae05a7409128a88184b11 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 21 May 2010 19:18:52 +0200 Subject: Pool polymorphic type-id strings in binary representations Add support for an implicit string pool in istream and ostream templates. Use this support to pool type namespace and name when dealing with polymorphic types. --- tests/cxx/tree/binary/polymorphic/driver.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests') diff --git a/tests/cxx/tree/binary/polymorphic/driver.cxx b/tests/cxx/tree/binary/polymorphic/driver.cxx index 3c3e057..1b537d1 100644 --- a/tests/cxx/tree/binary/polymorphic/driver.cxx +++ b/tests/cxx/tree/binary/polymorphic/driver.cxx @@ -11,6 +11,8 @@ #include #include +#include // ACE_HEX_DUMP + #include "test.hxx" using namespace std; @@ -35,6 +37,19 @@ main (int argc, char* argv[]) xml_schema::ostream ocdr (ace_ocdr); ocdr << *r; + /* + // Print the binary representation. + // + cerr << "binary representation size: " << ace_ocdr.total_length () << endl; + + for (const ACE_Message_Block* mb = ace_ocdr.begin (); + mb != 0; + mb = mb->cont ()) + { + ACE_HEX_DUMP ((LM_DEBUG, mb->rd_ptr (), mb->length ())); + } + */ + // Load from a CDR stream. // ACE_InputCDR ace_icdr (ace_ocdr); -- cgit v1.1