-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhello.statuscodeimplementation.pas
More file actions
45 lines (36 loc) · 1006 Bytes
/
hello.statuscodeimplementation.pas
File metadata and controls
45 lines (36 loc) · 1006 Bytes
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
unit Hello.StatusCodeImplementation;
{$mode ObjFPC}{$H+}
interface
uses
Hello.IStatusCode;
type
/// <summary>
/// Concrete implementation of the <c>IStatusCode</c> interface.
/// Represents a status code with an integer value.
/// </summary>
TStatusCodeImplementation = class(TInterfacedObject, IStatusCode)
private
FCode: integer;
public
/// <summary>
/// Creates an instance of <c>TStatusCodeImplementation</c> with the specified status code.
/// </summary>
/// <param name="ACode">The integer status code to store.</param>
constructor Create(ACode: integer);
/// <summary>
/// Retrieves the stored status code.
/// </summary>
/// <returns>The integer status code.</returns>
function GetStatusCode: integer;
end;
implementation
constructor TStatusCodeImplementation.Create(ACode: integer);
begin
inherited Create;
FCode := ACode;
end;
function TStatusCodeImplementation.GetStatusCode: integer;
begin
Result := FCode;
end;
end.