Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
Classes | Functions
adapter.h File Reference
#include <ilviews/base/graphic.h>
#include <ilviews/util/refcount.h>
#include <fstream.h>

Classes

class  IlvGraphicAdapter< ADAPTEE >
 Frame class to adapt any object as an IlvGraphic. More...
 

Functions

template<class OBJECT >
IlvRefCountPtr< IlvOwnership< OBJECT > > IlvRead (IlvInputFile &is, IlvReferenceStreamer &streamer)
 This helper function is used to load an object that may be shared by several adapters. More...
 
template<class OBJECT >
void IlvWrite (IlvOwnership< OBJECT > &ownership, IlvOutputFile &os, IlvReferenceStreamer &streamer)
 This helper function is used to save an object stored into an IlvOwnership<OBJECT> object. More...
 

Detailed Description

Library: views
This file contains the declaration of the IlvGraphicAdapter class and of some auxiliary functions.

Function Documentation

§ IlvRead()

template<class OBJECT >
IlvRefCountPtr<IlvOwnership<OBJECT> > IlvRead ( IlvInputFile is,
IlvReferenceStreamer &  streamer 
)

This helper function is used to load an object that may be shared by several adapters.

The type of the object, OBJECT, is given as the template parameter of the function.

The object is stored into an IlvOwnership object that is encapsulated into an IlvRefCountPtr.

Parameters
isA reference to an IlvInputFile from where to load the object.
streamerA reference to an IlvReferenceStreamer that will manage the sharing in order that all the adapters that share this object correctly loading of the sharing of the object.
Returns
An IlvRefCountPtr<IlvOwnership<OBJECT> > that contains the object that was loaded from the stream.

§ IlvWrite()

template<class OBJECT >
void IlvWrite ( IlvOwnership< OBJECT > &  ownership,
IlvOutputFile os,
IlvReferenceStreamer &  streamer 
)

This helper function is used to save an object stored into an IlvOwnership<OBJECT> object.

The type of the object, OBJECT, is given as the template parameter of the function.

Parameters
ownershipA reference to an IlvOwnership<OBJECT> instance that contains the object to be saved.
osA reference to an IlvOutputFile where to save the object.
streamerA reference to an IlvReferenceStreamer that will manage the sharing in order that the object is actually saved once only by the first adapter. When the object is shared by several adapters, only a reference is saved for all but the first one.

© Copyright 2018, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.