// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _Dynamic_HeaderFile #define _Dynamic_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif #ifndef _Dynamic_ModeEnum_HeaderFile #include #endif #ifndef _Standard_CString_HeaderFile #include #endif class Dynamic_Node; class Dynamic_Parameter; class Dynamic_BooleanParameter; class Dynamic_EnumerationParameter; class Dynamic_IntegerParameter; class Dynamic_RealParameter; class Dynamic_StringParameter; class Dynamic_ObjectParameter; class Dynamic_InstanceParameter; class Dynamic_ParameterNode; class Dynamic_Variable; class Dynamic_VariableGroup; class Dynamic_AbstractVariableInstance; class Dynamic_VariableInstance; class Dynamic_CompositVariableInstance; class Dynamic_VariableNode; class Dynamic_Method; class Dynamic_MethodDefinition; class Dynamic_CompiledMethod; class Dynamic_InterpretedMethod; class Dynamic_CompositMethod; class Dynamic_MethodInstance; class Dynamic_MethodDefinitionsDictionary; class Dynamic_SeqOfMethods; class Dynamic_SequenceOfMethods; class Dynamic_SeqOfMethodDefinitions; class Dynamic_SequenceOfMethodDefinitions; class Dynamic_DynamicClass; class Dynamic_DynamicDerivedClass; class Dynamic_SeqOfClasses; class Dynamic_SequenceOfClasses; class Dynamic_DynamicInstance; class Dynamic_FuzzyClass; class Dynamic_FuzzyDefinition; class Dynamic_SeqOfFuzzyDefinitions; class Dynamic_SequenceOfFuzzyDefinitions; class Dynamic_FuzzyDefinitionsDictionary; class Dynamic_FuzzyInstance; class Dynamic_SequenceNodeOfSeqOfMethods; class Dynamic_SequenceNodeOfSeqOfMethodDefinitions; class Dynamic_SequenceNodeOfSeqOfClasses; class Dynamic_SequenceNodeOfSeqOfFuzzyDefinitions; //! This package propose a set of abstract persistent
//! classes. These classes may be sort in three main
//! groups, which are :
//!
//! - fuzzy classes
//! - methods
//! - dynamic classes
//!
//! And in two complementary groups used by the
//! previously described family, which are :
//!
//! - parameter classes
//! - variable classes
//!
//! All the main classes are manipulated through two
//! steps which are :
//!
//! - the definition which gives the signature of the
//! object
//! - the instanciation which always references a
//! definition
//!
//! This separation has been created to clearly
//! separate the definition of an object, a method or
//! a class which is the description and the instance
//! which is the utilisation with a particular set of
//! values. In this case for few instanciations of
//! the same object, the definition can be unique.
//!
//! Each family address a particular problem.
//!
//! Dynamic class
//! -------------
//!
//! This family of classes offers the possibility to
//! define and to manipulate dynamically objets with
//! the same specifications as C++ objects.
//! Dynamically means without CDL description and
//! without compilation and link if all the methods
//! attached are interpreted methods.
//!
//! The first thing to do is to define the signature
//! of the class, in terms of fields and methods.
//!
//! You can also derive a class from others, add
//! fields, and add or redefine methods.
//!
//! Then instances of the class can be created and
//! values can be assigned to the fields.
//!
//! It is then possible to execute methods attached to
//! the definition of the class. These methods may set
//! computed values to other fields, or simply return
//! them.
//!
//! A method can be compiled or interpreted.
//!
//! Fuzzy class
//! -----------
//!
//! A fuzzy class is a degeneration of a dynamic
//! class. Only the fields are specified. These
//! classes are useful to describe objects with
//! various definitions, and with the number and the
//! nature of fields depending of the definition.
//!
//! The definitions of the lights for Photo Realistic
//! Renderer is an illutration of the use of the fuzzy
//! classes.
//!
//! These lights have the same definitions in terms of
//! parameters as the lights used in the LightWorks
//! module.
//!
//! For each type of light an exhaustive set of
//! parameters is described, and each parameter is
//! defined by its name, its type and, if necessary,
//! its default value as follows :
//!
//! ambient
//! "intensity" Standard_Real 1.0
//! "colour" Materials_PColor 1.0 1.0 1.0
//!
//! distant
//! "intensity" Standard_Real 1.0
//! "colour" Materials_PColor 1.0 1.0 1.0
//! "location" PGeom_CartesianPoint 0.0 0.0 1.0
//! "to" PGeom_CartesianPoint 0.0 0.0 0.0
//! "shadows" Standard_Boolean Standard_False
//! "shadow resolution" Standard_Integer 256
//! "shadow quality" Standard_Integer 4
//! "shadow softness" Standard_Real 1.0
//!
//! eye
//! "intensity" Standard_Real 1.0
//! "colour" Materials_PColor 1.0 1.0 1.0
//!
//! point
//! "intensity" Standard_Real 1.0
//! "colour" Materials_PColor 1.0 1.0 1.0
//! "location" PGeom_CartesianPoint 0.0 0.0 0.0
//! "fall off" LightWorks_LiFallOffType LI_FALL_OFF_CONSTANT
//! "shadows" Standard_Boolean Standard_False
//! "shadow resolution" Standard_Integer 256
//! "shadow quality" Standard_Integer 4
//! "shadow softness" Standard_Real 1.0
//!
//! spot
//! "intensity" Standard_Real 1.0
//! "colour" Materials_PColor 1.0 1.0 1.0
//! "location" PGeom_CartesianPoint 0.0 0.0 1.0
//! "to" PGeom_CartesianPoint 0.0 0.0 0.0
//! "fall off" LightWorks_LiFallOffType LI_FALL_OFF_CONSTANT
//! "cone angle" Standard_Real 60.0
//! "cone delta angle" Standard_Real 5.0
//! "beam distribution" Standard_Real 2.0
//! "shadows" Standard_Boolean Standard_False
//! "shadow resolution" Standard_Integer 256
//! "shadow quality" Standard_Integer 4
//! "shadow softness" Standard_Real 1.0
//!
//! All these definitions are described in a file
//! which is read at the first creation of a light
//! instance to be put in a dictionary.
//!
//! At the creation of an instance, just a reference
//! on the definition is set. All the parameter values
//! are read in the definition. If now a value of one
//! parameter is changed, the modified parameter is
//! added to the instance. So only the modified
//! parameters are directely attached to the instance.
//! This behaviour allows the use of an instance as
//! definition, and can be useful to create catalogs
//! of standards which can be directly questioned in
//! the database.
//!
//! The use of fuzzy classes needs four prerequisites
//! which are :
//!
//! - The creation of a file with the exhaustive
//! description of all the possible types taken by an
//! object and for each type the complete set of
//! parameters in terms of name, type, and, if
//! necessary, default value.
//!
//! - The inheritance from the class
//! FuzzyDefinitionsDictionary and, if necessary, the
//! redefinition of the Switch method for the non-
//! standard type of parameters described in the file.
//!
//! - The following method :
//!
//! void DictionaryOfDefinitions(Handle(MyPackage_MyDictionary)&);
//!
//! must be writen in the file MyPackage.cxx, because
//! this method is automatically called by the
//! constructor of FuzzyInstance. This method tests if
//! the dictionary has been created yet. If it is
//! true the method returns a reference to it,
//! otherwise the method creates the dictionary before
//! returning the reference.
//!
//! - The instanciation of the FuzzyInstance class
//! with the pre-defined dictionary.
//!
//! Method class
//! ------------
//!
//! The behaviour of these classes are similar to
//! fuzzy classes. Only the semantic is different.
//! These classes are for memorized actions or
//! constraints, e.g. they are useful to memorized
//! persistently the working system of Imagine
//! Conception.
class Dynamic { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } Standard_EXPORT static Dynamic_ModeEnum Mode(const Standard_CString amode) ; protected: private: friend class Dynamic_Node; friend class Dynamic_Parameter; friend class Dynamic_BooleanParameter; friend class Dynamic_EnumerationParameter; friend class Dynamic_IntegerParameter; friend class Dynamic_RealParameter; friend class Dynamic_StringParameter; friend class Dynamic_ObjectParameter; friend class Dynamic_InstanceParameter; friend class Dynamic_ParameterNode; friend class Dynamic_Variable; friend class Dynamic_VariableGroup; friend class Dynamic_AbstractVariableInstance; friend class Dynamic_VariableInstance; friend class Dynamic_CompositVariableInstance; friend class Dynamic_VariableNode; friend class Dynamic_Method; friend class Dynamic_MethodDefinition; friend class Dynamic_CompiledMethod; friend class Dynamic_InterpretedMethod; friend class Dynamic_CompositMethod; friend class Dynamic_MethodInstance; friend class Dynamic_MethodDefinitionsDictionary; friend class Dynamic_SeqOfMethods; friend class Dynamic_SequenceOfMethods; friend class Dynamic_SeqOfMethodDefinitions; friend class Dynamic_SequenceOfMethodDefinitions; friend class Dynamic_DynamicClass; friend class Dynamic_DynamicDerivedClass; friend class Dynamic_SeqOfClasses; friend class Dynamic_SequenceOfClasses; friend class Dynamic_DynamicInstance; friend class Dynamic_FuzzyClass; friend class Dynamic_FuzzyDefinition; friend class Dynamic_SeqOfFuzzyDefinitions; friend class Dynamic_SequenceOfFuzzyDefinitions; friend class Dynamic_FuzzyDefinitionsDictionary; friend class Dynamic_FuzzyInstance; friend class Dynamic_SequenceNodeOfSeqOfMethods; friend class Dynamic_SequenceNodeOfSeqOfMethodDefinitions; friend class Dynamic_SequenceNodeOfSeqOfClasses; friend class Dynamic_SequenceNodeOfSeqOfFuzzyDefinitions; }; // other Inline functions and methods (like "C++: function call" methods) #endif