SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
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 Symbols

(Note that these are not member symbols.)

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

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

◆ RWTInsertProxy()

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 Symbol Documentation

◆ rwInsertWithName()

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);
RWTInsertProxy< T > rwInsertWithName(RWCString myName, T &myObject)
Global function that inserts an object and its name into an object stream.
Definition RWTInsertProxy.h:72

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