Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
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:

1 className(const className& source);
2 className(IlvInputFile& inputFile,
3  IlvPalette* palette = 0);
4 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:

1 className(const className& source);
2 className(IlvInputFile& inputFile,
3  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:

1 IlvInteractor*
2 className::Read(IlvInputFile& input)
3 {
4  return new className(input);
5 }
6 
7 IlvInteractor*
8 className::copy() const
9 {
10  return new className(*this);
11 }

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 under the name sharedName. This instance can be accessed with the IlvInteractor::Get function.

See also
IlvRegisterInteractorClass().

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