-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMethods.m
More file actions
24 lines (20 loc) · 1.52 KB
/
Methods.m
File metadata and controls
24 lines (20 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(* ::Package:: *)
(* :Title: Methods *)
(* :Context: MathObject`Methods` *)
(* :Summary: Subcontext definition *)
(* :Author: Mark A. Caprio, Department of Physics, University of Notre Dame *)
(* :Copyright: Copyright 2011, Mark A. Caprio *)
(* :Package Version: 1.0 *)
(* :Mathematica Version: 8.0 *)
(* :History: See main package file. *)
(*Context for method definitions*)
(*It is desirable to have a separate namespace for methods. Otherwise: If classes are defined in *different* packages, and if each package Protects the symbols in its context, then, if these classes have a member name in common, a shadowing and/or protection conflict will arise.*)
(**)
(*This context *must* be visible at user level in $ContextPath for access to methods.*)
(**)
(*Note therefore that usage messages should *not* be defined for the methods in any context *before* he method is declared with DeclareClass, which will properly establish the symbol in the methods context.*)
BeginPackage["MathObject`Methods`"];
Constructor::usage="Constructor[class,self][args] is the hook function for user constructor actions in MathObject package objects.";
OnCreationFailure::usage="OnCreationFailure[class,self][args] is the hook function invoked when the constructor call is not matched when creating an instance of a MathObject package object. Definition of such a function is optional.";
Destructor::usage="Destructor[class,self][] is the hook function for user destructor actions in MathObject package objects. Definition of such a function is optional.";
EndPackage[];