SourcePro® API Reference Guide

Product Documentation:
   SourcePro
Documentation Home
List of all members | Public Member Functions | Related Functions
RWTInsertProxy< T > Class Template Reference

Proxy object for inserting objects with an instance name into object streams. More...

#include <rw/serial/RWTInsertProxy.h>

Public Member Functions

 RWTInsertProxy (RWCString myName, T &myObject)
 

Related Functions

(Note that these are not member functions.)

template<class T >
RWTInsertProxy< T > rwInsertWithName (RWCString myName, T &myObject)
 Global function that inserts an object and its name into an object stream. More...
 

Detailed Description

template<class T>
class RWTInsertProxy< T >

A proxy object for inserting objects with an instance name into object streams.

This class is typically used by calling the convenience global function rwInsertWithName().

Constructor & Destructor Documentation

template<class T >
RWTInsertProxy< T >::RWTInsertProxy ( RWCString  myName,
T &  myObject 
)
inline

Constructs a proxy object using the parameter myName for the instance name and myObject for the instance object. Inserting the proxy object into an object stream causes the string contained by myName to be used as the name for the object.

Not all object streams support this feature. For example, the compact object streams in the Serialization package do not provide support, while the XML object streams in the XML Streams Module do provide support.

Friends And Related Function Documentation

template<class T >
RWTInsertProxy< T > rwInsertWithName ( RWCString  myName,
T &  myObject 
)
related
Header File
#include <rw/serial/RWTInsertProxy.h>

Global function that inserts an object and its name into an object stream.

Example
out << rwInsertWithName( "foo", foo );

Copyright © 2021 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.