Unit Operation Wrapper Class
Definition
Assembly: CapeOpen (in CapeOpen.dll) Version: 1.0.0.0 (1.0.0.0)
[CapeDescriptionAttribute("This class provides access to unit operations based upon .Net-based assembly location rules.")]
[CapeVendorURLAttribute("http:\www.epa.gov")]
[CapeVersionAttribute("1.0")]
[ComVisibleAttribute(true)]
[GuidAttribute("B41DECE0-6C99-4CA4-B0EB-EFADBDCE23E9")]
[CapeNameAttribute("UnitOperationWrapper")]
[CapeAboutAttribute("US Environmental Protection Agency\nCincinnati, Ohio")]
[CapeHelpURLAttribute("http:\www.epa.gov")]
[ClassInterfaceAttribute(ClassInterfaceType.None)]
public class UnitOperationWrapper : ICapeUnit,
ICapeUtilities, ICapeIdentification, ICapeUnitReport<CapeDescriptionAttribute("This class provides access to unit operations based upon .Net-based assembly location rules.")>
<CapeVendorURLAttribute("http:\www.epa.gov")>
<CapeVersionAttribute("1.0")>
<ComVisibleAttribute(true)>
<GuidAttribute("B41DECE0-6C99-4CA4-B0EB-EFADBDCE23E9")>
<CapeNameAttribute("UnitOperationWrapper")>
<CapeAboutAttribute("US Environmental Protection Agency\nCincinnati, Ohio")>
<CapeHelpURLAttribute("http:\www.epa.gov")>
<ClassInterfaceAttribute(ClassInterfaceType.None)>
Public Class UnitOperationWrapper
Implements ICapeUnit, ICapeUtilities, ICapeIdentification, ICapeUnitReport- Inheritance
- Object UnitOperationWrapper
- Implements
- ICapeIdentification, ICapeUnit, ICapeUnitReport, ICapeUtilities
Remarks
The CAPE-OPEN object model is based upon Microsoft's Component Object Model (COM). Computer security practices have evolved to incorporate the principle of least priviledge, where users rights on the computer are reduced. This protects various high-risk portions of the system, such as the Windows registry, from attack. The disadvantage of least priviledges and registry restriction is that it makes development and depolyment of COM-based PMCs difficult because the local user is unable to install and register the components.
This class utilizes various .Net file location schemes to enable users to develop and deploy new unit operation PMCs on their machine under the restrictions imposed by least priviledges. In particular, it can detect if the debugger is attached and can identifiy the assembly being debugged, making it available in the debugger to check the progress of the unit. Further, it creates and uses a "CapeOpen Objects" directory located in the current user's %ProgramFiles%\CommonFiles directory. Subdirectories under this directory are also inspected.
Assemblies that contain PMCs developed using this .Net-based class library should be placed in a sudirectory under the %Program Files%\CommonFiles\CapeOpen Objects directory.
Constructors
| UnitOperationWrapper | Creates an instance of the UnitOperationWrapper unit operation. |
Properties
| ComponentDescription | Gets and sets the description of the component. |
| ComponentName | Gets and sets the name of the component. |
| parameters | Gets the component's collection of parameters. |
| ports | Gets the collection of unit operation ports. |
| reports | Gets the list of possible reports for the unit operation. |
| selectedReport | Gets and sets the current active report for the unit operation. |
| simulationContext | Sets the component's simulation context. |
| ValStatus | Gets the flag to indicate the unit operation's validation status CapeValidationStatus. |
Methods
| Calculate | Executes the necessary calculations involved in the unit operation model. |
| Edit | Displays the PMC graphic interface, if available. |
| Initialize | The component is asked to configure itself. For example a Unit Operation might create ports and parameters during this call |
| MyResolveEventHandler | |
| ProduceReport | Produces the active report for the unit operation. |
| RegisterFunction | The function that controls COM registration. |
| Terminate | Clean-up tasks can be performed here. References to parameters and ports are released here. |
| UnregisterFunction | This function controls the removal of the class from the COM registry when the class is unistalled. |
| Validate | Validate the unit operation to verify that the parameters and ports are all valid. If invalid, this method returns a message indicating the reason that the unit is invalid. |
Fields
| m_initializing | |
| m_loading | |
| p_Unit | The wrapped unit operation. |
Extension Methods
| GetEnumNames | (Defined by General) |
| IsValidDouble | (Defined by General) |