Views
Foundation Package API Reference Guide
Product Documentation:
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

◆ DeclareInteractorTypeInfo

#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().

◆ 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().

◆ IlvPredefinedInteractorIOMembers

#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().

◆ IlvRegisterInteractorClass

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

◆ IlvRegisterSharedInteractorClass

#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().
IlvOutputFile
Input/Output class.
Definition: io.h:69
IlvInputFile
Input/Output class.
Definition: io.h:306
IlvInteractor
Abstract base class for interactors.
Definition: inter.h:332
IlvPalette
Resource class.
Definition: IlvPalette.h:440