Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > C++ Middleware Writer version 1.10 is now on line

Reply
Thread Tools

C++ Middleware Writer version 1.10 is now on line

 
 
Brian
Guest
Posts: n/a
 
      11-29-2009

Release 1.10 of the C++ Middleware Writer is now available
on line. This release has the following changes:

1. Support added for stream constructors. Previously types
were required to have default constructors in order to be
(de)marshalled by the C++ Midddle Writer. A function named
Receive was then called to demarshall the object. Below is
an example of how the code has changed in this area. The
old version is shown first with some added comments to
indicate how things have changed in the new version.

inline void
Base::BuildPolyInstance(Buffer* buf, Base*& p)
{
unsigned short type_num; // --> uint16_t

buf->PersistentRead(&type_num, sizeof(type_num));
switch (type_num) {
case Base_num:
p = new Base; // --> p = new Base(buf);
break;

case Derived_num:
p = new Derived; // --> p = new Derived(buf);
break;

default:
throw failure("Base::BuildPolyInstance: Unknown type");
}

p->Receive(buf); // This typically virtual function call
} // is no longer needed.



// new version as of release 1.10.
inline void
Base::BuildPolyInstance(Buffer* buf, Base*& p)
{
uint16_t type_num;

buf->PersistentRead(&type_num, sizeof(type_num));
switch (type_num) {
case Base_num:
p = new Base(buf);
break;

case Derived_num:
p = new Derived(buf);
break;

default:
throw failure("Base::BuildPolyInstance: Unknown type");
}
}


2. Support added for int8_t, int16_t, int32_t, uint8_t,
uint16_t and uint32_t.

3. The command line interface to the C++ Middleware Writer --
http://webEbenezer.net/build_integration.html -- has been
tested on a big-endian Mac. The program also works on
little-endian machines.

I'm interested in hearing what your thoughts are on the
C++ Middleware Writer.


Shalom
Brian Wood
http://webEbenezer.net
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Release 1.13 of the C++ Middleware Writer now on line Brian C++ 2 05-13-2010 06:45 PM
Version 1.11 of C++ Middleware Writer now on line Brian C++ 3 02-28-2010 04:27 AM
New version of C++ Middleware Writer now on line woodbrian77@gmail.com C++ 1 05-20-2009 06:02 PM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? PA Bear [MS MVP] ASP .Net 0 02-05-2008 03:28 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? V Green ASP .Net 0 02-05-2008 02:45 AM



Advertisments