/
class_WOOPERTemplate.erl.sample
63 lines (35 loc) · 1.36 KB
/
class_WOOPERTemplate.erl.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
% Add your standard header here.
%
-module(class_).
% Determines what are the mother classes of this class (if any):
-define( wooper_superclasses, [] ).
% Parameters taken by the constructor ('construct').
-define( wooper_construct_parameters, ).
% Declaring all variations of WOOPER standard life-cycle operations:
% (template pasted, two replacements performed to update arities)
-define( wooper_construct_export, new/X, new_link/X,
synchronous_new/X, synchronous_new_link/X,
synchronous_timed_new/X, synchronous_timed_new_link/X,
remote_new/Y, remote_new_link/Y, remote_synchronous_new/Y,
remote_synchronous_new_link/Y, remote_synchronous_timed_new/Y,
remote_synchronous_timed_new_link/Y, construct/Y, destruct/1 ).
% Member method declarations.
-define( wooper_method_export, ).
% Static method declarations.
-define( wooper_static_method_export, ).
% Allows to define WOOPER base variables and methods for that class:
-include("wooper.hrl").
% Constructs a new .
construct( State, ?wooper_construct_parameters ) ->
% First the direct mother classes:
XState = class_:construct( State, ),
% Then the class-specific attributes:
setAttributes( XState, [
{,},
{,} ] ).
destruct( State ) ->
State.
io:format( "Deleting cat ~w! (overridden destructor)~n", [ self() ] ),
% Member method section.
% Static method section.
% Helper functions section.