ILS_MVVIEW_DECL
 
ILS_MVVIEW_DECL
Category 
Dynamic view-related macro (server side)
Description 
This macro declares a subtype of IlsMvView to the view interpreter on the server side. This declaration lets you specify dynamic view types that will be instantiated by a subtype of IlsMvView. It must be used together with the macros ILS_MVVIEW_BEGIN/ILS_MVVIEW_END.
For example, the following view specification:
view NetworkPanel:...
causes an instance of IlsMvView to be created each time a view NetworkPanel is opened.
However, the following view specification:
view NetworkPanel is MyMvView:...
causes an instance of MyMvView to be created each time a view NetworkPanel is opened.
Header File 
<ilserver/rtmodel.h>
Synopsis 
ILS_MVVIEW_DECL(viewType)
Constructor 
This macro declares the constructor of viewType to the view interpreter, which runs on the server side. Just as the macro ILS_OBJECT_DECL does for the Server type objType, the macro ILS_MVVIEW_DECL also declares viewType as a Server type accessible at runtime. The class viewType must inherit from IlsMvView directly or transitively. It must also declare and define a constructor with the following signature:
viewType::viewType(IlsMvComponentItf& compItf,
IlsViewed* mainOriginP,
const IlsMvViewType& viewType,
IlsMvValue* params,
int nbParams)
This constructor should trigger the corresponding constructor of its parent class.
For instance:
viewType::viewType(IlsMvComponentItf& compItf,
IlsViewed* mainOriginP,
const IlsMvViewType& viewType,
IlsMvValue* params,
int nbParams)
: IlsMvView(compItf,mainOriginP,viewType,params,nbParams)
{
...
}
The class viewType must also declare a default constructor, which exists only to declare viewType as a Server object type, but is never used.
Member Functions 
This macro defines the following function:
[static] viewType* viewType::Narrow(IlsMvView& view);
This static function performs a safe downcast on view. It returns 0 if view is not of the type viewType or of a derived type.
See Also 
ILS_OBJECT_DECL, IlsMvView, ILS_MVVIEW_BEGIN/ILS_MVVIEW_END, ILS_MVVIEW_INIT

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.