Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
#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... | |
Defines | |
#define | DeclareInteractorTypeInfo(classname) |
Declares persistence-related member functions for an IlvInteractor subtype. | |
#define | DeclareInteractorTypeInfoRO(classname) |
Declares persistence-related member functions for an IlvInteractor subtype that defines no write method. | |
#define | IlvPredefinedInteractorIOMembers(classname) |
Defines persistence-related member functions for object interactors. | |
#define | IlvRegisterInteractorClass(classname, superclass) |
Registers a new IlvInteractor subclass. | |
#define | IlvRegisterSharedInteractorClass(classname, superclass, sharedName) |
Registers a new IlvInteractor subclass with a shared instance. |
[library views ilviews/base/inter.h] Declaration of the IlvInteractor class.
#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
.
className is the name of the interactor class.
This macro is equivalent to the lines:
className(const className& source); className(IlvInputFile& inputFile, IlvPalette* palette = 0); virtual void write(IlvOutputFile& outputFile) const;
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
.
className is the name of the interactor class.
This macro is equivalent to the lines:
className(const className& source); className(IlvInputFile& inputFile, IlvPalette* palette = 0);
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
.
className is the name of the interactor class.
This macro must be used in the implementation file, outside any function definition block, just like IlvRegisterInteractorClass
.
It is equivalent to:
IlvInteractor* className::Read(IlvInputFile& input) { return new className(input); } IlvInteractor* className::copy() const { return new className(*this); }
#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.
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.
IlvRegisterInteractorClass
. © 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.