rwlogo

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Macros
inter.h File Reference
#include <ilviews/ilv.h>
#include <ilviews/macros.h>
#include <ilviews/base/clssinfo.h>
#include <ilviews/graphics/io.h>
#include <ilviews/util/proplist.h>

Classes

class  IlvInteractor
 Abstract base class for interactors. More...
 

Macros

#define DeclareInteractorTypeInfo(classname)
 Declares persistence-related member functions for an IlvInteractor subtype. More...
 
#define DeclareInteractorTypeInfoRO(classname)
 Declares persistence-related member functions for an IlvInteractor subtype that defines no write() method. More...
 
#define IlvPredefinedInteractorIOMembers(classname)
 Defines persistence-related member functions for object interactors. More...
 
#define IlvRegisterInteractorClass(classname, superclass)
 Registers a new IlvInteractor subclass. More...
 
#define IlvRegisterSharedInteractorClass(classname, superclass, sharedName)
 Registers a new IlvInteractor subclass with a shared instance. More...
 

Detailed Description

Library: views Declaration of the IlvInteractor class.

Macro Definition Documentation

#define DeclareInteractorTypeInfo (   classname)

Declares persistence-related member functions for an IlvInteractor subtype.

This macro declares two constructors and the write() member function in a class declaration for any interactor class. These constructors make it easier to create subclasses of IlvInteractor.

This macro is equivalent to the lines:

className(const className& source);
className(IlvInputFile& inputFile,
IlvPalette* palette = 0);
virtual void write(IlvOutputFile& outputFile) const;

className The name of the interactor class.

See Also
DeclareInteractorTypeInfoRO().
#define DeclareInteractorTypeInfoRO (   classname)

Declares persistence-related member functions for an IlvInteractor subtype that defines no write() method.

This macro declares two constructors in a class declaration for any interactor class. These constructors make it easier to create subclasses of IlvInteractor.

This macro is equivalent to the lines:

className(const className& source);
className(IlvInputFile& inputFile,
IlvPalette* palette = 0);

className The name of the interactor class.

See Also
DeclareInteractorTypeInfo().
#define IlvPredefinedInteractorIOMembers (   classname)

Defines persistence-related member functions for object interactors.

This macro to define the member functions copy() and read() of a subclass of IlvInteractor.

This macro must be used in the implementation file, outside any function definition block, just like IlvRegisterInteractorClass().

It is equivalent to:

className::Read(IlvInputFile& input)
{
return new className(input);
}
className::copy() const
{
return new className(*this);
}

className is the name of the interactor class.

See Also
IlvRegisterInteractorClass(), DeclareInteractorTypeInfo().
#define IlvRegisterInteractorClass (   classname,
  superclass 
)

Registers a new IlvInteractor subclass.

When you define a subclass of IlvInteractor, if you want to be able to save and restore instances of this class you must redefine the write() member function of IlvInteractor, define a constructor that expects an input file, and register the new class by means of this macro.

This macro must be used in the implementation file, outside any function definition block.

Note
This macro is an initialization macro and should be called only once for each new subtype of the object interactor class.

The arguments are C++ identifiers specifying a C++ class and its superclass. For example, the line IlvRegisterInteractorClass(MyButtonInteractor, IlvButtonInteractor); registers the fact that the MyButtonInteractor class is a subclass of the IlvButtonInteractor class.

#define IlvRegisterSharedInteractorClass (   classname,
  superclass,
  sharedName 
)

Registers a new IlvInteractor subclass with a shared instance.

This macro is equivalent to the IlvRegisterInteractorClass() macro.

It also registers a shared instance unser the name sharedName. This instance can be accessed with the IlvInteractor::Get function.

See Also
IlvRegisterInteractorClass().

© Copyright 2015, 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.