Results 1 to 2 of 2

Thread: using (de-)serialize-methods of ice

  1. #1
    thomas is offline Registered User
    Name: Thomas Hentschel
    Organization: Technical University of Munich
    Project: intelligent information distribution system
    Join Date
    Jul 2011
    Posts
    9

    using (de-)serialize-methods of ice

    Hi,
    the ice-runtime must use an algorithm for serializing and unserializing of prameters and ice-classes.
    How to use this algorithms in my program? I need this because I need to write some ice-class-objects to a database without knowing the structure of an object.

    for example:

    Code:
    data.ice
    
    module MyModule{
        class A { int alpha; };
    };
    
    server.ice
    #include "data.ice"
    module MyModule {
        interface MyInterface {
            void doStuff(A a);
        };
    };
    
    client.ice
    #include "data.ice"
    module MyModule
    {
        class B extends A  { int beta; };
    };
    The server only knows of class A and teh client extends that class to class B and calls the doStuff-method mit an object of class B. I know that no extended information is lost by calling the implementation of the method doStuff. The doStuff-method should insert the passed object to a database.

  2. #2
    marc's Avatar
    marc is offline ZeroC Staff
    Name: Marc Laukien
    Organization: ZeroC, Inc.
    Project: The Internet Communications Engine
    Join Date
    Feb 2003
    Location
    Florida
    Posts
    1,860
    The easiest way to do this is to use Blobjects, provided that you do not want to interpret the parameters of the operation call at all, but simply handle them as a sequence of bytes.

    If you need more control, you can use Dynamic Ice and InputStream, and interpret some of the parameters using InputStream's operations, and others, with some knowledge of the Ice protocol and how it encodes classes, as a sequence of bytes.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 08-15-2011, 05:44 AM
  2. Replies: 3
    Last Post: 10-05-2008, 04:45 PM
  3. Could I use ICE only for serialize purpose?
    By ablmf in forum Help Center
    Replies: 1
    Last Post: 08-15-2008, 09:05 AM
  4. serialize data into Freeze database
    By aseco in forum Help Center
    Replies: 8
    Last Post: 04-20-2005, 02:01 PM
  5. Replies: 2
    Last Post: 01-24-2004, 09:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •