rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

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.
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.

Detailed Description

[library views ilviews/graphics/adapter.h] This file contains the declaration of the IlvGraphicAdapter class and of some auxiliary functions.


Function Documentation

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:
is A reference to an IlvInputFile from where to load the object.
streamer A 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.
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:
ownership A reference to an IlvOwnership<OBJECT> instance that contains the object to be saved.
os A reference to an IlvOutputFile where to save the object.
streamer A 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 2012, 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.