hexsha
stringlengths 40
40
| size
int64 3
1.05M
| ext
stringclasses 163
values | lang
stringclasses 53
values | max_stars_repo_path
stringlengths 3
945
| max_stars_repo_name
stringlengths 4
112
| max_stars_repo_head_hexsha
stringlengths 40
78
| max_stars_repo_licenses
listlengths 1
10
| max_stars_count
float64 1
191k
⌀ | max_stars_repo_stars_event_min_datetime
stringlengths 24
24
⌀ | max_stars_repo_stars_event_max_datetime
stringlengths 24
24
⌀ | max_issues_repo_path
stringlengths 3
945
| max_issues_repo_name
stringlengths 4
113
| max_issues_repo_head_hexsha
stringlengths 40
78
| max_issues_repo_licenses
listlengths 1
10
| max_issues_count
float64 1
116k
⌀ | max_issues_repo_issues_event_min_datetime
stringlengths 24
24
⌀ | max_issues_repo_issues_event_max_datetime
stringlengths 24
24
⌀ | max_forks_repo_path
stringlengths 3
945
| max_forks_repo_name
stringlengths 4
113
| max_forks_repo_head_hexsha
stringlengths 40
78
| max_forks_repo_licenses
listlengths 1
10
| max_forks_count
float64 1
105k
⌀ | max_forks_repo_forks_event_min_datetime
stringlengths 24
24
⌀ | max_forks_repo_forks_event_max_datetime
stringlengths 24
24
⌀ | content
stringlengths 3
1.05M
| avg_line_length
float64 1
966k
| max_line_length
int64 1
977k
| alphanum_fraction
float64 0
1
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f1112c201d3118d6cbfecbbad1b0cd35291aed3a
| 910 |
pas
|
Pascal
|
Examples/VolumeControl/_fmMain.pas
|
ryujt/ryulib4delphi
|
1269afeb5d55d5d6710cfb1d744d5a1596583a96
|
[
"MIT"
] | 18 |
2015-05-18T01:55:45.000Z
|
2019-05-03T03:23:52.000Z
|
Examples/VolumeControl/_fmMain.pas
|
ryujt/ryulib4delphi
|
1269afeb5d55d5d6710cfb1d744d5a1596583a96
|
[
"MIT"
] | 1 |
2019-11-08T08:27:34.000Z
|
2019-11-08T08:43:51.000Z
|
Examples/VolumeControl/_fmMain.pas
|
ryujt/ryulib4delphi
|
1269afeb5d55d5d6710cfb1d744d5a1596583a96
|
[
"MIT"
] | 19 |
2015-05-14T01:06:35.000Z
|
2019-06-02T05:19:00.000Z
|
unit _fmMain;
interface
uses
VolumeControl,
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TfmMain = class(TForm)
Label1: TLabel;
sbMic: TScrollBar;
Label2: TLabel;
sbSpeaker: TScrollBar;
procedure FormCreate(Sender: TObject);
procedure sbMicChange(Sender: TObject);
procedure sbSpeakerChange(Sender: TObject);
private
public
end;
var
fmMain: TfmMain;
implementation
{$R *.dfm}
procedure TfmMain.FormCreate(Sender: TObject);
begin
sbMic.Position := Round(GetMicVolume * 100);
sbSpeaker.Position := Round(GetSpeakerVolume * 100);
end;
procedure TfmMain.sbMicChange(Sender: TObject);
begin
SetMicVolume(sbMic.Position / 100);
end;
procedure TfmMain.sbSpeakerChange(Sender: TObject);
begin
SetSpeakerVolume(sbSpeaker.Position / 100);
end;
end.
| 19.361702 | 98 | 0.741758 |
6abf3b0dbc9f9e12d119b57fc63d9c8b07b30ef8
| 27,180 |
pas
|
Pascal
|
Source/Base/Spring.Events.pas
|
VSoftTechnologies/Spring4DMirror
|
083931ede091613e82173fa41da413bb9ffcebea
|
[
"Apache-2.0"
] | 1 |
2021-02-17T12:38:20.000Z
|
2021-02-17T12:38:20.000Z
|
Source/Base/Spring.Events.pas
|
VSoftTechnologies/Spring4DMirror
|
083931ede091613e82173fa41da413bb9ffcebea
|
[
"Apache-2.0"
] | null | null | null |
Source/Base/Spring.Events.pas
|
VSoftTechnologies/Spring4DMirror
|
083931ede091613e82173fa41da413bb9ffcebea
|
[
"Apache-2.0"
] | 2 |
2021-03-17T07:42:29.000Z
|
2021-05-03T13:55:00.000Z
|
{***************************************************************************}
{ }
{ Spring Framework for Delphi }
{ }
{ Copyright (c) 2009-2021 Spring4D Team }
{ }
{ http://www.spring4d.org }
{ }
{***************************************************************************}
{ }
{ Licensed under the Apache License, Version 2.0 (the "License"); }
{ you may not use this file except in compliance with the License. }
{ You may obtain a copy of the License at }
{ }
{ http://www.apache.org/licenses/LICENSE-2.0 }
{ }
{ Unless required by applicable law or agreed to in writing, software }
{ distributed under the License is distributed on an "AS IS" BASIS, }
{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }
{ See the License for the specific language governing permissions and }
{ limitations under the License. }
{ }
{***************************************************************************}
{$I Spring.inc}
unit Spring.Events;
{$IFNDEF ASSEMBLER}
{$DEFINE USE_RTTI_FOR_PROXY}
{$ENDIF}
interface
uses
Classes,
Rtti,
SysUtils,
Spring,
Spring.Events.Base,
TypInfo;
type
{$REGION 'TEvent'}
TEvent = class(TEventBase)
private
fTypeInfo: PTypeInfo;
{$IFDEF USE_RTTI_FOR_PROXY}
fProxy: Pointer;
protected
procedure InternalInvokeMethod(UserData: Pointer;
const Args: TArray<TValue>; out Result: TValue); virtual;
procedure InternalInvokeDelegate(Method: TRttiMethod;
const Args: TArray<TValue>; out Result: TValue); virtual;
{$ELSE}
private
const
paEAX = Word(0);
paEDX = Word(1);
paECX = Word(2);
paStack = Word(3);
type
PParameterInfos = ^TParameterInfos;
TParameterInfos = array[0..255] of ^PTypeInfo;
PParameters = ^TParameters;
TParameters = packed record
public
{$IFNDEF CPUX64}
Registers: array[paEDX..paECX] of Cardinal;
EAXRegister: Cardinal;
ReturnAddress: Pointer;
{$ENDIF}
Stack: array[0..1023] of Byte;
end;
PMethodInfo = ^TMethodInfo;
TMethodInfo = record
ParamInfos: PParameterInfos;
StackSize: Integer;
{$IFDEF CPUX64}
RegisterFlag: Integer;
{$ENDIF}
constructor Create(typeData: PTypeData);
end;
private
fMethodInfo: TMethodInfo;
fMethodInvoke: Pointer;
procedure InvokeEventHandlerStub;
class procedure InvokeMethod(const Method: TMethod; Parameters: PParameters; StackSize: Integer); static;
protected
procedure Invoke;
procedure InternalInvoke(Params: Pointer; StackSize: Integer); virtual;
{$ENDIF}
procedure Notify(Sender: TObject; const Item: TMethod;
Action: TEventBase.TCollectionNotification); override;
public
constructor Create(typeInfo: PTypeInfo);
destructor Destroy; override;
end;
{$ENDREGION}
{$REGION 'TNotifyEventImpl'}
TNotifyEventImpl = class(TEventBase, IEvent,
IEvent<TNotifyEvent>, IInvokableEvent<TNotifyEvent>)
private
function GetInvoke: TNotifyEvent; overload;
public
procedure AfterConstruction; override;
procedure Add(handler: TNotifyEvent); overload;
procedure Remove(handler: TNotifyEvent); overload;
procedure Invoke(sender: TObject);
end;
IInvokableNotifyEvent = IInvokableEvent<TNotifyEvent>;
{$ENDREGION}
{$REGION 'TNotifyEventImpl<T>'}
TNotifyEventImpl<T> = class(TEventBase, IEvent,
INotifyEvent<T>, IInvokableNotifyEvent<T>)
private
function GetInvoke: TNotifyEvent<T>; overload;
public
procedure AfterConstruction; override;
procedure Add(handler: TNotifyEvent<T>); overload;
procedure Remove(handler: TNotifyEvent<T>); overload;
procedure Invoke(sender: TObject; const item: T);
end;
{$ENDREGION}
{$REGION 'TPropertyChangedEventImpl'}
TPropertyChangedEventImpl = class(TEventBase, IEvent,
IEvent<TPropertyChangedEvent>, IInvokableEvent<TPropertyChangedEvent>)
private
function GetInvoke: TPropertyChangedEvent; overload;
public
procedure AfterConstruction; override;
procedure Add(handler: TPropertyChangedEvent); overload;
procedure Remove(handler: TPropertyChangedEvent); overload;
procedure Invoke(Sender: TObject;
const EventArgs: IPropertyChangedEventArgs);
end;
{$ENDREGION}
{$REGION 'EventHelper'}
EventHelper = record
private type
IMethodEventInternal = interface(IInvokableEvent<TMethodPointer>)
procedure GetInvoke(var result);
procedure Add(const handler);
procedure Remove(const handler);
end;
IDelegateEventInternal = interface(IInvokableEvent<IInterface>)
procedure GetInvoke(var result);
procedure Add(const handler);
procedure Remove(const handler);
end;
TMethodEvent = class(TEvent, IMethodEventInternal, IEvent)
private
function GetInvoke: TMethodPointer; overload;
procedure Add(handler: TMethodPointer); overload;
procedure Remove(handler: TMethodPointer); overload;
procedure GetInvoke(var result); overload;
procedure Add(const handler); overload;
procedure Remove(const handler); overload;
end;
TDelegateEvent = class(TEvent, {$IFNDEF USE_RTTI_FOR_PROXY}TProc,{$ENDIF} IDelegateEventInternal, IEvent)
private
function GetInvoke: IInterface; overload;
procedure Add(handler: IInterface); overload;
procedure Remove(handler: IInterface); overload;
procedure GetInvoke(var result); overload;
procedure Add(const handler); overload;
procedure Remove(const handler); overload;
end;
private
fInstance: IMethodEventInternal;
procedure CreateEventHandler(typeInfo: PTypeInfo);
public
function GetCanInvoke: Boolean;
function GetEnabled: Boolean;
procedure GetInvoke(var result; typeInfo: PTypeInfo);
function GetOnChanged: TNotifyEvent;
function GetUseFreeNotification: Boolean;
procedure SetEnabled(const value: Boolean; typeInfo: PTypeInfo);
procedure SetOnChanged(const value: TNotifyEvent; typeInfo: PTypeInfo);
procedure SetUseFreeNotification(const value: Boolean; typeInfo: PTypeInfo);
procedure Add(const handler; typeInfo: PTypeInfo);
procedure Remove(const handler);
procedure Clear;
procedure RemoveAll(instance: Pointer);
procedure EnsureInstance(var result; typeInfo: PTypeInfo);
end;
{$ENDREGION}
implementation
uses
{$IFDEF MSWINDOWS}
Windows,
{$ENDIF}
Spring.HazardEra,
{$IFDEF USE_RTTI_FOR_PROXY}
Spring.VirtualInterface,
{$ENDIF}
Spring.ResourceStrings;
const
PointerSize = SizeOf(Pointer);
{$REGION 'Proxy generators'}
{$IFNDEF USE_RTTI_FOR_PROXY}
procedure GetMethodTypeData(Method: TRttiMethod; var TypeData: PTypeData);
procedure WriteByte(var Dest: PByte; b: Byte);
begin
Dest[0] := b;
Inc(Dest);
end;
procedure WritePackedShortString(var Dest: PByte; const s: string);
{$IFNDEF NEXTGEN}
begin
PShortString(Dest)^ := ShortString(s);
Inc(Dest, Dest[0] + 1);
end;
{$ELSE}
var
buffer: TBytes;
begin
buffer := TEncoding.ANSI.GetBytes(s);
if (Length(buffer) > 255) then SetLength(buffer, 255);
Dest^ := Length(buffer);
Inc(Dest);
Move(buffer[0], Dest^, Length(buffer));
Inc(Dest, Length(buffer));
end;
{$ENDIF}
procedure WritePointer(var Dest: PByte; p: Pointer);
begin
PPointer(Dest)^ := p;
Inc(Dest, PointerSize);
end;
var
params: TArray<TRttiParameter>;
i: Integer;
p: PByte;
begin
TypeData.MethodKind := Method.MethodKind;
params := Method.GetParameters;
TypeData.ParamCount := Length(params);
p := @TypeData.ParamList;
for i := Low(params) to High(params) do
begin
WriteByte(p, Byte(params[i].Flags));
WritePackedShortString(p, params[i].Name);
WritePackedShortString(p, params[i].ParamType.Name);
end;
if method.MethodKind = mkFunction then
begin
WritePackedShortString(p, method.ReturnType.Name);
WritePointer(p, method.ReturnType.Handle);
end;
WriteByte(p, Byte(method.CallingConvention));
for i := Low(params) to High(params) do
WritePointer(p, Pointer(NativeInt(params[i].ParamType.Handle) - PointerSize));
end;
class procedure TEvent.InvokeMethod(const Method: TMethod;
Parameters: PParameters; StackSize: Integer);
{$IFNDEF CPUX64}
asm
push ebx // preserve ebx
push esi // preserve esi
mov ebx,edx // ebx = Parameters
mov esi,eax // esi = Method
test ecx,ecx // if StackSize > 0
jz @@call_method
sub esp,ecx // allocate stack space
lea eax,[ebx].TParameters.Stack // put stack buffer as first parameter
mov edx,esp // put stack address as second parameter
call Move // third parameter StackSize was already in place
@@call_method:
mov ecx,[ebx].TParameters.Registers.dword[4] // ecx = Parameters.Registers[paECX]
mov edx,[ebx].TParameters.Registers.dword[0] // edx = Parameters.Registers[paEDX]
mov eax,[esi].TMethod.Data // eax = Method.Data
call [esi].TMethod.Code // call Method.Code
pop esi
pop ebx
end;
{$ELSE}
asm
push rbp // preserve rbp
mov rbp,rsp // set rbp to current stack pointer for fixed offset
sub rsp,r8 // allocate stack space
mov [rbp+$10],Method // preserve Method
mov [rbp+$18],Parameters // preserve Parameters
sub r8,32 // if StackSize > 32
jz @@call_method
lea rcx,[rdx+32] // put stack buffer after first 4 parameters as first parameter
lea rdx,[rsp+32] // put stack address after first 4 parameters as second parameter
call Move
@@call_method:
mov rax,[rbp+$18]
mov rcx,[rax].TParameters.Stack.qword[0] // rcx = Parameters.Stack[0]
mov rdx,[rax].TParameters.Stack.qword[8] // rdx = Parameters.Stack[8]
mov r8,[rax].TParameters.Stack.qword[16] // r8 = Parameters.Stack[16]
mov r9,[rax].TParameters.Stack.qword[24] // r9 = Parameters.Stack[24]
movsd xmm0,[rax].TParameters.Stack.qword[0] // xmm0 = Parameters.Stack[0]
movsd xmm1,[rax].TParameters.Stack.qword[8] // xmm1 = Parameters.Stack[8]
movsd xmm2,[rax].TParameters.Stack.qword[16] // xmm2 = Parameters.Stack[16]
movsd xmm3,[rax].TParameters.Stack.qword[24] // xmm3 = Parameters.Stack[24]
mov rax,[rbp+$10]
mov rcx,[rax].TMethod.Data // rcx = Method.Data
call [rax].TMethod.Code // call Method.Data
lea rsp,[rbp] // restore rsp - deallocate stack space
pop rbp // restore
end;
{$ENDIF}
constructor TEvent.TMethodInfo.Create(typeData: PTypeData);
function AdditionalInfoOf(TypeData: PTypeData): Pointer;
var
P: PByte;
I: Integer;
begin
P := @TypeData^.ParamList;
// Skip parameter names and types
for I := 1 to TypeData^.ParamCount do //FI:W528
begin
Inc(P, 1 + P[1] + 1);
Inc(P, P[0] + 1 );
end;
if TypeData^.MethodKind = mkFunction then
// Skip return type name and info
Inc(P, P[0] + 1 + 4);
Result := P;
end;
function PassByRef(typeInfo: PTypeInfo; paramFlags: TParamFlags): Boolean;
begin
Result := (paramFlags * [pfVar, pfAddress, pfReference, pfOut] <> [])
and not (typeInfo.Kind in [tkFloat, tkMethod, tkInt64]);
end;
function Align4(Value: Integer): Integer;
begin
{TODO -o##jwp -cOSX32/MACOS : Research 16-byte stack alignment: http://docwiki.embarcadero.com/RADStudio/XE5/en/Delphi_Considerations_for_Cross-Platform_Applications#Stack_Alignment_Issue_on_OS_X }
// http://docwiki.embarcadero.com/RADStudio/XE5/en/Conditional_compilation_(Delphi)
Result := (Value + 3) and not 3;
end;
var
P: PByte;
i: Integer;
{$IFNDEF CPUX64}
curReg: Integer;
Size: Integer;
{$ENDIF}
begin
P := AdditionalInfoOf(typeData);
if TCallConv(PByte(p)^) <> ccReg then
raise EInvalidOperationException.CreateRes(@SUnsupportedCallingConvention);
ParamInfos := PParameterInfos(P + 1);
{$IFNDEF CPUX64}
curReg := paEDX;
StackSize := 0;
{$ELSE}
StackSize := PointerSize; // Self in stack
{$ENDIF}
P := @typeData.ParamList;
for i := 0 to typeData.ParamCount - 1 do
begin
if not Assigned(ParamInfos[i]) then
raise EInvalidOperationException.CreateRes(@SNoTypeInfo);
{$IFNDEF CPUX64}
if PassByRef(ParamInfos[i]^, TParamFlags(P[0])) then
begin
if curReg < paStack then
Inc(curReg)
else
Inc(StackSize, PointerSize);
end
else
begin
Size := GetTypeSize(ParamInfos[i]^);
if (curReg < paStack) and (Size in [1, 2, 4]) and (ParamInfos[i]^.Kind <> tkFloat) then
Inc(curReg)
else
Inc(StackSize, Align4(Size));
end;
{$ELSE}
// pass first 3 parameters in XMM1-XMM3 if floating point (Self was already passed before them in RCX)
if (i < 3) and (ParamInfos[i]^.Kind = tkFloat) then
RegisterFlag := RegisterFlag or (1 shl (i + 1));
Inc(StackSize, PointerSize);
{$ENDIF}
Inc(P, 1 + P[1] + 1);
Inc(P, P[0] + 1);
end;
{$IFDEF CPUX64}
if StackSize < 32 then
StackSize := 32;
{$ENDIF}
end;
procedure TEvent.InvokeEventHandlerStub;
{$IFNDEF CPUX64}
asm
// push registers - order is important, they are part of the TParameters record
push eax
push ecx
push edx
bt [eax].fRefCount,30 // if Enabled then
jc @@return
mov edx,esp // put address to stack into Params
mov ecx,[eax].fMethodInfo.StackSize // put StackSize
call [eax].fMethodInvoke
pop edx // pop registers
pop ecx // don't care for preserving EAX
pop eax // as we don't support result
mov ecx,[eax].fMethodInfo.StackSize
test ecx,ecx // if StackSize > 0
jnz @@cleanup_stack
ret
@@cleanup_stack:
// clean up the stack - like the "ret n" instruction does
mov eax,[esp] // load the return address
add esp,ecx // pop from the stack
mov [esp],eax // write return address for ret
ret
@@return:
add esp,12
end;
{$ELSE}
asm
// check DisabledFlag
bt [rcx].fRefCount,30
jc @@return
// allocate stackframe
push rbp
sub rsp,$20
mov rbp,rsp
mov eax,[rcx].fMethodInfo.RegisterFlag
// first parameter is always pointer
mov [rsp+$30],rcx
// second parameter: save rdx or xmm1
test al,2
jnz @@save_xmm1
mov [rsp+$38],rdx
jmp @@third
@@save_xmm1:
movsd [rsp+$38],xmm1
// third parameter: save r8 or xmm2
@@third:
test al,4
jnz @@save_xmm2
mov [rsp+$40],r8
jmp @@fourth
@@save_xmm2:
movsd [rsp+$40],xmm2
// fourth parameter: save r9 or xmm3
@@fourth:
test al,8
jnz @@save_xmm3
mov [rsp+$48],r9
jmp @@call
@@save_xmm3:
movsd [rsp+$48],xmm3
@@call:
lea rdx,[rsp+$30] // put stack address into Params
mov r8d,[rcx].fMethodInfo.StackSize // pass StackSize
call [rcx].fMethodInvoke
// restore stack pointer
lea rsp,[rbp+$20]
pop rbp
@@return:
end;
{$ENDIF}
{$ENDIF}
{$ENDREGION}
{$REGION 'TEvent'}
constructor TEvent.Create(typeInfo: PTypeInfo);
var
method: TRttiMethod;
{$IFNDEF USE_RTTI_FOR_PROXY}
typeData: PTypeData;
invokeEvent: procedure(Params: Pointer; StackSize: Integer) of object;
{$ENDIF}
begin
fTypeInfo := typeInfo;
if not Assigned(typeInfo) then
raise EInvalidOperationException.CreateRes(@SNoTypeInfo);
inherited Create;
case typeInfo.Kind of
tkMethod:
begin
{$IFDEF USE_RTTI_FOR_PROXY}
TMethodImplementation(fProxy) := TRttiInvokableType(typeInfo.RttiType)
.CreateImplementation(nil, InternalInvokeMethod);
TMethod(fInvoke) := TMethodImplementation(fProxy).AsMethod;
{$ELSE}
typeData := typeInfo.TypeData;
fMethodInfo := TMethodInfo.Create(typeData);
invokeEvent := InternalInvoke;
fMethodInvoke := TMethod(invokeEvent).Code;
fInvoke := InvokeEventHandlerStub;
{$ENDIF}
end;
tkInterface:
begin
method := typeInfo.RttiType.GetMethod('Invoke');
if not Assigned(method) then
raise EInvalidOperationException.CreateResFmt(@STypeParameterContainsNoRtti, [typeInfo.Name]);
{$IFDEF USE_RTTI_FOR_PROXY}
TVirtualInterface.Create(typeInfo, InternalInvokeDelegate)
.QueryInterface(typeInfo.TypeData.Guid, fProxy);
{$ELSE}
New(typeData);
try
GetMethodTypeData(method, typeData);
fMethodInfo := TMethodInfo.Create(typeData);
invokeEvent := InternalInvoke;
fMethodInvoke := TMethod(invokeEvent).Code;
fInvoke := InvokeEventHandlerStub;
finally
Dispose(typeData);
end;
{$ENDIF}
end
else
raise EInvalidOperationException.CreateResFmt(@STypeParameterShouldBeMethod, [typeInfo.Name]);
end;
end;
destructor TEvent.Destroy;
begin
{$IFDEF USE_RTTI_FOR_PROXY}
case fTypeInfo.Kind of
tkMethod: TMethodImplementation(fProxy).Free;
tkInterface: IInterface(fProxy) := nil;
end;
{$ENDIF}
inherited Destroy;
end;
{$IFDEF USE_RTTI_FOR_PROXY}
procedure TEvent.InternalInvokeMethod(UserData: Pointer;
const Args: TArray<TValue>; out Result: TValue);
var
argsWithoutSelf: TArray<TValue>;
guard: GuardedPointer;
handlers: PMethodArray;
i: Integer;
value: TValue;
begin
if CanInvoke then
begin
argsWithoutSelf := Copy(Args, 1);
guard := AcquireGuard(fHandlers);
handlers := guard;
try
for i := 0 to DynArrayHigh(handlers) do
begin
TValue.Make(@TMethod(handlers[i]), TRttiInvokableType(UserData).Handle, value);
TRttiInvokableType(UserData).Invoke(value, argsWithoutSelf);
end;
finally
guard.Release;
end;
end;
end;
procedure TEvent.InternalInvokeDelegate(Method: TRttiMethod;
const Args: TArray<TValue>; out Result: TValue);
var
argsWithoutSelf: TArray<TValue>;
guard: GuardedPointer;
handlers: PMethodArray;
i: Integer;
reference: IInterface;
value: TValue;
begin
if CanInvoke then
begin
argsWithoutSelf := Copy(Args, 1);
guard := AcquireGuard(fHandlers);
handlers := guard;
try
for i := 0 to DynArrayHigh(handlers) do
begin
reference := MethodToMethodReference(handlers[i]);
TValue.Make(@reference, TypeInfo(IInterface), value);
method.Invoke(value, argsWithoutSelf);
end;
finally
guard.Release;
end;
end;
end;
{$ELSE}
procedure TEvent.InternalInvoke(Params: Pointer; StackSize: Integer);
var
guard: GuardedPointer;
handlers: PMethod;
i: Integer;
begin
guard := AcquireGuard(fHandlers);
handlers := guard;
if handlers <> nil then
try
{$POINTERMATH ON}
for i := 1 to PNativeInt(handlers)[-1] do
{$POINTERMATH OFF}
begin
InvokeMethod(handlers^, Params, StackSize);
Inc(handlers);
end;
except
guard.Release;
raise;
end;
guard.Release;
end;
procedure TEvent.Invoke;
asm
{$IFDEF CPUX64}
mov rax,[rcx].fInvoke.TMethod.Code
mov rcx,[rcx].fInvoke.TMethod.Data
jmp rax
{$ELSE}
push [eax].fInvoke.TMethod.Code
mov eax,[eax].fInvoke.TMethod.Data
{$ENDIF}
end;
{$ENDIF}
procedure TEvent.Notify(Sender: TObject; const Item: TMethod;
Action: TEventBase.TCollectionNotification);
begin
inherited Notify(Sender, Item, Action);
if fTypeInfo.Kind = tkInterface then
case Action of //FI:W535
cnAdded: IInterface(Item.Data)._AddRef;
cnRemoved: IInterface(Item.Data)._Release;
end;
end;
{$ENDREGION}
{$REGION 'TNotifyEventImpl'}
procedure TNotifyEventImpl.AfterConstruction;
begin
inherited AfterConstruction;
TNotifyEvent(fInvoke) := Invoke;
end;
procedure TNotifyEventImpl.Add(handler: TNotifyEvent);
begin
inherited Add(TMethod(handler));
end;
function TNotifyEventImpl.GetInvoke: TNotifyEvent;
begin
Result := TNotifyEvent(inherited Invoke);
end;
procedure TNotifyEventImpl.Invoke(sender: TObject);
var
guard: GuardedPointer;
handlers: PMethodArray;
i: Integer;
begin
if Enabled then
begin
guard := GetHandlers;
handlers := guard;
try
for i := 0 to DynArrayHigh(handlers) do
TNotifyEvent(handlers[i])(sender);
finally
guard.Release;
end;
end;
end;
procedure TNotifyEventImpl.Remove(handler: TNotifyEvent);
begin
inherited Remove(TMethod(handler));
end;
{$ENDREGION}
{$REGION 'TNotifyEventImpl<T>'}
procedure TNotifyEventImpl<T>.AfterConstruction;
begin
inherited AfterConstruction;
TNotifyEvent<T>(fInvoke) := Invoke;
end;
procedure TNotifyEventImpl<T>.Add(handler: TNotifyEvent<T>);
begin
inherited Add(TMethod(handler));
end;
function TNotifyEventImpl<T>.GetInvoke: TNotifyEvent<T>;
begin
Result := TNotifyEvent<T>(inherited Invoke);
end;
procedure TNotifyEventImpl<T>.Invoke(sender: TObject; const item: T);
var
guard: GuardedPointer;
handlers: PMethodArray;
i: Integer;
begin
if Enabled then
begin
guard := GetHandlers;
handlers := guard;
try
for i := 0 to DynArrayHigh(handlers) do
TNotifyEvent<T>(handlers[i])(sender, item);
finally
guard.Release;
end;
end;
end;
procedure TNotifyEventImpl<T>.Remove(handler: TNotifyEvent<T>);
begin
inherited Remove(TMethod(handler));
end;
{$ENDREGION}
{$REGION 'TPropertyChangedEventImpl'}
procedure TPropertyChangedEventImpl.AfterConstruction;
begin
inherited AfterConstruction;
TPropertyChangedEvent(fInvoke) := Invoke;
end;
procedure TPropertyChangedEventImpl.Add(handler: TPropertyChangedEvent);
begin
inherited Add(TMethod(handler));
end;
function TPropertyChangedEventImpl.GetInvoke: TPropertyChangedEvent;
begin
Result := TPropertyChangedEvent(inherited Invoke);
end;
procedure TPropertyChangedEventImpl.Invoke(Sender: TObject;
const EventArgs: IPropertyChangedEventArgs);
var
guard: GuardedPointer;
handlers: PMethodArray;
i: Integer;
begin
if Enabled then
begin
guard := GetHandlers;
handlers := guard;
try
for i := 0 to DynArrayHigh(handlers) do
TPropertyChangedEvent(handlers[i])(Sender, EventArgs);
finally
guard.Release;
end;
end;
end;
procedure TPropertyChangedEventImpl.Remove(handler: TPropertyChangedEvent);
begin
inherited Remove(TMethod(handler));
end;
{$ENDREGION}
{$REGION 'EventHelper'}
procedure EventHelper.CreateEventHandler(typeInfo: PTypeInfo);
begin
if typeInfo.Kind = tkMethod then
IMethodEventInternal(fInstance) := TMethodEvent.Create(typeInfo)
else
IDelegateEventInternal(fInstance) := TDelegateEvent.Create(typeInfo);
end;
procedure EventHelper.Add(const handler; typeInfo: PTypeInfo);
begin
if not Assigned(fInstance) then
CreateEventHandler(typeInfo);
fInstance.Add(handler);
end;
procedure EventHelper.Clear;
begin
if Assigned(fInstance) then
fInstance.Clear;
end;
procedure EventHelper.EnsureInstance(var result; typeInfo: PTypeInfo);
begin
if not Assigned(fInstance) then
CreateEventHandler(typeInfo);
IInterface(result) := fInstance;
end;
function EventHelper.GetCanInvoke: Boolean;
begin
if Assigned(fInstance) then
Result := fInstance.CanInvoke
else
Result := False;
end;
function EventHelper.GetEnabled: Boolean;
begin
if Assigned(fInstance) then
Result := fInstance.Enabled
else
Result := True
end;
procedure EventHelper.GetInvoke(var result; typeInfo: PTypeInfo);
begin
if not Assigned(fInstance) then
CreateEventHandler(typeInfo);
fInstance.GetInvoke(result);
end;
function EventHelper.GetOnChanged: TNotifyEvent;
begin
if Assigned(fInstance) then
Result := fInstance.OnChanged
else
Result := nil;
end;
function EventHelper.GetUseFreeNotification: Boolean;
begin
if Assigned(fInstance) then
Result := fInstance.UseFreeNotification
else
Result := True
end;
procedure EventHelper.Remove(const handler);
begin
if Assigned(fInstance) then
fInstance.Remove(handler);
end;
procedure EventHelper.RemoveAll(instance: Pointer);
begin
if Assigned(fInstance) then
fInstance.RemoveAll(instance);
end;
procedure EventHelper.SetEnabled(const value: Boolean; typeInfo: PTypeInfo);
begin
if not Assigned(fInstance) then
CreateEventHandler(typeInfo);
fInstance.Enabled := value;
end;
procedure EventHelper.SetOnChanged(const value: TNotifyEvent; typeInfo: PTypeInfo);
begin
if not Assigned(fInstance) then
CreateEventHandler(typeInfo);
fInstance.OnChanged := value;
end;
procedure EventHelper.SetUseFreeNotification(const value: Boolean; typeInfo: PTypeInfo);
begin
if not Assigned(fInstance) then
CreateEventHandler(typeInfo);
fInstance.UseFreeNotification := value;
end;
{$ENDREGION}
{$REGION 'EventHelper.TMethodEvent'}
function EventHelper.TMethodEvent.GetInvoke: TMethodPointer;
begin
Result := Invoke;
end;
procedure EventHelper.TMethodEvent.Add(handler: TMethodPointer);
begin
inherited Add(TMethod(handler));
end;
procedure EventHelper.TMethodEvent.Remove(handler: TMethodPointer);
begin
inherited Remove(TMethod(handler));
end;
procedure EventHelper.TMethodEvent.GetInvoke(var result);
begin
TMethodPointer(result) := fInvoke;
end;
procedure EventHelper.TMethodEvent.Add(const handler);
begin
inherited Add(TMethod(handler));
end;
procedure EventHelper.TMethodEvent.Remove(const handler);
begin
inherited Remove(TMethod(handler));
end;
{$ENDREGION}
{$REGION 'EventHelper.TDelegateEvent'}
function EventHelper.TDelegateEvent.GetInvoke: IInterface;
begin
{$IFDEF USE_RTTI_FOR_PROXY}
PInterface(@Result)^ := IInterface(fProxy);
{$ELSE}
TProc(PPointer(@Result)^) := Self;
{$ENDIF}
end;
procedure EventHelper.TDelegateEvent.Add(handler: IInterface);
begin
inherited Add(MethodReferenceToMethod(handler));
end;
procedure EventHelper.TDelegateEvent.Remove(handler: IInterface);
begin
inherited Remove(MethodReferenceToMethod(handler));
end;
procedure EventHelper.TDelegateEvent.GetInvoke(var result);
begin
{$IFDEF USE_RTTI_FOR_PROXY}
IInterface(result) := IInterface(fProxy);
{$ELSE}
TProc(result) := Self;
{$ENDIF}
end;
procedure EventHelper.TDelegateEvent.Add(const handler);
begin
inherited Add(MethodReferenceToMethod(handler));
end;
procedure EventHelper.TDelegateEvent.Remove(const handler);
begin
inherited Remove(MethodReferenceToMethod(handler));
end;
{$ENDREGION}
end.
| 26.184971 | 201 | 0.668653 |
f11517c4dc55611292565659825a9f13012fcd54
| 2,415 |
dfm
|
Pascal
|
Unit1.dfm
|
halilhanbadem/veritaban-naresimekleme
|
442c8b83c91ae13e29d729f6556f81f349ab8cc6
|
[
"Apache-2.0"
] | null | null | null |
Unit1.dfm
|
halilhanbadem/veritaban-naresimekleme
|
442c8b83c91ae13e29d729f6556f81f349ab8cc6
|
[
"Apache-2.0"
] | null | null | null |
Unit1.dfm
|
halilhanbadem/veritaban-naresimekleme
|
442c8b83c91ae13e29d729f6556f81f349ab8cc6
|
[
"Apache-2.0"
] | null | null | null |
object Form1: TForm1
Left = 0
Top = 0
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'Resim Ekleme'
ClientHeight = 378
ClientWidth = 547
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 48
Top = 16
Width = 32
Height = 13
Caption = 'Ad'#305'n'#305'z:'
end
object Label2: TLabel
Left = 48
Top = 64
Width = 49
Height = 13
Caption = 'Soyad'#305'n'#305'z:'
end
object Label3: TLabel
Left = 48
Top = 112
Width = 32
Height = 13
Caption = 'Resim:'
end
object Image1: TImage
Left = 392
Top = 32
Width = 113
Height = 117
Center = True
Stretch = True
end
object DBGrid1: TDBGrid
Left = 0
Top = 242
Width = 547
Height = 136
Align = alBottom
TabOrder = 0
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -11
TitleFont.Name = 'Tahoma'
TitleFont.Style = []
OnDblClick = DBGrid1DblClick
end
object DBEdit1: TDBEdit
Left = 48
Top = 32
Width = 121
Height = 21
TabOrder = 1
end
object DBEdit2: TDBEdit
Left = 48
Top = 80
Width = 121
Height = 21
TabOrder = 2
end
object DBEdit3: TDBEdit
Left = 48
Top = 128
Width = 209
Height = 21
TabOrder = 3
end
object Button1: TButton
Left = 263
Top = 126
Width = 33
Height = 25
Caption = '...'
TabOrder = 4
OnClick = Button1Click
end
object Button2: TButton
Left = 208
Top = 192
Width = 113
Height = 34
Caption = 'Ekle'
TabOrder = 5
OnClick = Button2Click
end
object UniConnection1: TUniConnection
Left = 64
Top = 296
end
object UniQuery1: TUniQuery
Connection = UniConnection1
Left = 144
Top = 296
end
object AccessUniProvider1: TAccessUniProvider
Left = 232
Top = 296
end
object DataSource1: TDataSource
Left = 328
Top = 296
end
object OpenPictureDialog1: TOpenPictureDialog
Left = 416
Top = 296
end
end
| 19.475806 | 48 | 0.581781 |
83a9bc244c9c25b2a8030d12a11dae3a86c45992
| 14,684 |
pas
|
Pascal
|
rx/Units/rxDataconv.pas
|
amikey/delphi-crypto
|
a79895f25bff69819f354e9bf27c19e2f00fed19
|
[
"Unlicense"
] | 6 |
2019-02-15T02:47:02.000Z
|
2021-08-02T22:34:34.000Z
|
rx/Units/rxDataconv.pas
|
amikey/delphi-crypto
|
a79895f25bff69819f354e9bf27c19e2f00fed19
|
[
"Unlicense"
] | null | null | null |
rx/Units/rxDataconv.pas
|
amikey/delphi-crypto
|
a79895f25bff69819f354e9bf27c19e2f00fed19
|
[
"Unlicense"
] | 7 |
2020-05-04T21:44:13.000Z
|
2021-04-02T12:42:23.000Z
|
{*******************************************************}
{ }
{ Delphi VCL Extensions (RX) }
{ }
{ Copyright (c) 1995 AO ROSNO }
{ }
{ Patched by Polaris Software }
{*******************************************************}
unit rxDataConv;
interface
{$I RX.INC}
uses
SysUtils, Windows,
Messages, Classes, Graphics, Controls, Forms, Dialogs,
{$IFNDEF RX_D12}rxStrUtils,{$ENDIF}
rxDateUtil;
type
TDataType = (dtString, dtInteger, dtFloat, dtDateTime, dtDate,
dtTime, dtBoolean);
TTimeFormat = (tfHHMMSS, tfHMMSS, tfHHMM, tfHMM);
{ TDateTimeFormat }
TDateTimeFormat = class(TPersistent)
private
FAMString: string;
FPMString: string;
FDateOrder: TDateOrder;
FTimeFormat: TTimeFormat;
FTimeSeparator: Char;
FDateSeparator: Char;
FLongDate: Boolean;
FFourDigitYear: Boolean;
FLeadingZero: Boolean;
function GetAMString: string;
procedure SetAMString(const Value: string);
function GetPMString: string;
procedure SetPMString(const Value: string);
protected
function GetDateMask: string; virtual;
function GetTimeMask: string; virtual;
function GetMask: string; virtual;
public
constructor Create;
destructor Destroy; override;
procedure Assign(Source: TPersistent); override;
procedure ResetDefault; virtual;
property DateMask: string read GetDateMask;
property TimeMask: string read GetTimeMask;
property Mask: string read GetMask;
published
property AMString: string read GetAMString write SetAMString;
property PMString: string read GetPMString write SetPMString;
property DateOrder: TDateOrder read FDateOrder write FDateOrder;
property TimeFormat: TTimeFormat read FTimeFormat write FTimeFormat;
property TimeSeparator: Char read FTimeSeparator write FTimeSeparator;
property DateSeparator: Char read FDateSeparator write FDateSeparator;
property LongDate: Boolean read FLongDate write FLongDate default False;
property FourDigitYear: Boolean read FFourDigitYear write FFourDigitYear default True;
property LeadingZero: Boolean read FLeadingZero write FLeadingZero default False;
end;
{ TConverter }
TConverter = class(TComponent)
private
{ Private declarations }
{$IFDEF RX_D4} // Polaris
FData: String;
{$ELSE}
FData: PString;
{$ENDIF}
FTextValues: array[Boolean] of string;
FDataType: TDataType;
FDateTimeFormat: TDateTimeFormat;
FFloatFormat: TFloatFormat;
FPrecision, FDigits: Integer;
FRaiseOnError: Boolean;
FOnChange: TNotifyEvent;
procedure SetDataType(Value: TDataType);
procedure SetDateTimeFormat(Value: TDateTimeFormat);
function GetDateTimeFormat: TDateTimeFormat;
function GetString: string;
procedure SetString(const Value: string);
function GetDateTime: TDateTime;
function GetBoolValues(Index: Integer): string;
procedure SetBoolValues(Index: Integer; const Value: string);
procedure CheckDataType;
function BoolToStr(Value: Boolean): string;
function FloatToString(Value: Double): string;
function DateTimeToString(Value: TDateTime): string;
protected
{ Protected declarations }
procedure Change; dynamic;
function GetAsBoolean: Boolean; virtual;
function GetAsDateTime: TDateTime; virtual;
function GetAsDate: TDateTime; virtual;
function GetAsTime: TDateTime; virtual;
function GetAsFloat: Double; virtual;
function GetAsInteger: Longint; virtual;
function GetAsString: string; virtual;
procedure SetAsBoolean(Value: Boolean); virtual;
procedure SetAsDateTime(Value: TDateTime); virtual;
procedure SetAsDate(Value: TDateTime); virtual;
procedure SetAsTime(Value: TDateTime); virtual;
procedure SetAsFloat(Value: Double); virtual;
procedure SetAsInteger(Value: Longint); virtual;
procedure SetAsString(const Value: string); virtual;
public
{ Public declarations }
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Clear;
function IsValidChar(Ch: Char): Boolean; virtual;
property AsBoolean: Boolean read GetAsBoolean write SetAsBoolean;
property AsDateTime: TDateTime read GetAsDateTime write SetAsDateTime;
property AsDate: TDateTime read GetAsDate write SetAsDate;
property AsTime: TDateTime read GetAsTime write SetAsTime;
property AsFloat: Double read GetAsFloat write SetAsFloat;
property AsInteger: Longint read GetAsInteger write SetAsInteger;
property AsString: string read GetAsString write SetAsString;
published
{ Published declarations }
property DataType: TDataType read FDataType write SetDataType default dtString;
property DateTimeFormat: TDateTimeFormat read GetDateTimeFormat write SetDateTimeFormat;
property Digits: Integer read FDigits write FDigits default 2;
property DisplayFalse: string index 0 read GetBoolValues write SetBoolValues;
property DisplayTrue: string index 1 read GetBoolValues write SetBoolValues;
property FloatFormat: TFloatFormat read FFloatFormat write FFloatFormat default ffGeneral;
property Precision: Integer read FPrecision write FPrecision default 15;
property RaiseOnError: Boolean read FRaiseOnError write FRaiseOnError default False;
property Text: string read GetString write SetAsString;
property OnChange: TNotifyEvent read FOnChange write FOnChange;
end;
implementation
{ TDateTimeFormat }
constructor TDateTimeFormat.Create;
begin
inherited Create;
ResetDefault;
end;
destructor TDateTimeFormat.Destroy;
begin
inherited Destroy;
end;
procedure TDateTimeFormat.ResetDefault;
begin
FAMString := TimeAMString;
FPMString := TimePMString;
FTimeSeparator := SysUtils.TimeSeparator;
FDateSeparator := SysUtils.DateSeparator;
FDateOrder := doDMY;
FTimeFormat := tfHHMMSS;
FLongDate := False;
FFourDigitYear := True;
FLeadingZero := False;
end;
procedure TDateTimeFormat.Assign(Source: TPersistent);
begin
if Source is TDateTimeFormat then
begin
FAMString := TDateTimeFormat(Source).AMString;
FPMString := TDateTimeFormat(Source).PMString;
FDateOrder := TDateTimeFormat(Source).DateOrder;
FTimeFormat := TDateTimeFormat(Source).TimeFormat;
FTimeSeparator := TDateTimeFormat(Source).TimeSeparator;
FDateSeparator := TDateTimeFormat(Source).DateSeparator;
FLongDate := TDateTimeFormat(Source).LongDate;
FFourDigitYear := TDateTimeFormat(Source).FourDigitYear;
FLeadingZero := TDateTimeFormat(Source).LeadingZero;
Exit;
end;
inherited Assign(Source);
end;
function TDateTimeFormat.GetAMString: string;
begin
Result := FAMString;
end;
procedure TDateTimeFormat.SetAMString(const Value: string);
begin
if Value = '' then
FAMString := TimeAMString
else
FAMString := Value;
end;
function TDateTimeFormat.GetPMString: string;
begin
Result := FPMString;
end;
procedure TDateTimeFormat.SetPMString(const Value: string);
begin
if Value = '' then
FPMString := TimePMString
else
FPMString := Value;
end;
function TDateTimeFormat.GetDateMask: string;
var
S: array[1..3] of string;
Separator: string;
begin
Result := '';
if LeadingZero then
begin
S[1] := 'dd';
S[2] := 'mm';
end
else
begin
S[1] := 'd';
S[2] := 'm';
end;
if LongDate then
begin
S[2] := 'mmmm';
Separator := ' ';
end
else
Separator := '"' + DateSeparator + '"';
if FourDigitYear then
S[3] := 'yyyy'
else
S[3] := 'yy';
case DateOrder of
doDMY: Result := S[1] + Separator + S[2] + Separator + S[3];
doMDY: Result := S[2] + Separator + S[1] + Separator + S[3];
doYMD: Result := S[3] + Separator + S[2] + Separator + S[1];
end;
end;
function TDateTimeFormat.GetTimeMask: string;
var
S: array[1..3] of string;
Separator: string;
AMPM: string;
begin
Separator := '"' + TimeSeparator + '"';
AMPM := ' ' + AMString + '/' + PMString;
if LeadingZero then
begin
S[1] := 'hh';
S[2] := 'nn';
S[3] := 'ss';
end
else
begin
S[1] := 'h';
S[2] := 'n';
S[3] := 's';
end;
case TimeFormat of
tfHHMMSS: Result := S[1] + Separator + S[2] + Separator + S[3];
tfHMMSS: Result := S[1] + Separator + S[2] + Separator + S[3] + AMPM;
tfHHMM: Result := S[1] + Separator + S[2];
tfHMM: Result := S[1] + Separator + S[2] + AMPM;
end;
end;
function TDateTimeFormat.GetMask: string;
begin
Result := GetDateMask + ' ' + GetTimeMask;
end;
{ TConverter }
constructor TConverter.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
{$IFDEF RX_D4} // Polaris
FData := EmptyStr;
{$ELSE}
FData := NullStr;
{$ENDIF}
FDataType := dtString;
FPrecision := 15;
FDigits := 2;
FDateTimeFormat := TDateTimeFormat.Create;
FTextValues[False] := 'False';
FTextValues[True] := 'True';
FRaiseOnError := False;
end;
destructor TConverter.Destroy;
begin
FDataType := dtString;
{$IFNDEF RX_D4} // Polaris
DisposeStr(FData);
{$ENDIF}
FDateTimeFormat.Free;
inherited Destroy;
end;
procedure TConverter.Clear;
begin
{$IFNDEF RX_D4} // Polaris
DisposeStr(FData);
FData := NullStr;
{$ELSE}
FData := EmptyStr;
{$ENDIF}
Change;
end;
procedure TConverter.Change;
begin
if Assigned(FOnChange) then
FOnChange(Self);
end;
function TConverter.GetString: string;
begin
{$IFDEF RX_D4} // Polaris
Result := FData;
{$ELSE}
Result := FData^;
{$ENDIF}
end;
procedure TConverter.SetString(const Value: string);
begin
{$IFDEF RX_D4} // Polaris
FData := Value;
{$ELSE}
AssignStr(FData, Value);
{$ENDIF}
end;
function TConverter.GetDateTimeFormat: TDateTimeFormat;
begin
Result := FDateTimeFormat;
end;
procedure TConverter.SetDateTimeFormat(Value: TDateTimeFormat);
begin
FDateTimeFormat.Assign(Value);
end;
function TConverter.GetBoolValues(Index: Integer): string;
begin
Result := string(FTextValues[Boolean(Index)]);
end;
procedure TConverter.SetBoolValues(Index: Integer; const Value: string);
begin
FTextValues[Boolean(Index)] := Value;
end;
function TConverter.BoolToStr(Value: Boolean): string;
begin
Result := GetBoolValues(Integer(Value));
end;
function TConverter.FloatToString(Value: Double): string;
begin
Result := FloatToStrF(Value, FloatFormat, Precision, Digits);
end;
function TConverter.DateTimeToString(Value: TDateTime): string;
begin
case FDataType of
dtDate: Result := FormatDateTime(DateTimeFormat.DateMask, Value);
dtTime: Result := FormatDateTime(DateTimeFormat.TimeMask, Value);
else
Result := FormatDateTime(DateTimeFormat.Mask, Value);
end;
end;
procedure TConverter.SetDataType(Value: TDataType);
begin
if Value <> FDataType then
begin
FDataType := Value;
try
CheckDataType;
Change;
except
Clear;
if RaiseOnError then
raise;
end;
end;
end;
function TConverter.IsValidChar(Ch: Char): Boolean;
begin
case FDataType of
dtString: Result := True;
dtInteger: Result := CharInSet(Ch, ['+', '-', '0'..'9']);
dtFloat: Result := CharInSet(Ch, [DecimalSeparator, '+', '-', '0'..'9', 'E', 'e']);
dtDateTime, dtDate, dtTime: Result := True;
dtBoolean: Result := True;
else Result := False;
end;
end;
procedure TConverter.CheckDataType;
begin
case FDataType of
dtInteger, dtFloat: StrToFloat(GetString);
dtDateTime, dtDate, dtTime: GetDateTime;
end;
end;
function TConverter.GetAsBoolean: Boolean;
var
S: string;
begin
S := GetString;
Result := (Length(S) > 0) and (CharInSet(S[1], ['T', 't', 'Y', 'y']) or
(S = string(FTextValues[True])));
end;
function TConverter.GetDateTime: TDateTime;
var
S: string;
I: Integer;
DateS, TimeS: set of AnsiChar;
begin
S := GetString;
DateS := ['/', '.'] + [DateTimeFormat.DateSeparator] -
[DateTimeFormat.TimeSeparator];
TimeS := [':', '-'] - [DateTimeFormat.DateSeparator] +
[DateTimeFormat.TimeSeparator];
for I := 1 to Length(S) do
if CharInSet(S[I], DateS) then
S[I] := DateSeparator
else
if CharInSet(S[I], TimeS) then
S[I] := TimeSeparator;
Result := StrToDateTime(S);
end;
function TConverter.GetAsDateTime: TDateTime;
begin
try
Result := GetDateTime;
except
Result := NullDate;
end;
end;
function TConverter.GetAsDate: TDateTime;
var
Year, Month, Day: Word;
begin
try
Result := GetAsDateTime;
DecodeDate(Result, Year, Month, Day);
Result := EncodeDate(Year, Month, Day);
except
Result := NullDate;
end;
end;
function TConverter.GetAsTime: TDateTime;
var
Hour, Min, Sec, MSec: Word;
begin
try
Result := GetAsDateTime;
DecodeTime(Result, Hour, Min, Sec, MSec);
Result := EncodeTime(Hour, Min, Sec, MSec);
except
Result := NullDate;
end;
end;
function TConverter.GetAsFloat: Double;
begin
try
case FDataType of
dtDateTime: Result := GetAsDateTime;
dtDate: Result := GetAsDate;
dtTime: Result := GetAsTime;
else
Result := StrToFloat(GetString);
end;
except
Result := 0.0;
end;
end;
function TConverter.GetAsInteger: Longint;
begin
Result := Round(GetAsFloat);
end;
function TConverter.GetAsString: string;
begin
case FDataType of
dtString: Result := GetString;
dtInteger: Result := IntToStr(GetAsInteger);
dtFloat: Result := FloatToString(GetAsFloat);
dtDateTime: Result := DateTimeToString(GetAsDateTime);
dtDate: Result := DateTimeToString(GetAsDate);
dtTime: Result := DateTimeToString(GetAsTime);
dtBoolean: Result := BoolToStr(GetAsBoolean);
end;
end;
procedure TConverter.SetAsBoolean(Value: Boolean);
begin
SetAsString(BoolToStr(Value));
end;
procedure TConverter.SetAsDateTime(Value: TDateTime);
begin
SetAsString(DateTimeToStr(Value));
end;
procedure TConverter.SetAsDate(Value: TDateTime);
begin
SetAsDateTime(Value);
end;
procedure TConverter.SetAsTime(Value: TDateTime);
begin
SetAsDateTime(Value);
end;
procedure TConverter.SetAsFloat(Value: Double);
begin
if FDataType in [dtDateTime, dtDate, dtTime] then
SetAsDateTime(Value)
else
SetAsString(FloatToStr(Value));
end;
procedure TConverter.SetAsInteger(Value: Longint);
begin
if FDataType = dtInteger then
SetAsString(IntToStr(Value))
else
SetAsFloat(Value);
end;
procedure TConverter.SetAsString(const Value: string);
var
S: string;
begin
S := GetString;
SetString(Value);
try
CheckDataType;
Change;
except
SetString(S);
if RaiseOnError then
raise;
end;
end;
end.
| 25.716287 | 94 | 0.694157 |
833fbb2594338d8c7cb60a5e865f3ce546efe35f
| 64,109 |
pas
|
Pascal
|
references/jcl/jcl/source/common/JclWideStrings.pas
|
zekiguven/alcinoe
|
e55c5368ee8bfe7cd6d92424c29ab07d8a3e844c
|
[
"Apache-2.0"
] | 851 |
2018-02-05T09:54:56.000Z
|
2022-03-24T23:13:10.000Z
|
references/jcl/jcl/source/common/JclWideStrings.pas
|
zekiguven/alcinoe
|
e55c5368ee8bfe7cd6d92424c29ab07d8a3e844c
|
[
"Apache-2.0"
] | 200 |
2018-02-06T18:52:39.000Z
|
2022-03-24T19:59:14.000Z
|
references/jcl/jcl/source/common/JclWideStrings.pas
|
zekiguven/alcinoe
|
e55c5368ee8bfe7cd6d92424c29ab07d8a3e844c
|
[
"Apache-2.0"
] | 197 |
2018-03-20T20:49:55.000Z
|
2022-03-21T17:38:14.000Z
|
{**************************************************************************************************}
{ }
{ Project JEDI Code Library (JCL) }
{ }
{ The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); }
{ you may not use this file except in compliance with the License. You may obtain a copy of the }
{ License at http://www.mozilla.org/MPL/ }
{ }
{ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF }
{ ANY KIND, either express or implied. See the License for the specific language governing rights }
{ and limitations under the License. }
{ }
{ The Original Code is WStrUtils.PAS, released on 2004-01-25. }
{ }
{ The Initial Developers of the Original Code are: }
{ - Andreas Hausladen <Andreas dott Hausladen att gmx dott de> }
{ - Mike Lischke (WideQuotedStr & WideExtractQuotedStr from Unicode.pas) }
{ Portions created by Andreas Hausladen are Copyright (C) of Andreas Hausladen. }
{ All rights reserved. }
{ Portions created by Mike Lischke are Copyright (C) of Mike Lischke. All rights reserved. }
{ }
{ Contributor(s): }
{ Robert Marquardt (marquardt) }
{ Robert Rossmair (rrossmair) }
{ ZENsan }
{ Florent Ouchet (outchy) }
{ Kiriakos Vlahos }
{ }
{**************************************************************************************************}
{ }
{ This is a lightweight Unicode unit. For more features use JclUnicode. }
{ }
{ }
{**************************************************************************************************}
{ }
{ Last modified: $Date:: $ }
{ Revision: $Rev:: $ }
{ Author: $Author:: $ }
{ }
{**************************************************************************************************}
unit JclWideStrings;
{$I jcl.inc}
interface
uses
{$IFDEF UNITVERSIONING}
JclUnitVersioning,
{$ENDIF UNITVERSIONING}
{$IFDEF HAS_UNITSCOPE}
System.Classes, System.SysUtils,
{$ELSE ~HAS_UNITSCOPE}
Classes, SysUtils,
{$ENDIF ~HAS_UNITSCOPE}
JclBase;
// Exceptions
type
EJclWideStringError = class(EJclError);
const
// definitions of often used characters:
// Note: Use them only for tests of a certain character not to determine character
// classes (like white spaces) as in Unicode are often many code points defined
// being in a certain class. Hence your best option is to use the various
// UnicodeIs* functions.
WideNull = WideChar(#0);
WideTabulator = WideChar(#9);
WideSpace = WideChar(#32);
// logical line breaks
WideLF = WideChar(#10);
WideLineFeed = WideChar(#10);
WideVerticalTab = WideChar(#11);
WideFormFeed = WideChar(#12);
WideCR = WideChar(#13);
WideCarriageReturn = WideChar(#13);
WideCRLF = WideString(#13#10);
WideLineSeparator = WideChar($2028);
WideParagraphSeparator = WideChar($2029);
{$IFDEF MSWINDOWS}
WideLineBreak = WideCRLF;
{$ENDIF MSWINDOWS}
{$IFDEF UNIX}
WideLineBreak = WideLineFeed;
{$ENDIF UNIX}
BOM_LSB_FIRST = WideChar($FEFF);
BOM_MSB_FIRST = WideChar($FFFE);
type
{$IFDEF SUPPORTS_UNICODE}
TJclWideStrings = {$IFDEF HAS_UNITSCOPE}System.{$ENDIF}Classes.TStrings;
TJclWideStringList = {$IFDEF HAS_UNITSCOPE}System.{$ENDIF}Classes.TStringList;
{$ELSE ~SUPPORTS_UNICODE}
TWideFileOptionsType =
(
foAnsiFile, // loads/writes an ANSI file
foUnicodeLB // reads/writes BOM_LSB_FIRST/BOM_MSB_FIRST
);
TWideFileOptions = set of TWideFileOptionsType;
TSearchFlag = (
sfCaseSensitive, // match letter case
sfIgnoreNonSpacing, // ignore non-spacing characters in search
sfSpaceCompress, // handle several consecutive white spaces as one white space
// (this applies to the pattern as well as the search text)
sfWholeWordOnly // match only text at end/start and/or surrounded by white spaces
);
TSearchFlags = set of TSearchFlag;
TJclWideStrings = class;
TJclWideStringList = class;
TJclWideStringListSortCompare = function(List: TJclWideStringList; Index1, Index2: Integer): Integer;
TJclWideStrings = class(TPersistent)
private
FDelimiter: WideChar;
FQuoteChar: WideChar;
FNameValueSeparator: WideChar;
FLineSeparator: WideString;
FUpdateCount: Integer;
function GetCommaText: WideString;
function GetDelimitedText: WideString;
function GetName(Index: Integer): WideString;
function GetValue(const Name: WideString): WideString;
procedure ReadData(Reader: TReader);
procedure SetCommaText(const Value: WideString);
procedure SetDelimitedText(const Value: WideString);
procedure SetValue(const Name, Value: WideString);
procedure WriteData(Writer: TWriter);
function GetValueFromIndex(Index: Integer): WideString;
procedure SetValueFromIndex(Index: Integer; const Value: WideString);
protected
procedure DefineProperties(Filer: TFiler); override;
function ExtractName(const S: WideString): WideString;
function GetP(Index: Integer): PWideString; virtual; abstract;
function Get(Index: Integer): WideString;
function GetCapacity: Integer; virtual;
function GetCount: Integer; virtual; abstract;
function GetObject(Index: Integer): TObject; virtual;
function GetTextStr: WideString; virtual;
procedure Put(Index: Integer; const S: WideString); virtual; abstract;
procedure PutObject(Index: Integer; AObject: TObject); virtual; abstract;
procedure SetCapacity(NewCapacity: Integer); virtual;
procedure SetTextStr(const Value: WideString); virtual;
procedure SetUpdateState(Updating: Boolean); virtual;
property UpdateCount: Integer read FUpdateCount;
function CompareStrings(const S1, S2: WideString): Integer; virtual;
procedure AssignTo(Dest: TPersistent); override;
public
constructor Create;
function Add(const S: WideString): Integer; virtual;
function AddObject(const S: WideString; AObject: TObject): Integer; virtual;
procedure Append(const S: WideString);
procedure AddStrings(Strings: TJclWideStrings); overload; virtual;
procedure AddStrings(Strings: TStrings); overload; virtual;
procedure Assign(Source: TPersistent); override;
function CreateAnsiStringList: TStrings;
procedure AddStringsTo(Dest: TStrings); virtual;
procedure BeginUpdate;
procedure Clear; virtual; abstract;
procedure Delete(Index: Integer); virtual; abstract;
procedure EndUpdate;
function Equals(Strings: TJclWideStrings): Boolean; {$IFDEF RTL200_UP}reintroduce; {$ENDIF RTL200_UP}overload;
function Equals(Strings: TStrings): Boolean; {$IFDEF RTL200_UP}reintroduce; {$ENDIF RTL200_UP}overload;
procedure Exchange(Index1, Index2: Integer); virtual;
function GetText: PWideChar; virtual;
function IndexOf(const S: WideString): Integer; virtual;
function IndexOfName(const Name: WideString): Integer; virtual;
function IndexOfObject(AObject: TObject): Integer; virtual;
procedure Insert(Index: Integer; const S: WideString); virtual;
procedure InsertObject(Index: Integer; const S: WideString;
AObject: TObject); virtual;
procedure LoadFromFile(const FileName: TFileName;
WideFileOptions: TWideFileOptions = []); virtual;
procedure LoadFromStream(Stream: TStream;
WideFileOptions: TWideFileOptions = []); virtual;
procedure Move(CurIndex, NewIndex: Integer); virtual;
procedure SaveToFile(const FileName: TFileName;
WideFileOptions: TWideFileOptions = []); virtual;
procedure SaveToStream(Stream: TStream;
WideFileOptions: TWideFileOptions = []); virtual;
procedure SetText(Text: PWideChar); virtual;
function GetDelimitedTextEx(ADelimiter, AQuoteChar: WideChar): WideString;
procedure SetDelimitedTextEx(ADelimiter, AQuoteChar: WideChar; const Value: WideString);
property Capacity: Integer read GetCapacity write SetCapacity;
property CommaText: WideString read GetCommaText write SetCommaText;
property Count: Integer read GetCount;
property Delimiter: WideChar read FDelimiter write FDelimiter;
property DelimitedText: WideString read GetDelimitedText write SetDelimitedText;
property Names[Index: Integer]: WideString read GetName;
property Objects[Index: Integer]: TObject read GetObject write PutObject;
property QuoteChar: WideChar read FQuoteChar write FQuoteChar;
property Values[const Name: WideString]: WideString read GetValue write SetValue;
property ValueFromIndex[Index: Integer]: WideString read GetValueFromIndex write SetValueFromIndex;
property NameValueSeparator: WideChar read FNameValueSeparator write FNameValueSeparator;
property LineSeparator: WideString read FLineSeparator write FLineSeparator;
property PStrings[Index: Integer]: PWideString read GetP;
property Strings[Index: Integer]: WideString read Get write Put; default;
property Text: WideString read GetTextStr write SetTextStr;
end;
// do not replace by JclUnicode.TWideStringList (speed and size issue)
PWStringItem = ^TWStringItem;
TWStringItem = record
FString: WideString;
FObject: TObject;
end;
TJclWideStringList = class(TJclWideStrings)
private
FList: TList;
FSorted: Boolean;
FDuplicates: TDuplicates;
FCaseSensitive: Boolean;
FOnChange: TNotifyEvent;
FOnChanging: TNotifyEvent;
procedure SetSorted(Value: Boolean);
procedure SetCaseSensitive(const Value: Boolean);
protected
function GetItem(Index: Integer): PWStringItem;
procedure Changed; virtual;
procedure Changing; virtual;
function GetP(Index: Integer): PWideString; override;
function GetCapacity: Integer; override;
function GetCount: Integer; override;
function GetObject(Index: Integer): TObject; override;
procedure Put(Index: Integer; const Value: WideString); override;
procedure PutObject(Index: Integer; AObject: TObject); override;
procedure SetCapacity(NewCapacity: Integer); override;
procedure SetUpdateState(Updating: Boolean); override;
function CompareStrings(const S1, S2: WideString): Integer; override;
public
constructor Create;
destructor Destroy; override;
function AddObject(const S: WideString; AObject: TObject): Integer; override;
procedure Clear; override;
procedure Delete(Index: Integer); override;
procedure Exchange(Index1, Index2: Integer); override;
function Find(const S: WideString; var Index: Integer): Boolean; virtual;
// Find() also works with unsorted lists
function IndexOf(const S: WideString): Integer; override;
procedure InsertObject(Index: Integer; const S: WideString;
AObject: TObject); override;
procedure Sort; virtual;
procedure CustomSort(Compare: TJclWideStringListSortCompare); virtual;
property Duplicates: TDuplicates read FDuplicates write FDuplicates;
property Sorted: Boolean read FSorted write SetSorted;
property CaseSensitive: Boolean read FCaseSensitive write SetCaseSensitive;
property OnChange: TNotifyEvent read FOnChange write FOnChange;
property OnChanging: TNotifyEvent read FOnChanging write FOnChanging;
end;
{$ENDIF ~SUPPORTS_UNICODE}
TWideStringList = TJclWideStringList;
TWideStrings = TJclWideStrings;
TJclUnicodeStringList = TJclWideStringList;
TJclUnicodeStrings = TJclWideStrings;
// OF deprecated?
TWStringList = TJclWideStringList;
TWStrings = TJclWideStrings;
// WideChar functions
function CharToWideChar(Ch: AnsiChar): WideChar;
function WideCharToChar(Ch: WideChar): AnsiChar;
// PWideChar functions
procedure MoveWideChar(const Source; var Dest; Count: SizeInt);
function StrLenW(const Str: PWideChar): SizeInt;
function StrEndW(const Str: PWideChar): PWideChar;
function StrMoveW(Dest: PWideChar; const Source: PWideChar; Count: SizeInt): PWideChar;
function StrCopyW(Dest: PWideChar; const Source: PWideChar): PWideChar;
function StrECopyW(Dest: PWideChar; const Source: PWideChar): PWideChar;
function StrLCopyW(Dest: PWideChar; const Source: PWideChar; MaxLen: SizeInt): PWideChar;
function StrPCopyWW(Dest: PWideChar; const Source: WideString): PWideChar;
function StrPCopyW(Dest: PWideChar; const Source: AnsiString): PWideChar;
function StrPLCopyWW(Dest: PWideChar; const Source: WideString; MaxLen: SizeInt): PWideChar;
function StrPLCopyW(Dest: PWideChar; const Source: AnsiString; MaxLen: SizeInt): PWideChar;
function StrCatW(Dest: PWideChar; const Source: PWideChar): PWideChar;
function StrLCatW(Dest: PWideChar; const Source: PWideChar; MaxLen: SizeInt): PWideChar;
function StrCompW(const Str1, Str2: PWideChar): SizeInt;
function StrICompW(const Str1, Str2: PWideChar): SizeInt;
function StrLCompW(const Str1, Str2: PWideChar; MaxLen: SizeInt): SizeInt;
function StrLICompW(const Str1, Str2: PWideChar; MaxLen: SizeInt): SizeInt;
function StrLICompW2(const Str1, Str2: PWideChar; MaxLen: SizeInt): SizeInt;
function StrNScanW(const Str1, Str2: PWideChar): SizeInt;
function StrRNScanW(const Str1, Str2: PWideChar): SizeInt;
function StrScanW(const Str: PWideChar; Ch: WideChar): PWideChar; overload;
function StrScanW(Str: PWideChar; Chr: WideChar; StrLen: SizeInt): PWideChar; overload;
function StrRScanW(const Str: PWideChar; Chr: WideChar): PWideChar;
function StrPosW(const Str, SubStr: PWideChar): PWideChar;
function StrAllocW(WideSize: SizeInt): PWideChar;
function StrBufSizeW(const Str: PWideChar): SizeInt;
function StrNewW(const Str: PWideChar): PWideChar; overload;
function StrNewW(const Str: WideString): PWideChar; overload;
procedure StrDisposeW(Str: PWideChar);
procedure StrDisposeAndNilW(var Str: PWideChar);
procedure StrSwapByteOrder(Str: PWideChar);
// WideString functions
function WidePos(const SubStr, S: WideString): SizeInt;
function WideQuotedStr(const S: WideString; Quote: WideChar): WideString;
function WideExtractQuotedStr(var Src: PWideChar; Quote: WideChar): WideString;
function WideCompareText(const S1, S2: WideString): SizeInt;
function WideCompareStr(const S1, S2: WideString): SizeInt;
function WideUpperCase(const S: WideString): WideString;
function WideLowerCase(const S: WideString): WideString;
function TrimW(const S: WideString): WideString;
function TrimLeftW(const S: WideString): WideString;
function TrimRightW(const S: WideString): WideString;
function WideReverse(const AText: Widestring): Widestring;
procedure WideReverseInPlace(var S: WideString);
function TrimLeftLengthW(const S: WideString): SizeInt;
function TrimRightLengthW(const S: WideString): SizeInt;
{$IFNDEF FPC}
function WideStartsText(const SubStr, S: WideString): Boolean;
function WideStartsStr(const SubStr, S: WideString): Boolean;
{$ENDIF ~FPC}
// MultiSz Routines
type
PWideMultiSz = PWideChar;
function StringsToMultiSz(var Dest: PWideMultiSz; const Source: TJclWideStrings): PWideMultiSz;
procedure MultiSzToStrings(const Dest: TJclWideStrings; const Source: PWideMultiSz);
function MultiSzLength(const Source: PWideMultiSz): SizeInt;
procedure AllocateMultiSz(var Dest: PWideMultiSz; Len: SizeInt);
procedure FreeMultiSz(var Dest: PWideMultiSz);
function MultiSzDup(const Source: PWideMultiSz): PWideMultiSz;
{$IFDEF UNITVERSIONING}
const
UnitVersioning: TUnitVersionInfo = (
RCSfile: '$URL$';
Revision: '$Revision$';
Date: '$Date$';
LogPath: 'JCL\source\common';
Extra: '';
Data: nil
);
{$ENDIF UNITVERSIONING}
implementation
uses
{$IFDEF HAS_UNITSCOPE}
{$IFDEF HAS_UNIT_RTLCONSTS}
System.RTLConsts,
{$ENDIF HAS_UNIT_RTLCONSTS}
{$IFDEF MSWINDOWS}
Winapi.Windows,
{$ENDIF MSWINDOWS}
System.Math,
{$ELSE ~HAS_UNITSCOPE}
{$IFDEF HAS_UNIT_RTLCONSTS}
RTLConsts,
{$ENDIF HAS_UNIT_RTLCONSTS}
{$IFDEF MSWINDOWS}
Windows,
{$ENDIF MSWINDOWS}
Math,
{$ENDIF ~HAS_UNITSCOPE}
JclUnicode,
JclResources;
procedure SwapWordByteOrder(P: PWideChar; Len: SizeInt);
begin
while Len > 0 do
begin
Dec(Len);
P^ := WideChar((Word(P^) shr 8) or (Word(P^) shl 8));
Inc(P);
end;
end;
//=== WideChar functions =====================================================
function CharToWideChar(Ch: AnsiChar): WideChar;
var
WS: WideString;
begin
WS := WideChar(Ch);
Result := WS[1];
end;
function WideCharToChar(Ch: WideChar): AnsiChar;
var
S: WideString;
begin
S := Ch;
Result := AnsiChar(S[1]);
end;
//=== PWideChar functions ====================================================
procedure MoveWideChar(const Source; var Dest; Count: SizeInt);
begin
Move(Source, Dest, Count * SizeOf(WideChar));
end;
function StrAllocW(WideSize: SizeInt): PWideChar;
begin
WideSize := SizeOf(WideChar) * WideSize + SizeOf(SizeInt);
Result := AllocMem(WideSize);
SizeInt(Pointer(Result)^) := WideSize;
Inc(Result, SizeOf(SizeInt) div SizeOf(WideChar));
end;
function StrNewW(const Str: PWideChar): PWideChar;
// Duplicates the given string (if not nil) and returns the address of the new string.
var
Size: SizeInt;
begin
if Str = nil then
Result := nil
else
begin
Size := StrLenW(Str) + 1;
Result := StrMoveW(StrAllocW(Size), Str, Size);
end;
end;
function StrNewW(const Str: WideString): PWideChar;
begin
Result := StrNewW(PWideChar(Str));
end;
procedure StrDisposeW(Str: PWideChar);
// releases a string allocated with StrNewW or StrAllocW
begin
if Str <> nil then
begin
Dec(Str, SizeOf(SizeInt) div SizeOf(WideChar));
FreeMem(Str);
end;
end;
procedure StrDisposeAndNilW(var Str: PWideChar);
var
Buff: PWideChar;
begin
Buff := Str;
Str := nil;
StrDisposeW(Buff);
end;
const
// data used to bring UTF-16 coded strings into correct UTF-32 order for correct comparation
UTF16Fixup: array [0..31] of Word = (
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
$2000, $F800, $F800, $F800, $F800
);
function StrCompW(const Str1, Str2: PWideChar): SizeInt;
// Binary comparation of Str1 and Str2 with surrogate fix-up.
// Returns < 0 if Str1 is smaller in binary order than Str2, = 0 if both strings are
// equal and > 0 if Str1 is larger than Str2.
//
// This code is based on an idea of Markus W. Scherer (IBM).
// Note: The surrogate fix-up is necessary because some single value code points have
// larger values than surrogates which are in UTF-32 actually larger.
var
C1, C2: Word;
Run1, Run2: PWideChar;
begin
Run1 := Str1;
Run2 := Str2;
repeat
C1 := Word(Run1^);
C1 := Word(C1 or UTF16Fixup[C1 shr 11]);
C2 := Word(Run2^);
C2 := Word(C2 or UTF16Fixup[C2 shr 11]);
// now C1 and C2 are in UTF-32-compatible order
Result := SizeInt(C1) - SizeInt(C2);
if(Result <> 0) or (C1 = 0) or (C2 = 0) then
Break;
Inc(Run1);
Inc(Run2);
until False;
// If the strings have different lengths but the comparation returned equity so far
// then adjust the result so that the longer string is marked as the larger one.
if Result = 0 then
Result := (Run1 - Str1) - (Run2 - Str2);
end;
function StrLCompW(const Str1, Str2: PWideChar; MaxLen: SizeInt): SizeInt;
// compares strings up to MaxLen code points
// see also StrCompW
var
S1, S2: PWideChar;
C1, C2: Word;
begin
if MaxLen > 0 then
begin
S1 := Str1;
S2 := Str2;
repeat
C1 := Word(S1^);
C1 := Word(C1 or UTF16Fixup[C1 shr 11]);
C2 := Word(S2^);
C2 := Word(C2 or UTF16Fixup[C2 shr 11]);
// now C1 and C2 are in UTF-32-compatible order
{ TODO : surrogates take up 2 words and are counted twice here, count them only once }
Result := SizeInt(C1) - SizeInt(C2);
Dec(MaxLen);
if(Result <> 0) or (C1 = 0) or (C2 = 0) or (MaxLen = 0) then
Break;
Inc(S1);
Inc(S2);
until False;
end
else
Result := 0;
end;
function StrICompW(const Str1, Str2: PWideChar): SizeInt;
// Compares Str1 to Str2 without case sensitivity.
// See also comments in StrCompW, but keep in mind that case folding might result in
// one-to-many mappings which must be considered here.
{$IFDEF UNICODE_RTL_DATABASE}
begin
Result := AnsiStrIComp(Str1, Str2)
end;
{$ELSE ~UNICODE_RTL_DATABASE}
var
C1, C2: Word;
S1, S2: PWideChar;
Run1, Run2: PWideChar;
Folded1, Folded2: WideString;
begin
// Because of size changes of the string when doing case folding
// it is unavoidable to convert both strings completely in advance.
S1 := Str1;
S2 := Str2;
Folded1 := '';
while S1^ <> #0 do
begin
Folded1 := Folded1 + WideCaseFolding(S1^);
Inc(S1);
end;
Folded2 := '';
while S2^ <> #0 do
begin
Folded2 := Folded2 + WideCaseFolding(S2^);
Inc(S2);
end;
Run1 := PWideChar(Folded1);
Run2 := PWideChar(Folded2);
repeat
C1 := Word(Run1^);
C1 := Word(C1 or UTF16Fixup[C1 shr 11]);
C2 := Word(Run2^);
C2 := Word(C2 or UTF16Fixup[C2 shr 11]);
// now C1 and C2 are in UTF-32-compatible order
Result := SizeInt(C1) - SizeInt(C2);
if(Result <> 0) or (C1 = 0) or (C2 = 0) then
Break;
Inc(Run1);
Inc(Run2);
until False;
// If the strings have different lengths but the comparation returned equity so far
// then adjust the result so that the longer string is marked as the larger one.
if Result = 0 then
Result := (Run1 - PWideChar(Folded1)) - (Run2 - PWideChar(Folded2));
end;
{$ENDIF ~UNICODE_RTL_DATABASE}
function StrLICompW(const Str1, Str2: PWideChar; MaxLen: SizeInt): SizeInt;
// compares strings up to MaxLen code points
// see also StrICompW
{$IFDEF UNICODE_RTL_DATABASE}
begin
Result := AnsiStrIComp(Str1, Str2)
end;
{$ELSE UNICODE_RTL_DATABASE}
var
S1, S2: PWideChar;
C1, C2: Word;
Run1, Run2: PWideChar;
Folded1, Folded2: WideString;
begin
if MaxLen > 0 then
begin
// Because of size changes of the string when doing case folding
// it is unavoidable to convert both strings completely in advance.
S1 := Str1;
S2 := Str2;
Folded1 := '';
while S1^ <> #0 do
begin
Folded1 := Folded1 + WideCaseFolding(S1^);
Inc(S1);
end;
Folded2 := '';
while S2^ <> #0 do
begin
Folded2 := Folded2 + WideCaseFolding(S2^);
Inc(S2);
end;
Run1 := PWideChar(Folded1);
Run2 := PWideChar(Folded2);
repeat
C1 := Word(Run1^);
C1 := Word(C1 or UTF16Fixup[C1 shr 11]);
C2 := Word(Run2^);
C2 := Word(C2 or UTF16Fixup[C2 shr 11]);
// now C1 and C2 are in UTF-32-compatible order
{ TODO : surrogates take up 2 words and are counted twice here, count them only once }
Result := SizeInt(C1) - SizeInt(C2);
Dec(MaxLen);
if(Result <> 0) or (C1 = 0) or (C2 = 0) or (MaxLen = 0) then
Break;
Inc(Run1);
Inc(Run2);
until False;
end
else
Result := 0;
end;
{$ENDIF UNICODE_RTL_DATABASE}
function StrLICompW2(const Str1, Str2: PWideChar; MaxLen: SizeInt): SizeInt;
var
P1, P2: WideString;
begin
// faster than the JclUnicode.StrLICompW function
SetString(P1, Str1, Min(MaxLen, StrLenW(Str1)));
SetString(P2, Str2, Min(MaxLen, StrLenW(Str2)));
Result := WideCompareText(P1, P2);
end;
function StrPosW(const Str, SubStr: PWideChar): PWideChar;
var
P: PWideChar;
I: SizeInt;
begin
Result := nil;
if (Str = nil) or (SubStr = nil) or (Str^ = #0) or (SubStr^ = #0) then
Exit;
Result := Str;
while Result^ <> #0 do
begin
if Result^ <> SubStr^ then
Inc(Result)
else
begin
P := Result + 1;
I := 1;
while (P^ <> #0) and (P^ = SubStr[I]) do
begin
Inc(I);
Inc(P);
end;
if SubStr[I] = #0 then
Exit
else
Inc(Result);
end;
end;
Result := nil;
end;
function StrLenW(const Str: PWideChar): SizeInt;
begin
Result := 0;
if Str <> nil then
while Str[Result] <> #0 do
Inc(Result);
end;
function StrScanW(const Str: PWideChar; Ch: WideChar): PWideChar;
begin
Result := Str;
if Result <> nil then
begin
while (Result^ <> #0) and (Result^ <> Ch) do
Inc(Result);
if (Result^ = #0) and (Ch <> #0) then
Result := nil;
end;
end;
function StrEndW(const Str: PWideChar): PWideChar;
begin
Result := Str;
if Result <> nil then
while Result^ <> #0 do
Inc(Result);
end;
function StrCopyW(Dest: PWideChar; const Source: PWideChar): PWideChar;
var
Src: PWideChar;
begin
Result := Dest;
if Dest <> nil then
begin
Src := Source;
if Src <> nil then
while Src^ <> #0 do
begin
Dest^ := Src^;
Inc(Src);
Inc(Dest);
end;
Dest^ := #0;
end;
end;
function StrECopyW(Dest: PWideChar; const Source: PWideChar): PWideChar;
var
Src: PWideChar;
begin
if Dest <> nil then
begin
Src := Source;
if Src <> nil then
while Src^ <> #0 do
begin
Dest^ := Src^;
Inc(Src);
Inc(Dest);
end;
Dest^ := #0;
end;
Result := Dest;
end;
function StrLCopyW(Dest: PWideChar; const Source: PWideChar; MaxLen: SizeInt): PWideChar;
var
Src: PWideChar;
begin
Result := Dest;
if (Dest <> nil) and (MaxLen > 0) then
begin
Src := Source;
if Src <> nil then
while (MaxLen > 0) and (Src^ <> #0) do
begin
Dest^ := Src^;
Inc(Src);
Inc(Dest);
Dec(MaxLen);
end;
Dest^ := #0;
end;
end;
function StrCatW(Dest: PWideChar; const Source: PWideChar): PWideChar;
begin
Result := Dest;
StrCopyW(StrEndW(Dest), Source);
end;
function StrLCatW(Dest: PWideChar; const Source: PWideChar; MaxLen: SizeInt): PWideChar;
begin
Result := Dest;
StrLCopyW(StrEndW(Dest), Source, MaxLen);
end;
function StrMoveW(Dest: PWideChar; const Source: PWideChar; Count: SizeInt): PWideChar;
begin
Result := Dest;
if Count > 0 then
Move(Source^, Dest^, Count * SizeOf(WideChar));
end;
function StrPCopyWW(Dest: PWideChar; const Source: WideString): PWideChar;
begin
Result := StrLCopyW(Dest, PWideChar(Source), Length(Source));
end;
function StrPLCopyWW(Dest: PWideChar; const Source: WideString; MaxLen: SizeInt): PWideChar;
begin
Result := StrLCopyW(Dest, PWideChar(Source), MaxLen);
end;
function StrRScanW(const Str: PWideChar; Chr: WideChar): PWideChar;
var
P: PWideChar;
begin
Result := nil;
if Str <> nil then
begin
P := Str;
repeat
if P^ = Chr then
Result := P;
Inc(P);
until P^ = #0;
end;
end;
// (rom) following functions copied from JclUnicode.pas
// exchanges in each character of the given string the low order and high order
// byte to go from LSB to MSB and vice versa.
// EAX/RAX contains address of string
// stop at the first #0 character
procedure StrSwapByteOrder(Str: PWideChar);
asm
{$IFDEF CPU32}
// --> EAX Str
PUSH ESI
PUSH EDI
MOV ESI, EAX
MOV EDI, ESI
XOR EAX, EAX // clear high order byte to be able to use 32bit operand below
@@1:
LODSW
OR EAX, EAX
JZ @@2
XCHG AL, AH
STOSW
JMP @@1
@@2:
POP EDI
POP ESI
{$ENDIF CPU32}
{$IFDEF CPU64}
// --> RCX Str
XOR RAX, RAX // clear high order byte to be able to use 64bit operand below
@@1:
MOV AX, WORD PTR [RCX]
OR RAX, RAX
JZ @@2
XCHG AL, AH
MOV WORD PTR [RCX], AX
ADD ECX, 2
JMP @@1
@@2:
{$ENDIF CPU64}
end;
function StrNScanW(const Str1, Str2: PWideChar): SizeInt;
// Determines where (in Str1) the first time one of the characters of Str2 appear.
// The result is the length of a string part of Str1 where none of the characters of
// Str2 do appear (not counting the trailing #0 and starting with position 0 in Str1).
var
Run: PWideChar;
begin
Result := -1;
if (Str1 <> nil) and (Str2 <> nil) then
begin
Run := Str1;
while Run^ <> #0 do
begin
if StrScanW(Str2, Run^) <> nil then
Break;
Inc(Run);
end;
Result := Run - Str1;
end;
end;
function StrRNScanW(const Str1, Str2: PWideChar): SizeInt;
// This function does the same as StrRNScanW but uses Str1 in reverse order. This
// means Str1 points to the last character of a string, is traversed reversely
// and terminates with a starting #0. This is useful for parsing strings stored
// in reversed macro buffers etc.
var
Run: PWideChar;
begin
Result := -1;
if (Str1 <> nil) and (Str2 <> nil) then
begin
Run := Str1;
while Run^ <> #0 do
begin
if StrScanW(Str2, Run^) <> nil then
Break;
Dec(Run);
end;
Result := Str1 - Run;
end;
end;
// Returns a pointer to first occurrence of a specified character in a string
// or nil if not found.
// Note: this is just a binary search for the specified character and there's no
// check for a terminating null. Instead at most StrLen characters are
// searched. This makes this function extremly fast.
//
function StrScanW(Str: PWideChar; Chr: WideChar; StrLen: SizeInt): PWideChar;
begin
Result := Str;
while StrLen > 0 do
begin
if Result^ = Chr then
Exit;
Inc(Result);
end;
Result := nil;
end;
function StrBufSizeW(const Str: PWideChar): SizeInt;
// Returns max number of wide characters that can be stored in a buffer
// allocated by StrAllocW.
var
P: PWideChar;
begin
if Str <> nil then
begin
P := Str;
Dec(P, SizeOf(SizeInt) div SizeOf(WideChar));
Result := (PSizeInt(P)^ - SizeOf(SizeInt)) div SizeOf(WideChar);
end
else
Result := 0;
end;
function StrPCopyW(Dest: PWideChar; const Source: AnsiString): PWideChar;
// copies a Pascal-style string to a null-terminated wide string
begin
Result := StrPLCopyW(Dest, Source, SizeInt(Length(Source)));
Result[Length(Source)] := WideNull;
end;
function StrPLCopyW(Dest: PWideChar; const Source: AnsiString; MaxLen: SizeInt): PWideChar;
// copies characters from a Pascal-style string into a null-terminated wide string
var
P: PAnsiChar;
begin
P := PAnsiChar(Pointer(Source));
while MaxLen > 0 do
begin
Dest^ := WideChar(Ord(P^));
Inc(P);
Inc(Dest);
Dec(MaxLen);
end;
Result := Dest;
end;
//=== WideString functions ===================================================
function WidePos(const SubStr, S: WideString): SizeInt;
var
P: PWideChar;
begin
P := StrPosW(PWideChar(S), PWideChar(SubStr));
if P <> nil then
Result := P - PWideChar(S) + 1
else
Result := 0;
end;
// original code by Mike Lischke (extracted from JclUnicode.pas)
function WideQuotedStr(const S: WideString; Quote: WideChar): WideString;
var
P, Src,
Dest: PWideChar;
AddCount: SizeInt;
begin
AddCount := 0;
P := StrScanW(PWideChar(S), Quote);
while P <> nil do
begin
Inc(P);
Inc(AddCount);
P := StrScanW(P, Quote);
end;
if AddCount = 0 then
Result := Quote + S + Quote
else
begin
SetLength(Result, Length(S) + AddCount + 2);
Dest := PWideChar(Result);
Dest^ := Quote;
Inc(Dest);
Src := PWideChar(S);
P := StrScanW(Src, Quote);
repeat
Inc(P);
MoveWideChar(Src^, Dest^, P - Src);
Inc(Dest, P - Src);
Dest^ := Quote;
Inc(Dest);
Src := P;
P := StrScanW(Src, Quote);
until P = nil;
P := StrEndW(Src);
MoveWideChar(Src^, Dest^, P - Src);
Inc(Dest, P - Src);
Dest^ := Quote;
end;
end;
// original code by Mike Lischke (extracted from JclUnicode.pas)
function WideExtractQuotedStr(var Src: PWideChar; Quote: WideChar): WideString;
var
P, Dest: PWideChar;
DropCount: SizeInt;
begin
Result := '';
if (Src = nil) or (Src^ <> Quote) then
Exit;
Inc(Src);
DropCount := 1;
P := Src;
Src := StrScanW(Src, Quote);
while Src <> nil do // count adjacent pairs of quote chars
begin
Inc(Src);
if Src^ <> Quote then
Break;
Inc(Src);
Inc(DropCount);
Src := StrScanW(Src, Quote);
end;
if Src = nil then
Src := StrEndW(P);
if (Src - P) <= 1 then
Exit;
if DropCount = 1 then
SetString(Result, P, Src - P - 1)
else
begin
SetLength(Result, Src - P - DropCount);
Dest := PWideChar(Result);
Src := StrScanW(P, Quote);
while Src <> nil do
begin
Inc(Src);
if Src^ <> Quote then
Break;
MoveWideChar(P^, Dest^, Src - P);
Inc(Dest, Src - P);
Inc(Src);
P := Src;
Src := StrScanW(Src, Quote);
end;
if Src = nil then
Src := StrEndW(P);
MoveWideChar(P^, Dest^, Src - P - 1);
end;
end;
function TrimW(const S: WideString): WideString;
// available from Delphi 7 up
{$IFDEF RTL150_UP}
begin
Result := Trim(S);
end;
{$ELSE ~RTL150_UP}
var
I, L: SizeInt;
begin
L := Length(S);
I := 1;
while (I <= L) and (S[I] <= ' ') do
Inc(I);
if I > L then
Result := ''
else
begin
while S[L] <= ' ' do
Dec(L);
Result := Copy(S, I, L - I + 1);
end;
end;
{$ENDIF ~RTL150_UP}
function TrimLeftW(const S: WideString): WideString;
// available from Delphi 7 up
{$IFDEF RTL150_UP}
begin
Result := TrimLeft(S);
end;
{$ELSE ~RTL150_UP}
var
I, L: SizeInt;
begin
L := Length(S);
I := 1;
while (I <= L) and (S[I] <= ' ') do
Inc(I);
Result := Copy(S, I, Maxint);
end;
{$ENDIF ~RTL150_UP}
function TrimRightW(const S: WideString): WideString;
// available from Delphi 7 up
{$IFDEF RTL150_UP}
begin
Result := TrimRight(S);
end;
{$ELSE ~RTL150_UP}
var
I: SizeInt;
begin
I := Length(S);
while (I > 0) and (S[I] <= ' ') do
Dec(I);
Result := Copy(S, 1, I);
end;
{$ENDIF ~RTL150_UP}
function WideReverse(const AText: Widestring): Widestring;
begin
Result := AText;
WideReverseInPlace(Result);
end;
procedure WideReverseInPlace(var S: WideString);
var
P1, P2: PWideChar;
C: WideChar;
begin
UniqueString(S);
P1 := PWideChar(S);
P2 := PWideChar(S) + Length(S) - 1;
while P1 < P2 do
begin
C := P1^;
P1^ := P2^;
P2^ := C;
Inc(P1);
Dec(P2);
end;
end;
function WideCompareText(const S1, S2: WideString): SizeInt;
begin
{$IFDEF MSWINDOWS}
if Win32Platform = VER_PLATFORM_WIN32_WINDOWS then
Result := AnsiCompareText(string(S1), string(S2))
else
Result := CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE,
PWideChar(S1), Length(S1), PWideChar(S2), Length(S2)) - 2;
{$ELSE ~MSWINDOWS}
{ TODO : Don't cheat here }
Result := CompareText(S1, S2);
{$ENDIF MSWINDOWS}
end;
function WideCompareStr(const S1, S2: WideString): SizeInt;
begin
{$IFDEF MSWINDOWS}
if Win32Platform = VER_PLATFORM_WIN32_WINDOWS then
Result := AnsiCompareStr(string(S1), string(S2))
else
Result := CompareStringW(LOCALE_USER_DEFAULT, 0,
PWideChar(S1), Length(S1), PWideChar(S2), Length(S2)) - 2;
{$ELSE ~MSWINDOWS}
{$IFDEF FPC}
Result := SysUtils.WideCompareStr(S1, S2);
{$ELSE ~FPC}
{ TODO : Don't cheat here }
Result := CompareString(S1, S2);
{$ENDIF ~FPC}
{$ENDIF ~MSWINDOWS}
end;
function WideUpperCase(const S: WideString): WideString;
begin
Result := S;
if Result <> '' then
{$IFDEF MSWINDOWS}
CharUpperBuffW(Pointer(Result), Length(Result));
{$ELSE ~MSWINDOWS}
{ TODO : Don't cheat here }
Result := UpperCase(Result);
{$ENDIF ~MSWINDOWS}
end;
function WideLowerCase(const S: WideString): WideString;
begin
Result := S;
if Result <> '' then
{$IFDEF MSWINDOWS}
CharLowerBuffW(Pointer(Result), Length(Result));
{$ELSE ~MSWINDOWS}
{ TODO : Don't cheat here }
Result := LowerCase(Result);
{$ENDIF ~MSWINDOWS}
end;
function TrimLeftLengthW(const S: WideString): SizeInt;
var
Len: SizeInt;
begin
Len := Length(S);
Result := 1;
while (Result <= Len) and (S[Result] <= #32) do
Inc(Result);
Result := Len - Result + 1;
end;
function TrimRightLengthW(const S: WideString): SizeInt;
begin
Result := Length(S);
while (Result > 0) and (S[Result] <= #32) do
Dec(Result);
end;
{$IFNDEF FPC}
function WideStartsText(const SubStr, S: WideString): Boolean;
var
Len: SizeInt;
begin
Len := Length(SubStr);
Result := (Len <= Length(S)) and (StrLICompW(PWideChar(SubStr), PWideChar(S), Len) = 0);
end;
function WideStartsStr(const SubStr, S: WideString): Boolean;
var
Len: SizeInt;
begin
Len := Length(SubStr);
Result := (Len <= Length(S)) and (StrLCompW(PWideChar(SubStr), PWideChar(S), Len) = 0);
end;
{$ENDIF ~FPC}
{$IFNDEF SUPPORTS_UNICODE}
//=== { TJclWideStrings } ==========================================================
constructor TJclWideStrings.Create;
begin
inherited Create;
// FLineSeparator := WideChar($2028);
{$IFDEF MSWINDOWS}
FLineSeparator := WideChar(13) + '' + WideChar(10); // compiler wants it this way
{$ENDIF MSWINDOWS}
{$IFDEF UNIX}
FLineSeparator := WideChar(10);
{$ENDIF UNIX}
FNameValueSeparator := '=';
FDelimiter := ',';
FQuoteChar := '"';
end;
function TJclWideStrings.Add(const S: WideString): Integer;
begin
Result := AddObject(S, nil);
end;
function TJclWideStrings.AddObject(const S: WideString; AObject: TObject): Integer;
begin
Result := Count;
InsertObject(Result, S, AObject);
end;
procedure TJclWideStrings.AddStrings(Strings: TJclWideStrings);
var
I: Integer;
begin
for I := 0 to Strings.Count - 1 do
AddObject(Strings.GetP(I)^, Strings.Objects[I]);
end;
procedure TJclWideStrings.AddStrings(Strings: TStrings);
var
I: Integer;
begin
for I := 0 to Strings.Count - 1 do
AddObject(Strings.Strings[I], Strings.Objects[I]);
end;
procedure TJclWideStrings.AddStringsTo(Dest: TStrings);
var
I: Integer;
begin
for I := 0 to Count - 1 do
Dest.AddObject(GetP(I)^, Objects[I]);
end;
procedure TJclWideStrings.Append(const S: WideString);
begin
Add(S);
end;
procedure TJclWideStrings.Assign(Source: TPersistent);
begin
if Source is TJclWideStrings then
begin
BeginUpdate;
try
Clear;
FDelimiter := TJclWideStrings(Source).FDelimiter;
FNameValueSeparator := TJclWideStrings(Source).FNameValueSeparator;
FQuoteChar := TJclWideStrings(Source).FQuoteChar;
AddStrings(TJclWideStrings(Source));
finally
EndUpdate;
end;
end
else
if Source is TStrings then
begin
BeginUpdate;
try
Clear;
{$IFDEF RTL190_UP}
FNameValueSeparator := TStrings(Source).NameValueSeparator;
FQuoteChar := TStrings(Source).QuoteChar;
FDelimiter := TStrings(Source).Delimiter;
{$ELSE ~RTL190_UP}
{$IFDEF RTL150_UP}
FNameValueSeparator := CharToWideChar(TStrings(Source).NameValueSeparator);
{$ENDIF RTL150_UP}
FQuoteChar := CharToWideChar(TStrings(Source).QuoteChar);
FDelimiter := CharToWideChar(TStrings(Source).Delimiter);
{$ENDIF ~RTL190_UP}
AddStrings(TStrings(Source));
finally
EndUpdate;
end;
end
else
inherited Assign(Source);
end;
procedure TJclWideStrings.AssignTo(Dest: TPersistent);
var
I: Integer;
begin
if Dest is TStrings then
begin
TStrings(Dest).BeginUpdate;
try
TStrings(Dest).Clear;
{$IFDEF RTL190_UP}
TStrings(Dest).NameValueSeparator := NameValueSeparator;
TStrings(Dest).QuoteChar := QuoteChar;
TStrings(Dest).Delimiter := Delimiter;
{$ELSE ~RTL190_UP}
{$IFDEF RTL150_UP}
TStrings(Dest).NameValueSeparator := WideCharToChar(NameValueSeparator);
{$ENDIF RTL150_UP}
TStrings(Dest).QuoteChar := WideCharToChar(QuoteChar);
TStrings(Dest).Delimiter := WideCharToChar(Delimiter);
{$ENDIF ~RTL190_UP}
for I := 0 to Count - 1 do
TStrings(Dest).AddObject(GetP(I)^, Objects[I]);
finally
TStrings(Dest).EndUpdate;
end;
end
else
inherited AssignTo(Dest);
end;
procedure TJclWideStrings.BeginUpdate;
begin
if FUpdateCount = 0 then
SetUpdateState(True);
Inc(FUpdateCount);
end;
function TJclWideStrings.CompareStrings(const S1, S2: WideString): Integer;
begin
Result := WideCompareText(S1, S2);
end;
function TJclWideStrings.CreateAnsiStringList: TStrings;
var
I: Integer;
begin
Result := TStringList.Create;
try
Result.BeginUpdate;
for I := 0 to Count - 1 do
Result.AddObject(GetP(I)^, Objects[I]);
Result.EndUpdate;
except
Result.Free;
raise;
end;
end;
procedure TJclWideStrings.DefineProperties(Filer: TFiler);
function DoWrite: Boolean;
begin
if Filer.Ancestor <> nil then
begin
Result := True;
if Filer.Ancestor is TJclWideStrings then
Result := not Equals(TJclWideStrings(Filer.Ancestor))
end
else
Result := Count > 0;
end;
begin
Filer.DefineProperty('Strings', ReadData, WriteData, DoWrite);
end;
procedure TJclWideStrings.EndUpdate;
begin
Dec(FUpdateCount);
if FUpdateCount = 0 then
SetUpdateState(False);
end;
function TJclWideStrings.Equals(Strings: TStrings): Boolean;
var
I: Integer;
begin
Result := False;
if Strings.Count = Count then
begin
for I := 0 to Count - 1 do
if Strings[I] <> PStrings[I]^ then
Exit;
Result := True;
end;
end;
function TJclWideStrings.Equals(Strings: TJclWideStrings): Boolean;
var
I: Integer;
begin
Result := False;
if Strings.Count = Count then
begin
for I := 0 to Count - 1 do
if Strings[I] <> PStrings[I]^ then
Exit;
Result := True;
end;
end;
procedure TJclWideStrings.Exchange(Index1, Index2: Integer);
var
TempObject: TObject;
TempString: WideString;
begin
BeginUpdate;
try
TempString := PStrings[Index1]^;
TempObject := Objects[Index1];
PStrings[Index1]^ := PStrings[Index2]^;
Objects[Index1] := Objects[Index2];
PStrings[Index2]^ := TempString;
Objects[Index2] := TempObject;
finally
EndUpdate;
end;
end;
function TJclWideStrings.ExtractName(const S: WideString): WideString;
var
Index: Integer;
begin
Result := S;
Index := WidePos(NameValueSeparator, Result);
if Index <> 0 then
SetLength(Result, Index - 1)
else
SetLength(Result, 0);
end;
function TJclWideStrings.Get(Index: Integer): WideString;
begin
Result := GetP(Index)^;
end;
function TJclWideStrings.GetCapacity: Integer;
begin
Result := Count;
end;
function TJclWideStrings.GetCommaText: WideString;
begin
Result := GetDelimitedTextEx(',', '"');
end;
function TJclWideStrings.GetDelimitedText: WideString;
begin
Result := GetDelimitedTextEx(FDelimiter, FQuoteChar);
end;
function TJclWideStrings.GetDelimitedTextEx(ADelimiter, AQuoteChar: WideChar): WideString;
var
S: WideString;
P: PWideChar;
I, Num: Integer;
begin
Num := GetCount;
if (Num = 1) and (GetP(0)^ = '') then
Result := AQuoteChar + '' + AQuoteChar // Compiler wants it this way
else
begin
Result := '';
for I := 0 to Count - 1 do
begin
S := GetP(I)^;
P := PWideChar(S);
while True do
begin
case P[0] of
WideChar(0)..WideChar(32):
Inc(P);
else
if (P[0] = AQuoteChar) or (P[0] = ADelimiter) then
Inc(P)
else
Break;
end;
end;
if P[0] <> WideChar(0) then
S := WideQuotedStr(S, AQuoteChar);
Result := Result + S + ADelimiter;
end;
System.Delete(Result, Length(Result), 1);
end;
end;
function TJclWideStrings.GetName(Index: Integer): WideString;
var
I: Integer;
begin
Result := GetP(Index)^;
I := WidePos(FNameValueSeparator, Result);
if I > 0 then
SetLength(Result, I - 1);
end;
function TJclWideStrings.GetObject(Index: Integer): TObject;
begin
Result := nil;
end;
function TJclWideStrings.GetText: PWideChar;
begin
Result := StrNewW(GetTextStr);
end;
function TJclWideStrings.GetTextStr: WideString;
var
I: Integer;
Len, LL: Integer;
P: PWideChar;
W: PWideString;
begin
Len := 0;
LL := Length(LineSeparator);
for I := 0 to Count - 1 do
Inc(Len, Length(GetP(I)^) + LL);
SetLength(Result, Len);
P := PWideChar(Result);
for I := 0 to Count - 1 do
begin
W := GetP(I);
Len := Length(W^);
if Len > 0 then
begin
MoveWideChar(W^[1], P[0], Len);
Inc(P, Len);
end;
if LL > 0 then
begin
MoveWideChar(FLineSeparator[1], P[0], LL);
Inc(P, LL);
end;
end;
end;
function TJclWideStrings.GetValue(const Name: WideString): WideString;
var
Idx: Integer;
begin
Idx := IndexOfName(Name);
if Idx >= 0 then
Result := GetValueFromIndex(Idx)
else
Result := '';
end;
function TJclWideStrings.GetValueFromIndex(Index: Integer): WideString;
var
I: Integer;
begin
Result := GetP(Index)^;
I := WidePos(FNameValueSeparator, Result);
if I > 0 then
System.Delete(Result, 1, I)
else
Result := '';
end;
function TJclWideStrings.IndexOf(const S: WideString): Integer;
begin
for Result := 0 to Count - 1 do
if CompareStrings(GetP(Result)^, S) = 0 then
Exit;
Result := -1;
end;
function TJclWideStrings.IndexOfName(const Name: WideString): Integer;
begin
for Result := 0 to Count - 1 do
if CompareStrings(Names[Result], Name) = 0 then
Exit;
Result := -1;
end;
function TJclWideStrings.IndexOfObject(AObject: TObject): Integer;
begin
for Result := 0 to Count - 1 do
if Objects[Result] = AObject then
Exit;
Result := -1;
end;
procedure TJclWideStrings.Insert(Index: Integer; const S: WideString);
begin
InsertObject(Index, S, nil);
end;
procedure TJclWideStrings.InsertObject(Index: Integer; const S: WideString; AObject: TObject);
begin
end;
procedure TJclWideStrings.LoadFromFile(const FileName: TFileName;
WideFileOptions: TWideFileOptions = []);
var
Stream: TFileStream;
begin
Stream := TFileStream.Create(FileName, fmOpenRead or fmShareDenyWrite);
try
LoadFromStream(Stream, WideFileOptions);
finally
Stream.Free;
end;
end;
procedure TJclWideStrings.LoadFromStream(Stream: TStream;
WideFileOptions: TWideFileOptions = []);
var
AnsiS: AnsiString;
WideS: WideString;
WC: WideChar;
begin
BeginUpdate;
try
Clear;
WC := #0;
Stream.Read(WC, SizeOf(WC));
if (foAnsiFile in WideFileOptions) and (Hi(Word(WC)) <> 0) and (WC <> BOM_LSB_FIRST) and (WC <> BOM_MSB_FIRST) then
begin
Stream.Seek(-SizeOf(WC), soFromCurrent);
SetLength(AnsiS, (Stream.Size - Stream.Position) div SizeOf(AnsiChar));
Stream.Read(AnsiS[1], Length(AnsiS) * SizeOf(AnsiChar));
SetTextStr(WideString(AnsiS)); // explicit Unicode conversion
end
else
begin
if (WC <> BOM_LSB_FIRST) and (WC <> BOM_MSB_FIRST) then
Stream.Seek(-SizeOf(WC), soFromCurrent);
SetLength(WideS, (Stream.Size - Stream.Position + 1) div SizeOf(WideChar));
Stream.Read(WideS[1], Length(WideS) * SizeOf(WideChar));
if WC = BOM_MSB_FIRST then
SwapWordByteOrder(PWideChar(WideS), Length(WideS));
SetTextStr(WideS);
end;
finally
EndUpdate;
end;
end;
procedure TJclWideStrings.Move(CurIndex, NewIndex: Integer);
var
TempObject: TObject;
TempString: WideString;
begin
if CurIndex <> NewIndex then
begin
BeginUpdate;
try
TempString := GetP(CurIndex)^;
TempObject := GetObject(CurIndex);
Delete(CurIndex);
InsertObject(NewIndex, TempString, TempObject);
finally
EndUpdate;
end;
end;
end;
procedure TJclWideStrings.ReadData(Reader: TReader);
begin
BeginUpdate;
try
Clear;
Reader.ReadListBegin;
while not Reader.EndOfList do
if Reader.NextValue in [vaLString, vaString] then
Add(Reader.ReadString)
else
Add(Reader.ReadWideString);
Reader.ReadListEnd;
finally
EndUpdate;
end;
end;
procedure TJclWideStrings.SaveToFile(const FileName: TFileName; WideFileOptions: TWideFileOptions = []);
var
Stream: TFileStream;
begin
Stream := TFileStream.Create(FileName, fmCreate);
try
SaveToStream(Stream, WideFileOptions);
finally
Stream.Free;
end;
end;
procedure TJclWideStrings.SaveToStream(Stream: TStream; WideFileOptions: TWideFileOptions = []);
var
AnsiS: AnsiString;
WideS: WideString;
WC: WideChar;
begin
if foAnsiFile in WideFileOptions then
begin
AnsiS := AnsiString(GetTextStr); // explicit Unicode conversion
Stream.Write(AnsiS[1], Length(AnsiS) * SizeOf(AnsiChar));
end
else
begin
if foUnicodeLB in WideFileOptions then
begin
WC := BOM_LSB_FIRST;
Stream.Write(WC, SizeOf(WC));
end;
WideS := GetTextStr;
Stream.Write(WideS[1], Length(WideS) * SizeOf(WideChar));
end;
end;
procedure TJclWideStrings.SetCapacity(NewCapacity: Integer);
begin
end;
procedure TJclWideStrings.SetCommaText(const Value: WideString);
begin
SetDelimitedTextEx(',', '"', Value);
end;
procedure TJclWideStrings.SetDelimitedText(const Value: WideString);
begin
SetDelimitedTextEx(Delimiter, QuoteChar, Value);
end;
procedure TJclWideStrings.SetDelimitedTextEx(ADelimiter, AQuoteChar: WideChar;
const Value: WideString);
var
P, P1: PWideChar;
S: WideString;
procedure IgnoreWhiteSpace(var P: PWideChar);
begin
while True do
case P^ of
WideChar(1)..WideChar(32):
Inc(P);
else
Break;
end;
end;
begin
BeginUpdate;
try
Clear;
P := PWideChar(Value);
IgnoreWhiteSpace(P);
while P[0] <> WideChar(0) do
begin
if P[0] = AQuoteChar then
S := WideExtractQuotedStr(P, AQuoteChar)
else
begin
P1 := P;
while (P[0] > WideChar(32)) and (P[0] <> ADelimiter) do
Inc(P);
SetString(S, P1, P - P1);
end;
Add(S);
IgnoreWhiteSpace(P);
if P[0] = ADelimiter then
begin
Inc(P);
IgnoreWhiteSpace(P);
end;
end;
finally
EndUpdate;
end;
end;
procedure TJclWideStrings.SetText(Text: PWideChar);
begin
SetTextStr(Text);
end;
procedure TJclWideStrings.SetTextStr(const Value: WideString);
var
P, Start: PWideChar;
S: WideString;
Len: Integer;
begin
BeginUpdate;
try
Clear;
if Value <> '' then
begin
P := PWideChar(Value);
if P <> nil then
begin
while P[0] <> WideChar(0) do
begin
Start := P;
while True do
begin
case P[0] of
WideChar(0), WideChar(10), WideChar(13):
Break;
end;
Inc(P);
end;
Len := P - Start;
if Len > 0 then
begin
SetString(S, Start, Len);
AddObject(S, nil); // consumes most time
end
else
AddObject('', nil);
if P[0] = WideChar(13) then
Inc(P);
if P[0] = WideChar(10) then
Inc(P);
end;
end;
end;
finally
EndUpdate;
end;
end;
procedure TJclWideStrings.SetUpdateState(Updating: Boolean);
begin
end;
procedure TJclWideStrings.SetValue(const Name, Value: WideString);
var
Idx: Integer;
begin
Idx := IndexOfName(Name);
if Idx >= 0 then
SetValueFromIndex(Idx, Value)
else
if Value <> '' then
Add(Name + NameValueSeparator + Value);
end;
procedure TJclWideStrings.SetValueFromIndex(Index: Integer; const Value: WideString);
var
S: WideString;
I: Integer;
begin
if Value = '' then
Delete(Index)
else
begin
if Index < 0 then
Index := Add('');
S := GetP(Index)^;
I := WidePos(NameValueSeparator, S);
if I > 0 then
System.Delete(S, I, MaxInt);
S := S + NameValueSeparator + Value;
Put(Index, S);
end;
end;
procedure TJclWideStrings.WriteData(Writer: TWriter);
var
I: Integer;
begin
Writer.WriteListBegin;
for I := 0 to Count - 1 do
Writer.WriteWideString(GetP(I)^);
Writer.WriteListEnd;
end;
//=== { TJclWideStringList } =======================================================
constructor TJclWideStringList.Create;
begin
inherited Create;
FList := TList.Create;
end;
destructor TJclWideStringList.Destroy;
begin
FOnChange := nil;
FOnChanging := nil;
Inc(FUpdateCount); // do not call unnecessary functions
Clear;
FList.Free;
inherited Destroy;
end;
function TJclWideStringList.AddObject(const S: WideString; AObject: TObject): Integer;
begin
if not Sorted then
Result := Count
else
if Find(S, Result) then
case Duplicates of
dupIgnore:
Exit;
dupError:
raise EListError.CreateRes(@SDuplicateString);
end;
InsertObject(Result, S, AObject);
end;
procedure TJclWideStringList.Changed;
begin
if Assigned(FOnChange) then
FOnChange(Self);
end;
procedure TJclWideStringList.Changing;
begin
if Assigned(FOnChanging) then
FOnChanging(Self);
end;
procedure TJclWideStringList.Clear;
var
I: Integer;
Item: PWStringItem;
begin
if FUpdateCount = 0 then
Changing;
for I := 0 to Count - 1 do
begin
Item := PWStringItem(FList[I]);
Item.FString := '';
FreeMem(Item);
end;
FList.Clear;
if FUpdateCount = 0 then
Changed;
end;
function TJclWideStringList.CompareStrings(const S1, S2: WideString): Integer;
begin
if CaseSensitive then
Result := WideCompareStr(S1, S2)
else
Result := WideCompareText(S1, S2);
end;
threadvar
CustomSortList: TJclWideStringList;
CustomSortCompare: TJclWideStringListSortCompare;
function WStringListCustomSort(Item1, Item2: Pointer): Integer;
begin
Result := CustomSortCompare(CustomSortList,
CustomSortList.FList.IndexOf(Item1),
CustomSortList.FList.IndexOf(Item2));
end;
procedure TJclWideStringList.CustomSort(Compare: TJclWideStringListSortCompare);
var
TempList: TJclWideStringList;
TempCompare: TJclWideStringListSortCompare;
begin
TempList := CustomSortList;
TempCompare := CustomSortCompare;
CustomSortList := Self;
CustomSortCompare := Compare;
try
Changing;
FList.Sort(WStringListCustomSort);
Changed;
finally
CustomSortList := TempList;
CustomSortCompare := TempCompare;
end;
end;
procedure TJclWideStringList.Delete(Index: Integer);
var
Item: PWStringItem;
begin
if FUpdateCount = 0 then
Changing;
Item := PWStringItem(FList[Index]);
FList.Delete(Index);
Item.FString := '';
FreeMem(Item);
if FUpdateCount = 0 then
Changed;
end;
procedure TJclWideStringList.Exchange(Index1, Index2: Integer);
begin
if FUpdateCount = 0 then
Changing;
FList.Exchange(Index1, Index2);
if FUpdateCount = 0 then
Changed;
end;
function TJclWideStringList.Find(const S: WideString; var Index: Integer): Boolean;
var
L, H, I, C: Integer;
begin
Result := False;
if Sorted then
begin
L := 0;
H := Count - 1;
while L <= H do
begin
I := (L + H) shr 1;
C := CompareStrings(GetItem(I).FString, S);
if C < 0 then
L := I + 1
else
begin
H := I - 1;
if C = 0 then
begin
Result := True;
if Duplicates <> dupAccept then
L := I;
end;
end;
end;
Index := L;
end
else
begin
Index := IndexOf(S);
Result := Index <> -1;
end;
end;
function TJclWideStringList.GetCapacity: Integer;
begin
Result := FList.Capacity;
end;
function TJclWideStringList.GetCount: Integer;
begin
Result := FList.Count;
end;
function TJclWideStringList.GetItem(Index: Integer): PWStringItem;
begin
Result := FList[Index];
end;
function TJclWideStringList.GetObject(Index: Integer): TObject;
begin
Result := GetItem(Index).FObject;
end;
function TJclWideStringList.GetP(Index: Integer): PWideString;
begin
Result := Addr(GetItem(Index).FString);
end;
function TJclWideStringList.IndexOf(const S: WideString): Integer;
begin
if Sorted then
begin
Result := -1;
if not Find(S, Result) then
Result := -1;
end
else
begin
for Result := 0 to Count - 1 do
if CompareStrings(GetItem(Result).FString, S) = 0 then
Exit;
Result := -1;
end;
end;
procedure TJclWideStringList.InsertObject(Index: Integer; const S: WideString;
AObject: TObject);
var
P: PWStringItem;
begin
if FUpdateCount = 0 then
Changing;
FList.Insert(Index, nil); // error check
P := AllocMem(SizeOf(TWStringItem));
FList[Index] := P;
Put(Index, S);
if AObject <> nil then
PutObject(Index, AObject);
if FUpdateCount = 0 then
Changed;
end;
procedure TJclWideStringList.Put(Index: Integer; const Value: WideString);
begin
if FUpdateCount = 0 then
Changing;
GetItem(Index).FString := Value;
if FUpdateCount = 0 then
Changed;
end;
procedure TJclWideStringList.PutObject(Index: Integer; AObject: TObject);
begin
if FUpdateCount = 0 then
Changing;
GetItem(Index).FObject := AObject;
if FUpdateCount = 0 then
Changed;
end;
procedure TJclWideStringList.SetCapacity(NewCapacity: Integer);
begin
FList.Capacity := NewCapacity;
end;
procedure TJclWideStringList.SetCaseSensitive(const Value: Boolean);
begin
if Value <> FCaseSensitive then
begin
FCaseSensitive := Value;
if Sorted then
begin
Sorted := False;
Sorted := True; // re-sort
end;
end;
end;
procedure TJclWideStringList.SetSorted(Value: Boolean);
begin
if Value <> FSorted then
begin
FSorted := Value;
if FSorted then
begin
FSorted := False;
Sort;
FSorted := True;
end;
end;
end;
procedure TJclWideStringList.SetUpdateState(Updating: Boolean);
begin
if Updating then
Changing
else
Changed;
end;
function DefaultSort(List: TJclWideStringList; Index1, Index2: Integer): Integer;
begin
Result := List.CompareStrings(List.GetItem(Index1).FString, List.GetItem(Index2).FString);
end;
procedure TJclWideStringList.Sort;
begin
if not Sorted then
CustomSort(DefaultSort);
end;
{$ENDIF ~SUPPORTS_UNICODE}
function StringsToMultiSz(var Dest: PWideMultiSz; const Source: TJclWideStrings): PWideMultiSz;
var
I, TotalLength: Integer;
P: PWideMultiSz;
begin
Assert(Source <> nil);
TotalLength := 1;
for I := 0 to Source.Count - 1 do
if Source[I] = '' then
raise EJclWideStringError.CreateRes(@RsInvalidEmptyStringItem)
else
Inc(TotalLength, StrLenW(PWideChar(Source[I])) + 1);
AllocateMultiSz(Dest, TotalLength);
P := Dest;
for I := 0 to Source.Count - 1 do
begin
P := StrECopyW(P, PWideChar(Source[I]));
Inc(P);
end;
P^:= #0;
Result := Dest;
end;
procedure MultiSzToStrings(const Dest: TJclWideStrings; const Source: PWideMultiSz);
var
P: PWideMultiSz;
begin
Assert(Dest <> nil);
Dest.BeginUpdate;
try
Dest.Clear;
if Source <> nil then
begin
P := Source;
while P^ <> #0 do
begin
Dest.Add(P);
P := StrEndW(P);
Inc(P);
end;
end;
finally
Dest.EndUpdate;
end;
end;
function MultiSzLength(const Source: PWideMultiSz): SizeInt;
var
P: PWideMultiSz;
begin
Result := 0;
if Source <> nil then
begin
P := Source;
repeat
Inc(Result, StrLenW(P) + 1);
P := StrEndW(P);
Inc(P);
until P^ = #0;
Inc(Result);
end;
end;
procedure AllocateMultiSz(var Dest: PWideMultiSz; Len: SizeInt);
begin
if Len > 0 then
GetMem(Dest, Len * SizeOf(WideChar))
else
Dest := nil;
end;
procedure FreeMultiSz(var Dest: PWideMultiSz);
begin
if Dest <> nil then
FreeMem(Dest);
Dest := nil;
end;
function MultiSzDup(const Source: PWideMultiSz): PWideMultiSz;
var
Len: Integer;
begin
if Source <> nil then
begin
Len := MultiSzLength(Source);
Result := nil;
AllocateMultiSz(Result, Len);
Move(Source^, Result^, Len * SizeOf(WideChar));
end
else
Result := nil;
end;
{$IFDEF UNITVERSIONING}
initialization
RegisterUnitVersion(HInstance, UnitVersioning);
finalization
UnregisterUnitVersion(HInstance);
{$ENDIF UNITVERSIONING}
end.
| 27.657032 | 120 | 0.619039 |
8326e6e1011f0430a7bdbc0f61d4f6ab828c357c
| 2,373 |
dfm
|
Pascal
|
Catalogos/PersonasAccionistasDM.dfm
|
alexismzt/SOFOM
|
57ca73e9f7fbb51521149ea7c0fdc409c22cc6f7
|
[
"Apache-2.0"
] | null | null | null |
Catalogos/PersonasAccionistasDM.dfm
|
alexismzt/SOFOM
|
57ca73e9f7fbb51521149ea7c0fdc409c22cc6f7
|
[
"Apache-2.0"
] | 51 |
2018-07-25T15:39:25.000Z
|
2021-04-21T17:40:57.000Z
|
Catalogos/PersonasAccionistasDM.dfm
|
alexismzt/SOFOM
|
57ca73e9f7fbb51521149ea7c0fdc409c22cc6f7
|
[
"Apache-2.0"
] | 1 |
2021-02-23T17:27:06.000Z
|
2021-02-23T17:27:06.000Z
|
inherited dmPersonasAccionistas: TdmPersonasAccionistas
OldCreateOrder = True
inherited adodsMaster: TADODataSet
CursorType = ctStatic
CommandText =
'select IdPersonaAccionista, IdPersona, IdAccionista, Porcentaje,' +
' Cargo, NivelControl1, NivelControl2, NivelControl3, NivelContro' +
'l4, NivelControl5 from PersonasAccionistas'
object adodsMasterIdPersonaAccionista: TAutoIncField
FieldName = 'IdPersonaAccionista'
ReadOnly = True
Visible = False
end
object adodsMasterIdPersona: TIntegerField
FieldName = 'IdPersona'
Visible = False
end
object adodsMasterIdAccionista: TIntegerField
FieldName = 'IdAccionista'
Visible = False
end
object adodsMasterAccionista: TStringField
FieldKind = fkLookup
FieldName = 'Accionista'
LookupDataSet = adodsPersonas
LookupKeyFields = 'IdPersona'
LookupResultField = 'RazonSocial'
KeyFields = 'IdAccionista'
Size = 300
Lookup = True
end
object adodsMasterPorcentaje: TBCDField
FieldName = 'Porcentaje'
DisplayFormat = '0.00 %'
EditFormat = '0.00'
Precision = 19
end
object adodsMasterCargo: TStringField
FieldName = 'Cargo'
Size = 50
end
object adodsMasterNivelControl1: TBooleanField
DisplayLabel = 'NC1'
FieldName = 'NivelControl1'
end
object adodsMasterNivelControl2: TBooleanField
DisplayLabel = 'NC2'
FieldName = 'NivelControl2'
end
object adodsMasterNivelControl3: TBooleanField
DisplayLabel = 'NC3'
FieldName = 'NivelControl3'
end
object adodsMasterNivelControl4: TBooleanField
DisplayLabel = 'NC4'
FieldName = 'NivelControl4'
end
object adodsMasterNivelControl5: TBooleanField
DisplayLabel = 'NC5'
FieldName = 'NivelControl5'
end
end
object adodsPersonas: TADODataSet
Connection = _dmConection.ADOConnection
CursorType = ctStatic
CommandText =
'SELECT IdPersona, RazonSocial FROM Personas'#13#10'order by RazonSocia' +
'l'#13#10
Parameters = <>
Left = 52
Top = 96
end
object dsMaster: TDataSource
DataSet = adodsMaster
OnDataChange = dsMasterDataChange
Left = 104
Top = 16
end
end
| 29.6625 | 81 | 0.662874 |
83b771598dedc2907313907b2a4c5e9b5fc24ce8
| 2,536 |
pas
|
Pascal
|
demos/standard/Unit1.pas
|
jonahzheng/FMXUI
|
c59e718cfc82d738fe9f295e811d3da11aafecdb
|
[
"MIT"
] | 211 |
2016-02-09T14:51:53.000Z
|
2022-03-24T13:31:26.000Z
|
demos/standard/Unit1.pas
|
jonahzheng/FMXUI
|
c59e718cfc82d738fe9f295e811d3da11aafecdb
|
[
"MIT"
] | 39 |
2017-03-27T05:49:25.000Z
|
2022-03-25T01:32:12.000Z
|
demos/standard/Unit1.pas
|
jonahzheng/FMXUI
|
c59e718cfc82d738fe9f295e811d3da11aafecdb
|
[
"MIT"
] | 81 |
2016-09-10T08:27:28.000Z
|
2022-03-27T13:30:09.000Z
|
unit Unit1;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
FMX.Controls.Presentation, FMX.StdCtrls, FMX.Layouts, FMX.DateTimeCtrls,
{$IF DEFINED(ANDROID) AND (RTLVersion >= 33)}
Androidapi.Helpers, Androidapi.JNI.Os,
System.Permissions,
{$ENDIF}
UI.Base, UI.Standard, UI.Toast, UI.ListView, UI.Dialog, UI.VKhelper;
type
TForm1 = class(TForm)
ToastManager1: TToastManager;
procedure FormShow(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
{$IF DEFINED(ANDROID) AND (RTLVersion >= 33)}
procedure PermissionsCheck;
procedure PermissionsResultHandler(const APermissions: TArray<string>; const AGrantResults: TArray<TPermissionStatus>);
{$ENDIF}
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.fmx}
uses
{$IF DEFINED(ANDROID) AND (RTLVersion >= 33)}
Androidapi.JNI.JavaTypes,
{$ENDIF}
UI.Async,
UI.Frame,
uFrame1,
uFrame2;
procedure TForm1.FormCreate(Sender: TObject);
begin
// use android transparent statusbar new method
TFrameView.SetStatusTransparentNewMethod(True);
TFrameView.SetDefaultStatusLight(False);
TFrameView.SetDefaultStatusTransparent(True);
TFrameView.SetDefaultStatusColor($ff800080);
//TFrameView.SetDefaultBackColor($fff1f2f3);
end;
procedure TForm1.FormShow(Sender: TObject);
begin
TFrame1.ShowFrame(Self, 'FMXUI Demo');
{$IF DEFINED(ANDROID) AND (RTLVersion >= 33)}
PermissionsCheck;
{$ENDIF}
end;
{$IF DEFINED(ANDROID) AND (RTLVersion >= 33)}
procedure TForm1.PermissionsCheck;
begin
if TJBuild_VERSION.JavaClass.SDK_INT >= 23 then
PermissionsService.RequestPermissions([JStringToString(TJManifest_permission.JavaClass.CAMERA),
JStringToString(TJManifest_permission.JavaClass.READ_EXTERNAL_STORAGE),
JStringToString(TJManifest_permission.JavaClass.WRITE_EXTERNAL_STORAGE)], PermissionsResultHandler);
end;
procedure TForm1.PermissionsResultHandler(const APermissions: TArray<string>;
const AGrantResults: TArray<TPermissionStatus>);
begin
if PermissionsService.IsEveryPermissionGranted(
[JStringToString(TJManifest_permission.JavaClass.CAMERA),
JStringToString(TJManifest_permission.JavaClass.READ_EXTERNAL_STORAGE),
JStringToString(TJManifest_permission.JavaClass.WRITE_EXTERNAL_STORAGE)]) then
Toast('Permission granted')
else
Toast('Permission not granted');
end;
{$ENDIF}
end.
| 28.177778 | 123 | 0.766956 |
f14c89aff49f6cb4e5560603c0fbfa1e0f71f2d2
| 23,405 |
dfm
|
Pascal
|
UVespertino.dfm
|
PaulohSouza/Notesc-4.0
|
a0d03f216b8a5cb2b77c470b4739c67667523740
|
[
"MIT"
] | null | null | null |
UVespertino.dfm
|
PaulohSouza/Notesc-4.0
|
a0d03f216b8a5cb2b77c470b4739c67667523740
|
[
"MIT"
] | 1 |
2020-04-03T23:06:38.000Z
|
2020-04-03T23:06:38.000Z
|
UVespertino.dfm
|
PaulohSouza/Notesc-4.0
|
a0d03f216b8a5cb2b77c470b4739c67667523740
|
[
"MIT"
] | null | null | null |
object FrmVespertino: TFrmVespertino
Left = 18
Top = 173
Width = 1036
Height = 746
Caption = 'NOTESC 4 - Controle de Notas do Turno Vespertino'
Color = 8421440
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Menu = MainMenu1
OldCreateOrder = False
WindowState = wsMaximized
OnClose = FormClose
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Label18: TLabel
Left = 424
Top = 532
Width = 211
Height = 13
Caption = 'Escola Manoel Guilherme dos Santos'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Label22: TLabel
Left = 440
Top = 8
Width = 164
Height = 37
Caption = 'Vespertino'
Font.Charset = DEFAULT_CHARSET
Font.Color = clSilver
Font.Height = -32
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Label12: TLabel
Left = 592
Top = 48
Width = 125
Height = 16
Caption = 'Quadro de Avisos'
Font.Charset = DEFAULT_CHARSET
Font.Color = clSilver
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Label13: TLabel
Left = 568
Top = 64
Width = 175
Height = 16
Caption = 'Mensagem da Secretaria'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Label14: TLabel
Left = 952
Top = 56
Width = 150
Height = 16
Caption = 'QUADRO DE AVISOS'
Font.Charset = DEFAULT_CHARSET
Font.Color = clSilver
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Label15: TLabel
Left = 936
Top = 80
Width = 175
Height = 16
Caption = 'Mensagem da Secretaria'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object SpeedButton2: TSpeedButton
Left = 952
Top = 568
Width = 137
Height = 65
Caption = 'Enviar Mensagem'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
Glyph.Data = {
76010000424D7601000000000000760000002800000020000000100000000100
04000000000000010000120B0000120B00001000000000000000000000000000
800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF003C3333339333
337437FFF3337F3333F73CCC33339333344437773F337F33377733CCC3339337
4447337F73FF7F3F337F33CCCCC3934444433373F7737F773373333CCCCC9444
44733337F337773337F3333CCCCC9444443333373F337F3337333333CCCC9444
473333337F337F337F333333CCCC94444333333373F37F33733333333CCC9444
7333333337F37F37F33333333CCC944433333333373F7F373333333333CC9447
33333333337F7F7F3333333333CC94433333333333737F7333333333333C9473
33333333333737F333333333333C943333333333333737333333333333339733
3333333333337F33333333333333933333333333333373333333}
NumGlyphs = 2
ParentFont = False
OnClick = SpeedButton2Click
end
object Panel1: TPanel
Left = 208
Top = 48
Width = 641
Height = 145
TabOrder = 0
object GroupBox2: TGroupBox
Left = 24
Top = 16
Width = 137
Height = 113
TabOrder = 0
object Label1: TLabel
Left = 40
Top = 16
Width = 58
Height = 13
Caption = 'Portugu'#234's'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object DBLookupComboBox2: TDBLookupComboBox
Left = 24
Top = 40
Width = 89
Height = 21
Color = clBtnFace
KeyField = 'CODIGO'
ListField = 'Portugues'
ListSource = UDMDados.DSEnsalamentoVFund
TabOrder = 0
end
object BitBtn1: TBitBtn
Left = 24
Top = 72
Width = 81
Height = 33
Caption = 'OK'
TabOrder = 1
OnClick = BitBtn1Click
end
end
object GroupBox1: TGroupBox
Left = 176
Top = 16
Width = 137
Height = 113
TabOrder = 1
object Label2: TLabel
Left = 40
Top = 16
Width = 66
Height = 13
Caption = 'Matematica'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object DBLookupComboBox1: TDBLookupComboBox
Left = 24
Top = 40
Width = 89
Height = 21
KeyField = 'CODIGO'
ListField = 'Matematica'
ListSource = UDMDados.DSEnsalamentoVFund
ParentShowHint = False
ShowHint = False
TabOrder = 0
end
object BitBtn2: TBitBtn
Left = 24
Top = 72
Width = 81
Height = 33
Caption = 'OK'
TabOrder = 1
OnClick = BitBtn2Click
end
end
object GroupBox3: TGroupBox
Left = 328
Top = 16
Width = 137
Height = 113
TabOrder = 2
object Label3: TLabel
Left = 40
Top = 16
Width = 49
Height = 13
Caption = 'Ci'#234'ncias'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object DBLookupComboBox3: TDBLookupComboBox
Left = 24
Top = 40
Width = 89
Height = 21
KeyField = 'Ciencias'
ListField = 'Ciencias'
ListSource = UDMDados.DSEnsalamentoVFund
TabOrder = 0
end
object BitBtn3: TBitBtn
Left = 24
Top = 72
Width = 81
Height = 33
Caption = 'OK'
TabOrder = 1
OnClick = BitBtn3Click
end
end
object GroupBox4: TGroupBox
Left = 480
Top = 16
Width = 137
Height = 113
TabOrder = 3
object Label4: TLabel
Left = 40
Top = 16
Width = 56
Height = 13
Caption = 'Geografia'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object DBLookupComboBox4: TDBLookupComboBox
Left = 24
Top = 40
Width = 89
Height = 21
KeyField = 'Geografia'
ListField = 'Geografia'
ListSource = UDMDados.DSEnsalamentoVFund
TabOrder = 0
end
object BitBtn4: TBitBtn
Left = 24
Top = 72
Width = 81
Height = 33
Caption = 'OK'
TabOrder = 1
OnClick = BitBtn4Click
end
end
end
object Panel2: TPanel
Left = 208
Top = 208
Width = 641
Height = 145
TabOrder = 1
object GroupBox5: TGroupBox
Left = 24
Top = 16
Width = 137
Height = 113
TabOrder = 0
object Label5: TLabel
Left = 40
Top = 16
Width = 44
Height = 13
Caption = 'Historia'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object DBLookupComboBox5: TDBLookupComboBox
Left = 24
Top = 40
Width = 89
Height = 21
KeyField = 'Historia'
ListField = 'Historia'
ListSource = UDMDados.DSEnsalamentoVFund
TabOrder = 0
end
object BitBtn5: TBitBtn
Left = 24
Top = 72
Width = 81
Height = 33
Caption = 'OK'
TabOrder = 1
OnClick = BitBtn5Click
end
end
object GroupBox6: TGroupBox
Left = 176
Top = 16
Width = 137
Height = 113
TabOrder = 1
object Label6: TLabel
Left = 24
Top = 16
Width = 95
Height = 13
Caption = 'Educa'#231#227'o Fisica'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object DBLookupComboBox6: TDBLookupComboBox
Left = 24
Top = 40
Width = 89
Height = 21
KeyField = 'CODIGO'
ListField = 'Ed_Fisica'
ListSource = UDMDados.DSEnsalamentoVFund
TabOrder = 0
end
object BitBtn6: TBitBtn
Left = 24
Top = 72
Width = 81
Height = 33
Caption = 'OK'
TabOrder = 1
OnClick = BitBtn6Click
end
end
object GroupBox7: TGroupBox
Left = 328
Top = 16
Width = 137
Height = 113
TabOrder = 2
object Label7: TLabel
Left = 48
Top = 16
Width = 30
Height = 13
Caption = 'Artes'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object DBLookupComboBox7: TDBLookupComboBox
Left = 24
Top = 40
Width = 89
Height = 21
KeyField = 'Artes'
ListField = 'Artes'
ListSource = UDMDados.DSEnsalamentoVFund
TabOrder = 0
end
object BitBtn7: TBitBtn
Left = 24
Top = 72
Width = 81
Height = 33
Caption = 'OK'
TabOrder = 1
OnClick = BitBtn7Click
end
end
object GroupBox8: TGroupBox
Left = 480
Top = 16
Width = 137
Height = 113
TabOrder = 3
object Label8: TLabel
Left = 40
Top = 16
Width = 58
Height = 13
Caption = 'L.E.Ingl'#234's'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object DBLookupComboBox8: TDBLookupComboBox
Left = 24
Top = 40
Width = 89
Height = 21
KeyField = 'CODIGO'
ListField = 'Ingles'
ListSource = UDMDados.DSEnsalamentoVFund
TabOrder = 0
end
object BitBtn8: TBitBtn
Left = 24
Top = 72
Width = 81
Height = 33
Caption = 'OK'
TabOrder = 1
OnClick = BitBtn8Click
end
end
end
object Panel3: TPanel
Left = 208
Top = 368
Width = 641
Height = 145
TabOrder = 2
object GroupBox9: TGroupBox
Left = 16
Top = 8
Width = 409
Height = 121
Caption = 'Prim'#225'rio'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
TabOrder = 0
object GroupBox11: TGroupBox
Left = 16
Top = 16
Width = 185
Height = 89
TabOrder = 0
object Label9: TLabel
Left = 31
Top = 8
Width = 106
Height = 13
Caption = 'Professor Regente'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object ComboBox1: TComboBox
Left = 8
Top = 24
Width = 169
Height = 21
ItemHeight = 13
TabOrder = 0
Text = 'Selecione a Sala'
Items.Strings = (
'Primario - 1A'
'Primario - 2A'
'Primario - 3A'
'Primario - 4A')
end
object Button1: TButton
Left = 32
Top = 48
Width = 89
Height = 33
Caption = 'Ok'
TabOrder = 1
OnClick = Button1Click
end
end
object GroupBox12: TGroupBox
Left = 216
Top = 16
Width = 177
Height = 89
TabOrder = 1
object Label17: TLabel
Left = 7
Top = 8
Width = 164
Height = 13
Caption = 'Discisplinas Complementares'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object ComboBox2: TComboBox
Left = 8
Top = 24
Width = 169
Height = 21
ItemHeight = 13
TabOrder = 0
Text = 'Selecione a Sala'
Items.Strings = (
'Artes - 1A'
'Ed. Fisica - 1A'
'Artes - 2A'
'Ed. Fisica - 2A'
'Artes - 3A'
'Ed. Fisica - 3A'
'Artes - 4 A'
'Ed. Fisica - 4A'
'Artes - 5A'
'Ed. Fisica - 5A')
end
object Button2: TButton
Left = 40
Top = 48
Width = 89
Height = 33
Caption = 'Ok'
TabOrder = 1
OnClick = Button2Click
end
end
end
object GroupBox10: TGroupBox
Left = 480
Top = 16
Width = 137
Height = 113
TabOrder = 1
object Label10: TLabel
Left = 32
Top = 32
Width = 86
Height = 24
Caption = 'NOTESC'
Font.Charset = DEFAULT_CHARSET
Font.Color = clTeal
Font.Height = -19
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Label11: TLabel
Left = 40
Top = 56
Width = 62
Height = 13
Caption = 'VERS'#195'O 4'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
end
end
object GroupBox17: TGroupBox
Left = 872
Top = 96
Width = 289
Height = 457
Color = clTeal
ParentColor = False
TabOrder = 3
object Label16: TLabel
Left = 48
Top = 216
Width = 199
Height = 16
Caption = 'Mensagem do Administrador'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Memo1: TMemo
Left = 16
Top = 24
Width = 257
Height = 185
Lines.Strings = (
'Memo1')
TabOrder = 0
end
object Memo2: TMemo
Left = 16
Top = 232
Width = 257
Height = 201
Lines.Strings = (
'Memo2')
TabOrder = 1
end
end
object GroupBox18: TGroupBox
Left = 16
Top = 200
Width = 169
Height = 321
Caption = 'PROGRAMA'
Color = clTeal
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
TabOrder = 4
object BitBtn16: TBitBtn
Left = 16
Top = 24
Width = 137
Height = 81
Action = FrmLigacoes.SobrePrograma
Caption = 'SobrePrograma'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
TabOrder = 0
Glyph.Data = {
76010000424D7601000000000000760000002800000020000000100000000100
04000000000000010000120B0000120B00001000000000000000000000000000
800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333000000000
00333FF777777777773F0000FFFFFFFFFF0377773F3F3F3F3F7308880F0F0F0F
0FF07F33737373737337088880FFFFFFFFF07F3337FFFFFFFFF7088880000000
00037F3337777777777308888033330F03337F3337F3FF7F7FFF088880300000
00007F3337F7777777770FFFF030FFFFFFF07F3FF7F7F3FFFFF708008030F000
00F07F7737F7F77777F70FFFF030F0AAE0F07F3FF7F7F7F337F708008030F0DA
D0F07F7737F7F7FFF7F70FFFF030F00000F07F33F7F7F77777370FF9F030FFFF
FFF07F3737F7FFFFFFF70FFFF030000000007FFFF7F777777777000000333333
3333777777333333333333333333333333333333333333333333}
Layout = blGlyphTop
NumGlyphs = 2
end
object BitBtn17: TBitBtn
Left = 16
Top = 120
Width = 137
Height = 81
Action = FrmLigacoes.Ajuda
Caption = 'Ajuda'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
TabOrder = 1
Glyph.Data = {
76010000424D7601000000000000760000002800000020000000100000000100
04000000000000010000120B0000120B00001000000000000000000000000000
800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
3333333333FFFFF3333333333F797F3333333333F737373FF333333BFB999BFB
33333337737773773F3333BFBF797FBFB33333733337333373F33BFBFBFBFBFB
FB3337F33333F33337F33FBFBFB9BFBFBF3337333337F333373FFBFBFBF97BFB
FBF37F333337FF33337FBFBFBFB99FBFBFB37F3333377FF3337FFBFBFBFB99FB
FBF37F33333377FF337FBFBF77BF799FBFB37F333FF3377F337FFBFB99FB799B
FBF373F377F3377F33733FBF997F799FBF3337F377FFF77337F33BFBF99999FB
FB33373F37777733373333BFBF999FBFB3333373FF77733F7333333BFBFBFBFB
3333333773FFFF77333333333FBFBF3333333333377777333333}
Layout = blGlyphTop
NumGlyphs = 2
end
object BitBtn18: TBitBtn
Left = 16
Top = 216
Width = 137
Height = 81
Caption = 'Sair'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
TabOrder = 2
OnClick = BitBtn18Click
Glyph.Data = {
76010000424D7601000000000000760000002800000020000000100000000100
04000000000000010000120B0000120B00001000000000000000000000000000
800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00330000000000
03333377777777777F333301BBBBBBBB033333773F3333337F3333011BBBBBBB
0333337F73F333337F33330111BBBBBB0333337F373F33337F333301110BBBBB
0333337F337F33337F333301110BBBBB0333337F337F33337F333301110BBBBB
0333337F337F33337F333301110BBBBB0333337F337F33337F333301110BBBBB
0333337F337F33337F333301110BBBBB0333337F337FF3337F33330111B0BBBB
0333337F337733337F333301110BBBBB0333337F337F33337F333301110BBBBB
0333337F3F7F33337F333301E10BBBBB0333337F7F7F33337F333301EE0BBBBB
0333337F777FFFFF7F3333000000000003333377777777777333}
Layout = blGlyphTop
NumGlyphs = 2
end
end
object GroupBox19: TGroupBox
Left = 16
Top = 64
Width = 177
Height = 105
Color = clBtnFace
ParentColor = False
TabOrder = 5
object Label19: TLabel
Left = 48
Top = 24
Width = 72
Height = 20
Caption = 'NOTESC'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Label20: TLabel
Left = 56
Top = 48
Width = 51
Height = 13
Caption = 'Vers'#227'o 4.0'
end
object Label21: TLabel
Left = 8
Top = 72
Width = 162
Height = 13
Caption = 'Controle de Notas Escolares'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
end
object MainMenu1: TMainMenu
Left = 152
Top = 24
object Controle1: TMenuItem
Caption = 'Controle'
object EnsinoMedio1: TMenuItem
Caption = 'Ensino Medio'
object N3A1: TMenuItem
Caption = '3A'
end
object N5: TMenuItem
Caption = '-'
end
object N2A1: TMenuItem
Caption = '2A'
end
object N6: TMenuItem
Caption = '-'
end
object N1A1: TMenuItem
Caption = '1A'
end
end
object N1: TMenuItem
Caption = '-'
end
object EnsinoFundamental1: TMenuItem
Caption = 'Ensino Fundamental'
object N9B1: TMenuItem
Caption = '9B'
end
object N7: TMenuItem
Caption = '-'
end
object A1: TMenuItem
Caption = '9A'
end
object N8: TMenuItem
Caption = '-'
end
object N8B1: TMenuItem
Caption = '8B'
end
object N8A1: TMenuItem
Caption = '-'
end
object N8A2: TMenuItem
Caption = '8A'
end
end
end
object Aplicativos1: TMenuItem
Caption = 'Aplicativos'
object EditordeTexto1: TMenuItem
Action = FrmLigacoes.OfficeWIndows
end
object N4: TMenuItem
Caption = '-'
end
object Calculadora1: TMenuItem
Action = FrmLigacoes.Calculadora
end
object N9: TMenuItem
Caption = '-'
end
object abelaPeriodica1: TMenuItem
Action = FrmLigacoes.TabelaPeriodica
end
object N10: TMenuItem
Caption = '-'
end
object Messenger1: TMenuItem
Action = FrmLigacoes.Messenger
end
object N11: TMenuItem
Caption = '-'
end
object Conversor1: TMenuItem
Action = FrmLigacoes.Conversor
end
object N12: TMenuItem
Caption = '-'
end
object EditordeTexto2: TMenuItem
Action = FrmLigacoes.EditorTexto
end
object N13: TMenuItem
Caption = '-'
end
object Sorteios1: TMenuItem
Action = FrmLigacoes.Sorteios
end
object N14: TMenuItem
Caption = '-'
end
object Fisica1: TMenuItem
Action = FrmLigacoes.Fisica
end
end
object Programa1: TMenuItem
Caption = 'Programa'
object SobreoPrograma1: TMenuItem
Action = FrmLigacoes.SobrePrograma
end
object N2: TMenuItem
Caption = '-'
end
object Ajuda1: TMenuItem
Action = FrmLigacoes.Ajuda
end
object N3: TMenuItem
Caption = '-'
end
object Sair1: TMenuItem
Caption = 'Sair'
OnClick = Sair1Click
end
end
end
end
| 25.748075 | 72 | 0.582525 |
f1742c954bd03e18fc240e9c035da71b9bc679f0
| 2,249 |
pas
|
Pascal
|
ArcIWComponentSelectorForm.pas
|
aftabgardan2006/iwelite
|
a68fcc8d423e8837ae2e2cd351b84a98d90df33e
|
[
"MIT"
] | 1 |
2018-01-09T12:32:40.000Z
|
2018-01-09T12:32:40.000Z
|
ArcIWComponentSelectorForm.pas
|
aftabgardan2006/iwelite
|
a68fcc8d423e8837ae2e2cd351b84a98d90df33e
|
[
"MIT"
] | null | null | null |
ArcIWComponentSelectorForm.pas
|
aftabgardan2006/iwelite
|
a68fcc8d423e8837ae2e2cd351b84a98d90df33e
|
[
"MIT"
] | 2 |
2019-05-13T11:28:16.000Z
|
2020-03-10T17:47:48.000Z
|
////////////////////////////////////////////////////////////////////////////////
//
// The MIT License
//
// Copyright (c) 2008 by Arcana Technologies Incorporated
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
////////////////////////////////////////////////////////////////////////////////
unit ArcIWComponentSelectorForm;
interface
uses
Windows, Messages, SysUtils, {$IFNDEF VER130}Variants, {$ENDIF}Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, CheckLst;
type
TfrmSelectComponent = class(TForm)
Panel1: TPanel;
Panel2: TPanel;
Button1: TButton;
Button2: TButton;
lbComponents: TCheckListBox;
Panel3: TPanel;
chkAllNone: TCheckBox;
cbLanguage: TComboBox;
Label1: TLabel;
procedure chkAllNoneClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmSelectComponent: TfrmSelectComponent;
implementation
{$R *.dfm}
procedure TfrmSelectComponent.chkAllNoneClick(Sender: TObject);
var
i : integer;
begin
for i := 0 to lbComponents.items.Count-1 do
lbComponents.Checked[i] := chkAllNone.Checked;
end;
end.
| 32.594203 | 101 | 0.667852 |
f1115d9462feae82d704935c3183a4606d6fa279
| 2,088 |
pas
|
Pascal
|
faq/0007.pas
|
nickelsworth/swag
|
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
|
[
"BSD-2-Clause"
] | 11 |
2015-12-12T05:13:15.000Z
|
2020-10-14T13:32:08.000Z
|
faq/0007.pas
|
nickelsworth/swag
|
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
|
[
"BSD-2-Clause"
] | null | null | null |
faq/0007.pas
|
nickelsworth/swag
|
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
|
[
"BSD-2-Clause"
] | 8 |
2017-05-05T05:24:01.000Z
|
2021-07-03T20:30:09.000Z
|
TP 4.0 5.0 5.5 - LINKING TURBO C OR ASSEMBLER .OBJ OBJECT FILES
Q. Are the .OBJ files generated by Turbo C and Turbo
Assembler compatible with 4.0+?
A. Yes. You can write Turbo C or Turbo Assembler routines and
link the .OBJ files into your Turbo Pascal programs by using
the {$L} compiler directive. See the CTOPAS example on the
distribution diskette.
TP 4.0 5.0 5.5 - OBJECT FILE CREATION
Q. Does Turbo Pascal create object files that can be linked into
other languages?
A. Turbo Pascal 4.0+ generates .TPU (Turbo Pascal Unit) files, not
.OBJ files. We've made that decision for many reasons:
1. TP 4.0+'s .TPU files are smaller than .OBJ's, and they
contain symbolic information important to the support of
Pascal's strict type conventions (types, constants,
etc.).
2. .TPU files allow "smart linking" - elimination of unused
code and data on a procedure-by-procedure basis.
3. .TPU's allow built-in project management through version
4.0+'s Make and Build commands.
4. .TPU's allow faster compilation speeds (34,000 lines per
minute on a PS/2 Model 60).
TP 4.0 5.0 5.5 - LINKING .OBJ OBJECT FILES FROM OTHER ASSEMBLERS
Q. Will the $L compiler directive work for compiler object files
other than assembler?
A. That depends on the language. TURBO requires all the code
in the .OBJ to be in *one* CODE segment, and all the data to
be in *one* DATA segment. With assembly language that's easy,
but it may not work with some high-level language compilers.
You can use Turbo C to generate .OBJ files for use by Turbo
Pascal programs. An example, CPASDEMO.PAS is included on the
distribution disks.
TP 4.0 5.0 5.5 - INTERFACING MODULES WRITTEN IN MICROSOFT C
Q. Can I link modules, written in Microsoft C, with Turbo Pascal
programs?
A. Yes. M/S C .OBJ modules can be linked provided they do not
use the C runtime library. The same limitations apply to M/S
C modules as to Turbo C modules.
| 47.454545 | 67 | 0.693008 |
83a54590d165a00bef05f4dbceea52223c2d1466
| 858 |
pas
|
Pascal
|
tests/altium_crap/Scripts/Delphiscript Scripts/Processes/SimpleExample.pas
|
hanun2999/Altium-Schematic-Parser
|
a9bd5b1a865f92f2e3f749433fb29107af528498
|
[
"MIT"
] | 1 |
2020-06-08T11:17:46.000Z
|
2020-06-08T11:17:46.000Z
|
tests/altium_crap/Scripts/Delphiscript Scripts/Processes/SimpleExample.pas
|
hanun2999/Altium-Schematic-Parser
|
a9bd5b1a865f92f2e3f749433fb29107af528498
|
[
"MIT"
] | null | null | null |
tests/altium_crap/Scripts/Delphiscript Scripts/Processes/SimpleExample.pas
|
hanun2999/Altium-Schematic-Parser
|
a9bd5b1a865f92f2e3f749433fb29107af528498
|
[
"MIT"
] | null | null | null |
{..............................................................................}
{ Summary SimpleExample - Demonstrate the use of AddIntegerParameter }
{ and GetIntegerParameter }
{ Copyright (c) 2003 by Altium Limited }
{..............................................................................}
{..............................................................................}
Var
Value : Integer;
Begin
ResetParameters;
AddIntegerParameter('A', 1);
GetIntegerParameter('A', Value);
If Value = 1 Then
ShowInfo('Ok')
Else
ShowError('Failed');
End.
{..............................................................................}
{..............................................................................}
| 39 | 80 | 0.272727 |
835a982d95f8c6949dfb8b197bf327c6b3b7752e
| 2,056 |
pas
|
Pascal
|
Backend for the win/Data.Articles.pas
|
GodsAndCakes/SAID-ist-ein-schlechter-Name
|
af0bc9b9413a93e68f0c2e07d75bd5124567d4f8
|
[
"Apache-2.0"
] | null | null | null |
Backend for the win/Data.Articles.pas
|
GodsAndCakes/SAID-ist-ein-schlechter-Name
|
af0bc9b9413a93e68f0c2e07d75bd5124567d4f8
|
[
"Apache-2.0"
] | null | null | null |
Backend for the win/Data.Articles.pas
|
GodsAndCakes/SAID-ist-ein-schlechter-Name
|
af0bc9b9413a93e68f0c2e07d75bd5124567d4f8
|
[
"Apache-2.0"
] | null | null | null |
unit Data.Articles;
interface
uses
System.StrUtils, System.Math, System.Classes;
type
TSource = (scDPA);
TSourceHelper = record helper for TSource
constructor Create(const ASourceCode: String);
function ToString: String;
end;
TLanguage = (laEN, laDE);
TLanguageHelper = record helper for TLanguage
constructor Create(const ALanguageCode: String);
function ToString: String;
end;
TSentiment = (seNegative = -1, seNeutral = 0, sePositive = 1);
TSentimentHelper = record helper for TSentiment
constructor Create(const ASentimentAmount: Double);
function ToDouble: Double;
end;
IiPoolArticle = interface
['{07129344-C577-499D-BAFD-031052A6633F}']
function GetHeading: String;
function GetContent: String;
function GetPublisher: String;
property Heading: String read GetHeading;
property Content: String read GetContent;
property Publisher: String read GetPublisher;
end;
IiPoolArticles = interface
['{F56CB0F1-9D1B-4CB2-8C91-9FB24F1E1EE9}']
function GetArticles(const AIndex: Integer): IiPoolArticle;
function GetCount: Integer;
property Articles[const AIndex: Integer]: IiPoolArticle read GetArticles;
property Count: Integer read GetCount;
end;
implementation
{ TSourceHelper }
constructor TSourceHelper.Create(const ASourceCode: String);
begin
Self := TSource(IndexText(ASourceCode, ['DPA']));
end;
function TSourceHelper.ToString: String;
begin
case Self of
scDPA:
Result := 'DPA';
end;
end;
{ TLanguageHelper }
constructor TLanguageHelper.Create(const ALanguageCode: String);
begin
Self := TLanguage(IndexText(ALanguageCode, ['en', 'de']));
end;
function TLanguageHelper.ToString: String;
begin
case Self of
laEN:
Result := 'en';
laDE:
Result := 'de';
end;
end;
{ TSentimentHelper }
constructor TSentimentHelper.Create(const ASentimentAmount: Double);
begin
Self := TSentiment(Sign(ASentimentAmount));
end;
function TSentimentHelper.ToDouble: Double;
begin
Result := Ord(Self);
end;
end.
| 21.642105 | 77 | 0.725195 |
83d72c3a22e3fa835eaacfa2985e6572bc871e17
| 1,696 |
pas
|
Pascal
|
DatasetJSON.pas
|
kevinkoehne/EDBUtil
|
48f983ebb97980fe9bea89cc3b7ea73536fec09c
|
[
"MIT"
] | null | null | null |
DatasetJSON.pas
|
kevinkoehne/EDBUtil
|
48f983ebb97980fe9bea89cc3b7ea73536fec09c
|
[
"MIT"
] | null | null | null |
DatasetJSON.pas
|
kevinkoehne/EDBUtil
|
48f983ebb97980fe9bea89cc3b7ea73536fec09c
|
[
"MIT"
] | null | null | null |
unit DatasetJSON;
interface
uses
DB;
function DatasetToJSONArray(const ds : TDataset; arrayName : String = '') : string;
implementation
uses
SysUtils,
JSONHelper;
function DatasetRowToJSON(const ds:TDataset; makelowercase : Boolean = true):string;
var
iField : integer;
function fieldToJSON(thisField:TField):string;
var
name : String;
begin
if(makelowercase) then
name := LowerCase(thisField.FieldName)
else
name := thisField.fieldName;
case thisField.DataType of
ftInteger,ftSmallint,ftLargeint:
result := JSONElement(name, thisField.AsInteger);
ftDate:
result := JSONElementDate(name, thisField.AsDateTime);
ftDateTime:
result := JSONElementDateTime(name, thisField.AsDateTime);
ftCurrency,
ftFloat:
result := JSONElement(name, FloatToStr(thisField.AsFloat));
else
result := JSONElement(name, thisField.AsString);
end; // case
end; // of fieldToJSON
begin
result := '';
for iField := 0 to ds.fieldcount - 1 do
begin
if iField > 0 then
result := result + ',';
result := result + fieldToJSON(ds.Fields[iField]);
end;
result := '{'+Result+'}';
end;
function DatasetToJSONArray(const ds : TDataset; arrayName : String = '') : string;
begin
result := '';
if (not ds.eof) and (ds <> nil) then
begin
ds.first;
while not ds.eof do
begin
if Result <> '' then
result := result + ',';
result := result + DatasetRowToJSON(ds);
ds.next;
end;
end;
if arrayName = '' then
result := '['+result+']'
else
Result := '{' + JSONArray(arrayName, Result) + '}';
end; // of DSToJSON
end.
| 20.190476 | 84 | 0.629717 |
f18abdef9f1de44189757687ffdd6f37f165077e
| 13,669 |
pas
|
Pascal
|
toolkit/ValuesetExpansion.pas
|
niaz819/fhirserver
|
fee45e1e57053a776b893dba543f700dd9cb9075
|
[
"BSD-3-Clause"
] | null | null | null |
toolkit/ValuesetExpansion.pas
|
niaz819/fhirserver
|
fee45e1e57053a776b893dba543f700dd9cb9075
|
[
"BSD-3-Clause"
] | null | null | null |
toolkit/ValuesetExpansion.pas
|
niaz819/fhirserver
|
fee45e1e57053a776b893dba543f700dd9cb9075
|
[
"BSD-3-Clause"
] | null | null | null |
unit ValuesetExpansion;
{
Copyright (c) 2017+, Health Intersections Pty Ltd (http://www.healthintersections.com.au)
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
}
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, System.Rtti,
FMX.Grid.Style, FMX.Grid, FMX.ScrollBox, FMX.StdCtrls, FMX.DateTimeCtrls,
FMX.Edit, FMX.Controls.Presentation, FMX.ListBox, FMX.Platform,
FHIR.Support.Base, FHIR.Support.Stream,
FHIR.Base.Objects, FHIR.Base.Lang,
FHIR.Version.Resources, FHIR.Version.Utilities, FHIR.Version.Client, FHIR.Smart.Utilities,
SettingsDialog, BaseFrame, ProcessForm,
ToolkitSettings;
type
TValuesetExpansionForm = class(TForm)
Panel1: TPanel;
btnUse: TButton;
Button2: TButton;
Panel2: TPanel;
Label1: TLabel;
Go: TButton;
Label2: TLabel;
edtFilter: TEdit;
Label3: TLabel;
dedDate: TDateEdit;
Label4: TLabel;
edtOffset: TEdit;
Label5: TLabel;
edtCount: TEdit;
Label6: TLabel;
edtLang: TEdit;
cbDesignations: TCheckBox;
cbActiveOnly: TCheckBox;
cbUIOnly: TCheckBox;
cbNoExpressions: TCheckBox;
cbAllowSubset: TCheckBox;
gridContains: TGrid;
StringColumn10: TStringColumn;
CheckColumn1: TCheckColumn;
CheckColumn2: TCheckColumn;
StringColumn11: TStringColumn;
StringColumn12: TStringColumn;
StringColumn13: TStringColumn;
cbxServer: TComboBox;
btnSettings: TButton;
btnExport: TButton;
dlgExport: TSaveDialog;
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure GoClick(Sender: TObject);
procedure gridContainsGetValue(Sender: TObject; const ACol, ARow: Integer; var Value: TValue);
procedure btnSettingsClick(Sender: TObject);
procedure btnExportClick(Sender: TObject);
private
FValueSet: TFHIRValueSet;
FExpansion : TFHIRValueSet;
FSettings : TFHIRToolkitSettings;
FClient : TFhirClient;
FIsStopped : boolean;
FServers : TFslList<TRegisteredFHIRServer>;
procedure SetValueSet(const Value: TFHIRValueSet);
procedure SetExpansion(const Value: TFHIRValueSet);
procedure SetSettings(const Value: TFHIRToolkitSettings);
procedure dowork(Sender : TObject; opName : String; canCancel : boolean; proc : TWorkProc);
function GetStopped: boolean;
procedure btnStopClick(Sender: TObject);
procedure loadServers;
public
destructor Destroy; override;
property ValueSet : TFHIRValueSet read FValueSet write SetValueSet;
property Expansion : TFHIRValueSet read FExpansion write SetExpansion;
property Settings : TFHIRToolkitSettings read FSettings write SetSettings;
end;
var
ValuesetExpansionForm: TValuesetExpansionForm;
implementation
{$R *.fmx}
Uses
FHIRToolkitForm;
{ TValuesetExpansionForm }
procedure TValuesetExpansionForm.btnExportClick(Sender: TObject);
var
s : String;
begin
if dlgExport.Execute then
begin
s := ExtractFileExt(dlgExport.FileName);
if s = '.xml' then
resourceToFile(FValueSet, dlgExport.FileName, ffXml)
else if s = '.json' then
resourceToFile(FValueSet, dlgExport.FileName, ffJson)
else if s = '.ttl' then
resourceToFile(FValueSet, dlgExport.FileName, ffJson)
else if s = '.csv' then
produceCsv(dlgExport.FileName,
['system', 'abstract', 'inactive', 'version', 'code', 'display'],
procedure (csv : TCSVWriter)
var
c : TFhirValueSetExpansionContains;
begin
for c in FValueSet.expansion.containsList do
begin
csv.cell(c.system);
csv.cell(c.abstract);
csv.cell(c.inactive);
csv.cell(c.version);
csv.cell(c.code);
csv.cell(c.display);
csv.line;
end;
end
)
else
raise EFHIRException.create('Unknown format');
end;
end;
procedure TValuesetExpansionForm.btnSettingsClick(Sender: TObject);
var
form : TSettingsForm;
begin
form := TSettingsForm.create(self);
try
form.Settings := FSettings.link;
form.TabControl1.TabIndex := 1;
if form.showmodal = mrOk then
begin
loadServers;
cbxServer.ItemIndex := 0;
end;
finally
form.free;
end;
end;
procedure TValuesetExpansionForm.btnStopClick(Sender: TObject);
begin
FIsStopped := true;
end;
destructor TValuesetExpansionForm.Destroy;
begin
FSettings.Free;
FExpansion.Free;
FValueSet.Free;
FClient.Free;
FServers.free;
inherited;
end;
procedure TValuesetExpansionForm.dowork(Sender: TObject; opName: String; canCancel: boolean; proc: TWorkProc);
var
fcs : IFMXCursorService;
form : TProcessingForm;
begin
if TPlatformServices.Current.SupportsPlatformService(IFMXCursorService) then
fcs := TPlatformServices.Current.GetPlatformService(IFMXCursorService) as IFMXCursorService
else
fcs := nil;
if Assigned(fcs) then
begin
Cursor := fcs.GetCursor;
fcs.SetCursor(crHourGlass);
end;
try
FIsStopped := false;
if assigned(sender) and (sender is TBaseFrame) then
TBaseFrame(sender).OnStopped := GetStopped;
form := TProcessingForm.Create(self);
try
form.lblOperation.text := opName;
form.Button1.enabled := canCancel;
form.Button1.OnClick := btnStopClick;
form.proc := proc;
form.ShowModal;
finally
form.Free;
end;
finally
if Assigned(fCS) then
fcs.setCursor(Cursor);
end;
end;
procedure TValuesetExpansionForm.FormClose(Sender: TObject; var Action: TCloseAction);
var
s : String;
begin
try
FSettings.storeValue('Expansion.Window', 'left', left);
FSettings.storeValue('Expansion.Window', 'top', top);
FSettings.storeValue('Expansion.Window', 'width', width);
FSettings.storeValue('Expansion.Window', 'height', height);
FSettings.storeValue('Expansion', 'Filter', edtFilter.Text);
FSettings.storeValue('Expansion', 'Date', dedDate.Text);
FSettings.storeValue('Expansion', 'Offset', edtOffset.Text);
FSettings.storeValue('Expansion', 'Count', edtCount.Text);
FSettings.storeValue('Expansion', 'Lang', edtLang.Text);
FSettings.storeValue('Expansion', 'Designations', cbDesignations.IsChecked);
FSettings.storeValue('Expansion', 'ActiveOnly', cbActiveOnly.IsChecked);
FSettings.storeValue('Expansion', 'UIOnly', cbUIOnly.IsChecked);
FSettings.storeValue('Expansion', 'NoExpressions', cbNoExpressions.IsChecked);
FSettings.storeValue('Expansion', 'AllowSubset', cbAllowSubset.IsChecked);
FSettings.storeValue('Expansion', 'width-col-1', trunc(StringColumn10.Width));
FSettings.storeValue('Expansion', 'width-col-1', trunc(CheckColumn1.Width));
FSettings.storeValue('Expansion', 'width-col-1', trunc(CheckColumn2.Width));
FSettings.storeValue('Expansion', 'width-col-1', trunc(StringColumn11.Width));
FSettings.storeValue('Expansion', 'width-col-1', trunc(StringColumn12.Width));
FSettings.storeValue('Expansion', 'width-col-1', trunc(StringColumn13.Width));
FSettings.Save;
except
end;
end;
procedure TValuesetExpansionForm.FormShow(Sender: TObject);
begin
Left := FSettings.getValue('Expansion.Window', 'left', left);
Top := FSettings.getValue('Expansion.Window', 'top', top);
Width := FSettings.getValue('Expansion.Window', 'width', width);
Height := FSettings.getValue('Expansion.Window', 'height', height);
loadServers;
cbxServer.ItemIndex := 0;
edtFilter.Text := FSettings.getValue('Expansion', 'Filter', '');
dedDate.Text := FSettings.getValue('Expansion', 'Date', '');
edtOffset.Text := FSettings.getValue('Expansion', 'Offset', '');
edtCount.Text := FSettings.getValue('Expansion', 'Count', '');
edtLang.Text := FSettings.getValue('Expansion', 'Lang', '');
cbDesignations.IsChecked := FSettings.getValue('Expansion', 'Designations', false);
cbActiveOnly.IsChecked := FSettings.getValue('Expansion', 'ActiveOnly', false);
cbUIOnly.IsChecked := FSettings.getValue('Expansion', 'UIOnly', false);
cbNoExpressions.IsChecked := FSettings.getValue('Expansion', 'NoExpressions', false);
cbAllowSubset.IsChecked := FSettings.getValue('Expansion', 'AllowSubset', false);
StringColumn10.Width := FSettings.getValue('Expansion', 'width-col-1', trunc(StringColumn10.Width));
CheckColumn1.Width := FSettings.getValue('Expansion', 'width-col-1', trunc(CheckColumn1.Width));
CheckColumn2.Width := FSettings.getValue('Expansion', 'width-col-1', trunc(CheckColumn2.Width));
StringColumn11.Width := FSettings.getValue('Expansion', 'width-col-1', trunc(StringColumn11.Width));
StringColumn12.Width := FSettings.getValue('Expansion', 'width-col-1', trunc(StringColumn12.Width));
StringColumn13.Width := FSettings.getValue('Expansion', 'width-col-1', trunc(StringColumn13.Width));
end;
function TValuesetExpansionForm.GetStopped: boolean;
begin
end;
procedure TValuesetExpansionForm.GoClick(Sender: TObject);
var
params : TFHIRParameters;
begin
FExpansion.Free;
FExpansion := nil;
gridContains.RowCount := 0;
btnUse.Enabled := false;
btnExport.Enabled := false;
if FClient = nil then
FClient := TFhirClients.makeThreaded(nil, TFhirClients.makeHTTP(nil,
TRegisteredFHIRServer(cbxServer.ListItems[cbxServer.ItemIndex].Data).fhirEndpoint,
false, FSettings.timeout * 1000, FSettings.proxy), MasterToolsForm.threadMonitorProc);
dowork(self, 'Expanding', true,
procedure
var
params : TFHIRParameters;
begin
params := TFhirParameters.Create;
try
params.AddParameter('valueSet', FValueSet.Link);
if edtFilter.Text <> '' then
params.AddParameter('filter', edtFilter.Text);
if dedDate.Text <> '' then
params.AddParameter('date', dedDate.Text);
if edtOffset.Text <> '' then
params.AddParameter('offset', edtOffset.Text);
if edtCount.Text <> '' then
params.AddParameter('count', edtCount.Text);
if edtLang.Text <> '' then
params.AddParameter('displayLanguage', edtLang.Text);
if cbDesignations.IsChecked then
params.AddParameter('includeDesignations', true);
if cbActiveOnly.IsChecked then
params.AddParameter('activeOnly', true);
if cbUIOnly.IsChecked then
params.AddParameter('excludeNotForUI', true);
if cbNoExpressions.IsChecked then
params.AddParameter('excludePostCoordinated', true);
if cbAllowSubset.IsChecked then
params.AddParameter('limitedExpansion', true);
FExpansion := FClient.operation(frtValueSet, 'expand', params) as TFHIRValueSet;
gridContains.RowCount := FExpansion.expansion.containsList.Count;
btnUse.Enabled := FExpansion.expansion.containsList.Count > 0;
btnExport.Enabled := FExpansion.expansion.containsList.Count > 0;
finally
params.Free;
end;
end);
end;
procedure TValuesetExpansionForm.gridContainsGetValue(Sender: TObject; const ACol, ARow: Integer; var Value: TValue);
var
contains : TFhirValueSetExpansionContains;
begin
contains := Expansion.expansion.containsList[ARow];
case ACol of
0: value := contains.code;
1: value := contains.abstract;
2: value := contains.inactive;
3: value := contains.display;
4: value := contains.system;
5: value := contains.version;
end;
end;
procedure TValuesetExpansionForm.loadServers;
var
i : integer;
begin
if FServers = nil then
FServers := TFslList<TRegisteredFHIRServer>.create
else
FServers.Clear;
cbxServer.Items.Clear;
FSettings.ListServers('Terminology', FServers);
for i := 0 to FServers.Count - 1 do
begin
cbxServer.Items.add(FServers[i].name + ': '+FServers[i].fhirEndpoint);
cbxServer.ListItems[i].Data := FServers[i];
end;
end;
procedure TValuesetExpansionForm.SetExpansion(const Value: TFHIRValueSet);
begin
FExpansion.Free;
FExpansion := Value;
end;
procedure TValuesetExpansionForm.SetSettings(const Value: TFHIRToolkitSettings);
begin
FSettings.Free;
FSettings := Value;
end;
procedure TValuesetExpansionForm.SetValueSet(const Value: TFHIRValueSet);
begin
FValueSet.Free;
FValueSet := Value;
end;
end.
| 34.692893 | 117 | 0.721121 |
6135c336945934ee1349e6ffdb9c0a3302049ae1
| 28,899 |
pas
|
Pascal
|
Packages/Order Entry Results Reporting/CPRS/CPRS-Chart/Orders/rODBase.pas
|
josephsnyder/VistA
|
07cabf4302675991dd453aea528f79f875358d58
|
[
"Apache-2.0"
] | 1 |
2021-01-01T01:16:44.000Z
|
2021-01-01T01:16:44.000Z
|
Packages/Order Entry Results Reporting/CPRS/CPRS-Chart/Orders/rODBase.pas
|
josephsnyder/VistA
|
07cabf4302675991dd453aea528f79f875358d58
|
[
"Apache-2.0"
] | null | null | null |
Packages/Order Entry Results Reporting/CPRS/CPRS-Chart/Orders/rODBase.pas
|
josephsnyder/VistA
|
07cabf4302675991dd453aea528f79f875358d58
|
[
"Apache-2.0"
] | null | null | null |
unit rODBase;
interface
uses SysUtils, Windows, Classes, ORNet, ORFn, uCore, uConst, rOrders;
type
TPrompt = class
ID: string;
IEN: Integer;
Sequence: Double;
FmtCode: string;
Omit: string;
Leading: string;
Trailing: string;
NewLine: Boolean;
WrapWP: Boolean;
Children: string;
IsChild: Boolean;
end;
TResponse = class
PromptIEN: Integer;
PromptID: string;
Instance: Integer;
IValue: string;
EValue: string;
end;
TDialogItem = class
ID: string;
Required: Boolean;
Hidden: Boolean;
Prompt: string;
DataType: Char;
Domain: string;
EDefault: string;
IDefault: string;
HelpText: string;
CrossRef: string;
ScreenRef: string;
end;
TDialogNames = record
Internal: string;
Display: string;
BaseIEN: Integer;
BaseName: string;
end;
TConstructOrder = record
DialogName: string;
LeadText: string;
TrailText: string;
DGroup: Integer;
OrderItem: Integer;
DelayEvent: Char;
PTEventPtr: String; // ptr to #100.2
EventPtr: String; // ptr to #100.5
Specialty: Integer;
Effective: TFMDateTime;
LogTime: TFMDateTime;
OCList: TStringList;
DigSig: string;
ResponseList: TList;
IsIMODialog: boolean; //imo
IsEventDefaultOR: Integer;
end;
TPFSSActive = record
PFSSActive: boolean;
PFSSChecked: boolean;
end;
{ General Calls }
function AskAnotherOrder(ADialog: Integer): Boolean;
function DisplayGroupByName(const AName: string): Integer;
function DisplayGroupForDialog(const DialogName: string): Integer;
procedure IdentifyDialog(var DialogNames: TDialogNames; ADialog: Integer);
procedure LoadDialogDefinition(Dest: TList; const DialogName: string);
procedure LoadOrderPrompting(Dest: TList; ADialog: Integer);
//procedure LoadResponses(Dest: TList; const OrderID: string);
procedure LoadResponses(Dest: TList; const OrderID: string; var HasObjects: boolean);
procedure PutNewOrder(var AnOrder: TOrder; ConstructOrder: TConstructOrder; OrderSource: string);
//procedure PutNewOrderAuto(var AnOrder: TOrder; ADialog: Integer); // no longer used
function OIMessage(IEN: Integer): string;
function OrderMenuStyle: Integer;
function ResolveScreenRef(const ARef: string): string;
function SubsetOfEntries(const StartFrom: string; Direction: Integer;
const XRef, GblRef, ScreenRef: string): TStrings;
function SubSetOfOrderItems(const StartFrom: string; Direction: Integer;
const XRef: string; QuickOrderDlgIen: Integer): TStrings;
function GetDefaultCopay(AnOrderID: string): String;
procedure SetDefaultCoPayToNewOrder(AnOrderID, CoPayInfo:string);
procedure ValidateNumericStr(const x, Dom: string; var ErrMsg: string);
function IsPFSSActive: boolean;
{ Quick Order Calls }
//function DisplayNameForOD(const InternalName: string): string;
function GetQuickName(const CRC: string): string;
procedure LoadQuickListForOD(Dest: TStrings; DGroup: Integer);
procedure SaveQuickListForOD(Src: TStrings; DGroup: Integer);
//procedure PutQuickName(DialogIEN: Integer; const DisplayName: string);
procedure PutQuickOrder(var NewIEN: Integer; const CRC, DisplayName: string; DGroup: Integer;
ResponseList: TList);
{ Medication Calls }
function AmountsForIVFluid(AnIEN: Integer; FluidType: Char): string;
procedure AppendMedRoutes(Dest: TStrings);
//CQ 21724 - Nurses should be able to order supplies - jcs
procedure CheckAuthForMeds(var x: string; dlgID: string = '');
function DispenseMessage(AnIEN: Integer): string;
procedure LookupRoute(const AName: string; var ID, Abbreviation: string);
function MedIsSupply(AnIEN: Integer): Boolean;
function QuantityMessage(AnIEN: Integer): string;
function RequiresCopay(DispenseDrug: Integer): Boolean;
procedure LoadFormularyAlt(AList: TStringList; AnIEN: Integer; PSType: Char);
function MedTypeIsIV(AnIEN: Integer): Boolean;
function ODForMedIn: TStrings;
function OIForMedIn(AnIEN: Integer): TStrings;
function ODForIVFluids: TStrings;
function ODForMedOut: TStrings;
function OIForMedOut(AnIEN: Integer): TStrings;
function ODForSD: TStrings;
function RatedDisabilities: string;
//function ValidIVRate(const x: string): Boolean;
procedure ValidateIVRate(var x: string);
function ValidSchedule(const x: string; PSType: Char = 'I'): Integer;
function ValidQuantity(const x: string): Boolean;
{ Vitals Calls }
function ODForVitals: TStrings;
implementation
uses TRPCB, uOrders, uODBase, fODBase;
var
uLastDispenseIEN: Integer;
uLastDispenseMsg: string;
uLastQuantityMsg: string;
uMedRoutes: TStringList;
uPFSSActive: TPFSSActive;
{ Common Internal Calls }
procedure SetupORDIALOG(AParam: TParamRecord; ResponseList: TList; IsIV: boolean = False);
const
MAX_STR_LEN = 74;
var
i,j,ALine,odIdx,piIdx : Integer;
Subs, x, ODtxt, thePI: string;
WPStrings: TStringList;
IVDuration, IVDurVal: string;
begin
piIdx := 0;
odIdx := 0;
IVDuration := '';
IVDurVal := '';
AParam.PType := list;
for j := 0 to ResponseList.Count - 1 do
begin
if TResponse(ResponseList.Items[j]).PromptID = 'SIG' then
begin
ODtxt := TResponse(ResponseList.Items[j]).EValue;
odIdx := j;
end;
if TResponse(ResponseList.Items[j]).PromptID = 'PI' then
thePI := TResponse(ResponseList.Items[j]).EValue;
if Length(Trim(thePI)) > 0 then
piIdx := Pos(thePI, ODtxt);
if piIdx > 0 then
begin
Delete(ODtxt,piIdx,Length(thePI));
TResponse(ResponseList.Items[odIdx]).EValue := ODtxt;
end;
if (IsIV and (TResponse(ResponseList.Items[j]).PromptID = 'DAYS')) then
begin
IVDuration := TResponse(ResponseList.Items[j]).EValue;
if (Length(IVDuration) > 1) then
begin
if (Pos('TOTAL',upperCase(IVDuration))>0) or (Pos('FOR',upperCase(IVDuration))>0) then continue;
if (Pos('H',upperCase(IVDuration))>0) then
begin
IVDurVal := Copy(IVDuration,1,length(IVDuration)-1);
TResponse(ResponseList.Items[j]).IValue := 'for ' + IVDurVal + ' hours';
end
else if (Pos('D',upperCase(IVDuration))>0) then
begin
if Pos('DOSES', upperCase(IVDuration)) > 0 then
begin
IVDurVal := Copy(IVDuration, 1, length(IVDuration)-5);
TResponse(ResponseList.Items[j]).IValue := 'for a total of ' + IVDurVal + ' doses';
end
else
begin
IVDurVal := Copy(IVDuration,1,length(IVDuration)-1);
TResponse(ResponseList.Items[j]).IValue := 'for ' + IVDurVal + ' days';
end;
end
else if ((Pos('ML',upperCase(IVDuration))>0) or (Pos('CC',upperCase(IVDuration))>0)) then
begin
IVDurVal := Copy(IVDuration,1,length(IVDuration)-2);
TResponse(ResponseList.Items[j]).IValue := 'with total volume ' + IVDurVal + 'ml';
end
else if (Pos('L',upperCase(IVDuration))>0) then
begin
IVDurVal := Copy(IVDuration,0,length(IVDuration)-1);
TResponse(ResponseList.Items[j]).IValue := 'with total volume ' + IVDurVal + 'L';
end;
end;
end;
end;
with AParam, ResponseList do for i := 0 to Count - 1 do
begin
with TResponse(Items[i]) do
begin
Subs := IntToStr(PromptIEN) + ',' + IntToStr(Instance);
if IValue = TX_WPTYPE then
begin
WPStrings := TStringList.Create;
try
WPStrings.Text := EValue;
LimitStringLength(WPStrings, MAX_STR_LEN);
x := 'ORDIALOG("WP",' + Subs + ')';
Mult[Subs] := x;
for ALine := 0 to WPStrings.Count - 1 do
begin
x := '"WP",' + Subs + ',' + IntToStr(ALine+1) + ',0';
Mult[x] := WPStrings[ALine];
end; {for}
finally
WPStrings.Free;
end; {try}
end
else Mult[Subs] := IValue;
end; {with TResponse}
end; {with AParam}
end;
{ Quick Order Calls }
//function DisplayNameForOD(const InternalName: string): string;
//begin
// Result := sCallV('ORWDXQ DLGNAME', [InternalName]);
//end;
function GetQuickName(const CRC: string): string;
begin
Result := sCallV('ORWDXQ GETQNAM', [CRC]);
end;
procedure LoadQuickListForOD(Dest: TStrings; DGroup: Integer);
begin
CallV('ORWDXQ GETQLST', [DGroup]);
FastAssign(RPCBrokerV.Results, Dest);
end;
procedure SaveQuickListForOD(Src: TStrings; DGroup: Integer);
begin
CallV('ORWDXQ PUTQLST', [DGroup, Src]);
// ignore return value for now
end;
//procedure PutQuickName(DialogIEN: Integer; const DisplayName: string);
//begin
// CallV('ORWDXQ PUTQNAM', [DialogIEN, DisplayName]);
// // ignore return value for now
//end;
procedure PutQuickOrder(var NewIEN: Integer; const CRC, DisplayName: string; DGroup: Integer;
ResponseList: TList);
begin
with RPCBrokerV do
begin
ClearParameters := True;
RemoteProcedure := 'ORWDXQ DLGSAVE';
Param[0].PType := literal;
Param[0].Value := CRC;
Param[1].PType := literal;
Param[1].Value := DisplayName;
Param[2].PType := literal;
Param[2].Value := IntToStr(DGroup);
SetupORDIALOG(Param[3], ResponseList);
CallBroker;
if Results.Count = 0 then Exit; // error creating order
NewIEN := StrToIntDef(Results[0], 0);
end;
end;
{ General Calls }
function AskAnotherOrder(ADialog: Integer): Boolean;
begin
Result := sCallV('ORWDX AGAIN', [ADialog]) = '1';
end;
function DisplayGroupByName(const AName: string): Integer;
begin
Result := StrToIntDef(sCallV('ORWDX DGNM', [AName]), 0);
end;
function DisplayGroupForDialog(const DialogName: string): Integer;
begin
Result := StrToIntDef(sCallV('ORWDX DGRP', [DialogName]),0);
end;
procedure IdentifyDialog(var DialogNames: TDialogNames; ADialog: Integer);
var
x: string;
begin
x := sCallV('ORWDXM DLGNAME', [ADialog]);
with DialogNames do
begin
Internal := Piece(x, U, 1);
Display := Piece(x, U, 2);
BaseIEN := StrToIntDef(Piece(x, U, 3), 0);
BaseName := Piece(x, U, 4);
end;
end;
procedure LoadDialogDefinition(Dest: TList; const DialogName: string);
{ loads a list of TPrompt records
Pieces: PromptID[1]^PromptIEN[2]^FmtSeq[3]^Fmt[4]^Omit[5]^Lead[6]^Trail[7]^NwLn[8]^Wrap[9]^Children[10]^IsChild[11] }
var
i: Integer;
APrompt: TPrompt;
begin
CallV('ORWDX DLGDEF', [DialogName]);
with RPCBrokerV do for i := 0 to Results.Count - 1 do
begin
APrompt := TPrompt.Create;
with APrompt do
begin
ID := Piece(Results[i], U, 1);
IEN := StrToIntDef(Piece(Results[i], U, 2), 0);
if Length(Piece(Results[i], U, 3)) > 0
then Sequence := StrToFloat(Piece(Results[i], U, 3))
else Sequence := 0;
FmtCode := Piece(Results[i], U, 4);
Omit := Piece(Results[i], U, 5);
Leading := Piece(Results[i], U, 6);
Trailing := Piece(Results[i], U, 7);
NewLine := Piece(Results[i], U, 8) = '1';
WrapWP := Piece(Results[i], U, 9) = '1';
Children := Piece(Results[i], U, 10);
IsChild := Piece(Results[i], U, 11) = '1';
end;
Dest.Add(APrompt);
end;
end;
procedure LoadOrderPrompting(Dest: TList; ADialog: Integer);
// ID^REQ^HID^PROMPT^TYPE^DOMAIN^DEFAULT^IDFLT^HELP
var
i: Integer;
DialogItem: TDialogItem;
begin
CallV('ORWDXM PROMPTS', [ADialog]);
DialogItem := nil;
with RPCBrokerV do for i := 0 to Results.Count - 1 do
begin
if CharAt(Results[i], 1) = '~' then
begin
DialogItem := TDialogItem.Create; // create a new dialog item
with DialogItem do
begin
Results[i] := Copy(Results[i], 2, Length(Results[i]));
ID := Piece(Results[i], U, 1);
Required := Piece(Results[i], U, 2) = '1';
Hidden := Piece(Results[i], U, 3) = '1';
Prompt := Piece(Results[i], U, 4);
DataType := CharAt(Piece(Results[i], U, 5), 1);
Domain := Piece(Results[i], U, 6);
EDefault := Piece(Results[i], U, 7);
IDefault := Piece(Results[i], U, 8);
HelpText := Piece(Results[i], U, 9);
CrossRef := Piece(Results[i], U, 10);
ScreenRef := Piece(Results[i], U, 11);
if Hidden then DataType := 'H'; // if hidden, use 'Hidden' type
end;
Dest.Add(DialogItem);
end;
if (CharAt(Results[i], 1) = 't') and (DialogItem <> nil) then // use last DialogItem
with DialogItem do EDefault := EDefault + Copy(Results[i], 2, Length(Results[i])) + CRLF;
end;
end;
procedure ExtractToResponses(Dest: TList; var HasObjects: boolean);
{ load a list with TResponse records, assumes source strings are in RPCBrokerV.Results }
var
i: Integer;
AResponse: TResponse;
WPContainsObjects, TxContainsObjects: boolean;
TempBroker: TStrings;
begin
i := 0;
HasObjects := FALSE;
TempBroker := TStringlist.Create;
FastAssign(RPCBrokerV.Results, TempBroker);
try
with TempBroker do while i < Count do
begin
if CharAt(Strings[i], 1) = '~' then
begin
AResponse := TResponse.Create;
with AResponse do
begin
PromptIEN := StrToIntDef(Piece(Copy(Strings[i], 2, 255), U, 1), 0);
Instance := StrToIntDef(Piece(Strings[i], U, 2), 0);
PromptID := Piece(Strings[i], U, 3);
Inc(i);
while (i < Count) and (CharAt(Strings[i], 1) <> '~') do
begin
if CharAt(Strings[i], 1) = 'i' then IValue := Copy(Strings[i], 2, 255);
if CharAt(Strings[i], 1) = 'e' then EValue := Copy(Strings[i], 2, 255);
if CharAt(Strings[i], 1) = 't' then
begin
if Length(EValue) > 0 then EValue := EValue + CRLF;
EValue := EValue + Copy(Strings[i], 2, 255);
IValue := TX_WPTYPE; // signals that this is a word processing field
end;
Inc(i);
end; {while i}
if IValue <> TX_WPTYPE then ExpandOrderObjects(IValue, TxContainsObjects);
ExpandOrderObjects(EValue, WPContainsObjects);
HasObjects := HasObjects or WPContainsObjects or TxContainsObjects;
Dest.Add(AResponse);
end; {with AResponse}
end; {if CharAt}
end; {With RPCBrokerV}
finally
TempBroker.Free;
end;
end;
procedure LoadResponses(Dest: TList; const OrderID: string; var HasObjects: boolean);
var
Transfer: boolean;
begin
if ((XferOuttoInOnMeds = True) or (XfInToOutNow = True)) and (CharAt(OrderID,1)='C') then Transfer := true
else Transfer := false;
CallV('ORWDX LOADRSP', [OrderID, Transfer]);
ExtractToResponses(Dest, HasObjects);
end;
procedure PutNewOrder(var AnOrder: TOrder; ConstructOrder: TConstructOrder; OrderSource: string);
var
i, inc, len, numLoop, remain: Integer;
ocStr, tmpStr, x, y, z: string;
begin
with RPCBrokerV do
begin
ClearParameters := True;
RemoteProcedure := 'ORWDX SAVE';
Param[0].PType := literal;
Param[0].Value := Patient.DFN; //*DFN*
Param[1].PType := literal;
Param[1].Value := IntToStr(Encounter.Provider);
Param[2].PType := literal;
(*if loc > 0 then Param[2].Value := IntToStr(Loc)
else Param[2].Value := IntToStr(Encounter.Location);*)
Param[2].Value := IntToStr(Encounter.Location);
Param[3].PType := literal;
Param[3].Value := ConstructOrder.DialogName;
Param[4].PType := literal;
Param[4].Value := IntToStr(ConstructOrder.DGroup);
Param[5].PType := literal;
Param[5].Value := IntToStr(ConstructOrder.OrderItem);
Param[6].PType := literal;
Param[6].Value := AnOrder.EditOf; // null if new order, otherwise ORIFN of original
if (ConstructOrder.DGroup = IVDisp) or (ConstructOrder.DGroup = ClinIVDisp) or (ConstructOrder.DialogName = 'PSJI OR PAT FLUID OE') then
SetupORDIALOG(Param[7], ConstructOrder.ResponseList, True)
else
SetupORDIALOG(Param[7], ConstructOrder.ResponseList);
if Length(ConstructOrder.LeadText) > 0
then Param[7].Mult['"ORLEAD"'] := ConstructOrder.LeadText;
if Length(ConstructOrder.TrailText) > 0
then Param[7].Mult['"ORTRAIL"'] := ConstructOrder.TrailText;
Param[7].Mult['"ORCHECK"'] := IntToStr(ConstructOrder.OCList.Count);
with ConstructOrder do for i := 0 to OCList.Count - 1 do
begin
// put quotes around everything to prevent broker from choking
y := '"ORCHECK","' + Piece(OCList[i], U, 1) + '","' + Piece(OCList[i], U, 3) +
'","' + IntToStr(i+1) + '"';
//Param[7].Mult[y] := Pieces(OCList[i], U, 2, 4);
OCStr := Pieces(OCList[i], U, 2, 4);
len := Length(OCStr);
if len > 255 then
begin
numLoop := len div 255;
remain := len mod 255;
inc := 0;
while inc <= numLoop do
begin
tmpStr := Copy(OCStr, 1, 255);
OCStr := Copy(OCStr, 256, Length(OcStr));
Param[7].Mult[y + ',' + InttoStr(inc)] := tmpStr;
inc := inc +1;
end;
if remain > 0 then Param[7].Mult[y + ',' + inttoStr(inc)] := OCStr;
end
else
Param[7].Mult[y] := OCStr;
end;
if CharInSet(ConstructOrder.DelayEvent, ['A','D','T','M','O']) then
Param[7].Mult['"OREVENT"'] := ConstructOrder.PTEventPtr;
if ConstructOrder.LogTime > 0
then Param[7].Mult['"ORSLOG"'] := FloatToStr(ConstructOrder.LogTime);
Param[7].Mult['"ORTS"'] := IntToStr(Patient.Specialty); // pass in treating specialty for ORTS
Param[8].PType := literal;
Param[8].Value := ConstructOrder.DigSig;
if (Constructorder.IsIMODialog) or (ConstructOrder.DGroup = ClinDisp) or (ConstructOrder.DGroup = ClinIVDisp) then
begin
Param[9].PType := literal; //IMO
Param[9].Value := FloatToStr(Encounter.DateTime);
end else
begin
Param[9].PType := literal; //IMO
Param[9].Value := '';
end;
Param[10].PType := literal;
Param[10].Value := OrderSource;
Param[11].PType := literal;
Param[11].Value := IntToStr(Constructorder.IsEventDefaultOR);
CallBroker;
if Results.Count = 0 then Exit; // error creating order
x := Results[0];
Results.Delete(0);
y := '';
while (Results.Count > 0) and (CharAt(Results[0], 1) <> '~') and (CharAt(Results[0], 1) <> '|') do
begin
y := y + Copy(Results[0], 2, Length(Results[0])) + CRLF;
Results.Delete(0);
end;
if Length(y) > 0 then y := Copy(y, 1, Length(y) - 2); // take off last CRLF
z := '';
if (Results.Count > 0) and (Results[0] = '|') then
begin
Results.Delete(0);
while (Results.Count > 0) and (CharAt(Results[0], 1) <> '~') and (CharAt(Results[0], 1) <> '|') do
begin
z := z + Copy(Results[0], 2, Length(Results[0]));
Results.Delete(0);
end;
end;
SetOrderFields(AnOrder, x, y, z);
end;
end;
{ no longer used -
procedure PutNewOrderAuto(var AnOrder: TOrder; ADialog: Integer);
var
i: Integer;
y: string;
begin
CallV('ORWDXM AUTOACK', [Patient.DFN, Encounter.Provider, Encounter.Location, ADialog]);
with RPCBrokerV do if Results.Count > 0 then
begin
y := '';
for i := 1 to Results.Count - 1 do
y := y + Copy(Results[i], 2, Length(Results[i])) + CRLF;
if Length(y) > 0 then y := Copy(y, 1, Length(y) - 2); // take off last CRLF
SetOrderFields(AnOrder, Results[0], y);
end;
end;
}
function OIMessage(IEN: Integer): string;
begin
CallV('ORWDX MSG', [IEN]);
with RPCBrokerV.Results do SetString(Result, GetText, Length(Text));
end;
function OrderMenuStyle: Integer;
begin
Result := StrToIntDef(sCallV('ORWDXM MSTYLE', [nil]), 0);
end;
function ResolveScreenRef(const ARef: string): string;
begin
Result := sCallV('ORWDXM RSCRN', [ARef]);
end;
function SubSetOfOrderItems(const StartFrom: string; Direction: Integer;
const XRef: string; QuickOrderDlgIen: Integer): TStrings;
{ returns a pointer to a list of orderable items matching an S.xxx cross reference (for use in
a long list box) - The return value is a pointer to RPCBrokerV.Results, so the data must
be used BEFORE the next broker call! }
begin
CallV('ORWDX ORDITM', [StartFrom, Direction, XRef, QuickOrderDlgIen]);
Result := RPCBrokerV.Results;
end;
function GetDefaultCopay(AnOrderID: string): String;
begin
with RPCBrokerV do
begin
ClearParameters := True;
RemoteProcedure := 'ORWDPS4 CPLST';
Param[0].PType := literal;
Param[0].Value := Patient.DFN;
Param[1].PType := list;
Param[1].Mult['1'] := AnOrderID;
end;
CallBroker;
if RPCBrokerV.Results.Count > 0 then
Result := RPCBrokerV.Results[0]
else
Result := '';
end;
procedure SetDefaultCoPayToNewOrder(AnOrderID, CoPayInfo:string);
var
temp,CPExems: string;
CoPayValue: array [1..7] of Char;
i: integer;
begin
// SC AO IR EC MST HNC CV
CoPayValue[1] := 'N';
CoPayValue[2] := 'N';
CoPayValue[3] := 'N';
CoPayValue[4] := 'N';
CoPayValue[5] := 'N';
CoPayValue[6] := 'N';
CoPayValue[7] := 'N';
temp := Pieces(CoPayInfo,'^',2,6);
i := 1;
while Length(Piece(temp,'^',i))>0 do
begin
if Piece(Piece(temp,'^',i),';',1) = 'SC' then
begin
if Piece( Piece(temp,'^',i),';',2) = '1' then
CoPayValue[1] := 'C'
else
CopayValue[1] := 'U';
end;
if Piece(Piece(temp,'^',i),';',1) = 'AO' then
begin
if Piece( Piece(temp,'^',i),';',2) = '1' then
CoPayValue[2] := 'C'
else
CopayValue[2] := 'U';
end;
if Piece(Piece(temp,'^',i),';',1) = 'IR' then
begin
if Piece( Piece(temp,'^',i),';',2) = '1' then
CoPayValue[3] := 'C'
else
CopayValue[3] := 'U';
end;
if Piece(Piece(temp,'^',i),';',1) = 'EC' then
begin
if Piece( Piece(temp,'^',i),';',2) = '1' then
CoPayValue[4] := 'C'
else
CopayValue[4] := 'U';
end;
if Piece(Piece(temp,'^',i),';',1) = 'MST' then
begin
if Piece( Piece(temp,'^',i),';',2) = '1' then
CoPayValue[5] := 'C'
else
CopayValue[5] := 'U';
end;
if Piece(Piece(temp,'^',i),';',1) = 'HNC' then
begin
if Piece( Piece(temp,'^',i),';',2) = '1' then
CoPayValue[6] := 'C'
else
CopayValue[6] := 'U';
end;
if Piece(Piece(temp,'^',i),';',1) = 'CV' then
begin
if Piece( Piece(temp,'^',i),';',2) = '1' then
CoPayValue[7] := 'C'
else
CopayValue[7] := 'U';
end;
i := i + 1;
end;
CPExems := CoPayValue[1] + CoPayValue[2] + CoPayValue[3] + CoPayValue[4]
+ CoPayValue[5] + CoPayValue[6] + CoPayValue[7];
CPExems := AnOrderId + '^' + CPExems;
with RPCBrokerV do
begin
ClearParameters := True;
RemoteProcedure := 'ORWDPS4 CPINFO';
Param[0].PType := list;
Param[0].Mult['1'] := CPExems;
CallBroker;
end;
end;
function SubsetOfEntries(const StartFrom: string; Direction: Integer;
const XRef, GblRef, ScreenRef: string): TStrings;
{ returns a pointer to a list of file entries (for use in a long list box) -
The return value is a pointer to RPCBrokerV.Results, so the data must
be used BEFORE the next broker call! }
begin
CallV('ORWDOR LKSCRN', [StartFrom, Direction, XRef, GblRef, ScreenRef]);
Result := RPCBrokerV.Results;
end;
procedure ValidateNumericStr(const x, Dom: string; var ErrMsg: string);
begin
ErrMsg := sCallV('ORWDOR VALNUM', [x, Dom]);
if ErrMsg = '0' then ErrMsg := '' else ErrMsg := Piece(ErrMsg, U, 2);
end;
function IsPFSSActive: boolean;
begin
with uPFSSActive do
if not PFSSChecked then
begin
PFSSActive := (sCallV('ORWPFSS IS PFSS ACTIVE?', [nil]) = '1');
PFSSChecked := True;
end;
Result := uPFSSActive.PFSSActive
end;
{ Medication Calls }
procedure AppendMedRoutes(Dest: TStrings);
var
i: Integer;
x: string;
begin
if uMedRoutes = nil then
begin
CallV('ORWDPS32 ALLROUTE', [nil]);
with RPCBrokerV do
begin
uMedRoutes := TStringList.Create;
FastAssign(RPCBrokerV.Results, uMedRoutes);
for i := 0 to Results.Count - 1 do if Length(Piece(Results[i], U, 3)) > 0 then
begin
x := Piece(Results[i], U, 1) + U + Piece(Results[i], U, 3) +
' (' + Piece(Results[i], U, 2) + ')' + U + Piece(Results[i], U, 3);
uMedRoutes.Add(x);
end; {if Length}
SortByPiece(uMedRoutes, U, 2);
end; {with RPCBrokerV}
end; {if uMedRoutes}
FastAddStrings(uMedRoutes, Dest);
end;
procedure CheckAuthForMeds(var x: string; dlgID: string = '');
begin
//CQ 21724 - Nurses should be able to order supplies, pass in dlgID
//from fODMeds - jcs
x := Piece(sCallV('ORWDPS32 AUTH', [Encounter.Provider, dlgID]), U, 2);
end;
function DispenseMessage(AnIEN: Integer): string;
var
x: string;
begin
if AnIEN = uLastDispenseIEN then Result := uLastDispenseMsg else
begin
x := sCallV('ORWDPS32 DRUGMSG', [AnIEN]);
uLastDispenseIEN := AnIEN;
uLastDispenseMsg := Piece(x, U, 1);
uLastQuantityMsg := Piece(x, U, 2);
Result := uLastDispenseMsg;
end;
end;
function QuantityMessage(AnIEN: Integer): string;
var
x: string;
begin
if AnIEN = uLastDispenseIEN then Result := uLastQuantityMsg else
begin
x := sCallV('ORWDPS32 DRUGMSG', [AnIEN]);
uLastDispenseIEN := AnIEN;
uLastDispenseMsg := Piece(x, U, 1);
uLastQuantityMsg := Piece(x, U, 2);
Result := uLastQuantityMsg;
end;
end;
function RequiresCopay(DispenseDrug: Integer): Boolean;
begin
Result := sCallV('ORWDPS32 SCSTS', [Patient.DFN, DispenseDrug]) = '1';
end;
procedure LoadFormularyAlt(AList: TStringList; AnIEN: Integer; PSType: Char);
begin
CallV('ORWDPS32 FORMALT', [AnIEN, PSType]);
FastAssign(RPCBrokerV.Results, AList);
end;
procedure LookupRoute(const AName: string; var ID, Abbreviation: string);
var
x: string;
begin
x := sCallV('ORWDPS32 VALROUTE', [AName]);
ID := Piece(x, U, 1);
Abbreviation := Piece(x, U, 2);
end;
function MedIsSupply(AnIEN: Integer): Boolean;
begin
Result := sCallV('ORWDPS32 ISSPLY', [AnIEN]) = '1';
end;
function MedTypeIsIV(AnIEN: Integer): Boolean;
begin
Result := sCallV('ORWDPS32 MEDISIV', [AnIEN]) = '1';
end;
function ODForMedIn: TStrings;
{ Returns init values for inpatient meds dialog. The results must be used immediately. }
begin
CallV('ORWDPS32 DLGSLCT', [PST_UNIT_DOSE, patient.dfn, patient.location]);
Result := RPCBrokerV.Results;
end;
function ODForIVFluids: TStrings;
{ Returns init values for IV Fluids dialog. The results must be used immediately. }
begin
CallV('ORWDPS32 DLGSLCT', [PST_IV_FLUIDS, patient.dfn, patient.location]);
Result := RPCBrokerV.Results;
end;
function AmountsForIVFluid(AnIEN: Integer; FluidType: Char): string;
begin
Result := sCallV('ORWDPS32 IVAMT', [AnIEN, FluidType]);
end;
function ODForMedOut: TStrings;
{ Returns init values for outpatient meds dialog. The results must be used immediately. }
begin
CallV('ORWDPS32 DLGSLCT', [PST_OUTPATIENT, patient.dfn, patient.location]);
Result := RPCBrokerV.Results;
end;
function OIForMedIn(AnIEN: Integer): TStrings;
{ Returns init values for inpatient meds order item. The results must be used immediately. }
begin
CallV('ORWDPS32 OISLCT', [AnIEN, PST_UNIT_DOSE, Patient.DFN]);
Result := RPCBrokerV.Results;
end;
function OIForMedOut(AnIEN: Integer): TStrings;
{ Returns init values for outpatient meds order item. The results must be used immediately. }
begin
CallV('ORWDPS32 OISLCT', [AnIEN, PST_OUTPATIENT, Patient.DFN]);
Result := RPCBrokerV.Results;
end;
function ODForSD: TStrings;
begin
CallV('ORWDSD1 ODSLCT', [PATIENT.DFN, Encounter.Location]);
Result := RPCBrokerV.Results;
end;
function RatedDisabilities: string;
{ Returns a list of rated disabilities, if any, for a patient }
begin
CallV('ORWPCE SCDIS', [Patient.DFN]);
Result := RPCBrokerV.Results.Text;
end;
procedure ValidateIVRate(var x: string);
begin
x := sCallV('ORWDPS32 VALRATE', [x]);
end;
//function ValidIVRate(const x: string): Boolean;
//{ returns true if the text entered as the IV rate is valid }
//begin
// Result := sCallV('ORWDPS32 VALRATE', [x]) = '1';
//end;
function ValidSchedule(const x: string; PSType: Char = 'I'): Integer;
{ returns 1 if schedule is valid, 0 if schedule is not valid, -1 pharmacy routine not there }
begin
Result := StrToIntDef(sCallV('ORWDPS32 VALSCH', [x, PSType]), -1);
end;
function ValidQuantity(const x: string): Boolean;
{ returns true if the text entered as the quantity is valid }
begin
Result := sCallV('ORWDPS32 VALQTY', [Trim(x)]) = '1';
end;
function ODForVitals: TStrings;
{ Returns init values for vitals dialog. The results must be used immediately. }
begin
CallV('ORWDOR VMSLCT', [nil]);
Result := RPCBrokerV.Results;
end;
initialization
uLastDispenseIEN := 0;
uLastDispenseMsg := '';
finalization
if uMedRoutes <> nil then uMedRoutes.Free;
end.
| 31.792079 | 140 | 0.64279 |
8300af41f4f370a745ac83096b5d6fa0cbb30cd3
| 1,784 |
pas
|
Pascal
|
datetime/0022.pas
|
nickelsworth/swag
|
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
|
[
"BSD-2-Clause"
] | 11 |
2015-12-12T05:13:15.000Z
|
2020-10-14T13:32:08.000Z
|
datetime/0022.pas
|
nickelsworth/swag
|
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
|
[
"BSD-2-Clause"
] | null | null | null |
datetime/0022.pas
|
nickelsworth/swag
|
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
|
[
"BSD-2-Clause"
] | 8 |
2017-05-05T05:24:01.000Z
|
2021-07-03T20:30:09.000Z
|
===========================================================================
BBS: The Beta Connection
Date: 06-07-93 (18:50) Number: 823
From: KELLY SMALL Refer#: 744
To: STEPHEN WHITIS Recvd: NO
Subj: DATE CALCULATIONS Conf: (232) T_Pascal_R
---------------------------------------------------------------------------
SW│ Does anyone know where I can find an algorithm, or better yet TP
SW│ 5.5 code, to calculate the day of the week for a give date?
Give this a whirl:
function LeapYearOffset(M,Y:Word):Integer;
Begin
if ((Y mod 400 = 0) or ((Y mod 100 <> 0) and (Y mod 4 = 0)))
and (M > 2)
then LeapYearOffset := 1
else LeapYearOffset := 0
End;
Function DaysinMonth(dMonth,dYear:Word):Byte;
Begin
case dMonth of
1,3,5,7,8,10,12 : DaysInMonth := 31;
4,6,9,11 : DaysInMonth := 30;
2 : DaysInMonth := 28 + LeapYearOffset(3,dYear)
End;
End;
Function FindDayOfWeek(Day, Month, Year: Integer) : Byte;
var
century, yr, dw: Integer;
begin
if Month < 3 then
begin
Inc(Month, 10);
Dec(Year);
end
else
Dec(Month, 2);
century := Year div 100;
yr := year mod 100;
dw := (((26 * month - 2) div 10) + day + yr + (yr div 4) +
(century div 4) - (2 * century)) mod 7;
if dw < 0 then FindDayOfWeek := dw + 7
else FindDayOfWeek := dw;
end;
⌠/elly
⌡mall
---
■ JABBER v1.2 #18 ■ Bigamy: too many wives. Monogamy: see Bigamy
■ KMail 2.94 The Wish Book BBS (60
2)258-7113 (6+ nodes, ring down)
* The Wish Book 602-258-7113(6 lines)10+ GIGs/The BEST board in Arizona!
* PostLink(tm) v1.06 TWB (#1032) : RelayNet(tm)
| 30.758621 | 80 | 0.514013 |
83876b9371467d0a443b20df10416ada3614b5d5
| 3,817 |
pas
|
Pascal
|
hudba.pas
|
wilx/dyno
|
cc2fcb708963ed713139ccfef28a5847ea3ce04f
|
[
"BSD-2-Clause"
] | null | null | null |
hudba.pas
|
wilx/dyno
|
cc2fcb708963ed713139ccfef28a5847ea3ce04f
|
[
"BSD-2-Clause"
] | null | null | null |
hudba.pas
|
wilx/dyno
|
cc2fcb708963ed713139ccfef28a5847ea3ce04f
|
[
"BSD-2-Clause"
] | null | null | null |
{
Copyright (c) 1997-2007, Václav Haisman
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}
{$ifdef DEBUG}
{$D+,L+,Y+,R+,I+,C+,S+,V+,Q+}
{$endif}
{$O-,G+,X+}
unit Hudba;
interface
uses EProcs, Seznam, midas, mconfig, vgatext, mfile, mplayer, errors, s3m;
function hudbaStart(soub : PChar) : boolean;
function hudbaStop : boolean;
implementation
var configured : integer;
module : PmpModule;
i, error, isConfig : integer;
str : array [0..256] of char;
HudbaExitProcO : TExitProcO;
(*
function toASCIIZ(dest : PChar; str : string) : PChar;
var
spos, slen : integer;
i : integer;
begin
spos := 0; { string position = 0 }
slen := ord(str[0]); { string length }
{ copy string to ASCIIZ conversion buffer: }
while spos < slen do
begin
dest[spos] := str[spos+1];
spos := spos + 1;
end;
dest[spos] := chr(0); { put terminating 0 to end of string }
toASCIIZ := dest;
end;
*)
function hudbaStart(soub : PChar) : boolean;
BEGIN
error := fileExists('MIDAS.CFG', @isConfig);
if error <> OK then
midasError(error);
if isConfig <> 1 then
begin
midasSetDefaults; { set MIDAS defaults }
{ Run MIDAS Sound System configuration: }
configured := midasConfig;
{ Reset display mode: }
vgaSetMode($03);
if configured = 1 then
begin
{ Configuration succesful - save configuration file: }
midasSaveConfig('MIDAS.CFG');
WriteLn('Konfigurace byla zapsana do MIDAS.CFG');
end
else
begin
{ Configuration unsuccessful: }
WriteLn('Konfigurace NEBYLA zapsana');
end;
end;
midasSetDefaults; { set MIDAS defaults }
midasLoadConfig('MIDAS.CFG'); { load configuration }
midasInit; { initialize MIDAS Sound System }
module := midasLoadModule(soub, @mpS3M, NIL);
midasPlayModule(module, 0); { start playing }
end;
function hudbaStop : boolean;
begin
midasStopModule(module); { stop playing }
midasFreeModule(module); { deallocate module }
midasClose; { uninitialize MIDAS }
end;
procedure HudbaExitProc; far;
begin
if midasMPInit = 1 then begin
if midasMPPlay = 1 then begin
midasStopModule(module);
midasFreeModule(module);
end;
midasClose;
end;
end;
begin
HudbaExitProcO.Init(HudbaExitProc,Static);
epchain.VlozObj(@HudbaExitProcO);
end.
| 32.347458 | 80 | 0.661514 |
f193615b4baa25a483c4f39599aa65034ed2f20d
| 22,487 |
pas
|
Pascal
|
implementations/pascal/support/MathSupport.pas
|
intervention-engine/fhir-golang-generator
|
6011e2b77b34cbb8b9d460a58fc6549c1d3e404d
|
[
"BSD-3-Clause"
] | 11 |
2016-08-23T01:35:31.000Z
|
2021-01-09T20:46:37.000Z
|
implementations/pascal/support/MathSupport.pas
|
intervention-engine/fhir-golang-generator
|
6011e2b77b34cbb8b9d460a58fc6549c1d3e404d
|
[
"BSD-3-Clause"
] | 8 |
2015-06-22T17:58:54.000Z
|
2017-02-16T00:24:39.000Z
|
implementations/pascal/support/MathSupport.pas
|
intervention-engine/fhir-golang-generator
|
6011e2b77b34cbb8b9d460a58fc6549c1d3e404d
|
[
"BSD-3-Clause"
] | 5 |
2016-07-02T21:08:11.000Z
|
2018-11-02T18:13:17.000Z
|
Unit MathSupport;
{
Copyright (c) 2001-2013, Kestral Computing Pty Ltd (http://www.kestral.com.au)
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
}
Interface
Uses
Math;
Function IntegerCompare(Const iA, iB : Byte) : Integer; Overload;
Function IntegerCompare(Const iA, iB : Word) : Integer; Overload;
Function IntegerCompare(Const iA, iB : Integer) : Integer; Overload;
Function IntegerCompare(Const iA, iB : Cardinal) : Integer; Overload;
Function IntegerCompare(Const iA, iB : Int64) : Integer; Overload;
Function IntegerCompare(Const iA, iB, iThreshold : Int64) : Integer; Overload;
Function BooleanCompare(Const bA, bB : Boolean) : Integer; Overload;
Function RealCompare(Const rA, rB : Extended) : Integer; Overload;
Function RealCompare(Const rA, rB : Real) : Integer; Overload;
Function RealCompare(Const rA, rB, rThreshold : Real) : Integer; Overload;
Function IntegerEquals(Const iA, iB : Byte) : Boolean; Overload;
Function IntegerEquals(Const iA, iB : Word) : Boolean; Overload;
Function IntegerEquals(Const iA, iB : Integer) : Boolean; Overload;
Function IntegerEquals(Const iA, iB : Cardinal) : Boolean; Overload;
Function IntegerEquals(Const iA, iB : Int64) : Boolean; Overload;
Function IntegerEquals(Const iA, iB, iThreshold : Int64) : Boolean; Overload;
Function BooleanEquals(Const bA, bB : Boolean) : Boolean; Overload;
Function RealEquals(Const rA, rB : Real) : Boolean; Overload;
Function RealEquals(Const rA, rB, rThreshold : Real) : Boolean; Overload;
Function IntegerBetweenInclusive(Const iLeft, iCheck, iRight : Integer) : Boolean; Overload;
Function IntegerBetweenExclusive(Const iLeft, iCheck, iRight : Integer) : Boolean; Overload;
Function IntegerBetween(Const iLeft, iCheck, iRight : Integer) : Boolean; Overload;
Function CardinalBetweenInclusive(Const iLeft, iCheck, iRight : Cardinal) : Boolean; Overload;
Function CardinalBetweenExclusive(Const iLeft, iCheck, iRight : Cardinal) : Boolean; Overload;
Function IntegerBetweenInclusive(Const iLeft, iCheck, iRight : Int64) : Boolean; Overload;
Function IntegerBetweenExclusive(Const iLeft, iCheck, iRight : Int64) : Boolean; Overload;
Function IntegerBetween(Const iLeft, iCheck, iRight : Int64) : Boolean; Overload;
Function RealBetweenInclusive(Const rLeft, rCheck, rRight : Real) : Boolean; Overload;
Function RealBetweenExclusive(Const rLeft, rCheck, rRight : Real) : Boolean; Overload;
Function RealBetween(Const rLeft, rCheck, rRight : Real) : Boolean; Overload;
Function RealBetweenInclusive(Const rLeft, rCheck, rRight : Extended) : Boolean; Overload;
Function RealBetweenExclusive(Const rLeft, rCheck, rRight : Extended) : Boolean; Overload;
Function RealBetween(Const rLeft, rCheck, rRight : Extended) : Boolean; Overload;
Function IntegerMin(Const A, B : Integer) : Integer; Overload;
Function IntegerMax(Const A, B : Integer) : Integer; Overload;
Function IntegerMin(Const A, B : Cardinal) : Cardinal; Overload;
Function IntegerMax(Const A, B : Cardinal) : Cardinal; Overload;
Function IntegerMin(Const A, B : Word) : Word; Overload;
Function IntegerMax(Const A, B : Word) : Word; Overload;
Function IntegerMin(Const A, B : Byte) : Byte; Overload;
Function IntegerMax(Const A, B : Byte) : Byte; Overload;
Function IntegerMin(Const A, B : Int64) : Int64; Overload;
Function IntegerMax(Const A, B : Int64) : Int64; Overload;
Function RealMin(Const A, B : Real) : Real; Overload;
Function RealMax(Const A, B : Real) : Real; Overload;
Function RealCeiling(Const rValue : Real) : Int64; Overload;
Function RealFloor(Const rValue : Real) : Int64; Overload;
Function Int64Round(Const iValue, iFactor : Int64) : Int64; Overload;
Function RealSquare(Const rValue : Extended) : Extended; Overload;
Function RealSquareRoot(Const rValue : Extended) : Extended; Overload;
Function IntegerArrayMax(Const aIntegers : Array Of Integer) : Integer; Overload;
Function IntegerArrayMin(Const aIntegers : Array Of Integer) : Integer; Overload;
Function IntegerArraySum(Const aIntegers : Array Of Integer) : Integer; Overload;
Function IntegerArrayIndexOf(Const aIntegers : Array Of Word; iValue : Word) : Integer; Overload;
Function IntegerArrayIndexOf(Const aIntegers : Array Of Integer; iValue : Integer) : Integer; Overload;
Function IntegerArrayIndexOf(Const aIntegers : Array Of Cardinal; iValue : Cardinal) : Integer; Overload;
Function IntegerArrayExists(Const aIntegers : Array Of Integer; iValue : Integer) : Boolean; Overload;
Function IntegerArrayValid(Const aIntegers : Array Of Integer; iIndex : Integer) : Boolean; Overload;
Function RealRoundToInteger(Const aValue : Extended) : Int64; Overload;
Function Abs(Const iValue : Int64) : Int64; Overload;
Function Abs(Const iValue : Integer) : Integer; Overload;
Function Abs(Const rValue : Real) : Real; Overload;
Function Sign(Const iValue : Integer) : Integer; Overload;
Function IntegerConstrain(Const iValue, iMin, iMax : Integer) : Integer; Overload;
Function RealConstrain(Const rValue, rMin, rMax : Real) : Real; Overload;
Function Sin(Const Theta : Extended) : Extended; Overload;
Function Cos(Const Theta : Extended) : Extended; Overload;
Function ArcTan(Const Theta : Extended) : Extended; Overload;
Function ArcTan2(Const X, Y : Extended) : Extended; Overload;
Function DegreesToRadians(Const rDegrees : Extended) : Extended; Overload;
Function RadiansToDegrees(Const rRadians : Extended) : Extended; Overload;
Function Power(Const rBase : Extended; Const iExponent : Integer) : Extended; Overload;
Function Power(Const rBase, rExponent : Extended) : Extended; Overload;
Function LnXP1(Const X : Extended) : Extended; Overload;
Function LogN(Const Base, X : Extended) : Extended; Overload;
Function Log10(Const X : Extended) : Extended; Overload;
Function Log2(Const X : Extended) : Extended; Overload;
Function Hypotenuse(Const X, Y : Extended) : Extended; Overload;
Function Percentage(Const iPart, iTotal : Integer) : Real; Overload;
Function SignedMod(Const iValue : Integer; Const iRange : Integer) : Integer; Overload;
Function SignedMod(Const iValue : Int64; Const iRange : Int64) : Int64; Overload;
Function UnsignedMod(Const iValue : Cardinal; Const iRange : Cardinal) : Cardinal; Overload;
Function UnsignedMod(Const iValue : Integer; Const iRange : Integer) : Integer; Overload;
Function UnsignedMod(Const iValue : Int64; Const iRange : Int64) : Int64; Overload;
Function RemoveRemainder(Const iValue : Cardinal; Const iRange : Cardinal) : Cardinal; Overload;
Function RemoveRemainder(Const iValue : Integer; Const iRange : Integer) : Integer; Overload;
Function RemoveRemainder(Const iValue : Int64; Const iRange : Int64) : Int64; Overload;
Function GreatestCommonDivisor(Const iA, iB : Integer) : Integer;
Implementation
Function Percentage(Const iPart, iTotal : Integer) : Real;
Begin
If (iTotal = 0) Then
Result := 0
Else
Result := iPart / iTotal;
End;
Function IntegerBetweenInclusive(Const iLeft, iCheck, iRight : Integer) : Boolean;
Begin
Result := (iLeft <= iCheck) And (iCheck <= iRight);
End;
Function IntegerBetweenExclusive(Const iLeft, iCheck, iRight : Integer) : Boolean;
Begin
Result := (iLeft < iCheck) And (iCheck < iRight);
End;
Function IntegerBetween(Const iLeft, iCheck, iRight : Integer) : Boolean;
Begin
Result := IntegerBetweenInclusive(iLeft, iCheck, iRight);
End;
Function CardinalBetweenInclusive(Const iLeft, iCheck, iRight : Cardinal) : Boolean;
Begin
Result := (iLeft <= iCheck) And (iCheck <= iRight);
End;
Function CardinalBetweenExclusive(Const iLeft, iCheck, iRight : Cardinal) : Boolean;
Begin
Result := (iLeft < iCheck) And (iCheck < iRight);
End;
Function IntegerBetweenInclusive(Const iLeft, iCheck, iRight : Int64) : Boolean;
Begin
Result := (iLeft <= iCheck) And (iCheck <= iRight);
End;
Function IntegerBetweenExclusive(Const iLeft, iCheck, iRight : Int64) : Boolean;
Begin
Result := (iLeft < iCheck) And (iCheck < iRight);
End;
Function IntegerBetween(Const iLeft, iCheck, iRight : Int64) : Boolean;
Begin
Result := IntegerBetweenInclusive(iLeft, iCheck, iRight);
End;
Function RealBetweenInclusive(Const rLeft, rCheck, rRight : Real) : Boolean;
Begin
Result := (rLeft <= rCheck) And (rCheck <= rRight);
End;
Function RealBetweenExclusive(Const rLeft, rCheck, rRight : Real) : Boolean;
Begin
Result := (rLeft < rCheck) And (rCheck < rRight);
End;
Function RealBetween(Const rLeft, rCheck, rRight : Real) : Boolean;
Begin
Result := RealBetweenInclusive(rLeft, rCheck, rRight);
End;
Function RealBetweenInclusive(Const rLeft, rCheck, rRight : Extended) : Boolean;
Begin
Result := (rLeft <= rCheck) And (rCheck <= rRight);
End;
Function RealBetweenExclusive(Const rLeft, rCheck, rRight : Extended) : Boolean;
Begin
Result := (rLeft < rCheck) And (rCheck < rRight);
End;
Function RealBetween(Const rLeft, rCheck, rRight : Extended) : Boolean;
Begin
Result := RealBetweenInclusive(rLeft, rCheck, rRight);
End;
Function IntegerMin(Const A, B : Integer) : Integer;
Begin
If A < B Then
Result := A
Else
Result := B;
End;
Function IntegerMax(Const A, B : Integer) : Integer;
Begin
If A > B Then
Result := A
Else
Result := B;
End;
Function RealMin(Const A, B : Real) : Real;
Begin
If A < B Then
Result := A
Else
Result := B;
End;
Function RealMax(Const A, B : Real) : Real;
Begin
If A > B Then
Result := A
Else
Result := B;
End;
Function IntegerMin(Const A, B : Cardinal) : Cardinal;
Begin
If A < B Then
Result := A
Else
Result := B;
End;
Function IntegerMax(Const A, B : Cardinal) : Cardinal;
Begin
If A > B Then
Result := A
Else
Result := B;
End;
Function IntegerMin(Const A, B : Word) : Word;
Begin
If A < B Then
Result := A
Else
Result := B;
End;
Function IntegerMax(Const A, B : Word) : Word;
Begin
If A > B Then
Result := A
Else
Result := B;
End;
Function IntegerMin(Const A, B : Byte) : Byte;
Begin
If A < B Then
Result := A
Else
Result := B;
End;
Function IntegerMax(Const A, B : Byte) : Byte;
Begin
If A > B Then
Result := A
Else
Result := B;
End;
Function IntegerMin(Const A, B : Int64) : Int64;
Begin
If A < B Then
Result := A
Else
Result := B;
End;
Function IntegerMax(Const A, B : Int64) : Int64;
Begin
If A > B Then
Result := A
Else
Result := B;
End;
Function IntegerArrayMin(Const aIntegers : Array Of Integer) : Integer;
Var
iLoop : Integer;
Begin
Result := aIntegers[Low(aIntegers)];
For iLoop := Low(aIntegers) + 1 To High(aIntegers) Do
Begin
If Result > aIntegers[iLoop] Then
Result := aIntegers[iLoop];
End;
End;
Function IntegerArrayMax(Const aIntegers : Array Of Integer) : Integer;
Var
iLoop : Integer;
Begin
Result := aIntegers[Low(aIntegers)];
For iLoop := Low(aIntegers) + 1 To High(aIntegers) Do
Begin
If Result < aIntegers[iLoop] Then
Result := aIntegers[iLoop];
End;
End;
Function IntegerArraySum(Const aIntegers : Array Of Integer) : Integer;
Var
iLoop : Integer;
Begin
Result := 0;
For iLoop := 0 To Length(aIntegers) - 1 Do
Inc(Result, aIntegers[iLoop]);
End;
Function RealCeiling(Const rValue : Real) : Int64;
Begin
Result := Trunc(rValue);
If Frac(rValue) > 0 Then
Inc(Result);
End;
Function RealFloor(Const rValue : Real) : Int64;
Begin
Result := Trunc(rValue);
If Frac(rValue) < 0 Then
Dec(Result);
End;
Function Int64Round(Const iValue, iFactor : Int64) : Int64;
Var
iFulcrum : Int64;
iRemain : Int64;
Begin
iFulcrum := iFactor Div 2;
iRemain := SignedMod(iValue, iFactor);
If iRemain < iFulcrum Then
Result := iValue - iRemain
Else If iRemain > iFulcrum Then
Result := iValue + (iFactor - iRemain)
Else
Result := iValue;
End;
Function RealSquare(Const rValue : Extended) : Extended;
Begin
Result := rValue * rValue;
End;
Function RealSquareRoot(Const rValue : Extended) : Extended;
Begin
Result := System.Sqrt(rValue);
End;
Function IntegerArrayIndexOf(Const aIntegers : Array Of Word; iValue : Word) : Integer;
Begin
Result := High(aIntegers);
While (Result >= 0) And (aIntegers[Result] <> iValue) Do
Dec(Result);
End;
Function IntegerArrayIndexOf(Const aIntegers : Array Of Integer; iValue : Integer) : Integer;
Begin
Result := High(aIntegers);
While (Result >= 0) And (aIntegers[Result] <> iValue) Do
Dec(Result);
End;
Function IntegerArrayIndexOf(Const aIntegers : Array Of Cardinal; iValue : Cardinal) : Integer;
Begin
Result := High(aIntegers);
While (Result >= 0) And (aIntegers[Result] <> iValue) Do
Dec(Result);
End;
Function IntegerArrayExists(Const aIntegers : Array Of Integer; iValue : Integer) : Boolean;
Begin
Result := IntegerArrayValid(aIntegers, IntegerArrayIndexOf(aIntegers, iValue));
End;
Function IntegerArrayValid(Const aIntegers : Array Of Integer; iIndex : Integer) : Boolean;
Begin
Result := IntegerBetweenInclusive(Low(aIntegers), iIndex, High(aIntegers));
End;
Function RealRoundToInteger(Const aValue : Extended) : Int64;
Begin
Result := System.Round(aValue);
End;
Function Sign(Const iValue : Integer) : Integer;
Begin
If iValue < 0 Then
Result := -1
Else If iValue > 0 Then
Result := 1
Else
Result := 0;
End;
Function IntegerConstrain(Const iValue, iMin, iMax : Integer) : Integer;
Begin
If iValue < iMin Then
Result := iMin
Else If iValue > iMax Then
Result := iMax
Else
Result := iValue;
End;
Function RealConstrain(Const rValue, rMin, rMax : Real) : Real;
Begin
If rValue < rMin Then
Result := rMin
Else If rValue > rMax Then
Result := rMax
Else
Result := rValue;
End;
Function Abs(Const iValue : Int64) : Int64;
Begin
If iValue < 0 Then
Result := -iValue
Else
Result := iValue;
End;
Function Abs(Const iValue : Integer) : Integer;
Begin
If iValue < 0 Then
Result := -iValue
Else
Result := iValue;
End;
Function Abs(Const rValue : Real) : Real;
Begin
If rValue < 0 Then
Result := -rValue
Else
Result := rValue;
End;
Function IntegerCompare(Const iA, iB : Byte) : Integer;
Begin
If iA < iB Then
Result := -1
Else If iA > iB Then
Result := 1
Else
Result := 0
End;
Function BooleanCompare(Const bA, bB : Boolean) : Integer;
Begin
If bA < bB Then
Result := -1
Else If bA > bB Then
Result := 1
Else
Result := 0
End;
Function IntegerCompare(Const iA, iB : Word) : Integer;
Begin
If iA < iB Then
Result := -1
Else If iA > iB Then
Result := 1
Else
Result := 0
End;
Function IntegerCompare(Const iA, iB, iThreshold : Int64) : Integer;
Begin
If iA - iThreshold > iB Then
Result := 1
Else If iB - iThreshold > iA Then
Result := -1
Else
Result := 0;
End;
Function IntegerCompare(Const iA, iB : Integer) : Integer;
Begin
If iA < iB Then
Result := -1
Else If iA > iB Then
Result := 1
Else
Result := 0
End;
Function IntegerCompare(Const iA, iB : Cardinal) : Integer;
Begin
If iA < iB Then
Result := -1
Else If iA > iB Then
Result := 1
Else
Result := 0
End;
Function IntegerCompare(Const iA, iB : Int64) : Integer;
Begin
If iA < iB Then
Result := -1
Else If iA > iB Then
Result := 1
Else
Result := 0
End;
Function RealCompare(Const rA, rB : Real) : Integer;
Begin
If rA > rB Then
Result := 1
Else If rA < rB Then
Result := -1
Else
Result := 0;
End;
Function RealCompare(Const rA, rB : Extended) : Integer;
Begin
If rA > rB Then
Result := 1
Else If rA < rB Then
Result := -1
Else
Result := 0;
End;
Function RealCompare(Const rA, rB, rThreshold : Real) : Integer;
Begin
If rA - rThreshold > rB Then
Result := 1
Else If rB - rThreshold > rA Then
Result := -1
Else
Result := 0;
End;
Function RealEquals(Const rA, rB, rThreshold : Real) : Boolean;
Begin
Result := RealCompare(rA, rB, rThreshold) = 0;
End;
Function BooleanEquals(Const bA, bB : Boolean) : Boolean;
Begin
Result := BooleanCompare(bA, bB) = 0;
End;
Function IntegerEquals(Const iA, iB : Byte) : Boolean;
Begin
Result := IntegerCompare(iA, iB) = 0;
End;
Function IntegerEquals(Const iA, iB : Word) : Boolean;
Begin
Result := IntegerCompare(iA, iB) = 0;
End;
Function IntegerEquals(Const iA, iB : Integer) : Boolean;
Begin
Result := IntegerCompare(iA, iB) = 0;
End;
Function IntegerEquals(Const iA, iB : Cardinal) : Boolean;
Begin
Result := IntegerCompare(iA, iB) = 0;
End;
Function IntegerEquals(Const iA, iB : Int64) : Boolean;
Begin
Result := IntegerCompare(iA, iB) = 0;
End;
Function IntegerEquals(Const iA, iB, iThreshold : Int64) : Boolean;
Begin
Result := IntegerCompare(iA, iB, iThreshold) = 0;
End;
Function RealEquals(Const rA, rB : Real) : Boolean;
Begin
Result := RealCompare(rA, rB) = 0;
End;
Function Sin(Const Theta : Extended) : Extended;
Begin
Result := System.Sin(Theta);
End;
Function Cos(Const Theta : Extended) : Extended;
Begin
Result := System.Cos(Theta);
End;
Function ArcTan(Const Theta : Extended) : Extended;
Begin
Result := System.ArcTan(Theta);
End;
Function ArcTan2(Const X, Y : Extended) : Extended;
Begin
Result := Math.ArcTan2(X, Y);
End;
Function DegreesToRadians(Const rDegrees : Extended) : Extended;
Begin
Result := Math.DegToRad(rDegrees);
End;
Function RadiansToDegrees(Const rRadians : Extended) : Extended;
Begin
Result := Math.RadToDeg(rRadians);
End;
Function Power(Const rBase : Extended; Const iExponent: Integer): Extended;
Begin
Result := Math.Power(rBase, iExponent);
End;
Function Power(Const rBase, rExponent: Extended): Extended;
Begin
Result := Math.Power(rBase, rExponent);
End;
Function LnXP1(Const X: Extended): Extended;
Begin
Result := Math.LnXP1(X);
End;
Function LogN(Const Base, X: Extended): Extended;
Begin
Result := Math.LogN(Base, X);
End;
Function Log10(Const X: Extended): Extended;
Begin
Result := Math.Log10(X);
End;
Function Log2(Const X: Extended): Extended;
Begin
Result := Math.Log2(X);
End;
Function Hypotenuse(Const X, Y: Extended): Extended;
Begin
Result := Math.Hypot(X, Y);
End;
Function SignedMod(Const iValue : Integer; Const iRange : Integer) : Integer;
Begin
Result := iValue Mod iRange;
End;
Function SignedMod(Const iValue : Int64; Const iRange : Int64) : Int64;
Begin
Result := iValue Mod iRange;
End;
Function UnsignedMod(Const iValue : Cardinal; Const iRange : Cardinal) : Cardinal;
Begin
Result := iValue Mod iRange;
End;
Function UnsignedMod(Const iValue : Integer; Const iRange : Integer) : Integer;
Begin
Result := iValue Mod iRange;
If Result < 0 Then
Result := Result + iRange;
End;
Function UnsignedMod(Const iValue : Int64; Const iRange : Int64) : Int64;
Begin
Result := iValue Mod iRange;
If Result < 0 Then
Result := Result + iRange;
End;
Function RemoveRemainder(Const iValue : Cardinal; Const iRange : Cardinal) : Cardinal;
Begin
Result := iValue - UnsignedMod(iValue, iRange);
End;
Function RemoveRemainder(Const iValue : Integer; Const iRange : Integer) : Integer;
Begin
Result := iValue - UnsignedMod(iValue, iRange);
End;
Function RemoveRemainder(Const iValue : Int64; Const iRange : Int64) : Int64;
Begin
Result := iValue - UnsignedMod(iValue, iRange);
End;
Function GreatestCommonDivisor(Const iA, iB : Integer) : Integer;
Var
iMinValue : Integer;
iMaxValue : Integer;
iCurrentNumerator : Integer;
iCurrentDenominator : Integer;
iCurrentRemainder : Integer;
Begin
If iA = iB Then
Begin
Result := iA;
End
Else
Begin
If iA > iB Then
Begin
iMaxValue := iA;
iMinValue := iB;
End
Else
Begin
iMaxValue := iB;
iMinValue := iA;
End;
If (iMinValue = 0) Then
Begin
Result := 0;
End
Else
Begin
iCurrentNumerator := iMaxValue;
iCurrentDenominator := iMinValue;
Repeat
iCurrentRemainder := iCurrentNumerator Mod iCurrentDenominator;
iCurrentNumerator := iCurrentDenominator;
iCurrentDenominator := iCurrentRemainder;
Until iCurrentRemainder = 0;
Result := iCurrentNumerator;
End;
End;
End;
End. // MathSupport //
| 25.466591 | 106 | 0.681505 |
6a5ca9554f290faf3ce8575f988a0520f5583578
| 4,193 |
pas
|
Pascal
|
Source/Services/SimpleEmail/Base/Model/AWS.SES.Model.IdentityDkimAttributes.pas
|
herux/aws-sdk-delphi
|
4ef36e5bfc536b1d9426f78095d8fda887f390b5
|
[
"Apache-2.0"
] | 67 |
2021-07-28T23:47:09.000Z
|
2022-03-15T11:48:35.000Z
|
Source/Services/SimpleEmail/Base/Model/AWS.SES.Model.IdentityDkimAttributes.pas
|
herux/aws-sdk-delphi
|
4ef36e5bfc536b1d9426f78095d8fda887f390b5
|
[
"Apache-2.0"
] | 5 |
2021-09-01T09:31:16.000Z
|
2022-03-16T18:19:21.000Z
|
Source/Services/SimpleEmail/Base/Model/AWS.SES.Model.IdentityDkimAttributes.pas
|
herux/aws-sdk-delphi
|
4ef36e5bfc536b1d9426f78095d8fda887f390b5
|
[
"Apache-2.0"
] | 13 |
2021-07-29T02:41:16.000Z
|
2022-03-16T10:22:38.000Z
|
unit AWS.SES.Model.IdentityDkimAttributes;
interface
uses
Bcl.Types.Nullable,
System.Generics.Collections,
AWS.SES.Enums;
type
TIdentityDkimAttributes = class;
IIdentityDkimAttributes = interface
function GetDkimEnabled: Boolean;
procedure SetDkimEnabled(const Value: Boolean);
function GetDkimTokens: TList<string>;
procedure SetDkimTokens(const Value: TList<string>);
function GetKeepDkimTokens: Boolean;
procedure SetKeepDkimTokens(const Value: Boolean);
function GetDkimVerificationStatus: TVerificationStatus;
procedure SetDkimVerificationStatus(const Value: TVerificationStatus);
function Obj: TIdentityDkimAttributes;
function IsSetDkimEnabled: Boolean;
function IsSetDkimTokens: Boolean;
function IsSetDkimVerificationStatus: Boolean;
property DkimEnabled: Boolean read GetDkimEnabled write SetDkimEnabled;
property DkimTokens: TList<string> read GetDkimTokens write SetDkimTokens;
property KeepDkimTokens: Boolean read GetKeepDkimTokens write SetKeepDkimTokens;
property DkimVerificationStatus: TVerificationStatus read GetDkimVerificationStatus write SetDkimVerificationStatus;
end;
TIdentityDkimAttributes = class
strict private
FDkimEnabled: Nullable<Boolean>;
FDkimTokens: TList<string>;
FKeepDkimTokens: Boolean;
FDkimVerificationStatus: Nullable<TVerificationStatus>;
function GetDkimEnabled: Boolean;
procedure SetDkimEnabled(const Value: Boolean);
function GetDkimTokens: TList<string>;
procedure SetDkimTokens(const Value: TList<string>);
function GetKeepDkimTokens: Boolean;
procedure SetKeepDkimTokens(const Value: Boolean);
function GetDkimVerificationStatus: TVerificationStatus;
procedure SetDkimVerificationStatus(const Value: TVerificationStatus);
strict protected
function Obj: TIdentityDkimAttributes;
public
constructor Create;
destructor Destroy; override;
function IsSetDkimEnabled: Boolean;
function IsSetDkimTokens: Boolean;
function IsSetDkimVerificationStatus: Boolean;
property DkimEnabled: Boolean read GetDkimEnabled write SetDkimEnabled;
property DkimTokens: TList<string> read GetDkimTokens write SetDkimTokens;
property KeepDkimTokens: Boolean read GetKeepDkimTokens write SetKeepDkimTokens;
property DkimVerificationStatus: TVerificationStatus read GetDkimVerificationStatus write SetDkimVerificationStatus;
end;
implementation
{ TIdentityDkimAttributes }
constructor TIdentityDkimAttributes.Create;
begin
inherited;
FDkimTokens := TList<string>.Create;
end;
destructor TIdentityDkimAttributes.Destroy;
begin
DkimTokens := nil;
inherited;
end;
function TIdentityDkimAttributes.Obj: TIdentityDkimAttributes;
begin
Result := Self;
end;
function TIdentityDkimAttributes.GetDkimEnabled: Boolean;
begin
Result := FDkimEnabled.ValueOrDefault;
end;
procedure TIdentityDkimAttributes.SetDkimEnabled(const Value: Boolean);
begin
FDkimEnabled := Value;
end;
function TIdentityDkimAttributes.IsSetDkimEnabled: Boolean;
begin
Result := FDkimEnabled.HasValue;
end;
function TIdentityDkimAttributes.GetDkimTokens: TList<string>;
begin
Result := FDkimTokens;
end;
procedure TIdentityDkimAttributes.SetDkimTokens(const Value: TList<string>);
begin
if FDkimTokens <> Value then
begin
if not KeepDkimTokens then
FDkimTokens.Free;
FDkimTokens := Value;
end;
end;
function TIdentityDkimAttributes.GetKeepDkimTokens: Boolean;
begin
Result := FKeepDkimTokens;
end;
procedure TIdentityDkimAttributes.SetKeepDkimTokens(const Value: Boolean);
begin
FKeepDkimTokens := Value;
end;
function TIdentityDkimAttributes.IsSetDkimTokens: Boolean;
begin
Result := (FDkimTokens <> nil) and (FDkimTokens.Count > 0);
end;
function TIdentityDkimAttributes.GetDkimVerificationStatus: TVerificationStatus;
begin
Result := FDkimVerificationStatus.ValueOrDefault;
end;
procedure TIdentityDkimAttributes.SetDkimVerificationStatus(const Value: TVerificationStatus);
begin
FDkimVerificationStatus := Value;
end;
function TIdentityDkimAttributes.IsSetDkimVerificationStatus: Boolean;
begin
Result := FDkimVerificationStatus.HasValue;
end;
end.
| 29.528169 | 120 | 0.802767 |
6ae9a5dbf4d3b592e7bf636f6f9a61aa7ee77976
| 4,647 |
pas
|
Pascal
|
VCL/MorseKey.pas
|
n2ic/MorseRunner
|
0f9b9b5175a1bd7e2a32aeed4d61b4fe71bd982b
|
[
"OLDAP-2.3"
] | 1 |
2020-10-14T06:48:03.000Z
|
2020-10-14T06:48:03.000Z
|
VCL/MorseKey.pas
|
n2ic/MorseRunner
|
0f9b9b5175a1bd7e2a32aeed4d61b4fe71bd982b
|
[
"OLDAP-2.3"
] | null | null | null |
VCL/MorseKey.pas
|
n2ic/MorseRunner
|
0f9b9b5175a1bd7e2a32aeed4d61b4fe71bd982b
|
[
"OLDAP-2.3"
] | 1 |
2018-10-25T21:19:24.000Z
|
2018-10-25T21:19:24.000Z
|
//------------------------------------------------------------------------------
//This Source Code Form is subject to the terms of the Mozilla Public
//License, v. 2.0. If a copy of the MPL was not distributed with this
//file, You can obtain one at http://mozilla.org/MPL/2.0/.
//------------------------------------------------------------------------------
unit MorseKey;
{$MODE Delphi}
interface
uses
SysUtils, Classes, SndTypes, MorseTbl, Math, Ini, Logerrorx;
type
TKeyer = class
private
Morse: array[Char] of string;
RampLen: integer;
RampOn, RampOff: TSingleArray;
FRiseTime: Single;
function GetEnvelope: TSingleArray;
procedure LoadMorseTable;
procedure MakeRamp;
function BlackmanHarrisKernel(x: Single): Single;
function BlackmanHarrisStepResponse(Len: integer): TSingleArray;
procedure SetRiseTime(const Value: Single);
public
Wpm: integer;
BufSize: integer;
Rate: integer;
MorseMsg: string;
TrueEnvelopeLen: integer;
constructor Create;
function Encode(Txt: string): string;
property RiseTime: Single read FRiseTime write SetRiseTime;
property Envelope: TSingleArray read GetEnvelope;
end;
procedure MakeKeyer;
procedure DestroyKeyer;
var
Keyer: TKeyer;
implementation
procedure MakeKeyer;
begin
Keyer := TKeyer.Create;
end;
procedure DestroyKeyer;
begin
Keyer.Free;
end;
{ TKeyer }
constructor TKeyer.Create;
begin
LoadMorseTable;
Rate := 11025;
RiseTime := 0.005;
end;
procedure TKeyer.SetRiseTime(const Value: Single);
begin
FRiseTime := Value;
MakeRamp;
end;
procedure TKeyer.LoadMorseTable;
var
i: integer;
S: string;
Ch: Char;
begin
for i:=0 to High(MorseTable) do
begin
S := MorseTable[i];
if S[2] <> '[' then Continue;
Ch := S[1];
Morse[Ch] := Copy(S, 3, Pos(']', S)-3) + ' ';
end;
end;
function TKeyer.BlackmanHarrisKernel(x: Single): Single;
const
a0 = 0.35875; a1 = 0.48829; a2 = 0.14128; a3 = 0.01168;
begin
Result := a0 - a1*Cos(2*Pi*x) + a2*Cos(4*Pi*x) - a3*Cos(6*Pi*x);
end;
function TKeyer.BlackmanHarrisStepResponse(Len: integer): TSingleArray;
var
i: integer;
Scale: Single;
begin
SetLength(Result, Len);
//generate kernel
for i:=0 to High(Result) do Result[i] := BlackmanHarrisKernel(i/Len);
//integrate
for i:=1 to High(Result) do Result[i] := Result[i-1] + Result[i];
//normalize
Scale := 1 / Result[High(Result)];
for i:=0 to High(Result) do Result[i] := Result[i] * Scale;
end;
procedure TKeyer.MakeRamp;
var
i: integer;
begin
RampLen := Round(2.7 * FRiseTime * Rate);
RampOn := BlackmanHarrisStepResponse(RampLen);
SetLength(RampOff, RampLen);
for i:=0 to RampLen-1 do RampOff[High(RampOff)-i] := RampOn[i];
end;
function TKeyer.Encode(Txt: string): string;
var
i: integer;
begin
Result := '';
for i:=1 to Length(Txt) do
if Txt[i] in [' ', '_']
then Result := Result + ' '
else Result := Result + Morse[Txt[i]];
if Result <> '' then Result[Length(Result)] := '~';
end;
function TKeyer.GetEnvelope: TSingleArray;
var
UnitCnt, Len, i, p: integer;
SamplesInUnit: integer;
procedure AddRampOn;
begin
Move(RampOn[0], Result[p], RampLen * SizeOf(Single));
Inc(p, Length(RampOn));
end;
procedure AddRampOff;
begin
Move(RampOff[0], Result[p], RampLen * SizeOf(Single));
Inc(p, Length(RampOff));
end;
procedure AddOn(Dur: integer);
var
i: integer;
begin
for i:=0 to Dur * SamplesInUnit - RampLen - 1 do Result[p+i] := 1;
Inc(p, Dur * SamplesInUnit - RampLen);
end;
procedure AddOff(Dur: integer);
begin
Inc(p, Dur * SamplesInUnit - RampLen);
end;
begin
//logerror('in Tkeyer.GetEnvelope');
//count units
UnitCnt := 0;
for i:=1 to Length(MorseMsg) do
case MorseMsg[i] of
'.': Inc(UnitCnt, 2);
'-': Inc(UnitCnt, 4);
' ': Inc(UnitCnt, 2);
'~': Inc(UnitCnt, 1);
end;
//calc buffer size
SamplesInUnit := Round(0.1 * Rate * 12 / Wpm);
TrueEnvelopeLen := UnitCnt * SamplesInUnit + RampLen;
Len := BufSize * Ceil(TrueEnvelopeLen / BufSize);
Result := nil;
SetLength(Result, Len);
//fill buffer
p := 0;
for i:=1 to Length(MorseMsg) do
case MorseMsg[i] of
'.': begin AddRampOn; AddOn(1); AddRampOff; AddOff(1); end;
'-': begin AddRampOn; AddOn(3); AddRampOff; AddOff(1); end;
' ': AddOff(2);
'~': AddOff(1);
end;
end;
end.
| 21.919811 | 81 | 0.598881 |
6a03eb435f6b25318f071e21638a4e76ebbe9bd8
| 22,559 |
pas
|
Pascal
|
LuaBind.pas
|
danieleteti/lua4delphi
|
976a938e8042946e80850b5d996c5986196630f1
|
[
"Apache-2.0"
] | 27 |
2016-02-28T00:33:02.000Z
|
2022-02-06T11:18:48.000Z
|
LuaBind.pas
|
AngusPasc/lua4delphi
|
976a938e8042946e80850b5d996c5986196630f1
|
[
"Apache-2.0"
] | null | null | null |
LuaBind.pas
|
AngusPasc/lua4delphi
|
976a938e8042946e80850b5d996c5986196630f1
|
[
"Apache-2.0"
] | 9 |
2016-07-13T16:48:15.000Z
|
2021-11-22T08:35:25.000Z
|
{$WARNINGS OFF}
unit LuaBind;
interface
uses LuaBind.Intf,
System.Classes,
System.SysUtils,
System.Rtti,
System.Generics.Collections;
type
ELuaException = class(Exception)
end;
ELuaRuntimeException = class(ELuaException)
end;
ELuaConstructorException = class(ELuaException)
end;
ELuaSyntaxError = class(ELuaException)
end;
ELuaFilterException = class(ELuaSyntaxError)
end;
ILuaValue = interface
['{8621BAD3-B847-4176-937F-2CD016BBE13E}']
/// ///
function IsNil: boolean;
function IsNumber: boolean;
function IsInteger: boolean;
function IsString: boolean;
function IsBoolean: boolean;
function IsLightUserData: boolean;
/// ///
function GetAsNumber: Double;
function GetAsInteger: Integer;
function GetAsString: AnsiString;
function GetAsBoolean: boolean;
function GetAsLightUserData: Pointer;
end;
TLuaValueType = (lvtNil, lvtNumber, lvtInteger, lvtString, lvtBoolean,
lvtLightUserData, lvtTable, lvtFunction, lvtUserData, lvtThread);
TLuaValue = class(TInterfacedObject, ILuaValue)
strict private
FLuaValueType: TLuaValueType;
strict private
protected
/// ///
function IsNil: boolean;
function IsNumber: boolean;
function IsInteger: boolean;
function IsString: boolean;
function IsBoolean: boolean;
function IsLightUserData: boolean;
/// ///
function GetAsNumber: Double;
function GetAsInteger: Integer;
function GetAsString: AnsiString;
function GetAsBoolean: boolean;
function GetAsLightUserData: Pointer;
private
procedure CheckType(LuaValueType: TLuaValueType);
protected
FValue: TValue;
constructor Create(LuaState: Plua_State; StackIndex: Integer);
public
class function GetAsLuaTable(LuaState: Plua_State;
StackIndex: Integer): TValue;
class function GetLuaValueType(LuaState: Plua_State; StackIndex: Integer)
: TLuaValueType;
class function GetTValueFromLuaValueType(LuaValueType: TLuaValueType;
LuaState: Plua_State; StackIndex: Integer): TValue; static;
class function PopTValueFromStack(LuaState: Plua_State): TValue; static;
end;
ILuaLibraryLoader = interface;
TLuaEngine = class
strict private
procedure CheckLuaError(const r: Integer);
private
procedure InternalDeclareTable(AObject: TObject);
protected
LState: Plua_State;
procedure InitLua;
procedure CloseLua;
public
constructor Create; overload; virtual;
constructor Create(const AScript: string); overload; virtual;
destructor Destroy; override;
function GetRawLuaState: Plua_State;
procedure Reset;
procedure LoadScript(const AScript: AnsiString); overload;
procedure LoadScript(const AStream: TStream;
AOwnStream: boolean = true); overload;
procedure LoadFromFile(const AFileName: AnsiString);
procedure Execute;
procedure ExecuteFile(const AFileName: AnsiString);
procedure ExecuteScript(const AScript: AnsiString);
// PUSH methods for simple types
function DeclareGlobalNil(AName: AnsiString): TLuaEngine;
function DeclareGlobalNumber(AName: AnsiString; AValue: Double): TLuaEngine;
function DeclareGlobalInteger(AName: AnsiString; AValue: Integer)
: TLuaEngine;
function DeclareGlobalString(AName: AnsiString; AValue: AnsiString)
: TLuaEngine;
function DeclareGlobalBoolean(AName: AnsiString; AValue: boolean)
: TLuaEngine;
function DeclareGlobalLightUserData(AName: AnsiString; AValue: Pointer)
: TLuaEngine;
function DeclareGlobalUserData(AName: AnsiString; AValue: Pointer)
: TLuaEngine;
// PUSH complex types
function DeclareGlobalFunction(AName: AnsiString; AFunction: lua_CFunction)
: TLuaEngine;
function DeclareGlobalDelphiObjectAsTable(AObject: TObject;
AVariableName: string): TLuaEngine;
// Helpers to PUSH specific types coping properties or data into Lua tables
function DeclareTable(const ATableName: AnsiString; AKeys: array of string;
AValues: array of string): TLuaEngine; overload;
function DeclareTable(const ATableName: AnsiString; AKeys: array of Integer;
AValues: array of string): TLuaEngine; overload;
function DeclareTable(const ATableName: AnsiString;
ADictionary: TDictionary<TValue, TValue>): TLuaEngine; overload;
function DeclareTable(const ATableName: AnsiString;
ADictionary: TDictionary<string, string>): TLuaEngine; overload;
function DeclareTable(const ATableName: AnsiString; AObject: TObject)
: TLuaEngine; overload;
function DeclareTable(const ATableName: AnsiString; __self: Pointer;
AFunctions: TDictionary<string, lua_CFunction>): TLuaEngine; overload;
// GET methods for simple types
function GetGlobal(AName: AnsiString): ILuaValue;
// External load libraries
procedure LoadExternalLibraries(ALuaLibraryLoader: ILuaLibraryLoader);
// function
function ExecuteFunction(FunctionName: AnsiString;
const Params: array of TValue): TValue;
// helpers
class function ExecuteWithResult(AScript: AnsiString;
const ParamNames: array of string;
const ParamValues: array of string): string;
end;
ILuaLibraryLoader = interface
['{46A7894C-DDA8-4E15-95EB-B52463341FF1}']
procedure Execute(ALuaEngine: TLuaEngine);
end;
TLuaUtils = class sealed
public
class procedure PushTValue(L: Plua_State; Value: TValue); static;
end;
implementation
uses
typinfo,
LuaBind.DelphiObjects;
function internal_call_method(LState: Plua_State): Integer; cdecl;
begin
// raise Exception.Create('Error Message');
lua_pop(LState, 1);
lua_pop(LState, 1);
lua_pushcfunction(LState, @_delphi_call_method);
Result := 1;
// Result := lua_gettop(LState);
// for I := 1 to Result do
// begin
// v := TLuaValue.PopTValueFromStack(LState);
// end
// // Result := _delphi_call_method(LState)
end;
class procedure TLuaUtils.PushTValue(L: Plua_State; Value: TValue);
var
utf8s: RawByteString;
begin
case Value.Kind of
tkUnknown, tkChar, tkSet, tkMethod, tkVariant, tkArray, tkProcedure,
tkRecord, tkInterface, tkDynArray, tkClassRef:
begin
lua_pushnil(L);
// raise Exception.Create('Unsupported return type: ' + Value.ToString);
end;
tkInteger:
lua_pushinteger(L, Value.AsInteger);
tkEnumeration:
begin
if Value.IsType<boolean> then
begin
if Value.AsBoolean then
lua_pushboolean(L, 1)
else
lua_pushboolean(L, 0);
end
else
lua_pushinteger(L, Value.AsInteger);
end;
tkFloat:
lua_pushnumber(L, Value.AsExtended);
tkString, tkWChar, tkLString, tkWString, tkUString:
begin
utf8s := UTF8Encode(Value.AsString);
lua_pushstring(L, PAnsiChar(utf8s));
end;
tkClass:
lua_pushlightuserdata(L, Pointer(Value.AsObject));
tkInt64:
lua_pushnumber(L, Value.AsInt64);
tkPointer:
lua_pushlightuserdata(L, Pointer(Value.AsObject));
end;
end;
{ TLuaEngine }
constructor TLuaEngine.Create;
begin
inherited Create;
InitLua;
end;
procedure TLuaEngine.CloseLua;
begin
lua_close(LState);
end;
constructor TLuaEngine.Create(const AScript: string);
begin
Create;
LoadScript(AScript);
end;
function TLuaEngine.DeclareGlobalBoolean(AName: AnsiString; AValue: boolean)
: TLuaEngine;
var
b: Integer;
begin
if AValue then
b := 1
else
b := 0;
lua_pushboolean(LState, b);
lua_setglobal(LState, PAnsiChar(AName));
Result := Self;
end;
function TLuaEngine.DeclareGlobalDelphiObjectAsTable(AObject: TObject;
AVariableName: string): TLuaEngine;
begin
// lua_createtable(L, 0, 0);
// lua_createtable(L, 0, 1);
assert(lua_isnil(LState, -1));
lua_newtable(LState);
assert(lua_istable(LState, -1));
lua_newtable(LState);
lua_pushcfunction(LState, @internal_call_method);
lua_setfield(LState, -2, '__index');
lua_setmetatable(LState, -2);
lua_setglobal(LState, PAnsiChar(AnsiString(AVariableName)));
// http://stackoverflow.com/questions/3449759/lua-c-api-and-metatable-functions
// lua_newtable(LState);
// lua_pushstring(LState, PAnsiChar('__handle__'));
// lua_pushlightuserdata(LState, Pointer(AObject));
// lua_settable(LState, - 3);
// {
// for prop in ctx.GetType(AObject.ClassInfo).GetProperties do
// begin
// v := prop.GetValue(AObject);
// if v.Kind = tkUnknown then
// continue;
// k := prop.Name;
// TLuaUtils.PushTValue(LState, k);
// TLuaUtils.PushTValue(LState, v);
// lua_settable(LState, - 3);
// end;
//
// for method in ctx.GetType(AObject.ClassInfo).GetMethods
// begin
// if not (method.Visibility in [mvPublic, mvPublished]) then
// continue;
// k := method.Name;
// TLuaUtils.PushTValue(LState, k);
// lua_pushcfunction(LState, @internal_call_method);
// lua_settable(LState, - 3);
// end;
// }
//
// lua_setglobal(LState, PAnsiChar(AnsiString(AVariableName)));
//
// // define metatable
// // lua_createtable(LState, 0, 0);
// lua_createtable(LState, 0, 1);
// lua_pushcfunction(LState, @internal_call_method);
// lua_setfield(LState, - 2, AnsiString('__index'));
// lua_setmetatable(LState, - 2);
// lua_setglobal(LState, PAnsiChar(AnsiString(AVariableName)));
end;
function TLuaEngine.DeclareGlobalFunction(AName: AnsiString;
AFunction: lua_CFunction): TLuaEngine;
begin
lua_pushcfunction(LState, AFunction);
lua_setglobal(LState, PAnsiChar(AName));
Result := Self;
end;
function TLuaEngine.DeclareGlobalInteger(AName: AnsiString; AValue: Integer)
: TLuaEngine;
begin
lua_pushinteger(LState, AValue);
lua_setglobal(LState, PAnsiChar(AName));
Result := Self;
end;
function TLuaEngine.DeclareGlobalLightUserData(AName: AnsiString;
AValue: Pointer): TLuaEngine;
begin
lua_pushlightuserdata(LState, AValue);
lua_setglobal(LState, PAnsiChar(AName));
Result := Self;
end;
function TLuaEngine.DeclareGlobalNil(AName: AnsiString): TLuaEngine;
begin
lua_pushnil(LState);
lua_setglobal(LState, PAnsiChar(AName));
Result := Self;
end;
function TLuaEngine.DeclareGlobalNumber(AName: AnsiString; AValue: Double)
: TLuaEngine;
begin
lua_pushnumber(LState, AValue);
lua_setglobal(LState, PAnsiChar(AName));
Result := Self;
end;
function TLuaEngine.DeclareGlobalString(AName: AnsiString; AValue: AnsiString)
: TLuaEngine;
begin
lua_pushstring(LState, PAnsiChar(AValue));
lua_setglobal(LState, PAnsiChar(AName));
Result := Self;
end;
function TLuaEngine.DeclareGlobalUserData(AName: AnsiString; AValue: Pointer)
: TLuaEngine;
begin
raise ELuaException.Create('Not implemented');
Result := Self;
end;
function TLuaEngine.DeclareTable(const ATableName: AnsiString;
AKeys: array of Integer; AValues: array of string): TLuaEngine;
var
I: Integer;
k: Integer;
v: string;
begin
lua_newtable(LState);
for I := 0 to high(AKeys) do
begin
k := AKeys[I];
v := AValues[I];
TLuaUtils.PushTValue(LState, k);
TLuaUtils.PushTValue(LState, v);
lua_settable(LState, -3);
end;
lua_setglobal(LState, PAnsiChar(ATableName));
Result := Self;
end;
function TLuaEngine.DeclareTable(const ATableName: AnsiString;
ADictionary: TDictionary<TValue, TValue>): TLuaEngine;
var
key: TValue;
begin
lua_newtable(LState);
for key in ADictionary.Keys do
begin
TLuaUtils.PushTValue(LState, key);
TLuaUtils.PushTValue(LState, ADictionary.Items[key]);
lua_settable(LState, -3);
end;
lua_setglobal(LState, PAnsiChar(ATableName));
Result := Self;
end;
function TLuaEngine.DeclareTable(const ATableName: AnsiString;
ADictionary: TDictionary<string, string>): TLuaEngine;
var
key: string;
begin
lua_newtable(LState);
for key in ADictionary.Keys do
begin
TLuaUtils.PushTValue(LState, key);
TLuaUtils.PushTValue(LState, ADictionary.Items[key]);
lua_settable(LState, -3);
end;
lua_setglobal(LState, PAnsiChar(ATableName));
end;
function TLuaEngine.DeclareTable(const ATableName: AnsiString;
AKeys: array of string; AValues: array of string): TLuaEngine;
var
I: Integer;
k: string;
v: string;
begin
lua_newtable(LState);
for I := 0 to high(AKeys) do
begin
k := AKeys[I];
v := AValues[I];
TLuaUtils.PushTValue(LState, k);
TLuaUtils.PushTValue(LState, v);
lua_settable(LState, -3);
end;
lua_setglobal(LState, PAnsiChar(ATableName));
end;
destructor TLuaEngine.Destroy;
begin
CloseLua;
inherited;
end;
procedure TLuaEngine.Execute;
var
r: Integer;
begin
r := lua_pcall(LState, 0, 0, 0);
CheckLuaError(r);
end;
procedure TLuaEngine.CheckLuaError(const r: Integer);
var
err: PAnsiChar;
begin
case r of
// success
0:
begin
end;
// a runtime error.
LUA_ERRRUN:
begin
err := lua_tostring(LState, -1);
lua_pop(LState, 1);
raise ELuaRuntimeException.CreateFmt('Runtime error [%s]', [err]);
end;
// memory allocation error. For such errors, Lua does not call the error handler function.
LUA_ERRMEM:
begin
err := lua_tostring(LState, -1);
lua_pop(LState, 1);
raise ELuaException.CreateFmt('Memory allocation error [%s]', [err]);
end;
// error while running the error handler function.
LUA_ERRERR:
begin
err := lua_tostring(LState, -1);
lua_pop(LState, 1);
raise ELuaException.CreateFmt
('Error while running the error handler function [%s]', [err]);
end;
LUA_ERRSYNTAX:
begin
err := lua_tostring(LState, -1);
lua_pop(LState, 1);
raise ELuaSyntaxError.CreateFmt('Syntax Error [%s]', [err]);
end
else
begin
err := lua_tostring(LState, -1);
lua_pop(LState, 1);
raise ELuaException.CreateFmt('Unknown Error [%s]', [err]);
end;
end;
end;
procedure TLuaEngine.ExecuteFile(const AFileName: AnsiString);
begin
LoadFromFile(AFileName);
Execute;
end;
function TLuaEngine.ExecuteFunction(FunctionName: AnsiString;
const Params: array of TValue): TValue;
var
p: TValue;
r: Integer;
begin
lua_getglobal(LState, PAnsiChar(FunctionName));
for p in Params do
TLuaUtils.PushTValue(LState, p);
r := lua_pcall(LState, Length(Params), 1, 0);
CheckLuaError(r);
Result := TLuaValue.PopTValueFromStack(LState);
end;
function TLuaEngine.GetGlobal(AName: AnsiString): ILuaValue;
begin
lua_getglobal(LState, PAnsiChar(AName));
Result := TLuaValue.Create(LState, -1);
end;
function TLuaEngine.GetRawLuaState: Plua_State;
begin
Result := LState;
end;
procedure TLuaEngine.InitLua;
begin
LState := lua_open;
if not assigned(LState) then
raise ELuaException.Create('Cannot initialize Lua');
luaL_openlibs(LState);
end;
procedure TLuaEngine.LoadExternalLibraries(ALuaLibraryLoader
: ILuaLibraryLoader);
begin
ALuaLibraryLoader.Execute(Self);
end;
procedure TLuaEngine.LoadFromFile(const AFileName: AnsiString);
var
err: PAnsiChar;
begin
if luaL_loadfile(LState, PAnsiChar(AFileName)) <> 0 then
begin
err := lua_tostring(LState, -1);
lua_pop(LState, 1);
raise ELuaException.Create(err);
end;
end;
procedure TLuaEngine.LoadScript(const AStream: TStream; AOwnStream: boolean);
var
sr: TStreamReader;
s: string;
begin
sr := TStreamReader.Create(AStream);
try
if AOwnStream then
sr.OwnStream;
s := sr.ReadToEnd;
LoadScript(s);
finally
sr.Free;
end;
end;
procedure TLuaEngine.Reset;
begin
CloseLua;
InitLua;
end;
procedure TLuaEngine.ExecuteScript(const AScript: AnsiString);
var
err: PAnsiChar;
begin
if luaL_dostring(LState, PAnsiChar(AScript)) then
begin
err := lua_tostring(LState, -1);
lua_pop(LState, 1);
raise ELuaException.Create(err);
end;
end;
class function TLuaEngine.ExecuteWithResult(AScript: AnsiString;
const ParamNames, ParamValues: array of string): string;
var
L: TLuaEngine;
I: Integer;
begin
L := TLuaEngine.Create;
try
L.LoadScript(AScript);
if Length(ParamNames) <> Length(ParamValues) then
raise ELuaRuntimeException.Create
('Number of params names and param values is not equals');
for I := 0 to Length(ParamNames) - 1 do
L.DeclareGlobalString(ParamNames[I], ParamValues[I]);
L.Execute;
finally
L.Free;
end;
end;
procedure TLuaEngine.LoadScript(const AScript: AnsiString);
var
err: PAnsiChar;
begin
if luaL_loadstring(LState, PAnsiChar(AScript)) <> 0 then
begin
err := lua_tostring(LState, -1);
lua_pop(LState, 1);
raise ELuaException.Create(err);
end;
end;
procedure TLuaEngine.InternalDeclareTable(AObject: TObject);
var
prop: TRTTIProperty;
ctx: TRTTIContext;
properties: TArray<TRTTIProperty>;
k: AnsiString;
Value: TValue;
o: TObject;
begin
ctx := TRTTIContext.Create;
try
lua_newtable(LState);
properties := ctx.GetType(AObject.ClassType).GetProperties;
for prop in properties do
begin
if not(prop.Visibility in [mvPublic, mvPublished]) then
continue;
k := prop.Name;
TLuaUtils.PushTValue(LState, k);
Value := prop.GetValue(AObject);
if Value.TypeInfo^.Kind = tkClass then
begin
o := Value.AsObject;
if not assigned(o) then
lua_pushnil(LState)
else
InternalDeclareTable(Value.AsObject);
end
else
begin
if Value.Kind = tkEnumeration then
begin
Value := prop.GetValue(AObject).AsOrdinal;
end;
TLuaUtils.PushTValue(LState, Value)
end;
lua_settable(LState, -3);
end;
finally
ctx.Free;
end;
end;
function TLuaEngine.DeclareTable(const ATableName: AnsiString; AObject: TObject)
: TLuaEngine;
begin
InternalDeclareTable(AObject);
lua_setglobal(LState, PAnsiChar(ATableName));
end;
function TLuaEngine.DeclareTable(const ATableName: AnsiString; __self: Pointer;
AFunctions: TDictionary<string, lua_CFunction>): TLuaEngine;
var
key: string;
begin
lua_newtable(LState);
TLuaUtils.PushTValue(LState, '__self');
lua_pushlightuserdata(LState, __self);
lua_settable(LState, -3);
for key in AFunctions.Keys do
begin
TLuaUtils.PushTValue(LState, key);
lua_pushcfunction(LState, AFunctions[key]);
lua_settable(LState, -3);
end;
lua_setglobal(LState, PAnsiChar(ATableName));
end;
{ TLuaValue }
class function TLuaValue.GetTValueFromLuaValueType(LuaValueType: TLuaValueType;
LuaState: Plua_State; StackIndex: Integer): TValue;
var
a: AnsiString;
begin
case LuaValueType of
lvtNil:
Result := nil;
lvtNumber:
Result := lua_tonumber(LuaState, StackIndex);
lvtInteger:
Result := lua_tointeger(LuaState, StackIndex);
lvtString:
begin
a := lua_tostring(LuaState, StackIndex);
Result := a;
end;
lvtBoolean:
Result := lua_toboolean(LuaState, StackIndex) = 1;
lvtLightUserData:
Result := TObject(lua_topointer(LuaState, StackIndex));
lvtTable:
begin
Result := GetAsLuaTable(LuaState, StackIndex);
end;
lvtFunction:
begin
raise ELuaException.Create('Not implemented');
// _lua_CFunction := lua_tocfunction(LuaState, StackIndex);
Result := nil; { todo }
end;
lvtUserData:
raise ELuaException.Create('UserData not allowed here');
lvtThread:
begin
raise ELuaException.Create('Not implemented');
// _pluastate := lua_tothread(LuaState, StackIndex);
Result := nil; { todo }
end;
end;
end;
constructor TLuaValue.Create(LuaState: Plua_State; StackIndex: Integer);
begin
inherited Create;
FLuaValueType := GetLuaValueType(LuaState, StackIndex);
FValue := GetTValueFromLuaValueType(FLuaValueType, LuaState, StackIndex);
end;
class function TLuaValue.GetLuaValueType(LuaState: Plua_State;
StackIndex: Integer): TLuaValueType;
begin
Result := lvtNil;
case lua_type(LuaState, StackIndex) of
lua_tnil:
Result := lvtNil;
LUA_TNUMBER:
Result := lvtNumber;
LUA_TBOOLEAN:
Result := lvtBoolean;
LUA_TSTRING:
Result := lvtString;
LUA_TTABLE:
Result := lvtTable;
LUA_TFUNCTION:
Result := lvtFunction;
LUA_TUSERDATA:
Result := lvtUserData;
LUA_TTHREAD:
Result := lvtThread;
LUA_TLIGHTUSERDATA:
Result := lvtLightUserData;
LUA_TNONE:
raise ELuaException.Create('Invalid stack index location');
end;
end;
procedure TLuaValue.CheckType(LuaValueType: TLuaValueType);
begin
if FLuaValueType <> LuaValueType then
raise ELuaException.Create('Cannot access value as ' +
GetEnumName(TypeInfo(TLuaValueType), Ord(LuaValueType)) + ' while it is '
+ GetEnumName(TypeInfo(TLuaValueType), Ord(FLuaValueType)));
end;
function TLuaValue.GetAsBoolean: boolean;
begin
CheckType(lvtBoolean);
Result := FValue.AsBoolean;
end;
function TLuaValue.GetAsInteger: Integer;
begin
Result := 0;
if Self.FLuaValueType = lvtNumber then
begin
if GetAsNumber = Trunc(GetAsNumber) then
Result := Trunc(GetAsNumber)
else
CheckType(lvtInteger);
end
else
begin
CheckType(lvtInteger);
Result := FValue.AsInteger;
end;
end;
function TLuaValue.GetAsLightUserData: Pointer;
begin
CheckType(lvtLightUserData);
Result := Pointer(FValue.AsObject);
end;
class function TLuaValue.GetAsLuaTable(LuaState: Plua_State;
StackIndex: Integer): TValue;
begin
raise ELuaException.Create('Not implemented');
end;
function TLuaValue.GetAsNumber: Double;
begin
CheckType(lvtNumber);
Result := FValue.AsExtended;
end;
function TLuaValue.GetAsString: AnsiString;
begin
CheckType(lvtString);
Result := FValue.AsString;
end;
function TLuaValue.IsBoolean: boolean;
begin
Result := FLuaValueType = lvtBoolean;
end;
function TLuaValue.IsInteger: boolean;
begin
Result := FLuaValueType = lvtInteger;
end;
function TLuaValue.IsLightUserData: boolean;
begin
Result := FLuaValueType = lvtLightUserData;
end;
function TLuaValue.IsNil: boolean;
begin
Result := FLuaValueType = lvtNil;
end;
function TLuaValue.IsNumber: boolean;
begin
Result := FLuaValueType = lvtNumber;
end;
function TLuaValue.IsString: boolean;
begin
Result := FLuaValueType = lvtString;
end;
class function TLuaValue.PopTValueFromStack(LuaState: Plua_State): TValue;
var
lvt: TLuaValueType;
begin
lvt := TLuaValue.GetLuaValueType(LuaState, -1);
Result := TLuaValue.GetTValueFromLuaValueType(lvt, LuaState, -1);
lua_pop(LuaState, 1);
end;
end.
| 25.347191 | 94 | 0.708675 |
855bf01ff5080710af292a7abdf87afc898c9a15
| 30,886 |
pas
|
Pascal
|
hedgewars/uVisualGearsHandlers.pas
|
chujoii/hw
|
707bdce7064665d6d89df0b59d7260510630428d
|
[
"Apache-2.0"
] | 1 |
2020-05-22T13:49:27.000Z
|
2020-05-22T13:49:27.000Z
|
hedgewars/uVisualGearsHandlers.pas
|
l29ah/hedgewars-cheats
|
111b6f926710db8bf40c53c5cb1ab875514aa24a
|
[
"Apache-2.0"
] | null | null | null |
hedgewars/uVisualGearsHandlers.pas
|
l29ah/hedgewars-cheats
|
111b6f926710db8bf40c53c5cb1ab875514aa24a
|
[
"Apache-2.0"
] | null | null | null |
(*
* Hedgewars, a free turn based strategy game
* Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*)
(*
* This file contains the step handlers for visual gears.
*
* Since the effects of visual gears do not affect the course of the game,
* no "synchronization" between players is required.
* => The usage of safe functions or data types (e.g. GetRandom() or hwFloat)
* is usually not necessary and therefore undesirable.
*)
{$INCLUDE "options.inc"}
unit uVisualGearsHandlers;
interface
uses uTypes, uGears;
var doStepVGHandlers: array[TVisualGearType] of TVGearStepProcedure;
procedure doStepFlake(Gear: PVisualGear; Steps: Longword);
procedure doStepBeeTrace(Gear: PVisualGear; Steps: Longword);
procedure doStepCloud(Gear: PVisualGear; Steps: Longword);
procedure doStepExpl(Gear: PVisualGear; Steps: Longword);
procedure doStepNote(Gear: PVisualGear; Steps: Longword);
procedure doStepLineTrail(Gear: PVisualGear; Steps: Longword);
procedure doStepEgg(Gear: PVisualGear; Steps: Longword);
procedure doStepFire(Gear: PVisualGear; Steps: Longword);
procedure doStepShell(Gear: PVisualGear; Steps: Longword);
procedure doStepSmallDamage(Gear: PVisualGear; Steps: Longword);
procedure doStepBubble(Gear: PVisualGear; Steps: Longword);
procedure doStepSteam(Gear: PVisualGear; Steps: Longword);
procedure doStepAmmo(Gear: PVisualGear; Steps: Longword);
procedure doStepSmoke(Gear: PVisualGear; Steps: Longword);
procedure doStepDust(Gear: PVisualGear; Steps: Longword);
procedure doStepSplash(Gear: PVisualGear; Steps: Longword);
procedure doStepDroplet(Gear: PVisualGear; Steps: Longword);
procedure doStepSmokeRing(Gear: PVisualGear; Steps: Longword);
procedure doStepFeather(Gear: PVisualGear; Steps: Longword);
procedure doStepTeamHealthSorterWork(Gear: PVisualGear; Steps: Longword);
procedure doStepTeamHealthSorter(Gear: PVisualGear; Steps: Longword);
procedure doStepSpeechBubbleWork(Gear: PVisualGear; Steps: Longword);
procedure doStepSpeechBubble(Gear: PVisualGear; Steps: Longword);
procedure doStepHealthTagWork(Gear: PVisualGear; Steps: Longword);
procedure doStepHealthTagWorkUnderWater(Gear: PVisualGear; Steps: Longword);
procedure doStepHealthTag(Gear: PVisualGear; Steps: Longword);
procedure doStepSmokeTrace(Gear: PVisualGear; Steps: Longword);
procedure doStepExplosionWork(Gear: PVisualGear; Steps: Longword);
procedure doStepExplosion(Gear: PVisualGear; Steps: Longword);
procedure doStepBigExplosionWork(Gear: PVisualGear; Steps: Longword);
procedure doStepBigExplosion(Gear: PVisualGear; Steps: Longword);
procedure doStepChunk(Gear: PVisualGear; Steps: Longword);
procedure doStepBulletHit(Gear: PVisualGear; Steps: Longword);
procedure doStepCircle(Gear: PVisualGear; Steps: Longword);
procedure doStepSmoothWindBar(Gear: PVisualGear; Steps: Longword);
procedure doStepStraightShot(Gear: PVisualGear; Steps: Longword);
function isSorterActive: boolean; inline;
procedure initModule;
implementation
uses uCollisions, uVariables, Math, uConsts, uVisualGearsList, uFloat, uSound, uRenderUtils, uWorld, uUtils;
procedure doStepFlake(Gear: PVisualGear; Steps: Longword);
var sign: real;
moved, rising, outside: boolean;
vfc, vft: LongWord;
spawnMargin: LongInt;
const
randMargin = 50;
begin
if SuddenDeathDmg then
begin
if (vobSDCount = 0) then exit;
end
else
if (vobCount = 0) then exit;
sign:= 1;
with Gear^ do
begin
X:= X + (cWindSpeedf * 400 + dX + tdX) * Steps * Gear^.Scale;
if SuddenDeathDmg then
begin
Y:= Y + (dY + tdY + cGravityf * vobSDFallSpeed) * Steps * Gear^.Scale;
vfc:= vobSDFramesCount;
vft:= vobSDFrameTicks;
end
else
begin
Y:= Y + (dY + tdY + cGravityf * vobFallSpeed) * Steps * Gear^.Scale;
vfc:= vobFramesCount;
vft:= vobFrameTicks;
end;
if vft > 0 then
begin
inc(FrameTicks, Steps);
if FrameTicks > vft then
begin
dec(FrameTicks, vft);
inc(Frame);
if Frame = vfc then
Frame:= 0
end;
end;
Angle:= Angle + dAngle * Steps;
if Angle > 360 then
Angle:= Angle - 360
else
if Angle < - 360 then
Angle:= Angle + 360;
if (round(X) >= cLeftScreenBorder)
and (round(X) <= cRightScreenBorder)
and (round(Y) - 250 <= LAND_HEIGHT)
and (Timer > 0) and (Timer-Steps > 0) then
begin
if tdX > 0 then
sign := 1
else
sign:= -1;
tdX:= tdX - 0.005*Steps*sign;
if ((sign < 0) and (tdX > 0)) or ((sign > 0) and (tdX < 0)) then
tdX:= 0;
if tdX > 0 then
sign := 1
else
sign:= -1;
tdY:= tdY - 0.005*Steps*sign;
if ((sign < 0) and (tdY > 0)) or ((sign > 0) and (tdY < 0)) then
tdY:= 0;
dec(Timer, Steps)
end
else
begin
moved:= false;
if round(X) < cLeftScreenBorder then
begin
X:= X + cScreenSpace;
moved:= true
end
else if round(X) > cRightScreenBorder then
begin
X:= X - cScreenSpace;
moved:= true
end;
// it's possible for flakes to move upwards
if SuddenDeathDmg then
rising:= (cGravityf * vobSDFallSpeed) < 0
else
rising:= (cGravityf * vobFallSpeed) < 0;
if gear^.layer = 2 then
spawnMargin:= 400
else
spawnMargin:= 200;
// flake fell far below map?
outside:= (not rising) and (round(Y) - spawnMargin + randMargin > LAND_HEIGHT);
// if not, did it rise far above map?
outside:= outside or (rising and (round(Y) < LAND_HEIGHT - 1024 - spawnMargin - randMargin));
// if flake left acceptable vertical area, respawn it opposite side
if outside then
begin
X:= cLeftScreenBorder + random(cScreenSpace);
if rising then
Y:= Y + (1024 + spawnMargin + random(50))
else
Y:= Y - (1024 + spawnMargin + random(50));
moved:= true;
end;
if moved then
begin
Angle:= random(360);
dx:= 0.0000038654705 * random(10000);
dy:= 0.000003506096 * random(7000);
if random(2) = 0 then dx := -dx
end;
Timer:= 0;
tdX:= 0;
tdY:= 0
end;
end;
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepBeeTrace(Gear: PVisualGear; Steps: Longword);
begin
if Gear^.FrameTicks > Steps then
dec(Gear^.FrameTicks, Steps)
else
DeleteVisualGear(Gear);
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepCloud(Gear: PVisualGear; Steps: Longword);
var s: Longword;
t: real;
begin
Gear^.X:= Gear^.X + (cWindSpeedf * 750 * Gear^.dX * Gear^.Scale) * Steps;
// up-and-down-bounce magic
s := (GameTicks + Gear^.Timer) mod 4096;
t := 8 * Gear^.Scale * hwFloat2Float(AngleSin(s mod 2048));
if (s < 2048) then t := -t;
Gear^.Y := LAND_HEIGHT - 1184 + LongInt(Gear^.Timer mod 8) + t;
if round(Gear^.X) < cLeftScreenBorder then
Gear^.X:= Gear^.X + cScreenSpace
else
if round(Gear^.X) > cRightScreenBorder then
Gear^.X:= Gear^.X - cScreenSpace
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepExpl(Gear: PVisualGear; Steps: Longword);
var s: LongInt;
begin
s:= min(Steps, cExplFrameTicks);
Gear^.X:= Gear^.X + Gear^.dX * s;
Gear^.Y:= Gear^.Y + Gear^.dY * s;
if Gear^.FrameTicks <= Steps then
if Gear^.Frame = 0 then
DeleteVisualGear(Gear)
else
begin
dec(Gear^.Frame);
Gear^.FrameTicks:= cExplFrameTicks
end
else dec(Gear^.FrameTicks, Steps)
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepNote(Gear: PVisualGear; Steps: Longword);
begin
Gear^.X:= Gear^.X + Gear^.dX * Steps;
Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
Gear^.dY:= Gear^.dY + cGravityf * Steps / 2;
Gear^.Angle:= Gear^.Angle + (Gear^.Frame + 1) * Steps / 10;
while Gear^.Angle > cMaxAngle do
Gear^.Angle:= Gear^.Angle - cMaxAngle;
if Gear^.FrameTicks <= Steps then
DeleteVisualGear(Gear)
else
dec(Gear^.FrameTicks, Steps)
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepLineTrail(Gear: PVisualGear; Steps: Longword);
begin
{$IFNDEF PAS2C}
Steps := Steps;
{$ENDIF}
if Gear^.Timer <= Steps then
DeleteVisualGear(Gear)
else
dec(Gear^.Timer, Steps)
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepEgg(Gear: PVisualGear; Steps: Longword);
begin
Gear^.X:= Gear^.X + Gear^.dX * Steps;
Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
Gear^.dY:= Gear^.dY + cGravityf * Steps;
Gear^.Angle:= round(Gear^.Angle + Steps) mod cMaxAngle;
if Gear^.FrameTicks <= Steps then
begin
DeleteVisualGear(Gear);
exit
end
else
dec(Gear^.FrameTicks, Steps);
if Gear^.FrameTicks < $FF then
Gear^.Tint:= (Gear^.Tint and $FFFFFF00) or Gear^.FrameTicks
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepFire(Gear: PVisualGear; Steps: Longword);
var vgt: PVisualGear;
begin
Gear^.X:= Gear^.X + Gear^.dX * Steps;
Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
if (Gear^.State and gstTmpFlag) = 0 then
begin
Gear^.dY:= Gear^.dY + cGravityf * Steps;
if ((GameTicks mod 200) < Steps + 1) then
begin
vgt:= AddVisualGear(round(Gear^.X), round(Gear^.Y), vgtFire);
if vgt <> nil then
begin
vgt^.dx:= 0;
vgt^.dy:= 0;
vgt^.State:= gstTmpFlag;
end;
end
end
else
inc(Steps, Steps);
if Gear^.FrameTicks <= Steps then
DeleteVisualGear(Gear)
else
dec(Gear^.FrameTicks, Steps)
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepShell(Gear: PVisualGear; Steps: Longword);
begin
Gear^.X:= Gear^.X + Gear^.dX * Steps;
Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
Gear^.dY:= Gear^.dY + cGravityf * Steps;
Gear^.Angle:= round(Gear^.Angle + Steps) mod cMaxAngle;
if Gear^.FrameTicks <= Steps then
DeleteVisualGear(Gear)
else
dec(Gear^.FrameTicks, Steps)
end;
procedure doStepSmallDamage(Gear: PVisualGear; Steps: Longword);
begin
Gear^.Y:= Gear^.Y - 0.02 * Steps;
if Gear^.FrameTicks <= Steps then
DeleteVisualGear(Gear)
else
dec(Gear^.FrameTicks, Steps)
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepBubble(Gear: PVisualGear; Steps: Longword);
begin
Gear^.X:= Gear^.X + Gear^.dX * Steps;
Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
Gear^.Y:= Gear^.Y - cDrownSpeedf * Steps;
Gear^.dX := Gear^.dX / (1.001 * Steps);
Gear^.dY := Gear^.dY / (1.001 * Steps);
if (Gear^.FrameTicks <= Steps) or (not CheckCoordInWater(round(Gear^.X), round(Gear^.Y))) then
DeleteVisualGear(Gear)
else
dec(Gear^.FrameTicks, Steps)
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepSteam(Gear: PVisualGear; Steps: Longword);
begin
if ((cWindSpeedf > 0) and ( leftX > Gear^.X))
or ((cWindSpeedf < 0) and (rightX < Gear^.X)) then
Gear^.X:= Gear^.X + (cWindSpeedf * 100 + Gear^.dX) * Steps;
Gear^.Y:= Gear^.Y - cDrownSpeedf * Steps;
if Gear^.FrameTicks <= Steps then
if Gear^.Frame = 0 then
DeleteVisualGear(Gear)
else
begin
if Random(2) = 0 then
dec(Gear^.Frame);
Gear^.FrameTicks:= cExplFrameTicks
end
else dec(Gear^.FrameTicks, Steps)
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepAmmo(Gear: PVisualGear; Steps: Longword);
begin
Gear^.Y:= Gear^.Y - cDrownSpeedf * Steps;
Gear^.scale:= Gear^.scale + 0.0025 * Steps;
Gear^.alpha:= Gear^.alpha - 0.0015 * Steps;
if Gear^.alpha < 0 then
DeleteVisualGear(Gear)
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepSmoke(Gear: PVisualGear; Steps: Longword);
begin
Gear^.X:= Gear^.X + (cWindSpeedf + Gear^.dX) * Steps;
Gear^.Y:= Gear^.Y - (cDrownSpeedf + Gear^.dY) * Steps;
Gear^.dX := Gear^.dX + (cWindSpeedf * 0.3 * Steps);
if Gear^.FrameTicks <= Steps then
if Gear^.Frame = 0 then
DeleteVisualGear(Gear)
else
begin
if Random(2) = 0 then
dec(Gear^.Frame);
Gear^.FrameTicks:= cExplFrameTicks
end
else dec(Gear^.FrameTicks, Steps)
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepDust(Gear: PVisualGear; Steps: Longword);
begin
Gear^.X:= Gear^.X + (cWindSpeedf + (cWindSpeedf * 0.03 * Steps) + Gear^.dX) * Steps;
Gear^.Y:= Gear^.Y - (Gear^.dY) * Steps;
Gear^.dX := Gear^.dX - (Gear^.dX * 0.005 * Steps);
Gear^.dY := Gear^.dY - (cDrownSpeedf * 0.001 * Steps);
if Gear^.FrameTicks <= Steps then
if Gear^.Frame = 0 then
DeleteVisualGear(Gear)
else
begin
dec(Gear^.Frame);
Gear^.FrameTicks:= cExplFrameTicks
end
else dec(Gear^.FrameTicks, Steps)
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepSplash(Gear: PVisualGear; Steps: Longword);
begin
if Gear^.FrameTicks <= Steps then
DeleteVisualGear(Gear)
else
dec(Gear^.FrameTicks, Steps);
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepDroplet(Gear: PVisualGear; Steps: Longword);
begin
Gear^.X:= Gear^.X + Gear^.dX * Steps;
Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
Gear^.dY:= Gear^.dY + cGravityf * Steps;
if CheckCoordInWater(round(Gear^.X), round(Gear^.Y)) then
begin
DeleteVisualGear(Gear);
PlaySound(TSound(ord(sndDroplet1) + Random(3)));
end;
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepSmokeRing(Gear: PVisualGear; Steps: Longword);
begin
inc(Gear^.Timer, Steps);
if Gear^.Timer >= Gear^.FrameTicks then
DeleteVisualGear(Gear)
else
begin
Gear^.scale := 1.25 * (-power(2, -10 * Int(Gear^.Timer)/Gear^.FrameTicks) + 1) + 0.4;
Gear^.alpha := 1 - power(Gear^.Timer / 350, 4);
if Gear^.alpha < 0 then
Gear^.alpha:= 0;
end;
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepFeather(Gear: PVisualGear; Steps: Longword);
begin
Gear^.X:= Gear^.X + Gear^.dX * Steps;
Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
Gear^.dY:= Gear^.dY + cGravityf * Steps;
Gear^.Angle:= round(Gear^.Angle + Steps) mod cMaxAngle;
if Gear^.FrameTicks <= Steps then
DeleteVisualGear(Gear)
else
dec(Gear^.FrameTicks, Steps)
end;
////////////////////////////////////////////////////////////////////////////////
const cSorterWorkTime = 640;
var thexchar: array[0..cMaxTeams] of
record
dy, ny, dw: LongInt;
team: PTeam;
SortFactor: QWord;
hdw: array[0..cMaxHHIndex] of LongInt;
end;
currsorter: PVisualGear = nil;
function isSorterActive: boolean; inline;
begin
isSorterActive:= currsorter <> nil
end;
procedure doStepTeamHealthSorterWork(Gear: PVisualGear; Steps: Longword);
var i, t, h: LongInt;
begin
if currsorter = Gear then
for t:= 1 to min(Steps, Gear^.Timer) do
begin
dec(Gear^.Timer);
if (Gear^.Timer and 15) = 0 then
for i:= 0 to Pred(TeamsCount) do
with thexchar[i] do
begin
{$WARNINGS OFF}
team^.DrawHealthY:= ny + dy * LongInt(Gear^.Timer) div cSorterWorkTime;
team^.TeamHealthBarHealth:= team^.TeamHealth + dw * LongInt(Gear^.Timer) div cSorterWorkTime;
for h:= 0 to cMaxHHIndex do
if (team^.Hedgehogs[h].Gear <> nil) then
team^.Hedgehogs[h].HealthBarHealth:= team^.Hedgehogs[h].Gear^.Health + hdw[h] * LongInt(Gear^.Timer) div cSorterWorkTime
else
team^.Hedgehogs[h].HealthBarHealth:= hdw[h] * LongInt(Gear^.Timer) div cSorterWorkTime;
{$WARNINGS ON}
end;
end;
if (Gear^.Timer = 0) or (currsorter <> Gear) then
begin
if currsorter = Gear then
currsorter:= nil;
DeleteVisualGear(Gear);
exit
end
end;
procedure doStepTeamHealthSorter(Gear: PVisualGear; Steps: Longword);
var i: Longword;
b, noHogs: boolean;
t, h: LongInt;
begin
{$IFNDEF PAS2C}
Steps:= Steps; // avoid compiler hint
{$ENDIF}
for t:= 0 to Pred(TeamsCount) do
with thexchar[t] do
begin
team:= TeamsArray[t];
dy:= team^.DrawHealthY;
dw:= team^.TeamHealthBarHealth - team^.TeamHealth;
if team^.TeamHealth > 0 then
begin
SortFactor:= team^.Clan^.ClanHealth;
SortFactor:= (SortFactor shl 3) + team^.Clan^.ClanIndex;
SortFactor:= (SortFactor shl 30) + team^.TeamHealth;
end
else
SortFactor:= 0;
for h:= 0 to cMaxHHIndex do
if (team^.Hedgehogs[h].Gear <> nil) then
hdw[h]:= team^.Hedgehogs[h].HealthBarHealth - team^.Hedgehogs[h].Gear^.Health
else
hdw[h]:= team^.Hedgehogs[h].HealthBarHealth;
end;
if TeamsCount > 1 then
repeat
b:= true;
for t:= 0 to TeamsCount - 2 do
if (thexchar[t].SortFactor > thexchar[Succ(t)].SortFactor) then
begin
thexchar[cMaxTeams]:= thexchar[t];
thexchar[t]:= thexchar[Succ(t)];
thexchar[Succ(t)]:= thexchar[cMaxTeams];
b:= false
end
until b;
t:= - 4;
for i:= 0 to Pred(TeamsCount) do
with thexchar[i] do
begin
noHogs:= true;
for h:= 0 to cMaxHHIndex do
// Check if all hogs are hidden
if team^.Hedgehogs[h].Gear <> nil then
noHogs:= false;
// Skip team bar if all hogs are dead or hidden
if (team^.TeamHealth > 0) and (noHogs = false) then
begin
dec(t, team^.Clan^.HealthTex^.h + 2);
ny:= t;
dy:= dy - ny
end;
end;
Gear^.Timer:= cSorterWorkTime;
Gear^.doStep:= @doStepTeamHealthSorterWork;
currsorter:= Gear;
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepSpeechBubbleWork(Gear: PVisualGear; Steps: Longword);
var realgear: PGear;
begin
if Gear^.Timer > Steps then dec(Gear^.Timer, Steps) else Gear^.Timer:= 0;
realgear:= nil;
if Gear^.Frame <> 0 then // use a non-hedgehog gear - a lua trick that hopefully won't be overused
begin
realgear:= GearByUID(Gear^.Frame);
if realgear <> nil then
begin
Gear^.X:= hwFloat2Float(realgear^.X) + (Gear^.Tex^.w div 2 - Gear^.Tag);
Gear^.Y:= hwFloat2Float(realgear^.Y) - (realgear^.Radius + Gear^.Tex^.h);
Gear^.Angle:= 1; // Mark speech bubble as ready for rendering
end
end
else if Gear^.Hedgehog^.Gear <> nil then
begin
Gear^.X:= hwFloat2Float(Gear^.Hedgehog^.Gear^.X) + (Gear^.Tex^.w div 2 - Gear^.Tag);
Gear^.Y:= hwFloat2Float(Gear^.Hedgehog^.Gear^.Y) - (cHHRadius + Gear^.Tex^.h);
Gear^.Angle:= 1; // Mark speech bubble as ready for rendering
end;
if (Gear^.Timer = 0) or ((realgear = nil) and (Gear^.Frame <> 0)) then
begin
if (Gear^.Hedgehog <> nil) and (Gear^.Hedgehog^.SpeechGear = Gear) then
Gear^.Hedgehog^.SpeechGear:= nil;
DeleteVisualGear(Gear)
end;
end;
procedure doStepSpeechBubble(Gear: PVisualGear; Steps: Longword);
var realgear: PGear;
begin
{$IFNDEF PAS2C}
Steps:= Steps; // avoid compiler hint
{$ENDIF}
if Gear^.Frame <> 0 then
realgear:= GearByUID(Gear^.FrameTicks)
else
begin
with Gear^.Hedgehog^ do
if SpeechGear <> nil then
SpeechGear^.Timer:= 0;
realgear:= Gear^.Hedgehog^.Gear;
Gear^.Hedgehog^.SpeechGear:= Gear;
end;
if realgear <> nil then
case Gear^.FrameTicks of
1: Gear^.Tag:= SpritesData[sprSpeechTail].Width-37+realgear^.Radius;
2: Gear^.Tag:= SpritesData[sprThoughtTail].Width-29+realgear^.Radius;
3: Gear^.Tag:= SpritesData[sprShoutTail].Width-19+realgear^.Radius;
end;
Gear^.Timer:= max(LongInt(Length(Gear^.Text)) * 150, 3000);
Gear^.Tex:= RenderSpeechBubbleTex(ansistring(Gear^.Text), Gear^.FrameTicks, fnt16);
Gear^.doStep:= @doStepSpeechBubbleWork;
Gear^.Y:= Gear^.Y - Gear^.Tex^.h
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepHealthTagWork(Gear: PVisualGear; Steps: Longword);
begin
if Steps > Gear^.Timer then
DeleteVisualGear(Gear)
else
begin
dec(Gear^.Timer, Steps);
Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
Gear^.X:= Gear^.X + Gear^.dX * Steps
end;
end;
procedure doStepHealthTagWorkUnderWater(Gear: PVisualGear; Steps: Longword);
begin
if round(Gear^.Y) - 10 < cWaterLine then
DeleteVisualGear(Gear)
else
begin
Gear^.X:= Gear^.X + Gear^.dX * Steps;
Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
end;
end;
procedure doStepHealthTag(Gear: PVisualGear; Steps: Longword);
var s: shortstring;
begin
s:= IntToStr(Gear^.State);
if Gear^.Hedgehog <> nil then
Gear^.Tex:= RenderStringTex(ansistring(s), Gear^.Hedgehog^.Team^.Clan^.Color, fnt16)
else
Gear^.Tex:= RenderStringTex(ansistring(s), cWhiteColor, fnt16);
Gear^.doStep:= @doStepHealthTagWork;
if (round(Gear^.Y) > cWaterLine) and (Gear^.Frame = 0) and (Gear^.FrameTicks = 0) then
Gear^.doStep:= @doStepHealthTagWorkUnderWater;
Gear^.Y:= Gear^.Y - Gear^.Tex^.h;
if Steps > 1 then
Gear^.doStep(Gear, Steps-1);
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepSmokeTrace(Gear: PVisualGear; Steps: Longword);
begin
inc(Gear^.Timer, Steps );
if Gear^.Timer > 64 then
begin
if Gear^.State = 0 then
begin
DeleteVisualGear(Gear);
exit;
end;
dec(Gear^.State, Gear^.Timer div 65);
Gear^.Timer:= Gear^.Timer mod 65;
end;
Gear^.dX:= Gear^.dX + cWindSpeedf * Steps;
Gear^.X:= Gear^.X + Gear^.dX;
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepExplosionWork(Gear: PVisualGear; Steps: Longword);
begin
inc(Gear^.Timer, Steps);
if Gear^.Timer > 75 then
begin
inc(Gear^.State, Gear^.Timer div 76);
Gear^.Timer:= Gear^.Timer mod 76;
if Gear^.State > 5 then
DeleteVisualGear(Gear);
end;
end;
procedure doStepExplosion(Gear: PVisualGear; Steps: Longword);
var i: LongWord;
gX,gY: LongInt;
vg: PVisualGear;
begin
gX:= round(Gear^.X);
gY:= round(Gear^.Y);
for i:= 0 to 31 do
begin
vg:= AddVisualGear(gX, gY, vgtFire);
if vg <> nil then
begin
vg^.State:= gstTmpFlag;
inc(vg^.FrameTicks, vg^.FrameTicks)
end
end;
for i:= 0 to 8 do AddVisualGear(gX, gY, vgtExplPart);
for i:= 0 to 8 do AddVisualGear(gX, gY, vgtExplPart2);
Gear^.doStep:= @doStepExplosionWork;
if Steps > 1 then
Gear^.doStep(Gear, Steps-1);
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepBigExplosionWork(Gear: PVisualGear; Steps: Longword);
var maxMovement: LongInt;
begin
inc(Gear^.Timer, Steps);
if (Gear^.Timer and 5) = 0 then
begin
maxMovement := max(1, 13 - ((Gear^.Timer * 15) div 250));
ShakeCamera(maxMovement);
end;
if Gear^.Timer > 250 then
DeleteVisualGear(Gear);
end;
procedure doStepBigExplosion(Gear: PVisualGear; Steps: Longword);
var i: LongWord;
gX,gY: LongInt;
vg: PVisualGear;
begin
//ScreenFade:= sfFromWhite;
//ScreenFadeValue:= round(60 * zoom * zoom);
//ScreenFadeSpeed:= 5;
gX:= round(Gear^.X);
gY:= round(Gear^.Y);
AddVisualGear(gX, gY, vgtSmokeRing);
for i:= 0 to 46 do
begin
vg:= AddVisualGear(gX, gY, vgtFire);
if vg <> nil then
begin
vg^.State:= gstTmpFlag;
inc(vg^.FrameTicks, vg^.FrameTicks)
end
end;
for i:= 0 to 15 do
AddVisualGear(gX, gY, vgtExplPart);
for i:= 0 to 15 do
AddVisualGear(gX, gY, vgtExplPart2);
Gear^.doStep:= @doStepBigExplosionWork;
if Steps > 1 then
Gear^.doStep(Gear, Steps-1);
{$IFNDEF PAS2C}
with mobileRecord do
if (performRumble <> nil) and (not fastUntilLag) then
performRumble(kSystemSoundID_Vibrate);
{$ENDIF}
end;
procedure doStepChunk(Gear: PVisualGear; Steps: Longword);
begin
Gear^.X:= Gear^.X + Gear^.dX * Steps;
Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
Gear^.dY:= Gear^.dY + cGravityf * Steps;
Gear^.Angle:= round(Gear^.Angle + Steps) mod cMaxAngle;
if CheckCoordInWater(round(Gear^.X), round(Gear^.Y)) then
begin
if ((cReducedQuality and rqPlainSplash) = 0) then
AddVisualGear(round(Gear^.X), round(Gear^.Y), vgtDroplet);
DeleteVisualGear(Gear);
end
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepBulletHit(Gear: PVisualGear; Steps: Longword);
begin
if Gear^.FrameTicks <= Steps then
DeleteVisualGear(Gear)
else
dec(Gear^.FrameTicks, Steps);
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepCircle(Gear: PVisualGear; Steps: Longword);
var tmp: LongInt;
i: LongWord;
begin
with Gear^ do
if Frame <> 0 then
for i:= 1 to Steps do
begin
inc(FrameTicks);
if (FrameTicks mod Frame) = 0 then
begin
tmp:= Gear^.Tint and $FF;
if tdY >= 0 then
inc(tmp)
else
dec(tmp);
if tmp < round(dX) then
tdY:= 1;
if tmp > round(dY) then
tdY:= -1;
if tmp > 255 then
tmp := 255;
if tmp < 0 then
tmp := 0;
Gear^.Tint:= (Gear^.Tint and $FFFFFF00) or Longword(tmp)
end
end
end;
////////////////////////////////////////////////////////////////////////////////
var
currwindbar: PVisualGear = nil;
procedure doStepSmoothWindBarWork(Gear: PVisualGear; Steps: Longword);
const maxWindBarWidth = 73;
begin
if currwindbar = Gear then
begin
inc(Gear^.Timer, Steps);
while Gear^.Timer >= 10 do
begin
dec(Gear^.Timer, 10);
if WindBarWidth < Gear^.Tag then
inc(WindBarWidth)
else if WindBarWidth > Gear^.Tag then
dec(WindBarWidth);
// Prevent wind bar from overflowing
if WindBarWidth > maxWindBarWidth then
WindBarWidth:= maxWindBarWidth;
if WindBarWidth < - maxWindBarWidth then
WindBarWidth:= - maxWindBarWidth;
end;
if cWindspeedf > Gear^.dAngle then
begin
cWindspeedf := cWindspeedf - Gear^.Angle*Steps;
if cWindspeedf < Gear^.dAngle then cWindspeedf:= Gear^.dAngle;
end
else if cWindspeedf < Gear^.dAngle then
begin
cWindspeedf := cWindspeedf + Gear^.Angle*Steps;
if cWindspeedf > Gear^.dAngle then cWindspeedf:= Gear^.dAngle;
end;
end;
if (((WindBarWidth = Gear^.Tag) or (Abs(WindBarWidth) >= maxWindBarWidth)) and (cWindspeedf = Gear^.dAngle)) or (currwindbar <> Gear) then
begin
if currwindbar = Gear then currwindbar:= nil;
DeleteVisualGear(Gear)
end
end;
procedure doStepSmoothWindBar(Gear: PVisualGear; Steps: Longword);
begin
currwindbar:= Gear;
Gear^.doStep:= @doStepSmoothWindBarWork;
doStepSmoothWindBarWork(Gear, Steps)
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepStraightShot(Gear: PVisualGear; Steps: Longword);
begin
Gear^.X:= Gear^.X + Gear^.dX * Steps;
Gear^.Y:= Gear^.Y - Gear^.dY * Steps;
Gear^.dY:= Gear^.dY + Gear^.tdY * Steps;
Gear^.dX:= Gear^.dX + Gear^.tdX * Steps;
if Gear^.FrameTicks <= Steps then
DeleteVisualGear(Gear)
else
begin
dec(Gear^.FrameTicks, Steps);
if (Gear^.FrameTicks < 501) and (Gear^.FrameTicks mod 5 = 0) then
Gear^.Tint:= (Gear^.Tint and $FFFFFF00) or (((Gear^.Tint and $000000FF) * Gear^.FrameTicks) div 500)
end
end;
////////////////////////////////////////////////////////////////////////////////
procedure doStepNoPlaceWarn(Gear: PVisualGear; Steps: Longword);
begin
if Gear^.FrameTicks <= Steps then
DeleteVisualGear(Gear)
else
begin
// age
dec(Gear^.FrameTicks, Steps);
// toggle between orange and red every few ticks
if (Gear^.FrameTicks div 256) mod 2 = 0 then
Gear^.Tint:= $FF400000
else
Gear^.Tint:= $FF000000;
// fade out alpha
Gear^.Tint:= (Gear^.Tint and (not $FF)) or (255 * Gear^.FrameTicks div 3000);
end
end;
const handlers: array[TVisualGearType] of TVGearStepProcedure =
(
@doStepFlake,
@doStepCloud,
@doStepExpl,
@doStepExpl,
@doStepFire,
@doStepSmallDamage,
@doStepTeamHealthSorter,
@doStepSpeechBubble,
@doStepBubble,
@doStepSteam,
@doStepAmmo,
@doStepSmoke,
@doStepSmoke,
@doStepShell,
@doStepDust,
@doStepSplash,
@doStepDroplet,
@doStepSmokeRing,
@doStepBeeTrace,
@doStepEgg,
@doStepFeather,
@doStepHealthTag,
@doStepSmokeTrace,
@doStepSmokeTrace,
@doStepExplosion,
@doStepBigExplosion,
@doStepChunk,
@doStepNote,
@doStepLineTrail,
@doStepBulletHit,
@doStepCircle,
@doStepSmoothWindBar,
@doStepStraightShot,
@doStepNoPlaceWarn
);
procedure initModule;
begin
doStepVGHandlers:= handlers
end;
end.
| 29.986408 | 144 | 0.58036 |
6166be5334c553f3e39634e755d781a4e7c52bfc
| 3,660 |
dfm
|
Pascal
|
Projects/CL.Ag5/Source/CL.Ag5Client/Zoo/Atividades/UZoo_AtividadesTarefasWizard.dfm
|
iclinicadoleite/controle-ag5
|
2e315c4a7c9bcb841a8d2f2390ae9d7c2c2cb721
|
[
"Apache-2.0"
] | 1 |
2020-05-07T07:51:27.000Z
|
2020-05-07T07:51:27.000Z
|
Projects/CL.Ag5/Source/CL.Ag5Client/Zoo/Atividades/UZoo_AtividadesTarefasWizard.dfm
|
iclinicadoleite/controle-ag5
|
2e315c4a7c9bcb841a8d2f2390ae9d7c2c2cb721
|
[
"Apache-2.0"
] | null | null | null |
Projects/CL.Ag5/Source/CL.Ag5Client/Zoo/Atividades/UZoo_AtividadesTarefasWizard.dfm
|
iclinicadoleite/controle-ag5
|
2e315c4a7c9bcb841a8d2f2390ae9d7c2c2cb721
|
[
"Apache-2.0"
] | 3 |
2020-02-17T18:01:52.000Z
|
2020-05-07T07:51:28.000Z
|
inherited Zoo_AtividadesTarefasWizard: TZoo_AtividadesTarefasWizard
Left = 440
Top = 242
Caption = 'Atividades - Tarefas'
ClientWidth = 687
OnActivate = TcFormActivate
ActionList.Left = 506
ActionList.Top = 4
ExplicitWidth = 693
PixelsPerInch = 96
TextHeight = 13
inherited _pnlForm: TJvPanel
Width = 687
Margins.Left = 3
Margins.Top = 3
Margins.Right = 3
Margins.Bottom = 3
ExplicitWidth = 687
inherited _pnlFooter: TJvPanel
Width = 683
Margins.Left = 3
Margins.Top = 3
Margins.Right = 3
Margins.Bottom = 3
ExplicitWidth = 683
inherited _imageBottom: TImage
Width = 683
ExplicitWidth = 683
end
object Label2: TLabel [1]
Left = 112
Top = 8
Width = 265
Height = 13
Caption = '* Descarte calculado em fun'#231#227'o das tarefas em atraso.'
Transparent = True
end
inherited _btbPrior: TTcGDIButton
Left = 492
Margins.Left = 3
Margins.Top = 3
Margins.Right = 3
Margins.Bottom = 3
ExplicitLeft = 492
end
inherited _btbCancel: TTcGDIButton
Margins.Left = 3
Margins.Top = 3
Margins.Right = 3
Margins.Bottom = 3
end
inherited _btbNext: TTcGDIButton
Left = 583
Margins.Left = 3
Margins.Top = 3
Margins.Right = 3
Margins.Bottom = 3
ExplicitLeft = 583
end
inherited _btbExecute: TTcGDIButton
Left = 598
Margins.Left = 3
Margins.Top = 3
Margins.Right = 3
Margins.Bottom = 3
ExplicitLeft = 598
end
end
inherited _pnlDetail: TJvPanel
Width = 683
Margins.Left = 3
Margins.Top = 3
Margins.Right = 3
Margins.Bottom = 3
ExplicitWidth = 683
inherited PageControl: TJvPageControl
Width = 683
Margins.Left = 3
Margins.Top = 3
Margins.Right = 3
Margins.Bottom = 3
ExplicitWidth = 683
inherited TabSheetParametros: TTabSheet
ExplicitTop = 23
ExplicitWidth = 683
ExplicitHeight = 287
object Label1: TLabel
Left = 64
Top = 89
Width = 118
Height = 13
Caption = 'Tarefas a executar at'#233' :'
end
object deAte: TTcDateEdit
Left = 193
Top = 86
Width = 88
Height = 21
Checked = False
CheckOnExit = False
ButtonWidth = 19
TabOrder = 0
end
end
inherited TabSheetResultado: TTabSheet
ExplicitTop = 23
ExplicitWidth = 683
ExplicitHeight = 287
inherited DBGridResultados: TJvDBUltimGrid
Width = 683
Height = 260
end
object Panel3: TPanel
Left = 0
Top = 260
Width = 683
Height = 27
Align = alBottom
Caption = ' '
Color = clSilver
ParentBackground = False
TabOrder = 1
ExplicitWidth = 527
object lblTotalLinhas: TLabel
Left = 16
Top = 7
Width = 64
Height = 13
Caption = 'lblTotalLinhas'
end
end
end
end
end
end
inherited ActionList: TInternalActionList
Left = 506
Top = 4
end
inherited dtsResultado: TDataSource
DataSet = Zoo_AtividadesTarefasDatamodule.cdsATarefas
Left = 258
Top = 8
end
end
| 25.068493 | 81 | 0.536612 |
83e7e0bbd97b5df0f4bad00d7a191ff46513dbf7
| 3,572 |
pas
|
Pascal
|
Features/Location/DW.LocationHelpers.Android.pas
|
onyxadm/Kastri
|
c5ce1ea3dc6279aeac9d0850194eb8a640e6b94e
|
[
"MIT"
] | null | null | null |
Features/Location/DW.LocationHelpers.Android.pas
|
onyxadm/Kastri
|
c5ce1ea3dc6279aeac9d0850194eb8a640e6b94e
|
[
"MIT"
] | null | null | null |
Features/Location/DW.LocationHelpers.Android.pas
|
onyxadm/Kastri
|
c5ce1ea3dc6279aeac9d0850194eb8a640e6b94e
|
[
"MIT"
] | null | null | null |
unit DW.LocationHelpers.Android;
{*******************************************************}
{ }
{ Kastri }
{ }
{ Delphi Worlds Cross-Platform Library }
{ }
{ Copyright 2020-2021 Dave Nottage under MIT license }
{ which is located in the root folder of this library }
{ }
{*******************************************************}
{$I DW.GlobalDefines.inc}
interface
uses
// Android
Androidapi.JNI.Location,
// DW
DW.Location.Types;
const
cActionLocation = 'ACTION_LOCATION';
cExtraLocationData = 'EXTRA_LOCATION_DATA';
type
TLocationHelper = record
public
Data: TLocationData;
procedure BroadcastLocationData(const ALocation: JLocation; const AIsCached: Boolean = False);
function GetLocationData(const ALocation: JLocation; const AIsCached: Boolean = False): TLocationData;
end;
implementation
uses
// RTL
System.SysUtils, System.Sensors, System.DateUtils,
// Android
Androidapi.JNI.GraphicsContentViewText, Androidapi.Helpers, Androidapi.JNI.JavaTypes,
// DW
{$IF CompilerVersion < 35}
DW.Androidapi.JNI.SupportV4,
{$ELSE}
DW.Androidapi.JNI.AndroidX.LocalBroadcastManager,
{$ENDIF}
DW.Geodetic, DW.Android.Helpers;
procedure TLocationHelper.BroadcastLocationData(const ALocation: JLocation; const AIsCached: Boolean = False);
var
LIntent: JIntent;
LData: TLocationData;
begin
LData := GetLocationData(ALocation, AIsCached);
LData.IsCached := AIsCached;
LIntent := TJIntent.JavaClass.init(StringToJString(cActionLocation));
LIntent.putExtra(StringToJString(cExtraLocationData), StringToJString(LData.ToJSON));
TJLocalBroadcastManager.JavaClass.getInstance(TAndroidHelper.Context).sendBroadcast(LIntent);
end;
function TLocationHelper.GetLocationData(const ALocation: JLocation; const AIsCached: Boolean = False): TLocationData;
begin
Result.Reset;
if not TAndroidHelperEx.IsActivityForeground then
Result.ApplicationState := TLocationApplicationState.Background;
if TAndroidHelperEx.PowerManager.isDeviceIdleMode then
Result.ApplicationState := TLocationApplicationState.Doze;
Result.Location := TLocationCoord2D.Create(ALocation.getLatitude, ALocation.getLongitude);
Result.IsMocked := ALocation.isFromMockProvider;
Result.IsCached := AIsCached;
if ALocation.hasAccuracy then
begin
Include(Result.Flags, TLocationDataFlag.Accuracy);
Result.Accuracy := ALocation.getAccuracy;
end;
if ALocation.hasAltitude then
begin
Include(Result.Flags, TLocationDataFlag.Altitude);
Result.Altitude := ALocation.getAltitude;
end;
if ALocation.hasBearing then
begin
Include(Result.Flags, TLocationDataFlag.Bearing);
Result.Bearing := ALocation.getBearing;
end;
if ALocation.hasSpeed then
begin
Include(Result.Flags, TLocationDataFlag.Speed);
Result.Speed := ALocation.getSpeed;
end
else if (Data.DateTime > 0) and (Data.Location.Latitude <> cInvalidLatitude) then
begin
Include(Result.Flags, TLocationDataFlag.Speed);
Result.Speed := TGeodetic.DistanceBetween(Data.Location, Result.Location) / SecondsBetween(Now, Data.DateTime);
end;
Result.DateTime := UnixToDateTime(Round(ALocation.getTime / 1000));
Data := Result;
end;
end.
| 34.346154 | 119 | 0.659015 |
f1401584a16ad62bf6a18fd25344aaf627d82c28
| 8,392 |
pas
|
Pascal
|
Lego/bricxcc/syn/SynExportRTF.pas
|
jodosh/Personal
|
92c943b95d3a07789d5f24faf60d4708040e22cb
|
[
"MIT"
] | null | null | null |
Lego/bricxcc/syn/SynExportRTF.pas
|
jodosh/Personal
|
92c943b95d3a07789d5f24faf60d4708040e22cb
|
[
"MIT"
] | 1 |
2017-09-18T14:15:00.000Z
|
2017-09-18T14:15:00.000Z
|
Lego/bricxcc/syn/SynExportRTF.pas
|
jodosh/Personal
|
92c943b95d3a07789d5f24faf60d4708040e22cb
|
[
"MIT"
] | null | null | null |
{-------------------------------------------------------------------------------
The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
the specific language governing rights and limitations under the License.
The Original Code is: SynExportRTF.pas, released 2000-04-16.
The Original Code is partly based on the mwRTFExport.pas file from the
mwEdit component suite by Martin Waldenburg and other developers, the Initial
Author of this file is Michael Hieke.
Portions created by Michael Hieke are Copyright 2000 Michael Hieke.
Portions created by James D. Jacobson are Copyright 1999 Martin Waldenburg.
All Rights Reserved.
Contributors to the SynEdit project are listed in the Contributors.txt file.
Alternatively, the contents of this file may be used under the terms of the
GNU General Public License Version 2 or later (the "GPL"), in which case
the provisions of the GPL are applicable instead of those above.
If you wish to allow use of your version of this file only under the terms
of the GPL and not to allow others to use your version of this file
under the MPL, indicate your decision by deleting the provisions above and
replace them with the notice and other provisions required by the GPL.
If you do not delete the provisions above, a recipient may use your version
of this file under either the MPL or the GPL.
$Id: SynExportRTF.pas,v 1.1.1.1 2009/01/12 02:59:57 jhansen Exp $
You may retrieve the latest version of this file at the SynEdit home page,
located at http://SynEdit.SourceForge.net
Known Issues:
-------------------------------------------------------------------------------}
unit SynExportRTF;
{$I SynExtra.inc}
interface
uses
Classes,
// Windows,
// RichEdit,
Graphics,
SynEditExport;
type
TSynExporterRTF = class(TSynCustomExporter)
private
fAttributesChanged: boolean;
fListColors: TList;
function ColorToRTF(AColor: TColor): string;
function GetColorIndex(AColor: TColor): integer;
protected
procedure FormatAfterLastAttribute; override;
procedure FormatAttributeDone(BackgroundChanged, ForegroundChanged: boolean;
FontStylesChanged: TFontStyles); override;
procedure FormatAttributeInit(BackgroundChanged, ForegroundChanged: boolean;
FontStylesChanged: TFontStyles); override;
procedure FormatBeforeFirstAttribute(BackgroundChanged,
ForegroundChanged: boolean; FontStylesChanged: TFontStyles); override;
procedure FormatNewLine; override;
function GetFooter: string; override;
function GetFormatName: string; override;
function GetHeader: string; override;
{$IFDEF SYN_MBCSSUPPORT}
function ReplaceMBCS(Char1, Char2: char): string; override;
{$ENDIF}
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Clear; override;
published
property Color;
property DefaultFilter;
property Font;
property Highlighter;
property Title;
property UseBackground;
end;
implementation
uses
SysUtils, SynEditStrConst;
{$IFDEF SYN_LAZARUS}
type
TColorRec = packed record
Blue: Byte;
Green: Byte;
Red: Byte;
Unused: Byte;
end;
function GetRValue(RGBValue: TColor): byte;
begin
Result := TColorRec(RGBValue).Red;
end;
function GetGValue(RGBValue: TColor): byte;
begin
Result := TColorRec(RGBValue).Green;
end;
function GetBValue(RGBValue: TColor): byte;
begin
Result := TColorRec(RGBValue).Blue;
end;
{$ENDIF}
{ TSynExporterRTF }
constructor TSynExporterRTF.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
fListColors := TList.Create;
fDefaultFilter := SYNS_FilterRTF;
{*****************}
{$IFNDEF SYN_LAZARUS}
fClipboardFormat := RegisterClipboardFormat(CF_RTF);
{$ENDIF}
// setup array of chars to be replaced
fReplaceReserved['\'] := '\\';
fReplaceReserved['{'] := '\{';
fReplaceReserved['}'] := '\}';
end;
destructor TSynExporterRTF.Destroy;
begin
fListColors.Free;
fListColors := nil;
inherited Destroy;
end;
procedure TSynExporterRTF.Clear;
begin
inherited Clear;
if Assigned(fListColors) then
fListColors.Clear;
end;
function TSynExporterRTF.ColorToRTF(AColor: TColor): string;
var
Col: Integer;
begin
Col := ColorToRGB(AColor);
{*****************}
Result := Format('\red%d\green%d\blue%d;', [GetRValue(Col), GetGValue(Col),
GetBValue(Col)]);
end;
procedure TSynExporterRTF.FormatAfterLastAttribute;
begin
// no need to reset the font style here...
end;
procedure TSynExporterRTF.FormatAttributeDone(BackgroundChanged,
ForegroundChanged: boolean; FontStylesChanged: TFontStyles);
const
FontTags: array[TFontStyle] of string = ('\b0', '\i0', '\ul0', '\strike0');
var
AStyle: TFontStyle;
begin
// nothing to do about the color, but reset the font style
for AStyle := Low(TFontStyle) to High(TFontStyle) do begin
if AStyle in FontStylesChanged then begin
fAttributesChanged := TRUE;
AddData(FontTags[AStyle]);
end;
end;
end;
procedure TSynExporterRTF.FormatAttributeInit(BackgroundChanged,
ForegroundChanged: boolean; FontStylesChanged: TFontStyles);
const
FontTags: array[TFontStyle] of string = ('\b', '\i', '\ul', '\strike');
var
AStyle: TFontStyle;
begin
// background color
if BackgroundChanged then begin
AddData(Format('\cb%d', [GetColorIndex(fLastBG)]));
fAttributesChanged := TRUE;
end;
// text color
if ForegroundChanged then begin
AddData(Format('\cf%d', [GetColorIndex(fLastFG)]));
fAttributesChanged := TRUE;
end;
// font styles
for AStyle := Low(TFontStyle) to High(TFontStyle) do
if AStyle in FontStylesChanged then begin
AddData(FontTags[AStyle]);
fAttributesChanged := TRUE;
end;
if fAttributesChanged then begin
AddData(' ');
fAttributesChanged := FALSE;
end;
end;
procedure TSynExporterRTF.FormatBeforeFirstAttribute(BackgroundChanged,
ForegroundChanged: boolean; FontStylesChanged: TFontStyles);
begin
FormatAttributeInit(BackgroundChanged, ForegroundChanged, FontStylesChanged);
end;
procedure TSynExporterRTF.FormatNewLine;
begin
AddData(#13#10'\par ');
end;
function TSynExporterRTF.GetColorIndex(AColor: TColor): integer;
begin
Result := fListColors.IndexOf(pointer(AColor));
if Result = -1 then
Result := fListColors.Add(pointer(AColor));
end;
function TSynExporterRTF.GetFooter: string;
begin
Result := '}';
end;
function TSynExporterRTF.GetFormatName: string;
begin
Result := SYNS_ExporterFormatRTF;
end;
function TSynExporterRTF.GetHeader: string;
var
i: integer;
function GetFontTable: string;
{$IFDEF SYN_MBCSSUPPORT}
var
IsSpace: boolean;
{$ENDIF}
begin
{$IFDEF SYN_MBCSSUPPORT}
if ByteType(Font.Name, 1) <> mbSingleByte then begin
Result := '{\fonttbl{\f0\fnil\fcharset134 ' +
ReplaceReservedChars(Font.Name, IsSpace)
end else
{$ENDIF}
Result := '{\fonttbl{\f0\fmodern ' + Font.Name;
Result := Result + ';}}'#13#10;
end;
begin
Result := '{\rtf1\ansi\deff0\deftab720' + GetFontTable;
// all the colors
Result := Result + '{\colortbl';
for i := 0 to fListColors.Count - 1 do
Result := Result + ColorToRTF(TColor(fListColors[i]));
Result := Result + '}'#13#10;
// title and creator comment
Result := Result + '{\info{\comment Generated by the SynEdit RTF ' +
'exporter}'#13#10;
Result := Result + '{\title ' + fTitle + '}}'#13#10;
if fUseBackground then
Result := Result + { TODO } #13#10;
Result := Result + Format('\deflang1033\pard\plain\f0\fs%d ',
[2 * Font.Size]);
end;
{$IFDEF SYN_MBCSSUPPORT}
function TSynExporterRTF.ReplaceMBCS(Char1, Char2: char): string;
begin
// Result := Format('\''%x\''%x ', [Char1, Char2]);
Result := Format('\''%x\''%x', [integer(Char1), integer(Char2)]); //sqh 2001-01-04
end;
{$ENDIF}
end.
| 29.549296 | 97 | 0.689347 |
83469f01b753971f66c53347e822e90545084aad
| 905,652 |
pas
|
Pascal
|
Schema_Interfaces.pas
|
miteruel/ToDo-SchemaOrg-Delphi
|
0d8f91627baa6198b3771146397d1dbafd3fdbae
|
[
"MIT"
] | null | null | null |
Schema_Interfaces.pas
|
miteruel/ToDo-SchemaOrg-Delphi
|
0d8f91627baa6198b3771146397d1dbafd3fdbae
|
[
"MIT"
] | null | null | null |
Schema_Interfaces.pas
|
miteruel/ToDo-SchemaOrg-Delphi
|
0d8f91627baa6198b3771146397d1dbafd3fdbae
|
[
"MIT"
] | null | null | null |
Unit Schema_Interfaces;
Interface
(*
Schema_Interfaces
========================
Abstract types , base class and interfaces for schema.org
version 0.1 )
- Initial version.
This file is part of ToDoRosetta framework.
Copyright (C) 2017 Antonio Alcázar Ruiz. Multi-Informática Teruel S.L
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at http://www.mozilla.org/MPL
.....
******** This file is under construction ********
*** Please don't use it in production project ***
*)
//implementation end.
uses
Classes
//,Simple_Model_Schema
;
type
TangibleValue= String;
// You can change the base type for your own IYourbase
TBaseSchema=TInterfacedObject;
// interfaces
IAction=interface; //forward
ICreativeWork=interface; //forward
(* Thing
The most generic type of item.
*)
IThing=Interface // You can change the base interface for your own IYourbase
(*URL of a reference Web page that unambiguously indicates the item's identity.
E.g. the URL of the item's Wikipedia page, Wikidata entry, or official
website.*)
function Get_sameAs:String;
procedure Set_sameAs(v:String);
(*An additional type for the item, typically used for adding more specific
types from external vocabularies in microdata syntax. This is a relationship
between something and a class that the thing is in. In RDFa syntax, it is
better to use the native RDFa syntax - the 'typeof' attribute - for multiple
types. Schema.org tools may have only weaker understanding of extra types, in
particular those defined externally.*)
function Get_additionalType:String;
procedure Set_additionalType(v:String);
(*A sub property of description. A short description of the item used to
disambiguate from other, similar items. Information from other properties (in
particular, name) may be necessary for the description to be useful for
disambiguation.*)
function Get_disambiguatingDescription:String;
procedure Set_disambiguatingDescription(v:String);
(*Indicates a potential Action, which describes an idealized action in which
this thing would play an 'object' role.*)
function Get_potentialAction:IAction;
procedure Set_potentialAction(v:IAction);
(*URL of the item.*)
function Get_url:String;
procedure Set_url(v:String);
(*An alias for the item.*)
function Get_alternateName:String;
procedure Set_alternateName(v:String);
(*The name of the item.*)
function Get_name:String;
procedure Set_name(v:String);
(**)
function Get_mainEntityOfPage:ICreativeWork;
procedure Set_mainEntityOfPage(v:ICreativeWork);
// properties
property sameAs:String read Get_sameAs write Set_sameAs;
property additionalType:String read Get_additionalType write Set_additionalType;
property disambiguatingDescription:String read Get_disambiguatingDescription write Set_disambiguatingDescription;
property potentialAction:IAction read Get_potentialAction write Set_potentialAction;
property url:String read Get_url write Set_url;
property alternateName:String read Get_alternateName write Set_alternateName;
property name:String read Get_name write Set_name;
property mainEntityOfPage:ICreativeWork read Get_mainEntityOfPage write Set_mainEntityOfPage;
end;
(*** end IThing ***)
IEntryPoint=interface; //forward
IActionStatusType=interface; //forward
IOrganization=interface; //forward
(* Action
*)
IAction=Interface (IThing)
(*Indicates a target EntryPoint for an Action.*)
function Get_target:IEntryPoint;
procedure Set_target(v:IEntryPoint);
(*Indicates the current disposition of the Action.*)
function Get_actionStatus:IActionStatusType;
procedure Set_actionStatus(v:IActionStatusType);
(**)
function Get_agent:IOrganization;
procedure Set_agent(v:IOrganization);
(*For failed actions, more information on the cause of the failure.*)
function Get_error:IThing;
procedure Set_error(v:IThing);
// properties
property target:IEntryPoint read Get_target write Set_target;
property actionStatus:IActionStatusType read Get_actionStatus write Set_actionStatus;
property agent:IOrganization read Get_agent write Set_agent;
property error:IThing read Get_error write Set_error;
end;
(*** end IAction ***)
(* Intangible
A utility class that serves as the umbrella for a number of 'intangible' things
such as quantities, structured values, etc.
*)
IIntangible=Interface (IThing)
function TangIntangible:TangibleValue;
end;
(*** end IIntangible ***)
ISoftwareApplication=interface; //forward
(* EntryPoint
An entry point, within some Web-based protocol.
*)
IEntryPoint=Interface (IIntangible)
(*An application that can complete the request.*)
function Get_application:ISoftwareApplication;
procedure Set_application(v:ISoftwareApplication);
(*The high level platform(s) where the Action can be performed for the given
URL. To specify a specific application or operating system instance, use
actionApplication.*)
function Get_actionPlatform:String;
procedure Set_actionPlatform(v:String);
(*An HTTP method that specifies the appropriate HTTP method for a request to an
HTTP EntryPoint. Values are capitalized strings as used in HTTP.*)
function Get_httpMethod:String;
procedure Set_httpMethod(v:String);
(*The supported encoding type(s) for an EntryPoint request.*)
function Get_encodingType:String;
procedure Set_encodingType(v:String);
(*An url template (RFC6570) that will be used to construct the target of the
execution of the action.*)
function Get_urlTemplate:String;
procedure Set_urlTemplate(v:String);
(*The supported content type(s) for an EntryPoint response.*)
function Get_contentType:String;
procedure Set_contentType(v:String);
// properties
property application:ISoftwareApplication read Get_application write Set_application;
property actionPlatform:String read Get_actionPlatform write Set_actionPlatform;
property httpMethod:String read Get_httpMethod write Set_httpMethod;
property encodingType:String read Get_encodingType write Set_encodingType;
property urlTemplate:String read Get_urlTemplate write Set_urlTemplate;
property contentType:String read Get_contentType write Set_contentType;
end;
(*** end IEntryPoint ***)
IReview=interface; //forward
IPerson=interface; //forward
IMediaObject=interface; //forward
IPlace=interface; //forward
IVideoObject=interface; //forward
IPublicationEvent=interface; //forward
IProduct=interface; //forward
INumber=interface; //forward
IDuration=interface; //forward
IAudioObject=interface; //forward
IAlignmentObject=interface; //forward
(* CreativeWork
The most generic kind of creative work, including books, movies, photographs,
software programs, etc.
*)
ICreativeWork=Interface (IThing)
(*The number of comments this CreativeWork (e.g. Article, Question or Answer)
has received. This is most applicable to works published in Web sites with
commenting system; additional comments may exist elsewhere.*)
function Get_commentCount:Integer;
procedure Set_commentCount(v:Integer);
(*Review of the item.*)
function Get_reviews:IReview;
procedure Set_reviews(v:IReview);
(*Headline of the article.*)
function Get_headline:String;
procedure Set_headline(v:String);
(*Specifies the Person who edited the CreativeWork.*)
function Get_editor:IPerson;
procedure Set_editor(v:IPerson);
(*A media object that encodes this CreativeWork. This property is a synonym for
encoding.*)
function Get_associatedMedia:IMediaObject;
procedure Set_associatedMedia(v:IMediaObject);
(*A thumbnail image relevant to the Thing.*)
function Get_thumbnailUrl:String;
procedure Set_thumbnailUrl(v:String);
(*Indicates that the CreativeWork contains a reference to, but is not
necessarily about a concept.*)
function Get_mentions:IThing;
procedure Set_mentions(v:IThing);
(*Official rating of a piece of content&#x2014;for example,'MPAA PG-13'.*)
function Get_contentRating:String;
procedure Set_contentRating(v:String);
(**)
function Get_accessibilityHazard:String;
procedure Set_accessibilityHazard(v:String);
(**)
function Get_accessibilityAPI:String;
procedure Set_accessibilityAPI(v:String);
(*The location where the CreativeWork was created, which may not be the same as
the location depicted in the CreativeWork.*)
function Get_locationCreated:IPlace;
procedure Set_locationCreated(v:IPlace);
(*A secondary title of the CreativeWork.*)
function Get_alternativeHeadline:String;
procedure Set_alternativeHeadline(v:String);
(*Awards won by or for this item.*)
function Get_awards:String;
procedure Set_awards(v:String);
(*A media object that encodes this CreativeWork.*)
function Get_encodings:IMediaObject;
procedure Set_encodings(v:IMediaObject);
(*The person or organization who produced the work (e.g. music album, movie,
tv/radio series etc.).*)
function Get_producer:IPerson;
procedure Set_producer(v:IPerson);
(**)
function Get_accessibilityFeature:String;
procedure Set_accessibilityFeature(v:String);
(*An embedded video object.*)
function Get_video:IVideoObject;
procedure Set_video(v:IVideoObject);
(*The place and time the release was issued, expressed as a PublicationEvent.*)
function Get_releasedEvent:IPublicationEvent;
procedure Set_releasedEvent(v:IPublicationEvent);
(*The purpose of a work in the context of education; for example, 'assignment',
'group work'.*)
function Get_educationalUse:String;
procedure Set_educationalUse(v:String);
(*A resource that was used in the creation of this resource. This term can be
repeated for multiple sources. For example,
http://example.com/great-multiplication-intro.html.*)
function Get_isBasedOnUrl:IProduct;
procedure Set_isBasedOnUrl(v:IProduct);
(*The party holding the legal copyright to the CreativeWork.*)
function Get_copyrightHolder:IOrganization;
procedure Set_copyrightHolder(v:IOrganization);
(*A link to the page containing the comments of the CreativeWork.*)
function Get_discussionUrl:String;
procedure Set_discussionUrl(v:String);
(*The publishing division which published the comic.*)
function Get_publisherImprint:IOrganization;
procedure Set_publisherImprint(v:IOrganization);
(**)
function Get_fileFormat:String;
procedure Set_fileFormat(v:String);
(*The textual content of this CreativeWork.*)
function Get_text:String;
procedure Set_text(v:String);
(*A publication event associated with the item.*)
function Get_publication:IPublicationEvent;
procedure Set_publication(v:IPublicationEvent);
(*A license document that applies to this content, typically indicated by URL.*)
function Get_license:String;
procedure Set_license(v:String);
(*A list of single or combined accessModes that are sufficient to understand
all the intellectual content of a resource. Expected values include: auditory,
tactile, textual, visual.*)
function Get_accessModeSufficient:String;
procedure Set_accessModeSufficient(v:String);
(*Keywords or tags used to describe this content. Multiple entries in a
keywords list are typically delimited by commas.*)
function Get_keywords:String;
procedure Set_keywords(v:String);
(*The specific time described by a creative work, for works (e.g. articles,
video objects etc.) that emphasise a particular moment within an Event.*)
function Get_contentReferenceTime:TDateTime;
procedure Set_contentReferenceTime(v:TDateTime);
(*A human-readable summary of specific accessibility features or deficiencies,
consistent with the other accessibility metadata but expressing subtleties such
as "short descriptions are present but long descriptions will be needed for
non-visual users" or "short descriptions are present and no long descriptions
are needed."*)
function Get_accessibilitySummary:String;
procedure Set_accessibilitySummary(v:String);
(*The version of the CreativeWork embodied by a specified resource.*)
function Get_version:INumber;
procedure Set_version(v:INumber);
(*Date of first broadcast/publication.*)
function Get_datePublished:TDateTime;
procedure Set_datePublished(v:TDateTime);
(*Approximate or typical time it takes to work with or through this learning
resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'.*)
function Get_timeRequired:IDuration;
procedure Set_timeRequired(v:IDuration);
(*An embedded audio object.*)
function Get_audio:IAudioObject;
procedure Set_audio(v:IAudioObject);
(*Indicates whether this content is family friendly.*)
function Get_isFamilyFriendly:Boolean;
procedure Set_isFamilyFriendly(v:Boolean);
(*The predominant mode of learning supported by the learning resource.
Acceptable values are 'active', 'expositive', or 'mixed'.*)
function Get_interactivityType:String;
procedure Set_interactivityType(v:String);
(*An alignment to an established educational framework.*)
function Get_educationalAlignment:IAlignmentObject;
procedure Set_educationalAlignment(v:IAlignmentObject);
(*Link to page describing the editorial principles of the organization
primarily responsible for the creation of the CreativeWork.*)
function Get_publishingPrinciples:String;
procedure Set_publishingPrinciples(v:String);
(**)
function Get_accessibilityControl:String;
procedure Set_accessibilityControl(v:String);
(*Specifies the Person that is legally accountable for the CreativeWork.*)
function Get_accountablePerson:IPerson;
procedure Set_accountablePerson(v:IPerson);
(*The human sensory perceptual system or cognitive faculty through which a
person may process or perceive information. Expected values include: auditory,
tactile, textual, visual, colorDependent, chartOnVisual, chemOnVisual,
diagramOnVisual, mathOnVisual, musicOnVisual, textOnVisual.*)
function Get_accessMode:String;
procedure Set_accessMode(v:String);
(*The subject matter of the content.*)
function Get_about:IThing;
procedure Set_about(v:IThing);
(*The Organization on whose behalf the creator was working.*)
function Get_sourceOrganization:IOrganization;
procedure Set_sourceOrganization(v:IOrganization);
(*A citation or reference to another creative work, such as another
publication, web page, scholarly article, etc.*)
function Get_citation:ICreativeWork;
procedure Set_citation(v:ICreativeWork);
(*Indicates (by URL or string) a particular version of a schema used in some
CreativeWork. For example, a document could declare a schemaVersion using an
URL such as http://schema.org/version/2.0/ if precise indication of schema
version was required by some application.*)
function Get_schemaVersion:String;
procedure Set_schemaVersion(v:String);
(*The year during which the claimed copyright for the CreativeWork was first
asserted.*)
function Get_copyrightYear:INumber;
procedure Set_copyrightYear(v:INumber);
(*The publisher of the creative work.*)
function Get_publisher:IPerson;
procedure Set_publisher(v:IPerson);
(*The predominant type or kind characterizing the learning resource. For
example, 'presentation', 'handout'.*)
function Get_learningResourceType:String;
procedure Set_learningResourceType(v:String);
(*Fictional person connected with a creative work.*)
function Get_character:IPerson;
procedure Set_character(v:IPerson);
(*A creative work that this work is an example/instance/realization/derivation
of.*)
function Get_exampleOfWork:ICreativeWork;
procedure Set_exampleOfWork(v:ICreativeWork);
(*A work that is a translation of the content of this work. e.g. 西遊記 has
an English workTranslation “Journey to the West”,a German workTranslation
“Monkeys Pilgerfahrt” and a Vietnamese translation Tây du ký bình
khảo.*)
function Get_workTranslation:ICreativeWork;
procedure Set_workTranslation(v:ICreativeWork);
(*The location depicted or described in the content. For example, the location
in a photograph or painting.*)
function Get_contentLocation:IPlace;
procedure Set_contentLocation(v:IPlace);
// properties
property commentCount:Integer read Get_commentCount write Set_commentCount;
property reviews:IReview read Get_reviews write Set_reviews;
property headline:String read Get_headline write Set_headline;
property editor:IPerson read Get_editor write Set_editor;
property associatedMedia:IMediaObject read Get_associatedMedia write Set_associatedMedia;
property thumbnailUrl:String read Get_thumbnailUrl write Set_thumbnailUrl;
property mentions:IThing read Get_mentions write Set_mentions;
property contentRating:String read Get_contentRating write Set_contentRating;
property accessibilityHazard:String read Get_accessibilityHazard write Set_accessibilityHazard;
property accessibilityAPI:String read Get_accessibilityAPI write Set_accessibilityAPI;
property locationCreated:IPlace read Get_locationCreated write Set_locationCreated;
property alternativeHeadline:String read Get_alternativeHeadline write Set_alternativeHeadline;
property awards:String read Get_awards write Set_awards;
property encodings:IMediaObject read Get_encodings write Set_encodings;
property producer:IPerson read Get_producer write Set_producer;
property accessibilityFeature:String read Get_accessibilityFeature write Set_accessibilityFeature;
property video:IVideoObject read Get_video write Set_video;
property releasedEvent:IPublicationEvent read Get_releasedEvent write Set_releasedEvent;
property educationalUse:String read Get_educationalUse write Set_educationalUse;
property isBasedOnUrl:IProduct read Get_isBasedOnUrl write Set_isBasedOnUrl;
property copyrightHolder:IOrganization read Get_copyrightHolder write Set_copyrightHolder;
property discussionUrl:String read Get_discussionUrl write Set_discussionUrl;
property publisherImprint:IOrganization read Get_publisherImprint write Set_publisherImprint;
property fileFormat:String read Get_fileFormat write Set_fileFormat;
property text:String read Get_text write Set_text;
property publication:IPublicationEvent read Get_publication write Set_publication;
property license:String read Get_license write Set_license;
property accessModeSufficient:String read Get_accessModeSufficient write Set_accessModeSufficient;
property keywords:String read Get_keywords write Set_keywords;
property contentReferenceTime:TDateTime read Get_contentReferenceTime write Set_contentReferenceTime;
property accessibilitySummary:String read Get_accessibilitySummary write Set_accessibilitySummary;
property version:INumber read Get_version write Set_version;
property datePublished:TDateTime read Get_datePublished write Set_datePublished;
property timeRequired:IDuration read Get_timeRequired write Set_timeRequired;
property audio:IAudioObject read Get_audio write Set_audio;
property isFamilyFriendly:Boolean read Get_isFamilyFriendly write Set_isFamilyFriendly;
property interactivityType:String read Get_interactivityType write Set_interactivityType;
property educationalAlignment:IAlignmentObject read Get_educationalAlignment write Set_educationalAlignment;
property publishingPrinciples:String read Get_publishingPrinciples write Set_publishingPrinciples;
property accessibilityControl:String read Get_accessibilityControl write Set_accessibilityControl;
property accountablePerson:IPerson read Get_accountablePerson write Set_accountablePerson;
property accessMode:String read Get_accessMode write Set_accessMode;
property about:IThing read Get_about write Set_about;
property sourceOrganization:IOrganization read Get_sourceOrganization write Set_sourceOrganization;
property citation:ICreativeWork read Get_citation write Set_citation;
property schemaVersion:String read Get_schemaVersion write Set_schemaVersion;
property copyrightYear:INumber read Get_copyrightYear write Set_copyrightYear;
property publisher:IPerson read Get_publisher write Set_publisher;
property learningResourceType:String read Get_learningResourceType write Set_learningResourceType;
property character:IPerson read Get_character write Set_character;
property exampleOfWork:ICreativeWork read Get_exampleOfWork write Set_exampleOfWork;
property workTranslation:ICreativeWork read Get_workTranslation write Set_workTranslation;
property contentLocation:IPlace read Get_contentLocation write Set_contentLocation;
end;
(*** end ICreativeWork ***)
IRating=interface; //forward
(* Review
A review of an item - for example, of a restaurant, movie, or store.
*)
IReview=Interface (ICreativeWork)
(**)
function Get_reviewRating:IRating;
procedure Set_reviewRating(v:IRating);
(*The item that is being reviewed/rated.*)
function Get_itemReviewed:IThing;
procedure Set_itemReviewed(v:IThing);
(*The actual body of the review.*)
function Get_reviewBody:String;
procedure Set_reviewBody(v:String);
// properties
property reviewRating:IRating read Get_reviewRating write Set_reviewRating;
property itemReviewed:IThing read Get_itemReviewed write Set_itemReviewed;
property reviewBody:String read Get_reviewBody write Set_reviewBody;
end;
(*** end IReview ***)
(* Rating
A rating is an evaluation on a numeric scale, such as 1 to 5 stars.
*)
IRating=Interface (IIntangible)
(*The author of this content or rating. Please note that author is special in
that HTML 5 provides a special mechanism for indicating authorship via the rel
tag. That is equivalent to this and may be used interchangeably.*)
function Get_author:IPerson;
procedure Set_author(v:IPerson);
(*The rating for the content.*)
function Get_ratingValue:String;
procedure Set_ratingValue(v:String);
(*The lowest value allowed in this rating system. If worstRating is omitted, 1
is assumed.*)
function Get_worstRating:String;
procedure Set_worstRating(v:String);
(*The highest value allowed in this rating system. If bestRating is omitted, 5
is assumed.*)
function Get_bestRating:INumber;
procedure Set_bestRating(v:INumber);
// properties
property author:IPerson read Get_author write Set_author;
property ratingValue:String read Get_ratingValue write Set_ratingValue;
property worstRating:String read Get_worstRating write Set_worstRating;
property bestRating:INumber read Get_bestRating write Set_bestRating;
end;
(*** end IRating ***)
IContactPoint=interface; //forward
IPriceSpecification=interface; //forward
ICountry=interface; //forward
IEvent=interface; //forward
IEducationalOrganization=interface; //forward
(* Person
A person (alive, dead, undead, or fictional).
*)
IPerson=Interface (IThing)
(*The Value-added Tax ID of the organization or person.*)
function Get_vatID:String;
procedure Set_vatID(v:String);
(*The North American Industry Classification System (NAICS) code for a
particular organization or business person.*)
function Get_naics:String;
procedure Set_naics(v:String);
(*A contact location for a person's place of work.*)
function Get_workLocation:IContactPoint;
procedure Set_workLocation(v:IContactPoint);
(*Given name. In the U.S., the first name of a Person. This can be used along
with familyName instead of the name property.*)
function Get_givenName:String;
procedure Set_givenName(v:String);
(*The place where the person was born.*)
function Get_birthPlace:IPlace;
procedure Set_birthPlace(v:IPlace);
(*Date of death.*)
function Get_deathDate:TDateTime;
procedure Set_deathDate(v:TDateTime);
(*The most generic familial relation.*)
function Get_relatedTo:IPerson;
procedure Set_relatedTo(v:IPerson);
(*An honorific suffix preceding a Person's name such as M.D. /PhD/MSCSW.*)
function Get_honorificSuffix:String;
procedure Set_honorificSuffix(v:String);
(*The International Standard of Industrial Classification of All Economic
Activities (ISIC), Revision 4 code for a particular organization, business
person, or place.*)
function Get_isicV4:String;
procedure Set_isicV4(v:String);
(*The place where the person died.*)
function Get_deathPlace:IPlace;
procedure Set_deathPlace(v:IPlace);
(*A colleague of the person.*)
function Get_colleagues:IPerson;
procedure Set_colleagues(v:IPerson);
(*Organizations that the person works for.*)
function Get_worksFor:IOrganization;
procedure Set_worksFor(v:IOrganization);
(*An additional name for a Person, can be used for a middle name.*)
function Get_additionalName:String;
procedure Set_additionalName(v:String);
(*The most generic uni-directional social relation.*)
function Get_follows:IPerson;
procedure Set_follows(v:IPerson);
(*The person's spouse.*)
function Get_spouse:IPerson;
procedure Set_spouse(v:IPerson);
(*The most generic bi-directional social/work relation.*)
function Get_knows:IPerson;
procedure Set_knows(v:IPerson);
(*Date of birth.*)
function Get_birthDate:TDateTime;
procedure Set_birthDate(v:TDateTime);
(*Gender of the person. While http://schema.org/Male and
http://schema.org/Female may be used, text strings are also acceptable for
people who do not identify as a binary gender.*)
function Get_gender:String;
procedure Set_gender(v:String);
(*A sibling of the person.*)
function Get_siblings:IPerson;
procedure Set_siblings(v:IPerson);
(*A child of the person.*)
function Get_children:IPerson;
procedure Set_children(v:IPerson);
(*A person or organization that supports (sponsors) something through some kind
of financial contribution.*)
function Get_funder:IPerson;
procedure Set_funder(v:IPerson);
(*An organization that this person is affiliated with. For example, a
school/university, a club, or a team.*)
function Get_affiliation:IOrganization;
procedure Set_affiliation(v:IOrganization);
(*An honorific prefix preceding a Person's name such as Dr/Mrs/Mr.*)
function Get_honorificPrefix:String;
procedure Set_honorificPrefix(v:String);
(*The total financial value of the person as calculated by subtracting assets
from liabilities.*)
function Get_netWorth:IPriceSpecification;
procedure Set_netWorth(v:IPriceSpecification);
(*Family name. In the U.S., the last name of an Person. This can be used along
with givenName instead of the name property.*)
function Get_familyName:String;
procedure Set_familyName(v:String);
(*A parents of the person.*)
function Get_parents:IPerson;
procedure Set_parents(v:IPerson);
(*A contact location for a person's residence.*)
function Get_homeLocation:IPlace;
procedure Set_homeLocation(v:IPlace);
(*Nationality of the person.*)
function Get_nationality:ICountry;
procedure Set_nationality(v:ICountry);
(*The job title of the person (for example, Financial Manager).*)
function Get_jobTitle:String;
procedure Set_jobTitle(v:String);
(*Event that this person is a performer or participant in.*)
function Get_performerIn:IEvent;
procedure Set_performerIn(v:IEvent);
(*An organization that the person is an alumni of.*)
function Get_alumniOf:IEducationalOrganization;
procedure Set_alumniOf(v:IEducationalOrganization);
// properties
property vatID:String read Get_vatID write Set_vatID;
property naics:String read Get_naics write Set_naics;
property workLocation:IContactPoint read Get_workLocation write Set_workLocation;
property givenName:String read Get_givenName write Set_givenName;
property birthPlace:IPlace read Get_birthPlace write Set_birthPlace;
property deathDate:TDateTime read Get_deathDate write Set_deathDate;
property relatedTo:IPerson read Get_relatedTo write Set_relatedTo;
property honorificSuffix:String read Get_honorificSuffix write Set_honorificSuffix;
property isicV4:String read Get_isicV4 write Set_isicV4;
property deathPlace:IPlace read Get_deathPlace write Set_deathPlace;
property colleagues:IPerson read Get_colleagues write Set_colleagues;
property worksFor:IOrganization read Get_worksFor write Set_worksFor;
property additionalName:String read Get_additionalName write Set_additionalName;
property follows:IPerson read Get_follows write Set_follows;
property spouse:IPerson read Get_spouse write Set_spouse;
property knows:IPerson read Get_knows write Set_knows;
property birthDate:TDateTime read Get_birthDate write Set_birthDate;
property gender:String read Get_gender write Set_gender;
property siblings:IPerson read Get_siblings write Set_siblings;
property children:IPerson read Get_children write Set_children;
property funder:IPerson read Get_funder write Set_funder;
property affiliation:IOrganization read Get_affiliation write Set_affiliation;
property honorificPrefix:String read Get_honorificPrefix write Set_honorificPrefix;
property netWorth:IPriceSpecification read Get_netWorth write Set_netWorth;
property familyName:String read Get_familyName write Set_familyName;
property parents:IPerson read Get_parents write Set_parents;
property homeLocation:IPlace read Get_homeLocation write Set_homeLocation;
property nationality:ICountry read Get_nationality write Set_nationality;
property jobTitle:String read Get_jobTitle write Set_jobTitle;
property performerIn:IEvent read Get_performerIn write Set_performerIn;
property alumniOf:IEducationalOrganization read Get_alumniOf write Set_alumniOf;
end;
(*** end IPerson ***)
(* StructuredValue
Structured values are used when the value of a property has a more complex
structure than simply being a textual value or a reference to another thing.
*)
IStructuredValue=Interface (IIntangible)
function TangStructuredValue:TangibleValue;
end;
(*** end IStructuredValue ***)
IContactPointOption=interface; //forward
IOpeningHoursSpecification=interface; //forward
(* ContactPoint
A contact point&#x2014;for example, a Customer Complaints department.
*)
IContactPoint=Interface (IStructuredValue)
(**)
function Get_availableLanguage:String;
procedure Set_availableLanguage(v:String);
(*A person or organization can have different contact points, for different
purposes. For example, a sales contact point, a PR contact point and so on.
This property is used to specify the kind of contact point.*)
function Get_contactType:String;
procedure Set_contactType(v:String);
(*The product or service this support contact point is related to (such as
product support for a particular product line). This can be a specific product
or product line (e.g. "iPhone") or a general category of products or services
(e.g. "smartphones").*)
function Get_productSupported:String;
procedure Set_productSupported(v:String);
(*An option available on this contact point (e.g. a toll-free number or support
for hearing-impaired callers).*)
function Get_contactOption:IContactPointOption;
procedure Set_contactOption(v:IContactPointOption);
(*The hours during which this service or contact is available.*)
function Get_hoursAvailable:IOpeningHoursSpecification;
procedure Set_hoursAvailable(v:IOpeningHoursSpecification);
// properties
property availableLanguage:String read Get_availableLanguage write Set_availableLanguage;
property contactType:String read Get_contactType write Set_contactType;
property productSupported:String read Get_productSupported write Set_productSupported;
property contactOption:IContactPointOption read Get_contactOption write Set_contactOption;
property hoursAvailable:IOpeningHoursSpecification read Get_hoursAvailable write Set_hoursAvailable;
end;
(*** end IContactPoint ***)
(* Enumeration
Lists or enumerations—for example, a list of cuisines or music genres, etc.
*)
IEnumeration=Interface (IIntangible)
function TangEnumeration:TangibleValue;
end;
(*** end IEnumeration ***)
(* ContactPointOption
Enumerated options related to a ContactPoint.
*)
IContactPointOption=Interface (IEnumeration)
function TangContactPointOption:TangibleValue;
end;
(*** end IContactPointOption ***)
IDayOfWeek=interface; //forward
(* OpeningHoursSpecification
*)
IOpeningHoursSpecification=Interface (IStructuredValue)
(*The opening hour of the place or service on the given day(s) of the week.*)
function Get_opens:TDateTime;
procedure Set_opens(v:TDateTime);
(*The day of the week for which these opening hours are valid.*)
function Get_dayOfWeek:IDayOfWeek;
procedure Set_dayOfWeek(v:IDayOfWeek);
(*The closing hour of the place or service on the given day(s) of the week.*)
function Get_closes:TDateTime;
procedure Set_closes(v:TDateTime);
// properties
property opens:TDateTime read Get_opens write Set_opens;
property dayOfWeek:IDayOfWeek read Get_dayOfWeek write Set_dayOfWeek;
property closes:TDateTime read Get_closes write Set_closes;
end;
(*** end IOpeningHoursSpecification ***)
(* DayOfWeek
*)
IDayOfWeek=Interface (IEnumeration)
function TangDayOfWeek:TangibleValue;
end;
(*** end IDayOfWeek ***)
IGeoShape=interface; //forward
IImageObject=interface; //forward
(* Place
Entities that have a somewhat fixed, physical extension.
*)
IPlace=Interface (IThing)
(*A URL to a map of the place.*)
function Get_map:String;
procedure Set_map(v:String);
(*A URL to a map of the place.*)
function Get_maps:String;
procedure Set_maps(v:String);
(*The opening hours of a certain place.*)
function Get_openingHoursSpecification:IOpeningHoursSpecification;
procedure Set_openingHoursSpecification(v:IOpeningHoursSpecification);
(*The geo coordinates of the place.*)
function Get_geo:IGeoShape;
procedure Set_geo(v:IGeoShape);
(*The fax number.*)
function Get_faxNumber:String;
procedure Set_faxNumber(v:String);
(**)
function Get_specialOpeningHoursSpecification:IOpeningHoursSpecification;
procedure Set_specialOpeningHoursSpecification(v:IOpeningHoursSpecification);
(*The telephone number.*)
function Get_telephone:String;
procedure Set_telephone(v:String);
(**)
function Get_branchCode:String;
procedure Set_branchCode(v:String);
(*The total number of individuals that may attend an event or venue.*)
function Get_maximumAttendeeCapacity:Integer;
procedure Set_maximumAttendeeCapacity(v:Integer);
(*Photographs of this place.*)
function Get_photos:IImageObject;
procedure Set_photos(v:IImageObject);
(*Indicates whether it is allowed to smoke in the place, e.g. in the
restaurant, hotel or hotel room.*)
function Get_smokingAllowed:Boolean;
procedure Set_smokingAllowed(v:Boolean);
(*The basic containment relation between a place and one that contains it.*)
function Get_containedIn:IPlace;
procedure Set_containedIn(v:IPlace);
(*The basic containment relation between a place and another that it contains.*)
function Get_containsPlace:IPlace;
procedure Set_containsPlace(v:IPlace);
// properties
property map:String read Get_map write Set_map;
property maps:String read Get_maps write Set_maps;
property openingHoursSpecification:IOpeningHoursSpecification read Get_openingHoursSpecification write Set_openingHoursSpecification;
property geo:IGeoShape read Get_geo write Set_geo;
property faxNumber:String read Get_faxNumber write Set_faxNumber;
property specialOpeningHoursSpecification:IOpeningHoursSpecification read Get_specialOpeningHoursSpecification write Set_specialOpeningHoursSpecification;
property telephone:String read Get_telephone write Set_telephone;
property branchCode:String read Get_branchCode write Set_branchCode;
property maximumAttendeeCapacity:Integer read Get_maximumAttendeeCapacity write Set_maximumAttendeeCapacity;
property photos:IImageObject read Get_photos write Set_photos;
property smokingAllowed:Boolean read Get_smokingAllowed write Set_smokingAllowed;
property containedIn:IPlace read Get_containedIn write Set_containedIn;
property containsPlace:IPlace read Get_containsPlace write Set_containsPlace;
end;
(*** end IPlace ***)
IPostalAddress=interface; //forward
(* GeoShape
The geographic shape of a place. A GeoShape can be described using several
properties whose values are based on latitude/longitude pairs. Either
whitespace or commas can be used to separate latitude and longitude; whitespace
should be used when writing a list of several such points.
*)
IGeoShape=Interface (IStructuredValue)
(**)
function Get_addressCountry:ICountry;
procedure Set_addressCountry(v:ICountry);
(*A polygon is the area enclosed by a point-to-point path for which the
starting and ending points are the same. A polygon is expressed as a series of
four or more space delimited points where the first and final points are
identical.*)
function Get_polygon:String;
procedure Set_polygon(v:String);
(*Physical address of the item.*)
function Get_address:IPostalAddress;
procedure Set_address(v:IPostalAddress);
(*A line is a point-to-point path consisting of two or more points. A line is
expressed as a series of two or more point objects separated by space.*)
function Get_line:String;
procedure Set_line(v:String);
(*A circle is the circular region of a specified radius centered at a specified
latitude and longitude. A circle is expressed as a pair followed by a radius in
meters.*)
function Get_circle:String;
procedure Set_circle(v:String);
(**)
function Get_elevation:INumber;
procedure Set_elevation(v:INumber);
(*A box is the area enclosed by the rectangle formed by two points. The first
point is the lower corner, the second point is the upper corner. A box is
expressed as two points separated by a space character.*)
function Get_box:String;
procedure Set_box(v:String);
// properties
property addressCountry:ICountry read Get_addressCountry write Set_addressCountry;
property polygon:String read Get_polygon write Set_polygon;
property address:IPostalAddress read Get_address write Set_address;
property line:String read Get_line write Set_line;
property circle:String read Get_circle write Set_circle;
property elevation:INumber read Get_elevation write Set_elevation;
property box:String read Get_box write Set_box;
end;
(*** end IGeoShape ***)
(* AdministrativeArea
A geographical region, typically under the jurisdiction of a particular
government.
*)
IAdministrativeArea=Interface (IPlace)
(*No atribs*)
end;
(*** end IAdministrativeArea ***)
(* Country
A country.
*)
ICountry=Interface (IAdministrativeArea)
(*No atribs*)
end;
(*** end ICountry ***)
(* PostalAddress
The mailing address.
*)
IPostalAddress=Interface (IContactPoint)
(*The region. For example, CA.*)
function Get_addressRegion:String;
procedure Set_addressRegion(v:String);
(*The street address. For example, 1600 Amphitheatre Pkwy.*)
function Get_streetAddress:String;
procedure Set_streetAddress(v:String);
(*The post office box number for PO box addresses.*)
function Get_postOfficeBoxNumber:String;
procedure Set_postOfficeBoxNumber(v:String);
(*The locality. For example, Mountain View.*)
function Get_addressLocality:String;
procedure Set_addressLocality(v:String);
// properties
property addressRegion:String read Get_addressRegion write Set_addressRegion;
property streetAddress:String read Get_streetAddress write Set_streetAddress;
property postOfficeBoxNumber:String read Get_postOfficeBoxNumber write Set_postOfficeBoxNumber;
property addressLocality:String read Get_addressLocality write Set_addressLocality;
end;
(*** end IPostalAddress ***)
(* Number
Data type: Number.
*)
INumber=Interface
(*No atribs*)
end;
(*** end INumber ***)
INewsArticle=interface; //forward
(* MediaObject
A media object, such as an image, video, or audio object embedded in a web page
or a downloadable dataset i.e. DataDownload. Note that a creative work may have
many media objects associated with it on the same web page. For example, a page
about a single song (MusicRecording) may have a music video (VideoObject), and
a high and low bandwidth audio stream (2 AudioObject's).
*)
IMediaObject=Interface (ICreativeWork)
(*mp3, mpeg4, etc.*)
function Get_encodingFormat:String;
procedure Set_encodingFormat(v:String);
(*The bitrate of the media object.*)
function Get_bitrate:String;
procedure Set_bitrate(v:String);
(**)
function Get_regionsAllowed:IPlace;
procedure Set_regionsAllowed(v:IPlace);
(*Date the content expires and is no longer useful or available. Useful for
videos.*)
function Get_expires:TDateTime;
procedure Set_expires(v:TDateTime);
(**)
function Get_requiresSubscription:Boolean;
procedure Set_requiresSubscription(v:Boolean);
(*Date when this media object was uploaded to this site.*)
function Get_uploadDate:TDateTime;
procedure Set_uploadDate(v:TDateTime);
(*A NewsArticle associated with the Media Object.*)
function Get_associatedArticle:INewsArticle;
procedure Set_associatedArticle(v:INewsArticle);
(*The CreativeWork encoded by this media object.*)
function Get_encodesCreativeWork:ICreativeWork;
procedure Set_encodesCreativeWork(v:ICreativeWork);
(*Actual bytes of the media object, for example the image file or video file.*)
function Get_contentUrl:String;
procedure Set_contentUrl(v:String);
(**)
function Get_embedUrl:String;
procedure Set_embedUrl(v:String);
(*Player type required&#x2014;for example, Flash or Silverlight.*)
function Get_playerType:String;
procedure Set_playerType(v:String);
(*File size in (mega/kilo) bytes.*)
function Get_contentSize:String;
procedure Set_contentSize(v:String);
// properties
property encodingFormat:String read Get_encodingFormat write Set_encodingFormat;
property bitrate:String read Get_bitrate write Set_bitrate;
property regionsAllowed:IPlace read Get_regionsAllowed write Set_regionsAllowed;
property expires:TDateTime read Get_expires write Set_expires;
property requiresSubscription:Boolean read Get_requiresSubscription write Set_requiresSubscription;
property uploadDate:TDateTime read Get_uploadDate write Set_uploadDate;
property associatedArticle:INewsArticle read Get_associatedArticle write Set_associatedArticle;
property encodesCreativeWork:ICreativeWork read Get_encodesCreativeWork write Set_encodesCreativeWork;
property contentUrl:String read Get_contentUrl write Set_contentUrl;
property embedUrl:String read Get_embedUrl write Set_embedUrl;
property playerType:String read Get_playerType write Set_playerType;
property contentSize:String read Get_contentSize write Set_contentSize;
end;
(*** end IMediaObject ***)
(* Article
*)
IArticle=Interface (ICreativeWork)
(*The number of words in the text of the Article.*)
function Get_wordCount:Integer;
procedure Set_wordCount(v:Integer);
(*The page on which the work ends; for example "138" or "xvi".*)
function Get_pageEnd:String;
procedure Set_pageEnd(v:String);
(*Articles may belong to one or more 'sections' in a magazine or newspaper,
such as Sports, Lifestyle, etc.*)
function Get_articleSection:String;
procedure Set_articleSection(v:String);
(*The actual body of the article.*)
function Get_articleBody:String;
procedure Set_articleBody(v:String);
// properties
property wordCount:Integer read Get_wordCount write Set_wordCount;
property pageEnd:String read Get_pageEnd write Set_pageEnd;
property articleSection:String read Get_articleSection write Set_articleSection;
property articleBody:String read Get_articleBody write Set_articleBody;
end;
(*** end IArticle ***)
(* NewsArticle
A news article.
*)
INewsArticle=Interface (IArticle)
(*The edition of the print product in which the NewsArticle appears.*)
function Get_printEdition:String;
procedure Set_printEdition(v:String);
(*The number of the column in which the NewsArticle appears in the print
edition.*)
function Get_printColumn:String;
procedure Set_printColumn(v:String);
(*If this NewsArticle appears in print, this field indicates the name of the
page on which the article is found. Please note that this field is intended for
the exact page name (e.g. A5, B18).*)
function Get_printPage:String;
procedure Set_printPage(v:String);
(*If this NewsArticle appears in print, this field indicates the print section
in which the article appeared.*)
function Get_printSection:String;
procedure Set_printSection(v:String);
(*The location where the NewsArticle was produced.*)
function Get_dateline:String;
procedure Set_dateline(v:String);
// properties
property printEdition:String read Get_printEdition write Set_printEdition;
property printColumn:String read Get_printColumn write Set_printColumn;
property printPage:String read Get_printPage write Set_printPage;
property printSection:String read Get_printSection write Set_printSection;
property dateline:String read Get_dateline write Set_dateline;
end;
(*** end INewsArticle ***)
(* ImageObject
An image file.
*)
IImageObject=Interface (IMediaObject)
(*The caption for this object.*)
function Get_caption:String;
procedure Set_caption(v:String);
(*exif data for this object.*)
function Get_exifData:String;
procedure Set_exifData(v:String);
(*Indicates whether this image is representative of the content of the page.*)
function Get_representativeOfPage:Boolean;
procedure Set_representativeOfPage(v:Boolean);
// properties
property caption:String read Get_caption write Set_caption;
property exifData:String read Get_exifData write Set_exifData;
property representativeOfPage:Boolean read Get_representativeOfPage write Set_representativeOfPage;
end;
(*** end IImageObject ***)
IOfferCatalog=interface; //forward
IDemand=interface; //forward
IOffer=interface; //forward
(* Organization
An organization such as a school, NGO, corporation, club, etc.
*)
IOrganization=Interface (IThing)
(*Email address.*)
function Get_email:String;
procedure Set_email(v:String);
(*Indicates an OfferCatalog listing for this Organization, Person, or Service.*)
function Get_hasOfferCatalog:IOfferCatalog;
procedure Set_hasOfferCatalog(v:IOfferCatalog);
(*An organization identifier that uniquely identifies a legal entity as defined
in ISO 17442.*)
function Get_leiCode:String;
procedure Set_leiCode(v:String);
(*Products owned by the organization or person.*)
function Get_owns:IProduct;
procedure Set_owns(v:IProduct);
(*A person who founded this organization.*)
function Get_founders:IPerson;
procedure Set_founders(v:IPerson);
(*A member of this organization.*)
function Get_members:IOrganization;
procedure Set_members(v:IOrganization);
(*Points-of-Sales operated by the organization or person.*)
function Get_hasPOS:IPlace;
procedure Set_hasPOS(v:IPlace);
(*The date that this organization was dissolved.*)
function Get_dissolutionDate:TDateTime;
procedure Set_dissolutionDate(v:TDateTime);
(*An associated logo.*)
function Get_logo:IImageObject;
procedure Set_logo(v:IImageObject);
(*The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or
the CIF/NIF in Spain.*)
function Get_taxID:String;
procedure Set_taxID(v:String);
(*The brand(s) associated with a product or service, or the brand(s) maintained
by an organization or business person.*)
function Get_brand:IOrganization;
procedure Set_brand(v:IOrganization);
(**)
function Get_globalLocationNumber:String;
procedure Set_globalLocationNumber(v:String);
(*The Dun &amp; Bradstreet DUNS number for identifying an organization or
business person.*)
function Get_duns:String;
procedure Set_duns(v:String);
(*The date that this organization was founded.*)
function Get_foundingDate:TDateTime;
procedure Set_foundingDate(v:TDateTime);
(*Upcoming or past events associated with this place or organization.*)
function Get_events:IEvent;
procedure Set_events(v:IEvent);
(*People working for this organization.*)
function Get_employees:IPerson;
procedure Set_employees(v:IPerson);
(*The official name of the organization, e.g. the registered company name.*)
function Get_legalName:String;
procedure Set_legalName(v:String);
(*A relationship between an organization and a department of that organization,
also described as an organization (allowing different urls, logos, opening
hours). For example: a store with a pharmacy, or a bakery with a cafe.*)
function Get_department:IOrganization;
procedure Set_department(v:IOrganization);
(*A pointer to products or services sought by the organization or person
(demand).*)
function Get_seeks:IDemand;
procedure Set_seeks(v:IDemand);
(*A contact point for a person or organization.*)
function Get_contactPoints:IContactPoint;
procedure Set_contactPoints(v:IContactPoint);
(*The place where the Organization was founded.*)
function Get_foundingLocation:IPlace;
procedure Set_foundingLocation(v:IPlace);
(*A relationship between two organizations where the first includes the second,
e.g., as a subsidiary. See also: the more specific 'department' property.*)
function Get_subOrganization:IOrganization;
procedure Set_subOrganization(v:IOrganization);
(*A pointer to products or services offered by the organization or person.*)
function Get_makesOffer:IOffer;
procedure Set_makesOffer(v:IOffer);
// properties
property email:String read Get_email write Set_email;
property hasOfferCatalog:IOfferCatalog read Get_hasOfferCatalog write Set_hasOfferCatalog;
property leiCode:String read Get_leiCode write Set_leiCode;
property owns:IProduct read Get_owns write Set_owns;
property founders:IPerson read Get_founders write Set_founders;
property members:IOrganization read Get_members write Set_members;
property hasPOS:IPlace read Get_hasPOS write Set_hasPOS;
property dissolutionDate:TDateTime read Get_dissolutionDate write Set_dissolutionDate;
property logo:IImageObject read Get_logo write Set_logo;
property taxID:String read Get_taxID write Set_taxID;
property brand:IOrganization read Get_brand write Set_brand;
property globalLocationNumber:String read Get_globalLocationNumber write Set_globalLocationNumber;
property duns:String read Get_duns write Set_duns;
property foundingDate:TDateTime read Get_foundingDate write Set_foundingDate;
property events:IEvent read Get_events write Set_events;
property employees:IPerson read Get_employees write Set_employees;
property legalName:String read Get_legalName write Set_legalName;
property department:IOrganization read Get_department write Set_department;
property seeks:IDemand read Get_seeks write Set_seeks;
property contactPoints:IContactPoint read Get_contactPoints write Set_contactPoints;
property foundingLocation:IPlace read Get_foundingLocation write Set_foundingLocation;
property subOrganization:IOrganization read Get_subOrganization write Set_subOrganization;
property makesOffer:IOffer read Get_makesOffer write Set_makesOffer;
end;
(*** end IOrganization ***)
(* ItemList
A list of items of any sort&#x2014;for example, Top 10 Movies About
Weathermen, or Top 100 Party Songs. Not to be confused with HTML lists, which
are often used only for formatting.
*)
IItemList=Interface (IIntangible)
(*The number of items in an ItemList. Note that some descriptions might not
fully describe all items in a list (e.g., multi-page pagination); in such
cases, the numberOfItems would be for the entire list.*)
function Get_numberOfItems:Integer;
procedure Set_numberOfItems(v:Integer);
(*Type of ordering (e.g. Ascending, Descending, Unordered).*)
function Get_itemListOrder:String;
procedure Set_itemListOrder(v:String);
(**)
function Get_itemListElement:IThing;
procedure Set_itemListElement(v:IThing);
// properties
property numberOfItems:Integer read Get_numberOfItems write Set_numberOfItems;
property itemListOrder:String read Get_itemListOrder write Set_itemListOrder;
property itemListElement:IThing read Get_itemListElement write Set_itemListElement;
end;
(*** end IItemList ***)
(* OfferCatalog
An OfferCatalog is an ItemList that contains related Offers and/or further
OfferCatalogs that are offeredBy the same provider.
*)
IOfferCatalog=Interface (IItemList)
function TangOfferCatalog:TangibleValue;
end;
(*** end IOfferCatalog ***)
IProductModel=interface; //forward
IService=interface; //forward
IQuantitativeValue=interface; //forward
(* Product
Any offered product or service. For example: a pair of shoes; a concert ticket;
the rental of a car; a haircut; or an episode of a TV show streamed online.
*)
IProduct=Interface (IThing)
(*The color of the product.*)
function Get_color:String;
procedure Set_color(v:String);
(*The release date of a product or product model. This can be used to
distinguish the exact variant of a product.*)
function Get_releaseDate:TDateTime;
procedure Set_releaseDate(v:TDateTime);
(*The model of the product. Use with the URL of a ProductModel or a textual
representation of the model identifier. The URL of the ProductModel can be from
an external source. It is recommended to additionally provide strong product
identifiers via the gtin8/gtin13/gtin14 and mpn properties.*)
function Get_model:IProductModel;
procedure Set_model(v:IProductModel);
(*A category for the item. Greater signs or slashes can be used to informally
indicate a category hierarchy.*)
function Get_category:IThing;
procedure Set_category(v:IThing);
(*A pointer to another product (or multiple products) for which this product is
an accessory or spare part.*)
function Get_isAccessoryOrSparePartFor:IProduct;
procedure Set_isAccessoryOrSparePartFor(v:IProduct);
(**)
function Get_gtin8:String;
procedure Set_gtin8(v:String);
(*A pointer to another, functionally similar product (or multiple products).*)
function Get_isSimilarTo:IService;
procedure Set_isSimilarTo(v:IService);
(*The weight of the product or person.*)
function Get_weight:IQuantitativeValue;
procedure Set_weight(v:IQuantitativeValue);
(*A pointer to another product (or multiple products) for which this product is
a consumable.*)
function Get_isConsumableFor:IProduct;
procedure Set_isConsumableFor(v:IProduct);
(**)
function Get_gtin12:String;
procedure Set_gtin12(v:String);
(**)
function Get_productID:String;
procedure Set_productID(v:String);
// properties
property color:String read Get_color write Set_color;
property releaseDate:TDateTime read Get_releaseDate write Set_releaseDate;
property model:IProductModel read Get_model write Set_model;
property category:IThing read Get_category write Set_category;
property isAccessoryOrSparePartFor:IProduct read Get_isAccessoryOrSparePartFor write Set_isAccessoryOrSparePartFor;
property gtin8:String read Get_gtin8 write Set_gtin8;
property isSimilarTo:IService read Get_isSimilarTo write Set_isSimilarTo;
property weight:IQuantitativeValue read Get_weight write Set_weight;
property isConsumableFor:IProduct read Get_isConsumableFor write Set_isConsumableFor;
property gtin12:String read Get_gtin12 write Set_gtin12;
property productID:String read Get_productID write Set_productID;
end;
(*** end IProduct ***)
(* ProductModel
A datasheet or vendor specification of a product (in the sense of a
prototypical description).
*)
IProductModel=Interface (IProduct)
(*A pointer from a previous, often discontinued variant of the product to its
newer variant.*)
function Get_predecessorOf:IProductModel;
procedure Set_predecessorOf(v:IProductModel);
(*A pointer to a base product from which this product is a variant. It is safe
to infer that the variant inherits all product features from the base model,
unless defined locally. This is not transitive.*)
function Get_isVariantOf:IProductModel;
procedure Set_isVariantOf(v:IProductModel);
(*A pointer from a newer variant of a product to its previous, often
discontinued predecessor.*)
function Get_successorOf:IProductModel;
procedure Set_successorOf(v:IProductModel);
// properties
property predecessorOf:IProductModel read Get_predecessorOf write Set_predecessorOf;
property isVariantOf:IProductModel read Get_isVariantOf write Set_isVariantOf;
property successorOf:IProductModel read Get_successorOf write Set_successorOf;
end;
(*** end IProductModel ***)
IAudience=interface; //forward
IServiceChannel=interface; //forward
(* Service
A service provided by an organization, e.g. delivery service, print services,
etc.
*)
IService=Interface (IIntangible)
(*A pointer to another, somehow related product (or multiple products).*)
function Get_isRelatedTo:IService;
procedure Set_isRelatedTo(v:IService);
(*The tangible thing generated by the service, e.g. a passport, permit, etc.*)
function Get_produces:IThing;
procedure Set_produces(v:IThing);
(*The audience eligible for this service.*)
function Get_serviceAudience:IAudience;
procedure Set_serviceAudience(v:IAudience);
(*Indicates the mobility of a provided service (e.g. 'static', 'dynamic').*)
function Get_providerMobility:String;
procedure Set_providerMobility(v:String);
(*A means of accessing the service (e.g. a phone bank, a web site, a location,
etc.).*)
function Get_availableChannel:IServiceChannel;
procedure Set_availableChannel(v:IServiceChannel);
(*The type of service being offered, e.g. veterans' benefits, emergency relief,
etc.*)
function Get_serviceType:String;
procedure Set_serviceType(v:String);
// properties
property isRelatedTo:IService read Get_isRelatedTo write Set_isRelatedTo;
property produces:IThing read Get_produces write Set_produces;
property serviceAudience:IAudience read Get_serviceAudience write Set_serviceAudience;
property providerMobility:String read Get_providerMobility write Set_providerMobility;
property availableChannel:IServiceChannel read Get_availableChannel write Set_availableChannel;
property serviceType:String read Get_serviceType write Set_serviceType;
end;
(*** end IService ***)
(* Audience
Intended audience for an item, i.e. the group for whom the item was created.
*)
IAudience=Interface (IIntangible)
(*The target group associated with a given audience (e.g. veterans, car owners,
musicians, etc.).*)
function Get_audienceType:String;
procedure Set_audienceType(v:String);
(*The geographic area associated with the audience.*)
function Get_geographicArea:IAdministrativeArea;
procedure Set_geographicArea(v:IAdministrativeArea);
// properties
property audienceType:String read Get_audienceType write Set_audienceType;
property geographicArea:IAdministrativeArea read Get_geographicArea write Set_geographicArea;
end;
(*** end IAudience ***)
(* ServiceChannel
A means for accessing a service, e.g. a government office location, web site,
or phone number.
*)
IServiceChannel=Interface (IIntangible)
(*The phone number to use to access the service.*)
function Get_servicePhone:IContactPoint;
procedure Set_servicePhone(v:IContactPoint);
(*The location (e.g. civic structure, local business, etc.) where a person can
go to access the service.*)
function Get_serviceLocation:IPlace;
procedure Set_serviceLocation(v:IPlace);
(*The number to access the service by text message.*)
function Get_serviceSmsNumber:IContactPoint;
procedure Set_serviceSmsNumber(v:IContactPoint);
(*The website to access the service.*)
function Get_serviceUrl:String;
procedure Set_serviceUrl(v:String);
(*The address for accessing the service by mail.*)
function Get_servicePostalAddress:IPostalAddress;
procedure Set_servicePostalAddress(v:IPostalAddress);
(*The service provided by this channel.*)
function Get_providesService:IService;
procedure Set_providesService(v:IService);
(*Estimated processing time for the service using this channel.*)
function Get_processingTime:IDuration;
procedure Set_processingTime(v:IDuration);
// properties
property servicePhone:IContactPoint read Get_servicePhone write Set_servicePhone;
property serviceLocation:IPlace read Get_serviceLocation write Set_serviceLocation;
property serviceSmsNumber:IContactPoint read Get_serviceSmsNumber write Set_serviceSmsNumber;
property serviceUrl:String read Get_serviceUrl write Set_serviceUrl;
property servicePostalAddress:IPostalAddress read Get_servicePostalAddress write Set_servicePostalAddress;
property providesService:IService read Get_providesService write Set_providesService;
property processingTime:IDuration read Get_processingTime write Set_processingTime;
end;
(*** end IServiceChannel ***)
(* Quantity
Quantities such as distance, time, mass, weight, etc. Particular instances of
say Mass are entities like '3 Kg' or '4 milligrams'.
*)
IQuantity=Interface (IIntangible)
function TangQuantity:TangibleValue;
end;
(*** end IQuantity ***)
(* Duration
*)
IDuration=Interface (IQuantity)
function TangDuration:TangibleValue;
end;
(*** end IDuration ***)
(* QuantitativeValue
A point value or interval for product characteristics and other purposes.
*)
IQuantitativeValue=Interface (IStructuredValue)
(*The upper value of some characteristic or property.*)
function Get_maxValue:INumber;
procedure Set_maxValue(v:INumber);
(*A pointer to a secondary value that provides additional information on the
original value, e.g. a reference temperature.*)
function Get_valueReference:IQuantitativeValue;
procedure Set_valueReference(v:IQuantitativeValue);
(**)
function Get_unitText:String;
procedure Set_unitText(v:String);
// properties
property maxValue:INumber read Get_maxValue write Set_maxValue;
property valueReference:IQuantitativeValue read Get_valueReference write Set_valueReference;
property unitText:String read Get_unitText write Set_unitText;
end;
(*** end IQuantitativeValue ***)
IEventStatusType=interface; //forward
(* Event
*)
IEvent=Interface (IThing)
(*An eventStatus of an event represents its status; particularly useful when an
event is cancelled or rescheduled.*)
function Get_eventStatus:IEventStatusType;
procedure Set_eventStatus(v:IEventStatusType);
(*A person attending the event.*)
function Get_attendees:IOrganization;
procedure Set_attendees(v:IOrganization);
(*The person or organization who wrote a composition, or who is the composer of
a work performed at some event.*)
function Get_composer:IOrganization;
procedure Set_composer(v:IOrganization);
(**)
function Get_startDate:TDateTime;
procedure Set_startDate(v:TDateTime);
(*Used in conjunction with eventStatus for rescheduled or cancelled events.
This property contains the previously scheduled start date. For rescheduled
events, the startDate property should be used for the newly scheduled start
date. In the (rare) case of an event that has been postponed and rescheduled
multiple times, this field may be repeated.*)
function Get_previousStartDate:TDateTime;
procedure Set_previousStartDate(v:TDateTime);
(*The main performer or performers of the event&#x2014;for example, a
presenter, musician, or actor.*)
function Get_performers:IPerson;
procedure Set_performers(v:IPerson);
(*Events that are a part of this event. For example, a conference event
includes many presentations, each subEvents of the conference.*)
function Get_subEvents:IEvent;
procedure Set_subEvents(v:IEvent);
(*A secondary contributor to the CreativeWork or Event.*)
function Get_contributor:IOrganization;
procedure Set_contributor(v:IOrganization);
(*An organizer of an Event.*)
function Get_organizer:IOrganization;
procedure Set_organizer(v:IOrganization);
(*The typical expected age range, e.g. '7-9', '11-'.*)
function Get_typicalAgeRange:String;
procedure Set_typicalAgeRange(v:String);
(*An offer to provide this item&#x2014;for example, an offer to sell a
product, rent the DVD of a movie, perform a service, or give away tickets to an
event.*)
function Get_offers:IOffer;
procedure Set_offers(v:IOffer);
(*The number of attendee places for an event that remain unallocated.*)
function Get_remainingAttendeeCapacity:Integer;
procedure Set_remainingAttendeeCapacity(v:Integer);
(*A work performed in some event, for example a play performed in a
TheaterEvent.*)
function Get_workPerformed:ICreativeWork;
procedure Set_workPerformed(v:ICreativeWork);
(*The time admission will commence.*)
function Get_doorTime:TDateTime;
procedure Set_doorTime(v:TDateTime);
(*An event that this event is a part of. For example, a collection of
individual music performances might each have a music festival as their
superEvent.*)
function Get_superEvent:IEvent;
procedure Set_superEvent(v:IEvent);
(*The CreativeWork that captured all or part of this Event.*)
function Get_recordedIn:ICreativeWork;
procedure Set_recordedIn(v:ICreativeWork);
// properties
property eventStatus:IEventStatusType read Get_eventStatus write Set_eventStatus;
property attendees:IOrganization read Get_attendees write Set_attendees;
property composer:IOrganization read Get_composer write Set_composer;
property startDate:TDateTime read Get_startDate write Set_startDate;
property previousStartDate:TDateTime read Get_previousStartDate write Set_previousStartDate;
property performers:IPerson read Get_performers write Set_performers;
property subEvents:IEvent read Get_subEvents write Set_subEvents;
property contributor:IOrganization read Get_contributor write Set_contributor;
property organizer:IOrganization read Get_organizer write Set_organizer;
property typicalAgeRange:String read Get_typicalAgeRange write Set_typicalAgeRange;
property offers:IOffer read Get_offers write Set_offers;
property remainingAttendeeCapacity:Integer read Get_remainingAttendeeCapacity write Set_remainingAttendeeCapacity;
property workPerformed:ICreativeWork read Get_workPerformed write Set_workPerformed;
property doorTime:TDateTime read Get_doorTime write Set_doorTime;
property superEvent:IEvent read Get_superEvent write Set_superEvent;
property recordedIn:ICreativeWork read Get_recordedIn write Set_recordedIn;
end;
(*** end IEvent ***)
(* EventStatusType
EventStatusType is an enumeration type whose instances represent several states
that an Event may be in.
*)
IEventStatusType=Interface (IEnumeration)
function TangEventStatusType:TangibleValue;
end;
(*** end IEventStatusType ***)
IAggregateRating=interface; //forward
IDeliveryMethod=interface; //forward
IPaymentMethod=interface; //forward
(* Offer
*)
IOffer=Interface (IIntangible)
(*The overall rating, based on a collection of reviews or ratings, of the
item.*)
function Get_aggregateRating:IAggregateRating;
procedure Set_aggregateRating(v:IAggregateRating);
(*The beginning of the availability of the product or service included in the
offer.*)
function Get_availabilityStarts:TDateTime;
procedure Set_availabilityStarts(v:TDateTime);
(*The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a
product or service, or the product to which the offer refers.*)
function Get_sku:String;
procedure Set_sku(v:String);
(*The item being offered.*)
function Get_itemOffered:IProduct;
procedure Set_itemOffered(v:IProduct);
(*The place(s) from which the offer can be obtained (e.g. store locations).*)
function Get_availableAtOrFrom:IPlace;
procedure Set_availableAtOrFrom(v:IPlace);
(*An additional offer that can only be obtained in combination with the first
base offer (e.g. supplements and extensions that are available for a
surcharge).*)
function Get_addOn:IOffer;
procedure Set_addOn(v:IOffer);
(*The interval and unit of measurement of ordering quantities for which the
offer or price specification is valid. This allows e.g. specifying that a
certain freight charge is valid only for a certain quantity.*)
function Get_eligibleQuantity:IQuantitativeValue;
procedure Set_eligibleQuantity(v:IQuantitativeValue);
(*The delivery method(s) available for this offer.*)
function Get_availableDeliveryMethod:IDeliveryMethod;
procedure Set_availableDeliveryMethod(v:IDeliveryMethod);
(*The typical delay between the receipt of the order and the goods either
leaving the warehouse or being prepared for pickup, in case the delivery method
is on site pickup.*)
function Get_deliveryLeadTime:IQuantitativeValue;
procedure Set_deliveryLeadTime(v:IQuantitativeValue);
(*The payment method(s) accepted by seller for this offer.*)
function Get_acceptedPaymentMethod:IPaymentMethod;
procedure Set_acceptedPaymentMethod(v:IPaymentMethod);
(*The amount of time that is required between accepting the offer and the
actual usage of the resource or service.*)
function Get_advanceBookingRequirement:IQuantitativeValue;
procedure Set_advanceBookingRequirement(v:IQuantitativeValue);
(*The date after which the price is no longer available.*)
function Get_priceValidUntil:TDateTime;
procedure Set_priceValidUntil(v:TDateTime);
// properties
property aggregateRating:IAggregateRating read Get_aggregateRating write Set_aggregateRating;
property availabilityStarts:TDateTime read Get_availabilityStarts write Set_availabilityStarts;
property sku:String read Get_sku write Set_sku;
property itemOffered:IProduct read Get_itemOffered write Set_itemOffered;
property availableAtOrFrom:IPlace read Get_availableAtOrFrom write Set_availableAtOrFrom;
property addOn:IOffer read Get_addOn write Set_addOn;
property eligibleQuantity:IQuantitativeValue read Get_eligibleQuantity write Set_eligibleQuantity;
property availableDeliveryMethod:IDeliveryMethod read Get_availableDeliveryMethod write Set_availableDeliveryMethod;
property deliveryLeadTime:IQuantitativeValue read Get_deliveryLeadTime write Set_deliveryLeadTime;
property acceptedPaymentMethod:IPaymentMethod read Get_acceptedPaymentMethod write Set_acceptedPaymentMethod;
property advanceBookingRequirement:IQuantitativeValue read Get_advanceBookingRequirement write Set_advanceBookingRequirement;
property priceValidUntil:TDateTime read Get_priceValidUntil write Set_priceValidUntil;
end;
(*** end IOffer ***)
(* AggregateRating
The average rating based on multiple ratings or reviews.
*)
IAggregateRating=Interface (IRating)
(*The count of total number of ratings.*)
function Get_ratingCount:Integer;
procedure Set_ratingCount(v:Integer);
(*The count of total number of reviews.*)
function Get_reviewCount:Integer;
procedure Set_reviewCount(v:Integer);
// properties
property ratingCount:Integer read Get_ratingCount write Set_ratingCount;
property reviewCount:Integer read Get_reviewCount write Set_reviewCount;
end;
(*** end IAggregateRating ***)
(* DeliveryMethod
*)
IDeliveryMethod=Interface (IEnumeration)
function TangDeliveryMethod:TangibleValue;
end;
(*** end IDeliveryMethod ***)
(* PaymentMethod
*)
IPaymentMethod=Interface (IEnumeration)
function TangPaymentMethod:TangibleValue;
end;
(*** end IPaymentMethod ***)
IOfferItemCondition=interface; //forward
IItemAvailability=interface; //forward
ITypeAndQuantityNode=interface; //forward
IBusinessEntityType=interface; //forward
(* Demand
A demand entity represents the public, not necessarily binding, not necessarily
exclusive, announcement by an organization or person to seek a certain type of
goods or services. For describing demand using this type, the very same
properties used for Offer apply.
*)
IDemand=Interface (IIntangible)
(*The end of the availability of the product or service included in the offer.*)
function Get_availabilityEnds:TDateTime;
procedure Set_availabilityEnds(v:TDateTime);
(*A predefined value from OfferItemCondition or a textual description of the
condition of the product or service, or the products or services included in
the offer.*)
function Get_itemCondition:IOfferItemCondition;
procedure Set_itemCondition(v:IOfferItemCondition);
(*The duration for which the given offer is valid.*)
function Get_eligibleDuration:IQuantitativeValue;
procedure Set_eligibleDuration(v:IQuantitativeValue);
(*The Manufacturer Part Number (MPN) of the product, or the product to which
the offer refers.*)
function Get_mpn:String;
procedure Set_mpn(v:String);
(**)
function Get_gtin13:String;
procedure Set_gtin13(v:String);
(**)
function Get_gtin14:String;
procedure Set_gtin14(v:String);
(*The date when the item becomes valid.*)
function Get_validFrom:TDateTime;
procedure Set_validFrom(v:TDateTime);
(**)
function Get_ineligibleRegion:IPlace;
procedure Set_ineligibleRegion(v:IPlace);
(*The availability of this item&#x2014;for example In stock, Out of stock,
Pre-order, etc.*)
function Get_availability:IItemAvailability;
procedure Set_availability(v:IItemAvailability);
(*The transaction volume, in a monetary unit, for which the offer or price
specification is valid, e.g. for indicating a minimal purchasing volume, to
express free shipping above a certain order volume, or to limit the acceptance
of credit cards to purchases to a certain minimal amount.*)
function Get_eligibleTransactionVolume:IPriceSpecification;
procedure Set_eligibleTransactionVolume(v:IPriceSpecification);
(*This links to a node or nodes indicating the exact quantity of the products
included in the offer.*)
function Get_includesObject:ITypeAndQuantityNode;
procedure Set_includesObject(v:ITypeAndQuantityNode);
(*The type(s) of customers for which the given offer is valid.*)
function Get_eligibleCustomerType:IBusinessEntityType;
procedure Set_eligibleCustomerType(v:IBusinessEntityType);
(*The current approximate inventory level for the item or items.*)
function Get_inventoryLevel:IQuantitativeValue;
procedure Set_inventoryLevel(v:IQuantitativeValue);
// properties
property availabilityEnds:TDateTime read Get_availabilityEnds write Set_availabilityEnds;
property itemCondition:IOfferItemCondition read Get_itemCondition write Set_itemCondition;
property eligibleDuration:IQuantitativeValue read Get_eligibleDuration write Set_eligibleDuration;
property mpn:String read Get_mpn write Set_mpn;
property gtin13:String read Get_gtin13 write Set_gtin13;
property gtin14:String read Get_gtin14 write Set_gtin14;
property validFrom:TDateTime read Get_validFrom write Set_validFrom;
property ineligibleRegion:IPlace read Get_ineligibleRegion write Set_ineligibleRegion;
property availability:IItemAvailability read Get_availability write Set_availability;
property eligibleTransactionVolume:IPriceSpecification read Get_eligibleTransactionVolume write Set_eligibleTransactionVolume;
property includesObject:ITypeAndQuantityNode read Get_includesObject write Set_includesObject;
property eligibleCustomerType:IBusinessEntityType read Get_eligibleCustomerType write Set_eligibleCustomerType;
property inventoryLevel:IQuantitativeValue read Get_inventoryLevel write Set_inventoryLevel;
end;
(*** end IDemand ***)
(* OfferItemCondition
A list of possible conditions for the item.
*)
IOfferItemCondition=Interface (IEnumeration)
function TangOfferItemCondition:TangibleValue;
end;
(*** end IOfferItemCondition ***)
(* ItemAvailability
A list of possible product availability options.
*)
IItemAvailability=Interface (IEnumeration)
function TangItemAvailability:TangibleValue;
end;
(*** end IItemAvailability ***)
(* PriceSpecification
*)
IPriceSpecification=Interface (IStructuredValue)
(**)
function Get_priceCurrency:String;
procedure Set_priceCurrency(v:String);
(*The date after when the item is not valid. For example the end of an offer,
salary period, or a period of opening hours.*)
function Get_validThrough:TDateTime;
procedure Set_validThrough(v:TDateTime);
(*Specifies whether the applicable value-added tax (VAT) is included in the
price specification or not.*)
function Get_valueAddedTaxIncluded:Boolean;
procedure Set_valueAddedTaxIncluded(v:Boolean);
(*The lowest price if the price is a range.*)
function Get_minPrice:INumber;
procedure Set_minPrice(v:INumber);
(*The highest price if the price is a range.*)
function Get_maxPrice:INumber;
procedure Set_maxPrice(v:INumber);
// properties
property priceCurrency:String read Get_priceCurrency write Set_priceCurrency;
property validThrough:TDateTime read Get_validThrough write Set_validThrough;
property valueAddedTaxIncluded:Boolean read Get_valueAddedTaxIncluded write Set_valueAddedTaxIncluded;
property minPrice:INumber read Get_minPrice write Set_minPrice;
property maxPrice:INumber read Get_maxPrice write Set_maxPrice;
end;
(*** end IPriceSpecification ***)
IBusinessFunction=interface; //forward
(* TypeAndQuantityNode
A structured value indicating the quantity, unit of measurement, and business
function of goods included in a bundle offer.
*)
ITypeAndQuantityNode=Interface (IStructuredValue)
(*The product that this structured value is referring to.*)
function Get_typeOfGood:IService;
procedure Set_typeOfGood(v:IService);
(*The unit of measurement given using the UN/CEFACT Common Code (3 characters)
or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix
followed by a colon.*)
function Get_unitCode:String;
procedure Set_unitCode(v:String);
(*The business function (e.g. sell, lease, repair, dispose) of the offer or
component of a bundle (TypeAndQuantityNode). The default is
http://purl.org/goodrelations/v1#Sell.*)
function Get_businessFunction:IBusinessFunction;
procedure Set_businessFunction(v:IBusinessFunction);
(*The quantity of the goods included in the offer.*)
function Get_amountOfThisGood:INumber;
procedure Set_amountOfThisGood(v:INumber);
// properties
property typeOfGood:IService read Get_typeOfGood write Set_typeOfGood;
property unitCode:String read Get_unitCode write Set_unitCode;
property businessFunction:IBusinessFunction read Get_businessFunction write Set_businessFunction;
property amountOfThisGood:INumber read Get_amountOfThisGood write Set_amountOfThisGood;
end;
(*** end ITypeAndQuantityNode ***)
(* BusinessFunction
*)
IBusinessFunction=Interface (IEnumeration)
function TangBusinessFunction:TangibleValue;
end;
(*** end IBusinessFunction ***)
(* BusinessEntityType
*)
IBusinessEntityType=Interface (IEnumeration)
function TangBusinessEntityType:TangibleValue;
end;
(*** end IBusinessEntityType ***)
(* EducationalOrganization
An educational organization.
*)
IEducationalOrganization=Interface (IOrganization)
(*No atribs*)
end;
(*** end IEducationalOrganization ***)
(* VideoObject
A video file.
*)
IVideoObject=Interface (IMediaObject)
(*Thumbnail image for an image or video.*)
function Get_thumbnail:IImageObject;
procedure Set_thumbnail(v:IImageObject);
(*The frame size of the video.*)
function Get_videoFrameSize:String;
procedure Set_videoFrameSize(v:String);
(*The quality of the video.*)
function Get_videoQuality:String;
procedure Set_videoQuality(v:String);
// properties
property thumbnail:IImageObject read Get_thumbnail write Set_thumbnail;
property videoFrameSize:String read Get_videoFrameSize write Set_videoFrameSize;
property videoQuality:String read Get_videoQuality write Set_videoQuality;
end;
(*** end IVideoObject ***)
IBroadcastService=interface; //forward
(* PublicationEvent
A PublicationEvent corresponds indifferently to the event of publication for a
CreativeWork of any type e.g. a broadcast event, an on-demand event, a
book/journal publication via a variety of delivery media.
*)
IPublicationEvent=Interface (IEvent)
(*A flag to signal that the publication or event is accessible for free.*)
function Get_free:Boolean;
procedure Set_free(v:Boolean);
(*A broadcast service associated with the publication event.*)
function Get_publishedOn:IBroadcastService;
procedure Set_publishedOn(v:IBroadcastService);
(*An agent associated with the publication event.*)
function Get_publishedBy:IOrganization;
procedure Set_publishedBy(v:IOrganization);
// properties
property free:Boolean read Get_free write Set_free;
property publishedOn:IBroadcastService read Get_publishedOn write Set_publishedOn;
property publishedBy:IOrganization read Get_publishedBy write Set_publishedBy;
end;
(*** end IPublicationEvent ***)
(* BroadcastService
A delivery service through which content is provided via broadcast over the air
or online.
*)
IBroadcastService=Interface (IService)
(**)
function Get_broadcastTimezone:String;
procedure Set_broadcastTimezone(v:String);
(*A broadcast service to which the broadcast service may belong to such as
regional variations of a national channel.*)
function Get_parentService:IBroadcastService;
procedure Set_parentService(v:IBroadcastService);
(*The frequency used for over-the-air broadcasts. Numeric values or simple
ranges e.g. 87-99. In addition a shortcut idiom is supported for frequences of
AM and FM radio channels, e.g. "87 FM".*)
function Get_broadcastFrequency:String;
procedure Set_broadcastFrequency(v:String);
(*The media network(s) whose content is broadcast on this station.*)
function Get_broadcastAffiliateOf:IOrganization;
procedure Set_broadcastAffiliateOf(v:IOrganization);
(*The name displayed in the channel guide. For many US affiliates, it is the
network name.*)
function Get_broadcastDisplayName:String;
procedure Set_broadcastDisplayName(v:String);
(*The area within which users can expect to reach the broadcast service.*)
function Get_area:IPlace;
procedure Set_area(v:IPlace);
(*The organization owning or operating the broadcast service.*)
function Get_broadcaster:IOrganization;
procedure Set_broadcaster(v:IOrganization);
// properties
property broadcastTimezone:String read Get_broadcastTimezone write Set_broadcastTimezone;
property parentService:IBroadcastService read Get_parentService write Set_parentService;
property broadcastFrequency:String read Get_broadcastFrequency write Set_broadcastFrequency;
property broadcastAffiliateOf:IOrganization read Get_broadcastAffiliateOf write Set_broadcastAffiliateOf;
property broadcastDisplayName:String read Get_broadcastDisplayName write Set_broadcastDisplayName;
property area:IPlace read Get_area write Set_area;
property broadcaster:IOrganization read Get_broadcaster write Set_broadcaster;
end;
(*** end IBroadcastService ***)
(* AudioObject
An audio file.
*)
IAudioObject=Interface (IMediaObject)
(*If this MediaObject is an AudioObject or VideoObject, the transcript of that
object.*)
function Get_transcript:String;
procedure Set_transcript(v:String);
// properties
property transcript:String read Get_transcript write Set_transcript;
end;
(*** end IAudioObject ***)
(* AlignmentObject
This class is based on the work of the LRMI project, see lrmi.net for details.
*)
IAlignmentObject=Interface (IIntangible)
(*The name of a node in an established educational framework.*)
function Get_targetName:String;
procedure Set_targetName(v:String);
(*The URL of a node in an established educational framework.*)
function Get_targetUrl:String;
procedure Set_targetUrl(v:String);
(*The description of a node in an established educational framework.*)
function Get_targetDescription:String;
procedure Set_targetDescription(v:String);
(*The framework to which the resource being described is aligned.*)
function Get_educationalFramework:String;
procedure Set_educationalFramework(v:String);
(*A category of alignment between the learning resource and the framework node.
Recommended values include: 'assesses', 'teaches', 'requires',
'textComplexity', 'readingLevel', 'educationalSubject', and
'educationalLevel'.*)
function Get_alignmentType:String;
procedure Set_alignmentType(v:String);
// properties
property targetName:String read Get_targetName write Set_targetName;
property targetUrl:String read Get_targetUrl write Set_targetUrl;
property targetDescription:String read Get_targetDescription write Set_targetDescription;
property educationalFramework:String read Get_educationalFramework write Set_educationalFramework;
property alignmentType:String read Get_alignmentType write Set_alignmentType;
end;
(*** end IAlignmentObject ***)
IDataFeed=interface; //forward
(* SoftwareApplication
A software application.
*)
ISoftwareApplication=Interface (ICreativeWork)
(*Storage requirements (free space required).*)
function Get_storageRequirements:String;
procedure Set_storageRequirements(v:String);
(*Description of what changed in this version.*)
function Get_releaseNotes:String;
procedure Set_releaseNotes(v:String);
(*Operating systems supported (Windows 7, OSX 10.6, Android 1.6).*)
function Get_operatingSystem:String;
procedure Set_operatingSystem(v:String);
(*Countries for which the application is supported. You can also provide the
two-letter ISO 3166-1 alpha-2 country code.*)
function Get_countriesSupported:String;
procedure Set_countriesSupported(v:String);
(*Permission(s) required to run the app (for example, a mobile app may require
full internet access or may run only on wifi).*)
function Get_permissions:String;
procedure Set_permissions(v:String);
(*A link to a screenshot image of the app.*)
function Get_screenshot:String;
procedure Set_screenshot(v:String);
(*Software application help.*)
function Get_softwareHelp:ICreativeWork;
procedure Set_softwareHelp(v:ICreativeWork);
(*Version of the software instance.*)
function Get_softwareVersion:String;
procedure Set_softwareVersion(v:String);
(*If the file can be downloaded, URL to download the binary.*)
function Get_downloadUrl:String;
procedure Set_downloadUrl(v:String);
(*Device required to run the application. Used in cases where a specific
make/model is required to run the application.*)
function Get_device:String;
procedure Set_device(v:String);
(*The name of the application suite to which the application belongs (e.g.
Excel belongs to Office).*)
function Get_applicationSuite:String;
procedure Set_applicationSuite(v:String);
(*Features or modules provided by this application (and possibly required by
other applications).*)
function Get_featureList:String;
procedure Set_featureList(v:String);
(*Supporting data for a SoftwareApplication.*)
function Get_supportingData:IDataFeed;
procedure Set_supportingData(v:IDataFeed);
(*Type of software application, e.g. 'Game, Multimedia'.*)
function Get_applicationCategory:String;
procedure Set_applicationCategory(v:String);
(*URL at which the app may be installed, if different from the URL of the
item.*)
function Get_installUrl:String;
procedure Set_installUrl(v:String);
(*Processor architecture required to run the application (e.g. IA64).*)
function Get_processorRequirements:String;
procedure Set_processorRequirements(v:String);
(*Size of the application / package (e.g. 18MB). In the absence of a unit (MB,
KB etc.), KB will be assumed.*)
function Get_fileSize:String;
procedure Set_fileSize(v:String);
(*Subcategory of the application, e.g. 'Arcade Game'.*)
function Get_applicationSubCategory:String;
procedure Set_applicationSubCategory(v:String);
(*Countries for which the application is not supported. You can also provide
the two-letter ISO 3166-1 alpha-2 country code.*)
function Get_countriesNotSupported:String;
procedure Set_countriesNotSupported(v:String);
(*Component dependency requirements for application. This includes runtime
environments and shared libraries that are not included in the application
distribution package, but required to run the application (Examples: DirectX,
Java or .NET runtime).*)
function Get_requirements:String;
procedure Set_requirements(v:String);
(*Minimum memory requirements.*)
function Get_memoryRequirements:String;
procedure Set_memoryRequirements(v:String);
(*Additional content for a software application.*)
function Get_softwareAddOn:ISoftwareApplication;
procedure Set_softwareAddOn(v:ISoftwareApplication);
// properties
property storageRequirements:String read Get_storageRequirements write Set_storageRequirements;
property releaseNotes:String read Get_releaseNotes write Set_releaseNotes;
property operatingSystem:String read Get_operatingSystem write Set_operatingSystem;
property countriesSupported:String read Get_countriesSupported write Set_countriesSupported;
property permissions:String read Get_permissions write Set_permissions;
property screenshot:String read Get_screenshot write Set_screenshot;
property softwareHelp:ICreativeWork read Get_softwareHelp write Set_softwareHelp;
property softwareVersion:String read Get_softwareVersion write Set_softwareVersion;
property downloadUrl:String read Get_downloadUrl write Set_downloadUrl;
property device:String read Get_device write Set_device;
property applicationSuite:String read Get_applicationSuite write Set_applicationSuite;
property featureList:String read Get_featureList write Set_featureList;
property supportingData:IDataFeed read Get_supportingData write Set_supportingData;
property applicationCategory:String read Get_applicationCategory write Set_applicationCategory;
property installUrl:String read Get_installUrl write Set_installUrl;
property processorRequirements:String read Get_processorRequirements write Set_processorRequirements;
property fileSize:String read Get_fileSize write Set_fileSize;
property applicationSubCategory:String read Get_applicationSubCategory write Set_applicationSubCategory;
property countriesNotSupported:String read Get_countriesNotSupported write Set_countriesNotSupported;
property requirements:String read Get_requirements write Set_requirements;
property memoryRequirements:String read Get_memoryRequirements write Set_memoryRequirements;
property softwareAddOn:ISoftwareApplication read Get_softwareAddOn write Set_softwareAddOn;
end;
(*** end ISoftwareApplication ***)
IDataCatalog=interface; //forward
IDataDownload=interface; //forward
(* Dataset
A body of structured information describing some topic(s) of interest.
*)
IDataset=Interface (ICreativeWork)
(*The range of temporal applicability of a dataset, e.g. for a 2011 census
dataset, the year 2011 (in ISO 8601 time interval format).*)
function Get_temporal:TDateTime;
procedure Set_temporal(v:TDateTime);
(*The variables that are measured in some dataset, either described as text or
as pairs of identifier and description using PropertyValue.*)
function Get_variablesMeasured:String;
procedure Set_variablesMeasured(v:String);
(*The range of spatial applicability of a dataset, e.g. for a dataset of New
York weather, the state of New York.*)
function Get_spatial:IPlace;
procedure Set_spatial(v:IPlace);
(*A data catalog which contains this dataset (this property was previously
'catalog', preferred name is now 'includedInDataCatalog').*)
function Get_includedDataCatalog:IDataCatalog;
procedure Set_includedDataCatalog(v:IDataCatalog);
(*The range of temporal applicability of a dataset, e.g. for a 2011 census
dataset, the year 2011 (in ISO 8601 time interval format).*)
function Get_datasetTimeInterval:TDateTime;
procedure Set_datasetTimeInterval(v:TDateTime);
(*A data catalog which contains this dataset.*)
function Get_catalog:IDataCatalog;
procedure Set_catalog(v:IDataCatalog);
(*A downloadable form of this dataset, at a specific location, in a specific
format.*)
function Get_distribution:IDataDownload;
procedure Set_distribution(v:IDataDownload);
// properties
property temporal:TDateTime read Get_temporal write Set_temporal;
property variablesMeasured:String read Get_variablesMeasured write Set_variablesMeasured;
property spatial:IPlace read Get_spatial write Set_spatial;
property includedDataCatalog:IDataCatalog read Get_includedDataCatalog write Set_includedDataCatalog;
property datasetTimeInterval:TDateTime read Get_datasetTimeInterval write Set_datasetTimeInterval;
property catalog:IDataCatalog read Get_catalog write Set_catalog;
property distribution:IDataDownload read Get_distribution write Set_distribution;
end;
(*** end IDataset ***)
(* DataCatalog
A collection of datasets.
*)
IDataCatalog=Interface (ICreativeWork)
(*A dataset contained in this catalog.*)
function Get_dataset:IDataset;
procedure Set_dataset(v:IDataset);
// properties
property dataset:IDataset read Get_dataset write Set_dataset;
end;
(*** end IDataCatalog ***)
(* DataDownload
A dataset in downloadable form.
*)
IDataDownload=Interface (IMediaObject)
(*No atribs*)
end;
(*** end IDataDownload ***)
(* DataFeed
A single feed providing structured information about one or more entities or
topics.
*)
IDataFeed=Interface (IDataset)
(*An item within in a data feed. Data feeds may have many elements.*)
function Get_dataFeedElement:IThing;
procedure Set_dataFeedElement(v:IThing);
// properties
property dataFeedElement:IThing read Get_dataFeedElement write Set_dataFeedElement;
end;
(*** end IDataFeed ***)
(* ActionStatusType
The status of an Action.
*)
IActionStatusType=Interface (IEnumeration)
function TangActionStatusType:TangibleValue;
end;
(*** end IActionStatusType ***)
(* CreativeWorkSeries
*)
ICreativeWorkSeries=Interface (ICreativeWork)
(*No atribs*)
end;
(*** end ICreativeWorkSeries ***)
(* Periodical
*)
IPeriodical=Interface (ICreativeWorkSeries)
(*The International Standard Serial Number (ISSN) that identifies this
periodical. You can repeat this property to (for example) identify different
formats of this periodical.*)
function Get_issn:String;
procedure Set_issn(v:String);
// properties
property issn:String read Get_issn write Set_issn;
end;
(*** end IPeriodical ***)
(* Newspaper
A publication containing information about varied topics that are pertinent to
general information, a geographic area, or a specific subject matter (i.e.
business, culture, education). Often published daily.
*)
INewspaper=Interface (IPeriodical)
(*No atribs*)
end;
(*** end INewspaper ***)
(* Permit
A permit issued by an organization, e.g. a parking pass.
*)
IPermit=Interface (IIntangible)
(*The time validity of the permit.*)
function Get_validFor:IDuration;
procedure Set_validFor(v:IDuration);
(*The service through with the permit was granted.*)
function Get_issuedThrough:IService;
procedure Set_issuedThrough(v:IService);
(*The date when the item is no longer valid.*)
function Get_validUntil:TDateTime;
procedure Set_validUntil(v:TDateTime);
(*The geographic area where the permit is valid.*)
function Get_validIn:IAdministrativeArea;
procedure Set_validIn(v:IAdministrativeArea);
(*The target audience for this permit.*)
function Get_permitAudience:IAudience;
procedure Set_permitAudience(v:IAudience);
(*The organization issuing the ticket or permit.*)
function Get_issuedBy:IOrganization;
procedure Set_issuedBy(v:IOrganization);
// properties
property validFor:IDuration read Get_validFor write Set_validFor;
property issuedThrough:IService read Get_issuedThrough write Set_issuedThrough;
property validUntil:TDateTime read Get_validUntil write Set_validUntil;
property validIn:IAdministrativeArea read Get_validIn write Set_validIn;
property permitAudience:IAudience read Get_permitAudience write Set_permitAudience;
property issuedBy:IOrganization read Get_issuedBy write Set_issuedBy;
end;
(*** end IPermit ***)
(* GovernmentPermit
A permit issued by a government agency.
*)
IGovernmentPermit=Interface (IPermit)
function TangGovernmentPermit:TangibleValue;
end;
(*** end IGovernmentPermit ***)
(* UpdateAction
The act of managing by changing/editing the state of the object.
*)
IUpdateAction=Interface (IAction)
(*A sub property of object. The collection target of the action.*)
function Get_collection:IThing;
procedure Set_collection(v:IThing);
// properties
property collection:IThing read Get_collection write Set_collection;
end;
(*** end IUpdateAction ***)
(* AddAction
The act of editing by adding an object to a collection.
*)
IAddAction=Interface (IUpdateAction)
(*No atribs*)
end;
(*** end IAddAction ***)
(* InsertAction
The act of adding at a specific location in an ordered collection.
*)
IInsertAction=Interface (IAddAction)
(*No atribs*)
end;
(*** end IInsertAction ***)
(* PrependAction
The act of inserting at the beginning if an ordered collection.
*)
IPrependAction=Interface (IInsertAction)
(*No atribs*)
end;
(*** end IPrependAction ***)
(* Episode
A media episode (e.g. TV, radio, video game) which can be part of a series or
season.
*)
IEpisode=Interface (ICreativeWork)
(*Position of the episode within an ordered group of episodes.*)
function Get_episodeNumber:String;
procedure Set_episodeNumber(v:String);
// properties
property episodeNumber:String read Get_episodeNumber write Set_episodeNumber;
end;
(*** end IEpisode ***)
(* RadioEpisode
A radio episode which can be part of a series or season.
*)
IRadioEpisode=Interface (IEpisode)
(*No atribs*)
end;
(*** end IRadioEpisode ***)
(* LocalBusiness
A particular physical business or branch of an organization. Examples of
LocalBusiness include a restaurant, a particular branch of a restaurant chain,
a branch of a bank, a medical practice, a club, a bowling alley, etc.
*)
ILocalBusiness=Interface (IPlace)
(**)
function Get_priceRange:String;
procedure Set_priceRange(v:String);
(**)
function Get_branchOf:IOrganization;
procedure Set_branchOf(v:IOrganization);
(**)
function Get_openingHours:String;
procedure Set_openingHours(v:String);
(*Cash, credit card, etc.*)
function Get_paymentAccepted:String;
procedure Set_paymentAccepted(v:String);
(**)
function Get_currenciesAccepted:String;
procedure Set_currenciesAccepted(v:String);
// properties
property priceRange:String read Get_priceRange write Set_priceRange;
property branchOf:IOrganization read Get_branchOf write Set_branchOf;
property openingHours:String read Get_openingHours write Set_openingHours;
property paymentAccepted:String read Get_paymentAccepted write Set_paymentAccepted;
property currenciesAccepted:String read Get_currenciesAccepted write Set_currenciesAccepted;
end;
(*** end ILocalBusiness ***)
(* FoodEstablishment
A food-related business.
*)
IFoodEstablishment=Interface (ILocalBusiness)
(**)
function Get_acceptsReservations:String;
procedure Set_acceptsReservations(v:String);
(*The cuisine of the restaurant.*)
function Get_servesCuisine:String;
procedure Set_servesCuisine(v:String);
(*Either the actual menu or a URL of the menu.*)
function Get_menu:String;
procedure Set_menu(v:String);
// properties
property acceptsReservations:String read Get_acceptsReservations write Set_acceptsReservations;
property servesCuisine:String read Get_servesCuisine write Set_servesCuisine;
property menu:String read Get_menu write Set_menu;
end;
(*** end IFoodEstablishment ***)
(* Winery
A winery.
*)
IWinery=Interface (IFoodEstablishment)
(*No atribs*)
end;
(*** end IWinery ***)
ICableOrSatelliteService=interface; //forward
(* BroadcastChannel
A unique instance of a BroadcastService on a CableOrSatelliteService lineup.
*)
IBroadcastChannel=Interface (IIntangible)
(*The unique address by which the BroadcastService can be identified in a
provider lineup. In US, this is typically a number.*)
function Get_broadcastChannelId:String;
procedure Set_broadcastChannelId(v:String);
(*The type of service required to have access to the channel (e.g. Standard or
Premium).*)
function Get_broadcastServiceTier:String;
procedure Set_broadcastServiceTier(v:String);
(*The CableOrSatelliteService offering the channel.*)
function Get_inBroadcastLineup:ICableOrSatelliteService;
procedure Set_inBroadcastLineup(v:ICableOrSatelliteService);
(*The BroadcastService offered on this channel.*)
function Get_providesBroadcastService:IBroadcastService;
procedure Set_providesBroadcastService(v:IBroadcastService);
// properties
property broadcastChannelId:String read Get_broadcastChannelId write Set_broadcastChannelId;
property broadcastServiceTier:String read Get_broadcastServiceTier write Set_broadcastServiceTier;
property inBroadcastLineup:ICableOrSatelliteService read Get_inBroadcastLineup write Set_inBroadcastLineup;
property providesBroadcastService:IBroadcastService read Get_providesBroadcastService write Set_providesBroadcastService;
end;
(*** end IBroadcastChannel ***)
(* CableOrSatelliteService
A service which provides access to media programming like TV or radio. Access
may be via cable or satellite.
*)
ICableOrSatelliteService=Interface (IService)
function TangCableOrSatelliteService:TangibleValue;
end;
(*** end ICableOrSatelliteService ***)
(* RadioChannel
A unique instance of a radio BroadcastService on a CableOrSatelliteService
lineup.
*)
IRadioChannel=Interface (IBroadcastChannel)
function TangRadioChannel:TangibleValue;
end;
(*** end IRadioChannel ***)
(* AMRadioChannel
A radio channel that uses AM.
*)
IAMRadioChannel=Interface (IRadioChannel)
function TangAMRadioChannel:TangibleValue;
end;
(*** end IAMRadioChannel ***)
(* Collection
A created collection of Creative Works or other artefacts.
*)
ICollection=Interface (ICreativeWork)
(*No atribs*)
end;
(*** end ICollection ***)
(* Season
A media season e.g. tv, radio, video game etc.
*)
ISeason=Interface (ICreativeWork)
(*No atribs*)
end;
(*** end ISeason ***)
(* Brewery
Brewery.
*)
IBrewery=Interface (IFoodEstablishment)
(*No atribs*)
end;
(*** end IBrewery ***)
IMedicalCode=interface; //forward
IMedicalGuideline=interface; //forward
IMedicineSystem=interface; //forward
IMedicalStudy=interface; //forward
IMedicalSpecialty=interface; //forward
(* MedicalEntity
The most generic type of entity related to health and the practice of medicine.
*)
IMedicalEntity=Interface (IThing)
(*A medical code for the entity, taken from a controlled vocabulary or ontology
such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc.*)
function Get_code:IMedicalCode;
procedure Set_code(v:IMedicalCode);
(*A medical guideline related to this entity.*)
function Get_guideline:IMedicalGuideline;
procedure Set_guideline(v:IMedicalGuideline);
(*The system of medicine that includes this MedicalEntity, for example
'evidence-based', 'homeopathic', 'chiropractic', etc.*)
function Get_medicineSystem:IMedicineSystem;
procedure Set_medicineSystem(v:IMedicineSystem);
(*The drug or supplement's legal status, including any controlled substance
schedules that apply.*)
function Get_legalStatus:String;
procedure Set_legalStatus(v:String);
(*If applicable, the organization that officially recognizes this entity as
part of its endorsed system of medicine.*)
function Get_recognizingAuthority:IOrganization;
procedure Set_recognizingAuthority(v:IOrganization);
(*A medical study or trial related to this entity.*)
function Get_study:IMedicalStudy;
procedure Set_study(v:IMedicalStudy);
(*If applicable, a medical specialty in which this entity is relevant.*)
function Get_relevantSpecialty:IMedicalSpecialty;
procedure Set_relevantSpecialty(v:IMedicalSpecialty);
// properties
property code:IMedicalCode read Get_code write Set_code;
property guideline:IMedicalGuideline read Get_guideline write Set_guideline;
property medicineSystem:IMedicineSystem read Get_medicineSystem write Set_medicineSystem;
property legalStatus:String read Get_legalStatus write Set_legalStatus;
property recognizingAuthority:IOrganization read Get_recognizingAuthority write Set_recognizingAuthority;
property study:IMedicalStudy read Get_study write Set_study;
property relevantSpecialty:IMedicalSpecialty read Get_relevantSpecialty write Set_relevantSpecialty;
end;
(*** end IMedicalEntity ***)
(* MedicalIntangible
A utility class that serves as the umbrella for a number of 'intangible' things
in the medical space.
*)
IMedicalIntangible=Interface (IMedicalEntity)
(*No atribs*)
end;
(*** end IMedicalIntangible ***)
(* MedicalCode
A code for a medical entity.
*)
IMedicalCode=Interface (IMedicalIntangible)
(*The coding system, e.g. 'ICD-10'.*)
function Get_codingSystem:String;
procedure Set_codingSystem(v:String);
(*The actual code.*)
function Get_codeValue:String;
procedure Set_codeValue(v:String);
// properties
property codingSystem:String read Get_codingSystem write Set_codingSystem;
property codeValue:String read Get_codeValue write Set_codeValue;
end;
(*** end IMedicalCode ***)
IMedicalEvidenceLevel=interface; //forward
(* MedicalGuideline
Any recommendation made by a standard society (e.g. ACC/AHA) or consensus
statement that denotes how to diagnose and treat a particular condition. Note:
this type should be used to tag the actual guideline recommendation; if the
guideline recommendation occurs in a larger scholarly article, use
MedicalScholarlyArticle to tag the overall article, not this type. Note also:
the organization making the recommendation should be captured in the
recognizingAuthority base property of MedicalEntity.
*)
IMedicalGuideline=Interface (IMedicalEntity)
(*Source of the data used to formulate the guidance, e.g. RCT, consensus
opinion, etc.*)
function Get_evidenceOrigin:String;
procedure Set_evidenceOrigin(v:String);
(*The medical conditions, treatments, etc. that are the subject of the
guideline.*)
function Get_guidelineSubject:IMedicalEntity;
procedure Set_guidelineSubject(v:IMedicalEntity);
(*Date on which this guideline's recommendation was made.*)
function Get_guidelineDate:TDateTime;
procedure Set_guidelineDate(v:TDateTime);
(*Strength of evidence of the data used to formulate the guideline
(enumerated).*)
function Get_evidenceLevel:IMedicalEvidenceLevel;
procedure Set_evidenceLevel(v:IMedicalEvidenceLevel);
// properties
property evidenceOrigin:String read Get_evidenceOrigin write Set_evidenceOrigin;
property guidelineSubject:IMedicalEntity read Get_guidelineSubject write Set_guidelineSubject;
property guidelineDate:TDateTime read Get_guidelineDate write Set_guidelineDate;
property evidenceLevel:IMedicalEvidenceLevel read Get_evidenceLevel write Set_evidenceLevel;
end;
(*** end IMedicalGuideline ***)
(* MedicalEnumeration
Enumerations related to health and the practice of medicine: A concept that is
used to attribute a quality to another concept, as a qualifier, a collection of
items or a listing of all of the elements of a set in medicine practice.
*)
IMedicalEnumeration=Interface (IEnumeration)
function TangMedicalEnumeration:TangibleValue;
end;
(*** end IMedicalEnumeration ***)
(* MedicalEvidenceLevel
Level of evidence for a medical guideline. Enumerated type.
*)
IMedicalEvidenceLevel=Interface (IMedicalEnumeration)
function TangMedicalEvidenceLevel:TangibleValue;
end;
(*** end IMedicalEvidenceLevel ***)
(* MedicineSystem
Systems of medical practice.
*)
IMedicineSystem=Interface (IMedicalEnumeration)
function TangMedicineSystem:TangibleValue;
end;
(*** end IMedicineSystem ***)
IMedicalCondition=interface; //forward
(* MedicalStudy
A medical study is an umbrella type covering all kinds of research studies
relating to human medicine or health, including observational studies and
interventional trials and registries, randomized, controlled or not. When the
specific type of study is known, use one of the extensions of this type, such
as MedicalTrial or MedicalObservationalStudy. Also, note that this type should
be used to mark up data that describes the study itself; to tag an article that
publishes the results of a study, use MedicalScholarlyArticle. Note: use the
code property of MedicalEntity to store study IDs, e.g. clinicaltrials.gov ID.
*)
IMedicalStudy=Interface (IMedicalEntity)
(*Specifying the health condition(s) of a patient, medical study, or other
target audience.*)
function Get_healthCondition:IMedicalCondition;
procedure Set_healthCondition(v:IMedicalCondition);
(*Any characteristics of the population used in the study, e.g. 'males under
65'.*)
function Get_population:String;
procedure Set_population(v:String);
(*A subject of the study, i.e. one of the medical conditions, therapies,
devices, drugs, etc. investigated by the study.*)
function Get_studySubject:IMedicalEntity;
procedure Set_studySubject(v:IMedicalEntity);
(*The location in which the study is taking/took place.*)
function Get_studyLocation:IAdministrativeArea;
procedure Set_studyLocation(v:IAdministrativeArea);
// properties
property healthCondition:IMedicalCondition read Get_healthCondition write Set_healthCondition;
property population:String read Get_population write Set_population;
property studySubject:IMedicalEntity read Get_studySubject write Set_studySubject;
property studyLocation:IAdministrativeArea read Get_studyLocation write Set_studyLocation;
end;
(*** end IMedicalStudy ***)
IMedicalTherapy=interface; //forward
IMedicalTest=interface; //forward
IMedicalCause=interface; //forward
IMedicalStudyStatus=interface; //forward
IAnatomicalStructure=interface; //forward
IMedicalRiskFactor=interface; //forward
IMedicalSignOrSymptom=interface; //forward
IDDxElement=interface; //forward
IMedicalConditionStage=interface; //forward
(* MedicalCondition
Any condition of the human body that affects the normal functioning of a
person, whether physically or mentally. Includes diseases, injuries,
disabilities, disorders, syndromes, etc.
*)
IMedicalCondition=Interface (IMedicalEntity)
(*A preventative therapy used to prevent an initial occurrence of the medical
condition, such as vaccination.*)
function Get_primaryPrevention:IMedicalTherapy;
procedure Set_primaryPrevention(v:IMedicalTherapy);
(*A medical test typically performed given this condition.*)
function Get_typicalTest:IMedicalTest;
procedure Set_typicalTest(v:IMedicalTest);
(*Specifying a cause of something in general. e.g in medicine , one of the
causative agent(s) that are most directly responsible for the pathophysiologic
process that eventually results in the occurrence.*)
function Get_cause:IMedicalCause;
procedure Set_cause(v:IMedicalCause);
(*The status of the study (enumerated).*)
function Get_status:IMedicalStudyStatus;
procedure Set_status(v:IMedicalStudyStatus);
(*A more specific type of the condition, where applicable, for example 'Type 1
Diabetes', 'Type 2 Diabetes', or 'Gestational Diabetes' for Diabetes.*)
function Get_subtype:String;
procedure Set_subtype(v:String);
(*The likely outcome in either the short term or long term of the medical
condition.*)
function Get_expectedPrognosis:String;
procedure Set_expectedPrognosis(v:String);
(*A possible unexpected and unfavorable evolution of a medical condition.
Complications may include worsening of the signs or symptoms of the disease,
extension of the condition to other organ systems, etc.*)
function Get_possibleComplication:String;
procedure Set_possibleComplication(v:String);
(*The anatomy of the underlying organ system or structures associated with this
entity.*)
function Get_associatedAnatomy:IAnatomicalStructure;
procedure Set_associatedAnatomy(v:IAnatomicalStructure);
(*Changes in the normal mechanical, physical, and biochemical functions that
are associated with this activity or condition.*)
function Get_pathophysiology:String;
procedure Set_pathophysiology(v:String);
(*A modifiable or non-modifiable factor that increases the risk of a patient
contracting this condition, e.g. age, coexisting condition.*)
function Get_riskFactor:IMedicalRiskFactor;
procedure Set_riskFactor(v:IMedicalRiskFactor);
(*A sign or symptom of this condition. Signs are objective or physically
observable manifestations of the medical condition while symptoms are the
subjective experience of the medical condition.*)
function Get_signOrSymptom:IMedicalSignOrSymptom;
procedure Set_signOrSymptom(v:IMedicalSignOrSymptom);
(*One of a set of differential diagnoses for the condition. Specifically, a
closely-related or competing diagnosis typically considered later in the
cognitive process whereby this medical condition is distinguished from others
most likely responsible for a similar collection of signs and symptoms to reach
the most parsimonious diagnosis or diagnoses in a patient.*)
function Get_differentialDiagnosis:IDDxElement;
procedure Set_differentialDiagnosis(v:IDDxElement);
(*The stage of the condition, if applicable.*)
function Get_stage:IMedicalConditionStage;
procedure Set_stage(v:IMedicalConditionStage);
(*The expected progression of the condition if it is not treated and allowed to
progress naturally.*)
function Get_naturalProgression:String;
procedure Set_naturalProgression(v:String);
(*A possible treatment to address this condition, sign or symptom.*)
function Get_possibleTreatment:IMedicalTherapy;
procedure Set_possibleTreatment(v:IMedicalTherapy);
(*A preventative therapy used to prevent reoccurrence of the medical condition
after an initial episode of the condition.*)
function Get_secondaryPrevention:IMedicalTherapy;
procedure Set_secondaryPrevention(v:IMedicalTherapy);
// properties
property primaryPrevention:IMedicalTherapy read Get_primaryPrevention write Set_primaryPrevention;
property typicalTest:IMedicalTest read Get_typicalTest write Set_typicalTest;
property cause:IMedicalCause read Get_cause write Set_cause;
property status:IMedicalStudyStatus read Get_status write Set_status;
property subtype:String read Get_subtype write Set_subtype;
property expectedPrognosis:String read Get_expectedPrognosis write Set_expectedPrognosis;
property possibleComplication:String read Get_possibleComplication write Set_possibleComplication;
property associatedAnatomy:IAnatomicalStructure read Get_associatedAnatomy write Set_associatedAnatomy;
property pathophysiology:String read Get_pathophysiology write Set_pathophysiology;
property riskFactor:IMedicalRiskFactor read Get_riskFactor write Set_riskFactor;
property signOrSymptom:IMedicalSignOrSymptom read Get_signOrSymptom write Set_signOrSymptom;
property differentialDiagnosis:IDDxElement read Get_differentialDiagnosis write Set_differentialDiagnosis;
property stage:IMedicalConditionStage read Get_stage write Set_stage;
property naturalProgression:String read Get_naturalProgression write Set_naturalProgression;
property possibleTreatment:IMedicalTherapy read Get_possibleTreatment write Set_possibleTreatment;
property secondaryPrevention:IMedicalTherapy read Get_secondaryPrevention write Set_secondaryPrevention;
end;
(*** end IMedicalCondition ***)
IMedicalIndication=interface; //forward
IMedicalProcedureType=interface; //forward
(* MedicalProcedure
A process of care used in either a diagnostic, therapeutic, preventive or
palliative capacity that relies on invasive (surgical), non-invasive, or other
techniques.
*)
IMedicalProcedure=Interface (IMedicalEntity)
(*Typical or recommended followup care after the procedure is performed.*)
function Get_followup:String;
procedure Set_followup(v:String);
(*Typical preparation that a patient must undergo before having the procedure
performed.*)
function Get_preparation:IMedicalEntity;
procedure Set_preparation(v:IMedicalEntity);
(*How the procedure is performed.*)
function Get_howPerformed:String;
procedure Set_howPerformed(v:String);
(*A factor that indicates use of this therapy for treatment and/or prevention
of a condition, symptom, etc. For therapies such as drugs, indications can
include both officially-approved indications as well as off-label uses. These
can be distinguished by using the ApprovedIndication subtype of
MedicalIndication.*)
function Get_indication:IMedicalIndication;
procedure Set_indication(v:IMedicalIndication);
(*The type of procedure, for example Surgical, Noninvasive, or Percutaneous.*)
function Get_procedureType:IMedicalProcedureType;
procedure Set_procedureType(v:IMedicalProcedureType);
(*Location in the body of the anatomical structure.*)
function Get_bodyLocation:String;
procedure Set_bodyLocation(v:String);
(*Expected or actual outcomes of the study.*)
function Get_outcome:IMedicalEntity;
procedure Set_outcome(v:IMedicalEntity);
// properties
property followup:String read Get_followup write Set_followup;
property preparation:IMedicalEntity read Get_preparation write Set_preparation;
property howPerformed:String read Get_howPerformed write Set_howPerformed;
property indication:IMedicalIndication read Get_indication write Set_indication;
property procedureType:IMedicalProcedureType read Get_procedureType write Set_procedureType;
property bodyLocation:String read Get_bodyLocation write Set_bodyLocation;
property outcome:IMedicalEntity read Get_outcome write Set_outcome;
end;
(*** end IMedicalProcedure ***)
(* MedicalIndication
A condition or factor that indicates use of a medical therapy, including signs,
symptoms, risk factors, anatomical states, etc.
*)
IMedicalIndication=Interface (IMedicalEntity)
(*No atribs*)
end;
(*** end IMedicalIndication ***)
(* MedicalProcedureType
An enumeration that describes different types of medical procedures.
*)
IMedicalProcedureType=Interface (IMedicalEnumeration)
function TangMedicalProcedureType:TangibleValue;
end;
(*** end IMedicalProcedureType ***)
(* TherapeuticProcedure
A medical procedure intended primarily for therapeutic purposes, aimed at
improving a health condition.
*)
ITherapeuticProcedure=Interface (IMedicalProcedure)
(*No atribs*)
end;
(*** end ITherapeuticProcedure ***)
(* MedicalTherapy
Any medical intervention designed to prevent, treat, and cure human diseases
and medical conditions, including both curative and palliative therapies.
Medical therapies are typically processes of care relying upon pharmacotherapy,
behavioral therapy, supportive therapy (with fluid or nutrition for example),
or detoxification (e.g. hemodialysis) aimed at improving or preventing a health
condition.
*)
IMedicalTherapy=Interface (ITherapeuticProcedure)
(*A possible serious complication and/or serious side effect of this therapy.
Serious adverse outcomes include those that are life-threatening; result in
death, disability, or permanent damage; require hospitalization or prolong
existing hospitalization; cause congenital anomalies or birth defects; or
jeopardize the patient and may require medical or surgical intervention to
prevent one of the outcomes in this definition.*)
function Get_seriousAdverseOutcome:IMedicalEntity;
procedure Set_seriousAdverseOutcome(v:IMedicalEntity);
(*A therapy that duplicates or overlaps this one.*)
function Get_duplicateTherapy:IMedicalTherapy;
procedure Set_duplicateTherapy(v:IMedicalTherapy);
// properties
property seriousAdverseOutcome:IMedicalEntity read Get_seriousAdverseOutcome write Set_seriousAdverseOutcome;
property duplicateTherapy:IMedicalTherapy read Get_duplicateTherapy write Set_duplicateTherapy;
end;
(*** end IMedicalTherapy ***)
IMedicalDevice=interface; //forward
IDrug=interface; //forward
IMedicalSign=interface; //forward
(* MedicalTest
Any medical test, typically performed for diagnostic purposes.
*)
IMedicalTest=Interface (IMedicalEntity)
(*Device used to perform the test.*)
function Get_usesDevice:IMedicalDevice;
procedure Set_usesDevice(v:IMedicalDevice);
(*Drugs that affect the test's results.*)
function Get_affectedBy:IDrug;
procedure Set_affectedBy(v:IDrug);
(*Range of acceptable values for a typical patient, when applicable.*)
function Get_normalRange:IMedicalEnumeration;
procedure Set_normalRange(v:IMedicalEnumeration);
(*A sign detected by the test.*)
function Get_signDetected:IMedicalSign;
procedure Set_signDetected(v:IMedicalSign);
(*A condition the test is used to diagnose.*)
function Get_usedToDiagnose:IMedicalCondition;
procedure Set_usedToDiagnose(v:IMedicalCondition);
// properties
property usesDevice:IMedicalDevice read Get_usesDevice write Set_usesDevice;
property affectedBy:IDrug read Get_affectedBy write Set_affectedBy;
property normalRange:IMedicalEnumeration read Get_normalRange write Set_normalRange;
property signDetected:IMedicalSign read Get_signDetected write Set_signDetected;
property usedToDiagnose:IMedicalCondition read Get_usedToDiagnose write Set_usedToDiagnose;
end;
(*** end IMedicalTest ***)
IMedicalContraindication=interface; //forward
(* MedicalDevice
Any object used in a medical capacity, such as to diagnose or treat a patient.
*)
IMedicalDevice=Interface (IMedicalEntity)
(*A description of the workup, testing, and other preparations required before
implanting this device.*)
function Get_preOp:String;
procedure Set_preOp(v:String);
(*A description of the postoperative procedures, care, and/or followups for
this device.*)
function Get_postOp:String;
procedure Set_postOp(v:String);
(*A goal towards an action is taken. Can be concrete or abstract.*)
function Get_purpose:IThing;
procedure Set_purpose(v:IThing);
(*A possible complication and/or side effect of this therapy. If it is known
that an adverse outcome is serious (resulting in death, disability, or
permanent damage; requiring hospitalization; or is otherwise life-threatening
or requires immediate medical attention), tag it as a seriouseAdverseOutcome
instead.*)
function Get_adverseOutcome:IMedicalEntity;
procedure Set_adverseOutcome(v:IMedicalEntity);
(*A contraindication for this therapy.*)
function Get_contraindication:IMedicalContraindication;
procedure Set_contraindication(v:IMedicalContraindication);
(*A description of the procedure involved in setting up, using, and/or
installing the device.*)
function Get__procedure:String;
procedure Set__procedure(v:String);
// properties
property preOp:String read Get_preOp write Set_preOp;
property postOp:String read Get_postOp write Set_postOp;
property purpose:IThing read Get_purpose write Set_purpose;
property adverseOutcome:IMedicalEntity read Get_adverseOutcome write Set_adverseOutcome;
property contraindication:IMedicalContraindication read Get_contraindication write Set_contraindication;
property _procedure:String read Get__procedure write Set__procedure;
end;
(*** end IMedicalDevice ***)
(* MedicalContraindication
A condition or factor that serves as a reason to withhold a certain medical
therapy. Contraindications can be absolute (there are no reasonable
circumstances for undertaking a course of action) or relative (the patient is
at higher risk of complications, but that these risks may be outweighed by
other considerations or mitigated by other measures).
*)
IMedicalContraindication=Interface (IMedicalEntity)
(*No atribs*)
end;
(*** end IMedicalContraindication ***)
IMaximumDoseSchedule=interface; //forward
(* Substance
Any matter of defined composition that has discrete existence, whose origin may
be biological, mineral or chemical.
*)
ISubstance=Interface (IMedicalEntity)
(*Recommended intake of this supplement for a given population as defined by a
specific recommending authority.*)
function Get_maximumIntake:IMaximumDoseSchedule;
procedure Set_maximumIntake(v:IMaximumDoseSchedule);
// properties
property maximumIntake:IMaximumDoseSchedule read Get_maximumIntake write Set_maximumIntake;
end;
(*** end ISubstance ***)
IQualitativeValue=interface; //forward
(* DoseSchedule
A specific dosing schedule for a drug or supplement.
*)
IDoseSchedule=Interface (IMedicalIntangible)
(*The unit of the dose, e.g. 'mg'.*)
function Get_doseUnit:String;
procedure Set_doseUnit(v:String);
(*The value of the dose, e.g. 500.*)
function Get_doseValue:IQualitativeValue;
procedure Set_doseValue(v:IQualitativeValue);
(*How often the dose is taken, e.g. 'daily'.*)
function Get_frequency:String;
procedure Set_frequency(v:String);
// properties
property doseUnit:String read Get_doseUnit write Set_doseUnit;
property doseValue:IQualitativeValue read Get_doseValue write Set_doseValue;
property frequency:String read Get_frequency write Set_frequency;
end;
(*** end IDoseSchedule ***)
IPropertyValue=interface; //forward
(* QualitativeValue
A predefined value for a product characteristic, e.g. the power cord plug type
'US' or the garment sizes 'S', 'M', 'L', and 'XL'.
*)
IQualitativeValue=Interface (IEnumeration)
(*This ordering relation for qualitative values indicates that the subject is
lesser than the object.*)
function Get_lesser:IQualitativeValue;
procedure Set_lesser(v:IQualitativeValue);
(*This ordering relation for qualitative values indicates that the subject is
not equal to the object.*)
function Get_nonEqual:IQualitativeValue;
procedure Set_nonEqual(v:IQualitativeValue);
(*This ordering relation for qualitative values indicates that the subject is
lesser than or equal to the object.*)
function Get_lesserOrEqual:IQualitativeValue;
procedure Set_lesserOrEqual(v:IQualitativeValue);
(*This ordering relation for qualitative values indicates that the subject is
greater than the object.*)
function Get_greater:IQualitativeValue;
procedure Set_greater(v:IQualitativeValue);
(**)
function Get_additionalProperty:IPropertyValue;
procedure Set_additionalProperty(v:IPropertyValue);
(*This ordering relation for qualitative values indicates that the subject is
equal to the object.*)
function Get_equal:IQualitativeValue;
procedure Set_equal(v:IQualitativeValue);
(*This ordering relation for qualitative values indicates that the subject is
greater than or equal to the object.*)
function Get_greaterOrEqual:IQualitativeValue;
procedure Set_greaterOrEqual(v:IQualitativeValue);
// properties
property lesser:IQualitativeValue read Get_lesser write Set_lesser;
property nonEqual:IQualitativeValue read Get_nonEqual write Set_nonEqual;
property lesserOrEqual:IQualitativeValue read Get_lesserOrEqual write Set_lesserOrEqual;
property greater:IQualitativeValue read Get_greater write Set_greater;
property additionalProperty:IPropertyValue read Get_additionalProperty write Set_additionalProperty;
property equal:IQualitativeValue read Get_equal write Set_equal;
property greaterOrEqual:IQualitativeValue read Get_greaterOrEqual write Set_greaterOrEqual;
end;
(*** end IQualitativeValue ***)
(* PropertyValue
*)
IPropertyValue=Interface (IStructuredValue)
(*The lower value of some characteristic or property.*)
function Get_minValue:INumber;
procedure Set_minValue(v:INumber);
(*A commonly used identifier for the characteristic represented by the
property, e.g. a manufacturer or a standard code for a property. propertyID can
be
(1) a prefixed string, mainly meant to be used with standards for product
properties; (2) a site-specific, non-prefixed string (e.g. the primary key of
the property or the vendor-specific id of the property), or (3)
a URL
indicating the type of the property, either pointing to an external vocabulary,
or a Web resource that describes the property (e.g. a glossary
entry).
Standards bodies should promote a standard prefix for the identifiers
of properties from their standards.*)
function Get_propertyID:String;
procedure Set_propertyID(v:String);
// properties
property minValue:INumber read Get_minValue write Set_minValue;
property propertyID:String read Get_propertyID write Set_propertyID;
end;
(*** end IPropertyValue ***)
(* MaximumDoseSchedule
The maximum dosing schedule considered safe for a drug or supplement as
recommended by an authority or by the drug/supplement's manufacturer. Capture
the recommending authority in the recognizingAuthority property of
MedicalEntity.
*)
IMaximumDoseSchedule=Interface (IDoseSchedule)
(*No atribs*)
end;
(*** end IMaximumDoseSchedule ***)
IHealthInsurancePlan=interface; //forward
IDrugCost=interface; //forward
IDrugPregnancyCategory=interface; //forward
IDrugPrescriptionStatus=interface; //forward
IDrugStrength=interface; //forward
IDrugClass=interface; //forward
(* Drug
A chemical or biologic substance, used as a medical therapy, that has a
physiological effect on an organism. Here the term drug is used interchangeably
with the term medicine although clinical knowledge make a clear difference
between them.
*)
IDrug=Interface (ISubstance)
(*Any FDA or other warnings about the drug (text or URL).*)
function Get_warning:String;
procedure Set_warning(v:String);
(*The insurance plans that cover this drug.*)
function Get_includedInHealthInsurancePlan:IHealthInsurancePlan;
procedure Set_includedInHealthInsurancePlan(v:IHealthInsurancePlan);
(*Proprietary name given to the diet plan, typically by its originator or
creator.*)
function Get_proprietaryName:String;
procedure Set_proprietaryName(v:String);
(*Cost per unit of the drug, as reported by the source being tagged.*)
function Get_cost:IDrugCost;
procedure Set_cost(v:IDrugCost);
(*The unit in which the drug is measured, e.g. '5 mg tablet'.*)
function Get_drugUnit:String;
procedure Set_drugUnit(v:String);
(*Pregnancy category of this drug.*)
function Get_pregnancyCategory:IDrugPregnancyCategory;
procedure Set_pregnancyCategory(v:IDrugPregnancyCategory);
(*A dosing schedule for the drug for a given population, either observed,
recommended, or maximum dose based on the type used.*)
function Get_doseSchedule:IDoseSchedule;
procedure Set_doseSchedule(v:IDoseSchedule);
(*A dosage form in which this drug/supplement is available, e.g. 'tablet',
'suspension', 'injection'.*)
function Get_dosageForm:String;
procedure Set_dosageForm(v:String);
(*Link to prescribing information for the drug.*)
function Get_prescribingInfo:String;
procedure Set_prescribingInfo(v:String);
(*Indicates the status of drug prescription eg. local catalogs classifications
or whether the drug is available by prescription or over-the-counter, etc.*)
function Get_prescriptionStatus:IDrugPrescriptionStatus;
procedure Set_prescriptionStatus(v:IDrugPrescriptionStatus);
(*The RxCUI drug identifier from RXNORM.*)
function Get_rxcui:String;
procedure Set_rxcui(v:String);
(*Any precaution, guidance, contraindication, etc. related to this drug's use
during pregnancy.*)
function Get_pregnancyWarning:String;
procedure Set_pregnancyWarning(v:String);
(*An available dosage strength for the drug.*)
function Get_availableStrength:IDrugStrength;
procedure Set_availableStrength(v:IDrugStrength);
(*Description of the absorption and elimination of drugs, including their
concentration (pharmacokinetics, pK) and biological effects (pharmacodynamics,
pD).*)
function Get_clincalPharmacology:String;
procedure Set_clincalPharmacology(v:String);
(*Any other drug related to this one, for example commonly-prescribed
alternatives.*)
function Get_relatedDrug:IDrug;
procedure Set_relatedDrug(v:IDrug);
(*The class of drug this belongs to (e.g., statins).*)
function Get_drugClass:IDrugClass;
procedure Set_drugClass(v:IDrugClass);
(*A route by which this drug may be administered, e.g. 'oral'.*)
function Get_administrationRoute:String;
procedure Set_administrationRoute(v:String);
(*Any precaution, guidance, contraindication, etc. related to this drug's use
by breastfeeding mothers.*)
function Get_breastfeedingWarning:String;
procedure Set_breastfeedingWarning(v:String);
(*Another drug that is known to interact with this drug in a way that impacts
the effect of this drug or causes a risk to the patient. Note: disease
interactions are typically captured as contraindications.*)
function Get_interactingDrug:IDrug;
procedure Set_interactingDrug(v:IDrug);
(*Any precaution, guidance, contraindication, etc. related to consumption of
specific foods while taking this drug.*)
function Get_foodWarning:String;
procedure Set_foodWarning(v:String);
(*Any precaution, guidance, contraindication, etc. related to consumption of
alcohol while taking this drug.*)
function Get_alcoholWarning:String;
procedure Set_alcoholWarning(v:String);
(*Link to the drug's label details.*)
function Get_labelDetails:String;
procedure Set_labelDetails(v:String);
(*Any information related to overdose on a drug, including signs or symptoms,
treatments, contact information for emergency response.*)
function Get_overdosage:String;
procedure Set_overdosage(v:String);
(*True if the drug is available in a generic form (regardless of name).*)
function Get_isAvailableGenerically:Boolean;
procedure Set_isAvailableGenerically(v:Boolean);
// properties
property warning:String read Get_warning write Set_warning;
property includedInHealthInsurancePlan:IHealthInsurancePlan read Get_includedInHealthInsurancePlan write Set_includedInHealthInsurancePlan;
property proprietaryName:String read Get_proprietaryName write Set_proprietaryName;
property cost:IDrugCost read Get_cost write Set_cost;
property drugUnit:String read Get_drugUnit write Set_drugUnit;
property pregnancyCategory:IDrugPregnancyCategory read Get_pregnancyCategory write Set_pregnancyCategory;
property doseSchedule:IDoseSchedule read Get_doseSchedule write Set_doseSchedule;
property dosageForm:String read Get_dosageForm write Set_dosageForm;
property prescribingInfo:String read Get_prescribingInfo write Set_prescribingInfo;
property prescriptionStatus:IDrugPrescriptionStatus read Get_prescriptionStatus write Set_prescriptionStatus;
property rxcui:String read Get_rxcui write Set_rxcui;
property pregnancyWarning:String read Get_pregnancyWarning write Set_pregnancyWarning;
property availableStrength:IDrugStrength read Get_availableStrength write Set_availableStrength;
property clincalPharmacology:String read Get_clincalPharmacology write Set_clincalPharmacology;
property relatedDrug:IDrug read Get_relatedDrug write Set_relatedDrug;
property drugClass:IDrugClass read Get_drugClass write Set_drugClass;
property administrationRoute:String read Get_administrationRoute write Set_administrationRoute;
property breastfeedingWarning:String read Get_breastfeedingWarning write Set_breastfeedingWarning;
property interactingDrug:IDrug read Get_interactingDrug write Set_interactingDrug;
property foodWarning:String read Get_foodWarning write Set_foodWarning;
property alcoholWarning:String read Get_alcoholWarning write Set_alcoholWarning;
property labelDetails:String read Get_labelDetails write Set_labelDetails;
property overdosage:String read Get_overdosage write Set_overdosage;
property isAvailableGenerically:Boolean read Get_isAvailableGenerically write Set_isAvailableGenerically;
end;
(*** end IDrug ***)
IHealthPlanNetwork=interface; //forward
IHealthPlanFormulary=interface; //forward
(* HealthInsurancePlan
A US-style health insurance plan, including PPOs, EPOs, and HMOs.
*)
IHealthInsurancePlan=Interface (IIntangible)
(*Networks covered by this plan.*)
function Get_includesHealthPlanNetwork:IHealthPlanNetwork;
procedure Set_includesHealthPlanNetwork(v:IHealthPlanNetwork);
(*The 14-character, HIOS-generated Plan ID number. (Plan IDs must be unique,
even across different markets.)*)
function Get_healthPlanId:String;
procedure Set_healthPlanId(v:String);
(*The tier(s) of drugs offered by this formulary or insurance plan.*)
function Get_healthPlanDrugTier:String;
procedure Set_healthPlanDrugTier(v:String);
(*The URL that goes directly to the plan brochure for the specific standard
plan or plan variation.*)
function Get_healthPlanMarketingUrl:String;
procedure Set_healthPlanMarketingUrl(v:String);
(*The standard for interpreting thePlan ID. The preferred is "HIOS". See the
Centers for Medicare &amp; Medicaid Services for more details.*)
function Get_usesHealthPlanIdStandard:String;
procedure Set_usesHealthPlanIdStandard(v:String);
(*TODO.*)
function Get_healthPlanDrugOption:String;
procedure Set_healthPlanDrugOption(v:String);
(*Formularies covered by this plan.*)
function Get_includesHealthPlanFormulary:IHealthPlanFormulary;
procedure Set_includesHealthPlanFormulary(v:IHealthPlanFormulary);
(*The URL that goes directly to the summary of benefits and coverage for the
specific standard plan or plan variation.*)
function Get_benefitsSummaryUrl:String;
procedure Set_benefitsSummaryUrl(v:String);
// properties
property includesHealthPlanNetwork:IHealthPlanNetwork read Get_includesHealthPlanNetwork write Set_includesHealthPlanNetwork;
property healthPlanId:String read Get_healthPlanId write Set_healthPlanId;
property healthPlanDrugTier:String read Get_healthPlanDrugTier write Set_healthPlanDrugTier;
property healthPlanMarketingUrl:String read Get_healthPlanMarketingUrl write Set_healthPlanMarketingUrl;
property usesHealthPlanIdStandard:String read Get_usesHealthPlanIdStandard write Set_usesHealthPlanIdStandard;
property healthPlanDrugOption:String read Get_healthPlanDrugOption write Set_healthPlanDrugOption;
property includesHealthPlanFormulary:IHealthPlanFormulary read Get_includesHealthPlanFormulary write Set_includesHealthPlanFormulary;
property benefitsSummaryUrl:String read Get_benefitsSummaryUrl write Set_benefitsSummaryUrl;
end;
(*** end IHealthInsurancePlan ***)
(* HealthPlanNetwork
A US-style health insurance plan network.
*)
IHealthPlanNetwork=Interface (IIntangible)
(*The tier(s) for this network.*)
function Get_healthPlanNetworkTier:String;
procedure Set_healthPlanNetworkTier(v:String);
(*Whether The costs to the patient for services under this network or
formulary.*)
function Get_healthPlanCostSharing:Boolean;
procedure Set_healthPlanCostSharing(v:Boolean);
// properties
property healthPlanNetworkTier:String read Get_healthPlanNetworkTier write Set_healthPlanNetworkTier;
property healthPlanCostSharing:Boolean read Get_healthPlanCostSharing write Set_healthPlanCostSharing;
end;
(*** end IHealthPlanNetwork ***)
(* HealthPlanFormulary
For a given health insurance plan, the specification for costs and coverage of
prescription drugs.
*)
IHealthPlanFormulary=Interface (IIntangible)
(*Whether prescriptions can be delivered by mail.*)
function Get_offersPrescriptionByMail:Boolean;
procedure Set_offersPrescriptionByMail(v:Boolean);
// properties
property offersPrescriptionByMail:Boolean read Get_offersPrescriptionByMail write Set_offersPrescriptionByMail;
end;
(*** end IHealthPlanFormulary ***)
IDrugCostCategory=interface; //forward
(* DrugCost
The cost per unit of a medical drug. Note that this type is not meant to
represent the price in an offer of a drug for sale; see the Offer type for
that. This type will typically be used to tag wholesale or average retail cost
of a drug, or maximum reimbursable cost. Costs of medical drugs vary widely
depending on how and where they are paid for, so while this type captures some
of the variables, costs should be used with caution by consumers of this
schema's markup.
*)
IDrugCost=Interface (IMedicalEnumeration)
(*The cost per unit of the drug.*)
function Get_costPerUnit:IQualitativeValue;
procedure Set_costPerUnit(v:IQualitativeValue);
(*The location in which the status applies.*)
function Get_applicableLocation:IAdministrativeArea;
procedure Set_applicableLocation(v:IAdministrativeArea);
(*The category of cost, such as wholesale, retail, reimbursement cap, etc.*)
function Get_costCategory:IDrugCostCategory;
procedure Set_costCategory(v:IDrugCostCategory);
(*The currency (in 3-letter of the drug cost. See:
http://en.wikipedia.org/wiki/ISO_4217*)
function Get_costCurrency:String;
procedure Set_costCurrency(v:String);
(*Additional details to capture the origin of the cost data. For example,
'Medicare Part B'.*)
function Get_costOrigin:String;
procedure Set_costOrigin(v:String);
// properties
property costPerUnit:IQualitativeValue read Get_costPerUnit write Set_costPerUnit;
property applicableLocation:IAdministrativeArea read Get_applicableLocation write Set_applicableLocation;
property costCategory:IDrugCostCategory read Get_costCategory write Set_costCategory;
property costCurrency:String read Get_costCurrency write Set_costCurrency;
property costOrigin:String read Get_costOrigin write Set_costOrigin;
end;
(*** end IDrugCost ***)
(* DrugCostCategory
Enumerated categories of medical drug costs.
*)
IDrugCostCategory=Interface (IMedicalEnumeration)
function TangDrugCostCategory:TangibleValue;
end;
(*** end IDrugCostCategory ***)
(* DrugPregnancyCategory
Categories that represent an assessment of the risk of fetal injury due to a
drug or pharmaceutical used as directed by the mother during pregnancy.
*)
IDrugPregnancyCategory=Interface (IMedicalEnumeration)
function TangDrugPregnancyCategory:TangibleValue;
end;
(*** end IDrugPregnancyCategory ***)
(* DrugPrescriptionStatus
Indicates whether this drug is available by prescription or over-the-counter.
*)
IDrugPrescriptionStatus=Interface (IMedicalEnumeration)
function TangDrugPrescriptionStatus:TangibleValue;
end;
(*** end IDrugPrescriptionStatus ***)
(* DrugStrength
A specific strength in which a medical drug is available in a specific country.
*)
IDrugStrength=Interface (IMedicalIntangible)
(*The units of an active ingredient's strength, e.g. mg.*)
function Get_strengthUnit:String;
procedure Set_strengthUnit(v:String);
(*An active ingredient, typically chemical compounds and/or biologic
substances.*)
function Get_activeIngredient:String;
procedure Set_activeIngredient(v:String);
(*The location in which the strength is available.*)
function Get_availableIn:IAdministrativeArea;
procedure Set_availableIn(v:IAdministrativeArea);
(*The value of an active ingredient's strength, e.g. 325.*)
function Get_strengthValue:INumber;
procedure Set_strengthValue(v:INumber);
// properties
property strengthUnit:String read Get_strengthUnit write Set_strengthUnit;
property activeIngredient:String read Get_activeIngredient write Set_activeIngredient;
property availableIn:IAdministrativeArea read Get_availableIn write Set_availableIn;
property strengthValue:INumber read Get_strengthValue write Set_strengthValue;
end;
(*** end IDrugStrength ***)
(* DrugClass
A class of medical drugs, e.g., statins. Classes can represent general
pharmacological class, common mechanisms of action, common physiological
effects, etc.
*)
IDrugClass=Interface (IMedicalEnumeration)
(*Specifying a drug or medicine used in a medication procedure*)
function Get_drug:IDrug;
procedure Set_drug(v:IDrug);
// properties
property drug:IDrug read Get_drug write Set_drug;
end;
(*** end IDrugClass ***)
(* MedicalSignOrSymptom
Any feature associated or not with a medical condition. In medicine a symptom
is generally subjective while a sign is objective.
*)
IMedicalSignOrSymptom=Interface (IMedicalCondition)
(*No atribs*)
end;
(*** end IMedicalSignOrSymptom ***)
IPhysicalExam=interface; //forward
(* MedicalSign
Any physical manifestation of a person's medical condition discoverable by
objective diagnostic tests or physical examination.
*)
IMedicalSign=Interface (IMedicalSignOrSymptom)
(*A diagnostic test that can identify this sign.*)
function Get_identifyingTest:IMedicalTest;
procedure Set_identifyingTest(v:IMedicalTest);
(*A physical examination that can identify this sign.*)
function Get_identifyingExam:IPhysicalExam;
procedure Set_identifyingExam(v:IPhysicalExam);
// properties
property identifyingTest:IMedicalTest read Get_identifyingTest write Set_identifyingTest;
property identifyingExam:IPhysicalExam read Get_identifyingExam write Set_identifyingExam;
end;
(*** end IMedicalSign ***)
(* PhysicalExam
A type of physical examination of a patient performed by a physician.
*)
IPhysicalExam=Interface (IMedicalEnumeration)
function TangPhysicalExam:TangibleValue;
end;
(*** end IPhysicalExam ***)
(* MedicalCause
The causative agent(s) that are responsible for the pathophysiologic process
that eventually results in a medical condition, symptom or sign. In this
schema, unless otherwise specified this is meant to be the proximate cause of
the medical condition, symptom or sign. The proximate cause is defined as the
causative agent that most directly results in the medical condition, symptom or
sign. For example, the HIV virus could be considered a cause of AIDS. Or in a
diagnostic context, if a patient fell and sustained a hip fracture and two days
later sustained a pulmonary embolism which eventuated in a cardiac arrest, the
cause of the cardiac arrest (the proximate cause) would be the pulmonary
embolism and not the fall. Medical causes can include cardiovascular, chemical,
dermatologic, endocrine, environmental, gastroenterologic, genetic,
hematologic, gynecologic, iatrogenic, infectious, musculoskeletal, neurologic,
nutritional, obstetric, oncologic, otolaryngologic, pharmacologic, psychiatric,
pulmonary, renal, rheumatologic, toxic, traumatic, or urologic causes; medical
conditions can be causes as well.
*)
IMedicalCause=Interface (IMedicalEntity)
(*The condition, complication, symptom, sign, etc. caused.*)
function Get_causeOf:IMedicalEntity;
procedure Set_causeOf(v:IMedicalEntity);
// properties
property causeOf:IMedicalEntity read Get_causeOf write Set_causeOf;
end;
(*** end IMedicalCause ***)
(* MedicalStudyStatus
The status of a medical study. Enumerated type.
*)
IMedicalStudyStatus=Interface (IMedicalEnumeration)
function TangMedicalStudyStatus:TangibleValue;
end;
(*** end IMedicalStudyStatus ***)
IAnatomicalSystem=interface; //forward
(* AnatomicalStructure
Any part of the human body, typically a component of an anatomical system.
Organs, tissues, and cells are all anatomical structures.
*)
IAnatomicalStructure=Interface (IMedicalEntity)
(*A medical therapy related to this anatomy.*)
function Get_relatedTherapy:IMedicalTherapy;
procedure Set_relatedTherapy(v:IMedicalTherapy);
(*Function of the anatomical structure.*)
function Get__function:String;
procedure Set__function(v:String);
(*Other anatomical structures to which this structure is connected.*)
function Get_connectedTo:IAnatomicalStructure;
procedure Set_connectedTo(v:IAnatomicalStructure);
(*An image containing a diagram that illustrates the structure and/or its
component substructures and/or connections with other structures.*)
function Get_diagram:IImageObject;
procedure Set_diagram(v:IImageObject);
(*The anatomical or organ system that this structure is part of.*)
function Get_partOfSystem:IAnatomicalSystem;
procedure Set_partOfSystem(v:IAnatomicalSystem);
(*Component (sub-)structure(s) that comprise this anatomical structure.*)
function Get_subStructure:IAnatomicalStructure;
procedure Set_subStructure(v:IAnatomicalStructure);
// properties
property relatedTherapy:IMedicalTherapy read Get_relatedTherapy write Set_relatedTherapy;
property _function:String read Get__function write Set__function;
property connectedTo:IAnatomicalStructure read Get_connectedTo write Set_connectedTo;
property diagram:IImageObject read Get_diagram write Set_diagram;
property partOfSystem:IAnatomicalSystem read Get_partOfSystem write Set_partOfSystem;
property subStructure:IAnatomicalStructure read Get_subStructure write Set_subStructure;
end;
(*** end IAnatomicalStructure ***)
(* AnatomicalSystem
An anatomical system is a group of anatomical structures that work together to
perform a certain task. Anatomical systems, such as organ systems, are one
organizing principle of anatomy, and can includes circulatory, digestive,
endocrine, integumentary, immune, lymphatic, muscular, nervous, reproductive,
respiratory, skeletal, urinary, vestibular, and other systems.
*)
IAnatomicalSystem=Interface (IMedicalEntity)
(*Specifying something physically contained by something else. Typically used
here for the underlying anatomical structures, such as organs, that comprise
the anatomical system.*)
function Get_comprisedOf:IAnatomicalStructure;
procedure Set_comprisedOf(v:IAnatomicalStructure);
(*If applicable, a description of the pathophysiology associated with the
anatomical system, including potential abnormal changes in the mechanical,
physical, and biochemical functions of the system.*)
function Get_associatedPathophysiology:String;
procedure Set_associatedPathophysiology(v:String);
(*A medical condition associated with this anatomy.*)
function Get_relatedCondition:IMedicalCondition;
procedure Set_relatedCondition(v:IMedicalCondition);
(*Related anatomical structure(s) that are not part of the system but relate or
connect to it, such as vascular bundles associated with an organ system.*)
function Get_relatedStructure:IAnatomicalStructure;
procedure Set_relatedStructure(v:IAnatomicalStructure);
// properties
property comprisedOf:IAnatomicalStructure read Get_comprisedOf write Set_comprisedOf;
property associatedPathophysiology:String read Get_associatedPathophysiology write Set_associatedPathophysiology;
property relatedCondition:IMedicalCondition read Get_relatedCondition write Set_relatedCondition;
property relatedStructure:IAnatomicalStructure read Get_relatedStructure write Set_relatedStructure;
end;
(*** end IAnatomicalSystem ***)
(* MedicalRiskFactor
A risk factor is anything that increases a person's likelihood of developing or
contracting a disease, medical condition, or complication.
*)
IMedicalRiskFactor=Interface (IMedicalEntity)
(*The condition, complication, etc. influenced by this factor.*)
function Get_increasesRiskOf:IMedicalEntity;
procedure Set_increasesRiskOf(v:IMedicalEntity);
// properties
property increasesRiskOf:IMedicalEntity read Get_increasesRiskOf write Set_increasesRiskOf;
end;
(*** end IMedicalRiskFactor ***)
(* DDxElement
An alternative, closely-related condition typically considered later in the
differential diagnosis process along with the signs that are used to
distinguish it.
*)
IDDxElement=Interface (IMedicalIntangible)
(*One or more alternative conditions considered in the differential diagnosis
process as output of a diagnosis process.*)
function Get_diagnosis:IMedicalCondition;
procedure Set_diagnosis(v:IMedicalCondition);
(*One of a set of signs and symptoms that can be used to distinguish this
diagnosis from others in the differential diagnosis.*)
function Get_distinguishingSign:IMedicalSignOrSymptom;
procedure Set_distinguishingSign(v:IMedicalSignOrSymptom);
// properties
property diagnosis:IMedicalCondition read Get_diagnosis write Set_diagnosis;
property distinguishingSign:IMedicalSignOrSymptom read Get_distinguishingSign write Set_distinguishingSign;
end;
(*** end IDDxElement ***)
(* MedicalConditionStage
A stage of a medical condition, such as 'Stage IIIa'.
*)
IMedicalConditionStage=Interface (IMedicalIntangible)
(*The stage represented as a number, e.g. 3.*)
function Get_stageAsNumber:INumber;
procedure Set_stageAsNumber(v:INumber);
(*The substage, e.g. 'a' for Stage IIIa.*)
function Get_subStageSuffix:String;
procedure Set_subStageSuffix(v:String);
// properties
property stageAsNumber:INumber read Get_stageAsNumber write Set_stageAsNumber;
property subStageSuffix:String read Get_subStageSuffix write Set_subStageSuffix;
end;
(*** end IMedicalConditionStage ***)
(* Specialty
Any branch of a field in which people typically develop specific expertise,
usually after significant study, time, and effort.
*)
ISpecialty=Interface (IEnumeration)
function TangSpecialty:TangibleValue;
end;
(*** end ISpecialty ***)
(* MedicalSpecialty
Any specific branch of medical science or practice. Medical specialities
include clinical specialties that pertain to particular organ systems and their
respective disease states, as well as allied health specialties. Enumerated
type.
*)
IMedicalSpecialty=Interface (ISpecialty)
function TangMedicalSpecialty:TangibleValue;
end;
(*** end IMedicalSpecialty ***)
(* BloodTest
A medical test performed on a sample of a patient's blood.
*)
IBloodTest=Interface (IMedicalTest)
(*No atribs*)
end;
(*** end IBloodTest ***)
(* Store
A retail good store.
*)
IStore=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end IStore ***)
(* OutletStore
An outlet store.
*)
IOutletStore=Interface (IStore)
(*No atribs*)
end;
(*** end IOutletStore ***)
ICreativeWorkSeason=interface; //forward
(* Clip
A short TV or radio program or a segment/part of a program.
*)
IClip=Interface (ICreativeWork)
(*The episode to which this clip belongs.*)
function Get_partOfEpisode:IEpisode;
procedure Set_partOfEpisode(v:IEpisode);
(*Position of the clip within an ordered group of clips.*)
function Get_clipNumber:String;
procedure Set_clipNumber(v:String);
(*The season to which this episode belongs.*)
function Get_partOfSeason:ICreativeWorkSeason;
procedure Set_partOfSeason(v:ICreativeWorkSeason);
(*A director of e.g. tv, radio, movie, video games etc. content. Directors can
be associated with individual items or with a series, episode, clip.*)
function Get_directors:IPerson;
procedure Set_directors(v:IPerson);
// properties
property partOfEpisode:IEpisode read Get_partOfEpisode write Set_partOfEpisode;
property clipNumber:String read Get_clipNumber write Set_clipNumber;
property partOfSeason:ICreativeWorkSeason read Get_partOfSeason write Set_partOfSeason;
property directors:IPerson read Get_directors write Set_directors;
end;
(*** end IClip ***)
(* CreativeWorkSeason
A media season e.g. tv, radio, video game etc.
*)
ICreativeWorkSeason=Interface (ICreativeWork)
(*An episode of a TV/radio series or season.*)
function Get_episodes:IEpisode;
procedure Set_episodes(v:IEpisode);
(*Position of the season within an ordered group of seasons.*)
function Get_seasonNumber:Integer;
procedure Set_seasonNumber(v:Integer);
// properties
property episodes:IEpisode read Get_episodes write Set_episodes;
property seasonNumber:Integer read Get_seasonNumber write Set_seasonNumber;
end;
(*** end ICreativeWorkSeason ***)
(* VideoGameClip
A short segment/part of a video game.
*)
IVideoGameClip=Interface (IClip)
(*No atribs*)
end;
(*** end IVideoGameClip ***)
(* SurgicalProcedure
A type of medical procedure that involves invasive surgical techniques.
*)
ISurgicalProcedure=Interface (IMedicalProcedure)
(*No atribs*)
end;
(*** end ISurgicalProcedure ***)
(* DepartmentStore
A department store.
*)
IDepartmentStore=Interface (IStore)
(*No atribs*)
end;
(*** end IDepartmentStore ***)
(* ToyStore
A toy store.
*)
IToyStore=Interface (IStore)
(*No atribs*)
end;
(*** end IToyStore ***)
(* Library
A library.
*)
ILibrary=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end ILibrary ***)
(* HighSchool
A high school.
*)
IHighSchool=Interface (IEducationalOrganization)
(*No atribs*)
end;
(*** end IHighSchool ***)
(* LegalService
*)
ILegalService=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end ILegalService ***)
(* Notary
A notary.
*)
INotary=Interface (ILegalService)
(*No atribs*)
end;
(*** end INotary ***)
(* MovieClip
A short segment/part of a movie.
*)
IMovieClip=Interface (IClip)
(*No atribs*)
end;
(*** end IMovieClip ***)
(* ConsumeAction
The act of ingesting information/resources/food.
*)
IConsumeAction=Interface (IAction)
(*An Offer which must be accepted before the user can perform the Action. For
example, the user may need to buy a movie before being able to watch it.*)
function Get_expectsAcceptanceOf:IOffer;
procedure Set_expectsAcceptanceOf(v:IOffer);
// properties
property expectsAcceptanceOf:IOffer read Get_expectsAcceptanceOf write Set_expectsAcceptanceOf;
end;
(*** end IConsumeAction ***)
(* DrinkAction
The act of swallowing liquids.
*)
IDrinkAction=Interface (IConsumeAction)
(*No atribs*)
end;
(*** end IDrinkAction ***)
(* CivicStructure
A public structure, such as a town hall or concert hall.
*)
ICivicStructure=Interface (IPlace)
(*No atribs*)
end;
(*** end ICivicStructure ***)
(* GovernmentBuilding
A government building.
*)
IGovernmentBuilding=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IGovernmentBuilding ***)
(* CityHall
A city hall.
*)
ICityHall=Interface (IGovernmentBuilding)
(*No atribs*)
end;
(*** end ICityHall ***)
(* SportsActivityLocation
A sports location, such as a playing field.
*)
ISportsActivityLocation=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end ISportsActivityLocation ***)
(* ExerciseGym
A gym.
*)
IExerciseGym=Interface (ISportsActivityLocation)
(*No atribs*)
end;
(*** end IExerciseGym ***)
(* ElementarySchool
An elementary school.
*)
IElementarySchool=Interface (IEducationalOrganization)
(*No atribs*)
end;
(*** end IElementarySchool ***)
(* OrganizeAction
The act of manipulating/administering/supervising/controlling one or more
objects.
*)
IOrganizeAction=Interface (IAction)
(*No atribs*)
end;
(*** end IOrganizeAction ***)
(* AllocateAction
The act of organizing tasks/objects/events by associating resources to it.
*)
IAllocateAction=Interface (IOrganizeAction)
(*No atribs*)
end;
(*** end IAllocateAction ***)
(* AssignAction
The act of allocating an action/event/task to some destination (someone or
something).
*)
IAssignAction=Interface (IAllocateAction)
(*No atribs*)
end;
(*** end IAssignAction ***)
(* EntertainmentBusiness
A business providing entertainment.
*)
IEntertainmentBusiness=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end IEntertainmentBusiness ***)
(* Casino
A casino.
*)
ICasino=Interface (IEntertainmentBusiness)
(*No atribs*)
end;
(*** end ICasino ***)
(* MoveAction
*)
IMoveAction=Interface (IAction)
(*A sub property of location. The final location of the object or the agent
after the action.*)
function Get_toLocation:IPlace;
procedure Set_toLocation(v:IPlace);
// properties
property toLocation:IPlace read Get_toLocation write Set_toLocation;
end;
(*** end IMoveAction ***)
(* DepartAction
The act of departing from a place. An agent departs from an fromLocation for a
destination, optionally with participants.
*)
IDepartAction=Interface (IMoveAction)
(*No atribs*)
end;
(*** end IDepartAction ***)
(* TelevisionChannel
A unique instance of a television BroadcastService on a CableOrSatelliteService
lineup.
*)
ITelevisionChannel=Interface (IBroadcastChannel)
function TangTelevisionChannel:TangibleValue;
end;
(*** end ITelevisionChannel ***)
(* HobbyShop
A store that sells materials useful or necessary for various hobbies.
*)
IHobbyShop=Interface (IStore)
(*No atribs*)
end;
(*** end IHobbyShop ***)
(* UserInteraction
*)
IUserInteraction=Interface (IEvent)
(*No atribs*)
end;
(*** end IUserInteraction ***)
(* UserLikes
*)
IUserLikes=Interface (IUserInteraction)
(*No atribs*)
end;
(*** end IUserLikes ***)
(* Float
Data type: Floating number.
*)
IFloat=Interface (INumber)
(*No atribs*)
end;
(*** end IFloat ***)
(* Ligament
A short band of tough, flexible, fibrous connective tissue that functions to
connect multiple bones, cartilages, and structurally support joints.
*)
ILigament=Interface (IAnatomicalStructure)
(*No atribs*)
end;
(*** end ILigament ***)
(* HealthAndBeautyBusiness
Health and beauty.
*)
IHealthAndBeautyBusiness=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end IHealthAndBeautyBusiness ***)
(* TattooParlor
A tattoo parlor.
*)
ITattooParlor=Interface (IHealthAndBeautyBusiness)
(*No atribs*)
end;
(*** end ITattooParlor ***)
(* WebPageElement
A web page element, like a table or an image.
*)
IWebPageElement=Interface (ICreativeWork)
(*No atribs*)
end;
(*** end IWebPageElement ***)
(* WPAdBlock
An advertising section of the page.
*)
IWPAdBlock=Interface (IWebPageElement)
(*No atribs*)
end;
(*** end IWPAdBlock ***)
(* ApplyAction
*)
IApplyAction=Interface (IOrganizeAction)
(*No atribs*)
end;
(*** end IApplyAction ***)
(* TheaterEvent
Event type: Theater performance.
*)
ITheaterEvent=Interface (IEvent)
(*No atribs*)
end;
(*** end ITheaterEvent ***)
(* WatchAction
The act of consuming dynamic/moving visual content.
*)
IWatchAction=Interface (IConsumeAction)
(*No atribs*)
end;
(*** end IWatchAction ***)
(* TouristAttraction
A tourist attraction.
*)
ITouristAttraction=Interface (IPlace)
(*No atribs*)
end;
(*** end ITouristAttraction ***)
(* Landform
A landform or physical feature. Landform elements include mountains, plains,
lakes, rivers, seascape and oceanic waterbody interface features such as bays,
peninsulas, seas and so forth, including sub-aqueous terrain features such as
submersed mountain ranges, volcanoes, and the great ocean basins.
*)
ILandform=Interface (IPlace)
(*No atribs*)
end;
(*** end ILandform ***)
(* Continent
One of the continents (for example, Europe or Africa).
*)
IContinent=Interface (ILandform)
(*No atribs*)
end;
(*** end IContinent ***)
(* ControlAction
An agent controls a device or application.
*)
IControlAction=Interface (IAction)
(*No atribs*)
end;
(*** end IControlAction ***)
(* ResumeAction
The act of resuming a device or application which was formerly paused (e.g.
resume music playback or resume a timer).
*)
IResumeAction=Interface (IControlAction)
(*No atribs*)
end;
(*** end IResumeAction ***)
(* Atlas
A collection or bound volume of maps, charts, plates or tables, physical or in
media form illustrating any subject.
*)
IAtlas=Interface (ICreativeWork)
(*No atribs*)
end;
(*** end IAtlas ***)
(* DanceEvent
Event type: A social dance.
*)
IDanceEvent=Interface (IEvent)
(*No atribs*)
end;
(*** end IDanceEvent ***)
(* LodgingBusiness
A lodging business, such as a motel, hotel, or inn.
*)
ILodgingBusiness=Interface (ILocalBusiness)
(*Indicates whether pets are allowed to enter the accommodation or lodging
business. More detailed information can be put in a text value.*)
function Get_petsAllowed:Boolean;
procedure Set_petsAllowed(v:Boolean);
(*The latest someone may check out of a lodging establishment.*)
function Get_checkoutTime:TDateTime;
procedure Set_checkoutTime(v:TDateTime);
(*The earliest someone may check into a lodging establishment.*)
function Get_checkinTime:TDateTime;
procedure Set_checkinTime(v:TDateTime);
(*An official rating for a lodging business or food establishment, e.g. from
national associations or standards bodies. Use the author property to indicate
the rating organization, e.g. as an Organization with name such as (e.g.
HOTREC, DEHOGA, WHR, or Hotelstars).*)
function Get_starRating:IRating;
procedure Set_starRating(v:IRating);
// properties
property petsAllowed:Boolean read Get_petsAllowed write Set_petsAllowed;
property checkoutTime:TDateTime read Get_checkoutTime write Set_checkoutTime;
property checkinTime:TDateTime read Get_checkinTime write Set_checkinTime;
property starRating:IRating read Get_starRating write Set_starRating;
end;
(*** end ILodgingBusiness ***)
(* Hotel
*)
IHotel=Interface (ILodgingBusiness)
(*No atribs*)
end;
(*** end IHotel ***)
(* MusicEvent
Event type: Music event.
*)
IMusicEvent=Interface (IEvent)
(*No atribs*)
end;
(*** end IMusicEvent ***)
(* BowlingAlley
A bowling alley.
*)
IBowlingAlley=Interface (ISportsActivityLocation)
(*No atribs*)
end;
(*** end IBowlingAlley ***)
(* CreateAction
The act of deliberately creating/producing/generating/building a result out of
the agent.
*)
ICreateAction=Interface (IAction)
(*No atribs*)
end;
(*** end ICreateAction ***)
(* FilmAction
The act of capturing sound and moving images on film, video, or digitally.
*)
IFilmAction=Interface (ICreateAction)
(*No atribs*)
end;
(*** end IFilmAction ***)
IProgramMembership=interface; //forward
ITicket=interface; //forward
IReservationStatusType=interface; //forward
(* Reservation
*)
IReservation=Interface (IIntangible)
(*The total price for the reservation or ticket, including applicable taxes,
shipping, etc.*)
function Get_totalPrice:String;
procedure Set_totalPrice(v:String);
(*A unique identifier for the reservation.*)
function Get_reservationId:String;
procedure Set_reservationId(v:String);
(*The date and time the reservation was modified.*)
function Get_modifiedTime:TDateTime;
procedure Set_modifiedTime(v:TDateTime);
(*Any membership in a frequent flyer, hotel loyalty program, etc. being applied
to the reservation.*)
function Get_programMembershipUsed:IProgramMembership;
procedure Set_programMembershipUsed(v:IProgramMembership);
(*The date and time the reservation was booked.*)
function Get_bookingTime:TDateTime;
procedure Set_bookingTime(v:TDateTime);
(*A ticket associated with the reservation.*)
function Get_reservedTicket:ITicket;
procedure Set_reservedTicket(v:ITicket);
(*The thing -- flight, event, restaurant,etc. being reserved.*)
function Get_reservationFor:IThing;
procedure Set_reservationFor(v:IThing);
(*'bookingAgent' is an out-dated term indicating a 'broker' that serves as a
booking agent.*)
function Get_bookingAgent:IOrganization;
procedure Set_bookingAgent(v:IOrganization);
(*The current status of the reservation.*)
function Get_reservationStatus:IReservationStatusType;
procedure Set_reservationStatus(v:IReservationStatusType);
// properties
property totalPrice:String read Get_totalPrice write Set_totalPrice;
property reservationId:String read Get_reservationId write Set_reservationId;
property modifiedTime:TDateTime read Get_modifiedTime write Set_modifiedTime;
property programMembershipUsed:IProgramMembership read Get_programMembershipUsed write Set_programMembershipUsed;
property bookingTime:TDateTime read Get_bookingTime write Set_bookingTime;
property reservedTicket:ITicket read Get_reservedTicket write Set_reservedTicket;
property reservationFor:IThing read Get_reservationFor write Set_reservationFor;
property bookingAgent:IOrganization read Get_bookingAgent write Set_bookingAgent;
property reservationStatus:IReservationStatusType read Get_reservationStatus write Set_reservationStatus;
end;
(*** end IReservation ***)
(* ProgramMembership
Used to describe membership in a loyalty programs (e.g. "StarAliance"),
traveler clubs (e.g. "AAA"), purchase clubs ("Safeway Club"), etc.
*)
IProgramMembership=Interface (IIntangible)
(*The organization (airline, travelers' club, etc.) the membership is made
with.*)
function Get_hostingOrganization:IOrganization;
procedure Set_hostingOrganization(v:IOrganization);
(*The program providing the membership.*)
function Get_programName:String;
procedure Set_programName(v:String);
(*A unique identifier for the membership.*)
function Get_membershipNumber:String;
procedure Set_membershipNumber(v:String);
// properties
property hostingOrganization:IOrganization read Get_hostingOrganization write Set_hostingOrganization;
property programName:String read Get_programName write Set_programName;
property membershipNumber:String read Get_membershipNumber write Set_membershipNumber;
end;
(*** end IProgramMembership ***)
ISeat=interface; //forward
(* Ticket
Used to describe a ticket to an event, a flight, a bus ride, etc.
*)
ITicket=Interface (IIntangible)
(*Reference to an asset (e.g., Barcode, QR code image or PDF) usable for
entrance.*)
function Get_ticketToken:String;
procedure Set_ticketToken(v:String);
(*The seat associated with the ticket.*)
function Get_ticketedSeat:ISeat;
procedure Set_ticketedSeat(v:ISeat);
(*The unique identifier for the ticket.*)
function Get_ticketNumber:String;
procedure Set_ticketNumber(v:String);
(*The person or organization the reservation or ticket is for.*)
function Get_underName:IOrganization;
procedure Set_underName(v:IOrganization);
(*The date the ticket was issued.*)
function Get_dateIssued:TDateTime;
procedure Set_dateIssued(v:TDateTime);
// properties
property ticketToken:String read Get_ticketToken write Set_ticketToken;
property ticketedSeat:ISeat read Get_ticketedSeat write Set_ticketedSeat;
property ticketNumber:String read Get_ticketNumber write Set_ticketNumber;
property underName:IOrganization read Get_underName write Set_underName;
property dateIssued:TDateTime read Get_dateIssued write Set_dateIssued;
end;
(*** end ITicket ***)
(* Seat
Used to describe a seat, such as a reserved seat in an event reservation.
*)
ISeat=Interface (IIntangible)
(*The row location of the reserved seat (e.g., B).*)
function Get_seatRow:String;
procedure Set_seatRow(v:String);
(*The location of the reserved seat (e.g., 27).*)
function Get_seatNumber:String;
procedure Set_seatNumber(v:String);
(*The section location of the reserved seat (e.g. Orchestra).*)
function Get_seatSection:String;
procedure Set_seatSection(v:String);
(*The type/class of the seat.*)
function Get_seatingType:IQualitativeValue;
procedure Set_seatingType(v:IQualitativeValue);
// properties
property seatRow:String read Get_seatRow write Set_seatRow;
property seatNumber:String read Get_seatNumber write Set_seatNumber;
property seatSection:String read Get_seatSection write Set_seatSection;
property seatingType:IQualitativeValue read Get_seatingType write Set_seatingType;
end;
(*** end ISeat ***)
(* ReservationStatusType
Enumerated status values for Reservation.
*)
IReservationStatusType=Interface (IEnumeration)
function TangReservationStatusType:TangibleValue;
end;
(*** end IReservationStatusType ***)
(* BusReservation
*)
IBusReservation=Interface (IReservation)
function TangBusReservation:TangibleValue;
end;
(*** end IBusReservation ***)
(* Taxi
A taxi.
*)
ITaxi=Interface (IService)
function TangTaxi:TangibleValue;
end;
(*** end ITaxi ***)
(* OfficeEquipmentStore
An office equipment store.
*)
IOfficeEquipmentStore=Interface (IStore)
(*No atribs*)
end;
(*** end IOfficeEquipmentStore ***)
(* LiquorStore
A shop that sells alcoholic drinks such as wine, beer, whisky and other spirits.
*)
ILiquorStore=Interface (IStore)
(*No atribs*)
end;
(*** end ILiquorStore ***)
(* Embassy
An embassy.
*)
IEmbassy=Interface (IGovernmentBuilding)
(*No atribs*)
end;
(*** end IEmbassy ***)
IDriveWheelConfigurationValue=interface; //forward
ISteeringPositionValue=interface; //forward
IEngineSpecification=interface; //forward
(* Vehicle
A vehicle is a device that is designed or used to transport people or cargo
over land, water, air, or through space.
*)
IVehicle=Interface (IProduct)
(**)
function Get_numberOfPreviousOwners:INumber;
procedure Set_numberOfPreviousOwners(v:INumber);
(*Indicates that the vehicle meets the respective emission standard.*)
function Get_meetsEmissionStandard:IQualitativeValue;
procedure Set_meetsEmissionStandard(v:IQualitativeValue);
(*The drive wheel configuration, i.e. which roadwheels will receive torque from
the vehicle's engine via the drivetrain.*)
function Get_driveWheelConfiguration:IDriveWheelConfigurationValue;
procedure Set_driveWheelConfiguration(v:IDriveWheelConfigurationValue);
(**)
function Get_fuelConsumption:IQuantitativeValue;
procedure Set_fuelConsumption(v:IQuantitativeValue);
(**)
function Get_wheelbase:IQuantitativeValue;
procedure Set_wheelbase(v:IQuantitativeValue);
(*The type or material of the interior of the vehicle (e.g. synthetic fabric,
leather, wood, etc.). While most interior types are characterized by the
material used, an interior type can also be based on vehicle usage or target
audience.*)
function Get_vehicleInteriorType:String;
procedure Set_vehicleInteriorType(v:String);
(*The release date of a vehicle model (often used to differentiate versions of
the same make and model).*)
function Get_modelDate:TDateTime;
procedure Set_modelDate(v:TDateTime);
(*A textual description of known damages, both repaired and unrepaired.*)
function Get_knownVehicleDamages:String;
procedure Set_knownVehicleDamages(v:String);
(*Indicates the design and body style of the vehicle (e.g. station wagon,
hatchback, etc.).*)
function Get_bodyType:String;
procedure Set_bodyType(v:String);
(*The color or color combination of the interior of the vehicle.*)
function Get_vehicleInteriorColor:String;
procedure Set_vehicleInteriorColor(v:String);
(*Indicates whether the vehicle has been used for special purposes, like
commercial rental, driving school, or as a taxi. The legislation in many
countries requires this information to be revealed when offering a car for
sale.*)
function Get_vehicleSpecialUsage:String;
procedure Set_vehicleSpecialUsage(v:String);
(*The date of production of the item, e.g. vehicle.*)
function Get_productionDate:TDateTime;
procedure Set_productionDate(v:TDateTime);
(**)
function Get_mileageFromOdometer:IQuantitativeValue;
procedure Set_mileageFromOdometer(v:IQuantitativeValue);
(*The release date of a vehicle model (often used to differentiate versions of
the same make and model).*)
function Get_vehicleModelDate:TDateTime;
procedure Set_vehicleModelDate(v:TDateTime);
(*The number or type of airbags in the vehicle.*)
function Get_numberOfAirbags:INumber;
procedure Set_numberOfAirbags(v:INumber);
(**)
function Get_seatingCapacity:IQuantitativeValue;
procedure Set_seatingCapacity(v:IQuantitativeValue);
(*The position of the steering wheel or similar device (mostly for cars).*)
function Get_steeringPosition:ISteeringPositionValue;
procedure Set_steeringPosition(v:ISteeringPositionValue);
(*The date of the first registration of the vehicle with the respective public
authorities.*)
function Get_dateVehicleFirstRegistered:TDateTime;
procedure Set_dateVehicleFirstRegistered(v:TDateTime);
(**)
function Get_numberOfDoors:INumber;
procedure Set_numberOfDoors(v:INumber);
(**)
function Get_weightTotal:IQuantitativeValue;
procedure Set_weightTotal(v:IQuantitativeValue);
(**)
function Get_numberOfForwardGears:INumber;
procedure Set_numberOfForwardGears(v:INumber);
(**)
function Get_tongueWeight:IQuantitativeValue;
procedure Set_tongueWeight(v:IQuantitativeValue);
(*A short text indicating the configuration of the vehicle, e.g. '5dr hatchback
ST 2.5 MT 225 hp' or 'limited edition'.*)
function Get_vehicleConfiguration:String;
procedure Set_vehicleConfiguration(v:String);
(**)
function Get_fuelEfficiency:IQuantitativeValue;
procedure Set_fuelEfficiency(v:IQuantitativeValue);
(**)
function Get_cargoVolume:IQuantitativeValue;
procedure Set_cargoVolume(v:IQuantitativeValue);
(*The type of component used for transmitting the power from a rotating power
source to the wheels or other relevant component(s) ("gearbox" for cars).*)
function Get_vehicleTransmission:IQualitativeValue;
procedure Set_vehicleTransmission(v:IQualitativeValue);
(**)
function Get_vehicleSeatingCapacity:IQuantitativeValue;
procedure Set_vehicleSeatingCapacity(v:IQuantitativeValue);
(**)
function Get_accelerationTime:IQuantitativeValue;
procedure Set_accelerationTime(v:IQuantitativeValue);
(*The date the item e.g. vehicle was purchased by the current owner.*)
function Get_purchaseDate:TDateTime;
procedure Set_purchaseDate(v:TDateTime);
(**)
function Get_payload:IQuantitativeValue;
procedure Set_payload(v:IQuantitativeValue);
(**)
function Get_fuelCapacity:IQuantitativeValue;
procedure Set_fuelCapacity(v:IQuantitativeValue);
(*Information about the engine or engines of the vehicle.*)
function Get_vehicleEngine:IEngineSpecification;
procedure Set_vehicleEngine(v:IEngineSpecification);
(*The CO2 emissions in g/km. When used in combination with a QuantitativeValue,
put "g/km" into the unitText property of that value, since there is no
UN/CEFACT Common Code for "g/km".*)
function Get_emissionsCO2:INumber;
procedure Set_emissionsCO2(v:INumber);
(**)
function Get_numberOfAxles:INumber;
procedure Set_numberOfAxles(v:INumber);
(**)
function Get_speed:IQuantitativeValue;
procedure Set_speed(v:IQuantitativeValue);
(*The Vehicle Identification Number (VIN) is a unique serial number used by the
automotive industry to identify individual motor vehicles.*)
function Get_vehicleIdentificationNumber:String;
procedure Set_vehicleIdentificationNumber(v:String);
(**)
function Get_trailerWeight:IQuantitativeValue;
procedure Set_trailerWeight(v:IQuantitativeValue);
// properties
property numberOfPreviousOwners:INumber read Get_numberOfPreviousOwners write Set_numberOfPreviousOwners;
property meetsEmissionStandard:IQualitativeValue read Get_meetsEmissionStandard write Set_meetsEmissionStandard;
property driveWheelConfiguration:IDriveWheelConfigurationValue read Get_driveWheelConfiguration write Set_driveWheelConfiguration;
property fuelConsumption:IQuantitativeValue read Get_fuelConsumption write Set_fuelConsumption;
property wheelbase:IQuantitativeValue read Get_wheelbase write Set_wheelbase;
property vehicleInteriorType:String read Get_vehicleInteriorType write Set_vehicleInteriorType;
property modelDate:TDateTime read Get_modelDate write Set_modelDate;
property knownVehicleDamages:String read Get_knownVehicleDamages write Set_knownVehicleDamages;
property bodyType:String read Get_bodyType write Set_bodyType;
property vehicleInteriorColor:String read Get_vehicleInteriorColor write Set_vehicleInteriorColor;
property vehicleSpecialUsage:String read Get_vehicleSpecialUsage write Set_vehicleSpecialUsage;
property productionDate:TDateTime read Get_productionDate write Set_productionDate;
property mileageFromOdometer:IQuantitativeValue read Get_mileageFromOdometer write Set_mileageFromOdometer;
property vehicleModelDate:TDateTime read Get_vehicleModelDate write Set_vehicleModelDate;
property numberOfAirbags:INumber read Get_numberOfAirbags write Set_numberOfAirbags;
property seatingCapacity:IQuantitativeValue read Get_seatingCapacity write Set_seatingCapacity;
property steeringPosition:ISteeringPositionValue read Get_steeringPosition write Set_steeringPosition;
property dateVehicleFirstRegistered:TDateTime read Get_dateVehicleFirstRegistered write Set_dateVehicleFirstRegistered;
property numberOfDoors:INumber read Get_numberOfDoors write Set_numberOfDoors;
property weightTotal:IQuantitativeValue read Get_weightTotal write Set_weightTotal;
property numberOfForwardGears:INumber read Get_numberOfForwardGears write Set_numberOfForwardGears;
property tongueWeight:IQuantitativeValue read Get_tongueWeight write Set_tongueWeight;
property vehicleConfiguration:String read Get_vehicleConfiguration write Set_vehicleConfiguration;
property fuelEfficiency:IQuantitativeValue read Get_fuelEfficiency write Set_fuelEfficiency;
property cargoVolume:IQuantitativeValue read Get_cargoVolume write Set_cargoVolume;
property vehicleTransmission:IQualitativeValue read Get_vehicleTransmission write Set_vehicleTransmission;
property vehicleSeatingCapacity:IQuantitativeValue read Get_vehicleSeatingCapacity write Set_vehicleSeatingCapacity;
property accelerationTime:IQuantitativeValue read Get_accelerationTime write Set_accelerationTime;
property purchaseDate:TDateTime read Get_purchaseDate write Set_purchaseDate;
property payload:IQuantitativeValue read Get_payload write Set_payload;
property fuelCapacity:IQuantitativeValue read Get_fuelCapacity write Set_fuelCapacity;
property vehicleEngine:IEngineSpecification read Get_vehicleEngine write Set_vehicleEngine;
property emissionsCO2:INumber read Get_emissionsCO2 write Set_emissionsCO2;
property numberOfAxles:INumber read Get_numberOfAxles write Set_numberOfAxles;
property speed:IQuantitativeValue read Get_speed write Set_speed;
property vehicleIdentificationNumber:String read Get_vehicleIdentificationNumber write Set_vehicleIdentificationNumber;
property trailerWeight:IQuantitativeValue read Get_trailerWeight write Set_trailerWeight;
end;
(*** end IVehicle ***)
(* DriveWheelConfigurationValue
A value indicating which roadwheels will receive torque.
*)
IDriveWheelConfigurationValue=Interface (IQualitativeValue)
function TangDriveWheelConfigurationValue:TangibleValue;
end;
(*** end IDriveWheelConfigurationValue ***)
(* SteeringPositionValue
A value indicating a steering position.
*)
ISteeringPositionValue=Interface (IQualitativeValue)
function TangSteeringPositionValue:TangibleValue;
end;
(*** end ISteeringPositionValue ***)
(* EngineSpecification
Information about the engine of the vehicle. A vehicle can have multiple
engines represented by multiple engine specification entities.
*)
IEngineSpecification=Interface (IStructuredValue)
(**)
function Get_enginePower:IQuantitativeValue;
procedure Set_enginePower(v:IQuantitativeValue);
(**)
function Get_engineDisplacement:IQuantitativeValue;
procedure Set_engineDisplacement(v:IQuantitativeValue);
(*The type of fuel suitable for the engine or engines of the vehicle. If the
vehicle has only one engine, this property can be attached directly to the
vehicle.*)
function Get_fuelType:String;
procedure Set_fuelType(v:String);
(*The type of engine or engines powering the vehicle.*)
function Get_engineType:String;
procedure Set_engineType(v:String);
(**)
function Get_torque:IQuantitativeValue;
procedure Set_torque(v:IQuantitativeValue);
// properties
property enginePower:IQuantitativeValue read Get_enginePower write Set_enginePower;
property engineDisplacement:IQuantitativeValue read Get_engineDisplacement write Set_engineDisplacement;
property fuelType:String read Get_fuelType write Set_fuelType;
property engineType:String read Get_engineType write Set_engineType;
property torque:IQuantitativeValue read Get_torque write Set_torque;
end;
(*** end IEngineSpecification ***)
(* Motorcycle
A motorcycle or motorbike is a single-track, two-wheeled motor vehicle.
*)
IMotorcycle=Interface (IVehicle)
(*No atribs*)
end;
(*** end IMotorcycle ***)
(* BodyOfWater
A body of water, such as a sea, ocean, or lake.
*)
IBodyOfWater=Interface (ILandform)
(*No atribs*)
end;
(*** end IBodyOfWater ***)
(* Canal
A canal, like the Panama Canal.
*)
ICanal=Interface (IBodyOfWater)
(*No atribs*)
end;
(*** end ICanal ***)
(* ViewAction
The act of consuming static visual content.
*)
IViewAction=Interface (IConsumeAction)
(*No atribs*)
end;
(*** end IViewAction ***)
(* PawnShop
A shop that will buy, or lend money against the security of, personal
possessions.
*)
IPawnShop=Interface (IStore)
(*No atribs*)
end;
(*** end IPawnShop ***)
(* HairSalon
A hair salon.
*)
IHairSalon=Interface (IHealthAndBeautyBusiness)
(*No atribs*)
end;
(*** end IHairSalon ***)
IBreadcrumbList=interface; //forward
(* WebPage
*)
IWebPage=Interface (ICreativeWork)
(*Indicates the main image on the page.*)
function Get_primaryImageOfPage:IImageObject;
procedure Set_primaryImageOfPage(v:IImageObject);
(*A set of links that can help a user understand and navigate a website
hierarchy.*)
function Get_breadcrumb:IBreadcrumbList;
procedure Set_breadcrumb(v:IBreadcrumbList);
(*The most significant URLs on the page. Typically, these are the
non-navigation links that are clicked on the most.*)
function Get_significantLinks:String;
procedure Set_significantLinks(v:String);
(*A link related to this web page, for example to other related web pages.*)
function Get_relatedLink:String;
procedure Set_relatedLink(v:String);
(*People or organizations that have reviewed the content on this web page for
accuracy and/or completeness.*)
function Get_reviewedBy:IPerson;
procedure Set_reviewedBy(v:IPerson);
(*One of the domain specialities to which this web page's content applies.*)
function Get_specialty:ISpecialty;
procedure Set_specialty(v:ISpecialty);
(*Date on which the content on this web page was last reviewed for accuracy
and/or completeness.*)
function Get_lastReviewed:TDateTime;
procedure Set_lastReviewed(v:TDateTime);
// properties
property primaryImageOfPage:IImageObject read Get_primaryImageOfPage write Set_primaryImageOfPage;
property breadcrumb:IBreadcrumbList read Get_breadcrumb write Set_breadcrumb;
property significantLinks:String read Get_significantLinks write Set_significantLinks;
property relatedLink:String read Get_relatedLink write Set_relatedLink;
property reviewedBy:IPerson read Get_reviewedBy write Set_reviewedBy;
property specialty:ISpecialty read Get_specialty write Set_specialty;
property lastReviewed:TDateTime read Get_lastReviewed write Set_lastReviewed;
end;
(*** end IWebPage ***)
(* BreadcrumbList
*)
IBreadcrumbList=Interface (IItemList)
function TangBreadcrumbList:TangibleValue;
end;
(*** end IBreadcrumbList ***)
(* ItemPage
A page devoted to a single item, such as a particular product or hotel.
*)
IItemPage=Interface (IWebPage)
(*No atribs*)
end;
(*** end IItemPage ***)
(* InteractAction
The act of interacting with another person or organization.
*)
IInteractAction=Interface (IAction)
(*No atribs*)
end;
(*** end IInteractAction ***)
(* CommunicateAction
The act of conveying information to another person via a communication medium
(instrument) such as speech, email, or telephone conversation.
*)
ICommunicateAction=Interface (IInteractAction)
(*No atribs*)
end;
(*** end ICommunicateAction ***)
(* ShareAction
The act of distributing content to people for their amusement or edification.
*)
IShareAction=Interface (ICommunicateAction)
(*No atribs*)
end;
(*** end IShareAction ***)
(* Painting
A painting.
*)
IPainting=Interface (ICreativeWork)
(*No atribs*)
end;
(*** end IPainting ***)
(* FinancialService
Financial services business.
*)
IFinancialService=Interface (ILocalBusiness)
(*Description of fees, commissions, and other terms applied either to a class
of financial product, or by a financial service organization.*)
function Get_feesAndCommissionsSpecification:String;
procedure Set_feesAndCommissionsSpecification(v:String);
// properties
property feesAndCommissionsSpecification:String read Get_feesAndCommissionsSpecification write Set_feesAndCommissionsSpecification;
end;
(*** end IFinancialService ***)
(* InsuranceAgency
An Insurance agency.
*)
IInsuranceAgency=Interface (IFinancialService)
(*No atribs*)
end;
(*** end IInsuranceAgency ***)
(* ContactPage
Web page type: Contact page.
*)
IContactPage=Interface (IWebPage)
(*No atribs*)
end;
(*** end IContactPage ***)
(* UserPlays
*)
IUserPlays=Interface (IUserInteraction)
(*No atribs*)
end;
(*** end IUserPlays ***)
(* PsychologicalTreatment
A process of care relying upon counseling, dialogue and communication aimed at
improving a mental health condition without use of drugs.
*)
IPsychologicalTreatment=Interface (ITherapeuticProcedure)
(*No atribs*)
end;
(*** end IPsychologicalTreatment ***)
(* Zoo
A zoo.
*)
IZoo=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IZoo ***)
(* MarryAction
The act of marrying a person.
*)
IMarryAction=Interface (IInteractAction)
(*No atribs*)
end;
(*** end IMarryAction ***)
(* FireStation
A fire station. With firemen.
*)
IFireStation=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IFireStation ***)
(* SubwayStation
A subway station.
*)
ISubwayStation=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end ISubwayStation ***)
(* EventSeries
*)
IEventSeries=Interface (IEvent)
(*No atribs*)
end;
(*** end IEventSeries ***)
(* Volcano
A volcano, like Fuji san.
*)
IVolcano=Interface (ILandform)
(*No atribs*)
end;
(*** end IVolcano ***)
(* AutomotiveBusiness
Car repair, sales, or parts.
*)
IAutomotiveBusiness=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end IAutomotiveBusiness ***)
(* AutoWash
A car wash business.
*)
IAutoWash=Interface (IAutomotiveBusiness)
(*No atribs*)
end;
(*** end IAutoWash ***)
(* GardenStore
A garden store.
*)
IGardenStore=Interface (IStore)
(*No atribs*)
end;
(*** end IGardenStore ***)
(* UserBlocks
*)
IUserBlocks=Interface (IUserInteraction)
(*No atribs*)
end;
(*** end IUserBlocks ***)
(* GoodRelationsClass
*)
IGoodRelationsClass=Interface (IDeliveryMethod)
function TangGoodRelationsClass:TangibleValue;
end;
(*** end IGoodRelationsClass ***)
(* Code
Computer programming source code. Example: Full (compile ready) solutions, code
snippet samples, scripts, templates.
*)
ICode=Interface (ICreativeWork)
(*No atribs*)
end;
(*** end ICode ***)
(* TransferAction
The act of transferring/moving (abstract or concrete) animate or inanimate
objects from one place to another.
*)
ITransferAction=Interface (IAction)
(*No atribs*)
end;
(*** end ITransferAction ***)
(* DownloadAction
The act of downloading an object.
*)
IDownloadAction=Interface (ITransferAction)
(*No atribs*)
end;
(*** end IDownloadAction ***)
(* OceanBodyOfWater
An ocean (for example, the Pacific).
*)
IOceanBodyOfWater=Interface (IBodyOfWater)
(*No atribs*)
end;
(*** end IOceanBodyOfWater ***)
(* AssessAction
The act of forming one's opinion, reaction or sentiment.
*)
IAssessAction=Interface (IAction)
(*No atribs*)
end;
(*** end IAssessAction ***)
(* ReactAction
The act of responding instinctively and emotionally to an object, expressing a
sentiment.
*)
IReactAction=Interface (IAssessAction)
(*No atribs*)
end;
(*** end IReactAction ***)
(* WantAction
The act of expressing a desire about the object. An agent wants an object.
*)
IWantAction=Interface (IReactAction)
(*No atribs*)
end;
(*** end IWantAction ***)
(* VitalSign
Vital signs are measures of various physiological functions in order to assess
the most basic body functions.
*)
IVitalSign=Interface (IMedicalSign)
(*No atribs*)
end;
(*** end IVitalSign ***)
(* PerformingGroup
A performance group, such as a band, an orchestra, or a circus.
*)
IPerformingGroup=Interface (IOrganization)
(*No atribs*)
end;
(*** end IPerformingGroup ***)
(* DanceGroup
A dance group&#x2014;for example, the Alvin Ailey Dance Theater or
Riverdance.
*)
IDanceGroup=Interface (IPerformingGroup)
(*No atribs*)
end;
(*** end IDanceGroup ***)
(* Florist
A florist.
*)
IFlorist=Interface (IStore)
(*No atribs*)
end;
(*** end IFlorist ***)
(* WPSideBar
A sidebar section of the page.
*)
IWPSideBar=Interface (IWebPageElement)
(*No atribs*)
end;
(*** end IWPSideBar ***)
(* TheaterGroup
A theater group or company, for example, the Royal Shakespeare Company or Druid
Theatre.
*)
ITheaterGroup=Interface (IPerformingGroup)
(*No atribs*)
end;
(*** end ITheaterGroup ***)
(* ArriveAction
The act of arriving at a place. An agent arrives at a destination from a
fromLocation, optionally with participants.
*)
IArriveAction=Interface (IMoveAction)
(*No atribs*)
end;
(*** end IArriveAction ***)
(* RadiationTherapy
A process of care using radiation aimed at improving a health condition.
*)
IRadiationTherapy=Interface (IMedicalTherapy)
(*No atribs*)
end;
(*** end IRadiationTherapy ***)
(* AutoPartsStore
An auto parts store.
*)
IAutoPartsStore=Interface (IStore)
(*No atribs*)
end;
(*** end IAutoPartsStore ***)
(* AppendAction
The act of inserting at the end if an ordered collection.
*)
IAppendAction=Interface (IInsertAction)
(*No atribs*)
end;
(*** end IAppendAction ***)
(* WPHeader
The header section of the page.
*)
IWPHeader=Interface (IWebPageElement)
(*No atribs*)
end;
(*** end IWPHeader ***)
IDigitalDocumentPermission=interface; //forward
(* DigitalDocument
An electronic file or document.
*)
IDigitalDocument=Interface (ICreativeWork)
(*A permission related to the access to this document (e.g. permission to read
or write an electronic document). For a public document, specify a grantee with
an Audience with audienceType equal to "public".*)
function Get_hasDigitalDocumentPermission:IDigitalDocumentPermission;
procedure Set_hasDigitalDocumentPermission(v:IDigitalDocumentPermission);
// properties
property hasDigitalDocumentPermission:IDigitalDocumentPermission read Get_hasDigitalDocumentPermission write Set_hasDigitalDocumentPermission;
end;
(*** end IDigitalDocument ***)
IDigitalDocumentPermissionType=interface; //forward
(* DigitalDocumentPermission
A permission for a particular person or group to access a particular file.
*)
IDigitalDocumentPermission=Interface (IIntangible)
(*The type of permission granted the person, organization, or audience.*)
function Get_permissionType:IDigitalDocumentPermissionType;
procedure Set_permissionType(v:IDigitalDocumentPermissionType);
(*The person, organization, contact point, or audience that has been granted
this permission.*)
function Get_grantee:IAudience;
procedure Set_grantee(v:IAudience);
// properties
property permissionType:IDigitalDocumentPermissionType read Get_permissionType write Set_permissionType;
property grantee:IAudience read Get_grantee write Set_grantee;
end;
(*** end IDigitalDocumentPermission ***)
(* DigitalDocumentPermissionType
A type of permission which can be granted for accessing a digital document.
*)
IDigitalDocumentPermissionType=Interface (IEnumeration)
function TangDigitalDocumentPermissionType:TangibleValue;
end;
(*** end IDigitalDocumentPermissionType ***)
(* NoteDigitalDocument
A file containing a note, primarily for the author.
*)
INoteDigitalDocument=Interface (IDigitalDocument)
(*No atribs*)
end;
(*** end INoteDigitalDocument ***)
(* SocialMediaPosting
A post to a social media platform, including blog posts, tweets, Facebook
posts, etc.
*)
ISocialMediaPosting=Interface (IArticle)
(*A CreativeWork such as an image, video, or audio clip shared as part of this
posting.*)
function Get_sharedContent:ICreativeWork;
procedure Set_sharedContent(v:ICreativeWork);
// properties
property sharedContent:ICreativeWork read Get_sharedContent write Set_sharedContent;
end;
(*** end ISocialMediaPosting ***)
(* DiscussionForumPosting
A posting to a discussion forum.
*)
IDiscussionForumPosting=Interface (ISocialMediaPosting)
(*No atribs*)
end;
(*** end IDiscussionForumPosting ***)
(* CheckOutAction
*)
ICheckOutAction=Interface (ICommunicateAction)
(*No atribs*)
end;
(*** end ICheckOutAction ***)
(* TextDigitalDocument
A file composed primarily of text.
*)
ITextDigitalDocument=Interface (IDigitalDocument)
(*No atribs*)
end;
(*** end ITextDigitalDocument ***)
(* BedAndBreakfast
*)
IBedAndBreakfast=Interface (ILodgingBusiness)
(*No atribs*)
end;
(*** end IBedAndBreakfast ***)
(* Reservoir
A reservoir of water, typically an artificially created lake, like the Lake
Kariba reservoir.
*)
IReservoir=Interface (IBodyOfWater)
(*No atribs*)
end;
(*** end IReservoir ***)
(* SaleEvent
Event type: Sales event.
*)
ISaleEvent=Interface (IEvent)
(*No atribs*)
end;
(*** end ISaleEvent ***)
(* RadioStation
A radio station.
*)
IRadioStation=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end IRadioStation ***)
(* BookmarkAction
An agent bookmarks/flags/labels/tags/marks an object.
*)
IBookmarkAction=Interface (IOrganizeAction)
(*No atribs*)
end;
(*** end IBookmarkAction ***)
(* MedicalOrganization
A medical organization (physical or not), such as hospital, institution or
clinic.
*)
IMedicalOrganization=Interface (IOrganization)
(*A medical specialty of the provider.*)
function Get_medicalSpecialty:IMedicalSpecialty;
procedure Set_medicalSpecialty(v:IMedicalSpecialty);
(*Name or unique ID of network. (Networks are often reused across different
insurance plans).*)
function Get_healthPlanNetworkId:String;
procedure Set_healthPlanNetworkId(v:String);
(*Whether the provider is accepting new patients.*)
function Get_isAcceptingNewPatients:Boolean;
procedure Set_isAcceptingNewPatients(v:Boolean);
// properties
property medicalSpecialty:IMedicalSpecialty read Get_medicalSpecialty write Set_medicalSpecialty;
property healthPlanNetworkId:String read Get_healthPlanNetworkId write Set_healthPlanNetworkId;
property isAcceptingNewPatients:Boolean read Get_isAcceptingNewPatients write Set_isAcceptingNewPatients;
end;
(*** end IMedicalOrganization ***)
(* Pharmacy
A pharmacy or drugstore.
*)
IPharmacy=Interface (IMedicalOrganization)
(*No atribs*)
end;
(*** end IPharmacy ***)
(* UserTweets
*)
IUserTweets=Interface (IUserInteraction)
(*No atribs*)
end;
(*** end IUserTweets ***)
(* TireShop
A tire shop.
*)
ITireShop=Interface (IStore)
(*No atribs*)
end;
(*** end ITireShop ***)
(* Series
A Series in schema.org is a group of related items, typically but not
necessarily of the same kind.
*)
ISeries=Interface (ICreativeWork)
(*No atribs*)
end;
(*** end ISeries ***)
(* UnRegisterAction
*)
IUnRegisterAction=Interface (IInteractAction)
(*No atribs*)
end;
(*** end IUnRegisterAction ***)
(* FurnitureStore
A furniture store.
*)
IFurnitureStore=Interface (IStore)
(*No atribs*)
end;
(*** end IFurnitureStore ***)
(* MobilePhoneStore
A store that sells mobile phones and related accessories.
*)
IMobilePhoneStore=Interface (IStore)
(*No atribs*)
end;
(*** end IMobilePhoneStore ***)
(* CollectionPage
Web page type: Collection page.
*)
ICollectionPage=Interface (IWebPage)
(*No atribs*)
end;
(*** end ICollectionPage ***)
(* ImageGallery
Web page type: Image gallery page.
*)
IImageGallery=Interface (ICollectionPage)
(*No atribs*)
end;
(*** end IImageGallery ***)
(* FinancialProduct
A product provided to consumers and businesses by financial institutions such
as banks, insurance companies, brokerage firms, consumer finance companies, and
investment companies which comprise the financial services industry.
*)
IFinancialProduct=Interface (IService)
(*The annual rate that is charged for borrowing (or made by investing),
expressed as a single percentage number that represents the actual yearly cost
of funds over the term of a loan. This includes any fees or additional costs
associated with the transaction.*)
function Get_annualPercentageRate:IQuantitativeValue;
procedure Set_annualPercentageRate(v:IQuantitativeValue);
(*The interest rate, charged or paid, applicable to the financial product.
Note: This is different from the calculated annualPercentageRate.*)
function Get_interestRate:INumber;
procedure Set_interestRate(v:INumber);
// properties
property annualPercentageRate:IQuantitativeValue read Get_annualPercentageRate write Set_annualPercentageRate;
property interestRate:INumber read Get_interestRate write Set_interestRate;
end;
(*** end IFinancialProduct ***)
(* CurrencyConversionService
A service to convert funds from one currency to another currency.
*)
ICurrencyConversionService=Interface (IFinancialProduct)
function TangCurrencyConversionService:TangibleValue;
end;
(*** end ICurrencyConversionService ***)
(* InstallAction
The act of installing an application.
*)
IInstallAction=Interface (IConsumeAction)
(*No atribs*)
end;
(*** end IInstallAction ***)
(* VideoGallery
Web page type: Video gallery page.
*)
IVideoGallery=Interface (ICollectionPage)
(*No atribs*)
end;
(*** end IVideoGallery ***)
(* Sculpture
A piece of sculpture.
*)
ISculpture=Interface (ICreativeWork)
(*No atribs*)
end;
(*** end ISculpture ***)
(* EventVenue
An event venue.
*)
IEventVenue=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IEventVenue ***)
(* AdultEntertainment
An adult entertainment establishment.
*)
IAdultEntertainment=Interface (IEntertainmentBusiness)
(*No atribs*)
end;
(*** end IAdultEntertainment ***)
(* TakeAction
*)
ITakeAction=Interface (ITransferAction)
(*No atribs*)
end;
(*** end ITakeAction ***)
(* SuspendAction
The act of momentarily pausing a device or application (e.g. pause music
playback or pause a timer).
*)
ISuspendAction=Interface (IControlAction)
(*No atribs*)
end;
(*** end ISuspendAction ***)
(* MusicStore
A music store.
*)
IMusicStore=Interface (IStore)
(*No atribs*)
end;
(*** end IMusicStore ***)
(* TradeAction
The act of participating in an exchange of goods and services for monetary
compensation. An agent trades an object, product or service with a participant
in exchange for a one time or periodic payment.
*)
ITradeAction=Interface (IAction)
(**)
function Get_price:INumber;
procedure Set_price(v:INumber);
(*One or more detailed price specifications, indicating the unit price and
delivery or payment charges.*)
function Get_priceSpecification:IPriceSpecification;
procedure Set_priceSpecification(v:IPriceSpecification);
// properties
property price:INumber read Get_price write Set_price;
property priceSpecification:IPriceSpecification read Get_priceSpecification write Set_priceSpecification;
end;
(*** end ITradeAction ***)
(* PreOrderAction
An agent orders a (not yet released) object/product/service to be
delivered/sent.
*)
IPreOrderAction=Interface (ITradeAction)
(*No atribs*)
end;
(*** end IPreOrderAction ***)
(* PetStore
A pet store.
*)
IPetStore=Interface (IStore)
(*No atribs*)
end;
(*** end IPetStore ***)
(* Dentist
A dentist.
*)
IDentist=Interface (IMedicalOrganization)
(*No atribs*)
end;
(*** end IDentist ***)
(* HomeAndConstructionBusiness
*)
IHomeAndConstructionBusiness=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end IHomeAndConstructionBusiness ***)
(* RoofingContractor
A roofing contractor.
*)
IRoofingContractor=Interface (IHomeAndConstructionBusiness)
(*No atribs*)
end;
(*** end IRoofingContractor ***)
(* MovingCompany
A moving company.
*)
IMovingCompany=Interface (IHomeAndConstructionBusiness)
(*No atribs*)
end;
(*** end IMovingCompany ***)
(* Table
A table on a Web page.
*)
ITable=Interface (IWebPageElement)
(*No atribs*)
end;
(*** end ITable ***)
(* HealthClub
A health club.
*)
IHealthClub=Interface (IHealthAndBeautyBusiness)
(*No atribs*)
end;
(*** end IHealthClub ***)
(* Festival
Event type: Festival.
*)
IFestival=Interface (IEvent)
(*No atribs*)
end;
(*** end IFestival ***)
(* AchieveAction
The act of accomplishing something via previous efforts. It is an instantaneous
action rather than an ongoing process.
*)
IAchieveAction=Interface (IAction)
(*No atribs*)
end;
(*** end IAchieveAction ***)
(* TieAction
The act of reaching a draw in a competitive activity.
*)
ITieAction=Interface (IAchieveAction)
(*No atribs*)
end;
(*** end ITieAction ***)
(* LakeBodyOfWater
A lake (for example, Lake Pontrachain).
*)
ILakeBodyOfWater=Interface (IBodyOfWater)
(*No atribs*)
end;
(*** end ILakeBodyOfWater ***)
(* AutoRepair
Car repair business.
*)
IAutoRepair=Interface (IAutomotiveBusiness)
(*No atribs*)
end;
(*** end IAutoRepair ***)
(* ReadAction
The act of consuming written content.
*)
IReadAction=Interface (IConsumeAction)
(*No atribs*)
end;
(*** end IReadAction ***)
(* Aquarium
Aquarium.
*)
IAquarium=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IAquarium ***)
(* PaymentCard
A payment method using a credit, debit, store or other card to associate the
payment with an account.
*)
IPaymentCard=Interface (IFinancialProduct)
function TangPaymentCard:TangibleValue;
end;
(*** end IPaymentCard ***)
(* CreditCard
*)
ICreditCard=Interface (IPaymentCard)
function TangCreditCard:TangibleValue;
end;
(*** end ICreditCard ***)
(* LandmarksOrHistoricalBuildings
An historical landmark or building.
*)
ILandmarksOrHistoricalBuildings=Interface (IPlace)
(*No atribs*)
end;
(*** end ILandmarksOrHistoricalBuildings ***)
(* GovernmentOrganization
A governmental organization or agency.
*)
IGovernmentOrganization=Interface (IOrganization)
(*No atribs*)
end;
(*** end IGovernmentOrganization ***)
(* Preschool
A preschool.
*)
IPreschool=Interface (IEducationalOrganization)
(*No atribs*)
end;
(*** end IPreschool ***)
(* Electrician
An electrician.
*)
IElectrician=Interface (IHomeAndConstructionBusiness)
(*No atribs*)
end;
(*** end IElectrician ***)
(* TaxiStand
A taxi stand.
*)
ITaxiStand=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end ITaxiStand ***)
(* AmusementPark
An amusement park.
*)
IAmusementPark=Interface (IEntertainmentBusiness)
(*No atribs*)
end;
(*** end IAmusementPark ***)
(* ReportedDoseSchedule
A patient-reported or observed dosing schedule for a drug or supplement.
*)
IReportedDoseSchedule=Interface (IDoseSchedule)
(*No atribs*)
end;
(*** end IReportedDoseSchedule ***)
(* PhysicalTherapy
A process of progressive physical care and rehabilitation aimed at improving a
health condition.
*)
IPhysicalTherapy=Interface (IMedicalTherapy)
(*No atribs*)
end;
(*** end IPhysicalTherapy ***)
(* Courthouse
A courthouse.
*)
ICourthouse=Interface (IGovernmentBuilding)
(*No atribs*)
end;
(*** end ICourthouse ***)
(* RVPark
A place offering space for "Recreational Vehicles", Caravans, mobile homes and
the like.
*)
IRVPark=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IRVPark ***)
(* EmploymentAgency
An employment agency.
*)
IEmploymentAgency=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end IEmploymentAgency ***)
(* PalliativeProcedure
A medical procedure intended primarily for palliative purposes, aimed at
relieving the symptoms of an underlying health condition.
*)
IPalliativeProcedure=Interface (IMedicalProcedure)
(*No atribs*)
end;
(*** end IPalliativeProcedure ***)
(* TouristInformationCenter
A tourist information center.
*)
ITouristInformationCenter=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end ITouristInformationCenter ***)
(* DeactivateAction
The act of stopping or deactivating a device or application (e.g. stopping a
timer or turning off a flashlight).
*)
IDeactivateAction=Interface (IControlAction)
(*No atribs*)
end;
(*** end IDeactivateAction ***)
(* RiverBodyOfWater
A river (for example, the broad majestic Shannon).
*)
IRiverBodyOfWater=Interface (IBodyOfWater)
(*No atribs*)
end;
(*** end IRiverBodyOfWater ***)
(* Locksmith
A locksmith.
*)
ILocksmith=Interface (IHomeAndConstructionBusiness)
(*No atribs*)
end;
(*** end ILocksmith ***)
(* EndorsementRating
*)
IEndorsementRating=Interface (IRating)
function TangEndorsementRating:TangibleValue;
end;
(*** end IEndorsementRating ***)
(* FoodService
A food service, like breakfast, lunch, or dinner.
*)
IFoodService=Interface (IService)
function TangFoodService:TangibleValue;
end;
(*** end IFoodService ***)
(* RadioClip
A short radio program or a segment/part of a radio program.
*)
IRadioClip=Interface (IClip)
(*No atribs*)
end;
(*** end IRadioClip ***)
(* Plumber
A plumbing service.
*)
IPlumber=Interface (IHomeAndConstructionBusiness)
(*No atribs*)
end;
(*** end IPlumber ***)
(* PlaceOfWorship
Place of worship, such as a church, synagogue, or mosque.
*)
IPlaceOfWorship=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IPlaceOfWorship ***)
(* Church
A church.
*)
IChurch=Interface (IPlaceOfWorship)
(*No atribs*)
end;
(*** end IChurch ***)
(* ListenAction
The act of consuming audio content.
*)
IListenAction=Interface (IConsumeAction)
(*No atribs*)
end;
(*** end IListenAction ***)
ILocationFeatureSpecification=interface; //forward
(* Accommodation
*)
IAccommodation=Interface (IPlace)
(*An amenity feature (e.g. a characteristic or service) of the Accommodation.
This generic property does not make a statement about whether the feature is
included in an offer for the main accommodation or available at extra costs.*)
function Get_amenityFeature:ILocationFeatureSpecification;
procedure Set_amenityFeature(v:ILocationFeatureSpecification);
(*The size of the accommodation, e.g. in square meter or squarefoot.
Typical
unit code(s): MTK for square meter, FTK for square foot, or YDK for square
yard*)
function Get_floorSize:IQuantitativeValue;
procedure Set_floorSize(v:IQuantitativeValue);
(*Indications regarding the permitted usage of the accommodation.*)
function Get_permittedUsage:String;
procedure Set_permittedUsage(v:String);
// properties
property amenityFeature:ILocationFeatureSpecification read Get_amenityFeature write Set_amenityFeature;
property floorSize:IQuantitativeValue read Get_floorSize write Set_floorSize;
property permittedUsage:String read Get_permittedUsage write Set_permittedUsage;
end;
(*** end IAccommodation ***)
(* LocationFeatureSpecification
Specifies a location feature by providing a structured value representing a
feature of an accommodation as a property-value pair of varying degrees of
formality.
*)
ILocationFeatureSpecification=Interface (IPropertyValue)
function TangLocationFeatureSpecification:TangibleValue;
end;
(*** end ILocationFeatureSpecification ***)
(* Room
*)
IRoom=Interface (IAccommodation)
(*No atribs*)
end;
(*** end IRoom ***)
(* MeetingRoom
*)
IMeetingRoom=Interface (IRoom)
(*No atribs*)
end;
(*** end IMeetingRoom ***)
(* PlanAction
The act of planning the execution of an event/task/action/reservation/plan to a
future date.
*)
IPlanAction=Interface (IOrganizeAction)
(*The time the object is scheduled to.*)
function Get_scheduledTime:TDateTime;
procedure Set_scheduledTime(v:TDateTime);
// properties
property scheduledTime:TDateTime read Get_scheduledTime write Set_scheduledTime;
end;
(*** end IPlanAction ***)
(* ReserveAction
*)
IReserveAction=Interface (IPlanAction)
(*No atribs*)
end;
(*** end IReserveAction ***)
(* GroceryStore
A grocery store.
*)
IGroceryStore=Interface (IStore)
(*No atribs*)
end;
(*** end IGroceryStore ***)
(* Campground
*)
ICampground=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end ICampground ***)
(* UserPlusOnes
*)
IUserPlusOnes=Interface (IUserInteraction)
(*No atribs*)
end;
(*** end IUserPlusOnes ***)
(* AutomatedTeller
ATM/cash machine.
*)
IAutomatedTeller=Interface (IFinancialService)
(*No atribs*)
end;
(*** end IAutomatedTeller ***)
(* AgreeAction
The act of expressing a consistency of opinion with the object. An agent agrees
to/about an object (a proposition, topic or theme) with participants.
*)
IAgreeAction=Interface (IReactAction)
(*No atribs*)
end;
(*** end IAgreeAction ***)
(* ComedyClub
A comedy club.
*)
IComedyClub=Interface (IEntertainmentBusiness)
(*No atribs*)
end;
(*** end IComedyClub ***)
(* Hostel
*)
IHostel=Interface (ILodgingBusiness)
(*No atribs*)
end;
(*** end IHostel ***)
(* ShoppingCenter
A shopping center or mall.
*)
IShoppingCenter=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end IShoppingCenter ***)
(* CafeOrCoffeeShop
A cafe or coffee shop.
*)
ICafeOrCoffeeShop=Interface (IFoodEstablishment)
(*No atribs*)
end;
(*** end ICafeOrCoffeeShop ***)
(* ClothingStore
A clothing store.
*)
IClothingStore=Interface (IStore)
(*No atribs*)
end;
(*** end IClothingStore ***)
(* ChildCare
A Childcare center.
*)
IChildCare=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end IChildCare ***)
(* ApprovedIndication
An indication for a medical therapy that has been formally specified or
approved by a regulatory body that regulates use of the therapy; for example,
the US FDA approves indications for most drugs in the US.
*)
IApprovedIndication=Interface (IMedicalIndication)
(*No atribs*)
end;
(*** end IApprovedIndication ***)
(* SearchResultsPage
Web page type: Search results page.
*)
ISearchResultsPage=Interface (IWebPage)
(*No atribs*)
end;
(*** end ISearchResultsPage ***)
(* GovernmentOffice
A government office&#x2014;for example, an IRS or DMV office.
*)
IGovernmentOffice=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end IGovernmentOffice ***)
(* PostOffice
A post office.
*)
IPostOffice=Interface (IGovernmentOffice)
(*No atribs*)
end;
(*** end IPostOffice ***)
(* AutoBodyShop
Auto body shop.
*)
IAutoBodyShop=Interface (IAutomotiveBusiness)
(*No atribs*)
end;
(*** end IAutoBodyShop ***)
(* LockerDelivery
A DeliveryMethod in which an item is made available via locker.
*)
ILockerDelivery=Interface (IDeliveryMethod)
function TangLockerDelivery:TangibleValue;
end;
(*** end ILockerDelivery ***)
(* BookStore
A bookstore.
*)
IBookStore=Interface (IStore)
(*No atribs*)
end;
(*** end IBookStore ***)
(* CollegeOrUniversity
A college, university, or other third-level educational institution.
*)
ICollegeOrUniversity=Interface (IEducationalOrganization)
(*No atribs*)
end;
(*** end ICollegeOrUniversity ***)
(* RecyclingCenter
A recycling center.
*)
IRecyclingCenter=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end IRecyclingCenter ***)
(* MedicalRiskEstimator
Any rule set or interactive tool for estimating the risk of developing a
complication or condition.
*)
IMedicalRiskEstimator=Interface (IMedicalEntity)
(*The condition, complication, or symptom whose risk is being estimated.*)
function Get_estimatesRiskOf:IMedicalEntity;
procedure Set_estimatesRiskOf(v:IMedicalEntity);
(*A modifiable or non-modifiable risk factor included in the calculation, e.g.
age, coexisting condition.*)
function Get_includedRiskFactor:IMedicalRiskFactor;
procedure Set_includedRiskFactor(v:IMedicalRiskFactor);
// properties
property estimatesRiskOf:IMedicalEntity read Get_estimatesRiskOf write Set_estimatesRiskOf;
property includedRiskFactor:IMedicalRiskFactor read Get_includedRiskFactor write Set_includedRiskFactor;
end;
(*** end IMedicalRiskEstimator ***)
(* MedicalRiskCalculator
A complex mathematical calculation requiring an online calculator, used to
assess prognosis. Note: use the url property of Thing to record any URLs for
online calculators.
*)
IMedicalRiskCalculator=Interface (IMedicalRiskEstimator)
(*No atribs*)
end;
(*** end IMedicalRiskCalculator ***)
(* ComputerStore
A computer store.
*)
IComputerStore=Interface (IStore)
(*No atribs*)
end;
(*** end IComputerStore ***)
(* DisagreeAction
The act of expressing a difference of opinion with the object. An agent
disagrees to/about an object (a proposition, topic or theme) with participants.
*)
IDisagreeAction=Interface (IReactAction)
(*No atribs*)
end;
(*** end IDisagreeAction ***)
(* MiddleSchool
A middle school (typically for children aged around 11-14, although this varies
somewhat).
*)
IMiddleSchool=Interface (IEducationalOrganization)
(*No atribs*)
end;
(*** end IMiddleSchool ***)
(* School
A school.
*)
ISchool=Interface (IEducationalOrganization)
(*No atribs*)
end;
(*** end ISchool ***)
(* SelfStorage
A self-storage facility.
*)
ISelfStorage=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end ISelfStorage ***)
(* Playground
A playground.
*)
IPlayground=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IPlayground ***)
(* PaymentService
A Service to transfer funds from a person or organization to a beneficiary
person or organization.
*)
IPaymentService=Interface (IFinancialProduct)
function TangPaymentService:TangibleValue;
end;
(*** end IPaymentService ***)
(* ArtGallery
An art gallery.
*)
IArtGallery=Interface (IEntertainmentBusiness)
(*No atribs*)
end;
(*** end IArtGallery ***)
(* AccountingService
*)
IAccountingService=Interface (IFinancialService)
(*No atribs*)
end;
(*** end IAccountingService ***)
(* PreventionIndication
An indication for preventing an underlying condition, symptom, etc.
*)
IPreventionIndication=Interface (IMedicalIndication)
(*No atribs*)
end;
(*** end IPreventionIndication ***)
(* CampingPitch
*)
ICampingPitch=Interface (IAccommodation)
(*No atribs*)
end;
(*** end ICampingPitch ***)
(* DefenceEstablishment
A defence establishment, such as an army or navy base.
*)
IDefenceEstablishment=Interface (IGovernmentBuilding)
(*No atribs*)
end;
(*** end IDefenceEstablishment ***)
(* ComicSeries
A sequential publication of comic stories under a
unifying title, for
example "The Amazing Spider-Man" or "Groo the
Wanderer".
*)
IComicSeries=Interface (IPeriodical)
(*No atribs*)
end;
(*** end IComicSeries ***)
(* ChildrensEvent
Event type: Children's event.
*)
IChildrensEvent=Interface (IEvent)
(*No atribs*)
end;
(*** end IChildrensEvent ***)
(* CatholicChurch
A Catholic church.
*)
ICatholicChurch=Interface (IPlaceOfWorship)
(*No atribs*)
end;
(*** end ICatholicChurch ***)
(* AboutPage
Web page type: About page.
*)
IAboutPage=Interface (IWebPage)
(*No atribs*)
end;
(*** end IAboutPage ***)
(* IgnoreAction
The act of intentionally disregarding the object. An agent ignores an object.
*)
IIgnoreAction=Interface (IAssessAction)
(*No atribs*)
end;
(*** end IIgnoreAction ***)
(* BusinessEvent
Event type: Business event.
*)
IBusinessEvent=Interface (IEvent)
(*No atribs*)
end;
(*** end IBusinessEvent ***)
(* Residence
The place where a person lives.
*)
IResidence=Interface (IPlace)
(*No atribs*)
end;
(*** end IResidence ***)
(* ApartmentComplex
Residence type: Apartment complex.
*)
IApartmentComplex=Interface (IResidence)
(*No atribs*)
end;
(*** end IApartmentComplex ***)
(* JewelryStore
A jewelry store.
*)
IJewelryStore=Interface (IStore)
(*No atribs*)
end;
(*** end IJewelryStore ***)
(* SportingGoodsStore
A sporting goods store.
*)
ISportingGoodsStore=Interface (IStore)
(*No atribs*)
end;
(*** end ISportingGoodsStore ***)
(* MotorcycleRepair
A motorcycle repair shop.
*)
IMotorcycleRepair=Interface (IAutomotiveBusiness)
(*No atribs*)
end;
(*** end IMotorcycleRepair ***)
(* Synagogue
A synagogue.
*)
ISynagogue=Interface (IPlaceOfWorship)
(*No atribs*)
end;
(*** end ISynagogue ***)
(* DiagnosticProcedure
A medical procedure intended primarily for diagnostic, as opposed to
therapeutic, purposes.
*)
IDiagnosticProcedure=Interface (IMedicalProcedure)
(*No atribs*)
end;
(*** end IDiagnosticProcedure ***)
(* Motel
*)
IMotel=Interface (ILodgingBusiness)
(*No atribs*)
end;
(*** end IMotel ***)
(* CancelAction
*)
ICancelAction=Interface (IPlanAction)
(*No atribs*)
end;
(*** end ICancelAction ***)
(* ElectronicsStore
An electronics store.
*)
IElectronicsStore=Interface (IStore)
(*No atribs*)
end;
(*** end IElectronicsStore ***)
(* GeneralContractor
A general contractor.
*)
IGeneralContractor=Interface (IHomeAndConstructionBusiness)
(*No atribs*)
end;
(*** end IGeneralContractor ***)
(* BankOrCreditUnion
Bank or credit union.
*)
IBankOrCreditUnion=Interface (IFinancialService)
(*No atribs*)
end;
(*** end IBankOrCreditUnion ***)
(* WorkersUnion
A Workers Union (also known as a Labor Union, Labour Union, or Trade Union) is
an organization that promotes the interests of its worker members by
collectively bargaining with management, organizing, and political lobbying.
*)
IWorkersUnion=Interface (IOrganization)
(*No atribs*)
end;
(*** end IWorkersUnion ***)
(* AcceptAction
*)
IAcceptAction=Interface (IAllocateAction)
(*No atribs*)
end;
(*** end IAcceptAction ***)
(* SportsClub
A sports club.
*)
ISportsClub=Interface (ISportsActivityLocation)
(*No atribs*)
end;
(*** end ISportsClub ***)
(* AutoRental
A car rental business.
*)
IAutoRental=Interface (IAutomotiveBusiness)
(*No atribs*)
end;
(*** end IAutoRental ***)
(* PresentationDigitalDocument
A file containing slides or used for a presentation.
*)
IPresentationDigitalDocument=Interface (IDigitalDocument)
(*No atribs*)
end;
(*** end IPresentationDigitalDocument ***)
(* MotorizedBicycle
A motorized bicycle is a bicycle with an attached motor used to power the
vehicle, or to assist with pedaling.
*)
IMotorizedBicycle=Interface (IVehicle)
(*No atribs*)
end;
(*** end IMotorizedBicycle ***)
(* BeautySalon
Beauty salon.
*)
IBeautySalon=Interface (IHealthAndBeautyBusiness)
(*No atribs*)
end;
(*** end IBeautySalon ***)
(* HinduTemple
A Hindu temple.
*)
IHinduTemple=Interface (IPlaceOfWorship)
(*No atribs*)
end;
(*** end IHinduTemple ***)
(* PublicSwimmingPool
A public swimming pool.
*)
IPublicSwimmingPool=Interface (ISportsActivityLocation)
(*No atribs*)
end;
(*** end IPublicSwimmingPool ***)
(* DaySpa
A day spa.
*)
IDaySpa=Interface (IHealthAndBeautyBusiness)
(*No atribs*)
end;
(*** end IDaySpa ***)
(* CheckInAction
*)
ICheckInAction=Interface (ICommunicateAction)
(*No atribs*)
end;
(*** end ICheckInAction ***)
(* ExhibitionEvent
Event type: Exhibition event, e.g. at a museum, library, archive, tradeshow, ...
*)
IExhibitionEvent=Interface (IEvent)
(*No atribs*)
end;
(*** end IExhibitionEvent ***)
(* Distillery
A distillery.
*)
IDistillery=Interface (IFoodEstablishment)
(*No atribs*)
end;
(*** end IDistillery ***)
(* GatedResidenceCommunity
Residence type: Gated community.
*)
IGatedResidenceCommunity=Interface (IResidence)
(*No atribs*)
end;
(*** end IGatedResidenceCommunity ***)
(* ParkingFacility
A parking lot or other parking facility.
*)
IParkingFacility=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IParkingFacility ***)
(* EventReservation
*)
IEventReservation=Interface (IReservation)
function TangEventReservation:TangibleValue;
end;
(*** end IEventReservation ***)
(* HardwareStore
A hardware store.
*)
IHardwareStore=Interface (IStore)
(*No atribs*)
end;
(*** end IHardwareStore ***)
(* MotorcycleDealer
A motorcycle dealer.
*)
IMotorcycleDealer=Interface (IAutomotiveBusiness)
(*No atribs*)
end;
(*** end IMotorcycleDealer ***)
(* UserCheckins
*)
IUserCheckins=Interface (IUserInteraction)
(*No atribs*)
end;
(*** end IUserCheckins ***)
(* RegisterAction
*)
IRegisterAction=Interface (IInteractAction)
(*No atribs*)
end;
(*** end IRegisterAction ***)
(* IceCreamShop
An ice cream shop.
*)
IIceCreamShop=Interface (IFoodEstablishment)
(*No atribs*)
end;
(*** end IIceCreamShop ***)
(* MovieRentalStore
A movie rental store.
*)
IMovieRentalStore=Interface (IStore)
(*No atribs*)
end;
(*** end IMovieRentalStore ***)
(* FindAction
*)
IFindAction=Interface (IAction)
(*No atribs*)
end;
(*** end IFindAction ***)
(* CheckAction
An agent inspects/determines/investigates/inquire or examine an object's
accuracy/quality/condition or state.
*)
ICheckAction=Interface (IFindAction)
(*No atribs*)
end;
(*** end ICheckAction ***)
(* WPFooter
The footer section of the page.
*)
IWPFooter=Interface (IWebPageElement)
(*No atribs*)
end;
(*** end IWPFooter ***)
(* TreatmentIndication
An indication for treating an underlying condition, symptom, etc.
*)
ITreatmentIndication=Interface (IMedicalIndication)
(*No atribs*)
end;
(*** end ITreatmentIndication ***)
(* MensClothingStore
A men's clothing store.
*)
IMensClothingStore=Interface (IStore)
(*No atribs*)
end;
(*** end IMensClothingStore ***)
(* City
A city or town.
*)
ICity=Interface (IAdministrativeArea)
(*No atribs*)
end;
(*** end ICity ***)
(* DryCleaningOrLaundry
A dry-cleaning business.
*)
IDryCleaningOrLaundry=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end IDryCleaningOrLaundry ***)
IDistance=interface; //forward
(* VisualArtwork
A work of art that is primarily visual in character.
*)
IVisualArtwork=Interface (ICreativeWork)
(*The primary artist for a work
in a medium other than pencils or digital
line art--for example, if the
primary artwork is done in watercolors or
digital paints.*)
function Get_artist:IPerson;
procedure Set_artist(v:IPerson);
(*The width of the item.*)
function Get_width:IQuantitativeValue;
procedure Set_width(v:IQuantitativeValue);
(*A material used as a surface in some artwork, e.g. Canvas, Paper, Wood,
Board, etc.*)
function Get_surface:String;
procedure Set_surface(v:String);
(*The depth of the item.*)
function Get_depth:IQuantitativeValue;
procedure Set_depth(v:IQuantitativeValue);
(*The material used. (e.g. Oil, Watercolour, Acrylic, Linoprint, Marble,
Cyanotype, Digital, Lithograph, DryPoint, Intaglio, Pastel, Woodcut, Pencil,
Mixed Media, etc.)*)
function Get_artMedium:String;
procedure Set_artMedium(v:String);
(*The number of copies when multiple copies of a piece of artwork are produced
- e.g. for a limited edition of 20 prints, 'artEdition' refers to the total
number of copies (in this example "20").*)
function Get_artEdition:Integer;
procedure Set_artEdition(v:Integer);
(*e.g. Painting, Drawing, Sculpture, Print, Photograph, Assemblage, Collage,
etc.*)
function Get_artform:String;
procedure Set_artform(v:String);
(*The height of the item.*)
function Get_height:IDistance;
procedure Set_height(v:IDistance);
// properties
property artist:IPerson read Get_artist write Set_artist;
property width:IQuantitativeValue read Get_width write Set_width;
property surface:String read Get_surface write Set_surface;
property depth:IQuantitativeValue read Get_depth write Set_depth;
property artMedium:String read Get_artMedium write Set_artMedium;
property artEdition:Integer read Get_artEdition write Set_artEdition;
property artform:String read Get_artform write Set_artform;
property height:IDistance read Get_height write Set_height;
end;
(*** end IVisualArtwork ***)
(* Distance
Properties that take Distances as values are of the form
'&lt;Number&gt; &lt;Length unit of measure&gt;'. E.g., '7 ft'.
*)
IDistance=Interface (IQuantity)
function TangDistance:TangibleValue;
end;
(*** end IDistance ***)
(* CoverArt
The artwork on the outer surface of a CreativeWork.
*)
ICoverArt=Interface (IVisualArtwork)
(*No atribs*)
end;
(*** end ICoverArt ***)
(* ComicCoverArt
The artwork on the cover of a comic.
*)
IComicCoverArt=Interface (ICoverArt)
(*No atribs*)
end;
(*** end IComicCoverArt ***)
(* SeaBodyOfWater
A sea (for example, the Caspian sea).
*)
ISeaBodyOfWater=Interface (IBodyOfWater)
(*No atribs*)
end;
(*** end ISeaBodyOfWater ***)
(* HousePainter
A house painting service.
*)
IHousePainter=Interface (IHomeAndConstructionBusiness)
(*No atribs*)
end;
(*** end IHousePainter ***)
(* DislikeAction
The act of expressing a negative sentiment about the object. An agent dislikes
an object (a proposition, topic or theme) with participants.
*)
IDislikeAction=Interface (IReactAction)
(*No atribs*)
end;
(*** end IDislikeAction ***)
(* AnimalShelter
Animal shelter.
*)
IAnimalShelter=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end IAnimalShelter ***)
(* ShoeStore
A shoe store.
*)
IShoeStore=Interface (IStore)
(*No atribs*)
end;
(*** end IShoeStore ***)
(* VisualArtsEvent
Event type: Visual arts event.
*)
IVisualArtsEvent=Interface (IEvent)
(*No atribs*)
end;
(*** end IVisualArtsEvent ***)
(* Resort
*)
IResort=Interface (ILodgingBusiness)
(*No atribs*)
end;
(*** end IResort ***)
(* BikeStore
A bike store.
*)
IBikeStore=Interface (IStore)
(*No atribs*)
end;
(*** end IBikeStore ***)
(* Barcode
An image of a visual machine-readable code such as a barcode or QR code.
*)
IBarcode=Interface (IImageObject)
(*No atribs*)
end;
(*** end IBarcode ***)
(* Attorney
*)
IAttorney=Interface (ILegalService)
(*No atribs*)
end;
(*** end IAttorney ***)
(* SpreadsheetDigitalDocument
A spreadsheet file.
*)
ISpreadsheetDigitalDocument=Interface (IDigitalDocument)
(*No atribs*)
end;
(*** end ISpreadsheetDigitalDocument ***)
(* ProfessionalService
*)
IProfessionalService=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end IProfessionalService ***)
(* BuddhistTemple
A Buddhist temple.
*)
IBuddhistTemple=Interface (IPlaceOfWorship)
(*No atribs*)
end;
(*** end IBuddhistTemple ***)
(* PhotographAction
The act of capturing still images of objects using a camera.
*)
IPhotographAction=Interface (ICreateAction)
(*No atribs*)
end;
(*** end IPhotographAction ***)
(* Bakery
A bakery.
*)
IBakery=Interface (IFoodEstablishment)
(*No atribs*)
end;
(*** end IBakery ***)
(* State
A state or province of a country.
*)
IState=Interface (IAdministrativeArea)
(*No atribs*)
end;
(*** end IState ***)
(* Mountain
A mountain, like Mount Whitney or Mount Everest.
*)
IMountain=Interface (ILandform)
(*No atribs*)
end;
(*** end IMountain ***)
(* SocialEvent
Event type: Social event.
*)
ISocialEvent=Interface (IEvent)
(*No atribs*)
end;
(*** end ISocialEvent ***)
(* MusicVenue
A music venue.
*)
IMusicVenue=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IMusicVenue ***)
(* Park
A park.
*)
IPark=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IPark ***)
(* BankAccount
A product or service offered by a bank whereby one may deposit, withdraw or
transfer money and in some cases be paid interest.
*)
IBankAccount=Interface (IFinancialProduct)
function TangBankAccount:TangibleValue;
end;
(*** end IBankAccount ***)
(* DepositAccount
A type of Bank Account with a main purpose of depositing funds to gain interest
or other benefits.
*)
IDepositAccount=Interface (IBankAccount)
function TangDepositAccount:TangibleValue;
end;
(*** end IDepositAccount ***)
(* ScheduleAction
*)
IScheduleAction=Interface (IPlanAction)
(*No atribs*)
end;
(*** end IScheduleAction ***)
(* NailSalon
A nail salon.
*)
INailSalon=Interface (IHealthAndBeautyBusiness)
(*No atribs*)
end;
(*** end INailSalon ***)
(* EatAction
The act of swallowing solid objects.
*)
IEatAction=Interface (IConsumeAction)
(*No atribs*)
end;
(*** end IEatAction ***)
(* InternetCafe
An internet cafe.
*)
IInternetCafe=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end IInternetCafe ***)
(* Restaurant
A restaurant.
*)
IRestaurant=Interface (IFoodEstablishment)
(*No atribs*)
end;
(*** end IRestaurant ***)
(* NightClub
A nightclub or discotheque.
*)
INightClub=Interface (IEntertainmentBusiness)
(*No atribs*)
end;
(*** end INightClub ***)
(* SubscribeAction
*)
ISubscribeAction=Interface (IInteractAction)
(*No atribs*)
end;
(*** end ISubscribeAction ***)
(* DrawAction
The act of producing a visual/graphical representation of an object, typically
with a pen/pencil and paper as instruments.
*)
IDrawAction=Interface (ICreateAction)
(*No atribs*)
end;
(*** end IDrawAction ***)
(* BookSeries
A series of books. Included books can be indicated with the hasPart property.
*)
IBookSeries=Interface (ICreativeWorkSeries)
(*No atribs*)
end;
(*** end IBookSeries ***)
(* TrainReservation
*)
ITrainReservation=Interface (IReservation)
function TangTrainReservation:TangibleValue;
end;
(*** end ITrainReservation ***)
(* EducationEvent
Event type: Education event.
*)
IEducationEvent=Interface (IEvent)
(*No atribs*)
end;
(*** end IEducationEvent ***)
(* PaintAction
The act of producing a painting, typically with paint and canvas as instruments.
*)
IPaintAction=Interface (ICreateAction)
(*No atribs*)
end;
(*** end IPaintAction ***)
(* Cemetery
A graveyard.
*)
ICemetery=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end ICemetery ***)
(* WholesaleStore
A wholesale store.
*)
IWholesaleStore=Interface (IStore)
(*No atribs*)
end;
(*** end IWholesaleStore ***)
(* BarOrPub
A bar or pub.
*)
IBarOrPub=Interface (IFoodEstablishment)
(*No atribs*)
end;
(*** end IBarOrPub ***)
(* Waterfall
A waterfall, like Niagara.
*)
IWaterfall=Interface (IBodyOfWater)
(*No atribs*)
end;
(*** end IWaterfall ***)
(* Mosque
A mosque.
*)
IMosque=Interface (IPlaceOfWorship)
(*No atribs*)
end;
(*** end IMosque ***)
(* NGO
Organization: Non-governmental Organization.
*)
INGO=Interface (IOrganization)
(*No atribs*)
end;
(*** end INGO ***)
(* Pond
A pond.
*)
IPond=Interface (IBodyOfWater)
(*No atribs*)
end;
(*** end IPond ***)
(* InformAction
The act of notifying someone of information pertinent to them, with no
expectation of a response.
*)
IInformAction=Interface (ICommunicateAction)
(*No atribs*)
end;
(*** end IInformAction ***)
(* ConfirmAction
*)
IConfirmAction=Interface (IInformAction)
(*No atribs*)
end;
(*** end IConfirmAction ***)
(* DeleteAction
The act of editing a recipient by removing one of its objects.
*)
IDeleteAction=Interface (IUpdateAction)
(*No atribs*)
end;
(*** end IDeleteAction ***)
(* ActivateAction
The act of starting or activating a device or application (e.g. starting a
timer or turning on a flashlight).
*)
IActivateAction=Interface (IControlAction)
(*No atribs*)
end;
(*** end IActivateAction ***)
(* Crematorium
A crematorium.
*)
ICrematorium=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end ICrematorium ***)
(* UserPageVisits
*)
IUserPageVisits=Interface (IUserInteraction)
(*No atribs*)
end;
(*** end IUserPageVisits ***)
(* GolfCourse
A golf course.
*)
IGolfCourse=Interface (ISportsActivityLocation)
(*No atribs*)
end;
(*** end IGolfCourse ***)
(* MusicVideoObject
A music video file.
*)
IMusicVideoObject=Interface (IMediaObject)
(*No atribs*)
end;
(*** end IMusicVideoObject ***)
(* AutoDealer
An car dealership.
*)
IAutoDealer=Interface (IAutomotiveBusiness)
(*No atribs*)
end;
(*** end IAutoDealer ***)
(* UserDownloads
*)
IUserDownloads=Interface (IUserInteraction)
(*No atribs*)
end;
(*** end IUserDownloads ***)
(* LegislativeBuilding
A legislative building&#x2014;for example, the state capitol.
*)
ILegislativeBuilding=Interface (IGovernmentBuilding)
(*No atribs*)
end;
(*** end ILegislativeBuilding ***)
(* ProfilePage
Web page type: Profile page.
*)
IProfilePage=Interface (IWebPage)
(*No atribs*)
end;
(*** end IProfilePage ***)
(* FMRadioChannel
A radio channel that uses FM.
*)
IFMRadioChannel=Interface (IRadioChannel)
function TangFMRadioChannel:TangibleValue;
end;
(*** end IFMRadioChannel ***)
(* PerformingArtsTheater
A theater or other performing art center.
*)
IPerformingArtsTheater=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IPerformingArtsTheater ***)
(* Bridge
A bridge.
*)
IBridge=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IBridge ***)
(* HomeGoodsStore
A home goods store.
*)
IHomeGoodsStore=Interface (IStore)
(*No atribs*)
end;
(*** end IHomeGoodsStore ***)
(* Bone
Rigid connective tissue that comprises up the skeletal structure of the human
body.
*)
IBone=Interface (IAnatomicalStructure)
(*No atribs*)
end;
(*** end IBone ***)
(* VeterinaryCare
A vet's office.
*)
IVeterinaryCare=Interface (IMedicalOrganization)
(*No atribs*)
end;
(*** end IVeterinaryCare ***)
(* LiteraryEvent
Event type: Literary event.
*)
ILiteraryEvent=Interface (IEvent)
(*No atribs*)
end;
(*** end ILiteraryEvent ***)
(* TravelAgency
A travel agency.
*)
ITravelAgency=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end ITravelAgency ***)
(* LikeAction
The act of expressing a positive sentiment about the object. An agent likes an
object (a proposition, topic or theme) with participants.
*)
ILikeAction=Interface (IReactAction)
(*No atribs*)
end;
(*** end ILikeAction ***)
(* OnDemandEvent
A publication event e.g. catch-up TV or radio podcast, during which a program
is available on-demand.
*)
IOnDemandEvent=Interface (IPublicationEvent)
(*No atribs*)
end;
(*** end IOnDemandEvent ***)
(* Conversation
One or more messages between organizations or people on a particular topic.
Individual messages can be linked to the conversation with isPartOf or hasPart
properties.
*)
IConversation=Interface (ICreativeWork)
(*No atribs*)
end;
(*** end IConversation ***)
(* CheckoutPage
Web page type: Checkout page.
*)
ICheckoutPage=Interface (IWebPage)
(*No atribs*)
end;
(*** end ICheckoutPage ***)
(* Museum
A museum.
*)
IMuseum=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IMuseum ***)
(* HVACBusiness
A business that provide Heating, Ventilation and Air Conditioning services.
*)
IHVACBusiness=Interface (IHomeAndConstructionBusiness)
(*No atribs*)
end;
(*** end IHVACBusiness ***)
(* MedicalSymptom
Any complaint sensed and expressed by the patient (therefore defined as
subjective) like stomachache, lower-back pain, or fatigue.
*)
IMedicalSymptom=Interface (IMedicalSignOrSymptom)
(*No atribs*)
end;
(*** end IMedicalSymptom ***)
(* TennisComplex
A tennis complex.
*)
ITennisComplex=Interface (ISportsActivityLocation)
(*No atribs*)
end;
(*** end ITennisComplex ***)
(* UseAction
The act of applying an object to its intended purpose.
*)
IUseAction=Interface (IConsumeAction)
(*No atribs*)
end;
(*** end IUseAction ***)
(* WearAction
The act of dressing oneself in clothing.
*)
IWearAction=Interface (IUseAction)
(*No atribs*)
end;
(*** end IWearAction ***)
(* QuoteAction
An agent quotes/estimates/appraises an object/product/service with a price at a
location/store.
*)
IQuoteAction=Interface (ITradeAction)
(*No atribs*)
end;
(*** end IQuoteAction ***)
(* ConvenienceStore
A convenience store.
*)
IConvenienceStore=Interface (IStore)
(*No atribs*)
end;
(*** end IConvenienceStore ***)
(* GasStation
A gas station.
*)
IGasStation=Interface (IAutomotiveBusiness)
(*No atribs*)
end;
(*** end IGasStation ***)
(* RejectAction
*)
IRejectAction=Interface (IAllocateAction)
(*No atribs*)
end;
(*** end IRejectAction ***)
(* BefriendAction
*)
IBefriendAction=Interface (IInteractAction)
(*No atribs*)
end;
(*** end IBefriendAction ***)
(* Beach
Beach.
*)
IBeach=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IBeach ***)
(* PoliceStation
A police station.
*)
IPoliceStation=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IPoliceStation ***)
(* ComedyEvent
Event type: Comedy event.
*)
IComedyEvent=Interface (IEvent)
(*No atribs*)
end;
(*** end IComedyEvent ***)
(* SkiResort
A ski resort.
*)
ISkiResort=Interface (ISportsActivityLocation)
(*No atribs*)
end;
(*** end ISkiResort ***)
(* SiteNavigationElement
A navigation element of the page.
*)
ISiteNavigationElement=Interface (IWebPageElement)
(*No atribs*)
end;
(*** end ISiteNavigationElement ***)
(* MedicalBusiness
A particular physical or virtual business of an organization for medical
purposes. Examples of MedicalBusiness include differents business run by health
professionals.
*)
IMedicalBusiness=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end IMedicalBusiness ***)
(* Optician
A store that sells reading glasses and similar devices for improving vision.
*)
IOptician=Interface (IMedicalBusiness)
(*No atribs*)
end;
(*** end IOptician ***)
(* RadioSeason
Season dedicated to radio broadcast and associated online delivery.
*)
IRadioSeason=Interface (ICreativeWorkSeason)
(*No atribs*)
end;
(*** end IRadioSeason ***)
(* FastFoodRestaurant
A fast-food restaurant.
*)
IFastFoodRestaurant=Interface (IFoodEstablishment)
(*No atribs*)
end;
(*** end IFastFoodRestaurant ***)
(* MedicalGuidelineContraindication
A guideline contraindication that designates a process as harmful and where
quality of the data supporting the contraindication is sound.
*)
IMedicalGuidelineContraindication=Interface (IMedicalGuideline)
(*No atribs*)
end;
(*** end IMedicalGuidelineContraindication ***)
(* StadiumOrArena
A stadium.
*)
IStadiumOrArena=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IStadiumOrArena ***)
(* QAPage
A QAPage is a WebPage focussed on a specific Question and its Answer(s), e.g.
in a question answering site or documenting Frequently Asked Questions (FAQs).
*)
IQAPage=Interface (IWebPage)
(*No atribs*)
end;
(*** end IQAPage ***)
(* TelevisionStation
A television station.
*)
ITelevisionStation=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end ITelevisionStation ***)
(* Message
A single message from a sender to one or more organizations or people.
*)
IMessage=Interface (ICreativeWork)
(*The date/time at which the message was sent.*)
function Get_dateSent:TDateTime;
procedure Set_dateSent(v:TDateTime);
(*The date/time at which the message has been read by the recipient if a single
recipient exists.*)
function Get_dateRead:TDateTime;
procedure Set_dateRead(v:TDateTime);
(*A CreativeWork attached to the message.*)
function Get_messageAttachment:ICreativeWork;
procedure Set_messageAttachment(v:ICreativeWork);
(*The date/time the message was received if a single recipient exists.*)
function Get_dateReceived:TDateTime;
procedure Set_dateReceived(v:TDateTime);
// properties
property dateSent:TDateTime read Get_dateSent write Set_dateSent;
property dateRead:TDateTime read Get_dateRead write Set_dateRead;
property messageAttachment:ICreativeWork read Get_messageAttachment write Set_messageAttachment;
property dateReceived:TDateTime read Get_dateReceived write Set_dateReceived;
end;
(*** end IMessage ***)
(* EmailMessage
An email message.
*)
IEmailMessage=Interface (IMessage)
(*No atribs*)
end;
(*** end IEmailMessage ***)
(* DiscoverAction
The act of discovering/finding an object.
*)
IDiscoverAction=Interface (IFindAction)
(*No atribs*)
end;
(*** end IDiscoverAction ***)
(* BlogPosting
A blog post.
*)
IBlogPosting=Interface (ISocialMediaPosting)
(*No atribs*)
end;
(*** end IBlogPosting ***)
(* PhysicalActivityCategory
Categories of physical activity, organized by physiologic classification.
*)
IPhysicalActivityCategory=Interface (IEnumeration)
function TangPhysicalActivityCategory:TangibleValue;
end;
(*** end IPhysicalActivityCategory ***)
(* DonateAction
The act of providing goods, services, or money without compensation, often for
philanthropic reasons.
*)
IDonateAction=Interface (ITradeAction)
(*No atribs*)
end;
(*** end IDonateAction ***)
(* ItemListOrderType
Enumerated for values for itemListOrder for indicating how an ordered ItemList
is organized.
*)
IItemListOrderType=Interface (IEnumeration)
function TangItemListOrderType:TangibleValue;
end;
(*** end IItemListOrderType ***)
IMovie=interface; //forward
(* ScreeningEvent
A screening of a movie or other video.
*)
IScreeningEvent=Interface (IEvent)
(*The type of screening or video broadcast used (e.g. IMAX, 3D, SD, HD, etc.).*)
function Get_videoFormat:String;
procedure Set_videoFormat(v:String);
(*The movie presented during this event.*)
function Get_workPresented:IMovie;
procedure Set_workPresented(v:IMovie);
// properties
property videoFormat:String read Get_videoFormat write Set_videoFormat;
property workPresented:IMovie read Get_workPresented write Set_workPresented;
end;
(*** end IScreeningEvent ***)
IMusicGroup=interface; //forward
(* Movie
A movie.
*)
IMovie=Interface (ICreativeWork)
(*The composer of the soundtrack.*)
function Get_musicBy:IMusicGroup;
procedure Set_musicBy(v:IMusicGroup);
(**)
function Get_subtitleLanguage:String;
procedure Set_subtitleLanguage(v:String);
// properties
property musicBy:IMusicGroup read Get_musicBy write Set_musicBy;
property subtitleLanguage:String read Get_subtitleLanguage write Set_subtitleLanguage;
end;
(*** end IMovie ***)
IMusicAlbum=interface; //forward
(* MusicGroup
A musical group, such as a band, an orchestra, or a choir. Can also be a solo
musician.
*)
IMusicGroup=Interface (IPerformingGroup)
(*A member of a music group&#x2014;for example, John, Paul, George, or
Ringo.*)
function Get_musicGroupMember:IPerson;
procedure Set_musicGroupMember(v:IPerson);
(*A collection of music albums.*)
function Get_albums:IMusicAlbum;
procedure Set_albums(v:IMusicAlbum);
(*Genre of the creative work or group.*)
function Get_genre:String;
procedure Set_genre(v:String);
// properties
property musicGroupMember:IPerson read Get_musicGroupMember write Set_musicGroupMember;
property albums:IMusicAlbum read Get_albums write Set_albums;
property genre:String read Get_genre write Set_genre;
end;
(*** end IMusicGroup ***)
IMusicRecording=interface; //forward
(* MusicPlaylist
A collection of music tracks in playlist form.
*)
IMusicPlaylist=Interface (ICreativeWork)
(*A music recording (track)&#x2014;usually a single song.*)
function Get_tracks:IMusicRecording;
procedure Set_tracks(v:IMusicRecording);
(*The number of tracks in this album or playlist.*)
function Get_numTracks:Integer;
procedure Set_numTracks(v:Integer);
// properties
property tracks:IMusicRecording read Get_tracks write Set_tracks;
property numTracks:Integer read Get_numTracks write Set_numTracks;
end;
(*** end IMusicPlaylist ***)
IMusicComposition=interface; //forward
(* MusicRecording
A music recording (track), usually a single song.
*)
IMusicRecording=Interface (ICreativeWork)
(*The album to which this recording belongs.*)
function Get_inAlbum:IMusicAlbum;
procedure Set_inAlbum(v:IMusicAlbum);
(*The playlist to which this recording belongs.*)
function Get_inPlaylist:IMusicPlaylist;
procedure Set_inPlaylist(v:IMusicPlaylist);
(*The artist that performed this album or recording.*)
function Get_byArtist:IMusicGroup;
procedure Set_byArtist(v:IMusicGroup);
(*The International Standard Recording Code for the recording.*)
function Get_isrcCode:String;
procedure Set_isrcCode(v:String);
(*The composition this track is a recording of.*)
function Get_recordingOf:IMusicComposition;
procedure Set_recordingOf(v:IMusicComposition);
// properties
property inAlbum:IMusicAlbum read Get_inAlbum write Set_inAlbum;
property inPlaylist:IMusicPlaylist read Get_inPlaylist write Set_inPlaylist;
property byArtist:IMusicGroup read Get_byArtist write Set_byArtist;
property isrcCode:String read Get_isrcCode write Set_isrcCode;
property recordingOf:IMusicComposition read Get_recordingOf write Set_recordingOf;
end;
(*** end IMusicRecording ***)
IMusicAlbumReleaseType=interface; //forward
IMusicAlbumProductionType=interface; //forward
(* MusicAlbum
A collection of music tracks.
*)
IMusicAlbum=Interface (IMusicPlaylist)
(*The kind of release which this album is: single, EP or album.*)
function Get_albumReleaseType:IMusicAlbumReleaseType;
procedure Set_albumReleaseType(v:IMusicAlbumReleaseType);
(*Classification of the album by it's type of content: soundtrack, live album,
studio album, etc.*)
function Get_albumProductionType:IMusicAlbumProductionType;
procedure Set_albumProductionType(v:IMusicAlbumProductionType);
// properties
property albumReleaseType:IMusicAlbumReleaseType read Get_albumReleaseType write Set_albumReleaseType;
property albumProductionType:IMusicAlbumProductionType read Get_albumProductionType write Set_albumProductionType;
end;
(*** end IMusicAlbum ***)
(* MusicAlbumReleaseType
The kind of release which this album is: single, EP or album.
*)
IMusicAlbumReleaseType=Interface (IEnumeration)
function TangMusicAlbumReleaseType:TangibleValue;
end;
(*** end IMusicAlbumReleaseType ***)
(* MusicAlbumProductionType
Classification of the album by it's type of content: soundtrack, live album,
studio album, etc.
*)
IMusicAlbumProductionType=Interface (IEnumeration)
function TangMusicAlbumProductionType:TangibleValue;
end;
(*** end IMusicAlbumProductionType ***)
(* MusicComposition
A musical composition.
*)
IMusicComposition=Interface (ICreativeWork)
(*The key, mode, or scale this composition uses.*)
function Get_musicalKey:String;
procedure Set_musicalKey(v:String);
(*The International Standard Musical Work Code for the composition.*)
function Get_iswcCode:String;
procedure Set_iswcCode(v:String);
(*Smaller compositions included in this work (e.g. a movement in a symphony).*)
function Get_includedComposition:IMusicComposition;
procedure Set_includedComposition(v:IMusicComposition);
(*The type of composition (e.g. overture, sonata, symphony, etc.).*)
function Get_musicCompositionForm:String;
procedure Set_musicCompositionForm(v:String);
(*An arrangement derived from the composition.*)
function Get_musicArrangement:IMusicComposition;
procedure Set_musicArrangement(v:IMusicComposition);
(*The person who wrote the words.*)
function Get_lyricist:IPerson;
procedure Set_lyricist(v:IPerson);
(*The date and place the work was first performed.*)
function Get_firstPerformance:IEvent;
procedure Set_firstPerformance(v:IEvent);
(*The words in the song.*)
function Get_lyrics:ICreativeWork;
procedure Set_lyrics(v:ICreativeWork);
// properties
property musicalKey:String read Get_musicalKey write Set_musicalKey;
property iswcCode:String read Get_iswcCode write Set_iswcCode;
property includedComposition:IMusicComposition read Get_includedComposition write Set_includedComposition;
property musicCompositionForm:String read Get_musicCompositionForm write Set_musicCompositionForm;
property musicArrangement:IMusicComposition read Get_musicArrangement write Set_musicArrangement;
property lyricist:IPerson read Get_lyricist write Set_lyricist;
property firstPerformance:IEvent read Get_firstPerformance write Set_firstPerformance;
property lyrics:ICreativeWork read Get_lyrics write Set_lyrics;
end;
(*** end IMusicComposition ***)
(* Hospital
A hospital.
*)
IHospital=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IHospital ***)
IAirport=interface; //forward
IBoardingPolicyType=interface; //forward
(* Flight
An airline flight.
*)
IFlight=Interface (IIntangible)
(*'carrier' is an out-dated term indicating the 'provider' for parcel delivery
and flights.*)
function Get_carrier:IOrganization;
procedure Set_carrier(v:IOrganization);
(*Description of the meals that will be provided or available for purchase.*)
function Get_mealService:String;
procedure Set_mealService(v:String);
(*The unique identifier for a flight including the airline IATA code. For
example, if describing United flight 110, where the IATA code for United is
'UA', the flightNumber is 'UA110'.*)
function Get_flightNumber:String;
procedure Set_flightNumber(v:String);
(*The kind of aircraft (e.g., "Boeing 747").*)
function Get_aircraft:String;
procedure Set_aircraft(v:String);
(*The airport where the flight originates.*)
function Get_departureAirport:IAirport;
procedure Set_departureAirport(v:IAirport);
(*Identifier of the flight's departure gate.*)
function Get_departureGate:String;
procedure Set_departureGate(v:String);
(*Identifier of the flight's departure terminal.*)
function Get_departureTerminal:String;
procedure Set_departureTerminal(v:String);
(*The distance of the flight.*)
function Get_flightDistance:IDistance;
procedure Set_flightDistance(v:IDistance);
(*The expected departure time.*)
function Get_departureTime:TDateTime;
procedure Set_departureTime(v:TDateTime);
(*The estimated time the flight will take.*)
function Get_estimatedFlightDuration:IDuration;
procedure Set_estimatedFlightDuration(v:IDuration);
(*The type of boarding policy used by the airline (e.g. zone-based or
group-based).*)
function Get_boardingPolicy:IBoardingPolicyType;
procedure Set_boardingPolicy(v:IBoardingPolicyType);
(*The airport where the flight terminates.*)
function Get_arrivalAirport:IAirport;
procedure Set_arrivalAirport(v:IAirport);
(*The time when a passenger can check into the flight online.*)
function Get_webCheckinTime:TDateTime;
procedure Set_webCheckinTime(v:TDateTime);
(*Identifier of the flight's arrival gate.*)
function Get_arrivalGate:String;
procedure Set_arrivalGate(v:String);
(*Identifier of the flight's arrival terminal.*)
function Get_arrivalTerminal:String;
procedure Set_arrivalTerminal(v:String);
// properties
property carrier:IOrganization read Get_carrier write Set_carrier;
property mealService:String read Get_mealService write Set_mealService;
property flightNumber:String read Get_flightNumber write Set_flightNumber;
property aircraft:String read Get_aircraft write Set_aircraft;
property departureAirport:IAirport read Get_departureAirport write Set_departureAirport;
property departureGate:String read Get_departureGate write Set_departureGate;
property departureTerminal:String read Get_departureTerminal write Set_departureTerminal;
property flightDistance:IDistance read Get_flightDistance write Set_flightDistance;
property departureTime:TDateTime read Get_departureTime write Set_departureTime;
property estimatedFlightDuration:IDuration read Get_estimatedFlightDuration write Set_estimatedFlightDuration;
property boardingPolicy:IBoardingPolicyType read Get_boardingPolicy write Set_boardingPolicy;
property arrivalAirport:IAirport read Get_arrivalAirport write Set_arrivalAirport;
property webCheckinTime:TDateTime read Get_webCheckinTime write Set_webCheckinTime;
property arrivalGate:String read Get_arrivalGate write Set_arrivalGate;
property arrivalTerminal:String read Get_arrivalTerminal write Set_arrivalTerminal;
end;
(*** end IFlight ***)
(* Airport
An airport.
*)
IAirport=Interface (ICivicStructure)
(*ICAO identifier for an airport.*)
function Get_icaoCode:String;
procedure Set_icaoCode(v:String);
// properties
property icaoCode:String read Get_icaoCode write Set_icaoCode;
end;
(*** end IAirport ***)
(* BoardingPolicyType
A type of boarding policy used by an airline.
*)
IBoardingPolicyType=Interface (IEnumeration)
function TangBoardingPolicyType:TangibleValue;
end;
(*** end IBoardingPolicyType ***)
(* MovieSeries
A series of movies. Included movies can be indicated with the hasPart property.
*)
IMovieSeries=Interface (ICreativeWorkSeries)
(*No atribs*)
end;
(*** end IMovieSeries ***)
IUnitPriceSpecification=interface; //forward
(* CompoundPriceSpecification
A compound price specification is one that bundles multiple prices that all
apply in combination for different dimensions of consumption. Use the name
property of the attached unit price specification for indicating the dimension
of a price component (e.g. "electricity" or "final cleaning").
*)
ICompoundPriceSpecification=Interface (IPriceSpecification)
(**)
function Get_priceComponent:IUnitPriceSpecification;
procedure Set_priceComponent(v:IUnitPriceSpecification);
// properties
property priceComponent:IUnitPriceSpecification read Get_priceComponent write Set_priceComponent;
end;
(*** end ICompoundPriceSpecification ***)
(* UnitPriceSpecification
The price asked for a given offer by the respective organization or person.
*)
IUnitPriceSpecification=Interface (IPriceSpecification)
(*A short text or acronym indicating multiple price specifications for the same
offer, e.g. SRP for the suggested retail price or INVOICE for the invoice
price, mostly used in the car industry.*)
function Get_priceType:String;
procedure Set_priceType(v:String);
(*The reference quantity for which a certain price applies, e.g. 1 EUR per 4
kWh of electricity. This property is a replacement for unitOfMeasurement for
the advanced cases where the price does not relate to a standard unit.*)
function Get_referenceQuantity:IQuantitativeValue;
procedure Set_referenceQuantity(v:IQuantitativeValue);
(*This property specifies the minimal quantity and rounding increment that will
be the basis for the billing. The unit of measurement is specified by the
unitCode property.*)
function Get_billingIncrement:INumber;
procedure Set_billingIncrement(v:INumber);
// properties
property priceType:String read Get_priceType write Set_priceType;
property referenceQuantity:IQuantitativeValue read Get_referenceQuantity write Set_referenceQuantity;
property billingIncrement:INumber read Get_billingIncrement write Set_billingIncrement;
end;
(*** end IUnitPriceSpecification ***)
(* EmergencyService
An emergency service, such as a fire station or ER.
*)
IEmergencyService=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end IEmergencyService ***)
(* IndividualProduct
A single, identifiable product instance (e.g. a laptop with a particular serial
number).
*)
IIndividualProduct=Interface (IProduct)
(*No atribs*)
end;
(*** end IIndividualProduct ***)
IComputerLanguage=interface; //forward
(* SoftwareSourceCode
Computer programming source code. Example: Full (compile ready) solutions, code
snippet samples, scripts, templates.
*)
ISoftwareSourceCode=Interface (ICreativeWork)
(*What type of code sample: full (compile ready) solution, code snippet, inline
code, scripts, template.*)
function Get_sampleType:String;
procedure Set_sampleType(v:String);
(*Runtime platform or script interpreter dependencies (Example - Java v1,
Python2.3, .Net Framework 3.0).*)
function Get_runtime:String;
procedure Set_runtime(v:String);
(*Link to the repository where the un-compiled, human readable code and related
code is located (SVN, github, CodePlex).*)
function Get_codeRepository:String;
procedure Set_codeRepository(v:String);
(*Target Operating System / Product to which the code applies. If applies to
several versions, just the product name can be used.*)
function Get_targetProduct:ISoftwareApplication;
procedure Set_targetProduct(v:ISoftwareApplication);
(*The computer programming language.*)
function Get_programmingLanguage:IComputerLanguage;
procedure Set_programmingLanguage(v:IComputerLanguage);
// properties
property sampleType:String read Get_sampleType write Set_sampleType;
property runtime:String read Get_runtime write Set_runtime;
property codeRepository:String read Get_codeRepository write Set_codeRepository;
property targetProduct:ISoftwareApplication read Get_targetProduct write Set_targetProduct;
property programmingLanguage:IComputerLanguage read Get_programmingLanguage write Set_programmingLanguage;
end;
(*** end ISoftwareSourceCode ***)
(* ComputerLanguage
*)
IComputerLanguage=Interface (IIntangible)
function TangComputerLanguage:TangibleValue;
end;
(*** end IComputerLanguage ***)
(* FlightReservation
*)
IFlightReservation=Interface (IReservation)
(*The priority status assigned to a passenger for security or boarding (e.g.
FastTrack or Priority).*)
function Get_passengerPriorityStatus:String;
procedure Set_passengerPriorityStatus(v:String);
(*The type of security screening the passenger is subject to.*)
function Get_securityScreening:String;
procedure Set_securityScreening(v:String);
(*The airline-specific indicator of boarding order / preference.*)
function Get_boardingGroup:String;
procedure Set_boardingGroup(v:String);
(*The passenger's sequence number as assigned by the airline.*)
function Get_passengerSequenceNumber:String;
procedure Set_passengerSequenceNumber(v:String);
// properties
property passengerPriorityStatus:String read Get_passengerPriorityStatus write Set_passengerPriorityStatus;
property securityScreening:String read Get_securityScreening write Set_securityScreening;
property boardingGroup:String read Get_boardingGroup write Set_boardingGroup;
property passengerSequenceNumber:String read Get_passengerSequenceNumber write Set_passengerSequenceNumber;
end;
(*** end IFlightReservation ***)
(* Suite
*)
ISuite=Interface (IAccommodation)
(*The number of rooms (excluding bathrooms and closets) of the acccommodation
or lodging business.
Typical unit code(s): ROM for room or C62 for no unit. The
type of room can be put in the unitText property of the QuantitativeValue.*)
function Get_numberOfRooms:IQuantitativeValue;
procedure Set_numberOfRooms(v:IQuantitativeValue);
// properties
property numberOfRooms:IQuantitativeValue read Get_numberOfRooms write Set_numberOfRooms;
end;
(*** end ISuite ***)
(* EnumerationValueSet
A set of enumerated values.
*)
IEnumerationValueSet=Interface (ICreativeWork)
(*Value contained in value set.*)
function Get_hasEnumerationValue:String;
procedure Set_hasEnumerationValue(v:String);
// properties
property hasEnumerationValue:String read Get_hasEnumerationValue write Set_hasEnumerationValue;
end;
(*** end IEnumerationValueSet ***)
(* ComicStory
The term "story" is any indivisible, re-printable
unit of a comic,
including the interior stories, covers, and backmatter. Most
comics have at
least two stories: a cover (ComicCoverArt) and an interior story.
*)
IComicStory=Interface (ICreativeWork)
(*The individual who adds color to inked drawings.*)
function Get_colorist:IPerson;
procedure Set_colorist(v:IPerson);
(*The individual who adds lettering, including speech balloons and sound
effects, to artwork.*)
function Get_letterer:IPerson;
procedure Set_letterer(v:IPerson);
// properties
property colorist:IPerson read Get_colorist write Set_colorist;
property letterer:IPerson read Get_letterer write Set_letterer;
end;
(*** end IComicStory ***)
(* JobPosting
A listing that describes a job opening in a certain organization.
*)
IJobPosting=Interface (IIntangible)
(*Skills required to fulfill this role.*)
function Get_skills:String;
procedure Set_skills(v:String);
(*Any special commitments associated with this job posting. Valid entries
include VeteranCommit, MilitarySpouseCommit, etc.*)
function Get_specialCommitments:String;
procedure Set_specialCommitments(v:String);
(*Description of benefits associated with the job.*)
function Get_benefits:String;
procedure Set_benefits(v:String);
(*Organization offering the job position.*)
function Get_hiringOrganization:IOrganization;
procedure Set_hiringOrganization(v:IOrganization);
(*Publication date for the job posting.*)
function Get_datePosted:TDateTime;
procedure Set_datePosted(v:TDateTime);
(*Type of employment (e.g. full-time, part-time, contract, temporary, seasonal,
internship).*)
function Get_employmentType:String;
procedure Set_employmentType(v:String);
(*The title of the job.*)
function Get_title:String;
procedure Set_title(v:String);
(*Educational background needed for the position.*)
function Get_educationRequirements:String;
procedure Set_educationRequirements(v:String);
(*Category or categories describing the job. Use BLS O*NET-SOC taxonomy:
http://www.onetcenter.org/taxonomy.html. Ideally includes textual label and
formal code, with the property repeated for each applicable value.*)
function Get_occupationalCategory:String;
procedure Set_occupationalCategory(v:String);
(*A (typically single) geographic location associated with the job position.*)
function Get_jobLocation:IPlace;
procedure Set_jobLocation(v:IPlace);
(*The industry associated with the job position.*)
function Get_industry:String;
procedure Set_industry(v:String);
(*Responsibilities associated with this role.*)
function Get_responsibilities:String;
procedure Set_responsibilities(v:String);
(**)
function Get_salaryCurrency:String;
procedure Set_salaryCurrency(v:String);
(*Description of skills and experience needed for the position.*)
function Get_experienceRequirements:String;
procedure Set_experienceRequirements(v:String);
(*The typical working hours for this job (e.g. 1st shift, night shift,
8am-5pm).*)
function Get_workHours:String;
procedure Set_workHours(v:String);
(*Specific qualifications required for this role.*)
function Get_qualifications:String;
procedure Set_qualifications(v:String);
(*Description of bonus and commission compensation aspects of the job.*)
function Get_incentives:String;
procedure Set_incentives(v:String);
// properties
property skills:String read Get_skills write Set_skills;
property specialCommitments:String read Get_specialCommitments write Set_specialCommitments;
property benefits:String read Get_benefits write Set_benefits;
property hiringOrganization:IOrganization read Get_hiringOrganization write Set_hiringOrganization;
property datePosted:TDateTime read Get_datePosted write Set_datePosted;
property employmentType:String read Get_employmentType write Set_employmentType;
property title:String read Get_title write Set_title;
property educationRequirements:String read Get_educationRequirements write Set_educationRequirements;
property occupationalCategory:String read Get_occupationalCategory write Set_occupationalCategory;
property jobLocation:IPlace read Get_jobLocation write Set_jobLocation;
property industry:String read Get_industry write Set_industry;
property responsibilities:String read Get_responsibilities write Set_responsibilities;
property salaryCurrency:String read Get_salaryCurrency write Set_salaryCurrency;
property experienceRequirements:String read Get_experienceRequirements write Set_experienceRequirements;
property workHours:String read Get_workHours write Set_workHours;
property qualifications:String read Get_qualifications write Set_qualifications;
property incentives:String read Get_incentives write Set_incentives;
end;
(*** end IJobPosting ***)
(* PublicationIssue
*)
IPublicationIssue=Interface (ICreativeWork)
(*Any description of pages that is not separated into pageStart and pageEnd;
for example, "1-6, 9, 55" or "10-12, 46-49".*)
function Get_pagination:String;
procedure Set_pagination(v:String);
(*Identifies the issue of publication; for example, "iii" or "2".*)
function Get_issueNumber:Integer;
procedure Set_issueNumber(v:Integer);
(*The page on which the work starts; for example "135" or "xiii".*)
function Get_pageStart:String;
procedure Set_pageStart(v:String);
// properties
property pagination:String read Get_pagination write Set_pagination;
property issueNumber:Integer read Get_issueNumber write Set_issueNumber;
property pageStart:String read Get_pageStart write Set_pageStart;
end;
(*** end IPublicationIssue ***)
(* TVSeason
Season dedicated to TV broadcast and associated online delivery.
*)
ITVSeason=Interface (ICreativeWork)
(*The country of the principal offices of the production company or individual
responsible for the movie or program.*)
function Get_countryOfOrigin:ICountry;
procedure Set_countryOfOrigin(v:ICountry);
// properties
property countryOfOrigin:ICountry read Get_countryOfOrigin write Set_countryOfOrigin;
end;
(*** end ITVSeason ***)
(* InvestmentOrDeposit
A type of financial product that typically requires the client to transfer
funds to a financial service in return for potential beneficial financial
return.
*)
IInvestmentOrDeposit=Interface (IFinancialProduct)
function TangInvestmentOrDeposit:TangibleValue;
end;
(*** end IInvestmentOrDeposit ***)
(* Vessel
A component of the human body circulatory system comprised of an intricate
network of hollow tubes that transport blood throughout the entire body.
*)
IVessel=Interface (IAnatomicalStructure)
(*No atribs*)
end;
(*** end IVessel ***)
(* Vein
A type of blood vessel that specifically carries blood to the heart.
*)
IVein=Interface (IVessel)
(*The anatomical or organ system drained by this vessel; generally refers to a
specific part of an organ.*)
function Get_regionDrained:IAnatomicalStructure;
procedure Set_regionDrained(v:IAnatomicalStructure);
(*The anatomical or organ system that the vein flows into; a larger structure
that the vein connects to.*)
function Get_tributary:IAnatomicalStructure;
procedure Set_tributary(v:IAnatomicalStructure);
(*The vasculature that the vein drains into.*)
function Get_drainsTo:IVessel;
procedure Set_drainsTo(v:IVessel);
// properties
property regionDrained:IAnatomicalStructure read Get_regionDrained write Set_regionDrained;
property tributary:IAnatomicalStructure read Get_tributary write Set_tributary;
property drainsTo:IVessel read Get_drainsTo write Set_drainsTo;
end;
(*** end IVein ***)
ILanguage=interface; //forward
(* WriteAction
The act of authoring written creative content.
*)
IWriteAction=Interface (ICreateAction)
(*A sub property of instrument. The language used on this action.*)
function Get_language:ILanguage;
procedure Set_language(v:ILanguage);
// properties
property language:ILanguage read Get_language write Set_language;
end;
(*** end IWriteAction ***)
(* Language
*)
ILanguage=Interface (IIntangible)
function TangLanguage:TangibleValue;
end;
(*** end ILanguage ***)
(* SellAction
The act of taking money from a buyer in exchange for goods or services
rendered. An agent sells an object, product, or service to a buyer for a price.
Reciprocal of BuyAction.
*)
ISellAction=Interface (ITradeAction)
(*A sub property of participant. The participant/person/organization that
bought the object.*)
function Get_buyer:IPerson;
procedure Set_buyer(v:IPerson);
// properties
property buyer:IPerson read Get_buyer write Set_buyer;
end;
(*** end ISellAction ***)
IAnswer=interface; //forward
(* Question
A specific question - e.g. from a user seeking answers online, or collected in
a Frequently Asked Questions (FAQ) document.
*)
IQuestion=Interface (ICreativeWork)
(*The number of answers this question has received.*)
function Get_answerCount:Integer;
procedure Set_answerCount(v:Integer);
(*The answer that has been accepted as best, typically on a Question/Answer
site. Sites vary in their selection mechanisms, e.g. drawing on community
opinion and/or the view of the Question author.*)
function Get_acceptedAnswer:IAnswer;
procedure Set_acceptedAnswer(v:IAnswer);
(*The number of downvotes this question, answer or comment has received from
the community.*)
function Get_downvoteCount:Integer;
procedure Set_downvoteCount(v:Integer);
// properties
property answerCount:Integer read Get_answerCount write Set_answerCount;
property acceptedAnswer:IAnswer read Get_acceptedAnswer write Set_acceptedAnswer;
property downvoteCount:Integer read Get_downvoteCount write Set_downvoteCount;
end;
(*** end IQuestion ***)
(* Comment
*)
IComment=Interface (ICreativeWork)
(*The number of upvotes this question, answer or comment has received from the
community.*)
function Get_upvoteCount:Integer;
procedure Set_upvoteCount(v:Integer);
(*The parent of a question, answer or item in general.*)
function Get_parentItem:IQuestion;
procedure Set_parentItem(v:IQuestion);
// properties
property upvoteCount:Integer read Get_upvoteCount write Set_upvoteCount;
property parentItem:IQuestion read Get_parentItem write Set_parentItem;
end;
(*** end IComment ***)
(* Answer
An answer offered to a question; perhaps correct, perhaps opinionated or wrong.
*)
IAnswer=Interface (IComment)
(*No atribs*)
end;
(*** end IAnswer ***)
(* GiveAction
*)
IGiveAction=Interface (ITransferAction)
(*No atribs*)
end;
(*** end IGiveAction ***)
(* URL
Data type: URL.
*)
IURL=Interface
(*No atribs*)
end;
(*** end IURL ***)
(* House
*)
IHouse=Interface (IAccommodation)
(*No atribs*)
end;
(*** end IHouse ***)
(* BedType
A type of bed. This is used for indicating the bed or beds available in an
accommodation.
*)
IBedType=Interface (IQualitativeValue)
function TangBedType:TangibleValue;
end;
(*** end IBedType ***)
ITrainStation=interface; //forward
(* TrainTrip
A trip on a commercial train line.
*)
ITrainTrip=Interface (IIntangible)
(*The unique identifier for the train.*)
function Get_trainNumber:String;
procedure Set_trainNumber(v:String);
(*The platform from which the train departs.*)
function Get_departurePlatform:String;
procedure Set_departurePlatform(v:String);
(*The station where the train trip ends.*)
function Get_arrivalStation:ITrainStation;
procedure Set_arrivalStation(v:ITrainStation);
(*The expected arrival time.*)
function Get_arrivalTime:TDateTime;
procedure Set_arrivalTime(v:TDateTime);
(*The platform where the train arrives.*)
function Get_arrivalPlatform:String;
procedure Set_arrivalPlatform(v:String);
(*The station from which the train departs.*)
function Get_departureStation:ITrainStation;
procedure Set_departureStation(v:ITrainStation);
(*The name of the train (e.g. The Orient Express).*)
function Get_trainName:String;
procedure Set_trainName(v:String);
// properties
property trainNumber:String read Get_trainNumber write Set_trainNumber;
property departurePlatform:String read Get_departurePlatform write Set_departurePlatform;
property arrivalStation:ITrainStation read Get_arrivalStation write Set_arrivalStation;
property arrivalTime:TDateTime read Get_arrivalTime write Set_arrivalTime;
property arrivalPlatform:String read Get_arrivalPlatform write Set_arrivalPlatform;
property departureStation:ITrainStation read Get_departureStation write Set_departureStation;
property trainName:String read Get_trainName write Set_trainName;
end;
(*** end ITrainTrip ***)
(* TrainStation
A train station.
*)
ITrainStation=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end ITrainStation ***)
(* SportsOrganization
Represents the collection of all sports organizations, including sports teams,
governing bodies, and sports associations.
*)
ISportsOrganization=Interface (IOrganization)
(*A type of sport (e.g. Baseball).*)
function Get_sport:String;
procedure Set_sport(v:String);
// properties
property sport:String read Get_sport write Set_sport;
end;
(*** end ISportsOrganization ***)
(* SportsTeam
Organization: Sports team.
*)
ISportsTeam=Interface (ISportsOrganization)
(*A person that acts as performing member of a sports team; a player as opposed
to a coach.*)
function Get_athlete:IPerson;
procedure Set_athlete(v:IPerson);
(*A person that acts in a coaching role for a sports team.*)
function Get_coach:IPerson;
procedure Set_coach(v:IPerson);
// properties
property athlete:IPerson read Get_athlete write Set_athlete;
property coach:IPerson read Get_coach write Set_coach;
end;
(*** end ISportsTeam ***)
(* Joint
The anatomical location at which two or more bones make contact.
*)
IJoint=Interface (IAnatomicalStructure)
(*The degree of mobility the joint allows.*)
function Get_functionalClass:String;
procedure Set_functionalClass(v:String);
(*The name given to how bone physically connects to each other.*)
function Get_structuralClass:String;
procedure Set_structuralClass(v:String);
(*The biomechanical properties of the bone.*)
function Get_biomechnicalClass:String;
procedure Set_biomechnicalClass(v:String);
// properties
property functionalClass:String read Get_functionalClass write Set_functionalClass;
property structuralClass:String read Get_structuralClass write Set_structuralClass;
property biomechnicalClass:String read Get_biomechnicalClass write Set_biomechnicalClass;
end;
(*** end IJoint ***)
(* SingleFamilyResidence
Residence type: Single-family home.
*)
ISingleFamilyResidence=Interface (IHouse)
(*No atribs*)
end;
(*** end ISingleFamilyResidence ***)
(* TravelAction
The act of traveling from an fromLocation to a destination by a specified mode
of transport, optionally with participants.
*)
ITravelAction=Interface (IMoveAction)
(*No atribs*)
end;
(*** end ITravelAction ***)
(* ReplyAction
*)
IReplyAction=Interface (ICommunicateAction)
(*No atribs*)
end;
(*** end IReplyAction ***)
(* SomeProducts
A placeholder for multiple similar products of the same kind.
*)
ISomeProducts=Interface (IProduct)
(*No atribs*)
end;
(*** end ISomeProducts ***)
(* DiagnosticLab
A medical laboratory that offers on-site or off-site diagnostic services.
*)
IDiagnosticLab=Interface (IMedicalOrganization)
(*A diagnostic test or procedure offered by this lab.*)
function Get_availableTest:IMedicalTest;
procedure Set_availableTest(v:IMedicalTest);
// properties
property availableTest:IMedicalTest read Get_availableTest write Set_availableTest;
end;
(*** end IDiagnosticLab ***)
ICourseInstance=interface; //forward
ICourse=interface; //forward
(* Course
A description of an educational course which may be offered as distinct
instances at which take place at different times or take place at different
locations, or be offered through different media or modes of study. An
educational course is a sequence of one or more educational events and/or
creative works which aims to build knowledge, competence or ability of learners.
*)
ICourse=Interface (ICreativeWork)
(*An offering of the course at a specific time and place or through specific
media or mode of study or to a specific section of students.*)
function Get_hasCourseInstance:ICourseInstance;
procedure Set_hasCourseInstance(v:ICourseInstance);
(**)
function Get_courseCode:String;
procedure Set_courseCode(v:String);
(*A description of the qualification, award, certificate, diploma or other
educational credential awarded as a consequence of successful completion of
this course.*)
function Get_educationalCredentialAwarded:String;
procedure Set_educationalCredentialAwarded(v:String);
(**)
function Get_coursePrerequisites:ICourse;
procedure Set_coursePrerequisites(v:ICourse);
// properties
property hasCourseInstance:ICourseInstance read Get_hasCourseInstance write Set_hasCourseInstance;
property courseCode:String read Get_courseCode write Set_courseCode;
property educationalCredentialAwarded:String read Get_educationalCredentialAwarded write Set_educationalCredentialAwarded;
property coursePrerequisites:ICourse read Get_coursePrerequisites write Set_coursePrerequisites;
end;
(*** end ICourse ***)
(* CourseInstance
*)
ICourseInstance=Interface (IEvent)
(**)
function Get_instructor:IPerson;
procedure Set_instructor(v:IPerson);
(*The medium or means of delivery of the course instance or the mode of study,
either as a text label (e.g. "online", "onsite" or "blended"; "synchronous" or
"asynchronous"; "full-time" or "part-time") or as a URL reference to a term
from a controlled vocabulary (e.g.
https://ceds.ed.gov/element/001311#Asynchronous ).*)
function Get_courseMode:String;
procedure Set_courseMode(v:String);
// properties
property instructor:IPerson read Get_instructor write Set_instructor;
property courseMode:String read Get_courseMode write Set_courseMode;
end;
(*** end ICourseInstance ***)
(* Photograph
A photograph.
*)
IPhotograph=Interface (ICreativeWork)
(*No atribs*)
end;
(*** end IPhotograph ***)
(* ReplaceAction
The act of editing a recipient by replacing an old object with a new object.
*)
IReplaceAction=Interface (IUpdateAction)
(*A sub property of object. The object that is being replaced.*)
function Get_replacee:IThing;
procedure Set_replacee(v:IThing);
(*A sub property of object. The object that replaces.*)
function Get_replacer:IThing;
procedure Set_replacer(v:IThing);
// properties
property replacee:IThing read Get_replacee write Set_replacee;
property replacer:IThing read Get_replacer write Set_replacer;
end;
(*** end IReplaceAction ***)
(* PublicationVolume
*)
IPublicationVolume=Interface (ICreativeWork)
(*Identifies the volume of publication or multi-part work; for example, "iii"
or "2".*)
function Get_volumeNumber:String;
procedure Set_volumeNumber(v:String);
// properties
property volumeNumber:String read Get_volumeNumber write Set_volumeNumber;
end;
(*** end IPublicationVolume ***)
(* RestrictedDiet
A diet restricted to certain foods or preparations for cultural, religious,
health or lifestyle reasons.
*)
IRestrictedDiet=Interface (IEnumeration)
function TangRestrictedDiet:TangibleValue;
end;
(*** end IRestrictedDiet ***)
(* InviteAction
The act of asking someone to attend an event. Reciprocal of RsvpAction.
*)
IInviteAction=Interface (ICommunicateAction)
(*No atribs*)
end;
(*** end IInviteAction ***)
(* LoseAction
The act of being defeated in a competitive activity.
*)
ILoseAction=Interface (IAchieveAction)
(*A sub property of participant. The winner of the action.*)
function Get_winner:IPerson;
procedure Set_winner(v:IPerson);
// properties
property winner:IPerson read Get_winner write Set_winner;
end;
(*** end ILoseAction ***)
(* Physician
A doctor's office.
*)
IPhysician=Interface (IMedicalBusiness)
(*A hospital with which the physician or office is affiliated.*)
function Get_hospitalAffiliation:IHospital;
procedure Set_hospitalAffiliation(v:IHospital);
(*A medical service available from this provider.*)
function Get_availableService:IMedicalTest;
procedure Set_availableService(v:IMedicalTest);
// properties
property hospitalAffiliation:IHospital read Get_hospitalAffiliation write Set_hospitalAffiliation;
property availableService:IMedicalTest read Get_availableService write Set_availableService;
end;
(*** end IPhysician ***)
(* ExercisePlan
Fitness-related activity designed for a specific health-related purpose,
including defined exercise routines as well as activity prescribed by a
clinician.
*)
IExercisePlan=Interface (ICreativeWork)
(*Quantitative measure of the physiologic output of the exercise; also referred
to as energy expenditure.*)
function Get_workload:IQualitativeValue;
procedure Set_workload(v:IQualitativeValue);
(*Length of time to engage in the activity.*)
function Get_activityDuration:IQualitativeValue;
procedure Set_activityDuration(v:IQualitativeValue);
(*How often one should break from the activity.*)
function Get_restPeriods:String;
procedure Set_restPeriods(v:String);
(*Number of times one should repeat the activity.*)
function Get_repetitions:IQualitativeValue;
procedure Set_repetitions(v:IQualitativeValue);
(*Quantitative measure gauging the degree of force involved in the exercise,
for example, heartbeats per minute. May include the velocity of the movement.*)
function Get_intensity:String;
procedure Set_intensity(v:String);
(*Any additional component of the exercise prescription that may need to be
articulated to the patient. This may include the order of exercises, the number
of repetitions of movement, quantitative distance, progressions over time,
etc.*)
function Get_additionalVariable:String;
procedure Set_additionalVariable(v:String);
(*How often one should engage in the activity.*)
function Get_activityFrequency:IQualitativeValue;
procedure Set_activityFrequency(v:IQualitativeValue);
// properties
property workload:IQualitativeValue read Get_workload write Set_workload;
property activityDuration:IQualitativeValue read Get_activityDuration write Set_activityDuration;
property restPeriods:String read Get_restPeriods write Set_restPeriods;
property repetitions:IQualitativeValue read Get_repetitions write Set_repetitions;
property intensity:String read Get_intensity write Set_intensity;
property additionalVariable:String read Get_additionalVariable write Set_additionalVariable;
property activityFrequency:IQualitativeValue read Get_activityFrequency write Set_activityFrequency;
end;
(*** end IExercisePlan ***)
(* MusicReleaseFormatType
Format of this release (the type of recording media used, ie. compact disc,
digital media, LP, etc.).
*)
IMusicReleaseFormatType=Interface (IEnumeration)
function TangMusicReleaseFormatType:TangibleValue;
end;
(*** end IMusicReleaseFormatType ***)
(* Airline
An organization that provides flights for passengers.
*)
IAirline=Interface (IOrganization)
(*IATA identifier for an airline or airport.*)
function Get_iataCode:String;
procedure Set_iataCode(v:String);
// properties
property iataCode:String read Get_iataCode write Set_iataCode;
end;
(*** end IAirline ***)
IInvoice=interface; //forward
IOrderStatus=interface; //forward
IOrderItem=interface; //forward
IParcelDelivery=interface; //forward
(* Order
An order is a confirmation of a transaction (a receipt), which can contain
multiple line items, each represented by an Offer that has been accepted by the
customer.
*)
IOrder=Interface (IIntangible)
(*The order is being paid as part of the referenced Invoice.*)
function Get_partOfInvoice:IInvoice;
procedure Set_partOfInvoice(v:IInvoice);
(*Any discount applied (to an Order).*)
function Get_discount:INumber;
procedure Set_discount(v:INumber);
(*The currency (in 3-letter ISO 4217 format) of the discount.*)
function Get_discountCurrency:String;
procedure Set_discountCurrency(v:String);
(*The current status of the order.*)
function Get_orderStatus:IOrderStatus;
procedure Set_orderStatus(v:IOrderStatus);
(*'merchant' is an out-dated term for 'seller'.*)
function Get_merchant:IPerson;
procedure Set_merchant(v:IPerson);
(*The offer(s) -- e.g., product, quantity and price combinations -- included in
the order.*)
function Get_acceptedOffer:IOffer;
procedure Set_acceptedOffer(v:IOffer);
(*Code used to redeem a discount.*)
function Get_discountCode:String;
procedure Set_discountCode(v:String);
(*The URL for sending a payment.*)
function Get_paymentUrl:String;
procedure Set_paymentUrl(v:String);
(*Date order was placed.*)
function Get_orderDate:TDateTime;
procedure Set_orderDate(v:TDateTime);
(*The billing address for the order.*)
function Get_billingAddress:IPostalAddress;
procedure Set_billingAddress(v:IPostalAddress);
(*The item ordered.*)
function Get_orderedItem:IOrderItem;
procedure Set_orderedItem(v:IOrderItem);
(*The delivery of the parcel related to this order or order item.*)
function Get_orderDelivery:IParcelDelivery;
procedure Set_orderDelivery(v:IParcelDelivery);
(*A number that confirms the given order or payment has been received.*)
function Get_confirmationNumber:String;
procedure Set_confirmationNumber(v:String);
(*Was the offer accepted as a gift for someone other than the buyer.*)
function Get_isGift:Boolean;
procedure Set_isGift(v:Boolean);
(*The identifier of the transaction.*)
function Get_orderNumber:String;
procedure Set_orderNumber(v:String);
// properties
property partOfInvoice:IInvoice read Get_partOfInvoice write Set_partOfInvoice;
property discount:INumber read Get_discount write Set_discount;
property discountCurrency:String read Get_discountCurrency write Set_discountCurrency;
property orderStatus:IOrderStatus read Get_orderStatus write Set_orderStatus;
property merchant:IPerson read Get_merchant write Set_merchant;
property acceptedOffer:IOffer read Get_acceptedOffer write Set_acceptedOffer;
property discountCode:String read Get_discountCode write Set_discountCode;
property paymentUrl:String read Get_paymentUrl write Set_paymentUrl;
property orderDate:TDateTime read Get_orderDate write Set_orderDate;
property billingAddress:IPostalAddress read Get_billingAddress write Set_billingAddress;
property orderedItem:IOrderItem read Get_orderedItem write Set_orderedItem;
property orderDelivery:IParcelDelivery read Get_orderDelivery write Set_orderDelivery;
property confirmationNumber:String read Get_confirmationNumber write Set_confirmationNumber;
property isGift:Boolean read Get_isGift write Set_isGift;
property orderNumber:String read Get_orderNumber write Set_orderNumber;
end;
(*** end IOrder ***)
IPaymentStatusType=interface; //forward
IMonetaryAmount=interface; //forward
(* Invoice
A statement of the money due for goods or services; a bill.
*)
IInvoice=Interface (IIntangible)
(*The date that payment is due.*)
function Get_paymentDue:TDateTime;
procedure Set_paymentDue(v:TDateTime);
(*The name of the credit card or other method of payment for the order.*)
function Get_paymentMethod:IPaymentMethod;
procedure Set_paymentMethod(v:IPaymentMethod);
(*The minimum payment required at this time.*)
function Get_minimumPaymentDue:IPriceSpecification;
procedure Set_minimumPaymentDue(v:IPriceSpecification);
(*An identifier for the method of payment used (e.g. the last 4 digits of the
credit card).*)
function Get_paymentMethodId:String;
procedure Set_paymentMethodId(v:String);
(*The date the invoice is scheduled to be paid.*)
function Get_scheduledPaymentDate:TDateTime;
procedure Set_scheduledPaymentDate(v:TDateTime);
(*The identifier for the account the payment will be applied to.*)
function Get_accountId:String;
procedure Set_accountId(v:String);
(*The Order(s) related to this Invoice. One or more Orders may be combined into
a single Invoice.*)
function Get_referencesOrder:IOrder;
procedure Set_referencesOrder(v:IOrder);
(*The status of payment; whether the invoice has been paid or not.*)
function Get_paymentStatus:IPaymentStatusType;
procedure Set_paymentStatus(v:IPaymentStatusType);
(*Party placing the order or paying the invoice.*)
function Get_customer:IOrganization;
procedure Set_customer(v:IOrganization);
(*The total amount due.*)
function Get_totalPaymentDue:IMonetaryAmount;
procedure Set_totalPaymentDue(v:IMonetaryAmount);
(*The time interval used to compute the invoice.*)
function Get_billingPeriod:IDuration;
procedure Set_billingPeriod(v:IDuration);
// properties
property paymentDue:TDateTime read Get_paymentDue write Set_paymentDue;
property paymentMethod:IPaymentMethod read Get_paymentMethod write Set_paymentMethod;
property minimumPaymentDue:IPriceSpecification read Get_minimumPaymentDue write Set_minimumPaymentDue;
property paymentMethodId:String read Get_paymentMethodId write Set_paymentMethodId;
property scheduledPaymentDate:TDateTime read Get_scheduledPaymentDate write Set_scheduledPaymentDate;
property accountId:String read Get_accountId write Set_accountId;
property referencesOrder:IOrder read Get_referencesOrder write Set_referencesOrder;
property paymentStatus:IPaymentStatusType read Get_paymentStatus write Set_paymentStatus;
property customer:IOrganization read Get_customer write Set_customer;
property totalPaymentDue:IMonetaryAmount read Get_totalPaymentDue write Set_totalPaymentDue;
property billingPeriod:IDuration read Get_billingPeriod write Set_billingPeriod;
end;
(*** end IInvoice ***)
(* PaymentStatusType
A specific payment status. For example, PaymentDue, PaymentComplete, etc.
*)
IPaymentStatusType=Interface (IEnumeration)
function TangPaymentStatusType:TangibleValue;
end;
(*** end IPaymentStatusType ***)
(* MonetaryAmount
*)
IMonetaryAmount=Interface (IStructuredValue)
(**)
function Get_value:IStructuredValue;
procedure Set_value(v:IStructuredValue);
// properties
property value:IStructuredValue read Get_value write Set_value;
end;
(*** end IMonetaryAmount ***)
(* OrderStatus
Enumerated status values for Order.
*)
IOrderStatus=Interface (IEnumeration)
function TangOrderStatus:TangibleValue;
end;
(*** end IOrderStatus ***)
(* OrderItem
An order item is a line of an order. It includes the quantity and shipping
details of a bought offer.
*)
IOrderItem=Interface (IIntangible)
(*The number of the item ordered. If the property is not set, assume the
quantity is one.*)
function Get_orderQuantity:INumber;
procedure Set_orderQuantity(v:INumber);
(*The current status of the order item.*)
function Get_orderItemStatus:IOrderStatus;
procedure Set_orderItemStatus(v:IOrderStatus);
(*The identifier of the order item.*)
function Get_orderItemNumber:String;
procedure Set_orderItemNumber(v:String);
// properties
property orderQuantity:INumber read Get_orderQuantity write Set_orderQuantity;
property orderItemStatus:IOrderStatus read Get_orderItemStatus write Set_orderItemStatus;
property orderItemNumber:String read Get_orderItemNumber write Set_orderItemNumber;
end;
(*** end IOrderItem ***)
IDeliveryEvent=interface; //forward
(* ParcelDelivery
The delivery of a parcel either via the postal service or a commercial service.
*)
IParcelDelivery=Interface (IIntangible)
(*Shipper tracking number.*)
function Get_trackingNumber:String;
procedure Set_trackingNumber(v:String);
(*The overall order the items in this delivery were included in.*)
function Get_partOfOrder:IOrder;
procedure Set_partOfOrder(v:IOrder);
(*The earliest date the package may arrive.*)
function Get_expectedArrivalFrom:TDateTime;
procedure Set_expectedArrivalFrom(v:TDateTime);
(*Method used for delivery or shipping.*)
function Get_hasDeliveryMethod:IDeliveryMethod;
procedure Set_hasDeliveryMethod(v:IDeliveryMethod);
(*Item(s) being shipped.*)
function Get_itemShipped:IProduct;
procedure Set_itemShipped(v:IProduct);
(*Destination address.*)
function Get_deliveryAddress:IPostalAddress;
procedure Set_deliveryAddress(v:IPostalAddress);
(*New entry added as the package passes through each leg of its journey (from
shipment to final delivery).*)
function Get_deliveryStatus:IDeliveryEvent;
procedure Set_deliveryStatus(v:IDeliveryEvent);
(*Shipper's address.*)
function Get_originAddress:IPostalAddress;
procedure Set_originAddress(v:IPostalAddress);
(*Tracking url for the parcel delivery.*)
function Get_trackingUrl:String;
procedure Set_trackingUrl(v:String);
(*The latest date the package may arrive.*)
function Get_expectedArrivalUntil:TDateTime;
procedure Set_expectedArrivalUntil(v:TDateTime);
// properties
property trackingNumber:String read Get_trackingNumber write Set_trackingNumber;
property partOfOrder:IOrder read Get_partOfOrder write Set_partOfOrder;
property expectedArrivalFrom:TDateTime read Get_expectedArrivalFrom write Set_expectedArrivalFrom;
property hasDeliveryMethod:IDeliveryMethod read Get_hasDeliveryMethod write Set_hasDeliveryMethod;
property itemShipped:IProduct read Get_itemShipped write Set_itemShipped;
property deliveryAddress:IPostalAddress read Get_deliveryAddress write Set_deliveryAddress;
property deliveryStatus:IDeliveryEvent read Get_deliveryStatus write Set_deliveryStatus;
property originAddress:IPostalAddress read Get_originAddress write Set_originAddress;
property trackingUrl:String read Get_trackingUrl write Set_trackingUrl;
property expectedArrivalUntil:TDateTime read Get_expectedArrivalUntil write Set_expectedArrivalUntil;
end;
(*** end IParcelDelivery ***)
(* DeliveryEvent
An event involving the delivery of an item.
*)
IDeliveryEvent=Interface (IEvent)
(*Password, PIN, or access code needed for delivery (e.g. from a locker).*)
function Get_accessCode:String;
procedure Set_accessCode(v:String);
(*When the item is available for pickup from the store, locker, etc.*)
function Get_availableFrom:TDateTime;
procedure Set_availableFrom(v:TDateTime);
(*After this date, the item will no longer be available for pickup.*)
function Get_availableThrough:TDateTime;
procedure Set_availableThrough(v:TDateTime);
// properties
property accessCode:String read Get_accessCode write Set_accessCode;
property availableFrom:TDateTime read Get_availableFrom write Set_availableFrom;
property availableThrough:TDateTime read Get_availableThrough write Set_availableThrough;
end;
(*** end IDeliveryEvent ***)
(* PlayAction
*)
IPlayAction=Interface (IAction)
(*No atribs*)
end;
(*** end IPlayAction ***)
(* EndorseAction
An agent approves/certifies/likes/supports/sanction an object.
*)
IEndorseAction=Interface (IReactAction)
(*A sub property of participant. The person/organization being supported.*)
function Get_endorsee:IOrganization;
procedure Set_endorsee(v:IOrganization);
// properties
property endorsee:IOrganization read Get_endorsee write Set_endorsee;
end;
(*** end IEndorseAction ***)
(* DatedMoneySpecification
*)
IDatedMoneySpecification=Interface (IStructuredValue)
(**)
function Get_currency:String;
procedure Set_currency(v:String);
// properties
property currency:String read Get_currency write Set_currency;
end;
(*** end IDatedMoneySpecification ***)
(* Quotation
*)
IQuotation=Interface (ICreativeWork)
(*The (e.g. fictional) character, Person or Organization to whom the quotation
is attributed within the containing CreativeWork.*)
function Get_spokenByCharacter:IOrganization;
procedure Set_spokenByCharacter(v:IOrganization);
// properties
property spokenByCharacter:IOrganization read Get_spokenByCharacter write Set_spokenByCharacter;
end;
(*** end IQuotation ***)
(* MedicalWebPage
A web page that provides medical information.
*)
IMedicalWebPage=Interface (IWebPage)
(*An aspect of medical practice that is considered on the page, such as
'diagnosis', 'treatment', 'causes', 'prognosis', 'etiology', 'epidemiology',
etc.*)
function Get_aspect:String;
procedure Set_aspect(v:String);
// properties
property aspect:String read Get_aspect write Set_aspect;
end;
(*** end IMedicalWebPage ***)
(* OrderAction
An agent orders an object/product/service to be delivered/sent.
*)
IOrderAction=Interface (ITradeAction)
(*No atribs*)
end;
(*** end IOrderAction ***)
(* MedicalTestPanel
Any collection of tests commonly ordered together.
*)
IMedicalTestPanel=Interface (IMedicalTest)
(*A component test of the panel.*)
function Get_subTest:IMedicalTest;
procedure Set_subTest(v:IMedicalTest);
// properties
property subTest:IMedicalTest read Get_subTest write Set_subTest;
end;
(*** end IMedicalTestPanel ***)
INerve=interface; //forward
IMuscle=interface; //forward
(* Muscle
A muscle is an anatomical structure consisting of a contractile form of tissue
that animals use to effect movement.
*)
IMuscle=Interface (IAnatomicalStructure)
(*The underlying innervation associated with the muscle.*)
function Get_nerve:INerve;
procedure Set_nerve(v:INerve);
(*The place or point where a muscle arises.*)
function Get_origin:IAnatomicalStructure;
procedure Set_origin(v:IAnatomicalStructure);
(**)
function Get_action:String;
procedure Set_action(v:String);
(*The blood vessel that carries blood from the heart to the muscle.*)
function Get_bloodSupply:IVessel;
procedure Set_bloodSupply(v:IVessel);
(*The place of attachment of a muscle, or what the muscle moves.*)
function Get_insertion:IAnatomicalStructure;
procedure Set_insertion(v:IAnatomicalStructure);
(*The muscle whose action counteracts the specified muscle.*)
function Get_antagonist:IMuscle;
procedure Set_antagonist(v:IMuscle);
(*The movement the muscle generates.*)
function Get_muscleAction:String;
procedure Set_muscleAction(v:String);
// properties
property nerve:INerve read Get_nerve write Set_nerve;
property origin:IAnatomicalStructure read Get_origin write Set_origin;
property action:String read Get_action write Set_action;
property bloodSupply:IVessel read Get_bloodSupply write Set_bloodSupply;
property insertion:IAnatomicalStructure read Get_insertion write Set_insertion;
property antagonist:IMuscle read Get_antagonist write Set_antagonist;
property muscleAction:String read Get_muscleAction write Set_muscleAction;
end;
(*** end IMuscle ***)
IBrainStructure=interface; //forward
(* Nerve
A common pathway for the electrochemical nerve impulses that are transmitted
along each of the axons.
*)
INerve=Interface (IAnatomicalStructure)
(*The neurological pathway that originates the neurons.*)
function Get_sourcedFrom:IBrainStructure;
procedure Set_sourcedFrom(v:IBrainStructure);
(**)
function Get_branch:IAnatomicalStructure;
procedure Set_branch(v:IAnatomicalStructure);
(*The neurological pathway extension that involves muscle control.*)
function Get_nerveMotor:IMuscle;
procedure Set_nerveMotor(v:IMuscle);
(*The neurological pathway extension that inputs and sends information to the
brain or spinal cord.*)
function Get_sensoryUnit:IAnatomicalStructure;
procedure Set_sensoryUnit(v:IAnatomicalStructure);
// properties
property sourcedFrom:IBrainStructure read Get_sourcedFrom write Set_sourcedFrom;
property branch:IAnatomicalStructure read Get_branch write Set_branch;
property nerveMotor:IMuscle read Get_nerveMotor write Set_nerveMotor;
property sensoryUnit:IAnatomicalStructure read Get_sensoryUnit write Set_sensoryUnit;
end;
(*** end INerve ***)
(* BrainStructure
Any anatomical structure which pertains to the soft nervous tissue functioning
as the coordinating center of sensation and intellectual and nervous activity.
*)
IBrainStructure=Interface (IAnatomicalStructure)
(*No atribs*)
end;
(*** end IBrainStructure ***)
(* SendAction
*)
ISendAction=Interface (ITransferAction)
(*A sub property of instrument. The method of delivery.*)
function Get_deliveryMethod:IDeliveryMethod;
procedure Set_deliveryMethod(v:IDeliveryMethod);
// properties
property deliveryMethod:IDeliveryMethod read Get_deliveryMethod write Set_deliveryMethod;
end;
(*** end ISendAction ***)
(* PaymentChargeSpecification
The costs of settling the payment using a particular payment method.
*)
IPaymentChargeSpecification=Interface (IPriceSpecification)
(*The delivery method(s) to which the delivery charge or payment charge
specification applies.*)
function Get_appliesToDeliveryMethod:IDeliveryMethod;
procedure Set_appliesToDeliveryMethod(v:IDeliveryMethod);
(*The payment method(s) to which the payment charge specification applies.*)
function Get_appliesToPaymentMethod:IPaymentMethod;
procedure Set_appliesToPaymentMethod(v:IPaymentMethod);
// properties
property appliesToDeliveryMethod:IDeliveryMethod read Get_appliesToDeliveryMethod write Set_appliesToDeliveryMethod;
property appliesToPaymentMethod:IPaymentMethod read Get_appliesToPaymentMethod write Set_appliesToPaymentMethod;
end;
(*** end IPaymentChargeSpecification ***)
(* InfectiousAgentClass
Classes of agents or pathogens that transmit infectious diseases. Enumerated
type.
*)
IInfectiousAgentClass=Interface (IMedicalEnumeration)
function TangInfectiousAgentClass:TangibleValue;
end;
(*** end IInfectiousAgentClass ***)
(* Artery
A type of blood vessel that specifically carries blood away from the heart.
*)
IArtery=Interface (IVessel)
(*The area to which the artery supplies blood.*)
function Get_supplyTo:IAnatomicalStructure;
procedure Set_supplyTo(v:IAnatomicalStructure);
(*The anatomical or organ system that the artery originates from.*)
function Get_source:IAnatomicalStructure;
procedure Set_source(v:IAnatomicalStructure);
// properties
property supplyTo:IAnatomicalStructure read Get_supplyTo write Set_supplyTo;
property source:IAnatomicalStructure read Get_source write Set_source;
end;
(*** end IArtery ***)
(* LiveBlogPosting
A blog post intended to provide a rolling textual coverage of an ongoing event
through continuous updates.
*)
ILiveBlogPosting=Interface (IBlogPosting)
(*The time when the live blog will stop covering the Event. Note that coverage
may continue after the Event concludes.*)
function Get_coverageEndTime:TDateTime;
procedure Set_coverageEndTime(v:TDateTime);
(*An update to the LiveBlog.*)
function Get_liveBlogUpdate:IBlogPosting;
procedure Set_liveBlogUpdate(v:IBlogPosting);
(*The time when the live blog will begin covering the Event. Note that coverage
may begin before the Event's start time. The LiveBlogPosting may also be
created before coverage begins.*)
function Get_coverageStartTime:TDateTime;
procedure Set_coverageStartTime(v:TDateTime);
// properties
property coverageEndTime:TDateTime read Get_coverageEndTime write Set_coverageEndTime;
property liveBlogUpdate:IBlogPosting read Get_liveBlogUpdate write Set_liveBlogUpdate;
property coverageStartTime:TDateTime read Get_coverageStartTime write Set_coverageStartTime;
end;
(*** end ILiveBlogPosting ***)
IMedicalObservationalStudyDesign=interface; //forward
(* MedicalObservationalStudy
An observational study is a type of medical study that attempts to infer the
possible effect of a treatment through observation of a cohort of subjects over
a period of time. In an observational study, the assignment of subjects into
treatment groups versus control groups is outside the control of the
investigator. This is in contrast with controlled studies, such as the
randomized controlled trials represented by MedicalTrial, where each subject is
randomly assigned to a treatment group or a control group before the start of
the treatment.
*)
IMedicalObservationalStudy=Interface (IMedicalStudy)
(*Specifics about the observational study design (enumerated).*)
function Get_studyDesign:IMedicalObservationalStudyDesign;
procedure Set_studyDesign(v:IMedicalObservationalStudyDesign);
// properties
property studyDesign:IMedicalObservationalStudyDesign read Get_studyDesign write Set_studyDesign;
end;
(*** end IMedicalObservationalStudy ***)
(* MedicalObservationalStudyDesign
Design models for observational medical studies. Enumerated type.
*)
IMedicalObservationalStudyDesign=Interface (IMedicalEnumeration)
function TangMedicalObservationalStudyDesign:TangibleValue;
end;
(*** end IMedicalObservationalStudyDesign ***)
(* Boolean
Boolean: True or False.
*)
IBoolean=Interface
(*No atribs*)
end;
(*** end IBoolean ***)
(* SearchAction
*)
ISearchAction=Interface (IAction)
(*A sub property of instrument. The query used on this action.*)
function Get_query:String;
procedure Set_query(v:String);
// properties
property query:String read Get_query write Set_query;
end;
(*** end ISearchAction ***)
(* Role
*)
IRole=Interface (IIntangible)
(*A position played, performed or filled by a person or organization, as part
of an organization. For example, an athlete in a SportsTeam might play in the
position named 'Quarterback'.*)
function Get_namedPosition:String;
procedure Set_namedPosition(v:String);
(**)
function Get_endDate:TDateTime;
procedure Set_endDate(v:TDateTime);
// properties
property namedPosition:String read Get_namedPosition write Set_namedPosition;
property endDate:TDateTime read Get_endDate write Set_endDate;
end;
(*** end IRole ***)
(* OrganizationRole
A subclass of Role used to describe roles within organizations.
*)
IOrganizationRole=Interface (IRole)
(*A number associated with a role in an organization, for example, the number
on an athlete's jersey.*)
function Get_numberedPosition:INumber;
procedure Set_numberedPosition(v:INumber);
// properties
property numberedPosition:INumber read Get_numberedPosition write Set_numberedPosition;
end;
(*** end IOrganizationRole ***)
(* EmployeeRole
A subclass of OrganizationRole used to describe employee relationships.
*)
IEmployeeRole=Interface (IOrganizationRole)
(*The base salary of the job or of an employee in an EmployeeRole.*)
function Get_baseSalary:INumber;
procedure Set_baseSalary(v:INumber);
// properties
property baseSalary:INumber read Get_baseSalary write Set_baseSalary;
end;
(*** end IEmployeeRole ***)
(* LifestyleModification
A process of care involving exercise, changes to diet, fitness routines, and
other lifestyle changes aimed at improving a health condition.
*)
ILifestyleModification=Interface (IMedicalEntity)
(*No atribs*)
end;
(*** end ILifestyleModification ***)
IMapCategoryType=interface; //forward
(* Map
A map.
*)
IMap=Interface (ICreativeWork)
(*Indicates the kind of Map, from the MapCategoryType Enumeration.*)
function Get_mapType:IMapCategoryType;
procedure Set_mapType(v:IMapCategoryType);
// properties
property mapType:IMapCategoryType read Get_mapType write Set_mapType;
end;
(*** end IMap ***)
(* MapCategoryType
An enumeration of several kinds of Map.
*)
IMapCategoryType=Interface (IEnumeration)
function TangMapCategoryType:TangibleValue;
end;
(*** end IMapCategoryType ***)
IRsvpResponseType=interface; //forward
(* RsvpAction
The act of notifying an event organizer as to whether you expect to attend the
event.
*)
IRsvpAction=Interface (IInformAction)
(*The response (yes, no, maybe) to the RSVP.*)
function Get_rsvpResponse:IRsvpResponseType;
procedure Set_rsvpResponse(v:IRsvpResponseType);
(*Comments, typically from users.*)
function Get_comment:IComment;
procedure Set_comment(v:IComment);
(*If responding yes, the number of guests who will attend in addition to the
invitee.*)
function Get_additionalNumberOfGuests:INumber;
procedure Set_additionalNumberOfGuests(v:INumber);
// properties
property rsvpResponse:IRsvpResponseType read Get_rsvpResponse write Set_rsvpResponse;
property comment:IComment read Get_comment write Set_comment;
property additionalNumberOfGuests:INumber read Get_additionalNumberOfGuests write Set_additionalNumberOfGuests;
end;
(*** end IRsvpAction ***)
(* RsvpResponseType
RsvpResponseType is an enumeration type whose instances represent responding to
an RSVP request.
*)
IRsvpResponseType=Interface (IEnumeration)
function TangRsvpResponseType:TangibleValue;
end;
(*** end IRsvpResponseType ***)
(* Energy
Properties that take Energy as values are of the form '&lt;Number&gt;
&lt;Energy unit of measure&gt;'.
*)
IEnergy=Interface (IQuantity)
function TangEnergy:TangibleValue;
end;
(*** end IEnergy ***)
(* WarrantyScope
*)
IWarrantyScope=Interface (IEnumeration)
function TangWarrantyScope:TangibleValue;
end;
(*** end IWarrantyScope ***)
(* FoodEvent
Event type: Food event.
*)
IFoodEvent=Interface (IEvent)
(*No atribs*)
end;
(*** end IFoodEvent ***)
(* LendAction
*)
ILendAction=Interface (ITransferAction)
(*A sub property of participant. The person that borrows the object being
lent.*)
function Get_borrower:IPerson;
procedure Set_borrower(v:IPerson);
// properties
property borrower:IPerson read Get_borrower write Set_borrower;
end;
(*** end ILendAction ***)
(* Game
The Game type represents things which are games. These are typically
rule-governed recreational activities, e.g. role-playing games in which players
assume the role of characters in a fictional setting.
*)
IGame=Interface (ICreativeWork)
(*A piece of data that represents a particular aspect of a fictional character
(skill, power, character points, advantage, disadvantage).*)
function Get_characterAttribute:IThing;
procedure Set_characterAttribute(v:IThing);
// properties
property characterAttribute:IThing read Get_characterAttribute write Set_characterAttribute;
end;
(*** end IGame ***)
(* Corporation
Organization: A business corporation.
*)
ICorporation=Interface (IOrganization)
(*The exchange traded instrument associated with a Corporation object. The
tickerSymbol is expressed as an exchange and an instrument name separated by a
space character. For the exchange component of the tickerSymbol attribute, we
reccommend using the controlled vocaulary of Market Identifier Codes (MIC)
specified in ISO15022.*)
function Get_tickerSymbol:String;
procedure Set_tickerSymbol(v:String);
// properties
property tickerSymbol:String read Get_tickerSymbol write Set_tickerSymbol;
end;
(*** end ICorporation ***)
IProperty=interface; //forward
IClass=interface; //forward
(* Property
A property, used to indicate attributes and relationships of some Thing;
equivalent to rdf:Property.
*)
IProperty=Interface (IIntangible)
(*Relates a term (i.e. a property, class or enumeration) to one that supersedes
it.*)
function Get_supersededBy:IEnumeration;
procedure Set_supersededBy(v:IEnumeration);
(*Relates a property to a property that is its inverse. Inverse properties
relate the same pairs of items to each other, but in reversed direction. For
example, the 'alumni' and 'alumniOf' properties are inverseOf each other. Some
properties don't have explicit inverses; in these situations RDFa and JSON-LD
syntax for reverse properties can be used.*)
function Get_inverseOf:IProperty;
procedure Set_inverseOf(v:IProperty);
(*Relates a property to a class that is (one of) the type(s) the property is
expected to be used on.*)
function Get_domainIncludes:IClass;
procedure Set_domainIncludes(v:IClass);
(*Relates a property to a class that constitutes (one of) the expected type(s)
for values of the property.*)
function Get_rangeIncludes:IClass;
procedure Set_rangeIncludes(v:IClass);
// properties
property supersededBy:IEnumeration read Get_supersededBy write Set_supersededBy;
property inverseOf:IProperty read Get_inverseOf write Set_inverseOf;
property domainIncludes:IClass read Get_domainIncludes write Set_domainIncludes;
property rangeIncludes:IClass read Get_rangeIncludes write Set_rangeIncludes;
end;
(*** end IProperty ***)
(* Class
A class, also often called a 'Type'; equivalent to rdfs:Class.
*)
IClass=Interface (IIntangible)
function TangClass:TangibleValue;
end;
(*** end IClass ***)
ISportsEvent=interface; //forward
IDiet=interface; //forward
(* ExerciseAction
The act of participating in exertive activity for the purposes of improving
health and fitness.
*)
IExerciseAction=Interface (IPlayAction)
(*A sub property of location. The original location of the object or the agent
before the action.*)
function Get_fromLocation:IPlace;
procedure Set_fromLocation(v:IPlace);
(*A sub property of location. The course where this action was taken.*)
function Get_course:IPlace;
procedure Set_course(v:IPlace);
(*A sub property of participant. The sports team that participated on this
action.*)
function Get_sportsTeam:ISportsTeam;
procedure Set_sportsTeam(v:ISportsTeam);
(*The distance travelled, e.g. exercising or travelling.*)
function Get_distance:IDistance;
procedure Set_distance(v:IDistance);
(*A sub property of location. The sports activity location where this action
occurred.*)
function Get_sportsActivityLocation:ISportsActivityLocation;
procedure Set_sportsActivityLocation(v:ISportsActivityLocation);
(*A sub property of participant. The opponent on this action.*)
function Get_opponent:IPerson;
procedure Set_opponent(v:IPerson);
(*A sub property of location. The sports event where this action occurred.*)
function Get_sportsEvent:ISportsEvent;
procedure Set_sportsEvent(v:ISportsEvent);
(*A sub property of instrument. The exercise plan used on this action.*)
function Get_exercisePlan:IExercisePlan;
procedure Set_exercisePlan(v:IExercisePlan);
(*A sub property of instrument. The diet used in this action.*)
function Get_diet:IDiet;
procedure Set_diet(v:IDiet);
(*A sub property of instrument. The diet used in this action.*)
function Get_exerciseRelatedDiet:IDiet;
procedure Set_exerciseRelatedDiet(v:IDiet);
(*Type(s) of exercise or activity, such as strength training, flexibility
training, aerobics, cardiac rehabilitation, etc.*)
function Get_exerciseType:String;
procedure Set_exerciseType(v:String);
// properties
property fromLocation:IPlace read Get_fromLocation write Set_fromLocation;
property course:IPlace read Get_course write Set_course;
property sportsTeam:ISportsTeam read Get_sportsTeam write Set_sportsTeam;
property distance:IDistance read Get_distance write Set_distance;
property sportsActivityLocation:ISportsActivityLocation read Get_sportsActivityLocation write Set_sportsActivityLocation;
property opponent:IPerson read Get_opponent write Set_opponent;
property sportsEvent:ISportsEvent read Get_sportsEvent write Set_sportsEvent;
property exercisePlan:IExercisePlan read Get_exercisePlan write Set_exercisePlan;
property diet:IDiet read Get_diet write Set_diet;
property exerciseRelatedDiet:IDiet read Get_exerciseRelatedDiet write Set_exerciseRelatedDiet;
property exerciseType:String read Get_exerciseType write Set_exerciseType;
end;
(*** end IExerciseAction ***)
(* SportsEvent
Event type: Sports event.
*)
ISportsEvent=Interface (IEvent)
(*The home team in a sports event.*)
function Get_homeTeam:ISportsTeam;
procedure Set_homeTeam(v:ISportsTeam);
(*The away team in a sports event.*)
function Get_awayTeam:IPerson;
procedure Set_awayTeam(v:IPerson);
// properties
property homeTeam:ISportsTeam read Get_homeTeam write Set_homeTeam;
property awayTeam:IPerson read Get_awayTeam write Set_awayTeam;
end;
(*** end ISportsEvent ***)
(* Diet
A strategy of regulating the intake of food to achieve or maintain a specific
health-related goal.
*)
IDiet=Interface (ICreativeWork)
(*Nutritional information specific to the dietary plan. May include dietary
recommendations on what foods to avoid, what foods to consume, and specific
alterations/deviations from the USDA or other regulatory body's approved
dietary guidelines.*)
function Get_dietFeatures:String;
procedure Set_dietFeatures(v:String);
(*Medical expert advice related to the plan.*)
function Get_expertConsiderations:String;
procedure Set_expertConsiderations(v:String);
(*Descriptive information establishing the overarching theory/philosophy of the
plan. May include the rationale for the name, the population where the plan
first came to prominence, etc.*)
function Get_overview:String;
procedure Set_overview(v:String);
(*People or organizations that endorse the plan.*)
function Get_endorsers:IOrganization;
procedure Set_endorsers(v:IOrganization);
(*Specific physiologic risks associated to the diet plan.*)
function Get_risks:String;
procedure Set_risks(v:String);
(*Specific physiologic benefits associated to the plan.*)
function Get_physiologicalBenefits:String;
procedure Set_physiologicalBenefits(v:String);
// properties
property dietFeatures:String read Get_dietFeatures write Set_dietFeatures;
property expertConsiderations:String read Get_expertConsiderations write Set_expertConsiderations;
property overview:String read Get_overview write Set_overview;
property endorsers:IOrganization read Get_endorsers write Set_endorsers;
property risks:String read Get_risks write Set_risks;
property physiologicalBenefits:String read Get_physiologicalBenefits write Set_physiologicalBenefits;
end;
(*** end IDiet ***)
(* Audiobook
An audiobook.
*)
IAudiobook=Interface (IAudioObject)
(*A person who reads (performs) the audiobook.*)
function Get_readBy:IPerson;
procedure Set_readBy(v:IPerson);
// properties
property readBy:IPerson read Get_readBy write Set_readBy;
end;
(*** end IAudiobook ***)
IBookFormatType=interface; //forward
(* Book
A book.
*)
IBook=Interface (ICreativeWork)
(*Indicates whether the book is an abridged edition.*)
function Get_abridged:Boolean;
procedure Set_abridged(v:Boolean);
(*The ISBN of the book.*)
function Get_isbn:String;
procedure Set_isbn(v:String);
(*The format of the book.*)
function Get_bookFormat:IBookFormatType;
procedure Set_bookFormat(v:IBookFormatType);
(*The edition of the book.*)
function Get_bookEdition:String;
procedure Set_bookEdition(v:String);
(*The number of pages in the book.*)
function Get_numberOfPages:Integer;
procedure Set_numberOfPages(v:Integer);
(*The illustrator of the book.*)
function Get_illustrator:IPerson;
procedure Set_illustrator(v:IPerson);
// properties
property abridged:Boolean read Get_abridged write Set_abridged;
property isbn:String read Get_isbn write Set_isbn;
property bookFormat:IBookFormatType read Get_bookFormat write Set_bookFormat;
property bookEdition:String read Get_bookEdition write Set_bookEdition;
property numberOfPages:Integer read Get_numberOfPages write Set_numberOfPages;
property illustrator:IPerson read Get_illustrator write Set_illustrator;
end;
(*** end IBook ***)
(* BookFormatType
The publication format of the book.
*)
IBookFormatType=Interface (IEnumeration)
function TangBookFormatType:TangibleValue;
end;
(*** end IBookFormatType ***)
(* BroadcastEvent
An over the air or online broadcast event.
*)
IBroadcastEvent=Interface (IPublicationEvent)
(*The event being broadcast such as a sporting event or awards ceremony.*)
function Get_broadcastOfEvent:IEvent;
procedure Set_broadcastOfEvent(v:IEvent);
(*True is the broadcast is of a live event.*)
function Get_isLiveBroadcast:Boolean;
procedure Set_isLiveBroadcast(v:Boolean);
// properties
property broadcastOfEvent:IEvent read Get_broadcastOfEvent write Set_broadcastOfEvent;
property isLiveBroadcast:Boolean read Get_isLiveBroadcast write Set_isLiveBroadcast;
end;
(*** end IBroadcastEvent ***)
(* WarrantyPromise
A structured value representing the duration and scope of services that will be
provided to a customer free of charge in case of a defect or malfunction of a
product.
*)
IWarrantyPromise=Interface (IStructuredValue)
(*The scope of the warranty promise.*)
function Get_warrantyScope:IWarrantyScope;
procedure Set_warrantyScope(v:IWarrantyScope);
(*The duration of the warranty promise. Common unitCode values are ANN for
year, MON for months, or DAY for days.*)
function Get_durationOfWarranty:IQuantitativeValue;
procedure Set_durationOfWarranty(v:IQuantitativeValue);
// properties
property warrantyScope:IWarrantyScope read Get_warrantyScope write Set_warrantyScope;
property durationOfWarranty:IQuantitativeValue read Get_durationOfWarranty write Set_durationOfWarranty;
end;
(*** end IWarrantyPromise ***)
(* DataFeedItem
A single item within a larger data feed.
*)
IDataFeedItem=Interface (IIntangible)
(*The datetime the item was removed from the DataFeed.*)
function Get_dateDeleted:TDateTime;
procedure Set_dateDeleted(v:TDateTime);
(*The date on which the CreativeWork was created or the item was added to a
DataFeed.*)
function Get_dateCreated:TDateTime;
procedure Set_dateCreated(v:TDateTime);
(*The date on which the CreativeWork was most recently modified or when the
item's entry was modified within a DataFeed.*)
function Get_dateModified:TDateTime;
procedure Set_dateModified(v:TDateTime);
// properties
property dateDeleted:TDateTime read Get_dateDeleted write Set_dateDeleted;
property dateCreated:TDateTime read Get_dateCreated write Set_dateCreated;
property dateModified:TDateTime read Get_dateModified write Set_dateModified;
end;
(*** end IDataFeedItem ***)
(* Chapter
One of the sections into which a book is divided. A chapter usually has a
section number or a name.
*)
IChapter=Interface (ICreativeWork)
(*No atribs*)
end;
(*** end IChapter ***)
IGameServerStatus=interface; //forward
(* GameServer
Server that provides game interaction in a multiplayer game.
*)
IGameServer=Interface (IIntangible)
(*Number of players on the server.*)
function Get_playersOnline:Integer;
procedure Set_playersOnline(v:Integer);
(*Status of a game server.*)
function Get_serverStatus:IGameServerStatus;
procedure Set_serverStatus(v:IGameServerStatus);
// properties
property playersOnline:Integer read Get_playersOnline write Set_playersOnline;
property serverStatus:IGameServerStatus read Get_serverStatus write Set_serverStatus;
end;
(*** end IGameServer ***)
(* GameServerStatus
Status of a game server.
*)
IGameServerStatus=Interface (IEnumeration)
function TangGameServerStatus:TangibleValue;
end;
(*** end IGameServerStatus ***)
(* OwnershipInfo
A structured value providing information about when a certain organization or
person owned a certain product.
*)
IOwnershipInfo=Interface (IStructuredValue)
(*The date and time of giving up ownership on the product.*)
function Get_ownedThrough:TDateTime;
procedure Set_ownedThrough(v:TDateTime);
(*The date and time of obtaining the product.*)
function Get_ownedFrom:TDateTime;
procedure Set_ownedFrom(v:TDateTime);
(*The organization or person from which the product was acquired.*)
function Get_acquiredFrom:IPerson;
procedure Set_acquiredFrom(v:IPerson);
// properties
property ownedThrough:TDateTime read Get_ownedThrough write Set_ownedThrough;
property ownedFrom:TDateTime read Get_ownedFrom write Set_ownedFrom;
property acquiredFrom:IPerson read Get_acquiredFrom write Set_acquiredFrom;
end;
(*** end IOwnershipInfo ***)
(* TrackAction
*)
ITrackAction=Interface (IFindAction)
(*No atribs*)
end;
(*** end ITrackAction ***)
(* TaxiReservation
*)
ITaxiReservation=Interface (IReservation)
(*Number of people the reservation should accommodate.*)
function Get_partySize:Integer;
procedure Set_partySize(v:Integer);
(*Where a taxi will pick up a passenger or a rental car can be picked up.*)
function Get_pickupLocation:IPlace;
procedure Set_pickupLocation(v:IPlace);
(*When a taxi will pickup a passenger or a rental car can be picked up.*)
function Get_pickupTime:TDateTime;
procedure Set_pickupTime(v:TDateTime);
// properties
property partySize:Integer read Get_partySize write Set_partySize;
property pickupLocation:IPlace read Get_pickupLocation write Set_pickupLocation;
property pickupTime:TDateTime read Get_pickupTime write Set_pickupTime;
end;
(*** end ITaxiReservation ***)
(* JoinAction
*)
IJoinAction=Interface (IInteractAction)
(*No atribs*)
end;
(*** end IJoinAction ***)
(* HealthPlanCostSharingSpecification
A description of costs to the patient under a given network or formulary.
*)
IHealthPlanCostSharingSpecification=Interface (IIntangible)
(*Whether The copay amount.*)
function Get_healthPlanCopay:IPriceSpecification;
procedure Set_healthPlanCopay(v:IPriceSpecification);
(*The category or type of pharmacy associated with this cost sharing.*)
function Get_healthPlanPharmacyCategory:String;
procedure Set_healthPlanPharmacyCategory(v:String);
(*Whether the coinsurance applies before or after deductible, etc. TODO: Is
this a closed set?*)
function Get_healthPlanCoinsuranceOption:String;
procedure Set_healthPlanCoinsuranceOption(v:String);
(*Whether The rate of coinsurance expressed as a number between 0.0 and 1.0.*)
function Get_healthPlanCoinsuranceRate:INumber;
procedure Set_healthPlanCoinsuranceRate(v:INumber);
(*Whether the copay is before or after deductible, etc. TODO: Is this a closed
set?*)
function Get_healthPlanCopayOption:String;
procedure Set_healthPlanCopayOption(v:String);
// properties
property healthPlanCopay:IPriceSpecification read Get_healthPlanCopay write Set_healthPlanCopay;
property healthPlanPharmacyCategory:String read Get_healthPlanPharmacyCategory write Set_healthPlanPharmacyCategory;
property healthPlanCoinsuranceOption:String read Get_healthPlanCoinsuranceOption write Set_healthPlanCoinsuranceOption;
property healthPlanCoinsuranceRate:INumber read Get_healthPlanCoinsuranceRate write Set_healthPlanCoinsuranceRate;
property healthPlanCopayOption:String read Get_healthPlanCopayOption write Set_healthPlanCopayOption;
end;
(*** end IHealthPlanCostSharingSpecification ***)
(* PerformAction
The act of participating in performance arts.
*)
IPerformAction=Interface (IPlayAction)
(*A sub property of location. The entertainment business where the action
occurred.*)
function Get_entertainmentBusiness:IEntertainmentBusiness;
procedure Set_entertainmentBusiness(v:IEntertainmentBusiness);
// properties
property entertainmentBusiness:IEntertainmentBusiness read Get_entertainmentBusiness write Set_entertainmentBusiness;
end;
(*** end IPerformAction ***)
(* ClaimReview
A fact-checking review of claims made (or reported) in some creative work
(referenced via itemReviewed).
*)
IClaimReview=Interface (IReview)
(*A short summary of the specific claims reviewed in a ClaimReview.*)
function Get_claimReviewed:String;
procedure Set_claimReviewed(v:String);
// properties
property claimReviewed:String read Get_claimReviewed write Set_claimReviewed;
end;
(*** end IClaimReview ***)
(* CarUsageType
A value indicating a special usage of a car, e.g. commercial rental, driving
school, or as a taxi.
*)
ICarUsageType=Interface (IQualitativeValue)
function TangCarUsageType:TangibleValue;
end;
(*** end ICarUsageType ***)
ITVSeries=interface; //forward
(* TVEpisode
A TV episode which can be part of a series or season.
*)
ITVEpisode=Interface (IEpisode)
(*The TV series to which this episode or season belongs.*)
function Get_partOfTVSeries:ITVSeries;
procedure Set_partOfTVSeries(v:ITVSeries);
// properties
property partOfTVSeries:ITVSeries read Get_partOfTVSeries write Set_partOfTVSeries;
end;
(*** end ITVEpisode ***)
(* TVSeries
CreativeWorkSeries dedicated to TV broadcast and associated online delivery.
*)
ITVSeries=Interface (ICreativeWorkSeries)
(*A season in a media series.*)
function Get_seasons:ICreativeWorkSeason;
procedure Set_seasons(v:ICreativeWorkSeason);
(*The trailer of a movie or tv/radio series, season, episode, etc.*)
function Get_trailer:IVideoObject;
procedure Set_trailer(v:IVideoObject);
(*The production company or studio responsible for the item e.g. series, video
game, episode etc.*)
function Get_productionCompany:IOrganization;
procedure Set_productionCompany(v:IOrganization);
(*A season that is part of the media series.*)
function Get_containsSeason:ICreativeWorkSeason;
procedure Set_containsSeason(v:ICreativeWorkSeason);
// properties
property seasons:ICreativeWorkSeason read Get_seasons write Set_seasons;
property trailer:IVideoObject read Get_trailer write Set_trailer;
property productionCompany:IOrganization read Get_productionCompany write Set_productionCompany;
property containsSeason:ICreativeWorkSeason read Get_containsSeason write Set_containsSeason;
end;
(*** end ITVSeries ***)
(* Thesis
A thesis or dissertation document submitted in support of candidature for an
academic degree or professional qualification.
*)
IThesis=Interface (ICreativeWork)
(*Qualification, candidature, degree, application that Thesis supports.*)
function Get_inSupportOf:String;
procedure Set_inSupportOf(v:String);
// properties
property inSupportOf:String read Get_inSupportOf write Set_inSupportOf;
end;
(*** end IThesis ***)
(* GovernmentService
A service provided by a government organization, e.g. food stamps, veterans
benefits, etc.
*)
IGovernmentService=Interface (IService)
(*The operating organization, if different from the provider. This enables the
representation of services that are provided by an organization, but operated
by another organization like a subcontractor.*)
function Get_serviceOperator:IOrganization;
procedure Set_serviceOperator(v:IOrganization);
// properties
property serviceOperator:IOrganization read Get_serviceOperator write Set_serviceOperator;
end;
(*** end IGovernmentService ***)
(* BedDetails
*)
IBedDetails=Interface (IIntangible)
(*The type of bed to which the BedDetail refers, i.e. the type of bed available
in the quantity indicated by quantity.*)
function Get_typeOfBed:String;
procedure Set_typeOfBed(v:String);
(*The quantity of the given bed type available in the HotelRoom, Suite, House,
or Apartment.*)
function Get_numberOfBeds:INumber;
procedure Set_numberOfBeds(v:INumber);
// properties
property typeOfBed:String read Get_typeOfBed write Set_typeOfBed;
property numberOfBeds:INumber read Get_numberOfBeds write Set_numberOfBeds;
end;
(*** end IBedDetails ***)
(* DeliveryChargeSpecification
The price for the delivery of an offer using a particular delivery method.
*)
IDeliveryChargeSpecification=Interface (IPriceSpecification)
(**)
function Get_eligibleRegion:IGeoShape;
procedure Set_eligibleRegion(v:IGeoShape);
// properties
property eligibleRegion:IGeoShape read Get_eligibleRegion write Set_eligibleRegion;
end;
(*** end IDeliveryChargeSpecification ***)
(* MedicalAudience
Target audiences for medical web pages. Enumerated type.
*)
IMedicalAudience=Interface (IAudience)
function TangMedicalAudience:TangibleValue;
end;
(*** end IMedicalAudience ***)
(* MedicalRiskScore
A simple system that adds up the number of risk factors to yield a score that
is associated with prognosis, e.g. CHAD score, TIMI risk score.
*)
IMedicalRiskScore=Interface (IMedicalRiskEstimator)
(*The algorithm or rules to follow to compute the score.*)
function Get_algorithm:String;
procedure Set_algorithm(v:String);
// properties
property algorithm:String read Get_algorithm write Set_algorithm;
end;
(*** end IMedicalRiskScore ***)
(* PeopleAudience
A set of characteristics belonging to people, e.g. who compose an item's target
audience.
*)
IPeopleAudience=Interface (IAudience)
(*Audiences defined by a person's minimum age.*)
function Get_requiredMinAge:Integer;
procedure Set_requiredMinAge(v:Integer);
(*Audiences defined by a person's maximum age.*)
function Get_requiredMaxAge:Integer;
procedure Set_requiredMaxAge(v:Integer);
(*Audiences defined by a person's gender.*)
function Get_requiredGender:String;
procedure Set_requiredGender(v:String);
(*The gender of the person or audience.*)
function Get_suggestedGender:String;
procedure Set_suggestedGender(v:String);
(*Minimal age recommended for viewing content.*)
function Get_suggestedMinAge:INumber;
procedure Set_suggestedMinAge(v:INumber);
(*Maximal age recommended for viewing content.*)
function Get_suggestedMaxAge:INumber;
procedure Set_suggestedMaxAge(v:INumber);
// properties
property requiredMinAge:Integer read Get_requiredMinAge write Set_requiredMinAge;
property requiredMaxAge:Integer read Get_requiredMaxAge write Set_requiredMaxAge;
property requiredGender:String read Get_requiredGender write Set_requiredGender;
property suggestedGender:String read Get_suggestedGender write Set_suggestedGender;
property suggestedMinAge:INumber read Get_suggestedMinAge write Set_suggestedMinAge;
property suggestedMaxAge:INumber read Get_suggestedMaxAge write Set_suggestedMaxAge;
end;
(*** end IPeopleAudience ***)
(* ParentAudience
A set of characteristics describing parents, who can be interested in viewing
some content.
*)
IParentAudience=Interface (IPeopleAudience)
(*Maximal age of the child.*)
function Get_childMaxAge:INumber;
procedure Set_childMaxAge(v:INumber);
(*Minimal age of the child.*)
function Get_childMinAge:INumber;
procedure Set_childMinAge(v:INumber);
// properties
property childMaxAge:INumber read Get_childMaxAge write Set_childMaxAge;
property childMinAge:INumber read Get_childMinAge write Set_childMinAge;
end;
(*** end IParentAudience ***)
(* BorrowAction
*)
IBorrowAction=Interface (ITransferAction)
(*A sub property of participant. The person that lends the object being
borrowed.*)
function Get_lender:IPerson;
procedure Set_lender(v:IPerson);
// properties
property lender:IPerson read Get_lender write Set_lender;
end;
(*** end IBorrowAction ***)
IRecommendedDoseSchedule=interface; //forward
(* DietarySupplement
A product taken by mouth that contains a dietary ingredient intended to
supplement the diet. Dietary ingredients may include vitamins, minerals, herbs
or other botanicals, amino acids, and substances such as enzymes, organ
tissues, glandulars and metabolites.
*)
IDietarySupplement=Interface (ISubstance)
(*The generic name of this drug or supplement.*)
function Get_nonProprietaryName:String;
procedure Set_nonProprietaryName(v:String);
(*Descriptive information establishing a historical perspective on the
supplement. May include the rationale for the name, the population where the
supplement first came to prominence, etc.*)
function Get_background:String;
procedure Set_background(v:String);
(*True if this item's name is a proprietary/brand name (vs. generic name).*)
function Get_isProprietary:Boolean;
procedure Set_isProprietary(v:Boolean);
(*Recommended intake of this supplement for a given population as defined by a
specific recommending authority.*)
function Get_recommendedIntake:IRecommendedDoseSchedule;
procedure Set_recommendedIntake(v:IRecommendedDoseSchedule);
(*The specific biochemical interaction through which this drug or supplement
produces its pharmacological effect.*)
function Get_mechanismOfAction:String;
procedure Set_mechanismOfAction(v:String);
(*Characteristics of the population for which this is intended, or which
typically uses it, e.g. 'adults'.*)
function Get_targetPopulation:String;
procedure Set_targetPopulation(v:String);
(*Any potential safety concern associated with the supplement. May include
interactions with other drugs and foods, pregnancy, breastfeeding, known
adverse reactions, and documented efficacy of the supplement.*)
function Get_safetyConsideration:String;
procedure Set_safetyConsideration(v:String);
(*The manufacturer of the product.*)
function Get_manufacturer:IOrganization;
procedure Set_manufacturer(v:IOrganization);
// properties
property nonProprietaryName:String read Get_nonProprietaryName write Set_nonProprietaryName;
property background:String read Get_background write Set_background;
property isProprietary:Boolean read Get_isProprietary write Set_isProprietary;
property recommendedIntake:IRecommendedDoseSchedule read Get_recommendedIntake write Set_recommendedIntake;
property mechanismOfAction:String read Get_mechanismOfAction write Set_mechanismOfAction;
property targetPopulation:String read Get_targetPopulation write Set_targetPopulation;
property safetyConsideration:String read Get_safetyConsideration write Set_safetyConsideration;
property manufacturer:IOrganization read Get_manufacturer write Set_manufacturer;
end;
(*** end IDietarySupplement ***)
(* RecommendedDoseSchedule
A recommended dosing schedule for a drug or supplement as prescribed or
recommended by an authority or by the drug/supplement's manufacturer. Capture
the recommending authority in the recognizingAuthority property of
MedicalEntity.
*)
IRecommendedDoseSchedule=Interface (IDoseSchedule)
(*No atribs*)
end;
(*** end IRecommendedDoseSchedule ***)
(* BuyAction
The act of giving money to a seller in exchange for goods or services rendered.
An agent buys an object, product, or service from a seller for a price.
Reciprocal of SellAction.
*)
IBuyAction=Interface (ITradeAction)
(*The warranty promise(s) included in the offer.*)
function Get_warrantyPromise:IWarrantyPromise;
procedure Set_warrantyPromise(v:IWarrantyPromise);
(*'vendor' is an earlier term for 'seller'.*)
function Get_vendor:IOrganization;
procedure Set_vendor(v:IOrganization);
// properties
property warrantyPromise:IWarrantyPromise read Get_warrantyPromise write Set_warrantyPromise;
property vendor:IOrganization read Get_vendor write Set_vendor;
end;
(*** end IBuyAction ***)
IRealEstateAgent=interface; //forward
(* RentAction
The act of giving money in return for temporary use, but not ownership, of an
object such as a vehicle or property. For example, an agent rents a property
from a landlord in exchange for a periodic payment.
*)
IRentAction=Interface (ITradeAction)
(*A sub property of participant. The real estate agent involved in the action.*)
function Get_realEstateAgent:IRealEstateAgent;
procedure Set_realEstateAgent(v:IRealEstateAgent);
(*A sub property of participant. The owner of the real estate property.*)
function Get_landlord:IPerson;
procedure Set_landlord(v:IPerson);
// properties
property realEstateAgent:IRealEstateAgent read Get_realEstateAgent write Set_realEstateAgent;
property landlord:IPerson read Get_landlord write Set_landlord;
end;
(*** end IRentAction ***)
(* RealEstateAgent
A real-estate agent.
*)
IRealEstateAgent=Interface (ILocalBusiness)
(*No atribs*)
end;
(*** end IRealEstateAgent ***)
(* MedicalDevicePurpose
Categories of medical devices, organized by the purpose or intended use of the
device.
*)
IMedicalDevicePurpose=Interface (IMedicalEnumeration)
function TangMedicalDevicePurpose:TangibleValue;
end;
(*** end IMedicalDevicePurpose ***)
(* Report
A Report generated by governmental or non-governmental organization.
*)
IReport=Interface (IArticle)
(*The number or other unique designator assigned to a Report by the publishing
organization.*)
function Get_reportNumber:String;
procedure Set_reportNumber(v:String);
// properties
property reportNumber:String read Get_reportNumber write Set_reportNumber;
end;
(*** end IReport ***)
(* TechArticle
A technical article - Example: How-to (task) topics, step-by-step, procedural
troubleshooting, specifications, etc.
*)
ITechArticle=Interface (IArticle)
(*Prerequisites needed to fulfill steps in article.*)
function Get_dependencies:String;
procedure Set_dependencies(v:String);
(*Proficiency needed for this content; expected values: 'Beginner', 'Expert'.*)
function Get_proficiencyLevel:String;
procedure Set_proficiencyLevel(v:String);
// properties
property dependencies:String read Get_dependencies write Set_dependencies;
property proficiencyLevel:String read Get_proficiencyLevel write Set_proficiencyLevel;
end;
(*** end ITechArticle ***)
(* Integer
Data type: Integer.
*)
IInteger=Interface (INumber)
(*No atribs*)
end;
(*** end IInteger ***)
(* MedicalGuidelineRecommendation
A guideline recommendation that is regarded as efficacious and where quality of
the data supporting the recommendation is sound.
*)
IMedicalGuidelineRecommendation=Interface (IMedicalGuideline)
(*Strength of the guideline's recommendation (e.g. 'class I').*)
function Get_recommendationStrength:String;
procedure Set_recommendationStrength(v:String);
// properties
property recommendationStrength:String read Get_recommendationStrength write Set_recommendationStrength;
end;
(*** end IMedicalGuidelineRecommendation ***)
(* FollowAction
*)
IFollowAction=Interface (IInteractAction)
(*A sub property of object. The person or organization being followed.*)
function Get_followee:IOrganization;
procedure Set_followee(v:IOrganization);
// properties
property followee:IOrganization read Get_followee write Set_followee;
end;
(*** end IFollowAction ***)
(* TipAction
The act of giving money voluntarily to a beneficiary in recognition of services
rendered.
*)
ITipAction=Interface (ITradeAction)
(*No atribs*)
end;
(*** end ITipAction ***)
(* BusinessAudience
A set of characteristics belonging to businesses, e.g. who compose an item's
target audience.
*)
IBusinessAudience=Interface (IAudience)
(*The age of the business.*)
function Get_yearsInOperation:IQuantitativeValue;
procedure Set_yearsInOperation(v:IQuantitativeValue);
(*The size of the business in annual revenue.*)
function Get_yearlyRevenue:IQuantitativeValue;
procedure Set_yearlyRevenue(v:IQuantitativeValue);
(*The number of employees in an organization e.g. business.*)
function Get_numberOfEmployees:IQuantitativeValue;
procedure Set_numberOfEmployees(v:IQuantitativeValue);
// properties
property yearsInOperation:IQuantitativeValue read Get_yearsInOperation write Set_yearsInOperation;
property yearlyRevenue:IQuantitativeValue read Get_yearlyRevenue write Set_yearlyRevenue;
property numberOfEmployees:IQuantitativeValue read Get_numberOfEmployees write Set_numberOfEmployees;
end;
(*** end IBusinessAudience ***)
IListItem=interface; //forward
(* ListItem
An list item, e.g. a step in a checklist or how-to description.
*)
IListItem=Interface (IIntangible)
(*An entity represented by an entry in a list or data feed (e.g. an 'artist' in
a list of 'artists')’.*)
function Get_item:IThing;
procedure Set_item(v:IThing);
(*A link to the ListItem that preceeds the current one.*)
function Get_previousItem:IListItem;
procedure Set_previousItem(v:IListItem);
(*A link to the ListItem that follows the current one.*)
function Get_nextItem:IListItem;
procedure Set_nextItem(v:IListItem);
// properties
property item:IThing read Get_item write Set_item;
property previousItem:IListItem read Get_previousItem write Set_previousItem;
property nextItem:IListItem read Get_nextItem write Set_nextItem;
end;
(*** end IListItem ***)
(* PhysicalActivity
Any bodily activity that enhances or maintains physical fitness and overall
health and wellness. Includes activity that is part of daily living and
routine, structured exercise, and exercise prescribed as part of a medical
treatment or recovery plan.
*)
IPhysicalActivity=Interface (ILifestyleModification)
(*The characteristics of associated patients, such as age, gender, race etc.*)
function Get_epidemiology:String;
procedure Set_epidemiology(v:String);
// properties
property epidemiology:String read Get_epidemiology write Set_epidemiology;
end;
(*** end IPhysicalActivity ***)
(* APIReference
Reference documentation for application programming interfaces (APIs).
*)
IAPIReference=Interface (ITechArticle)
(*Associated product/technology version. e.g., .NET Framework 4.5.*)
function Get_assemblyVersion:String;
procedure Set_assemblyVersion(v:String);
(*Indicates whether API is managed or unmanaged.*)
function Get_programmingModel:String;
procedure Set_programmingModel(v:String);
(*Type of app development: phone, Metro style, desktop, XBox, etc.*)
function Get_targetPlatform:String;
procedure Set_targetPlatform(v:String);
(*Library file name e.g., mscorlib.dll, system.web.dll.*)
function Get_assembly:String;
procedure Set_assembly(v:String);
// properties
property assemblyVersion:String read Get_assemblyVersion write Set_assemblyVersion;
property programmingModel:String read Get_programmingModel write Set_programmingModel;
property targetPlatform:String read Get_targetPlatform write Set_targetPlatform;
property assembly:String read Get_assembly write Set_assembly;
end;
(*** end IAPIReference ***)
(* Car
A car is a wheeled, self-powered motor vehicle used for transportation.
*)
ICar=Interface (IVehicle)
(**)
function Get_roofLoad:IQuantitativeValue;
procedure Set_roofLoad(v:IQuantitativeValue);
// properties
property roofLoad:IQuantitativeValue read Get_roofLoad write Set_roofLoad;
end;
(*** end ICar ***)
(* RentalCarReservation
*)
IRentalCarReservation=Interface (IReservation)
(*Where a rental car can be dropped off.*)
function Get_dropoffLocation:IPlace;
procedure Set_dropoffLocation(v:IPlace);
(*When a rental car can be dropped off.*)
function Get_dropoffTime:TDateTime;
procedure Set_dropoffTime(v:TDateTime);
// properties
property dropoffLocation:IPlace read Get_dropoffLocation write Set_dropoffLocation;
property dropoffTime:TDateTime read Get_dropoffTime write Set_dropoffTime;
end;
(*** end IRentalCarReservation ***)
(* WebApplication
Web applications.
*)
IWebApplication=Interface (ISoftwareApplication)
(*Specifies browser requirements in human-readable text. For example, 'requires
HTML5 support'.*)
function Get_browserRequirements:String;
procedure Set_browserRequirements(v:String);
// properties
property browserRequirements:String read Get_browserRequirements write Set_browserRequirements;
end;
(*** end IWebApplication ***)
(* GamePlayMode
Indicates whether this game is multi-player, co-op or single-player.
*)
IGamePlayMode=Interface (IEnumeration)
function TangGamePlayMode:TangibleValue;
end;
(*** end IGamePlayMode ***)
(* AggregateOffer
When a single product is associated with multiple offers (for example, the same
pair of shoes is offered by different merchants), then AggregateOffer can be
used.
*)
IAggregateOffer=Interface (IOffer)
(*The highest price of all offers available.*)
function Get_highPrice:INumber;
procedure Set_highPrice(v:INumber);
(*The number of offers for the product.*)
function Get_offerCount:Integer;
procedure Set_offerCount(v:Integer);
(*The lowest price of all offers available.*)
function Get_lowPrice:INumber;
procedure Set_lowPrice(v:INumber);
// properties
property highPrice:INumber read Get_highPrice write Set_highPrice;
property offerCount:Integer read Get_offerCount write Set_offerCount;
property lowPrice:INumber read Get_lowPrice write Set_lowPrice;
end;
(*** end IAggregateOffer ***)
(* Brand
A brand is a name used by an organization or business person for labeling a
product, product group, or similar.
*)
IBrand=Interface (IIntangible)
function TangBrand:TangibleValue;
end;
(*** end IBrand ***)
(* PropertyValueSpecification
A Property value specification.
*)
IPropertyValueSpecification=Interface (IIntangible)
(*Whether multiple values are allowed for the property. Default is false.*)
function Get_multipleValues:Boolean;
procedure Set_multipleValues(v:Boolean);
(*Whether or not a property is mutable. Default is false. Specifying this for
a property that also has a value makes it act similar to a "hidden" input in an
HTML form.*)
function Get_readonlyValue:Boolean;
procedure Set_readonlyValue(v:Boolean);
(*Specifies the allowed range for number of characters in a literal value.*)
function Get_valueMaxLength:INumber;
procedure Set_valueMaxLength(v:INumber);
(*Specifies the minimum allowed range for number of characters in a literal
value.*)
function Get_valueMinLength:INumber;
procedure Set_valueMinLength(v:INumber);
(*The default value of the input. For properties that expect a literal, the
default is a literal value, for properties that expect an object, it's an ID
reference to one of the current values.*)
function Get_defaultValue:String;
procedure Set_defaultValue(v:String);
(*Specifies a regular expression for testing literal values according to the
HTML spec.*)
function Get_valuePattern:String;
procedure Set_valuePattern(v:String);
(*Whether the property must be filled in to complete the action. Default is
false.*)
function Get_valueRequired:Boolean;
procedure Set_valueRequired(v:Boolean);
(*Indicates the name of the PropertyValueSpecification to be used in URL
templates and form encoding in a manner analogous to HTML's input@name.*)
function Get_valueName:String;
procedure Set_valueName(v:String);
(*The stepValue attribute indicates the granularity that is expected (and
required) of the value in a PropertyValueSpecification.*)
function Get_stepValue:INumber;
procedure Set_stepValue(v:INumber);
// properties
property multipleValues:Boolean read Get_multipleValues write Set_multipleValues;
property readonlyValue:Boolean read Get_readonlyValue write Set_readonlyValue;
property valueMaxLength:INumber read Get_valueMaxLength write Set_valueMaxLength;
property valueMinLength:INumber read Get_valueMinLength write Set_valueMinLength;
property defaultValue:String read Get_defaultValue write Set_defaultValue;
property valuePattern:String read Get_valuePattern write Set_valuePattern;
property valueRequired:Boolean read Get_valueRequired write Set_valueRequired;
property valueName:String read Get_valueName write Set_valueName;
property stepValue:INumber read Get_stepValue write Set_stepValue;
end;
(*** end IPropertyValueSpecification ***)
(* MobileApplication
A software application designed specifically to work well on a mobile device
such as a telephone.
*)
IMobileApplication=Interface (ISoftwareApplication)
(*Specifies specific carrier(s) requirements for the application (e.g. an
application may only work on a specific carrier network).*)
function Get_carrierRequirements:String;
procedure Set_carrierRequirements(v:String);
// properties
property carrierRequirements:String read Get_carrierRequirements write Set_carrierRequirements;
end;
(*** end IMobileApplication ***)
(* ReceiveAction
*)
IReceiveAction=Interface (ITransferAction)
(*A sub property of participant. The participant who is at the sending end of
the action.*)
function Get_sender:IOrganization;
procedure Set_sender(v:IOrganization);
// properties
property sender:IOrganization read Get_sender write Set_sender;
end;
(*** end IReceiveAction ***)
IMedicalTrialDesign=interface; //forward
(* MedicalTrial
A medical trial is a type of medical study that uses scientific process used to
compare the safety and efficacy of medical therapies or medical procedures. In
general, medical trials are controlled and subjects are allocated at random to
the different treatment and/or control groups.
*)
IMedicalTrial=Interface (IMedicalStudy)
(*Specifics about the trial design (enumerated).*)
function Get_trialDesign:IMedicalTrialDesign;
procedure Set_trialDesign(v:IMedicalTrialDesign);
(*The phase of the clinical trial.*)
function Get_phase:String;
procedure Set_phase(v:String);
// properties
property trialDesign:IMedicalTrialDesign read Get_trialDesign write Set_trialDesign;
property phase:String read Get_phase write Set_phase;
end;
(*** end IMedicalTrial ***)
(* MedicalTrialDesign
Design models for medical trials. Enumerated type.
*)
IMedicalTrialDesign=Interface (IEnumeration)
function TangMedicalTrialDesign:TangibleValue;
end;
(*** end IMedicalTrialDesign ***)
IMass=interface; //forward
(* NutritionInformation
Nutritional information about the recipe.
*)
INutritionInformation=Interface (IStructuredValue)
(*The number of grams of protein.*)
function Get_proteinContent:IMass;
procedure Set_proteinContent(v:IMass);
(*The number of grams of fat.*)
function Get_fatContent:IMass;
procedure Set_fatContent(v:IMass);
(*The number of grams of trans fat.*)
function Get_transFatContent:IMass;
procedure Set_transFatContent(v:IMass);
(*The number of calories.*)
function Get_calories:IEnergy;
procedure Set_calories(v:IEnergy);
(*The number of grams of carbohydrates.*)
function Get_carbohydrateContent:IMass;
procedure Set_carbohydrateContent(v:IMass);
(*The number of milligrams of sodium.*)
function Get_sodiumContent:IMass;
procedure Set_sodiumContent(v:IMass);
(*The number of milligrams of cholesterol.*)
function Get_cholesterolContent:IMass;
procedure Set_cholesterolContent(v:IMass);
(*The serving size, in terms of the number of volume or mass.*)
function Get_servingSize:String;
procedure Set_servingSize(v:String);
(*The number of grams of fiber.*)
function Get_fiberContent:IMass;
procedure Set_fiberContent(v:IMass);
(*The number of grams of saturated fat.*)
function Get_saturatedFatContent:IMass;
procedure Set_saturatedFatContent(v:IMass);
(*The number of grams of sugar.*)
function Get_sugarContent:IMass;
procedure Set_sugarContent(v:IMass);
(*The number of grams of unsaturated fat.*)
function Get_unsaturatedFatContent:IMass;
procedure Set_unsaturatedFatContent(v:IMass);
// properties
property proteinContent:IMass read Get_proteinContent write Set_proteinContent;
property fatContent:IMass read Get_fatContent write Set_fatContent;
property transFatContent:IMass read Get_transFatContent write Set_transFatContent;
property calories:IEnergy read Get_calories write Set_calories;
property carbohydrateContent:IMass read Get_carbohydrateContent write Set_carbohydrateContent;
property sodiumContent:IMass read Get_sodiumContent write Set_sodiumContent;
property cholesterolContent:IMass read Get_cholesterolContent write Set_cholesterolContent;
property servingSize:String read Get_servingSize write Set_servingSize;
property fiberContent:IMass read Get_fiberContent write Set_fiberContent;
property saturatedFatContent:IMass read Get_saturatedFatContent write Set_saturatedFatContent;
property sugarContent:IMass read Get_sugarContent write Set_sugarContent;
property unsaturatedFatContent:IMass read Get_unsaturatedFatContent write Set_unsaturatedFatContent;
end;
(*** end INutritionInformation ***)
(* Mass
Properties that take Mass as values are of the form '&lt;Number&gt;
&lt;Mass unit of measure&gt;'. E.g., '7 kg'.
*)
IMass=Interface (IQuantity)
function TangMass:TangibleValue;
end;
(*** end IMass ***)
(* PerformanceRole
A PerformanceRole is a Role that some entity places with regard to a theatrical
performance, e.g. in a Movie, TVSeries etc.
*)
IPerformanceRole=Interface (IRole)
(*The name of a character played in some acting or performing role, i.e. in a
PerformanceRole.*)
function Get_characterName:String;
procedure Set_characterName(v:String);
// properties
property characterName:String read Get_characterName write Set_characterName;
end;
(*** end IPerformanceRole ***)
(* LymphaticVessel
A type of blood vessel that specifically carries lymph fluid unidirectionally
toward the heart.
*)
ILymphaticVessel=Interface (IVessel)
(*The vasculature the lymphatic structure originates, or afferents, from.*)
function Get_originatesFrom:IVessel;
procedure Set_originatesFrom(v:IVessel);
(*The vasculature the lymphatic structure runs, or efferents, to.*)
function Get_runsTo:IVessel;
procedure Set_runsTo(v:IVessel);
// properties
property originatesFrom:IVessel read Get_originatesFrom write Set_originatesFrom;
property runsTo:IVessel read Get_runsTo write Set_runsTo;
end;
(*** end ILymphaticVessel ***)
(* Apartment
*)
IApartment=Interface (IAccommodation)
(*No atribs*)
end;
(*** end IApartment ***)
(* Patient
A patient is any person recipient of health care services.
*)
IPatient=Interface (IMedicalAudience)
function TangPatient:TangibleValue;
end;
(*** end IPatient ***)
(* EnumerationValue
An enumeration value.
*)
IEnumerationValue=Interface (IEnumeration)
(*The set (enumeration) of values of which contains this value.*)
function Get_partOfEnumerationValueSet:String;
procedure Set_partOfEnumerationValueSet(v:String);
(*A short textual code that uniquely identifies the value. The code is
typically used in structured URLs.*)
function Get_enumerationValueCode:String;
procedure Set_enumerationValueCode(v:String);
// properties
property partOfEnumerationValueSet:String read Get_partOfEnumerationValueSet write Set_partOfEnumerationValueSet;
property enumerationValueCode:String read Get_enumerationValueCode write Set_enumerationValueCode;
end;
(*** end IEnumerationValue ***)
IGeoCoordinates=interface; //forward
(* GeoCircle
A GeoCircle is a GeoShape representing a circular geographic area. As it is a
GeoShape
it provides the simple textual property 'circle', but also
allows the combination of postalCode alongside geoRadius.
The center
of the circle can be indicated via the 'geoMidpoint' property, or more
approximately using 'address', 'postalCode'.
*)
IGeoCircle=Interface (IGeoShape)
(*Indicates the approximate radius of a GeoCircle (metres unless indicated
otherwise via Distance notation).*)
function Get_geoRadius:IDistance;
procedure Set_geoRadius(v:IDistance);
(*Indicates the GeoCoordinates at the centre of a GeoShape e.g. GeoCircle.*)
function Get_geoMidpoint:IGeoCoordinates;
procedure Set_geoMidpoint(v:IGeoCoordinates);
// properties
property geoRadius:IDistance read Get_geoRadius write Set_geoRadius;
property geoMidpoint:IGeoCoordinates read Get_geoMidpoint write Set_geoMidpoint;
end;
(*** end IGeoCircle ***)
(* GeoCoordinates
The geographic coordinates of a place or event.
*)
IGeoCoordinates=Interface (IStructuredValue)
(**)
function Get_latitude:INumber;
procedure Set_latitude(v:INumber);
(**)
function Get_longitude:INumber;
procedure Set_longitude(v:INumber);
(*The postal code. For example, 94043.*)
function Get_postalCode:String;
procedure Set_postalCode(v:String);
// properties
property latitude:INumber read Get_latitude write Set_latitude;
property longitude:INumber read Get_longitude write Set_longitude;
property postalCode:String read Get_postalCode write Set_postalCode;
end;
(*** end IGeoCoordinates ***)
(* EducationalAudience
An EducationalAudience.
*)
IEducationalAudience=Interface (IAudience)
(*An educationalRole of an EducationalAudience.*)
function Get_educationalRole:String;
procedure Set_educationalRole(v:String);
// properties
property educationalRole:String read Get_educationalRole write Set_educationalRole;
end;
(*** end IEducationalAudience ***)
(* RadioSeries
CreativeWorkSeries dedicated to radio broadcast and associated online delivery.
*)
IRadioSeries=Interface (ICreativeWorkSeries)
(*No atribs*)
end;
(*** end IRadioSeries ***)
(* ChooseAction
The act of expressing a preference from a set of options or a large or
unbounded set of choices/options.
*)
IChooseAction=Interface (IAssessAction)
(*A sub property of object. The options subject to this action.*)
function Get_option:IThing;
procedure Set_option(v:IThing);
// properties
property option:IThing read Get_option write Set_option;
end;
(*** end IChooseAction ***)
(* VoteAction
The act of expressing a preference from a fixed/finite/structured set of
choices/options.
*)
IVoteAction=Interface (IChooseAction)
(*A sub property of object. The candidate subject of this action.*)
function Get_candidate:IPerson;
procedure Set_candidate(v:IPerson);
// properties
property candidate:IPerson read Get_candidate write Set_candidate;
end;
(*** end IVoteAction ***)
(* LinkRole
A Role that represents a Web link e.g. as expressed via the 'url' property. Its
linkRelationship property can indicate URL-based and plain textual link types
e.g. those in IANA link registry or others such as 'amphtml'. This structure
provides a placeholder where details from HTML's link element can be
represented outside of HTML, e.g. in JSON-LD feeds.
*)
ILinkRole=Interface (IRole)
(*Indicates the relationship type of a Web link.*)
function Get_linkRelationship:String;
procedure Set_linkRelationship(v:String);
// properties
property linkRelationship:String read Get_linkRelationship write Set_linkRelationship;
end;
(*** end ILinkRole ***)
(* LoanOrCredit
A financial product for the loaning of an amount of money under agreed terms
and charges.
*)
ILoanOrCredit=Interface (IFinancialProduct)
(*The duration of the loan or credit agreement.*)
function Get_loanTerm:IQuantitativeValue;
procedure Set_loanTerm(v:IQuantitativeValue);
(*Assets required to secure loan or credit repayments. It may take form of
third party pledge, goods, financial instruments (cash, securities, etc.)*)
function Get_requiredCollateral:String;
procedure Set_requiredCollateral(v:String);
(*The amount of money.*)
function Get_amount:IMonetaryAmount;
procedure Set_amount(v:IMonetaryAmount);
// properties
property loanTerm:IQuantitativeValue read Get_loanTerm write Set_loanTerm;
property requiredCollateral:String read Get_requiredCollateral write Set_requiredCollateral;
property amount:IMonetaryAmount read Get_amount write Set_amount;
end;
(*** end ILoanOrCredit ***)
(* MedicalImagingTechnique
Any medical imaging modality typically used for diagnostic purposes. Enumerated
type.
*)
IMedicalImagingTechnique=Interface (IMedicalEnumeration)
function TangMedicalImagingTechnique:TangibleValue;
end;
(*** end IMedicalImagingTechnique ***)
(* WebSite
A WebSite is a set of related web pages and other items typically served from a
single web domain and accessible via URLs.
*)
IWebSite=Interface (ICreativeWork)
(*No atribs*)
end;
(*** end IWebSite ***)
(* BusOrCoach
A bus (also omnibus or autobus) is a road vehicle designed to carry passengers.
Coaches are luxury busses, usually in service for long distance travel.
*)
IBusOrCoach=Interface (IVehicle)
(*The ACRISS Car Classification Code is a code used by many car rental
companies, for classifying vehicles. ACRISS stands for Association of Car
Rental Industry Systems and Standards.*)
function Get_acrissCode:String;
procedure Set_acrissCode(v:String);
// properties
property acrissCode:String read Get_acrissCode write Set_acrissCode;
end;
(*** end IBusOrCoach ***)
(* BroadcastFrequencySpecification
The frequency in MHz and the modulation used for a particular BroadcastService.
*)
IBroadcastFrequencySpecification=Interface (IIntangible)
(*The frequency in MHz for a particular broadcast.*)
function Get_broadcastFrequencyValue:IQuantitativeValue;
procedure Set_broadcastFrequencyValue(v:IQuantitativeValue);
// properties
property broadcastFrequencyValue:IQuantitativeValue read Get_broadcastFrequencyValue write Set_broadcastFrequencyValue;
end;
(*** end IBroadcastFrequencySpecification ***)
(* ReturnAction
The act of returning to the origin that which was previously received (concrete
objects) or taken (ownership).
*)
IReturnAction=Interface (ITransferAction)
(*No atribs*)
end;
(*** end IReturnAction ***)
(* ImagingTest
Any medical imaging modality typically used for diagnostic purposes.
*)
IImagingTest=Interface (IMedicalTest)
(*Imaging technique used.*)
function Get_imagingTechnique:IMedicalImagingTechnique;
procedure Set_imagingTechnique(v:IMedicalImagingTechnique);
// properties
property imagingTechnique:IMedicalImagingTechnique read Get_imagingTechnique write Set_imagingTechnique;
end;
(*** end IImagingTest ***)
(* LeaveAction
*)
ILeaveAction=Interface (IInteractAction)
(*No atribs*)
end;
(*** end ILeaveAction ***)
(* InfectiousDisease
An infectious disease is a clinically evident human disease resulting from the
presence of pathogenic microbial agents, like pathogenic viruses, pathogenic
bacteria, fungi, protozoa, multicellular parasites, and prions. To be
considered an infectious disease, such pathogens are known to be able to cause
this disease.
*)
IInfectiousDisease=Interface (IMedicalCondition)
(*The class of infectious agent (bacteria, prion, etc.) that causes the
disease.*)
function Get_infectiousAgentClass:IInfectiousAgentClass;
procedure Set_infectiousAgentClass(v:IInfectiousAgentClass);
(*How the disease spreads, either as a route or vector, for example 'direct
contact', 'Aedes aegypti', etc.*)
function Get_transmissionMethod:String;
procedure Set_transmissionMethod(v:String);
(*The actual infectious agent, such as a specific bacterium.*)
function Get_infectiousAgent:String;
procedure Set_infectiousAgent(v:String);
// properties
property infectiousAgentClass:IInfectiousAgentClass read Get_infectiousAgentClass write Set_infectiousAgentClass;
property transmissionMethod:String read Get_transmissionMethod write Set_transmissionMethod;
property infectiousAgent:String read Get_infectiousAgent write Set_infectiousAgent;
end;
(*** end IInfectiousDisease ***)
(* BusStop
A bus stop.
*)
IBusStop=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IBusStop ***)
(* MusicRelease
A MusicRelease is a specific release of a music album.
*)
IMusicRelease=Interface (IMusicPlaylist)
(*The group the release is credited to if different than the byArtist. For
example, Red and Blue is credited to "Stefani Germanotta Band", but by Lady
Gaga.*)
function Get_creditedTo:IOrganization;
procedure Set_creditedTo(v:IOrganization);
(*Format of this release (the type of recording media used, ie. compact disc,
digital media, LP, etc.).*)
function Get_musicReleaseFormat:IMusicReleaseFormatType;
procedure Set_musicReleaseFormat(v:IMusicReleaseFormatType);
(*The label that issued the release.*)
function Get_recordLabel:IOrganization;
procedure Set_recordLabel(v:IOrganization);
(*The catalog number for the release.*)
function Get_catalogNumber:String;
procedure Set_catalogNumber(v:String);
(*The album this is a release of.*)
function Get_releaseOf:IMusicAlbum;
procedure Set_releaseOf(v:IMusicAlbum);
// properties
property creditedTo:IOrganization read Get_creditedTo write Set_creditedTo;
property musicReleaseFormat:IMusicReleaseFormatType read Get_musicReleaseFormat write Set_musicReleaseFormat;
property recordLabel:IOrganization read Get_recordLabel write Set_recordLabel;
property catalogNumber:String read Get_catalogNumber write Set_catalogNumber;
property releaseOf:IMusicAlbum read Get_releaseOf write Set_releaseOf;
end;
(*** end IMusicRelease ***)
(* FoodEstablishmentReservation
A reservation to dine at a food-related business.Note: This type is for
information about actual reservations, e.g. in confirmation emails or HTML
pages with individual confirmations of reservations.
*)
IFoodEstablishmentReservation=Interface (IReservation)
(**)
function Get_startTime:TDateTime;
procedure Set_startTime(v:TDateTime);
(**)
function Get_endTime:TDateTime;
procedure Set_endTime(v:TDateTime);
// properties
property startTime:TDateTime read Get_startTime write Set_startTime;
property endTime:TDateTime read Get_endTime write Set_endTime;
end;
(*** end IFoodEstablishmentReservation ***)
(* HotelRoom
*)
IHotelRoom=Interface (IRoom)
(*The type of bed or beds included in the accommodation. For the single case of
just one bed of a certain type, you use bed directly with a text.
If you
want to indicate the quantity of a certain kind of bed, use an instance of
BedDetails. For more detailed information, use the amenityFeature property.*)
function Get_bed:IBedType;
procedure Set_bed(v:IBedType);
(*The allowed total occupancy for the accommodation in persons (including
infants etc). For individual accommodations, this is not necessarily the legal
maximum but defines the permitted usage as per the contractual agreement (e.g.
a double room used by a single person).
Typical unit code(s): C62 for person*)
function Get_occupancy:IQuantitativeValue;
procedure Set_occupancy(v:IQuantitativeValue);
// properties
property bed:IBedType read Get_bed write Set_bed;
property occupancy:IQuantitativeValue read Get_occupancy write Set_occupancy;
end;
(*** end IHotelRoom ***)
(* MedicalClinic
A facility, often associated with a hospital or medical school, that is devoted
to the specific diagnosis and/or healthcare. Previously limited to outpatients
but with evolution it may be open to inpatients as well.
*)
IMedicalClinic=Interface (IMedicalBusiness)
(*No atribs*)
end;
(*** end IMedicalClinic ***)
(* InteractionCounter
A summary of how users have interacted with this CreativeWork. In most cases,
authors will use a subtype to specify the specific type of interaction.
*)
IInteractionCounter=Interface (IStructuredValue)
(*The WebSite or SoftwareApplication where the interactions took place.*)
function Get_interactionService:ISoftwareApplication;
procedure Set_interactionService(v:ISoftwareApplication);
(**)
function Get_interactionType:IAction;
procedure Set_interactionType(v:IAction);
(*The number of interactions for the CreativeWork using the WebSite or
SoftwareApplication.*)
function Get_userInteractionCount:Integer;
procedure Set_userInteractionCount(v:Integer);
// properties
property interactionService:ISoftwareApplication read Get_interactionService write Set_interactionService;
property interactionType:IAction read Get_interactionType write Set_interactionType;
property userInteractionCount:Integer read Get_userInteractionCount write Set_userInteractionCount;
end;
(*** end IInteractionCounter ***)
(* Recipe
*)
IRecipe=Interface (ICreativeWork)
(*A step or instruction involved in making the recipe.*)
function Get_recipeInstructions:IItemList;
procedure Set_recipeInstructions(v:IItemList);
(*The quantity produced by the recipe (for example, number of people served,
number of servings, etc).*)
function Get_recipeYield:String;
procedure Set_recipeYield(v:String);
(*The cuisine of the recipe (for example, French or Ethiopian).*)
function Get_recipeCuisine:String;
procedure Set_recipeCuisine(v:String);
(*Nutrition information about the recipe.*)
function Get_nutrition:INutritionInformation;
procedure Set_nutrition(v:INutritionInformation);
(*Indicates a dietary restriction or guideline for which this recipe is
suitable, e.g. diabetic, halal etc.*)
function Get_suitableForDiet:IRestrictedDiet;
procedure Set_suitableForDiet(v:IRestrictedDiet);
(*A single ingredient used in the recipe, e.g. sugar, flour or garlic.*)
function Get_ingredients:String;
procedure Set_ingredients(v:String);
(*The method of cooking, such as Frying, Steaming, ...*)
function Get_cookingMethod:String;
procedure Set_cookingMethod(v:String);
(*The category of the recipe—for example, appetizer, entree, etc.*)
function Get_recipeCategory:String;
procedure Set_recipeCategory(v:String);
(**)
function Get_totalTime:IDuration;
procedure Set_totalTime(v:IDuration);
(**)
function Get_cookTime:IDuration;
procedure Set_cookTime(v:IDuration);
(**)
function Get_prepTime:IDuration;
procedure Set_prepTime(v:IDuration);
// properties
property recipeInstructions:IItemList read Get_recipeInstructions write Set_recipeInstructions;
property recipeYield:String read Get_recipeYield write Set_recipeYield;
property recipeCuisine:String read Get_recipeCuisine write Set_recipeCuisine;
property nutrition:INutritionInformation read Get_nutrition write Set_nutrition;
property suitableForDiet:IRestrictedDiet read Get_suitableForDiet write Set_suitableForDiet;
property ingredients:String read Get_ingredients write Set_ingredients;
property cookingMethod:String read Get_cookingMethod write Set_cookingMethod;
property recipeCategory:String read Get_recipeCategory write Set_recipeCategory;
property totalTime:IDuration read Get_totalTime write Set_totalTime;
property cookTime:IDuration read Get_cookTime write Set_cookTime;
property prepTime:IDuration read Get_prepTime write Set_prepTime;
end;
(*** end IRecipe ***)
(* ReviewAction
The act of producing a balanced opinion about the object for an audience. An
agent reviews an object with participants resulting in a review.
*)
IReviewAction=Interface (IAssessAction)
(*A sub property of result. The review that resulted in the performing of the
action.*)
function Get_resultReview:IReview;
procedure Set_resultReview(v:IReview);
// properties
property resultReview:IReview read Get_resultReview write Set_resultReview;
end;
(*** end IReviewAction ***)
(* WinAction
The act of achieving victory in a competitive activity.
*)
IWinAction=Interface (IAchieveAction)
(*A sub property of participant. The loser of the action.*)
function Get_loser:IPerson;
procedure Set_loser(v:IPerson);
// properties
property loser:IPerson read Get_loser write Set_loser;
end;
(*** end IWinAction ***)
(* ScholarlyArticle
A scholarly article.
*)
IScholarlyArticle=Interface (IArticle)
(*No atribs*)
end;
(*** end IScholarlyArticle ***)
(* MedicalScholarlyArticle
A scholarly article in the medical domain.
*)
IMedicalScholarlyArticle=Interface (IScholarlyArticle)
(**)
function Get_publicationType:String;
procedure Set_publicationType(v:String);
// properties
property publicationType:String read Get_publicationType write Set_publicationType;
end;
(*** end IMedicalScholarlyArticle ***)
(* Blog
A blog.
*)
IBlog=Interface (ICreativeWork)
(*The postings that are part of this blog.*)
function Get_blogPosts:IBlogPosting;
procedure Set_blogPosts(v:IBlogPosting);
// properties
property blogPosts:IBlogPosting read Get_blogPosts write Set_blogPosts;
end;
(*** end IBlog ***)
(* CookAction
The act of producing/preparing food.
*)
ICookAction=Interface (ICreateAction)
(*A sub property of instrument. The recipe/instructions used to perform the
action.*)
function Get_recipe:IRecipe;
procedure Set_recipe(v:IRecipe);
(*A sub property of location. The specific food establishment where the action
occurred.*)
function Get_foodEstablishment:IFoodEstablishment;
procedure Set_foodEstablishment(v:IFoodEstablishment);
(*A sub property of location. The specific food event where the action
occurred.*)
function Get_foodEvent:IFoodEvent;
procedure Set_foodEvent(v:IFoodEvent);
// properties
property recipe:IRecipe read Get_recipe write Set_recipe;
property foodEstablishment:IFoodEstablishment read Get_foodEstablishment write Set_foodEstablishment;
property foodEvent:IFoodEvent read Get_foodEvent write Set_foodEvent;
end;
(*** end ICookAction ***)
(* PathologyTest
A medical test performed by a laboratory that typically involves examination of
a tissue sample by a pathologist.
*)
IPathologyTest=Interface (IMedicalTest)
(*The type of tissue sample required for the test.*)
function Get_tissueSample:String;
procedure Set_tissueSample(v:String);
// properties
property tissueSample:String read Get_tissueSample write Set_tissueSample;
end;
(*** end IPathologyTest ***)
(* ReservationPackage
A group of multiple reservations with common values for all sub-reservations.
*)
IReservationPackage=Interface (IReservation)
(*The individual reservations included in the package. Typically a repeated
property.*)
function Get_subReservation:IReservation;
procedure Set_subReservation(v:IReservation);
// properties
property subReservation:IReservation read Get_subReservation write Set_subReservation;
end;
(*** end IReservationPackage ***)
(* UserComments
*)
IUserComments=Interface (IUserInteraction)
(*The creator/author of this CreativeWork. This is the same as the Author
property for CreativeWork.*)
function Get_creator:IPerson;
procedure Set_creator(v:IPerson);
(*Specifies the CreativeWork associated with the UserComment.*)
function Get_discusses:ICreativeWork;
procedure Set_discusses(v:ICreativeWork);
(*The text of the UserComment.*)
function Get_commentText:String;
procedure Set_commentText(v:String);
(*The URL at which a reply may be posted to the specified UserComment.*)
function Get_replyToUrl:String;
procedure Set_replyToUrl(v:String);
(*The time at which the UserComment was made.*)
function Get_commentTime:TDateTime;
procedure Set_commentTime(v:TDateTime);
// properties
property creator:IPerson read Get_creator write Set_creator;
property discusses:ICreativeWork read Get_discusses write Set_discusses;
property commentText:String read Get_commentText write Set_commentText;
property replyToUrl:String read Get_replyToUrl write Set_replyToUrl;
property commentTime:TDateTime read Get_commentTime write Set_commentTime;
end;
(*** end IUserComments ***)
IBusStation=interface; //forward
(* BusTrip
A trip on a commercial bus line.
*)
IBusTrip=Interface (IIntangible)
(*The stop or station from which the bus arrives.*)
function Get_arrivalBusStop:IBusStation;
procedure Set_arrivalBusStop(v:IBusStation);
(*The name of the bus (e.g. Bolt Express).*)
function Get_busName:String;
procedure Set_busName(v:String);
(*The unique identifier for the bus.*)
function Get_busNumber:String;
procedure Set_busNumber(v:String);
(*The stop or station from which the bus departs.*)
function Get_departureBusStop:IBusStop;
procedure Set_departureBusStop(v:IBusStop);
// properties
property arrivalBusStop:IBusStation read Get_arrivalBusStop write Set_arrivalBusStop;
property busName:String read Get_busName write Set_busName;
property busNumber:String read Get_busNumber write Set_busNumber;
property departureBusStop:IBusStop read Get_departureBusStop write Set_departureBusStop;
end;
(*** end IBusTrip ***)
(* BusStation
A bus station.
*)
IBusStation=Interface (ICivicStructure)
(*No atribs*)
end;
(*** end IBusStation ***)
(* GenderType
An enumeration of genders.
*)
IGenderType=Interface (IEnumeration)
function TangGenderType:TangibleValue;
end;
(*** end IGenderType ***)
(* DataType
The basic data types such as Integers, Strings, etc.
*)
IDataType=Interface
(*No atribs*)
end;
(*** end IDataType ***)
(* AuthorizeAction
The act of granting permission to an object.
*)
IAuthorizeAction=Interface (IAllocateAction)
(*No atribs*)
end;
(*** end IAuthorizeAction ***)
(* TVClip
A short TV program or a segment/part of a TV program.
*)
ITVClip=Interface (IClip)
(*No atribs*)
end;
(*** end ITVClip ***)
(* AskAction
*)
IAskAction=Interface (ICommunicateAction)
(*A sub property of object. A question.*)
function Get_question:IQuestion;
procedure Set_question(v:IQuestion);
// properties
property question:IQuestion read Get_question write Set_question;
end;
(*** end IAskAction ***)
(* PayAction
An agent pays a price to a participant.
*)
IPayAction=Interface (ITradeAction)
(*A sub property of participant. The participant who is at the receiving end of
the action.*)
function Get_recipient:IPerson;
procedure Set_recipient(v:IPerson);
// properties
property recipient:IPerson read Get_recipient write Set_recipient;
end;
(*** end IPayAction ***)
(* VideoGameSeries
A video game series.
*)
IVideoGameSeries=Interface (ICreativeWorkSeries)
(*Indicate how many people can play this game (minimum, maximum, or range).*)
function Get_numberOfPlayers:IQuantitativeValue;
procedure Set_numberOfPlayers(v:IQuantitativeValue);
(*Real or fictional location of the game (or part of game).*)
function Get_gameLocation:String;
procedure Set_gameLocation(v:String);
(*An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated
with individual items or with a series, episode, clip.*)
function Get_actors:IPerson;
procedure Set_actors(v:IPerson);
(*The task that a player-controlled character, or group of characters may
complete in order to gain a reward.*)
function Get_quest:IThing;
procedure Set_quest(v:IThing);
(*The number of seasons in this series.*)
function Get_numberOfSeasons:Integer;
procedure Set_numberOfSeasons(v:Integer);
(**)
function Get_gamePlatform:String;
procedure Set_gamePlatform(v:String);
(*An item is an object within the game world that can be collected by a player
or, occasionally, a non-player character.*)
function Get_gameItem:IThing;
procedure Set_gameItem(v:IThing);
(*The number of episodes in this season or series.*)
function Get_numberOfEpisodes:Integer;
procedure Set_numberOfEpisodes(v:Integer);
(*Indicates whether this game is multi-player, co-op or single-player. The
game can be marked as multi-player, co-op and single-player at the same time.*)
function Get_playMode:IGamePlayMode;
procedure Set_playMode(v:IGamePlayMode);
// properties
property numberOfPlayers:IQuantitativeValue read Get_numberOfPlayers write Set_numberOfPlayers;
property gameLocation:String read Get_gameLocation write Set_gameLocation;
property actors:IPerson read Get_actors write Set_actors;
property quest:IThing read Get_quest write Set_quest;
property numberOfSeasons:Integer read Get_numberOfSeasons write Set_numberOfSeasons;
property gamePlatform:String read Get_gamePlatform write Set_gamePlatform;
property gameItem:IThing read Get_gameItem write Set_gameItem;
property numberOfEpisodes:Integer read Get_numberOfEpisodes write Set_numberOfEpisodes;
property playMode:IGamePlayMode read Get_playMode write Set_playMode;
end;
(*** end IVideoGameSeries ***)
(* VideoGame
A video game is an electronic game that involves human interaction with a user
interface to generate visual feedback on a video device.
*)
IVideoGame=Interface (IGame)
(*Cheat codes to the game.*)
function Get_cheatCode:ICreativeWork;
procedure Set_cheatCode(v:ICreativeWork);
(*Links to tips, tactics, etc.*)
function Get_gameTip:ICreativeWork;
procedure Set_gameTip(v:ICreativeWork);
(*The server on which it is possible to play the game.*)
function Get_gameServer:IGameServer;
procedure Set_gameServer(v:IGameServer);
// properties
property cheatCode:ICreativeWork read Get_cheatCode write Set_cheatCode;
property gameTip:ICreativeWork read Get_gameTip write Set_gameTip;
property gameServer:IGameServer read Get_gameServer write Set_gameServer;
end;
(*** end IVideoGame ***)
(* MovieTheater
A movie theater.
*)
IMovieTheater=Interface (IEntertainmentBusiness)
(*The number of screens in the movie theater.*)
function Get_screenCount:INumber;
procedure Set_screenCount(v:INumber);
// properties
property screenCount:INumber read Get_screenCount write Set_screenCount;
end;
(*** end IMovieTheater ***)
(* TaxiService
A service for a vehicle for hire with a driver for local travel. Fares are
usually calculated based on distance traveled.
*)
ITaxiService=Interface (IService)
function TangTaxiService:TangibleValue;
end;
(*** end ITaxiService ***)
(* LodgingReservation
*)
ILodgingReservation=Interface (IReservation)
(*The number of children staying in the unit.*)
function Get_numChildren:IQuantitativeValue;
procedure Set_numChildren(v:IQuantitativeValue);
(*The number of adults staying in the unit.*)
function Get_numAdults:Integer;
procedure Set_numAdults(v:Integer);
(*A full description of the lodging unit.*)
function Get_lodgingUnitDescription:String;
procedure Set_lodgingUnitDescription(v:String);
(*Textual description of the unit type (including suite vs. room, size of bed,
etc.).*)
function Get_lodgingUnitType:String;
procedure Set_lodgingUnitType(v:String);
// properties
property numChildren:IQuantitativeValue read Get_numChildren write Set_numChildren;
property numAdults:Integer read Get_numAdults write Set_numAdults;
property lodgingUnitDescription:String read Get_lodgingUnitDescription write Set_lodgingUnitDescription;
property lodgingUnitType:String read Get_lodgingUnitType write Set_lodgingUnitType;
end;
(*** end ILodgingReservation ***)
(* CommentAction
The act of generating a comment about a subject.
*)
ICommentAction=Interface (ICommunicateAction)
(*A sub property of result. The Comment created or sent as a result of this
action.*)
function Get_resultComment:IComment;
procedure Set_resultComment(v:IComment);
// properties
property resultComment:IComment read Get_resultComment write Set_resultComment;
end;
(*** end ICommentAction ***)
(* DrugLegalStatus
The legal availability status of a medical drug.
*)
IDrugLegalStatus=Interface (IMedicalIntangible)
(*No atribs*)
end;
(*** end IDrugLegalStatus ***)
(* SuperficialAnatomy
Anatomical features that can be observed by sight (without dissection),
including the form and proportions of the human body as well as surface
landmarks that correspond to deeper subcutaneous structures. Superficial
anatomy plays an important role in sports medicine, phlebotomy, and other
medical specialties as underlying anatomical structures can be identified
through surface palpation. For example, during back surgery, superficial
anatomy can be used to palpate and count vertebrae to find the site of
incision. Or in phlebotomy, superficial anatomy can be used to locate an
underlying vein; for example, the median cubital vein can be located by
palpating the borders of the cubital fossa (such as the epicondyles of the
humerus) and then looking for the superficial signs of the vein, such as size,
prominence, ability to refill after depression, and feel of surrounding tissue
support. As another example, in a subluxation (dislocation) of the glenohumeral
joint, the bony structure becomes pronounced with the deltoid muscle failing to
cover the glenohumeral joint allowing the edges of the scapula to be
superficially visible. Here, the superficial anatomy is the visible edges of
the scapula, implying the underlying dislocation of the joint (the related
anatomical structure).
*)
ISuperficialAnatomy=Interface (IMedicalEntity)
(*The significance associated with the superficial anatomy; as an example, how
characteristics of the superficial anatomy can suggest underlying medical
conditions or courses of treatment.*)
function Get_significance:String;
procedure Set_significance(v:String);
(*Anatomical systems or structures that relate to the superficial anatomy.*)
function Get_relatedAnatomy:IAnatomicalSystem;
procedure Set_relatedAnatomy(v:IAnatomicalSystem);
// properties
property significance:String read Get_significance write Set_significance;
property relatedAnatomy:IAnatomicalSystem read Get_relatedAnatomy write Set_relatedAnatomy;
end;
(*** end ISuperficialAnatomy ***)
(* ComicIssue
Individual comic issues are serially published as
part of a larger series.
For the sake of consistency, even one-shot issues
belong to a series
comprised of a single issue. All comic issues can be
uniquely identified
by: the combination of the name and volume number of the
series to which
the issue belongs; the issue number; and the variant
description of the
issue (if any).
*)
IComicIssue=Interface (IPublicationIssue)
(*The individual who draws the primary narrative artwork.*)
function Get_penciler:IPerson;
procedure Set_penciler(v:IPerson);
(*The individual who traces over the pencil drawings in ink after pencils are
complete.*)
function Get_inker:IPerson;
procedure Set_inker(v:IPerson);
(*A description of the variant cover
for the issue, if the issue is a
variant printing. For example, "Bryan Hitch
Variant Cover" or "2nd Printing
Variant".*)
function Get_variantCover:String;
procedure Set_variantCover(v:String);
// properties
property penciler:IPerson read Get_penciler write Set_penciler;
property inker:IPerson read Get_inker write Set_inker;
property variantCover:String read Get_variantCover write Set_variantCover;
end;
(*** end IComicIssue ***)
// AbstractList
// Components
TAction=Class; //forward
TCreativeWork=Class; //forward
(*Thing*)
TThing=Class (TBaseSchema,IThing)
private
FsameAs:String;
FadditionalType:String;
FdisambiguatingDescription:String;
FpotentialAction:IAction;
Furl:String;
FalternateName:String;
Fname:String;
FmainEntityOfPage:ICreativeWork;
protected
function Get_sameAs:String;virtual;
procedure Set_sameAs(v:String);virtual;
function Get_additionalType:String;virtual;
procedure Set_additionalType(v:String);virtual;
function Get_disambiguatingDescription:String;virtual;
procedure Set_disambiguatingDescription(v:String);virtual;
function Get_potentialAction:IAction;virtual;
procedure Set_potentialAction(v:IAction);virtual;
function Get_url:String;virtual;
procedure Set_url(v:String);virtual;
function Get_alternateName:String;virtual;
procedure Set_alternateName(v:String);virtual;
function Get_name:String;virtual;
procedure Set_name(v:String);virtual;
function Get_mainEntityOfPage:ICreativeWork;virtual;
procedure Set_mainEntityOfPage(v:ICreativeWork);virtual;
public
property potentialAction:IAction read Get_potentialAction write Set_potentialAction;
property mainEntityOfPage:ICreativeWork read Get_mainEntityOfPage write Set_mainEntityOfPage;
published
property sameAs:String read Get_sameAs write Set_sameAs;
property additionalType:String read Get_additionalType write Set_additionalType;
property disambiguatingDescription:String read Get_disambiguatingDescription write Set_disambiguatingDescription;
property url:String read Get_url write Set_url;
property alternateName:String read Get_alternateName write Set_alternateName;
property name:String read Get_name write Set_name;
end;
TEntryPoint=Class; //forward
TActionStatusType=Class; //forward
TOrganization=Class; //forward
(*Action*)
TAction=Class (TThing,IAction)
private
Ftarget:IEntryPoint;
FactionStatus:IActionStatusType;
Fagent:IOrganization;
Ferror:IThing;
protected
function Get_target:IEntryPoint;virtual;
procedure Set_target(v:IEntryPoint);virtual;
function Get_actionStatus:IActionStatusType;virtual;
procedure Set_actionStatus(v:IActionStatusType);virtual;
function Get_agent:IOrganization;virtual;
procedure Set_agent(v:IOrganization);virtual;
function Get_error:IThing;virtual;
procedure Set_error(v:IThing);virtual;
public
property target:IEntryPoint read Get_target write Set_target;
property actionStatus:IActionStatusType read Get_actionStatus write Set_actionStatus;
property agent:IOrganization read Get_agent write Set_agent;
property error:IThing read Get_error write Set_error;
published
end;
(*Intangible*)
TIntangible=Class (TThing,IIntangible)
function TangIntangible:TangibleValue;virtual;
end;
TSoftwareApplication=Class; //forward
(*EntryPoint*)
TEntryPoint=Class (TIntangible,IEntryPoint)
private
Fapplication:ISoftwareApplication;
FactionPlatform:String;
FhttpMethod:String;
FencodingType:String;
FurlTemplate:String;
FcontentType:String;
protected
function Get_application:ISoftwareApplication;virtual;
procedure Set_application(v:ISoftwareApplication);virtual;
function Get_actionPlatform:String;virtual;
procedure Set_actionPlatform(v:String);virtual;
function Get_httpMethod:String;virtual;
procedure Set_httpMethod(v:String);virtual;
function Get_encodingType:String;virtual;
procedure Set_encodingType(v:String);virtual;
function Get_urlTemplate:String;virtual;
procedure Set_urlTemplate(v:String);virtual;
function Get_contentType:String;virtual;
procedure Set_contentType(v:String);virtual;
public
property application:ISoftwareApplication read Get_application write Set_application;
published
property actionPlatform:String read Get_actionPlatform write Set_actionPlatform;
property httpMethod:String read Get_httpMethod write Set_httpMethod;
property encodingType:String read Get_encodingType write Set_encodingType;
property urlTemplate:String read Get_urlTemplate write Set_urlTemplate;
property contentType:String read Get_contentType write Set_contentType;
end;
TReview=Class; //forward
TPerson=Class; //forward
TMediaObject=Class; //forward
TPlace=Class; //forward
TVideoObject=Class; //forward
TPublicationEvent=Class; //forward
TProduct=Class; //forward
TNumber=Class; //forward
TDuration=Class; //forward
TAudioObject=Class; //forward
TAlignmentObject=Class; //forward
(*CreativeWork*)
TCreativeWork=Class (TThing,ICreativeWork)
private
FcommentCount:Integer;
Freviews:IReview;
Fheadline:String;
Feditor:IPerson;
FassociatedMedia:IMediaObject;
FthumbnailUrl:String;
Fmentions:IThing;
FcontentRating:String;
FaccessibilityHazard:String;
FaccessibilityAPI:String;
FlocationCreated:IPlace;
FalternativeHeadline:String;
Fawards:String;
Fencodings:IMediaObject;
Fproducer:IPerson;
FaccessibilityFeature:String;
Fvideo:IVideoObject;
FreleasedEvent:IPublicationEvent;
FeducationalUse:String;
FisBasedOnUrl:IProduct;
FcopyrightHolder:IOrganization;
FdiscussionUrl:String;
FpublisherImprint:IOrganization;
FfileFormat:String;
Ftext:String;
Fpublication:IPublicationEvent;
Flicense:String;
FaccessModeSufficient:String;
Fkeywords:String;
FcontentReferenceTime:TDateTime;
FaccessibilitySummary:String;
Fversion:INumber;
FdatePublished:TDateTime;
FtimeRequired:IDuration;
Faudio:IAudioObject;
FisFamilyFriendly:Boolean;
FinteractivityType:String;
FeducationalAlignment:IAlignmentObject;
FpublishingPrinciples:String;
FaccessibilityControl:String;
FaccountablePerson:IPerson;
FaccessMode:String;
Fabout:IThing;
FsourceOrganization:IOrganization;
Fcitation:ICreativeWork;
FschemaVersion:String;
FcopyrightYear:INumber;
Fpublisher:IPerson;
FlearningResourceType:String;
Fcharacter:IPerson;
FexampleOfWork:ICreativeWork;
FworkTranslation:ICreativeWork;
FcontentLocation:IPlace;
protected
function Get_commentCount:Integer;virtual;
procedure Set_commentCount(v:Integer);virtual;
function Get_reviews:IReview;virtual;
procedure Set_reviews(v:IReview);virtual;
function Get_headline:String;virtual;
procedure Set_headline(v:String);virtual;
function Get_editor:IPerson;virtual;
procedure Set_editor(v:IPerson);virtual;
function Get_associatedMedia:IMediaObject;virtual;
procedure Set_associatedMedia(v:IMediaObject);virtual;
function Get_thumbnailUrl:String;virtual;
procedure Set_thumbnailUrl(v:String);virtual;
function Get_mentions:IThing;virtual;
procedure Set_mentions(v:IThing);virtual;
function Get_contentRating:String;virtual;
procedure Set_contentRating(v:String);virtual;
function Get_accessibilityHazard:String;virtual;
procedure Set_accessibilityHazard(v:String);virtual;
function Get_accessibilityAPI:String;virtual;
procedure Set_accessibilityAPI(v:String);virtual;
function Get_locationCreated:IPlace;virtual;
procedure Set_locationCreated(v:IPlace);virtual;
function Get_alternativeHeadline:String;virtual;
procedure Set_alternativeHeadline(v:String);virtual;
function Get_awards:String;virtual;
procedure Set_awards(v:String);virtual;
function Get_encodings:IMediaObject;virtual;
procedure Set_encodings(v:IMediaObject);virtual;
function Get_producer:IPerson;virtual;
procedure Set_producer(v:IPerson);virtual;
function Get_accessibilityFeature:String;virtual;
procedure Set_accessibilityFeature(v:String);virtual;
function Get_video:IVideoObject;virtual;
procedure Set_video(v:IVideoObject);virtual;
function Get_releasedEvent:IPublicationEvent;virtual;
procedure Set_releasedEvent(v:IPublicationEvent);virtual;
function Get_educationalUse:String;virtual;
procedure Set_educationalUse(v:String);virtual;
function Get_isBasedOnUrl:IProduct;virtual;
procedure Set_isBasedOnUrl(v:IProduct);virtual;
function Get_copyrightHolder:IOrganization;virtual;
procedure Set_copyrightHolder(v:IOrganization);virtual;
function Get_discussionUrl:String;virtual;
procedure Set_discussionUrl(v:String);virtual;
function Get_publisherImprint:IOrganization;virtual;
procedure Set_publisherImprint(v:IOrganization);virtual;
function Get_fileFormat:String;virtual;
procedure Set_fileFormat(v:String);virtual;
function Get_text:String;virtual;
procedure Set_text(v:String);virtual;
function Get_publication:IPublicationEvent;virtual;
procedure Set_publication(v:IPublicationEvent);virtual;
function Get_license:String;virtual;
procedure Set_license(v:String);virtual;
function Get_accessModeSufficient:String;virtual;
procedure Set_accessModeSufficient(v:String);virtual;
function Get_keywords:String;virtual;
procedure Set_keywords(v:String);virtual;
function Get_contentReferenceTime:TDateTime;virtual;
procedure Set_contentReferenceTime(v:TDateTime);virtual;
function Get_accessibilitySummary:String;virtual;
procedure Set_accessibilitySummary(v:String);virtual;
function Get_version:INumber;virtual;
procedure Set_version(v:INumber);virtual;
function Get_datePublished:TDateTime;virtual;
procedure Set_datePublished(v:TDateTime);virtual;
function Get_timeRequired:IDuration;virtual;
procedure Set_timeRequired(v:IDuration);virtual;
function Get_audio:IAudioObject;virtual;
procedure Set_audio(v:IAudioObject);virtual;
function Get_isFamilyFriendly:Boolean;virtual;
procedure Set_isFamilyFriendly(v:Boolean);virtual;
function Get_interactivityType:String;virtual;
procedure Set_interactivityType(v:String);virtual;
function Get_educationalAlignment:IAlignmentObject;virtual;
procedure Set_educationalAlignment(v:IAlignmentObject);virtual;
function Get_publishingPrinciples:String;virtual;
procedure Set_publishingPrinciples(v:String);virtual;
function Get_accessibilityControl:String;virtual;
procedure Set_accessibilityControl(v:String);virtual;
function Get_accountablePerson:IPerson;virtual;
procedure Set_accountablePerson(v:IPerson);virtual;
function Get_accessMode:String;virtual;
procedure Set_accessMode(v:String);virtual;
function Get_about:IThing;virtual;
procedure Set_about(v:IThing);virtual;
function Get_sourceOrganization:IOrganization;virtual;
procedure Set_sourceOrganization(v:IOrganization);virtual;
function Get_citation:ICreativeWork;virtual;
procedure Set_citation(v:ICreativeWork);virtual;
function Get_schemaVersion:String;virtual;
procedure Set_schemaVersion(v:String);virtual;
function Get_copyrightYear:INumber;virtual;
procedure Set_copyrightYear(v:INumber);virtual;
function Get_publisher:IPerson;virtual;
procedure Set_publisher(v:IPerson);virtual;
function Get_learningResourceType:String;virtual;
procedure Set_learningResourceType(v:String);virtual;
function Get_character:IPerson;virtual;
procedure Set_character(v:IPerson);virtual;
function Get_exampleOfWork:ICreativeWork;virtual;
procedure Set_exampleOfWork(v:ICreativeWork);virtual;
function Get_workTranslation:ICreativeWork;virtual;
procedure Set_workTranslation(v:ICreativeWork);virtual;
function Get_contentLocation:IPlace;virtual;
procedure Set_contentLocation(v:IPlace);virtual;
public
property reviews:IReview read Get_reviews write Set_reviews;
property editor:IPerson read Get_editor write Set_editor;
property associatedMedia:IMediaObject read Get_associatedMedia write Set_associatedMedia;
property mentions:IThing read Get_mentions write Set_mentions;
property locationCreated:IPlace read Get_locationCreated write Set_locationCreated;
property encodings:IMediaObject read Get_encodings write Set_encodings;
property producer:IPerson read Get_producer write Set_producer;
property video:IVideoObject read Get_video write Set_video;
property releasedEvent:IPublicationEvent read Get_releasedEvent write Set_releasedEvent;
property isBasedOnUrl:IProduct read Get_isBasedOnUrl write Set_isBasedOnUrl;
property copyrightHolder:IOrganization read Get_copyrightHolder write Set_copyrightHolder;
property publisherImprint:IOrganization read Get_publisherImprint write Set_publisherImprint;
property publication:IPublicationEvent read Get_publication write Set_publication;
property version:INumber read Get_version write Set_version;
property timeRequired:IDuration read Get_timeRequired write Set_timeRequired;
property audio:IAudioObject read Get_audio write Set_audio;
property educationalAlignment:IAlignmentObject read Get_educationalAlignment write Set_educationalAlignment;
property accountablePerson:IPerson read Get_accountablePerson write Set_accountablePerson;
property about:IThing read Get_about write Set_about;
property sourceOrganization:IOrganization read Get_sourceOrganization write Set_sourceOrganization;
property citation:ICreativeWork read Get_citation write Set_citation;
property copyrightYear:INumber read Get_copyrightYear write Set_copyrightYear;
property publisher:IPerson read Get_publisher write Set_publisher;
property character:IPerson read Get_character write Set_character;
property exampleOfWork:ICreativeWork read Get_exampleOfWork write Set_exampleOfWork;
property workTranslation:ICreativeWork read Get_workTranslation write Set_workTranslation;
property contentLocation:IPlace read Get_contentLocation write Set_contentLocation;
published
property commentCount:Integer read Get_commentCount write Set_commentCount;
property headline:String read Get_headline write Set_headline;
property thumbnailUrl:String read Get_thumbnailUrl write Set_thumbnailUrl;
property contentRating:String read Get_contentRating write Set_contentRating;
property accessibilityHazard:String read Get_accessibilityHazard write Set_accessibilityHazard;
property accessibilityAPI:String read Get_accessibilityAPI write Set_accessibilityAPI;
property alternativeHeadline:String read Get_alternativeHeadline write Set_alternativeHeadline;
property awards:String read Get_awards write Set_awards;
property accessibilityFeature:String read Get_accessibilityFeature write Set_accessibilityFeature;
property educationalUse:String read Get_educationalUse write Set_educationalUse;
property discussionUrl:String read Get_discussionUrl write Set_discussionUrl;
property fileFormat:String read Get_fileFormat write Set_fileFormat;
property text:String read Get_text write Set_text;
property license:String read Get_license write Set_license;
property accessModeSufficient:String read Get_accessModeSufficient write Set_accessModeSufficient;
property keywords:String read Get_keywords write Set_keywords;
property contentReferenceTime:TDateTime read Get_contentReferenceTime write Set_contentReferenceTime;
property accessibilitySummary:String read Get_accessibilitySummary write Set_accessibilitySummary;
property datePublished:TDateTime read Get_datePublished write Set_datePublished;
property isFamilyFriendly:Boolean read Get_isFamilyFriendly write Set_isFamilyFriendly;
property interactivityType:String read Get_interactivityType write Set_interactivityType;
property publishingPrinciples:String read Get_publishingPrinciples write Set_publishingPrinciples;
property accessibilityControl:String read Get_accessibilityControl write Set_accessibilityControl;
property accessMode:String read Get_accessMode write Set_accessMode;
property schemaVersion:String read Get_schemaVersion write Set_schemaVersion;
property learningResourceType:String read Get_learningResourceType write Set_learningResourceType;
end;
TRating=Class; //forward
(*Review*)
TReview=Class (TCreativeWork,IReview)
private
FreviewRating:IRating;
FitemReviewed:IThing;
FreviewBody:String;
protected
function Get_reviewRating:IRating;virtual;
procedure Set_reviewRating(v:IRating);virtual;
function Get_itemReviewed:IThing;virtual;
procedure Set_itemReviewed(v:IThing);virtual;
function Get_reviewBody:String;virtual;
procedure Set_reviewBody(v:String);virtual;
public
property reviewRating:IRating read Get_reviewRating write Set_reviewRating;
property itemReviewed:IThing read Get_itemReviewed write Set_itemReviewed;
published
property reviewBody:String read Get_reviewBody write Set_reviewBody;
end;
(*Rating*)
TRating=Class (TIntangible,IRating)
private
Fauthor:IPerson;
FratingValue:String;
FworstRating:String;
FbestRating:INumber;
protected
function Get_author:IPerson;virtual;
procedure Set_author(v:IPerson);virtual;
function Get_ratingValue:String;virtual;
procedure Set_ratingValue(v:String);virtual;
function Get_worstRating:String;virtual;
procedure Set_worstRating(v:String);virtual;
function Get_bestRating:INumber;virtual;
procedure Set_bestRating(v:INumber);virtual;
public
property author:IPerson read Get_author write Set_author;
property bestRating:INumber read Get_bestRating write Set_bestRating;
published
property ratingValue:String read Get_ratingValue write Set_ratingValue;
property worstRating:String read Get_worstRating write Set_worstRating;
end;
TContactPoint=Class; //forward
TPriceSpecification=Class; //forward
TCountry=Class; //forward
TEvent=Class; //forward
TEducationalOrganization=Class; //forward
(*Person*)
TPerson=Class (TThing,IPerson)
private
FvatID:String;
Fnaics:String;
FworkLocation:IContactPoint;
FgivenName:String;
FbirthPlace:IPlace;
FdeathDate:TDateTime;
FrelatedTo:IPerson;
FhonorificSuffix:String;
FisicV4:String;
FdeathPlace:IPlace;
Fcolleagues:IPerson;
FworksFor:IOrganization;
FadditionalName:String;
Ffollows:IPerson;
Fspouse:IPerson;
Fknows:IPerson;
FbirthDate:TDateTime;
Fgender:String;
Fsiblings:IPerson;
Fchildren:IPerson;
Ffunder:IPerson;
Faffiliation:IOrganization;
FhonorificPrefix:String;
FnetWorth:IPriceSpecification;
FfamilyName:String;
Fparents:IPerson;
FhomeLocation:IPlace;
Fnationality:ICountry;
FjobTitle:String;
FperformerIn:IEvent;
FalumniOf:IEducationalOrganization;
protected
function Get_vatID:String;virtual;
procedure Set_vatID(v:String);virtual;
function Get_naics:String;virtual;
procedure Set_naics(v:String);virtual;
function Get_workLocation:IContactPoint;virtual;
procedure Set_workLocation(v:IContactPoint);virtual;
function Get_givenName:String;virtual;
procedure Set_givenName(v:String);virtual;
function Get_birthPlace:IPlace;virtual;
procedure Set_birthPlace(v:IPlace);virtual;
function Get_deathDate:TDateTime;virtual;
procedure Set_deathDate(v:TDateTime);virtual;
function Get_relatedTo:IPerson;virtual;
procedure Set_relatedTo(v:IPerson);virtual;
function Get_honorificSuffix:String;virtual;
procedure Set_honorificSuffix(v:String);virtual;
function Get_isicV4:String;virtual;
procedure Set_isicV4(v:String);virtual;
function Get_deathPlace:IPlace;virtual;
procedure Set_deathPlace(v:IPlace);virtual;
function Get_colleagues:IPerson;virtual;
procedure Set_colleagues(v:IPerson);virtual;
function Get_worksFor:IOrganization;virtual;
procedure Set_worksFor(v:IOrganization);virtual;
function Get_additionalName:String;virtual;
procedure Set_additionalName(v:String);virtual;
function Get_follows:IPerson;virtual;
procedure Set_follows(v:IPerson);virtual;
function Get_spouse:IPerson;virtual;
procedure Set_spouse(v:IPerson);virtual;
function Get_knows:IPerson;virtual;
procedure Set_knows(v:IPerson);virtual;
function Get_birthDate:TDateTime;virtual;
procedure Set_birthDate(v:TDateTime);virtual;
function Get_gender:String;virtual;
procedure Set_gender(v:String);virtual;
function Get_siblings:IPerson;virtual;
procedure Set_siblings(v:IPerson);virtual;
function Get_children:IPerson;virtual;
procedure Set_children(v:IPerson);virtual;
function Get_funder:IPerson;virtual;
procedure Set_funder(v:IPerson);virtual;
function Get_affiliation:IOrganization;virtual;
procedure Set_affiliation(v:IOrganization);virtual;
function Get_honorificPrefix:String;virtual;
procedure Set_honorificPrefix(v:String);virtual;
function Get_netWorth:IPriceSpecification;virtual;
procedure Set_netWorth(v:IPriceSpecification);virtual;
function Get_familyName:String;virtual;
procedure Set_familyName(v:String);virtual;
function Get_parents:IPerson;virtual;
procedure Set_parents(v:IPerson);virtual;
function Get_homeLocation:IPlace;virtual;
procedure Set_homeLocation(v:IPlace);virtual;
function Get_nationality:ICountry;virtual;
procedure Set_nationality(v:ICountry);virtual;
function Get_jobTitle:String;virtual;
procedure Set_jobTitle(v:String);virtual;
function Get_performerIn:IEvent;virtual;
procedure Set_performerIn(v:IEvent);virtual;
function Get_alumniOf:IEducationalOrganization;virtual;
procedure Set_alumniOf(v:IEducationalOrganization);virtual;
public
property workLocation:IContactPoint read Get_workLocation write Set_workLocation;
property birthPlace:IPlace read Get_birthPlace write Set_birthPlace;
property relatedTo:IPerson read Get_relatedTo write Set_relatedTo;
property deathPlace:IPlace read Get_deathPlace write Set_deathPlace;
property colleagues:IPerson read Get_colleagues write Set_colleagues;
property worksFor:IOrganization read Get_worksFor write Set_worksFor;
property follows:IPerson read Get_follows write Set_follows;
property spouse:IPerson read Get_spouse write Set_spouse;
property knows:IPerson read Get_knows write Set_knows;
property siblings:IPerson read Get_siblings write Set_siblings;
property children:IPerson read Get_children write Set_children;
property funder:IPerson read Get_funder write Set_funder;
property affiliation:IOrganization read Get_affiliation write Set_affiliation;
property netWorth:IPriceSpecification read Get_netWorth write Set_netWorth;
property parents:IPerson read Get_parents write Set_parents;
property homeLocation:IPlace read Get_homeLocation write Set_homeLocation;
property nationality:ICountry read Get_nationality write Set_nationality;
property performerIn:IEvent read Get_performerIn write Set_performerIn;
property alumniOf:IEducationalOrganization read Get_alumniOf write Set_alumniOf;
published
property vatID:String read Get_vatID write Set_vatID;
property naics:String read Get_naics write Set_naics;
property givenName:String read Get_givenName write Set_givenName;
property deathDate:TDateTime read Get_deathDate write Set_deathDate;
property honorificSuffix:String read Get_honorificSuffix write Set_honorificSuffix;
property isicV4:String read Get_isicV4 write Set_isicV4;
property additionalName:String read Get_additionalName write Set_additionalName;
property birthDate:TDateTime read Get_birthDate write Set_birthDate;
property gender:String read Get_gender write Set_gender;
property honorificPrefix:String read Get_honorificPrefix write Set_honorificPrefix;
property familyName:String read Get_familyName write Set_familyName;
property jobTitle:String read Get_jobTitle write Set_jobTitle;
end;
(*StructuredValue*)
TStructuredValue=Class (TIntangible,IStructuredValue)
function TangStructuredValue:TangibleValue;virtual;
end;
TContactPointOption=Class; //forward
TOpeningHoursSpecification=Class; //forward
(*ContactPoint*)
TContactPoint=Class (TStructuredValue,IContactPoint)
private
FavailableLanguage:String;
FcontactType:String;
FproductSupported:String;
FcontactOption:IContactPointOption;
FhoursAvailable:IOpeningHoursSpecification;
protected
function Get_availableLanguage:String;virtual;
procedure Set_availableLanguage(v:String);virtual;
function Get_contactType:String;virtual;
procedure Set_contactType(v:String);virtual;
function Get_productSupported:String;virtual;
procedure Set_productSupported(v:String);virtual;
function Get_contactOption:IContactPointOption;virtual;
procedure Set_contactOption(v:IContactPointOption);virtual;
function Get_hoursAvailable:IOpeningHoursSpecification;virtual;
procedure Set_hoursAvailable(v:IOpeningHoursSpecification);virtual;
public
property contactOption:IContactPointOption read Get_contactOption write Set_contactOption;
property hoursAvailable:IOpeningHoursSpecification read Get_hoursAvailable write Set_hoursAvailable;
published
property availableLanguage:String read Get_availableLanguage write Set_availableLanguage;
property contactType:String read Get_contactType write Set_contactType;
property productSupported:String read Get_productSupported write Set_productSupported;
end;
(*Enumeration*)
TEnumeration=Class (TIntangible,IEnumeration)
function TangEnumeration:TangibleValue;virtual;
end;
(*ContactPointOption*)
TContactPointOption=Class (TEnumeration,IContactPointOption)
function TangContactPointOption:TangibleValue;virtual;
end;
TDayOfWeek=Class; //forward
(*OpeningHoursSpecification*)
TOpeningHoursSpecification=Class (TStructuredValue,IOpeningHoursSpecification)
private
Fopens:TDateTime;
FdayOfWeek:IDayOfWeek;
Fcloses:TDateTime;
protected
function Get_opens:TDateTime;virtual;
procedure Set_opens(v:TDateTime);virtual;
function Get_dayOfWeek:IDayOfWeek;virtual;
procedure Set_dayOfWeek(v:IDayOfWeek);virtual;
function Get_closes:TDateTime;virtual;
procedure Set_closes(v:TDateTime);virtual;
public
property dayOfWeek:IDayOfWeek read Get_dayOfWeek write Set_dayOfWeek;
published
property opens:TDateTime read Get_opens write Set_opens;
property closes:TDateTime read Get_closes write Set_closes;
end;
(*DayOfWeek*)
TDayOfWeek=Class (TEnumeration,IDayOfWeek)
function TangDayOfWeek:TangibleValue;virtual;
end;
TGeoShape=Class; //forward
TImageObject=Class; //forward
(*Place*)
TPlace=Class (TThing,IPlace)
private
Fmap:String;
Fmaps:String;
FopeningHoursSpecification:IOpeningHoursSpecification;
Fgeo:IGeoShape;
FfaxNumber:String;
FspecialOpeningHoursSpecification:IOpeningHoursSpecification;
Ftelephone:String;
FbranchCode:String;
FmaximumAttendeeCapacity:Integer;
Fphotos:IImageObject;
FsmokingAllowed:Boolean;
FcontainedIn:IPlace;
FcontainsPlace:IPlace;
protected
function Get_map:String;virtual;
procedure Set_map(v:String);virtual;
function Get_maps:String;virtual;
procedure Set_maps(v:String);virtual;
function Get_openingHoursSpecification:IOpeningHoursSpecification;virtual;
procedure Set_openingHoursSpecification(v:IOpeningHoursSpecification);virtual;
function Get_geo:IGeoShape;virtual;
procedure Set_geo(v:IGeoShape);virtual;
function Get_faxNumber:String;virtual;
procedure Set_faxNumber(v:String);virtual;
function Get_specialOpeningHoursSpecification:IOpeningHoursSpecification;virtual;
procedure Set_specialOpeningHoursSpecification(v:IOpeningHoursSpecification);virtual;
function Get_telephone:String;virtual;
procedure Set_telephone(v:String);virtual;
function Get_branchCode:String;virtual;
procedure Set_branchCode(v:String);virtual;
function Get_maximumAttendeeCapacity:Integer;virtual;
procedure Set_maximumAttendeeCapacity(v:Integer);virtual;
function Get_photos:IImageObject;virtual;
procedure Set_photos(v:IImageObject);virtual;
function Get_smokingAllowed:Boolean;virtual;
procedure Set_smokingAllowed(v:Boolean);virtual;
function Get_containedIn:IPlace;virtual;
procedure Set_containedIn(v:IPlace);virtual;
function Get_containsPlace:IPlace;virtual;
procedure Set_containsPlace(v:IPlace);virtual;
public
property openingHoursSpecification:IOpeningHoursSpecification read Get_openingHoursSpecification write Set_openingHoursSpecification;
property geo:IGeoShape read Get_geo write Set_geo;
property specialOpeningHoursSpecification:IOpeningHoursSpecification read Get_specialOpeningHoursSpecification write Set_specialOpeningHoursSpecification;
property photos:IImageObject read Get_photos write Set_photos;
property containedIn:IPlace read Get_containedIn write Set_containedIn;
property containsPlace:IPlace read Get_containsPlace write Set_containsPlace;
published
property map:String read Get_map write Set_map;
property maps:String read Get_maps write Set_maps;
property faxNumber:String read Get_faxNumber write Set_faxNumber;
property telephone:String read Get_telephone write Set_telephone;
property branchCode:String read Get_branchCode write Set_branchCode;
property maximumAttendeeCapacity:Integer read Get_maximumAttendeeCapacity write Set_maximumAttendeeCapacity;
property smokingAllowed:Boolean read Get_smokingAllowed write Set_smokingAllowed;
end;
TPostalAddress=Class; //forward
(*GeoShape*)
TGeoShape=Class (TStructuredValue,IGeoShape)
private
FaddressCountry:ICountry;
Fpolygon:String;
Faddress:IPostalAddress;
Fline:String;
Fcircle:String;
Felevation:INumber;
Fbox:String;
protected
function Get_addressCountry:ICountry;virtual;
procedure Set_addressCountry(v:ICountry);virtual;
function Get_polygon:String;virtual;
procedure Set_polygon(v:String);virtual;
function Get_address:IPostalAddress;virtual;
procedure Set_address(v:IPostalAddress);virtual;
function Get_line:String;virtual;
procedure Set_line(v:String);virtual;
function Get_circle:String;virtual;
procedure Set_circle(v:String);virtual;
function Get_elevation:INumber;virtual;
procedure Set_elevation(v:INumber);virtual;
function Get_box:String;virtual;
procedure Set_box(v:String);virtual;
public
property addressCountry:ICountry read Get_addressCountry write Set_addressCountry;
property address:IPostalAddress read Get_address write Set_address;
property elevation:INumber read Get_elevation write Set_elevation;
published
property polygon:String read Get_polygon write Set_polygon;
property line:String read Get_line write Set_line;
property circle:String read Get_circle write Set_circle;
property box:String read Get_box write Set_box;
end;
(*AdministrativeArea*)
TAdministrativeArea=Class (TPlace,IAdministrativeArea)
(*No atribs*)
end;
(*Country*)
TCountry=Class (TAdministrativeArea,ICountry)
(*No atribs*)
end;
(*PostalAddress*)
TPostalAddress=Class (TContactPoint,IPostalAddress)
private
FaddressRegion:String;
FstreetAddress:String;
FpostOfficeBoxNumber:String;
FaddressLocality:String;
protected
function Get_addressRegion:String;virtual;
procedure Set_addressRegion(v:String);virtual;
function Get_streetAddress:String;virtual;
procedure Set_streetAddress(v:String);virtual;
function Get_postOfficeBoxNumber:String;virtual;
procedure Set_postOfficeBoxNumber(v:String);virtual;
function Get_addressLocality:String;virtual;
procedure Set_addressLocality(v:String);virtual;
public
published
property addressRegion:String read Get_addressRegion write Set_addressRegion;
property streetAddress:String read Get_streetAddress write Set_streetAddress;
property postOfficeBoxNumber:String read Get_postOfficeBoxNumber write Set_postOfficeBoxNumber;
property addressLocality:String read Get_addressLocality write Set_addressLocality;
end;
(*Number*)
TNumber=Class (TBaseSchema,INumber)
(*No atribs*)
end;
TNewsArticle=Class; //forward
(*MediaObject*)
TMediaObject=Class (TCreativeWork,IMediaObject)
private
FencodingFormat:String;
Fbitrate:String;
FregionsAllowed:IPlace;
Fexpires:TDateTime;
FrequiresSubscription:Boolean;
FuploadDate:TDateTime;
FassociatedArticle:INewsArticle;
FencodesCreativeWork:ICreativeWork;
FcontentUrl:String;
FembedUrl:String;
FplayerType:String;
FcontentSize:String;
protected
function Get_encodingFormat:String;virtual;
procedure Set_encodingFormat(v:String);virtual;
function Get_bitrate:String;virtual;
procedure Set_bitrate(v:String);virtual;
function Get_regionsAllowed:IPlace;virtual;
procedure Set_regionsAllowed(v:IPlace);virtual;
function Get_expires:TDateTime;virtual;
procedure Set_expires(v:TDateTime);virtual;
function Get_requiresSubscription:Boolean;virtual;
procedure Set_requiresSubscription(v:Boolean);virtual;
function Get_uploadDate:TDateTime;virtual;
procedure Set_uploadDate(v:TDateTime);virtual;
function Get_associatedArticle:INewsArticle;virtual;
procedure Set_associatedArticle(v:INewsArticle);virtual;
function Get_encodesCreativeWork:ICreativeWork;virtual;
procedure Set_encodesCreativeWork(v:ICreativeWork);virtual;
function Get_contentUrl:String;virtual;
procedure Set_contentUrl(v:String);virtual;
function Get_embedUrl:String;virtual;
procedure Set_embedUrl(v:String);virtual;
function Get_playerType:String;virtual;
procedure Set_playerType(v:String);virtual;
function Get_contentSize:String;virtual;
procedure Set_contentSize(v:String);virtual;
public
property regionsAllowed:IPlace read Get_regionsAllowed write Set_regionsAllowed;
property associatedArticle:INewsArticle read Get_associatedArticle write Set_associatedArticle;
property encodesCreativeWork:ICreativeWork read Get_encodesCreativeWork write Set_encodesCreativeWork;
published
property encodingFormat:String read Get_encodingFormat write Set_encodingFormat;
property bitrate:String read Get_bitrate write Set_bitrate;
property expires:TDateTime read Get_expires write Set_expires;
property requiresSubscription:Boolean read Get_requiresSubscription write Set_requiresSubscription;
property uploadDate:TDateTime read Get_uploadDate write Set_uploadDate;
property contentUrl:String read Get_contentUrl write Set_contentUrl;
property embedUrl:String read Get_embedUrl write Set_embedUrl;
property playerType:String read Get_playerType write Set_playerType;
property contentSize:String read Get_contentSize write Set_contentSize;
end;
(*Article*)
TArticle=Class (TCreativeWork,IArticle)
private
FwordCount:Integer;
FpageEnd:String;
FarticleSection:String;
FarticleBody:String;
protected
function Get_wordCount:Integer;virtual;
procedure Set_wordCount(v:Integer);virtual;
function Get_pageEnd:String;virtual;
procedure Set_pageEnd(v:String);virtual;
function Get_articleSection:String;virtual;
procedure Set_articleSection(v:String);virtual;
function Get_articleBody:String;virtual;
procedure Set_articleBody(v:String);virtual;
public
published
property wordCount:Integer read Get_wordCount write Set_wordCount;
property pageEnd:String read Get_pageEnd write Set_pageEnd;
property articleSection:String read Get_articleSection write Set_articleSection;
property articleBody:String read Get_articleBody write Set_articleBody;
end;
(*NewsArticle*)
TNewsArticle=Class (TArticle,INewsArticle)
private
FprintEdition:String;
FprintColumn:String;
FprintPage:String;
FprintSection:String;
Fdateline:String;
protected
function Get_printEdition:String;virtual;
procedure Set_printEdition(v:String);virtual;
function Get_printColumn:String;virtual;
procedure Set_printColumn(v:String);virtual;
function Get_printPage:String;virtual;
procedure Set_printPage(v:String);virtual;
function Get_printSection:String;virtual;
procedure Set_printSection(v:String);virtual;
function Get_dateline:String;virtual;
procedure Set_dateline(v:String);virtual;
public
published
property printEdition:String read Get_printEdition write Set_printEdition;
property printColumn:String read Get_printColumn write Set_printColumn;
property printPage:String read Get_printPage write Set_printPage;
property printSection:String read Get_printSection write Set_printSection;
property dateline:String read Get_dateline write Set_dateline;
end;
(*ImageObject*)
TImageObject=Class (TMediaObject,IImageObject)
private
Fcaption:String;
FexifData:String;
FrepresentativeOfPage:Boolean;
protected
function Get_caption:String;virtual;
procedure Set_caption(v:String);virtual;
function Get_exifData:String;virtual;
procedure Set_exifData(v:String);virtual;
function Get_representativeOfPage:Boolean;virtual;
procedure Set_representativeOfPage(v:Boolean);virtual;
public
published
property caption:String read Get_caption write Set_caption;
property exifData:String read Get_exifData write Set_exifData;
property representativeOfPage:Boolean read Get_representativeOfPage write Set_representativeOfPage;
end;
TOfferCatalog=Class; //forward
TDemand=Class; //forward
TOffer=Class; //forward
(*Organization*)
TOrganization=Class (TThing,IOrganization)
private
Femail:String;
FhasOfferCatalog:IOfferCatalog;
FleiCode:String;
Fowns:IProduct;
Ffounders:IPerson;
Fmembers:IOrganization;
FhasPOS:IPlace;
FdissolutionDate:TDateTime;
Flogo:IImageObject;
FtaxID:String;
Fbrand:IOrganization;
FglobalLocationNumber:String;
Fduns:String;
FfoundingDate:TDateTime;
Fevents:IEvent;
Femployees:IPerson;
FlegalName:String;
Fdepartment:IOrganization;
Fseeks:IDemand;
FcontactPoints:IContactPoint;
FfoundingLocation:IPlace;
FsubOrganization:IOrganization;
FmakesOffer:IOffer;
protected
function Get_email:String;virtual;
procedure Set_email(v:String);virtual;
function Get_hasOfferCatalog:IOfferCatalog;virtual;
procedure Set_hasOfferCatalog(v:IOfferCatalog);virtual;
function Get_leiCode:String;virtual;
procedure Set_leiCode(v:String);virtual;
function Get_owns:IProduct;virtual;
procedure Set_owns(v:IProduct);virtual;
function Get_founders:IPerson;virtual;
procedure Set_founders(v:IPerson);virtual;
function Get_members:IOrganization;virtual;
procedure Set_members(v:IOrganization);virtual;
function Get_hasPOS:IPlace;virtual;
procedure Set_hasPOS(v:IPlace);virtual;
function Get_dissolutionDate:TDateTime;virtual;
procedure Set_dissolutionDate(v:TDateTime);virtual;
function Get_logo:IImageObject;virtual;
procedure Set_logo(v:IImageObject);virtual;
function Get_taxID:String;virtual;
procedure Set_taxID(v:String);virtual;
function Get_brand:IOrganization;virtual;
procedure Set_brand(v:IOrganization);virtual;
function Get_globalLocationNumber:String;virtual;
procedure Set_globalLocationNumber(v:String);virtual;
function Get_duns:String;virtual;
procedure Set_duns(v:String);virtual;
function Get_foundingDate:TDateTime;virtual;
procedure Set_foundingDate(v:TDateTime);virtual;
function Get_events:IEvent;virtual;
procedure Set_events(v:IEvent);virtual;
function Get_employees:IPerson;virtual;
procedure Set_employees(v:IPerson);virtual;
function Get_legalName:String;virtual;
procedure Set_legalName(v:String);virtual;
function Get_department:IOrganization;virtual;
procedure Set_department(v:IOrganization);virtual;
function Get_seeks:IDemand;virtual;
procedure Set_seeks(v:IDemand);virtual;
function Get_contactPoints:IContactPoint;virtual;
procedure Set_contactPoints(v:IContactPoint);virtual;
function Get_foundingLocation:IPlace;virtual;
procedure Set_foundingLocation(v:IPlace);virtual;
function Get_subOrganization:IOrganization;virtual;
procedure Set_subOrganization(v:IOrganization);virtual;
function Get_makesOffer:IOffer;virtual;
procedure Set_makesOffer(v:IOffer);virtual;
public
property hasOfferCatalog:IOfferCatalog read Get_hasOfferCatalog write Set_hasOfferCatalog;
property owns:IProduct read Get_owns write Set_owns;
property founders:IPerson read Get_founders write Set_founders;
property members:IOrganization read Get_members write Set_members;
property hasPOS:IPlace read Get_hasPOS write Set_hasPOS;
property logo:IImageObject read Get_logo write Set_logo;
property brand:IOrganization read Get_brand write Set_brand;
property events:IEvent read Get_events write Set_events;
property employees:IPerson read Get_employees write Set_employees;
property department:IOrganization read Get_department write Set_department;
property seeks:IDemand read Get_seeks write Set_seeks;
property contactPoints:IContactPoint read Get_contactPoints write Set_contactPoints;
property foundingLocation:IPlace read Get_foundingLocation write Set_foundingLocation;
property subOrganization:IOrganization read Get_subOrganization write Set_subOrganization;
property makesOffer:IOffer read Get_makesOffer write Set_makesOffer;
published
property email:String read Get_email write Set_email;
property leiCode:String read Get_leiCode write Set_leiCode;
property dissolutionDate:TDateTime read Get_dissolutionDate write Set_dissolutionDate;
property taxID:String read Get_taxID write Set_taxID;
property globalLocationNumber:String read Get_globalLocationNumber write Set_globalLocationNumber;
property duns:String read Get_duns write Set_duns;
property foundingDate:TDateTime read Get_foundingDate write Set_foundingDate;
property legalName:String read Get_legalName write Set_legalName;
end;
(*ItemList*)
TItemList=Class (TIntangible,IItemList)
private
FnumberOfItems:Integer;
FitemListOrder:String;
FitemListElement:IThing;
protected
function Get_numberOfItems:Integer;virtual;
procedure Set_numberOfItems(v:Integer);virtual;
function Get_itemListOrder:String;virtual;
procedure Set_itemListOrder(v:String);virtual;
function Get_itemListElement:IThing;virtual;
procedure Set_itemListElement(v:IThing);virtual;
public
property itemListElement:IThing read Get_itemListElement write Set_itemListElement;
published
property numberOfItems:Integer read Get_numberOfItems write Set_numberOfItems;
property itemListOrder:String read Get_itemListOrder write Set_itemListOrder;
end;
(*OfferCatalog*)
TOfferCatalog=Class (TItemList,IOfferCatalog)
function TangOfferCatalog:TangibleValue;virtual;
end;
TProductModel=Class; //forward
TService=Class; //forward
TQuantitativeValue=Class; //forward
(*Product*)
TProduct=Class (TThing,IProduct)
private
Fcolor:String;
FreleaseDate:TDateTime;
Fmodel:IProductModel;
Fcategory:IThing;
FisAccessoryOrSparePartFor:IProduct;
Fgtin8:String;
FisSimilarTo:IService;
Fweight:IQuantitativeValue;
FisConsumableFor:IProduct;
Fgtin12:String;
FproductID:String;
protected
function Get_color:String;virtual;
procedure Set_color(v:String);virtual;
function Get_releaseDate:TDateTime;virtual;
procedure Set_releaseDate(v:TDateTime);virtual;
function Get_model:IProductModel;virtual;
procedure Set_model(v:IProductModel);virtual;
function Get_category:IThing;virtual;
procedure Set_category(v:IThing);virtual;
function Get_isAccessoryOrSparePartFor:IProduct;virtual;
procedure Set_isAccessoryOrSparePartFor(v:IProduct);virtual;
function Get_gtin8:String;virtual;
procedure Set_gtin8(v:String);virtual;
function Get_isSimilarTo:IService;virtual;
procedure Set_isSimilarTo(v:IService);virtual;
function Get_weight:IQuantitativeValue;virtual;
procedure Set_weight(v:IQuantitativeValue);virtual;
function Get_isConsumableFor:IProduct;virtual;
procedure Set_isConsumableFor(v:IProduct);virtual;
function Get_gtin12:String;virtual;
procedure Set_gtin12(v:String);virtual;
function Get_productID:String;virtual;
procedure Set_productID(v:String);virtual;
public
property model:IProductModel read Get_model write Set_model;
property category:IThing read Get_category write Set_category;
property isAccessoryOrSparePartFor:IProduct read Get_isAccessoryOrSparePartFor write Set_isAccessoryOrSparePartFor;
property isSimilarTo:IService read Get_isSimilarTo write Set_isSimilarTo;
property weight:IQuantitativeValue read Get_weight write Set_weight;
property isConsumableFor:IProduct read Get_isConsumableFor write Set_isConsumableFor;
published
property color:String read Get_color write Set_color;
property releaseDate:TDateTime read Get_releaseDate write Set_releaseDate;
property gtin8:String read Get_gtin8 write Set_gtin8;
property gtin12:String read Get_gtin12 write Set_gtin12;
property productID:String read Get_productID write Set_productID;
end;
(*ProductModel*)
TProductModel=Class (TProduct,IProductModel)
private
FpredecessorOf:IProductModel;
FisVariantOf:IProductModel;
FsuccessorOf:IProductModel;
protected
function Get_predecessorOf:IProductModel;virtual;
procedure Set_predecessorOf(v:IProductModel);virtual;
function Get_isVariantOf:IProductModel;virtual;
procedure Set_isVariantOf(v:IProductModel);virtual;
function Get_successorOf:IProductModel;virtual;
procedure Set_successorOf(v:IProductModel);virtual;
public
property predecessorOf:IProductModel read Get_predecessorOf write Set_predecessorOf;
property isVariantOf:IProductModel read Get_isVariantOf write Set_isVariantOf;
property successorOf:IProductModel read Get_successorOf write Set_successorOf;
published
end;
TAudience=Class; //forward
TServiceChannel=Class; //forward
(*Service*)
TService=Class (TIntangible,IService)
private
FisRelatedTo:IService;
Fproduces:IThing;
FserviceAudience:IAudience;
FproviderMobility:String;
FavailableChannel:IServiceChannel;
FserviceType:String;
protected
function Get_isRelatedTo:IService;virtual;
procedure Set_isRelatedTo(v:IService);virtual;
function Get_produces:IThing;virtual;
procedure Set_produces(v:IThing);virtual;
function Get_serviceAudience:IAudience;virtual;
procedure Set_serviceAudience(v:IAudience);virtual;
function Get_providerMobility:String;virtual;
procedure Set_providerMobility(v:String);virtual;
function Get_availableChannel:IServiceChannel;virtual;
procedure Set_availableChannel(v:IServiceChannel);virtual;
function Get_serviceType:String;virtual;
procedure Set_serviceType(v:String);virtual;
public
property isRelatedTo:IService read Get_isRelatedTo write Set_isRelatedTo;
property produces:IThing read Get_produces write Set_produces;
property serviceAudience:IAudience read Get_serviceAudience write Set_serviceAudience;
property availableChannel:IServiceChannel read Get_availableChannel write Set_availableChannel;
published
property providerMobility:String read Get_providerMobility write Set_providerMobility;
property serviceType:String read Get_serviceType write Set_serviceType;
end;
(*Audience*)
TAudience=Class (TIntangible,IAudience)
private
FaudienceType:String;
FgeographicArea:IAdministrativeArea;
protected
function Get_audienceType:String;virtual;
procedure Set_audienceType(v:String);virtual;
function Get_geographicArea:IAdministrativeArea;virtual;
procedure Set_geographicArea(v:IAdministrativeArea);virtual;
public
property geographicArea:IAdministrativeArea read Get_geographicArea write Set_geographicArea;
published
property audienceType:String read Get_audienceType write Set_audienceType;
end;
(*ServiceChannel*)
TServiceChannel=Class (TIntangible,IServiceChannel)
private
FservicePhone:IContactPoint;
FserviceLocation:IPlace;
FserviceSmsNumber:IContactPoint;
FserviceUrl:String;
FservicePostalAddress:IPostalAddress;
FprovidesService:IService;
FprocessingTime:IDuration;
protected
function Get_servicePhone:IContactPoint;virtual;
procedure Set_servicePhone(v:IContactPoint);virtual;
function Get_serviceLocation:IPlace;virtual;
procedure Set_serviceLocation(v:IPlace);virtual;
function Get_serviceSmsNumber:IContactPoint;virtual;
procedure Set_serviceSmsNumber(v:IContactPoint);virtual;
function Get_serviceUrl:String;virtual;
procedure Set_serviceUrl(v:String);virtual;
function Get_servicePostalAddress:IPostalAddress;virtual;
procedure Set_servicePostalAddress(v:IPostalAddress);virtual;
function Get_providesService:IService;virtual;
procedure Set_providesService(v:IService);virtual;
function Get_processingTime:IDuration;virtual;
procedure Set_processingTime(v:IDuration);virtual;
public
property servicePhone:IContactPoint read Get_servicePhone write Set_servicePhone;
property serviceLocation:IPlace read Get_serviceLocation write Set_serviceLocation;
property serviceSmsNumber:IContactPoint read Get_serviceSmsNumber write Set_serviceSmsNumber;
property servicePostalAddress:IPostalAddress read Get_servicePostalAddress write Set_servicePostalAddress;
property providesService:IService read Get_providesService write Set_providesService;
property processingTime:IDuration read Get_processingTime write Set_processingTime;
published
property serviceUrl:String read Get_serviceUrl write Set_serviceUrl;
end;
(*Quantity*)
TQuantity=Class (TIntangible,IQuantity)
function TangQuantity:TangibleValue;virtual;
end;
(*Duration*)
TDuration=Class (TQuantity,IDuration)
function TangDuration:TangibleValue;virtual;
end;
(*QuantitativeValue*)
TQuantitativeValue=Class (TStructuredValue,IQuantitativeValue)
private
FmaxValue:INumber;
FvalueReference:IQuantitativeValue;
FunitText:String;
protected
function Get_maxValue:INumber;virtual;
procedure Set_maxValue(v:INumber);virtual;
function Get_valueReference:IQuantitativeValue;virtual;
procedure Set_valueReference(v:IQuantitativeValue);virtual;
function Get_unitText:String;virtual;
procedure Set_unitText(v:String);virtual;
public
property maxValue:INumber read Get_maxValue write Set_maxValue;
property valueReference:IQuantitativeValue read Get_valueReference write Set_valueReference;
published
property unitText:String read Get_unitText write Set_unitText;
end;
TEventStatusType=Class; //forward
(*Event*)
TEvent=Class (TThing,IEvent)
private
FeventStatus:IEventStatusType;
Fattendees:IOrganization;
Fcomposer:IOrganization;
FstartDate:TDateTime;
FpreviousStartDate:TDateTime;
Fperformers:IPerson;
FsubEvents:IEvent;
Fcontributor:IOrganization;
Forganizer:IOrganization;
FtypicalAgeRange:String;
Foffers:IOffer;
FremainingAttendeeCapacity:Integer;
FworkPerformed:ICreativeWork;
FdoorTime:TDateTime;
FsuperEvent:IEvent;
FrecordedIn:ICreativeWork;
protected
function Get_eventStatus:IEventStatusType;virtual;
procedure Set_eventStatus(v:IEventStatusType);virtual;
function Get_attendees:IOrganization;virtual;
procedure Set_attendees(v:IOrganization);virtual;
function Get_composer:IOrganization;virtual;
procedure Set_composer(v:IOrganization);virtual;
function Get_startDate:TDateTime;virtual;
procedure Set_startDate(v:TDateTime);virtual;
function Get_previousStartDate:TDateTime;virtual;
procedure Set_previousStartDate(v:TDateTime);virtual;
function Get_performers:IPerson;virtual;
procedure Set_performers(v:IPerson);virtual;
function Get_subEvents:IEvent;virtual;
procedure Set_subEvents(v:IEvent);virtual;
function Get_contributor:IOrganization;virtual;
procedure Set_contributor(v:IOrganization);virtual;
function Get_organizer:IOrganization;virtual;
procedure Set_organizer(v:IOrganization);virtual;
function Get_typicalAgeRange:String;virtual;
procedure Set_typicalAgeRange(v:String);virtual;
function Get_offers:IOffer;virtual;
procedure Set_offers(v:IOffer);virtual;
function Get_remainingAttendeeCapacity:Integer;virtual;
procedure Set_remainingAttendeeCapacity(v:Integer);virtual;
function Get_workPerformed:ICreativeWork;virtual;
procedure Set_workPerformed(v:ICreativeWork);virtual;
function Get_doorTime:TDateTime;virtual;
procedure Set_doorTime(v:TDateTime);virtual;
function Get_superEvent:IEvent;virtual;
procedure Set_superEvent(v:IEvent);virtual;
function Get_recordedIn:ICreativeWork;virtual;
procedure Set_recordedIn(v:ICreativeWork);virtual;
public
property eventStatus:IEventStatusType read Get_eventStatus write Set_eventStatus;
property attendees:IOrganization read Get_attendees write Set_attendees;
property composer:IOrganization read Get_composer write Set_composer;
property performers:IPerson read Get_performers write Set_performers;
property subEvents:IEvent read Get_subEvents write Set_subEvents;
property contributor:IOrganization read Get_contributor write Set_contributor;
property organizer:IOrganization read Get_organizer write Set_organizer;
property offers:IOffer read Get_offers write Set_offers;
property workPerformed:ICreativeWork read Get_workPerformed write Set_workPerformed;
property superEvent:IEvent read Get_superEvent write Set_superEvent;
property recordedIn:ICreativeWork read Get_recordedIn write Set_recordedIn;
published
property startDate:TDateTime read Get_startDate write Set_startDate;
property previousStartDate:TDateTime read Get_previousStartDate write Set_previousStartDate;
property typicalAgeRange:String read Get_typicalAgeRange write Set_typicalAgeRange;
property remainingAttendeeCapacity:Integer read Get_remainingAttendeeCapacity write Set_remainingAttendeeCapacity;
property doorTime:TDateTime read Get_doorTime write Set_doorTime;
end;
(*EventStatusType*)
TEventStatusType=Class (TEnumeration,IEventStatusType)
function TangEventStatusType:TangibleValue;virtual;
end;
TAggregateRating=Class; //forward
TDeliveryMethod=Class; //forward
TPaymentMethod=Class; //forward
(*Offer*)
TOffer=Class (TIntangible,IOffer)
private
FaggregateRating:IAggregateRating;
FavailabilityStarts:TDateTime;
Fsku:String;
FitemOffered:IProduct;
FavailableAtOrFrom:IPlace;
FaddOn:IOffer;
FeligibleQuantity:IQuantitativeValue;
FavailableDeliveryMethod:IDeliveryMethod;
FdeliveryLeadTime:IQuantitativeValue;
FacceptedPaymentMethod:IPaymentMethod;
FadvanceBookingRequirement:IQuantitativeValue;
FpriceValidUntil:TDateTime;
protected
function Get_aggregateRating:IAggregateRating;virtual;
procedure Set_aggregateRating(v:IAggregateRating);virtual;
function Get_availabilityStarts:TDateTime;virtual;
procedure Set_availabilityStarts(v:TDateTime);virtual;
function Get_sku:String;virtual;
procedure Set_sku(v:String);virtual;
function Get_itemOffered:IProduct;virtual;
procedure Set_itemOffered(v:IProduct);virtual;
function Get_availableAtOrFrom:IPlace;virtual;
procedure Set_availableAtOrFrom(v:IPlace);virtual;
function Get_addOn:IOffer;virtual;
procedure Set_addOn(v:IOffer);virtual;
function Get_eligibleQuantity:IQuantitativeValue;virtual;
procedure Set_eligibleQuantity(v:IQuantitativeValue);virtual;
function Get_availableDeliveryMethod:IDeliveryMethod;virtual;
procedure Set_availableDeliveryMethod(v:IDeliveryMethod);virtual;
function Get_deliveryLeadTime:IQuantitativeValue;virtual;
procedure Set_deliveryLeadTime(v:IQuantitativeValue);virtual;
function Get_acceptedPaymentMethod:IPaymentMethod;virtual;
procedure Set_acceptedPaymentMethod(v:IPaymentMethod);virtual;
function Get_advanceBookingRequirement:IQuantitativeValue;virtual;
procedure Set_advanceBookingRequirement(v:IQuantitativeValue);virtual;
function Get_priceValidUntil:TDateTime;virtual;
procedure Set_priceValidUntil(v:TDateTime);virtual;
public
property aggregateRating:IAggregateRating read Get_aggregateRating write Set_aggregateRating;
property itemOffered:IProduct read Get_itemOffered write Set_itemOffered;
property availableAtOrFrom:IPlace read Get_availableAtOrFrom write Set_availableAtOrFrom;
property addOn:IOffer read Get_addOn write Set_addOn;
property eligibleQuantity:IQuantitativeValue read Get_eligibleQuantity write Set_eligibleQuantity;
property availableDeliveryMethod:IDeliveryMethod read Get_availableDeliveryMethod write Set_availableDeliveryMethod;
property deliveryLeadTime:IQuantitativeValue read Get_deliveryLeadTime write Set_deliveryLeadTime;
property acceptedPaymentMethod:IPaymentMethod read Get_acceptedPaymentMethod write Set_acceptedPaymentMethod;
property advanceBookingRequirement:IQuantitativeValue read Get_advanceBookingRequirement write Set_advanceBookingRequirement;
published
property availabilityStarts:TDateTime read Get_availabilityStarts write Set_availabilityStarts;
property sku:String read Get_sku write Set_sku;
property priceValidUntil:TDateTime read Get_priceValidUntil write Set_priceValidUntil;
end;
(*AggregateRating*)
TAggregateRating=Class (TRating,IAggregateRating)
private
FratingCount:Integer;
FreviewCount:Integer;
protected
function Get_ratingCount:Integer;virtual;
procedure Set_ratingCount(v:Integer);virtual;
function Get_reviewCount:Integer;virtual;
procedure Set_reviewCount(v:Integer);virtual;
public
published
property ratingCount:Integer read Get_ratingCount write Set_ratingCount;
property reviewCount:Integer read Get_reviewCount write Set_reviewCount;
end;
(*DeliveryMethod*)
TDeliveryMethod=Class (TEnumeration,IDeliveryMethod)
function TangDeliveryMethod:TangibleValue;virtual;
end;
(*PaymentMethod*)
TPaymentMethod=Class (TEnumeration,IPaymentMethod)
function TangPaymentMethod:TangibleValue;virtual;
end;
TOfferItemCondition=Class; //forward
TItemAvailability=Class; //forward
TTypeAndQuantityNode=Class; //forward
TBusinessEntityType=Class; //forward
(*Demand*)
TDemand=Class (TIntangible,IDemand)
private
FavailabilityEnds:TDateTime;
FitemCondition:IOfferItemCondition;
FeligibleDuration:IQuantitativeValue;
Fmpn:String;
Fgtin13:String;
Fgtin14:String;
FvalidFrom:TDateTime;
FineligibleRegion:IPlace;
Favailability:IItemAvailability;
FeligibleTransactionVolume:IPriceSpecification;
FincludesObject:ITypeAndQuantityNode;
FeligibleCustomerType:IBusinessEntityType;
FinventoryLevel:IQuantitativeValue;
protected
function Get_availabilityEnds:TDateTime;virtual;
procedure Set_availabilityEnds(v:TDateTime);virtual;
function Get_itemCondition:IOfferItemCondition;virtual;
procedure Set_itemCondition(v:IOfferItemCondition);virtual;
function Get_eligibleDuration:IQuantitativeValue;virtual;
procedure Set_eligibleDuration(v:IQuantitativeValue);virtual;
function Get_mpn:String;virtual;
procedure Set_mpn(v:String);virtual;
function Get_gtin13:String;virtual;
procedure Set_gtin13(v:String);virtual;
function Get_gtin14:String;virtual;
procedure Set_gtin14(v:String);virtual;
function Get_validFrom:TDateTime;virtual;
procedure Set_validFrom(v:TDateTime);virtual;
function Get_ineligibleRegion:IPlace;virtual;
procedure Set_ineligibleRegion(v:IPlace);virtual;
function Get_availability:IItemAvailability;virtual;
procedure Set_availability(v:IItemAvailability);virtual;
function Get_eligibleTransactionVolume:IPriceSpecification;virtual;
procedure Set_eligibleTransactionVolume(v:IPriceSpecification);virtual;
function Get_includesObject:ITypeAndQuantityNode;virtual;
procedure Set_includesObject(v:ITypeAndQuantityNode);virtual;
function Get_eligibleCustomerType:IBusinessEntityType;virtual;
procedure Set_eligibleCustomerType(v:IBusinessEntityType);virtual;
function Get_inventoryLevel:IQuantitativeValue;virtual;
procedure Set_inventoryLevel(v:IQuantitativeValue);virtual;
public
property itemCondition:IOfferItemCondition read Get_itemCondition write Set_itemCondition;
property eligibleDuration:IQuantitativeValue read Get_eligibleDuration write Set_eligibleDuration;
property ineligibleRegion:IPlace read Get_ineligibleRegion write Set_ineligibleRegion;
property availability:IItemAvailability read Get_availability write Set_availability;
property eligibleTransactionVolume:IPriceSpecification read Get_eligibleTransactionVolume write Set_eligibleTransactionVolume;
property includesObject:ITypeAndQuantityNode read Get_includesObject write Set_includesObject;
property eligibleCustomerType:IBusinessEntityType read Get_eligibleCustomerType write Set_eligibleCustomerType;
property inventoryLevel:IQuantitativeValue read Get_inventoryLevel write Set_inventoryLevel;
published
property availabilityEnds:TDateTime read Get_availabilityEnds write Set_availabilityEnds;
property mpn:String read Get_mpn write Set_mpn;
property gtin13:String read Get_gtin13 write Set_gtin13;
property gtin14:String read Get_gtin14 write Set_gtin14;
property validFrom:TDateTime read Get_validFrom write Set_validFrom;
end;
(*OfferItemCondition*)
TOfferItemCondition=Class (TEnumeration,IOfferItemCondition)
function TangOfferItemCondition:TangibleValue;virtual;
end;
(*ItemAvailability*)
TItemAvailability=Class (TEnumeration,IItemAvailability)
function TangItemAvailability:TangibleValue;virtual;
end;
(*PriceSpecification*)
TPriceSpecification=Class (TStructuredValue,IPriceSpecification)
private
FpriceCurrency:String;
FvalidThrough:TDateTime;
FvalueAddedTaxIncluded:Boolean;
FminPrice:INumber;
FmaxPrice:INumber;
protected
function Get_priceCurrency:String;virtual;
procedure Set_priceCurrency(v:String);virtual;
function Get_validThrough:TDateTime;virtual;
procedure Set_validThrough(v:TDateTime);virtual;
function Get_valueAddedTaxIncluded:Boolean;virtual;
procedure Set_valueAddedTaxIncluded(v:Boolean);virtual;
function Get_minPrice:INumber;virtual;
procedure Set_minPrice(v:INumber);virtual;
function Get_maxPrice:INumber;virtual;
procedure Set_maxPrice(v:INumber);virtual;
public
property minPrice:INumber read Get_minPrice write Set_minPrice;
property maxPrice:INumber read Get_maxPrice write Set_maxPrice;
published
property priceCurrency:String read Get_priceCurrency write Set_priceCurrency;
property validThrough:TDateTime read Get_validThrough write Set_validThrough;
property valueAddedTaxIncluded:Boolean read Get_valueAddedTaxIncluded write Set_valueAddedTaxIncluded;
end;
TBusinessFunction=Class; //forward
(*TypeAndQuantityNode*)
TTypeAndQuantityNode=Class (TStructuredValue,ITypeAndQuantityNode)
private
FtypeOfGood:IService;
FunitCode:String;
FbusinessFunction:IBusinessFunction;
FamountOfThisGood:INumber;
protected
function Get_typeOfGood:IService;virtual;
procedure Set_typeOfGood(v:IService);virtual;
function Get_unitCode:String;virtual;
procedure Set_unitCode(v:String);virtual;
function Get_businessFunction:IBusinessFunction;virtual;
procedure Set_businessFunction(v:IBusinessFunction);virtual;
function Get_amountOfThisGood:INumber;virtual;
procedure Set_amountOfThisGood(v:INumber);virtual;
public
property typeOfGood:IService read Get_typeOfGood write Set_typeOfGood;
property businessFunction:IBusinessFunction read Get_businessFunction write Set_businessFunction;
property amountOfThisGood:INumber read Get_amountOfThisGood write Set_amountOfThisGood;
published
property unitCode:String read Get_unitCode write Set_unitCode;
end;
(*BusinessFunction*)
TBusinessFunction=Class (TEnumeration,IBusinessFunction)
function TangBusinessFunction:TangibleValue;virtual;
end;
(*BusinessEntityType*)
TBusinessEntityType=Class (TEnumeration,IBusinessEntityType)
function TangBusinessEntityType:TangibleValue;virtual;
end;
(*EducationalOrganization*)
TEducationalOrganization=Class (TOrganization,IEducationalOrganization)
(*No atribs*)
end;
(*VideoObject*)
TVideoObject=Class (TMediaObject,IVideoObject)
private
Fthumbnail:IImageObject;
FvideoFrameSize:String;
FvideoQuality:String;
protected
function Get_thumbnail:IImageObject;virtual;
procedure Set_thumbnail(v:IImageObject);virtual;
function Get_videoFrameSize:String;virtual;
procedure Set_videoFrameSize(v:String);virtual;
function Get_videoQuality:String;virtual;
procedure Set_videoQuality(v:String);virtual;
public
property thumbnail:IImageObject read Get_thumbnail write Set_thumbnail;
published
property videoFrameSize:String read Get_videoFrameSize write Set_videoFrameSize;
property videoQuality:String read Get_videoQuality write Set_videoQuality;
end;
TBroadcastService=Class; //forward
(*PublicationEvent*)
TPublicationEvent=Class (TEvent,IPublicationEvent)
private
Ffree:Boolean;
FpublishedOn:IBroadcastService;
FpublishedBy:IOrganization;
protected
function Get_free:Boolean;virtual;
procedure Set_free(v:Boolean);virtual;
function Get_publishedOn:IBroadcastService;virtual;
procedure Set_publishedOn(v:IBroadcastService);virtual;
function Get_publishedBy:IOrganization;virtual;
procedure Set_publishedBy(v:IOrganization);virtual;
public
property publishedOn:IBroadcastService read Get_publishedOn write Set_publishedOn;
property publishedBy:IOrganization read Get_publishedBy write Set_publishedBy;
published
property free:Boolean read Get_free write Set_free;
end;
(*BroadcastService*)
TBroadcastService=Class (TService,IBroadcastService)
private
FbroadcastTimezone:String;
FparentService:IBroadcastService;
FbroadcastFrequency:String;
FbroadcastAffiliateOf:IOrganization;
FbroadcastDisplayName:String;
Farea:IPlace;
Fbroadcaster:IOrganization;
protected
function Get_broadcastTimezone:String;virtual;
procedure Set_broadcastTimezone(v:String);virtual;
function Get_parentService:IBroadcastService;virtual;
procedure Set_parentService(v:IBroadcastService);virtual;
function Get_broadcastFrequency:String;virtual;
procedure Set_broadcastFrequency(v:String);virtual;
function Get_broadcastAffiliateOf:IOrganization;virtual;
procedure Set_broadcastAffiliateOf(v:IOrganization);virtual;
function Get_broadcastDisplayName:String;virtual;
procedure Set_broadcastDisplayName(v:String);virtual;
function Get_area:IPlace;virtual;
procedure Set_area(v:IPlace);virtual;
function Get_broadcaster:IOrganization;virtual;
procedure Set_broadcaster(v:IOrganization);virtual;
public
property parentService:IBroadcastService read Get_parentService write Set_parentService;
property broadcastAffiliateOf:IOrganization read Get_broadcastAffiliateOf write Set_broadcastAffiliateOf;
property area:IPlace read Get_area write Set_area;
property broadcaster:IOrganization read Get_broadcaster write Set_broadcaster;
published
property broadcastTimezone:String read Get_broadcastTimezone write Set_broadcastTimezone;
property broadcastFrequency:String read Get_broadcastFrequency write Set_broadcastFrequency;
property broadcastDisplayName:String read Get_broadcastDisplayName write Set_broadcastDisplayName;
end;
(*AudioObject*)
TAudioObject=Class (TMediaObject,IAudioObject)
private
Ftranscript:String;
protected
function Get_transcript:String;virtual;
procedure Set_transcript(v:String);virtual;
public
published
property transcript:String read Get_transcript write Set_transcript;
end;
(*AlignmentObject*)
TAlignmentObject=Class (TIntangible,IAlignmentObject)
private
FtargetName:String;
FtargetUrl:String;
FtargetDescription:String;
FeducationalFramework:String;
FalignmentType:String;
protected
function Get_targetName:String;virtual;
procedure Set_targetName(v:String);virtual;
function Get_targetUrl:String;virtual;
procedure Set_targetUrl(v:String);virtual;
function Get_targetDescription:String;virtual;
procedure Set_targetDescription(v:String);virtual;
function Get_educationalFramework:String;virtual;
procedure Set_educationalFramework(v:String);virtual;
function Get_alignmentType:String;virtual;
procedure Set_alignmentType(v:String);virtual;
public
published
property targetName:String read Get_targetName write Set_targetName;
property targetUrl:String read Get_targetUrl write Set_targetUrl;
property targetDescription:String read Get_targetDescription write Set_targetDescription;
property educationalFramework:String read Get_educationalFramework write Set_educationalFramework;
property alignmentType:String read Get_alignmentType write Set_alignmentType;
end;
TDataFeed=Class; //forward
(*SoftwareApplication*)
TSoftwareApplication=Class (TCreativeWork,ISoftwareApplication)
private
FstorageRequirements:String;
FreleaseNotes:String;
FoperatingSystem:String;
FcountriesSupported:String;
Fpermissions:String;
Fscreenshot:String;
FsoftwareHelp:ICreativeWork;
FsoftwareVersion:String;
FdownloadUrl:String;
Fdevice:String;
FapplicationSuite:String;
FfeatureList:String;
FsupportingData:IDataFeed;
FapplicationCategory:String;
FinstallUrl:String;
FprocessorRequirements:String;
FfileSize:String;
FapplicationSubCategory:String;
FcountriesNotSupported:String;
Frequirements:String;
FmemoryRequirements:String;
FsoftwareAddOn:ISoftwareApplication;
protected
function Get_storageRequirements:String;virtual;
procedure Set_storageRequirements(v:String);virtual;
function Get_releaseNotes:String;virtual;
procedure Set_releaseNotes(v:String);virtual;
function Get_operatingSystem:String;virtual;
procedure Set_operatingSystem(v:String);virtual;
function Get_countriesSupported:String;virtual;
procedure Set_countriesSupported(v:String);virtual;
function Get_permissions:String;virtual;
procedure Set_permissions(v:String);virtual;
function Get_screenshot:String;virtual;
procedure Set_screenshot(v:String);virtual;
function Get_softwareHelp:ICreativeWork;virtual;
procedure Set_softwareHelp(v:ICreativeWork);virtual;
function Get_softwareVersion:String;virtual;
procedure Set_softwareVersion(v:String);virtual;
function Get_downloadUrl:String;virtual;
procedure Set_downloadUrl(v:String);virtual;
function Get_device:String;virtual;
procedure Set_device(v:String);virtual;
function Get_applicationSuite:String;virtual;
procedure Set_applicationSuite(v:String);virtual;
function Get_featureList:String;virtual;
procedure Set_featureList(v:String);virtual;
function Get_supportingData:IDataFeed;virtual;
procedure Set_supportingData(v:IDataFeed);virtual;
function Get_applicationCategory:String;virtual;
procedure Set_applicationCategory(v:String);virtual;
function Get_installUrl:String;virtual;
procedure Set_installUrl(v:String);virtual;
function Get_processorRequirements:String;virtual;
procedure Set_processorRequirements(v:String);virtual;
function Get_fileSize:String;virtual;
procedure Set_fileSize(v:String);virtual;
function Get_applicationSubCategory:String;virtual;
procedure Set_applicationSubCategory(v:String);virtual;
function Get_countriesNotSupported:String;virtual;
procedure Set_countriesNotSupported(v:String);virtual;
function Get_requirements:String;virtual;
procedure Set_requirements(v:String);virtual;
function Get_memoryRequirements:String;virtual;
procedure Set_memoryRequirements(v:String);virtual;
function Get_softwareAddOn:ISoftwareApplication;virtual;
procedure Set_softwareAddOn(v:ISoftwareApplication);virtual;
public
property softwareHelp:ICreativeWork read Get_softwareHelp write Set_softwareHelp;
property supportingData:IDataFeed read Get_supportingData write Set_supportingData;
property softwareAddOn:ISoftwareApplication read Get_softwareAddOn write Set_softwareAddOn;
published
property storageRequirements:String read Get_storageRequirements write Set_storageRequirements;
property releaseNotes:String read Get_releaseNotes write Set_releaseNotes;
property operatingSystem:String read Get_operatingSystem write Set_operatingSystem;
property countriesSupported:String read Get_countriesSupported write Set_countriesSupported;
property permissions:String read Get_permissions write Set_permissions;
property screenshot:String read Get_screenshot write Set_screenshot;
property softwareVersion:String read Get_softwareVersion write Set_softwareVersion;
property downloadUrl:String read Get_downloadUrl write Set_downloadUrl;
property device:String read Get_device write Set_device;
property applicationSuite:String read Get_applicationSuite write Set_applicationSuite;
property featureList:String read Get_featureList write Set_featureList;
property applicationCategory:String read Get_applicationCategory write Set_applicationCategory;
property installUrl:String read Get_installUrl write Set_installUrl;
property processorRequirements:String read Get_processorRequirements write Set_processorRequirements;
property fileSize:String read Get_fileSize write Set_fileSize;
property applicationSubCategory:String read Get_applicationSubCategory write Set_applicationSubCategory;
property countriesNotSupported:String read Get_countriesNotSupported write Set_countriesNotSupported;
property requirements:String read Get_requirements write Set_requirements;
property memoryRequirements:String read Get_memoryRequirements write Set_memoryRequirements;
end;
TDataCatalog=Class; //forward
TDataDownload=Class; //forward
(*Dataset*)
TDataset=Class (TCreativeWork,IDataset)
private
Ftemporal:TDateTime;
FvariablesMeasured:String;
Fspatial:IPlace;
FincludedDataCatalog:IDataCatalog;
FdatasetTimeInterval:TDateTime;
Fcatalog:IDataCatalog;
Fdistribution:IDataDownload;
protected
function Get_temporal:TDateTime;virtual;
procedure Set_temporal(v:TDateTime);virtual;
function Get_variablesMeasured:String;virtual;
procedure Set_variablesMeasured(v:String);virtual;
function Get_spatial:IPlace;virtual;
procedure Set_spatial(v:IPlace);virtual;
function Get_includedDataCatalog:IDataCatalog;virtual;
procedure Set_includedDataCatalog(v:IDataCatalog);virtual;
function Get_datasetTimeInterval:TDateTime;virtual;
procedure Set_datasetTimeInterval(v:TDateTime);virtual;
function Get_catalog:IDataCatalog;virtual;
procedure Set_catalog(v:IDataCatalog);virtual;
function Get_distribution:IDataDownload;virtual;
procedure Set_distribution(v:IDataDownload);virtual;
public
property spatial:IPlace read Get_spatial write Set_spatial;
property includedDataCatalog:IDataCatalog read Get_includedDataCatalog write Set_includedDataCatalog;
property catalog:IDataCatalog read Get_catalog write Set_catalog;
property distribution:IDataDownload read Get_distribution write Set_distribution;
published
property temporal:TDateTime read Get_temporal write Set_temporal;
property variablesMeasured:String read Get_variablesMeasured write Set_variablesMeasured;
property datasetTimeInterval:TDateTime read Get_datasetTimeInterval write Set_datasetTimeInterval;
end;
(*DataCatalog*)
TDataCatalog=Class (TCreativeWork,IDataCatalog)
private
Fdataset:IDataset;
protected
function Get_dataset:IDataset;virtual;
procedure Set_dataset(v:IDataset);virtual;
public
property dataset:IDataset read Get_dataset write Set_dataset;
published
end;
(*DataDownload*)
TDataDownload=Class (TMediaObject,IDataDownload)
(*No atribs*)
end;
(*DataFeed*)
TDataFeed=Class (TDataset,IDataFeed)
private
FdataFeedElement:IThing;
protected
function Get_dataFeedElement:IThing;virtual;
procedure Set_dataFeedElement(v:IThing);virtual;
public
property dataFeedElement:IThing read Get_dataFeedElement write Set_dataFeedElement;
published
end;
(*ActionStatusType*)
TActionStatusType=Class (TEnumeration,IActionStatusType)
function TangActionStatusType:TangibleValue;virtual;
end;
(*CreativeWorkSeries*)
TCreativeWorkSeries=Class (TCreativeWork,ICreativeWorkSeries)
(*No atribs*)
end;
(*Periodical*)
TPeriodical=Class (TCreativeWorkSeries,IPeriodical)
private
Fissn:String;
protected
function Get_issn:String;virtual;
procedure Set_issn(v:String);virtual;
public
published
property issn:String read Get_issn write Set_issn;
end;
(*Newspaper*)
TNewspaper=Class (TPeriodical,INewspaper)
(*No atribs*)
end;
(*Permit*)
TPermit=Class (TIntangible,IPermit)
private
FvalidFor:IDuration;
FissuedThrough:IService;
FvalidUntil:TDateTime;
FvalidIn:IAdministrativeArea;
FpermitAudience:IAudience;
FissuedBy:IOrganization;
protected
function Get_validFor:IDuration;virtual;
procedure Set_validFor(v:IDuration);virtual;
function Get_issuedThrough:IService;virtual;
procedure Set_issuedThrough(v:IService);virtual;
function Get_validUntil:TDateTime;virtual;
procedure Set_validUntil(v:TDateTime);virtual;
function Get_validIn:IAdministrativeArea;virtual;
procedure Set_validIn(v:IAdministrativeArea);virtual;
function Get_permitAudience:IAudience;virtual;
procedure Set_permitAudience(v:IAudience);virtual;
function Get_issuedBy:IOrganization;virtual;
procedure Set_issuedBy(v:IOrganization);virtual;
public
property validFor:IDuration read Get_validFor write Set_validFor;
property issuedThrough:IService read Get_issuedThrough write Set_issuedThrough;
property validIn:IAdministrativeArea read Get_validIn write Set_validIn;
property permitAudience:IAudience read Get_permitAudience write Set_permitAudience;
property issuedBy:IOrganization read Get_issuedBy write Set_issuedBy;
published
property validUntil:TDateTime read Get_validUntil write Set_validUntil;
end;
(*GovernmentPermit*)
TGovernmentPermit=Class (TPermit,IGovernmentPermit)
function TangGovernmentPermit:TangibleValue;virtual;
end;
(*UpdateAction*)
TUpdateAction=Class (TAction,IUpdateAction)
private
Fcollection:IThing;
protected
function Get_collection:IThing;virtual;
procedure Set_collection(v:IThing);virtual;
public
property collection:IThing read Get_collection write Set_collection;
published
end;
(*AddAction*)
TAddAction=Class (TUpdateAction,IAddAction)
(*No atribs*)
end;
(*InsertAction*)
TInsertAction=Class (TAddAction,IInsertAction)
(*No atribs*)
end;
(*PrependAction*)
TPrependAction=Class (TInsertAction,IPrependAction)
(*No atribs*)
end;
(*Episode*)
TEpisode=Class (TCreativeWork,IEpisode)
private
FepisodeNumber:String;
protected
function Get_episodeNumber:String;virtual;
procedure Set_episodeNumber(v:String);virtual;
public
published
property episodeNumber:String read Get_episodeNumber write Set_episodeNumber;
end;
(*RadioEpisode*)
TRadioEpisode=Class (TEpisode,IRadioEpisode)
(*No atribs*)
end;
(*LocalBusiness*)
TLocalBusiness=Class (TPlace,ILocalBusiness)
private
FpriceRange:String;
FbranchOf:IOrganization;
FopeningHours:String;
FpaymentAccepted:String;
FcurrenciesAccepted:String;
protected
function Get_priceRange:String;virtual;
procedure Set_priceRange(v:String);virtual;
function Get_branchOf:IOrganization;virtual;
procedure Set_branchOf(v:IOrganization);virtual;
function Get_openingHours:String;virtual;
procedure Set_openingHours(v:String);virtual;
function Get_paymentAccepted:String;virtual;
procedure Set_paymentAccepted(v:String);virtual;
function Get_currenciesAccepted:String;virtual;
procedure Set_currenciesAccepted(v:String);virtual;
public
property branchOf:IOrganization read Get_branchOf write Set_branchOf;
published
property priceRange:String read Get_priceRange write Set_priceRange;
property openingHours:String read Get_openingHours write Set_openingHours;
property paymentAccepted:String read Get_paymentAccepted write Set_paymentAccepted;
property currenciesAccepted:String read Get_currenciesAccepted write Set_currenciesAccepted;
end;
(*FoodEstablishment*)
TFoodEstablishment=Class (TLocalBusiness,IFoodEstablishment)
private
FacceptsReservations:String;
FservesCuisine:String;
Fmenu:String;
protected
function Get_acceptsReservations:String;virtual;
procedure Set_acceptsReservations(v:String);virtual;
function Get_servesCuisine:String;virtual;
procedure Set_servesCuisine(v:String);virtual;
function Get_menu:String;virtual;
procedure Set_menu(v:String);virtual;
public
published
property acceptsReservations:String read Get_acceptsReservations write Set_acceptsReservations;
property servesCuisine:String read Get_servesCuisine write Set_servesCuisine;
property menu:String read Get_menu write Set_menu;
end;
(*Winery*)
TWinery=Class (TFoodEstablishment,IWinery)
(*No atribs*)
end;
TCableOrSatelliteService=Class; //forward
(*BroadcastChannel*)
TBroadcastChannel=Class (TIntangible,IBroadcastChannel)
private
FbroadcastChannelId:String;
FbroadcastServiceTier:String;
FinBroadcastLineup:ICableOrSatelliteService;
FprovidesBroadcastService:IBroadcastService;
protected
function Get_broadcastChannelId:String;virtual;
procedure Set_broadcastChannelId(v:String);virtual;
function Get_broadcastServiceTier:String;virtual;
procedure Set_broadcastServiceTier(v:String);virtual;
function Get_inBroadcastLineup:ICableOrSatelliteService;virtual;
procedure Set_inBroadcastLineup(v:ICableOrSatelliteService);virtual;
function Get_providesBroadcastService:IBroadcastService;virtual;
procedure Set_providesBroadcastService(v:IBroadcastService);virtual;
public
property inBroadcastLineup:ICableOrSatelliteService read Get_inBroadcastLineup write Set_inBroadcastLineup;
property providesBroadcastService:IBroadcastService read Get_providesBroadcastService write Set_providesBroadcastService;
published
property broadcastChannelId:String read Get_broadcastChannelId write Set_broadcastChannelId;
property broadcastServiceTier:String read Get_broadcastServiceTier write Set_broadcastServiceTier;
end;
(*CableOrSatelliteService*)
TCableOrSatelliteService=Class (TService,ICableOrSatelliteService)
function TangCableOrSatelliteService:TangibleValue;virtual;
end;
(*RadioChannel*)
TRadioChannel=Class (TBroadcastChannel,IRadioChannel)
function TangRadioChannel:TangibleValue;virtual;
end;
(*AMRadioChannel*)
TAMRadioChannel=Class (TRadioChannel,IAMRadioChannel)
function TangAMRadioChannel:TangibleValue;virtual;
end;
(*Collection*)
TCollection=Class (TCreativeWork,ICollection)
(*No atribs*)
end;
(*Season*)
TSeason=Class (TCreativeWork,ISeason)
(*No atribs*)
end;
(*Brewery*)
TBrewery=Class (TFoodEstablishment,IBrewery)
(*No atribs*)
end;
TMedicalCode=Class; //forward
TMedicalGuideline=Class; //forward
TMedicineSystem=Class; //forward
TMedicalStudy=Class; //forward
TMedicalSpecialty=Class; //forward
(*MedicalEntity*)
TMedicalEntity=Class (TThing,IMedicalEntity)
private
Fcode:IMedicalCode;
Fguideline:IMedicalGuideline;
FmedicineSystem:IMedicineSystem;
FlegalStatus:String;
FrecognizingAuthority:IOrganization;
Fstudy:IMedicalStudy;
FrelevantSpecialty:IMedicalSpecialty;
protected
function Get_code:IMedicalCode;virtual;
procedure Set_code(v:IMedicalCode);virtual;
function Get_guideline:IMedicalGuideline;virtual;
procedure Set_guideline(v:IMedicalGuideline);virtual;
function Get_medicineSystem:IMedicineSystem;virtual;
procedure Set_medicineSystem(v:IMedicineSystem);virtual;
function Get_legalStatus:String;virtual;
procedure Set_legalStatus(v:String);virtual;
function Get_recognizingAuthority:IOrganization;virtual;
procedure Set_recognizingAuthority(v:IOrganization);virtual;
function Get_study:IMedicalStudy;virtual;
procedure Set_study(v:IMedicalStudy);virtual;
function Get_relevantSpecialty:IMedicalSpecialty;virtual;
procedure Set_relevantSpecialty(v:IMedicalSpecialty);virtual;
public
property code:IMedicalCode read Get_code write Set_code;
property guideline:IMedicalGuideline read Get_guideline write Set_guideline;
property medicineSystem:IMedicineSystem read Get_medicineSystem write Set_medicineSystem;
property recognizingAuthority:IOrganization read Get_recognizingAuthority write Set_recognizingAuthority;
property study:IMedicalStudy read Get_study write Set_study;
property relevantSpecialty:IMedicalSpecialty read Get_relevantSpecialty write Set_relevantSpecialty;
published
property legalStatus:String read Get_legalStatus write Set_legalStatus;
end;
(*MedicalIntangible*)
TMedicalIntangible=Class (TMedicalEntity,IMedicalIntangible)
(*No atribs*)
end;
(*MedicalCode*)
TMedicalCode=Class (TMedicalIntangible,IMedicalCode)
private
FcodingSystem:String;
FcodeValue:String;
protected
function Get_codingSystem:String;virtual;
procedure Set_codingSystem(v:String);virtual;
function Get_codeValue:String;virtual;
procedure Set_codeValue(v:String);virtual;
public
published
property codingSystem:String read Get_codingSystem write Set_codingSystem;
property codeValue:String read Get_codeValue write Set_codeValue;
end;
TMedicalEvidenceLevel=Class; //forward
(*MedicalGuideline*)
TMedicalGuideline=Class (TMedicalEntity,IMedicalGuideline)
private
FevidenceOrigin:String;
FguidelineSubject:IMedicalEntity;
FguidelineDate:TDateTime;
FevidenceLevel:IMedicalEvidenceLevel;
protected
function Get_evidenceOrigin:String;virtual;
procedure Set_evidenceOrigin(v:String);virtual;
function Get_guidelineSubject:IMedicalEntity;virtual;
procedure Set_guidelineSubject(v:IMedicalEntity);virtual;
function Get_guidelineDate:TDateTime;virtual;
procedure Set_guidelineDate(v:TDateTime);virtual;
function Get_evidenceLevel:IMedicalEvidenceLevel;virtual;
procedure Set_evidenceLevel(v:IMedicalEvidenceLevel);virtual;
public
property guidelineSubject:IMedicalEntity read Get_guidelineSubject write Set_guidelineSubject;
property evidenceLevel:IMedicalEvidenceLevel read Get_evidenceLevel write Set_evidenceLevel;
published
property evidenceOrigin:String read Get_evidenceOrigin write Set_evidenceOrigin;
property guidelineDate:TDateTime read Get_guidelineDate write Set_guidelineDate;
end;
(*MedicalEnumeration*)
TMedicalEnumeration=Class (TEnumeration,IMedicalEnumeration)
function TangMedicalEnumeration:TangibleValue;virtual;
end;
(*MedicalEvidenceLevel*)
TMedicalEvidenceLevel=Class (TMedicalEnumeration,IMedicalEvidenceLevel)
function TangMedicalEvidenceLevel:TangibleValue;virtual;
end;
(*MedicineSystem*)
TMedicineSystem=Class (TMedicalEnumeration,IMedicineSystem)
function TangMedicineSystem:TangibleValue;virtual;
end;
TMedicalCondition=Class; //forward
(*MedicalStudy*)
TMedicalStudy=Class (TMedicalEntity,IMedicalStudy)
private
FhealthCondition:IMedicalCondition;
Fpopulation:String;
FstudySubject:IMedicalEntity;
FstudyLocation:IAdministrativeArea;
protected
function Get_healthCondition:IMedicalCondition;virtual;
procedure Set_healthCondition(v:IMedicalCondition);virtual;
function Get_population:String;virtual;
procedure Set_population(v:String);virtual;
function Get_studySubject:IMedicalEntity;virtual;
procedure Set_studySubject(v:IMedicalEntity);virtual;
function Get_studyLocation:IAdministrativeArea;virtual;
procedure Set_studyLocation(v:IAdministrativeArea);virtual;
public
property healthCondition:IMedicalCondition read Get_healthCondition write Set_healthCondition;
property studySubject:IMedicalEntity read Get_studySubject write Set_studySubject;
property studyLocation:IAdministrativeArea read Get_studyLocation write Set_studyLocation;
published
property population:String read Get_population write Set_population;
end;
TMedicalTherapy=Class; //forward
TMedicalTest=Class; //forward
TMedicalCause=Class; //forward
TMedicalStudyStatus=Class; //forward
TAnatomicalStructure=Class; //forward
TMedicalRiskFactor=Class; //forward
TMedicalSignOrSymptom=Class; //forward
TDDxElement=Class; //forward
TMedicalConditionStage=Class; //forward
(*MedicalCondition*)
TMedicalCondition=Class (TMedicalEntity,IMedicalCondition)
private
FprimaryPrevention:IMedicalTherapy;
FtypicalTest:IMedicalTest;
Fcause:IMedicalCause;
Fstatus:IMedicalStudyStatus;
Fsubtype:String;
FexpectedPrognosis:String;
FpossibleComplication:String;
FassociatedAnatomy:IAnatomicalStructure;
Fpathophysiology:String;
FriskFactor:IMedicalRiskFactor;
FsignOrSymptom:IMedicalSignOrSymptom;
FdifferentialDiagnosis:IDDxElement;
Fstage:IMedicalConditionStage;
FnaturalProgression:String;
FpossibleTreatment:IMedicalTherapy;
FsecondaryPrevention:IMedicalTherapy;
protected
function Get_primaryPrevention:IMedicalTherapy;virtual;
procedure Set_primaryPrevention(v:IMedicalTherapy);virtual;
function Get_typicalTest:IMedicalTest;virtual;
procedure Set_typicalTest(v:IMedicalTest);virtual;
function Get_cause:IMedicalCause;virtual;
procedure Set_cause(v:IMedicalCause);virtual;
function Get_status:IMedicalStudyStatus;virtual;
procedure Set_status(v:IMedicalStudyStatus);virtual;
function Get_subtype:String;virtual;
procedure Set_subtype(v:String);virtual;
function Get_expectedPrognosis:String;virtual;
procedure Set_expectedPrognosis(v:String);virtual;
function Get_possibleComplication:String;virtual;
procedure Set_possibleComplication(v:String);virtual;
function Get_associatedAnatomy:IAnatomicalStructure;virtual;
procedure Set_associatedAnatomy(v:IAnatomicalStructure);virtual;
function Get_pathophysiology:String;virtual;
procedure Set_pathophysiology(v:String);virtual;
function Get_riskFactor:IMedicalRiskFactor;virtual;
procedure Set_riskFactor(v:IMedicalRiskFactor);virtual;
function Get_signOrSymptom:IMedicalSignOrSymptom;virtual;
procedure Set_signOrSymptom(v:IMedicalSignOrSymptom);virtual;
function Get_differentialDiagnosis:IDDxElement;virtual;
procedure Set_differentialDiagnosis(v:IDDxElement);virtual;
function Get_stage:IMedicalConditionStage;virtual;
procedure Set_stage(v:IMedicalConditionStage);virtual;
function Get_naturalProgression:String;virtual;
procedure Set_naturalProgression(v:String);virtual;
function Get_possibleTreatment:IMedicalTherapy;virtual;
procedure Set_possibleTreatment(v:IMedicalTherapy);virtual;
function Get_secondaryPrevention:IMedicalTherapy;virtual;
procedure Set_secondaryPrevention(v:IMedicalTherapy);virtual;
public
property primaryPrevention:IMedicalTherapy read Get_primaryPrevention write Set_primaryPrevention;
property typicalTest:IMedicalTest read Get_typicalTest write Set_typicalTest;
property cause:IMedicalCause read Get_cause write Set_cause;
property status:IMedicalStudyStatus read Get_status write Set_status;
property associatedAnatomy:IAnatomicalStructure read Get_associatedAnatomy write Set_associatedAnatomy;
property riskFactor:IMedicalRiskFactor read Get_riskFactor write Set_riskFactor;
property signOrSymptom:IMedicalSignOrSymptom read Get_signOrSymptom write Set_signOrSymptom;
property differentialDiagnosis:IDDxElement read Get_differentialDiagnosis write Set_differentialDiagnosis;
property stage:IMedicalConditionStage read Get_stage write Set_stage;
property possibleTreatment:IMedicalTherapy read Get_possibleTreatment write Set_possibleTreatment;
property secondaryPrevention:IMedicalTherapy read Get_secondaryPrevention write Set_secondaryPrevention;
published
property subtype:String read Get_subtype write Set_subtype;
property expectedPrognosis:String read Get_expectedPrognosis write Set_expectedPrognosis;
property possibleComplication:String read Get_possibleComplication write Set_possibleComplication;
property pathophysiology:String read Get_pathophysiology write Set_pathophysiology;
property naturalProgression:String read Get_naturalProgression write Set_naturalProgression;
end;
TMedicalIndication=Class; //forward
TMedicalProcedureType=Class; //forward
(*MedicalProcedure*)
TMedicalProcedure=Class (TMedicalEntity,IMedicalProcedure)
private
Ffollowup:String;
Fpreparation:IMedicalEntity;
FhowPerformed:String;
Findication:IMedicalIndication;
FprocedureType:IMedicalProcedureType;
FbodyLocation:String;
Foutcome:IMedicalEntity;
protected
function Get_followup:String;virtual;
procedure Set_followup(v:String);virtual;
function Get_preparation:IMedicalEntity;virtual;
procedure Set_preparation(v:IMedicalEntity);virtual;
function Get_howPerformed:String;virtual;
procedure Set_howPerformed(v:String);virtual;
function Get_indication:IMedicalIndication;virtual;
procedure Set_indication(v:IMedicalIndication);virtual;
function Get_procedureType:IMedicalProcedureType;virtual;
procedure Set_procedureType(v:IMedicalProcedureType);virtual;
function Get_bodyLocation:String;virtual;
procedure Set_bodyLocation(v:String);virtual;
function Get_outcome:IMedicalEntity;virtual;
procedure Set_outcome(v:IMedicalEntity);virtual;
public
property preparation:IMedicalEntity read Get_preparation write Set_preparation;
property indication:IMedicalIndication read Get_indication write Set_indication;
property procedureType:IMedicalProcedureType read Get_procedureType write Set_procedureType;
property outcome:IMedicalEntity read Get_outcome write Set_outcome;
published
property followup:String read Get_followup write Set_followup;
property howPerformed:String read Get_howPerformed write Set_howPerformed;
property bodyLocation:String read Get_bodyLocation write Set_bodyLocation;
end;
(*MedicalIndication*)
TMedicalIndication=Class (TMedicalEntity,IMedicalIndication)
(*No atribs*)
end;
(*MedicalProcedureType*)
TMedicalProcedureType=Class (TMedicalEnumeration,IMedicalProcedureType)
function TangMedicalProcedureType:TangibleValue;virtual;
end;
(*TherapeuticProcedure*)
TTherapeuticProcedure=Class (TMedicalProcedure,ITherapeuticProcedure)
(*No atribs*)
end;
(*MedicalTherapy*)
TMedicalTherapy=Class (TTherapeuticProcedure,IMedicalTherapy)
private
FseriousAdverseOutcome:IMedicalEntity;
FduplicateTherapy:IMedicalTherapy;
protected
function Get_seriousAdverseOutcome:IMedicalEntity;virtual;
procedure Set_seriousAdverseOutcome(v:IMedicalEntity);virtual;
function Get_duplicateTherapy:IMedicalTherapy;virtual;
procedure Set_duplicateTherapy(v:IMedicalTherapy);virtual;
public
property seriousAdverseOutcome:IMedicalEntity read Get_seriousAdverseOutcome write Set_seriousAdverseOutcome;
property duplicateTherapy:IMedicalTherapy read Get_duplicateTherapy write Set_duplicateTherapy;
published
end;
TMedicalDevice=Class; //forward
TDrug=Class; //forward
TMedicalSign=Class; //forward
(*MedicalTest*)
TMedicalTest=Class (TMedicalEntity,IMedicalTest)
private
FusesDevice:IMedicalDevice;
FaffectedBy:IDrug;
FnormalRange:IMedicalEnumeration;
FsignDetected:IMedicalSign;
FusedToDiagnose:IMedicalCondition;
protected
function Get_usesDevice:IMedicalDevice;virtual;
procedure Set_usesDevice(v:IMedicalDevice);virtual;
function Get_affectedBy:IDrug;virtual;
procedure Set_affectedBy(v:IDrug);virtual;
function Get_normalRange:IMedicalEnumeration;virtual;
procedure Set_normalRange(v:IMedicalEnumeration);virtual;
function Get_signDetected:IMedicalSign;virtual;
procedure Set_signDetected(v:IMedicalSign);virtual;
function Get_usedToDiagnose:IMedicalCondition;virtual;
procedure Set_usedToDiagnose(v:IMedicalCondition);virtual;
public
property usesDevice:IMedicalDevice read Get_usesDevice write Set_usesDevice;
property affectedBy:IDrug read Get_affectedBy write Set_affectedBy;
property normalRange:IMedicalEnumeration read Get_normalRange write Set_normalRange;
property signDetected:IMedicalSign read Get_signDetected write Set_signDetected;
property usedToDiagnose:IMedicalCondition read Get_usedToDiagnose write Set_usedToDiagnose;
published
end;
TMedicalContraindication=Class; //forward
(*MedicalDevice*)
TMedicalDevice=Class (TMedicalEntity,IMedicalDevice)
private
FpreOp:String;
FpostOp:String;
Fpurpose:IThing;
FadverseOutcome:IMedicalEntity;
Fcontraindication:IMedicalContraindication;
F_procedure:String;
protected
function Get_preOp:String;virtual;
procedure Set_preOp(v:String);virtual;
function Get_postOp:String;virtual;
procedure Set_postOp(v:String);virtual;
function Get_purpose:IThing;virtual;
procedure Set_purpose(v:IThing);virtual;
function Get_adverseOutcome:IMedicalEntity;virtual;
procedure Set_adverseOutcome(v:IMedicalEntity);virtual;
function Get_contraindication:IMedicalContraindication;virtual;
procedure Set_contraindication(v:IMedicalContraindication);virtual;
function Get__procedure:String;virtual;
procedure Set__procedure(v:String);virtual;
public
property purpose:IThing read Get_purpose write Set_purpose;
property adverseOutcome:IMedicalEntity read Get_adverseOutcome write Set_adverseOutcome;
property contraindication:IMedicalContraindication read Get_contraindication write Set_contraindication;
published
property preOp:String read Get_preOp write Set_preOp;
property postOp:String read Get_postOp write Set_postOp;
property _procedure:String read Get__procedure write Set__procedure;
end;
(*MedicalContraindication*)
TMedicalContraindication=Class (TMedicalEntity,IMedicalContraindication)
(*No atribs*)
end;
TMaximumDoseSchedule=Class; //forward
(*Substance*)
TSubstance=Class (TMedicalEntity,ISubstance)
private
FmaximumIntake:IMaximumDoseSchedule;
protected
function Get_maximumIntake:IMaximumDoseSchedule;virtual;
procedure Set_maximumIntake(v:IMaximumDoseSchedule);virtual;
public
property maximumIntake:IMaximumDoseSchedule read Get_maximumIntake write Set_maximumIntake;
published
end;
TQualitativeValue=Class; //forward
(*DoseSchedule*)
TDoseSchedule=Class (TMedicalIntangible,IDoseSchedule)
private
FdoseUnit:String;
FdoseValue:IQualitativeValue;
Ffrequency:String;
protected
function Get_doseUnit:String;virtual;
procedure Set_doseUnit(v:String);virtual;
function Get_doseValue:IQualitativeValue;virtual;
procedure Set_doseValue(v:IQualitativeValue);virtual;
function Get_frequency:String;virtual;
procedure Set_frequency(v:String);virtual;
public
property doseValue:IQualitativeValue read Get_doseValue write Set_doseValue;
published
property doseUnit:String read Get_doseUnit write Set_doseUnit;
property frequency:String read Get_frequency write Set_frequency;
end;
TPropertyValue=Class; //forward
(*QualitativeValue*)
TQualitativeValue=Class (TEnumeration,IQualitativeValue)
private
Flesser:IQualitativeValue;
FnonEqual:IQualitativeValue;
FlesserOrEqual:IQualitativeValue;
Fgreater:IQualitativeValue;
FadditionalProperty:IPropertyValue;
Fequal:IQualitativeValue;
FgreaterOrEqual:IQualitativeValue;
protected
function Get_lesser:IQualitativeValue;virtual;
procedure Set_lesser(v:IQualitativeValue);virtual;
function Get_nonEqual:IQualitativeValue;virtual;
procedure Set_nonEqual(v:IQualitativeValue);virtual;
function Get_lesserOrEqual:IQualitativeValue;virtual;
procedure Set_lesserOrEqual(v:IQualitativeValue);virtual;
function Get_greater:IQualitativeValue;virtual;
procedure Set_greater(v:IQualitativeValue);virtual;
function Get_additionalProperty:IPropertyValue;virtual;
procedure Set_additionalProperty(v:IPropertyValue);virtual;
function Get_equal:IQualitativeValue;virtual;
procedure Set_equal(v:IQualitativeValue);virtual;
function Get_greaterOrEqual:IQualitativeValue;virtual;
procedure Set_greaterOrEqual(v:IQualitativeValue);virtual;
public
property lesser:IQualitativeValue read Get_lesser write Set_lesser;
property nonEqual:IQualitativeValue read Get_nonEqual write Set_nonEqual;
property lesserOrEqual:IQualitativeValue read Get_lesserOrEqual write Set_lesserOrEqual;
property greater:IQualitativeValue read Get_greater write Set_greater;
property additionalProperty:IPropertyValue read Get_additionalProperty write Set_additionalProperty;
property equal:IQualitativeValue read Get_equal write Set_equal;
property greaterOrEqual:IQualitativeValue read Get_greaterOrEqual write Set_greaterOrEqual;
published
end;
(*PropertyValue*)
TPropertyValue=Class (TStructuredValue,IPropertyValue)
private
FminValue:INumber;
FpropertyID:String;
protected
function Get_minValue:INumber;virtual;
procedure Set_minValue(v:INumber);virtual;
function Get_propertyID:String;virtual;
procedure Set_propertyID(v:String);virtual;
public
property minValue:INumber read Get_minValue write Set_minValue;
published
property propertyID:String read Get_propertyID write Set_propertyID;
end;
(*MaximumDoseSchedule*)
TMaximumDoseSchedule=Class (TDoseSchedule,IMaximumDoseSchedule)
(*No atribs*)
end;
THealthInsurancePlan=Class; //forward
TDrugCost=Class; //forward
TDrugPregnancyCategory=Class; //forward
TDrugPrescriptionStatus=Class; //forward
TDrugStrength=Class; //forward
TDrugClass=Class; //forward
(*Drug*)
TDrug=Class (TSubstance,IDrug)
private
Fwarning:String;
FincludedInHealthInsurancePlan:IHealthInsurancePlan;
FproprietaryName:String;
Fcost:IDrugCost;
FdrugUnit:String;
FpregnancyCategory:IDrugPregnancyCategory;
FdoseSchedule:IDoseSchedule;
FdosageForm:String;
FprescribingInfo:String;
FprescriptionStatus:IDrugPrescriptionStatus;
Frxcui:String;
FpregnancyWarning:String;
FavailableStrength:IDrugStrength;
FclincalPharmacology:String;
FrelatedDrug:IDrug;
FdrugClass:IDrugClass;
FadministrationRoute:String;
FbreastfeedingWarning:String;
FinteractingDrug:IDrug;
FfoodWarning:String;
FalcoholWarning:String;
FlabelDetails:String;
Foverdosage:String;
FisAvailableGenerically:Boolean;
protected
function Get_warning:String;virtual;
procedure Set_warning(v:String);virtual;
function Get_includedInHealthInsurancePlan:IHealthInsurancePlan;virtual;
procedure Set_includedInHealthInsurancePlan(v:IHealthInsurancePlan);virtual;
function Get_proprietaryName:String;virtual;
procedure Set_proprietaryName(v:String);virtual;
function Get_cost:IDrugCost;virtual;
procedure Set_cost(v:IDrugCost);virtual;
function Get_drugUnit:String;virtual;
procedure Set_drugUnit(v:String);virtual;
function Get_pregnancyCategory:IDrugPregnancyCategory;virtual;
procedure Set_pregnancyCategory(v:IDrugPregnancyCategory);virtual;
function Get_doseSchedule:IDoseSchedule;virtual;
procedure Set_doseSchedule(v:IDoseSchedule);virtual;
function Get_dosageForm:String;virtual;
procedure Set_dosageForm(v:String);virtual;
function Get_prescribingInfo:String;virtual;
procedure Set_prescribingInfo(v:String);virtual;
function Get_prescriptionStatus:IDrugPrescriptionStatus;virtual;
procedure Set_prescriptionStatus(v:IDrugPrescriptionStatus);virtual;
function Get_rxcui:String;virtual;
procedure Set_rxcui(v:String);virtual;
function Get_pregnancyWarning:String;virtual;
procedure Set_pregnancyWarning(v:String);virtual;
function Get_availableStrength:IDrugStrength;virtual;
procedure Set_availableStrength(v:IDrugStrength);virtual;
function Get_clincalPharmacology:String;virtual;
procedure Set_clincalPharmacology(v:String);virtual;
function Get_relatedDrug:IDrug;virtual;
procedure Set_relatedDrug(v:IDrug);virtual;
function Get_drugClass:IDrugClass;virtual;
procedure Set_drugClass(v:IDrugClass);virtual;
function Get_administrationRoute:String;virtual;
procedure Set_administrationRoute(v:String);virtual;
function Get_breastfeedingWarning:String;virtual;
procedure Set_breastfeedingWarning(v:String);virtual;
function Get_interactingDrug:IDrug;virtual;
procedure Set_interactingDrug(v:IDrug);virtual;
function Get_foodWarning:String;virtual;
procedure Set_foodWarning(v:String);virtual;
function Get_alcoholWarning:String;virtual;
procedure Set_alcoholWarning(v:String);virtual;
function Get_labelDetails:String;virtual;
procedure Set_labelDetails(v:String);virtual;
function Get_overdosage:String;virtual;
procedure Set_overdosage(v:String);virtual;
function Get_isAvailableGenerically:Boolean;virtual;
procedure Set_isAvailableGenerically(v:Boolean);virtual;
public
property includedInHealthInsurancePlan:IHealthInsurancePlan read Get_includedInHealthInsurancePlan write Set_includedInHealthInsurancePlan;
property cost:IDrugCost read Get_cost write Set_cost;
property pregnancyCategory:IDrugPregnancyCategory read Get_pregnancyCategory write Set_pregnancyCategory;
property doseSchedule:IDoseSchedule read Get_doseSchedule write Set_doseSchedule;
property prescriptionStatus:IDrugPrescriptionStatus read Get_prescriptionStatus write Set_prescriptionStatus;
property availableStrength:IDrugStrength read Get_availableStrength write Set_availableStrength;
property relatedDrug:IDrug read Get_relatedDrug write Set_relatedDrug;
property drugClass:IDrugClass read Get_drugClass write Set_drugClass;
property interactingDrug:IDrug read Get_interactingDrug write Set_interactingDrug;
published
property warning:String read Get_warning write Set_warning;
property proprietaryName:String read Get_proprietaryName write Set_proprietaryName;
property drugUnit:String read Get_drugUnit write Set_drugUnit;
property dosageForm:String read Get_dosageForm write Set_dosageForm;
property prescribingInfo:String read Get_prescribingInfo write Set_prescribingInfo;
property rxcui:String read Get_rxcui write Set_rxcui;
property pregnancyWarning:String read Get_pregnancyWarning write Set_pregnancyWarning;
property clincalPharmacology:String read Get_clincalPharmacology write Set_clincalPharmacology;
property administrationRoute:String read Get_administrationRoute write Set_administrationRoute;
property breastfeedingWarning:String read Get_breastfeedingWarning write Set_breastfeedingWarning;
property foodWarning:String read Get_foodWarning write Set_foodWarning;
property alcoholWarning:String read Get_alcoholWarning write Set_alcoholWarning;
property labelDetails:String read Get_labelDetails write Set_labelDetails;
property overdosage:String read Get_overdosage write Set_overdosage;
property isAvailableGenerically:Boolean read Get_isAvailableGenerically write Set_isAvailableGenerically;
end;
THealthPlanNetwork=Class; //forward
THealthPlanFormulary=Class; //forward
(*HealthInsurancePlan*)
THealthInsurancePlan=Class (TIntangible,IHealthInsurancePlan)
private
FincludesHealthPlanNetwork:IHealthPlanNetwork;
FhealthPlanId:String;
FhealthPlanDrugTier:String;
FhealthPlanMarketingUrl:String;
FusesHealthPlanIdStandard:String;
FhealthPlanDrugOption:String;
FincludesHealthPlanFormulary:IHealthPlanFormulary;
FbenefitsSummaryUrl:String;
protected
function Get_includesHealthPlanNetwork:IHealthPlanNetwork;virtual;
procedure Set_includesHealthPlanNetwork(v:IHealthPlanNetwork);virtual;
function Get_healthPlanId:String;virtual;
procedure Set_healthPlanId(v:String);virtual;
function Get_healthPlanDrugTier:String;virtual;
procedure Set_healthPlanDrugTier(v:String);virtual;
function Get_healthPlanMarketingUrl:String;virtual;
procedure Set_healthPlanMarketingUrl(v:String);virtual;
function Get_usesHealthPlanIdStandard:String;virtual;
procedure Set_usesHealthPlanIdStandard(v:String);virtual;
function Get_healthPlanDrugOption:String;virtual;
procedure Set_healthPlanDrugOption(v:String);virtual;
function Get_includesHealthPlanFormulary:IHealthPlanFormulary;virtual;
procedure Set_includesHealthPlanFormulary(v:IHealthPlanFormulary);virtual;
function Get_benefitsSummaryUrl:String;virtual;
procedure Set_benefitsSummaryUrl(v:String);virtual;
public
property includesHealthPlanNetwork:IHealthPlanNetwork read Get_includesHealthPlanNetwork write Set_includesHealthPlanNetwork;
property includesHealthPlanFormulary:IHealthPlanFormulary read Get_includesHealthPlanFormulary write Set_includesHealthPlanFormulary;
published
property healthPlanId:String read Get_healthPlanId write Set_healthPlanId;
property healthPlanDrugTier:String read Get_healthPlanDrugTier write Set_healthPlanDrugTier;
property healthPlanMarketingUrl:String read Get_healthPlanMarketingUrl write Set_healthPlanMarketingUrl;
property usesHealthPlanIdStandard:String read Get_usesHealthPlanIdStandard write Set_usesHealthPlanIdStandard;
property healthPlanDrugOption:String read Get_healthPlanDrugOption write Set_healthPlanDrugOption;
property benefitsSummaryUrl:String read Get_benefitsSummaryUrl write Set_benefitsSummaryUrl;
end;
(*HealthPlanNetwork*)
THealthPlanNetwork=Class (TIntangible,IHealthPlanNetwork)
private
FhealthPlanNetworkTier:String;
FhealthPlanCostSharing:Boolean;
protected
function Get_healthPlanNetworkTier:String;virtual;
procedure Set_healthPlanNetworkTier(v:String);virtual;
function Get_healthPlanCostSharing:Boolean;virtual;
procedure Set_healthPlanCostSharing(v:Boolean);virtual;
public
published
property healthPlanNetworkTier:String read Get_healthPlanNetworkTier write Set_healthPlanNetworkTier;
property healthPlanCostSharing:Boolean read Get_healthPlanCostSharing write Set_healthPlanCostSharing;
end;
(*HealthPlanFormulary*)
THealthPlanFormulary=Class (TIntangible,IHealthPlanFormulary)
private
FoffersPrescriptionByMail:Boolean;
protected
function Get_offersPrescriptionByMail:Boolean;virtual;
procedure Set_offersPrescriptionByMail(v:Boolean);virtual;
public
published
property offersPrescriptionByMail:Boolean read Get_offersPrescriptionByMail write Set_offersPrescriptionByMail;
end;
TDrugCostCategory=Class; //forward
(*DrugCost*)
TDrugCost=Class (TMedicalEnumeration,IDrugCost)
private
FcostPerUnit:IQualitativeValue;
FapplicableLocation:IAdministrativeArea;
FcostCategory:IDrugCostCategory;
FcostCurrency:String;
FcostOrigin:String;
protected
function Get_costPerUnit:IQualitativeValue;virtual;
procedure Set_costPerUnit(v:IQualitativeValue);virtual;
function Get_applicableLocation:IAdministrativeArea;virtual;
procedure Set_applicableLocation(v:IAdministrativeArea);virtual;
function Get_costCategory:IDrugCostCategory;virtual;
procedure Set_costCategory(v:IDrugCostCategory);virtual;
function Get_costCurrency:String;virtual;
procedure Set_costCurrency(v:String);virtual;
function Get_costOrigin:String;virtual;
procedure Set_costOrigin(v:String);virtual;
public
property costPerUnit:IQualitativeValue read Get_costPerUnit write Set_costPerUnit;
property applicableLocation:IAdministrativeArea read Get_applicableLocation write Set_applicableLocation;
property costCategory:IDrugCostCategory read Get_costCategory write Set_costCategory;
published
property costCurrency:String read Get_costCurrency write Set_costCurrency;
property costOrigin:String read Get_costOrigin write Set_costOrigin;
end;
(*DrugCostCategory*)
TDrugCostCategory=Class (TMedicalEnumeration,IDrugCostCategory)
function TangDrugCostCategory:TangibleValue;virtual;
end;
(*DrugPregnancyCategory*)
TDrugPregnancyCategory=Class (TMedicalEnumeration,IDrugPregnancyCategory)
function TangDrugPregnancyCategory:TangibleValue;virtual;
end;
(*DrugPrescriptionStatus*)
TDrugPrescriptionStatus=Class (TMedicalEnumeration,IDrugPrescriptionStatus)
function TangDrugPrescriptionStatus:TangibleValue;virtual;
end;
(*DrugStrength*)
TDrugStrength=Class (TMedicalIntangible,IDrugStrength)
private
FstrengthUnit:String;
FactiveIngredient:String;
FavailableIn:IAdministrativeArea;
FstrengthValue:INumber;
protected
function Get_strengthUnit:String;virtual;
procedure Set_strengthUnit(v:String);virtual;
function Get_activeIngredient:String;virtual;
procedure Set_activeIngredient(v:String);virtual;
function Get_availableIn:IAdministrativeArea;virtual;
procedure Set_availableIn(v:IAdministrativeArea);virtual;
function Get_strengthValue:INumber;virtual;
procedure Set_strengthValue(v:INumber);virtual;
public
property availableIn:IAdministrativeArea read Get_availableIn write Set_availableIn;
property strengthValue:INumber read Get_strengthValue write Set_strengthValue;
published
property strengthUnit:String read Get_strengthUnit write Set_strengthUnit;
property activeIngredient:String read Get_activeIngredient write Set_activeIngredient;
end;
(*DrugClass*)
TDrugClass=Class (TMedicalEnumeration,IDrugClass)
private
Fdrug:IDrug;
protected
function Get_drug:IDrug;virtual;
procedure Set_drug(v:IDrug);virtual;
public
property drug:IDrug read Get_drug write Set_drug;
published
end;
(*MedicalSignOrSymptom*)
TMedicalSignOrSymptom=Class (TMedicalCondition,IMedicalSignOrSymptom)
(*No atribs*)
end;
TPhysicalExam=Class; //forward
(*MedicalSign*)
TMedicalSign=Class (TMedicalSignOrSymptom,IMedicalSign)
private
FidentifyingTest:IMedicalTest;
FidentifyingExam:IPhysicalExam;
protected
function Get_identifyingTest:IMedicalTest;virtual;
procedure Set_identifyingTest(v:IMedicalTest);virtual;
function Get_identifyingExam:IPhysicalExam;virtual;
procedure Set_identifyingExam(v:IPhysicalExam);virtual;
public
property identifyingTest:IMedicalTest read Get_identifyingTest write Set_identifyingTest;
property identifyingExam:IPhysicalExam read Get_identifyingExam write Set_identifyingExam;
published
end;
(*PhysicalExam*)
TPhysicalExam=Class (TMedicalEnumeration,IPhysicalExam)
function TangPhysicalExam:TangibleValue;virtual;
end;
(*MedicalCause*)
TMedicalCause=Class (TMedicalEntity,IMedicalCause)
private
FcauseOf:IMedicalEntity;
protected
function Get_causeOf:IMedicalEntity;virtual;
procedure Set_causeOf(v:IMedicalEntity);virtual;
public
property causeOf:IMedicalEntity read Get_causeOf write Set_causeOf;
published
end;
(*MedicalStudyStatus*)
TMedicalStudyStatus=Class (TMedicalEnumeration,IMedicalStudyStatus)
function TangMedicalStudyStatus:TangibleValue;virtual;
end;
TAnatomicalSystem=Class; //forward
(*AnatomicalStructure*)
TAnatomicalStructure=Class (TMedicalEntity,IAnatomicalStructure)
private
FrelatedTherapy:IMedicalTherapy;
F_function:String;
FconnectedTo:IAnatomicalStructure;
Fdiagram:IImageObject;
FpartOfSystem:IAnatomicalSystem;
FsubStructure:IAnatomicalStructure;
protected
function Get_relatedTherapy:IMedicalTherapy;virtual;
procedure Set_relatedTherapy(v:IMedicalTherapy);virtual;
function Get__function:String;virtual;
procedure Set__function(v:String);virtual;
function Get_connectedTo:IAnatomicalStructure;virtual;
procedure Set_connectedTo(v:IAnatomicalStructure);virtual;
function Get_diagram:IImageObject;virtual;
procedure Set_diagram(v:IImageObject);virtual;
function Get_partOfSystem:IAnatomicalSystem;virtual;
procedure Set_partOfSystem(v:IAnatomicalSystem);virtual;
function Get_subStructure:IAnatomicalStructure;virtual;
procedure Set_subStructure(v:IAnatomicalStructure);virtual;
public
property relatedTherapy:IMedicalTherapy read Get_relatedTherapy write Set_relatedTherapy;
property connectedTo:IAnatomicalStructure read Get_connectedTo write Set_connectedTo;
property diagram:IImageObject read Get_diagram write Set_diagram;
property partOfSystem:IAnatomicalSystem read Get_partOfSystem write Set_partOfSystem;
property subStructure:IAnatomicalStructure read Get_subStructure write Set_subStructure;
published
property _function:String read Get__function write Set__function;
end;
(*AnatomicalSystem*)
TAnatomicalSystem=Class (TMedicalEntity,IAnatomicalSystem)
private
FcomprisedOf:IAnatomicalStructure;
FassociatedPathophysiology:String;
FrelatedCondition:IMedicalCondition;
FrelatedStructure:IAnatomicalStructure;
protected
function Get_comprisedOf:IAnatomicalStructure;virtual;
procedure Set_comprisedOf(v:IAnatomicalStructure);virtual;
function Get_associatedPathophysiology:String;virtual;
procedure Set_associatedPathophysiology(v:String);virtual;
function Get_relatedCondition:IMedicalCondition;virtual;
procedure Set_relatedCondition(v:IMedicalCondition);virtual;
function Get_relatedStructure:IAnatomicalStructure;virtual;
procedure Set_relatedStructure(v:IAnatomicalStructure);virtual;
public
property comprisedOf:IAnatomicalStructure read Get_comprisedOf write Set_comprisedOf;
property relatedCondition:IMedicalCondition read Get_relatedCondition write Set_relatedCondition;
property relatedStructure:IAnatomicalStructure read Get_relatedStructure write Set_relatedStructure;
published
property associatedPathophysiology:String read Get_associatedPathophysiology write Set_associatedPathophysiology;
end;
(*MedicalRiskFactor*)
TMedicalRiskFactor=Class (TMedicalEntity,IMedicalRiskFactor)
private
FincreasesRiskOf:IMedicalEntity;
protected
function Get_increasesRiskOf:IMedicalEntity;virtual;
procedure Set_increasesRiskOf(v:IMedicalEntity);virtual;
public
property increasesRiskOf:IMedicalEntity read Get_increasesRiskOf write Set_increasesRiskOf;
published
end;
(*DDxElement*)
TDDxElement=Class (TMedicalIntangible,IDDxElement)
private
Fdiagnosis:IMedicalCondition;
FdistinguishingSign:IMedicalSignOrSymptom;
protected
function Get_diagnosis:IMedicalCondition;virtual;
procedure Set_diagnosis(v:IMedicalCondition);virtual;
function Get_distinguishingSign:IMedicalSignOrSymptom;virtual;
procedure Set_distinguishingSign(v:IMedicalSignOrSymptom);virtual;
public
property diagnosis:IMedicalCondition read Get_diagnosis write Set_diagnosis;
property distinguishingSign:IMedicalSignOrSymptom read Get_distinguishingSign write Set_distinguishingSign;
published
end;
(*MedicalConditionStage*)
TMedicalConditionStage=Class (TMedicalIntangible,IMedicalConditionStage)
private
FstageAsNumber:INumber;
FsubStageSuffix:String;
protected
function Get_stageAsNumber:INumber;virtual;
procedure Set_stageAsNumber(v:INumber);virtual;
function Get_subStageSuffix:String;virtual;
procedure Set_subStageSuffix(v:String);virtual;
public
property stageAsNumber:INumber read Get_stageAsNumber write Set_stageAsNumber;
published
property subStageSuffix:String read Get_subStageSuffix write Set_subStageSuffix;
end;
(*Specialty*)
TSpecialty=Class (TEnumeration,ISpecialty)
function TangSpecialty:TangibleValue;virtual;
end;
(*MedicalSpecialty*)
TMedicalSpecialty=Class (TSpecialty,IMedicalSpecialty)
function TangMedicalSpecialty:TangibleValue;virtual;
end;
(*BloodTest*)
TBloodTest=Class (TMedicalTest,IBloodTest)
(*No atribs*)
end;
(*Store*)
TStore=Class (TLocalBusiness,IStore)
(*No atribs*)
end;
(*OutletStore*)
TOutletStore=Class (TStore,IOutletStore)
(*No atribs*)
end;
TCreativeWorkSeason=Class; //forward
(*Clip*)
TClip=Class (TCreativeWork,IClip)
private
FpartOfEpisode:IEpisode;
FclipNumber:String;
FpartOfSeason:ICreativeWorkSeason;
Fdirectors:IPerson;
protected
function Get_partOfEpisode:IEpisode;virtual;
procedure Set_partOfEpisode(v:IEpisode);virtual;
function Get_clipNumber:String;virtual;
procedure Set_clipNumber(v:String);virtual;
function Get_partOfSeason:ICreativeWorkSeason;virtual;
procedure Set_partOfSeason(v:ICreativeWorkSeason);virtual;
function Get_directors:IPerson;virtual;
procedure Set_directors(v:IPerson);virtual;
public
property partOfEpisode:IEpisode read Get_partOfEpisode write Set_partOfEpisode;
property partOfSeason:ICreativeWorkSeason read Get_partOfSeason write Set_partOfSeason;
property directors:IPerson read Get_directors write Set_directors;
published
property clipNumber:String read Get_clipNumber write Set_clipNumber;
end;
(*CreativeWorkSeason*)
TCreativeWorkSeason=Class (TCreativeWork,ICreativeWorkSeason)
private
Fepisodes:IEpisode;
FseasonNumber:Integer;
protected
function Get_episodes:IEpisode;virtual;
procedure Set_episodes(v:IEpisode);virtual;
function Get_seasonNumber:Integer;virtual;
procedure Set_seasonNumber(v:Integer);virtual;
public
property episodes:IEpisode read Get_episodes write Set_episodes;
published
property seasonNumber:Integer read Get_seasonNumber write Set_seasonNumber;
end;
(*VideoGameClip*)
TVideoGameClip=Class (TClip,IVideoGameClip)
(*No atribs*)
end;
(*SurgicalProcedure*)
TSurgicalProcedure=Class (TMedicalProcedure,ISurgicalProcedure)
(*No atribs*)
end;
(*DepartmentStore*)
TDepartmentStore=Class (TStore,IDepartmentStore)
(*No atribs*)
end;
(*ToyStore*)
TToyStore=Class (TStore,IToyStore)
(*No atribs*)
end;
(*Library*)
TLibrary=Class (TLocalBusiness,ILibrary)
(*No atribs*)
end;
(*HighSchool*)
THighSchool=Class (TEducationalOrganization,IHighSchool)
(*No atribs*)
end;
(*LegalService*)
TLegalService=Class (TLocalBusiness,ILegalService)
(*No atribs*)
end;
(*Notary*)
TNotary=Class (TLegalService,INotary)
(*No atribs*)
end;
(*MovieClip*)
TMovieClip=Class (TClip,IMovieClip)
(*No atribs*)
end;
(*ConsumeAction*)
TConsumeAction=Class (TAction,IConsumeAction)
private
FexpectsAcceptanceOf:IOffer;
protected
function Get_expectsAcceptanceOf:IOffer;virtual;
procedure Set_expectsAcceptanceOf(v:IOffer);virtual;
public
property expectsAcceptanceOf:IOffer read Get_expectsAcceptanceOf write Set_expectsAcceptanceOf;
published
end;
(*DrinkAction*)
TDrinkAction=Class (TConsumeAction,IDrinkAction)
(*No atribs*)
end;
(*CivicStructure*)
TCivicStructure=Class (TPlace,ICivicStructure)
(*No atribs*)
end;
(*GovernmentBuilding*)
TGovernmentBuilding=Class (TCivicStructure,IGovernmentBuilding)
(*No atribs*)
end;
(*CityHall*)
TCityHall=Class (TGovernmentBuilding,ICityHall)
(*No atribs*)
end;
(*SportsActivityLocation*)
TSportsActivityLocation=Class (TLocalBusiness,ISportsActivityLocation)
(*No atribs*)
end;
(*ExerciseGym*)
TExerciseGym=Class (TSportsActivityLocation,IExerciseGym)
(*No atribs*)
end;
(*ElementarySchool*)
TElementarySchool=Class (TEducationalOrganization,IElementarySchool)
(*No atribs*)
end;
(*OrganizeAction*)
TOrganizeAction=Class (TAction,IOrganizeAction)
(*No atribs*)
end;
(*AllocateAction*)
TAllocateAction=Class (TOrganizeAction,IAllocateAction)
(*No atribs*)
end;
(*AssignAction*)
TAssignAction=Class (TAllocateAction,IAssignAction)
(*No atribs*)
end;
(*EntertainmentBusiness*)
TEntertainmentBusiness=Class (TLocalBusiness,IEntertainmentBusiness)
(*No atribs*)
end;
(*Casino*)
TCasino=Class (TEntertainmentBusiness,ICasino)
(*No atribs*)
end;
(*MoveAction*)
TMoveAction=Class (TAction,IMoveAction)
private
FtoLocation:IPlace;
protected
function Get_toLocation:IPlace;virtual;
procedure Set_toLocation(v:IPlace);virtual;
public
property toLocation:IPlace read Get_toLocation write Set_toLocation;
published
end;
(*DepartAction*)
TDepartAction=Class (TMoveAction,IDepartAction)
(*No atribs*)
end;
(*TelevisionChannel*)
TTelevisionChannel=Class (TBroadcastChannel,ITelevisionChannel)
function TangTelevisionChannel:TangibleValue;virtual;
end;
(*HobbyShop*)
THobbyShop=Class (TStore,IHobbyShop)
(*No atribs*)
end;
(*UserInteraction*)
TUserInteraction=Class (TEvent,IUserInteraction)
(*No atribs*)
end;
(*UserLikes*)
TUserLikes=Class (TUserInteraction,IUserLikes)
(*No atribs*)
end;
(*Float*)
TFloat=Class (TNumber,IFloat)
(*No atribs*)
end;
(*Ligament*)
TLigament=Class (TAnatomicalStructure,ILigament)
(*No atribs*)
end;
(*HealthAndBeautyBusiness*)
THealthAndBeautyBusiness=Class (TLocalBusiness,IHealthAndBeautyBusiness)
(*No atribs*)
end;
(*TattooParlor*)
TTattooParlor=Class (THealthAndBeautyBusiness,ITattooParlor)
(*No atribs*)
end;
(*WebPageElement*)
TWebPageElement=Class (TCreativeWork,IWebPageElement)
(*No atribs*)
end;
(*WPAdBlock*)
TWPAdBlock=Class (TWebPageElement,IWPAdBlock)
(*No atribs*)
end;
(*ApplyAction*)
TApplyAction=Class (TOrganizeAction,IApplyAction)
(*No atribs*)
end;
(*TheaterEvent*)
TTheaterEvent=Class (TEvent,ITheaterEvent)
(*No atribs*)
end;
(*WatchAction*)
TWatchAction=Class (TConsumeAction,IWatchAction)
(*No atribs*)
end;
(*TouristAttraction*)
TTouristAttraction=Class (TPlace,ITouristAttraction)
(*No atribs*)
end;
(*Landform*)
TLandform=Class (TPlace,ILandform)
(*No atribs*)
end;
(*Continent*)
TContinent=Class (TLandform,IContinent)
(*No atribs*)
end;
(*ControlAction*)
TControlAction=Class (TAction,IControlAction)
(*No atribs*)
end;
(*ResumeAction*)
TResumeAction=Class (TControlAction,IResumeAction)
(*No atribs*)
end;
(*Atlas*)
TAtlas=Class (TCreativeWork,IAtlas)
(*No atribs*)
end;
(*DanceEvent*)
TDanceEvent=Class (TEvent,IDanceEvent)
(*No atribs*)
end;
(*LodgingBusiness*)
TLodgingBusiness=Class (TLocalBusiness,ILodgingBusiness)
private
FpetsAllowed:Boolean;
FcheckoutTime:TDateTime;
FcheckinTime:TDateTime;
FstarRating:IRating;
protected
function Get_petsAllowed:Boolean;virtual;
procedure Set_petsAllowed(v:Boolean);virtual;
function Get_checkoutTime:TDateTime;virtual;
procedure Set_checkoutTime(v:TDateTime);virtual;
function Get_checkinTime:TDateTime;virtual;
procedure Set_checkinTime(v:TDateTime);virtual;
function Get_starRating:IRating;virtual;
procedure Set_starRating(v:IRating);virtual;
public
property starRating:IRating read Get_starRating write Set_starRating;
published
property petsAllowed:Boolean read Get_petsAllowed write Set_petsAllowed;
property checkoutTime:TDateTime read Get_checkoutTime write Set_checkoutTime;
property checkinTime:TDateTime read Get_checkinTime write Set_checkinTime;
end;
(*Hotel*)
THotel=Class (TLodgingBusiness,IHotel)
(*No atribs*)
end;
(*MusicEvent*)
TMusicEvent=Class (TEvent,IMusicEvent)
(*No atribs*)
end;
(*BowlingAlley*)
TBowlingAlley=Class (TSportsActivityLocation,IBowlingAlley)
(*No atribs*)
end;
(*CreateAction*)
TCreateAction=Class (TAction,ICreateAction)
(*No atribs*)
end;
(*FilmAction*)
TFilmAction=Class (TCreateAction,IFilmAction)
(*No atribs*)
end;
TProgramMembership=Class; //forward
TTicket=Class; //forward
TReservationStatusType=Class; //forward
(*Reservation*)
TReservation=Class (TIntangible,IReservation)
private
FtotalPrice:String;
FreservationId:String;
FmodifiedTime:TDateTime;
FprogramMembershipUsed:IProgramMembership;
FbookingTime:TDateTime;
FreservedTicket:ITicket;
FreservationFor:IThing;
FbookingAgent:IOrganization;
FreservationStatus:IReservationStatusType;
protected
function Get_totalPrice:String;virtual;
procedure Set_totalPrice(v:String);virtual;
function Get_reservationId:String;virtual;
procedure Set_reservationId(v:String);virtual;
function Get_modifiedTime:TDateTime;virtual;
procedure Set_modifiedTime(v:TDateTime);virtual;
function Get_programMembershipUsed:IProgramMembership;virtual;
procedure Set_programMembershipUsed(v:IProgramMembership);virtual;
function Get_bookingTime:TDateTime;virtual;
procedure Set_bookingTime(v:TDateTime);virtual;
function Get_reservedTicket:ITicket;virtual;
procedure Set_reservedTicket(v:ITicket);virtual;
function Get_reservationFor:IThing;virtual;
procedure Set_reservationFor(v:IThing);virtual;
function Get_bookingAgent:IOrganization;virtual;
procedure Set_bookingAgent(v:IOrganization);virtual;
function Get_reservationStatus:IReservationStatusType;virtual;
procedure Set_reservationStatus(v:IReservationStatusType);virtual;
public
property programMembershipUsed:IProgramMembership read Get_programMembershipUsed write Set_programMembershipUsed;
property reservedTicket:ITicket read Get_reservedTicket write Set_reservedTicket;
property reservationFor:IThing read Get_reservationFor write Set_reservationFor;
property bookingAgent:IOrganization read Get_bookingAgent write Set_bookingAgent;
property reservationStatus:IReservationStatusType read Get_reservationStatus write Set_reservationStatus;
published
property totalPrice:String read Get_totalPrice write Set_totalPrice;
property reservationId:String read Get_reservationId write Set_reservationId;
property modifiedTime:TDateTime read Get_modifiedTime write Set_modifiedTime;
property bookingTime:TDateTime read Get_bookingTime write Set_bookingTime;
end;
(*ProgramMembership*)
TProgramMembership=Class (TIntangible,IProgramMembership)
private
FhostingOrganization:IOrganization;
FprogramName:String;
FmembershipNumber:String;
protected
function Get_hostingOrganization:IOrganization;virtual;
procedure Set_hostingOrganization(v:IOrganization);virtual;
function Get_programName:String;virtual;
procedure Set_programName(v:String);virtual;
function Get_membershipNumber:String;virtual;
procedure Set_membershipNumber(v:String);virtual;
public
property hostingOrganization:IOrganization read Get_hostingOrganization write Set_hostingOrganization;
published
property programName:String read Get_programName write Set_programName;
property membershipNumber:String read Get_membershipNumber write Set_membershipNumber;
end;
TSeat=Class; //forward
(*Ticket*)
TTicket=Class (TIntangible,ITicket)
private
FticketToken:String;
FticketedSeat:ISeat;
FticketNumber:String;
FunderName:IOrganization;
FdateIssued:TDateTime;
protected
function Get_ticketToken:String;virtual;
procedure Set_ticketToken(v:String);virtual;
function Get_ticketedSeat:ISeat;virtual;
procedure Set_ticketedSeat(v:ISeat);virtual;
function Get_ticketNumber:String;virtual;
procedure Set_ticketNumber(v:String);virtual;
function Get_underName:IOrganization;virtual;
procedure Set_underName(v:IOrganization);virtual;
function Get_dateIssued:TDateTime;virtual;
procedure Set_dateIssued(v:TDateTime);virtual;
public
property ticketedSeat:ISeat read Get_ticketedSeat write Set_ticketedSeat;
property underName:IOrganization read Get_underName write Set_underName;
published
property ticketToken:String read Get_ticketToken write Set_ticketToken;
property ticketNumber:String read Get_ticketNumber write Set_ticketNumber;
property dateIssued:TDateTime read Get_dateIssued write Set_dateIssued;
end;
(*Seat*)
TSeat=Class (TIntangible,ISeat)
private
FseatRow:String;
FseatNumber:String;
FseatSection:String;
FseatingType:IQualitativeValue;
protected
function Get_seatRow:String;virtual;
procedure Set_seatRow(v:String);virtual;
function Get_seatNumber:String;virtual;
procedure Set_seatNumber(v:String);virtual;
function Get_seatSection:String;virtual;
procedure Set_seatSection(v:String);virtual;
function Get_seatingType:IQualitativeValue;virtual;
procedure Set_seatingType(v:IQualitativeValue);virtual;
public
property seatingType:IQualitativeValue read Get_seatingType write Set_seatingType;
published
property seatRow:String read Get_seatRow write Set_seatRow;
property seatNumber:String read Get_seatNumber write Set_seatNumber;
property seatSection:String read Get_seatSection write Set_seatSection;
end;
(*ReservationStatusType*)
TReservationStatusType=Class (TEnumeration,IReservationStatusType)
function TangReservationStatusType:TangibleValue;virtual;
end;
(*BusReservation*)
TBusReservation=Class (TReservation,IBusReservation)
function TangBusReservation:TangibleValue;virtual;
end;
(*Taxi*)
TTaxi=Class (TService,ITaxi)
function TangTaxi:TangibleValue;virtual;
end;
(*OfficeEquipmentStore*)
TOfficeEquipmentStore=Class (TStore,IOfficeEquipmentStore)
(*No atribs*)
end;
(*LiquorStore*)
TLiquorStore=Class (TStore,ILiquorStore)
(*No atribs*)
end;
(*Embassy*)
TEmbassy=Class (TGovernmentBuilding,IEmbassy)
(*No atribs*)
end;
TDriveWheelConfigurationValue=Class; //forward
TSteeringPositionValue=Class; //forward
TEngineSpecification=Class; //forward
(*Vehicle*)
TVehicle=Class (TProduct,IVehicle)
private
FnumberOfPreviousOwners:INumber;
FmeetsEmissionStandard:IQualitativeValue;
FdriveWheelConfiguration:IDriveWheelConfigurationValue;
FfuelConsumption:IQuantitativeValue;
Fwheelbase:IQuantitativeValue;
FvehicleInteriorType:String;
FmodelDate:TDateTime;
FknownVehicleDamages:String;
FbodyType:String;
FvehicleInteriorColor:String;
FvehicleSpecialUsage:String;
FproductionDate:TDateTime;
FmileageFromOdometer:IQuantitativeValue;
FvehicleModelDate:TDateTime;
FnumberOfAirbags:INumber;
FseatingCapacity:IQuantitativeValue;
FsteeringPosition:ISteeringPositionValue;
FdateVehicleFirstRegistered:TDateTime;
FnumberOfDoors:INumber;
FweightTotal:IQuantitativeValue;
FnumberOfForwardGears:INumber;
FtongueWeight:IQuantitativeValue;
FvehicleConfiguration:String;
FfuelEfficiency:IQuantitativeValue;
FcargoVolume:IQuantitativeValue;
FvehicleTransmission:IQualitativeValue;
FvehicleSeatingCapacity:IQuantitativeValue;
FaccelerationTime:IQuantitativeValue;
FpurchaseDate:TDateTime;
Fpayload:IQuantitativeValue;
FfuelCapacity:IQuantitativeValue;
FvehicleEngine:IEngineSpecification;
FemissionsCO2:INumber;
FnumberOfAxles:INumber;
Fspeed:IQuantitativeValue;
FvehicleIdentificationNumber:String;
FtrailerWeight:IQuantitativeValue;
protected
function Get_numberOfPreviousOwners:INumber;virtual;
procedure Set_numberOfPreviousOwners(v:INumber);virtual;
function Get_meetsEmissionStandard:IQualitativeValue;virtual;
procedure Set_meetsEmissionStandard(v:IQualitativeValue);virtual;
function Get_driveWheelConfiguration:IDriveWheelConfigurationValue;virtual;
procedure Set_driveWheelConfiguration(v:IDriveWheelConfigurationValue);virtual;
function Get_fuelConsumption:IQuantitativeValue;virtual;
procedure Set_fuelConsumption(v:IQuantitativeValue);virtual;
function Get_wheelbase:IQuantitativeValue;virtual;
procedure Set_wheelbase(v:IQuantitativeValue);virtual;
function Get_vehicleInteriorType:String;virtual;
procedure Set_vehicleInteriorType(v:String);virtual;
function Get_modelDate:TDateTime;virtual;
procedure Set_modelDate(v:TDateTime);virtual;
function Get_knownVehicleDamages:String;virtual;
procedure Set_knownVehicleDamages(v:String);virtual;
function Get_bodyType:String;virtual;
procedure Set_bodyType(v:String);virtual;
function Get_vehicleInteriorColor:String;virtual;
procedure Set_vehicleInteriorColor(v:String);virtual;
function Get_vehicleSpecialUsage:String;virtual;
procedure Set_vehicleSpecialUsage(v:String);virtual;
function Get_productionDate:TDateTime;virtual;
procedure Set_productionDate(v:TDateTime);virtual;
function Get_mileageFromOdometer:IQuantitativeValue;virtual;
procedure Set_mileageFromOdometer(v:IQuantitativeValue);virtual;
function Get_vehicleModelDate:TDateTime;virtual;
procedure Set_vehicleModelDate(v:TDateTime);virtual;
function Get_numberOfAirbags:INumber;virtual;
procedure Set_numberOfAirbags(v:INumber);virtual;
function Get_seatingCapacity:IQuantitativeValue;virtual;
procedure Set_seatingCapacity(v:IQuantitativeValue);virtual;
function Get_steeringPosition:ISteeringPositionValue;virtual;
procedure Set_steeringPosition(v:ISteeringPositionValue);virtual;
function Get_dateVehicleFirstRegistered:TDateTime;virtual;
procedure Set_dateVehicleFirstRegistered(v:TDateTime);virtual;
function Get_numberOfDoors:INumber;virtual;
procedure Set_numberOfDoors(v:INumber);virtual;
function Get_weightTotal:IQuantitativeValue;virtual;
procedure Set_weightTotal(v:IQuantitativeValue);virtual;
function Get_numberOfForwardGears:INumber;virtual;
procedure Set_numberOfForwardGears(v:INumber);virtual;
function Get_tongueWeight:IQuantitativeValue;virtual;
procedure Set_tongueWeight(v:IQuantitativeValue);virtual;
function Get_vehicleConfiguration:String;virtual;
procedure Set_vehicleConfiguration(v:String);virtual;
function Get_fuelEfficiency:IQuantitativeValue;virtual;
procedure Set_fuelEfficiency(v:IQuantitativeValue);virtual;
function Get_cargoVolume:IQuantitativeValue;virtual;
procedure Set_cargoVolume(v:IQuantitativeValue);virtual;
function Get_vehicleTransmission:IQualitativeValue;virtual;
procedure Set_vehicleTransmission(v:IQualitativeValue);virtual;
function Get_vehicleSeatingCapacity:IQuantitativeValue;virtual;
procedure Set_vehicleSeatingCapacity(v:IQuantitativeValue);virtual;
function Get_accelerationTime:IQuantitativeValue;virtual;
procedure Set_accelerationTime(v:IQuantitativeValue);virtual;
function Get_purchaseDate:TDateTime;virtual;
procedure Set_purchaseDate(v:TDateTime);virtual;
function Get_payload:IQuantitativeValue;virtual;
procedure Set_payload(v:IQuantitativeValue);virtual;
function Get_fuelCapacity:IQuantitativeValue;virtual;
procedure Set_fuelCapacity(v:IQuantitativeValue);virtual;
function Get_vehicleEngine:IEngineSpecification;virtual;
procedure Set_vehicleEngine(v:IEngineSpecification);virtual;
function Get_emissionsCO2:INumber;virtual;
procedure Set_emissionsCO2(v:INumber);virtual;
function Get_numberOfAxles:INumber;virtual;
procedure Set_numberOfAxles(v:INumber);virtual;
function Get_speed:IQuantitativeValue;virtual;
procedure Set_speed(v:IQuantitativeValue);virtual;
function Get_vehicleIdentificationNumber:String;virtual;
procedure Set_vehicleIdentificationNumber(v:String);virtual;
function Get_trailerWeight:IQuantitativeValue;virtual;
procedure Set_trailerWeight(v:IQuantitativeValue);virtual;
public
property numberOfPreviousOwners:INumber read Get_numberOfPreviousOwners write Set_numberOfPreviousOwners;
property meetsEmissionStandard:IQualitativeValue read Get_meetsEmissionStandard write Set_meetsEmissionStandard;
property driveWheelConfiguration:IDriveWheelConfigurationValue read Get_driveWheelConfiguration write Set_driveWheelConfiguration;
property fuelConsumption:IQuantitativeValue read Get_fuelConsumption write Set_fuelConsumption;
property wheelbase:IQuantitativeValue read Get_wheelbase write Set_wheelbase;
property mileageFromOdometer:IQuantitativeValue read Get_mileageFromOdometer write Set_mileageFromOdometer;
property numberOfAirbags:INumber read Get_numberOfAirbags write Set_numberOfAirbags;
property seatingCapacity:IQuantitativeValue read Get_seatingCapacity write Set_seatingCapacity;
property steeringPosition:ISteeringPositionValue read Get_steeringPosition write Set_steeringPosition;
property numberOfDoors:INumber read Get_numberOfDoors write Set_numberOfDoors;
property weightTotal:IQuantitativeValue read Get_weightTotal write Set_weightTotal;
property numberOfForwardGears:INumber read Get_numberOfForwardGears write Set_numberOfForwardGears;
property tongueWeight:IQuantitativeValue read Get_tongueWeight write Set_tongueWeight;
property fuelEfficiency:IQuantitativeValue read Get_fuelEfficiency write Set_fuelEfficiency;
property cargoVolume:IQuantitativeValue read Get_cargoVolume write Set_cargoVolume;
property vehicleTransmission:IQualitativeValue read Get_vehicleTransmission write Set_vehicleTransmission;
property vehicleSeatingCapacity:IQuantitativeValue read Get_vehicleSeatingCapacity write Set_vehicleSeatingCapacity;
property accelerationTime:IQuantitativeValue read Get_accelerationTime write Set_accelerationTime;
property payload:IQuantitativeValue read Get_payload write Set_payload;
property fuelCapacity:IQuantitativeValue read Get_fuelCapacity write Set_fuelCapacity;
property vehicleEngine:IEngineSpecification read Get_vehicleEngine write Set_vehicleEngine;
property emissionsCO2:INumber read Get_emissionsCO2 write Set_emissionsCO2;
property numberOfAxles:INumber read Get_numberOfAxles write Set_numberOfAxles;
property speed:IQuantitativeValue read Get_speed write Set_speed;
property trailerWeight:IQuantitativeValue read Get_trailerWeight write Set_trailerWeight;
published
property vehicleInteriorType:String read Get_vehicleInteriorType write Set_vehicleInteriorType;
property modelDate:TDateTime read Get_modelDate write Set_modelDate;
property knownVehicleDamages:String read Get_knownVehicleDamages write Set_knownVehicleDamages;
property bodyType:String read Get_bodyType write Set_bodyType;
property vehicleInteriorColor:String read Get_vehicleInteriorColor write Set_vehicleInteriorColor;
property vehicleSpecialUsage:String read Get_vehicleSpecialUsage write Set_vehicleSpecialUsage;
property productionDate:TDateTime read Get_productionDate write Set_productionDate;
property vehicleModelDate:TDateTime read Get_vehicleModelDate write Set_vehicleModelDate;
property dateVehicleFirstRegistered:TDateTime read Get_dateVehicleFirstRegistered write Set_dateVehicleFirstRegistered;
property vehicleConfiguration:String read Get_vehicleConfiguration write Set_vehicleConfiguration;
property purchaseDate:TDateTime read Get_purchaseDate write Set_purchaseDate;
property vehicleIdentificationNumber:String read Get_vehicleIdentificationNumber write Set_vehicleIdentificationNumber;
end;
(*DriveWheelConfigurationValue*)
TDriveWheelConfigurationValue=Class (TQualitativeValue,IDriveWheelConfigurationValue)
function TangDriveWheelConfigurationValue:TangibleValue;virtual;
end;
(*SteeringPositionValue*)
TSteeringPositionValue=Class (TQualitativeValue,ISteeringPositionValue)
function TangSteeringPositionValue:TangibleValue;virtual;
end;
(*EngineSpecification*)
TEngineSpecification=Class (TStructuredValue,IEngineSpecification)
private
FenginePower:IQuantitativeValue;
FengineDisplacement:IQuantitativeValue;
FfuelType:String;
FengineType:String;
Ftorque:IQuantitativeValue;
protected
function Get_enginePower:IQuantitativeValue;virtual;
procedure Set_enginePower(v:IQuantitativeValue);virtual;
function Get_engineDisplacement:IQuantitativeValue;virtual;
procedure Set_engineDisplacement(v:IQuantitativeValue);virtual;
function Get_fuelType:String;virtual;
procedure Set_fuelType(v:String);virtual;
function Get_engineType:String;virtual;
procedure Set_engineType(v:String);virtual;
function Get_torque:IQuantitativeValue;virtual;
procedure Set_torque(v:IQuantitativeValue);virtual;
public
property enginePower:IQuantitativeValue read Get_enginePower write Set_enginePower;
property engineDisplacement:IQuantitativeValue read Get_engineDisplacement write Set_engineDisplacement;
property torque:IQuantitativeValue read Get_torque write Set_torque;
published
property fuelType:String read Get_fuelType write Set_fuelType;
property engineType:String read Get_engineType write Set_engineType;
end;
(*Motorcycle*)
TMotorcycle=Class (TVehicle,IMotorcycle)
(*No atribs*)
end;
(*BodyOfWater*)
TBodyOfWater=Class (TLandform,IBodyOfWater)
(*No atribs*)
end;
(*Canal*)
TCanal=Class (TBodyOfWater,ICanal)
(*No atribs*)
end;
(*ViewAction*)
TViewAction=Class (TConsumeAction,IViewAction)
(*No atribs*)
end;
(*PawnShop*)
TPawnShop=Class (TStore,IPawnShop)
(*No atribs*)
end;
(*HairSalon*)
THairSalon=Class (THealthAndBeautyBusiness,IHairSalon)
(*No atribs*)
end;
TBreadcrumbList=Class; //forward
(*WebPage*)
TWebPage=Class (TCreativeWork,IWebPage)
private
FprimaryImageOfPage:IImageObject;
Fbreadcrumb:IBreadcrumbList;
FsignificantLinks:String;
FrelatedLink:String;
FreviewedBy:IPerson;
Fspecialty:ISpecialty;
FlastReviewed:TDateTime;
protected
function Get_primaryImageOfPage:IImageObject;virtual;
procedure Set_primaryImageOfPage(v:IImageObject);virtual;
function Get_breadcrumb:IBreadcrumbList;virtual;
procedure Set_breadcrumb(v:IBreadcrumbList);virtual;
function Get_significantLinks:String;virtual;
procedure Set_significantLinks(v:String);virtual;
function Get_relatedLink:String;virtual;
procedure Set_relatedLink(v:String);virtual;
function Get_reviewedBy:IPerson;virtual;
procedure Set_reviewedBy(v:IPerson);virtual;
function Get_specialty:ISpecialty;virtual;
procedure Set_specialty(v:ISpecialty);virtual;
function Get_lastReviewed:TDateTime;virtual;
procedure Set_lastReviewed(v:TDateTime);virtual;
public
property primaryImageOfPage:IImageObject read Get_primaryImageOfPage write Set_primaryImageOfPage;
property breadcrumb:IBreadcrumbList read Get_breadcrumb write Set_breadcrumb;
property reviewedBy:IPerson read Get_reviewedBy write Set_reviewedBy;
property specialty:ISpecialty read Get_specialty write Set_specialty;
published
property significantLinks:String read Get_significantLinks write Set_significantLinks;
property relatedLink:String read Get_relatedLink write Set_relatedLink;
property lastReviewed:TDateTime read Get_lastReviewed write Set_lastReviewed;
end;
(*BreadcrumbList*)
TBreadcrumbList=Class (TItemList,IBreadcrumbList)
function TangBreadcrumbList:TangibleValue;virtual;
end;
(*ItemPage*)
TItemPage=Class (TWebPage,IItemPage)
(*No atribs*)
end;
(*InteractAction*)
TInteractAction=Class (TAction,IInteractAction)
(*No atribs*)
end;
(*CommunicateAction*)
TCommunicateAction=Class (TInteractAction,ICommunicateAction)
(*No atribs*)
end;
(*ShareAction*)
TShareAction=Class (TCommunicateAction,IShareAction)
(*No atribs*)
end;
(*Painting*)
TPainting=Class (TCreativeWork,IPainting)
(*No atribs*)
end;
(*FinancialService*)
TFinancialService=Class (TLocalBusiness,IFinancialService)
private
FfeesAndCommissionsSpecification:String;
protected
function Get_feesAndCommissionsSpecification:String;virtual;
procedure Set_feesAndCommissionsSpecification(v:String);virtual;
public
published
property feesAndCommissionsSpecification:String read Get_feesAndCommissionsSpecification write Set_feesAndCommissionsSpecification;
end;
(*InsuranceAgency*)
TInsuranceAgency=Class (TFinancialService,IInsuranceAgency)
(*No atribs*)
end;
(*ContactPage*)
TContactPage=Class (TWebPage,IContactPage)
(*No atribs*)
end;
(*UserPlays*)
TUserPlays=Class (TUserInteraction,IUserPlays)
(*No atribs*)
end;
(*PsychologicalTreatment*)
TPsychologicalTreatment=Class (TTherapeuticProcedure,IPsychologicalTreatment)
(*No atribs*)
end;
(*Zoo*)
TZoo=Class (TCivicStructure,IZoo)
(*No atribs*)
end;
(*MarryAction*)
TMarryAction=Class (TInteractAction,IMarryAction)
(*No atribs*)
end;
(*FireStation*)
TFireStation=Class (TCivicStructure,IFireStation)
(*No atribs*)
end;
(*SubwayStation*)
TSubwayStation=Class (TCivicStructure,ISubwayStation)
(*No atribs*)
end;
(*EventSeries*)
TEventSeries=Class (TEvent,IEventSeries)
(*No atribs*)
end;
(*Volcano*)
TVolcano=Class (TLandform,IVolcano)
(*No atribs*)
end;
(*AutomotiveBusiness*)
TAutomotiveBusiness=Class (TLocalBusiness,IAutomotiveBusiness)
(*No atribs*)
end;
(*AutoWash*)
TAutoWash=Class (TAutomotiveBusiness,IAutoWash)
(*No atribs*)
end;
(*GardenStore*)
TGardenStore=Class (TStore,IGardenStore)
(*No atribs*)
end;
(*UserBlocks*)
TUserBlocks=Class (TUserInteraction,IUserBlocks)
(*No atribs*)
end;
(*GoodRelationsClass*)
TGoodRelationsClass=Class (TDeliveryMethod,IGoodRelationsClass)
function TangGoodRelationsClass:TangibleValue;virtual;
end;
(*Code*)
TCode=Class (TCreativeWork,ICode)
(*No atribs*)
end;
(*TransferAction*)
TTransferAction=Class (TAction,ITransferAction)
(*No atribs*)
end;
(*DownloadAction*)
TDownloadAction=Class (TTransferAction,IDownloadAction)
(*No atribs*)
end;
(*OceanBodyOfWater*)
TOceanBodyOfWater=Class (TBodyOfWater,IOceanBodyOfWater)
(*No atribs*)
end;
(*AssessAction*)
TAssessAction=Class (TAction,IAssessAction)
(*No atribs*)
end;
(*ReactAction*)
TReactAction=Class (TAssessAction,IReactAction)
(*No atribs*)
end;
(*WantAction*)
TWantAction=Class (TReactAction,IWantAction)
(*No atribs*)
end;
(*VitalSign*)
TVitalSign=Class (TMedicalSign,IVitalSign)
(*No atribs*)
end;
(*PerformingGroup*)
TPerformingGroup=Class (TOrganization,IPerformingGroup)
(*No atribs*)
end;
(*DanceGroup*)
TDanceGroup=Class (TPerformingGroup,IDanceGroup)
(*No atribs*)
end;
(*Florist*)
TFlorist=Class (TStore,IFlorist)
(*No atribs*)
end;
(*WPSideBar*)
TWPSideBar=Class (TWebPageElement,IWPSideBar)
(*No atribs*)
end;
(*TheaterGroup*)
TTheaterGroup=Class (TPerformingGroup,ITheaterGroup)
(*No atribs*)
end;
(*ArriveAction*)
TArriveAction=Class (TMoveAction,IArriveAction)
(*No atribs*)
end;
(*RadiationTherapy*)
TRadiationTherapy=Class (TMedicalTherapy,IRadiationTherapy)
(*No atribs*)
end;
(*AutoPartsStore*)
TAutoPartsStore=Class (TStore,IAutoPartsStore)
(*No atribs*)
end;
(*AppendAction*)
TAppendAction=Class (TInsertAction,IAppendAction)
(*No atribs*)
end;
(*WPHeader*)
TWPHeader=Class (TWebPageElement,IWPHeader)
(*No atribs*)
end;
TDigitalDocumentPermission=Class; //forward
(*DigitalDocument*)
TDigitalDocument=Class (TCreativeWork,IDigitalDocument)
private
FhasDigitalDocumentPermission:IDigitalDocumentPermission;
protected
function Get_hasDigitalDocumentPermission:IDigitalDocumentPermission;virtual;
procedure Set_hasDigitalDocumentPermission(v:IDigitalDocumentPermission);virtual;
public
property hasDigitalDocumentPermission:IDigitalDocumentPermission read Get_hasDigitalDocumentPermission write Set_hasDigitalDocumentPermission;
published
end;
TDigitalDocumentPermissionType=Class; //forward
(*DigitalDocumentPermission*)
TDigitalDocumentPermission=Class (TIntangible,IDigitalDocumentPermission)
private
FpermissionType:IDigitalDocumentPermissionType;
Fgrantee:IAudience;
protected
function Get_permissionType:IDigitalDocumentPermissionType;virtual;
procedure Set_permissionType(v:IDigitalDocumentPermissionType);virtual;
function Get_grantee:IAudience;virtual;
procedure Set_grantee(v:IAudience);virtual;
public
property permissionType:IDigitalDocumentPermissionType read Get_permissionType write Set_permissionType;
property grantee:IAudience read Get_grantee write Set_grantee;
published
end;
(*DigitalDocumentPermissionType*)
TDigitalDocumentPermissionType=Class (TEnumeration,IDigitalDocumentPermissionType)
function TangDigitalDocumentPermissionType:TangibleValue;virtual;
end;
(*NoteDigitalDocument*)
TNoteDigitalDocument=Class (TDigitalDocument,INoteDigitalDocument)
(*No atribs*)
end;
(*SocialMediaPosting*)
TSocialMediaPosting=Class (TArticle,ISocialMediaPosting)
private
FsharedContent:ICreativeWork;
protected
function Get_sharedContent:ICreativeWork;virtual;
procedure Set_sharedContent(v:ICreativeWork);virtual;
public
property sharedContent:ICreativeWork read Get_sharedContent write Set_sharedContent;
published
end;
(*DiscussionForumPosting*)
TDiscussionForumPosting=Class (TSocialMediaPosting,IDiscussionForumPosting)
(*No atribs*)
end;
(*CheckOutAction*)
TCheckOutAction=Class (TCommunicateAction,ICheckOutAction)
(*No atribs*)
end;
(*TextDigitalDocument*)
TTextDigitalDocument=Class (TDigitalDocument,ITextDigitalDocument)
(*No atribs*)
end;
(*BedAndBreakfast*)
TBedAndBreakfast=Class (TLodgingBusiness,IBedAndBreakfast)
(*No atribs*)
end;
(*Reservoir*)
TReservoir=Class (TBodyOfWater,IReservoir)
(*No atribs*)
end;
(*SaleEvent*)
TSaleEvent=Class (TEvent,ISaleEvent)
(*No atribs*)
end;
(*RadioStation*)
TRadioStation=Class (TLocalBusiness,IRadioStation)
(*No atribs*)
end;
(*BookmarkAction*)
TBookmarkAction=Class (TOrganizeAction,IBookmarkAction)
(*No atribs*)
end;
(*MedicalOrganization*)
TMedicalOrganization=Class (TOrganization,IMedicalOrganization)
private
FmedicalSpecialty:IMedicalSpecialty;
FhealthPlanNetworkId:String;
FisAcceptingNewPatients:Boolean;
protected
function Get_medicalSpecialty:IMedicalSpecialty;virtual;
procedure Set_medicalSpecialty(v:IMedicalSpecialty);virtual;
function Get_healthPlanNetworkId:String;virtual;
procedure Set_healthPlanNetworkId(v:String);virtual;
function Get_isAcceptingNewPatients:Boolean;virtual;
procedure Set_isAcceptingNewPatients(v:Boolean);virtual;
public
property medicalSpecialty:IMedicalSpecialty read Get_medicalSpecialty write Set_medicalSpecialty;
published
property healthPlanNetworkId:String read Get_healthPlanNetworkId write Set_healthPlanNetworkId;
property isAcceptingNewPatients:Boolean read Get_isAcceptingNewPatients write Set_isAcceptingNewPatients;
end;
(*Pharmacy*)
TPharmacy=Class (TMedicalOrganization,IPharmacy)
(*No atribs*)
end;
(*UserTweets*)
TUserTweets=Class (TUserInteraction,IUserTweets)
(*No atribs*)
end;
(*TireShop*)
TTireShop=Class (TStore,ITireShop)
(*No atribs*)
end;
(*Series*)
TSeries=Class (TCreativeWork,ISeries)
(*No atribs*)
end;
(*UnRegisterAction*)
TUnRegisterAction=Class (TInteractAction,IUnRegisterAction)
(*No atribs*)
end;
(*FurnitureStore*)
TFurnitureStore=Class (TStore,IFurnitureStore)
(*No atribs*)
end;
(*MobilePhoneStore*)
TMobilePhoneStore=Class (TStore,IMobilePhoneStore)
(*No atribs*)
end;
(*CollectionPage*)
TCollectionPage=Class (TWebPage,ICollectionPage)
(*No atribs*)
end;
(*ImageGallery*)
TImageGallery=Class (TCollectionPage,IImageGallery)
(*No atribs*)
end;
(*FinancialProduct*)
TFinancialProduct=Class (TService,IFinancialProduct)
private
FannualPercentageRate:IQuantitativeValue;
FinterestRate:INumber;
protected
function Get_annualPercentageRate:IQuantitativeValue;virtual;
procedure Set_annualPercentageRate(v:IQuantitativeValue);virtual;
function Get_interestRate:INumber;virtual;
procedure Set_interestRate(v:INumber);virtual;
public
property annualPercentageRate:IQuantitativeValue read Get_annualPercentageRate write Set_annualPercentageRate;
property interestRate:INumber read Get_interestRate write Set_interestRate;
published
end;
(*CurrencyConversionService*)
TCurrencyConversionService=Class (TFinancialProduct,ICurrencyConversionService)
function TangCurrencyConversionService:TangibleValue;virtual;
end;
(*InstallAction*)
TInstallAction=Class (TConsumeAction,IInstallAction)
(*No atribs*)
end;
(*VideoGallery*)
TVideoGallery=Class (TCollectionPage,IVideoGallery)
(*No atribs*)
end;
(*Sculpture*)
TSculpture=Class (TCreativeWork,ISculpture)
(*No atribs*)
end;
(*EventVenue*)
TEventVenue=Class (TCivicStructure,IEventVenue)
(*No atribs*)
end;
(*AdultEntertainment*)
TAdultEntertainment=Class (TEntertainmentBusiness,IAdultEntertainment)
(*No atribs*)
end;
(*TakeAction*)
TTakeAction=Class (TTransferAction,ITakeAction)
(*No atribs*)
end;
(*SuspendAction*)
TSuspendAction=Class (TControlAction,ISuspendAction)
(*No atribs*)
end;
(*MusicStore*)
TMusicStore=Class (TStore,IMusicStore)
(*No atribs*)
end;
(*TradeAction*)
TTradeAction=Class (TAction,ITradeAction)
private
Fprice:INumber;
FpriceSpecification:IPriceSpecification;
protected
function Get_price:INumber;virtual;
procedure Set_price(v:INumber);virtual;
function Get_priceSpecification:IPriceSpecification;virtual;
procedure Set_priceSpecification(v:IPriceSpecification);virtual;
public
property price:INumber read Get_price write Set_price;
property priceSpecification:IPriceSpecification read Get_priceSpecification write Set_priceSpecification;
published
end;
(*PreOrderAction*)
TPreOrderAction=Class (TTradeAction,IPreOrderAction)
(*No atribs*)
end;
(*PetStore*)
TPetStore=Class (TStore,IPetStore)
(*No atribs*)
end;
(*Dentist*)
TDentist=Class (TMedicalOrganization,IDentist)
(*No atribs*)
end;
(*HomeAndConstructionBusiness*)
THomeAndConstructionBusiness=Class (TLocalBusiness,IHomeAndConstructionBusiness)
(*No atribs*)
end;
(*RoofingContractor*)
TRoofingContractor=Class (THomeAndConstructionBusiness,IRoofingContractor)
(*No atribs*)
end;
(*MovingCompany*)
TMovingCompany=Class (THomeAndConstructionBusiness,IMovingCompany)
(*No atribs*)
end;
(*Table*)
TTable=Class (TWebPageElement,ITable)
(*No atribs*)
end;
(*HealthClub*)
THealthClub=Class (THealthAndBeautyBusiness,IHealthClub)
(*No atribs*)
end;
(*Festival*)
TFestival=Class (TEvent,IFestival)
(*No atribs*)
end;
(*AchieveAction*)
TAchieveAction=Class (TAction,IAchieveAction)
(*No atribs*)
end;
(*TieAction*)
TTieAction=Class (TAchieveAction,ITieAction)
(*No atribs*)
end;
(*LakeBodyOfWater*)
TLakeBodyOfWater=Class (TBodyOfWater,ILakeBodyOfWater)
(*No atribs*)
end;
(*AutoRepair*)
TAutoRepair=Class (TAutomotiveBusiness,IAutoRepair)
(*No atribs*)
end;
(*ReadAction*)
TReadAction=Class (TConsumeAction,IReadAction)
(*No atribs*)
end;
(*Aquarium*)
TAquarium=Class (TCivicStructure,IAquarium)
(*No atribs*)
end;
(*PaymentCard*)
TPaymentCard=Class (TFinancialProduct,IPaymentCard)
function TangPaymentCard:TangibleValue;virtual;
end;
(*CreditCard*)
TCreditCard=Class (TPaymentCard,ICreditCard)
function TangCreditCard:TangibleValue;virtual;
end;
(*LandmarksOrHistoricalBuildings*)
TLandmarksOrHistoricalBuildings=Class (TPlace,ILandmarksOrHistoricalBuildings)
(*No atribs*)
end;
(*GovernmentOrganization*)
TGovernmentOrganization=Class (TOrganization,IGovernmentOrganization)
(*No atribs*)
end;
(*Preschool*)
TPreschool=Class (TEducationalOrganization,IPreschool)
(*No atribs*)
end;
(*Electrician*)
TElectrician=Class (THomeAndConstructionBusiness,IElectrician)
(*No atribs*)
end;
(*TaxiStand*)
TTaxiStand=Class (TCivicStructure,ITaxiStand)
(*No atribs*)
end;
(*AmusementPark*)
TAmusementPark=Class (TEntertainmentBusiness,IAmusementPark)
(*No atribs*)
end;
(*ReportedDoseSchedule*)
TReportedDoseSchedule=Class (TDoseSchedule,IReportedDoseSchedule)
(*No atribs*)
end;
(*PhysicalTherapy*)
TPhysicalTherapy=Class (TMedicalTherapy,IPhysicalTherapy)
(*No atribs*)
end;
(*Courthouse*)
TCourthouse=Class (TGovernmentBuilding,ICourthouse)
(*No atribs*)
end;
(*RVPark*)
TRVPark=Class (TCivicStructure,IRVPark)
(*No atribs*)
end;
(*EmploymentAgency*)
TEmploymentAgency=Class (TLocalBusiness,IEmploymentAgency)
(*No atribs*)
end;
(*PalliativeProcedure*)
TPalliativeProcedure=Class (TMedicalProcedure,IPalliativeProcedure)
(*No atribs*)
end;
(*TouristInformationCenter*)
TTouristInformationCenter=Class (TLocalBusiness,ITouristInformationCenter)
(*No atribs*)
end;
(*DeactivateAction*)
TDeactivateAction=Class (TControlAction,IDeactivateAction)
(*No atribs*)
end;
(*RiverBodyOfWater*)
TRiverBodyOfWater=Class (TBodyOfWater,IRiverBodyOfWater)
(*No atribs*)
end;
(*Locksmith*)
TLocksmith=Class (THomeAndConstructionBusiness,ILocksmith)
(*No atribs*)
end;
(*EndorsementRating*)
TEndorsementRating=Class (TRating,IEndorsementRating)
function TangEndorsementRating:TangibleValue;virtual;
end;
(*FoodService*)
TFoodService=Class (TService,IFoodService)
function TangFoodService:TangibleValue;virtual;
end;
(*RadioClip*)
TRadioClip=Class (TClip,IRadioClip)
(*No atribs*)
end;
(*Plumber*)
TPlumber=Class (THomeAndConstructionBusiness,IPlumber)
(*No atribs*)
end;
(*PlaceOfWorship*)
TPlaceOfWorship=Class (TCivicStructure,IPlaceOfWorship)
(*No atribs*)
end;
(*Church*)
TChurch=Class (TPlaceOfWorship,IChurch)
(*No atribs*)
end;
(*ListenAction*)
TListenAction=Class (TConsumeAction,IListenAction)
(*No atribs*)
end;
TLocationFeatureSpecification=Class; //forward
(*Accommodation*)
TAccommodation=Class (TPlace,IAccommodation)
private
FamenityFeature:ILocationFeatureSpecification;
FfloorSize:IQuantitativeValue;
FpermittedUsage:String;
protected
function Get_amenityFeature:ILocationFeatureSpecification;virtual;
procedure Set_amenityFeature(v:ILocationFeatureSpecification);virtual;
function Get_floorSize:IQuantitativeValue;virtual;
procedure Set_floorSize(v:IQuantitativeValue);virtual;
function Get_permittedUsage:String;virtual;
procedure Set_permittedUsage(v:String);virtual;
public
property amenityFeature:ILocationFeatureSpecification read Get_amenityFeature write Set_amenityFeature;
property floorSize:IQuantitativeValue read Get_floorSize write Set_floorSize;
published
property permittedUsage:String read Get_permittedUsage write Set_permittedUsage;
end;
(*LocationFeatureSpecification*)
TLocationFeatureSpecification=Class (TPropertyValue,ILocationFeatureSpecification)
function TangLocationFeatureSpecification:TangibleValue;virtual;
end;
(*Room*)
TRoom=Class (TAccommodation,IRoom)
(*No atribs*)
end;
(*MeetingRoom*)
TMeetingRoom=Class (TRoom,IMeetingRoom)
(*No atribs*)
end;
(*PlanAction*)
TPlanAction=Class (TOrganizeAction,IPlanAction)
private
FscheduledTime:TDateTime;
protected
function Get_scheduledTime:TDateTime;virtual;
procedure Set_scheduledTime(v:TDateTime);virtual;
public
published
property scheduledTime:TDateTime read Get_scheduledTime write Set_scheduledTime;
end;
(*ReserveAction*)
TReserveAction=Class (TPlanAction,IReserveAction)
(*No atribs*)
end;
(*GroceryStore*)
TGroceryStore=Class (TStore,IGroceryStore)
(*No atribs*)
end;
(*Campground*)
TCampground=Class (TCivicStructure,ICampground)
(*No atribs*)
end;
(*UserPlusOnes*)
TUserPlusOnes=Class (TUserInteraction,IUserPlusOnes)
(*No atribs*)
end;
(*AutomatedTeller*)
TAutomatedTeller=Class (TFinancialService,IAutomatedTeller)
(*No atribs*)
end;
(*AgreeAction*)
TAgreeAction=Class (TReactAction,IAgreeAction)
(*No atribs*)
end;
(*ComedyClub*)
TComedyClub=Class (TEntertainmentBusiness,IComedyClub)
(*No atribs*)
end;
(*Hostel*)
THostel=Class (TLodgingBusiness,IHostel)
(*No atribs*)
end;
(*ShoppingCenter*)
TShoppingCenter=Class (TLocalBusiness,IShoppingCenter)
(*No atribs*)
end;
(*CafeOrCoffeeShop*)
TCafeOrCoffeeShop=Class (TFoodEstablishment,ICafeOrCoffeeShop)
(*No atribs*)
end;
(*ClothingStore*)
TClothingStore=Class (TStore,IClothingStore)
(*No atribs*)
end;
(*ChildCare*)
TChildCare=Class (TLocalBusiness,IChildCare)
(*No atribs*)
end;
(*ApprovedIndication*)
TApprovedIndication=Class (TMedicalIndication,IApprovedIndication)
(*No atribs*)
end;
(*SearchResultsPage*)
TSearchResultsPage=Class (TWebPage,ISearchResultsPage)
(*No atribs*)
end;
(*GovernmentOffice*)
TGovernmentOffice=Class (TLocalBusiness,IGovernmentOffice)
(*No atribs*)
end;
(*PostOffice*)
TPostOffice=Class (TGovernmentOffice,IPostOffice)
(*No atribs*)
end;
(*AutoBodyShop*)
TAutoBodyShop=Class (TAutomotiveBusiness,IAutoBodyShop)
(*No atribs*)
end;
(*LockerDelivery*)
TLockerDelivery=Class (TDeliveryMethod,ILockerDelivery)
function TangLockerDelivery:TangibleValue;virtual;
end;
(*BookStore*)
TBookStore=Class (TStore,IBookStore)
(*No atribs*)
end;
(*CollegeOrUniversity*)
TCollegeOrUniversity=Class (TEducationalOrganization,ICollegeOrUniversity)
(*No atribs*)
end;
(*RecyclingCenter*)
TRecyclingCenter=Class (TLocalBusiness,IRecyclingCenter)
(*No atribs*)
end;
(*MedicalRiskEstimator*)
TMedicalRiskEstimator=Class (TMedicalEntity,IMedicalRiskEstimator)
private
FestimatesRiskOf:IMedicalEntity;
FincludedRiskFactor:IMedicalRiskFactor;
protected
function Get_estimatesRiskOf:IMedicalEntity;virtual;
procedure Set_estimatesRiskOf(v:IMedicalEntity);virtual;
function Get_includedRiskFactor:IMedicalRiskFactor;virtual;
procedure Set_includedRiskFactor(v:IMedicalRiskFactor);virtual;
public
property estimatesRiskOf:IMedicalEntity read Get_estimatesRiskOf write Set_estimatesRiskOf;
property includedRiskFactor:IMedicalRiskFactor read Get_includedRiskFactor write Set_includedRiskFactor;
published
end;
(*MedicalRiskCalculator*)
TMedicalRiskCalculator=Class (TMedicalRiskEstimator,IMedicalRiskCalculator)
(*No atribs*)
end;
(*ComputerStore*)
TComputerStore=Class (TStore,IComputerStore)
(*No atribs*)
end;
(*DisagreeAction*)
TDisagreeAction=Class (TReactAction,IDisagreeAction)
(*No atribs*)
end;
(*MiddleSchool*)
TMiddleSchool=Class (TEducationalOrganization,IMiddleSchool)
(*No atribs*)
end;
(*School*)
TSchool=Class (TEducationalOrganization,ISchool)
(*No atribs*)
end;
(*SelfStorage*)
TSelfStorage=Class (TLocalBusiness,ISelfStorage)
(*No atribs*)
end;
(*Playground*)
TPlayground=Class (TCivicStructure,IPlayground)
(*No atribs*)
end;
(*PaymentService*)
TPaymentService=Class (TFinancialProduct,IPaymentService)
function TangPaymentService:TangibleValue;virtual;
end;
(*ArtGallery*)
TArtGallery=Class (TEntertainmentBusiness,IArtGallery)
(*No atribs*)
end;
(*AccountingService*)
TAccountingService=Class (TFinancialService,IAccountingService)
(*No atribs*)
end;
(*PreventionIndication*)
TPreventionIndication=Class (TMedicalIndication,IPreventionIndication)
(*No atribs*)
end;
(*CampingPitch*)
TCampingPitch=Class (TAccommodation,ICampingPitch)
(*No atribs*)
end;
(*DefenceEstablishment*)
TDefenceEstablishment=Class (TGovernmentBuilding,IDefenceEstablishment)
(*No atribs*)
end;
(*ComicSeries*)
TComicSeries=Class (TPeriodical,IComicSeries)
(*No atribs*)
end;
(*ChildrensEvent*)
TChildrensEvent=Class (TEvent,IChildrensEvent)
(*No atribs*)
end;
(*CatholicChurch*)
TCatholicChurch=Class (TPlaceOfWorship,ICatholicChurch)
(*No atribs*)
end;
(*AboutPage*)
TAboutPage=Class (TWebPage,IAboutPage)
(*No atribs*)
end;
(*IgnoreAction*)
TIgnoreAction=Class (TAssessAction,IIgnoreAction)
(*No atribs*)
end;
(*BusinessEvent*)
TBusinessEvent=Class (TEvent,IBusinessEvent)
(*No atribs*)
end;
(*Residence*)
TResidence=Class (TPlace,IResidence)
(*No atribs*)
end;
(*ApartmentComplex*)
TApartmentComplex=Class (TResidence,IApartmentComplex)
(*No atribs*)
end;
(*JewelryStore*)
TJewelryStore=Class (TStore,IJewelryStore)
(*No atribs*)
end;
(*SportingGoodsStore*)
TSportingGoodsStore=Class (TStore,ISportingGoodsStore)
(*No atribs*)
end;
(*MotorcycleRepair*)
TMotorcycleRepair=Class (TAutomotiveBusiness,IMotorcycleRepair)
(*No atribs*)
end;
(*Synagogue*)
TSynagogue=Class (TPlaceOfWorship,ISynagogue)
(*No atribs*)
end;
(*DiagnosticProcedure*)
TDiagnosticProcedure=Class (TMedicalProcedure,IDiagnosticProcedure)
(*No atribs*)
end;
(*Motel*)
TMotel=Class (TLodgingBusiness,IMotel)
(*No atribs*)
end;
(*CancelAction*)
TCancelAction=Class (TPlanAction,ICancelAction)
(*No atribs*)
end;
(*ElectronicsStore*)
TElectronicsStore=Class (TStore,IElectronicsStore)
(*No atribs*)
end;
(*GeneralContractor*)
TGeneralContractor=Class (THomeAndConstructionBusiness,IGeneralContractor)
(*No atribs*)
end;
(*BankOrCreditUnion*)
TBankOrCreditUnion=Class (TFinancialService,IBankOrCreditUnion)
(*No atribs*)
end;
(*WorkersUnion*)
TWorkersUnion=Class (TOrganization,IWorkersUnion)
(*No atribs*)
end;
(*AcceptAction*)
TAcceptAction=Class (TAllocateAction,IAcceptAction)
(*No atribs*)
end;
(*SportsClub*)
TSportsClub=Class (TSportsActivityLocation,ISportsClub)
(*No atribs*)
end;
(*AutoRental*)
TAutoRental=Class (TAutomotiveBusiness,IAutoRental)
(*No atribs*)
end;
(*PresentationDigitalDocument*)
TPresentationDigitalDocument=Class (TDigitalDocument,IPresentationDigitalDocument)
(*No atribs*)
end;
(*MotorizedBicycle*)
TMotorizedBicycle=Class (TVehicle,IMotorizedBicycle)
(*No atribs*)
end;
(*BeautySalon*)
TBeautySalon=Class (THealthAndBeautyBusiness,IBeautySalon)
(*No atribs*)
end;
(*HinduTemple*)
THinduTemple=Class (TPlaceOfWorship,IHinduTemple)
(*No atribs*)
end;
(*PublicSwimmingPool*)
TPublicSwimmingPool=Class (TSportsActivityLocation,IPublicSwimmingPool)
(*No atribs*)
end;
(*DaySpa*)
TDaySpa=Class (THealthAndBeautyBusiness,IDaySpa)
(*No atribs*)
end;
(*CheckInAction*)
TCheckInAction=Class (TCommunicateAction,ICheckInAction)
(*No atribs*)
end;
(*ExhibitionEvent*)
TExhibitionEvent=Class (TEvent,IExhibitionEvent)
(*No atribs*)
end;
(*Distillery*)
TDistillery=Class (TFoodEstablishment,IDistillery)
(*No atribs*)
end;
(*GatedResidenceCommunity*)
TGatedResidenceCommunity=Class (TResidence,IGatedResidenceCommunity)
(*No atribs*)
end;
(*ParkingFacility*)
TParkingFacility=Class (TCivicStructure,IParkingFacility)
(*No atribs*)
end;
(*EventReservation*)
TEventReservation=Class (TReservation,IEventReservation)
function TangEventReservation:TangibleValue;virtual;
end;
(*HardwareStore*)
THardwareStore=Class (TStore,IHardwareStore)
(*No atribs*)
end;
(*MotorcycleDealer*)
TMotorcycleDealer=Class (TAutomotiveBusiness,IMotorcycleDealer)
(*No atribs*)
end;
(*UserCheckins*)
TUserCheckins=Class (TUserInteraction,IUserCheckins)
(*No atribs*)
end;
(*RegisterAction*)
TRegisterAction=Class (TInteractAction,IRegisterAction)
(*No atribs*)
end;
(*IceCreamShop*)
TIceCreamShop=Class (TFoodEstablishment,IIceCreamShop)
(*No atribs*)
end;
(*MovieRentalStore*)
TMovieRentalStore=Class (TStore,IMovieRentalStore)
(*No atribs*)
end;
(*FindAction*)
TFindAction=Class (TAction,IFindAction)
(*No atribs*)
end;
(*CheckAction*)
TCheckAction=Class (TFindAction,ICheckAction)
(*No atribs*)
end;
(*WPFooter*)
TWPFooter=Class (TWebPageElement,IWPFooter)
(*No atribs*)
end;
(*TreatmentIndication*)
TTreatmentIndication=Class (TMedicalIndication,ITreatmentIndication)
(*No atribs*)
end;
(*MensClothingStore*)
TMensClothingStore=Class (TStore,IMensClothingStore)
(*No atribs*)
end;
(*City*)
TCity=Class (TAdministrativeArea,ICity)
(*No atribs*)
end;
(*DryCleaningOrLaundry*)
TDryCleaningOrLaundry=Class (TLocalBusiness,IDryCleaningOrLaundry)
(*No atribs*)
end;
TDistance=Class; //forward
(*VisualArtwork*)
TVisualArtwork=Class (TCreativeWork,IVisualArtwork)
private
Fartist:IPerson;
Fwidth:IQuantitativeValue;
Fsurface:String;
Fdepth:IQuantitativeValue;
FartMedium:String;
FartEdition:Integer;
Fartform:String;
Fheight:IDistance;
protected
function Get_artist:IPerson;virtual;
procedure Set_artist(v:IPerson);virtual;
function Get_width:IQuantitativeValue;virtual;
procedure Set_width(v:IQuantitativeValue);virtual;
function Get_surface:String;virtual;
procedure Set_surface(v:String);virtual;
function Get_depth:IQuantitativeValue;virtual;
procedure Set_depth(v:IQuantitativeValue);virtual;
function Get_artMedium:String;virtual;
procedure Set_artMedium(v:String);virtual;
function Get_artEdition:Integer;virtual;
procedure Set_artEdition(v:Integer);virtual;
function Get_artform:String;virtual;
procedure Set_artform(v:String);virtual;
function Get_height:IDistance;virtual;
procedure Set_height(v:IDistance);virtual;
public
property artist:IPerson read Get_artist write Set_artist;
property width:IQuantitativeValue read Get_width write Set_width;
property depth:IQuantitativeValue read Get_depth write Set_depth;
property height:IDistance read Get_height write Set_height;
published
property surface:String read Get_surface write Set_surface;
property artMedium:String read Get_artMedium write Set_artMedium;
property artEdition:Integer read Get_artEdition write Set_artEdition;
property artform:String read Get_artform write Set_artform;
end;
(*Distance*)
TDistance=Class (TQuantity,IDistance)
function TangDistance:TangibleValue;virtual;
end;
(*CoverArt*)
TCoverArt=Class (TVisualArtwork,ICoverArt)
(*No atribs*)
end;
(*ComicCoverArt*)
TComicCoverArt=Class (TCoverArt,IComicCoverArt)
(*No atribs*)
end;
(*SeaBodyOfWater*)
TSeaBodyOfWater=Class (TBodyOfWater,ISeaBodyOfWater)
(*No atribs*)
end;
(*HousePainter*)
THousePainter=Class (THomeAndConstructionBusiness,IHousePainter)
(*No atribs*)
end;
(*DislikeAction*)
TDislikeAction=Class (TReactAction,IDislikeAction)
(*No atribs*)
end;
(*AnimalShelter*)
TAnimalShelter=Class (TLocalBusiness,IAnimalShelter)
(*No atribs*)
end;
(*ShoeStore*)
TShoeStore=Class (TStore,IShoeStore)
(*No atribs*)
end;
(*VisualArtsEvent*)
TVisualArtsEvent=Class (TEvent,IVisualArtsEvent)
(*No atribs*)
end;
(*Resort*)
TResort=Class (TLodgingBusiness,IResort)
(*No atribs*)
end;
(*BikeStore*)
TBikeStore=Class (TStore,IBikeStore)
(*No atribs*)
end;
(*Barcode*)
TBarcode=Class (TImageObject,IBarcode)
(*No atribs*)
end;
(*Attorney*)
TAttorney=Class (TLegalService,IAttorney)
(*No atribs*)
end;
(*SpreadsheetDigitalDocument*)
TSpreadsheetDigitalDocument=Class (TDigitalDocument,ISpreadsheetDigitalDocument)
(*No atribs*)
end;
(*ProfessionalService*)
TProfessionalService=Class (TLocalBusiness,IProfessionalService)
(*No atribs*)
end;
(*BuddhistTemple*)
TBuddhistTemple=Class (TPlaceOfWorship,IBuddhistTemple)
(*No atribs*)
end;
(*PhotographAction*)
TPhotographAction=Class (TCreateAction,IPhotographAction)
(*No atribs*)
end;
(*Bakery*)
TBakery=Class (TFoodEstablishment,IBakery)
(*No atribs*)
end;
(*State*)
TState=Class (TAdministrativeArea,IState)
(*No atribs*)
end;
(*Mountain*)
TMountain=Class (TLandform,IMountain)
(*No atribs*)
end;
(*SocialEvent*)
TSocialEvent=Class (TEvent,ISocialEvent)
(*No atribs*)
end;
(*MusicVenue*)
TMusicVenue=Class (TCivicStructure,IMusicVenue)
(*No atribs*)
end;
(*Park*)
TPark=Class (TCivicStructure,IPark)
(*No atribs*)
end;
(*BankAccount*)
TBankAccount=Class (TFinancialProduct,IBankAccount)
function TangBankAccount:TangibleValue;virtual;
end;
(*DepositAccount*)
TDepositAccount=Class (TBankAccount,IDepositAccount)
function TangDepositAccount:TangibleValue;virtual;
end;
(*ScheduleAction*)
TScheduleAction=Class (TPlanAction,IScheduleAction)
(*No atribs*)
end;
(*NailSalon*)
TNailSalon=Class (THealthAndBeautyBusiness,INailSalon)
(*No atribs*)
end;
(*EatAction*)
TEatAction=Class (TConsumeAction,IEatAction)
(*No atribs*)
end;
(*InternetCafe*)
TInternetCafe=Class (TLocalBusiness,IInternetCafe)
(*No atribs*)
end;
(*Restaurant*)
TRestaurant=Class (TFoodEstablishment,IRestaurant)
(*No atribs*)
end;
(*NightClub*)
TNightClub=Class (TEntertainmentBusiness,INightClub)
(*No atribs*)
end;
(*SubscribeAction*)
TSubscribeAction=Class (TInteractAction,ISubscribeAction)
(*No atribs*)
end;
(*DrawAction*)
TDrawAction=Class (TCreateAction,IDrawAction)
(*No atribs*)
end;
(*BookSeries*)
TBookSeries=Class (TCreativeWorkSeries,IBookSeries)
(*No atribs*)
end;
(*TrainReservation*)
TTrainReservation=Class (TReservation,ITrainReservation)
function TangTrainReservation:TangibleValue;virtual;
end;
(*EducationEvent*)
TEducationEvent=Class (TEvent,IEducationEvent)
(*No atribs*)
end;
(*PaintAction*)
TPaintAction=Class (TCreateAction,IPaintAction)
(*No atribs*)
end;
(*Cemetery*)
TCemetery=Class (TCivicStructure,ICemetery)
(*No atribs*)
end;
(*WholesaleStore*)
TWholesaleStore=Class (TStore,IWholesaleStore)
(*No atribs*)
end;
(*BarOrPub*)
TBarOrPub=Class (TFoodEstablishment,IBarOrPub)
(*No atribs*)
end;
(*Waterfall*)
TWaterfall=Class (TBodyOfWater,IWaterfall)
(*No atribs*)
end;
(*Mosque*)
TMosque=Class (TPlaceOfWorship,IMosque)
(*No atribs*)
end;
(*NGO*)
TNGO=Class (TOrganization,INGO)
(*No atribs*)
end;
(*Pond*)
TPond=Class (TBodyOfWater,IPond)
(*No atribs*)
end;
(*InformAction*)
TInformAction=Class (TCommunicateAction,IInformAction)
(*No atribs*)
end;
(*ConfirmAction*)
TConfirmAction=Class (TInformAction,IConfirmAction)
(*No atribs*)
end;
(*DeleteAction*)
TDeleteAction=Class (TUpdateAction,IDeleteAction)
(*No atribs*)
end;
(*ActivateAction*)
TActivateAction=Class (TControlAction,IActivateAction)
(*No atribs*)
end;
(*Crematorium*)
TCrematorium=Class (TCivicStructure,ICrematorium)
(*No atribs*)
end;
(*UserPageVisits*)
TUserPageVisits=Class (TUserInteraction,IUserPageVisits)
(*No atribs*)
end;
(*GolfCourse*)
TGolfCourse=Class (TSportsActivityLocation,IGolfCourse)
(*No atribs*)
end;
(*MusicVideoObject*)
TMusicVideoObject=Class (TMediaObject,IMusicVideoObject)
(*No atribs*)
end;
(*AutoDealer*)
TAutoDealer=Class (TAutomotiveBusiness,IAutoDealer)
(*No atribs*)
end;
(*UserDownloads*)
TUserDownloads=Class (TUserInteraction,IUserDownloads)
(*No atribs*)
end;
(*LegislativeBuilding*)
TLegislativeBuilding=Class (TGovernmentBuilding,ILegislativeBuilding)
(*No atribs*)
end;
(*ProfilePage*)
TProfilePage=Class (TWebPage,IProfilePage)
(*No atribs*)
end;
(*FMRadioChannel*)
TFMRadioChannel=Class (TRadioChannel,IFMRadioChannel)
function TangFMRadioChannel:TangibleValue;virtual;
end;
(*PerformingArtsTheater*)
TPerformingArtsTheater=Class (TCivicStructure,IPerformingArtsTheater)
(*No atribs*)
end;
(*Bridge*)
TBridge=Class (TCivicStructure,IBridge)
(*No atribs*)
end;
(*HomeGoodsStore*)
THomeGoodsStore=Class (TStore,IHomeGoodsStore)
(*No atribs*)
end;
(*Bone*)
TBone=Class (TAnatomicalStructure,IBone)
(*No atribs*)
end;
(*VeterinaryCare*)
TVeterinaryCare=Class (TMedicalOrganization,IVeterinaryCare)
(*No atribs*)
end;
(*LiteraryEvent*)
TLiteraryEvent=Class (TEvent,ILiteraryEvent)
(*No atribs*)
end;
(*TravelAgency*)
TTravelAgency=Class (TLocalBusiness,ITravelAgency)
(*No atribs*)
end;
(*LikeAction*)
TLikeAction=Class (TReactAction,ILikeAction)
(*No atribs*)
end;
(*OnDemandEvent*)
TOnDemandEvent=Class (TPublicationEvent,IOnDemandEvent)
(*No atribs*)
end;
(*Conversation*)
TConversation=Class (TCreativeWork,IConversation)
(*No atribs*)
end;
(*CheckoutPage*)
TCheckoutPage=Class (TWebPage,ICheckoutPage)
(*No atribs*)
end;
(*Museum*)
TMuseum=Class (TCivicStructure,IMuseum)
(*No atribs*)
end;
(*HVACBusiness*)
THVACBusiness=Class (THomeAndConstructionBusiness,IHVACBusiness)
(*No atribs*)
end;
(*MedicalSymptom*)
TMedicalSymptom=Class (TMedicalSignOrSymptom,IMedicalSymptom)
(*No atribs*)
end;
(*TennisComplex*)
TTennisComplex=Class (TSportsActivityLocation,ITennisComplex)
(*No atribs*)
end;
(*UseAction*)
TUseAction=Class (TConsumeAction,IUseAction)
(*No atribs*)
end;
(*WearAction*)
TWearAction=Class (TUseAction,IWearAction)
(*No atribs*)
end;
(*QuoteAction*)
TQuoteAction=Class (TTradeAction,IQuoteAction)
(*No atribs*)
end;
(*ConvenienceStore*)
TConvenienceStore=Class (TStore,IConvenienceStore)
(*No atribs*)
end;
(*GasStation*)
TGasStation=Class (TAutomotiveBusiness,IGasStation)
(*No atribs*)
end;
(*RejectAction*)
TRejectAction=Class (TAllocateAction,IRejectAction)
(*No atribs*)
end;
(*BefriendAction*)
TBefriendAction=Class (TInteractAction,IBefriendAction)
(*No atribs*)
end;
(*Beach*)
TBeach=Class (TCivicStructure,IBeach)
(*No atribs*)
end;
(*PoliceStation*)
TPoliceStation=Class (TCivicStructure,IPoliceStation)
(*No atribs*)
end;
(*ComedyEvent*)
TComedyEvent=Class (TEvent,IComedyEvent)
(*No atribs*)
end;
(*SkiResort*)
TSkiResort=Class (TSportsActivityLocation,ISkiResort)
(*No atribs*)
end;
(*SiteNavigationElement*)
TSiteNavigationElement=Class (TWebPageElement,ISiteNavigationElement)
(*No atribs*)
end;
(*MedicalBusiness*)
TMedicalBusiness=Class (TLocalBusiness,IMedicalBusiness)
(*No atribs*)
end;
(*Optician*)
TOptician=Class (TMedicalBusiness,IOptician)
(*No atribs*)
end;
(*RadioSeason*)
TRadioSeason=Class (TCreativeWorkSeason,IRadioSeason)
(*No atribs*)
end;
(*FastFoodRestaurant*)
TFastFoodRestaurant=Class (TFoodEstablishment,IFastFoodRestaurant)
(*No atribs*)
end;
(*MedicalGuidelineContraindication*)
TMedicalGuidelineContraindication=Class (TMedicalGuideline,IMedicalGuidelineContraindication)
(*No atribs*)
end;
(*StadiumOrArena*)
TStadiumOrArena=Class (TCivicStructure,IStadiumOrArena)
(*No atribs*)
end;
(*QAPage*)
TQAPage=Class (TWebPage,IQAPage)
(*No atribs*)
end;
(*TelevisionStation*)
TTelevisionStation=Class (TLocalBusiness,ITelevisionStation)
(*No atribs*)
end;
(*Message*)
TMessage=Class (TCreativeWork,IMessage)
private
FdateSent:TDateTime;
FdateRead:TDateTime;
FmessageAttachment:ICreativeWork;
FdateReceived:TDateTime;
protected
function Get_dateSent:TDateTime;virtual;
procedure Set_dateSent(v:TDateTime);virtual;
function Get_dateRead:TDateTime;virtual;
procedure Set_dateRead(v:TDateTime);virtual;
function Get_messageAttachment:ICreativeWork;virtual;
procedure Set_messageAttachment(v:ICreativeWork);virtual;
function Get_dateReceived:TDateTime;virtual;
procedure Set_dateReceived(v:TDateTime);virtual;
public
property messageAttachment:ICreativeWork read Get_messageAttachment write Set_messageAttachment;
published
property dateSent:TDateTime read Get_dateSent write Set_dateSent;
property dateRead:TDateTime read Get_dateRead write Set_dateRead;
property dateReceived:TDateTime read Get_dateReceived write Set_dateReceived;
end;
(*EmailMessage*)
TEmailMessage=Class (TMessage,IEmailMessage)
(*No atribs*)
end;
(*DiscoverAction*)
TDiscoverAction=Class (TFindAction,IDiscoverAction)
(*No atribs*)
end;
(*BlogPosting*)
TBlogPosting=Class (TSocialMediaPosting,IBlogPosting)
(*No atribs*)
end;
(*PhysicalActivityCategory*)
TPhysicalActivityCategory=Class (TEnumeration,IPhysicalActivityCategory)
function TangPhysicalActivityCategory:TangibleValue;virtual;
end;
(*DonateAction*)
TDonateAction=Class (TTradeAction,IDonateAction)
(*No atribs*)
end;
(*ItemListOrderType*)
TItemListOrderType=Class (TEnumeration,IItemListOrderType)
function TangItemListOrderType:TangibleValue;virtual;
end;
TMovie=Class; //forward
(*ScreeningEvent*)
TScreeningEvent=Class (TEvent,IScreeningEvent)
private
FvideoFormat:String;
FworkPresented:IMovie;
protected
function Get_videoFormat:String;virtual;
procedure Set_videoFormat(v:String);virtual;
function Get_workPresented:IMovie;virtual;
procedure Set_workPresented(v:IMovie);virtual;
public
property workPresented:IMovie read Get_workPresented write Set_workPresented;
published
property videoFormat:String read Get_videoFormat write Set_videoFormat;
end;
TMusicGroup=Class; //forward
(*Movie*)
TMovie=Class (TCreativeWork,IMovie)
private
FmusicBy:IMusicGroup;
FsubtitleLanguage:String;
protected
function Get_musicBy:IMusicGroup;virtual;
procedure Set_musicBy(v:IMusicGroup);virtual;
function Get_subtitleLanguage:String;virtual;
procedure Set_subtitleLanguage(v:String);virtual;
public
property musicBy:IMusicGroup read Get_musicBy write Set_musicBy;
published
property subtitleLanguage:String read Get_subtitleLanguage write Set_subtitleLanguage;
end;
TMusicAlbum=Class; //forward
(*MusicGroup*)
TMusicGroup=Class (TPerformingGroup,IMusicGroup)
private
FmusicGroupMember:IPerson;
Falbums:IMusicAlbum;
Fgenre:String;
protected
function Get_musicGroupMember:IPerson;virtual;
procedure Set_musicGroupMember(v:IPerson);virtual;
function Get_albums:IMusicAlbum;virtual;
procedure Set_albums(v:IMusicAlbum);virtual;
function Get_genre:String;virtual;
procedure Set_genre(v:String);virtual;
public
property musicGroupMember:IPerson read Get_musicGroupMember write Set_musicGroupMember;
property albums:IMusicAlbum read Get_albums write Set_albums;
published
property genre:String read Get_genre write Set_genre;
end;
TMusicRecording=Class; //forward
(*MusicPlaylist*)
TMusicPlaylist=Class (TCreativeWork,IMusicPlaylist)
private
Ftracks:IMusicRecording;
FnumTracks:Integer;
protected
function Get_tracks:IMusicRecording;virtual;
procedure Set_tracks(v:IMusicRecording);virtual;
function Get_numTracks:Integer;virtual;
procedure Set_numTracks(v:Integer);virtual;
public
property tracks:IMusicRecording read Get_tracks write Set_tracks;
published
property numTracks:Integer read Get_numTracks write Set_numTracks;
end;
TMusicComposition=Class; //forward
(*MusicRecording*)
TMusicRecording=Class (TCreativeWork,IMusicRecording)
private
FinAlbum:IMusicAlbum;
FinPlaylist:IMusicPlaylist;
FbyArtist:IMusicGroup;
FisrcCode:String;
FrecordingOf:IMusicComposition;
protected
function Get_inAlbum:IMusicAlbum;virtual;
procedure Set_inAlbum(v:IMusicAlbum);virtual;
function Get_inPlaylist:IMusicPlaylist;virtual;
procedure Set_inPlaylist(v:IMusicPlaylist);virtual;
function Get_byArtist:IMusicGroup;virtual;
procedure Set_byArtist(v:IMusicGroup);virtual;
function Get_isrcCode:String;virtual;
procedure Set_isrcCode(v:String);virtual;
function Get_recordingOf:IMusicComposition;virtual;
procedure Set_recordingOf(v:IMusicComposition);virtual;
public
property inAlbum:IMusicAlbum read Get_inAlbum write Set_inAlbum;
property inPlaylist:IMusicPlaylist read Get_inPlaylist write Set_inPlaylist;
property byArtist:IMusicGroup read Get_byArtist write Set_byArtist;
property recordingOf:IMusicComposition read Get_recordingOf write Set_recordingOf;
published
property isrcCode:String read Get_isrcCode write Set_isrcCode;
end;
TMusicAlbumReleaseType=Class; //forward
TMusicAlbumProductionType=Class; //forward
(*MusicAlbum*)
TMusicAlbum=Class (TMusicPlaylist,IMusicAlbum)
private
FalbumReleaseType:IMusicAlbumReleaseType;
FalbumProductionType:IMusicAlbumProductionType;
protected
function Get_albumReleaseType:IMusicAlbumReleaseType;virtual;
procedure Set_albumReleaseType(v:IMusicAlbumReleaseType);virtual;
function Get_albumProductionType:IMusicAlbumProductionType;virtual;
procedure Set_albumProductionType(v:IMusicAlbumProductionType);virtual;
public
property albumReleaseType:IMusicAlbumReleaseType read Get_albumReleaseType write Set_albumReleaseType;
property albumProductionType:IMusicAlbumProductionType read Get_albumProductionType write Set_albumProductionType;
published
end;
(*MusicAlbumReleaseType*)
TMusicAlbumReleaseType=Class (TEnumeration,IMusicAlbumReleaseType)
function TangMusicAlbumReleaseType:TangibleValue;virtual;
end;
(*MusicAlbumProductionType*)
TMusicAlbumProductionType=Class (TEnumeration,IMusicAlbumProductionType)
function TangMusicAlbumProductionType:TangibleValue;virtual;
end;
(*MusicComposition*)
TMusicComposition=Class (TCreativeWork,IMusicComposition)
private
FmusicalKey:String;
FiswcCode:String;
FincludedComposition:IMusicComposition;
FmusicCompositionForm:String;
FmusicArrangement:IMusicComposition;
Flyricist:IPerson;
FfirstPerformance:IEvent;
Flyrics:ICreativeWork;
protected
function Get_musicalKey:String;virtual;
procedure Set_musicalKey(v:String);virtual;
function Get_iswcCode:String;virtual;
procedure Set_iswcCode(v:String);virtual;
function Get_includedComposition:IMusicComposition;virtual;
procedure Set_includedComposition(v:IMusicComposition);virtual;
function Get_musicCompositionForm:String;virtual;
procedure Set_musicCompositionForm(v:String);virtual;
function Get_musicArrangement:IMusicComposition;virtual;
procedure Set_musicArrangement(v:IMusicComposition);virtual;
function Get_lyricist:IPerson;virtual;
procedure Set_lyricist(v:IPerson);virtual;
function Get_firstPerformance:IEvent;virtual;
procedure Set_firstPerformance(v:IEvent);virtual;
function Get_lyrics:ICreativeWork;virtual;
procedure Set_lyrics(v:ICreativeWork);virtual;
public
property includedComposition:IMusicComposition read Get_includedComposition write Set_includedComposition;
property musicArrangement:IMusicComposition read Get_musicArrangement write Set_musicArrangement;
property lyricist:IPerson read Get_lyricist write Set_lyricist;
property firstPerformance:IEvent read Get_firstPerformance write Set_firstPerformance;
property lyrics:ICreativeWork read Get_lyrics write Set_lyrics;
published
property musicalKey:String read Get_musicalKey write Set_musicalKey;
property iswcCode:String read Get_iswcCode write Set_iswcCode;
property musicCompositionForm:String read Get_musicCompositionForm write Set_musicCompositionForm;
end;
(*Hospital*)
THospital=Class (TCivicStructure,IHospital)
(*No atribs*)
end;
TAirport=Class; //forward
TBoardingPolicyType=Class; //forward
(*Flight*)
TFlight=Class (TIntangible,IFlight)
private
Fcarrier:IOrganization;
FmealService:String;
FflightNumber:String;
Faircraft:String;
FdepartureAirport:IAirport;
FdepartureGate:String;
FdepartureTerminal:String;
FflightDistance:IDistance;
FdepartureTime:TDateTime;
FestimatedFlightDuration:IDuration;
FboardingPolicy:IBoardingPolicyType;
FarrivalAirport:IAirport;
FwebCheckinTime:TDateTime;
FarrivalGate:String;
FarrivalTerminal:String;
protected
function Get_carrier:IOrganization;virtual;
procedure Set_carrier(v:IOrganization);virtual;
function Get_mealService:String;virtual;
procedure Set_mealService(v:String);virtual;
function Get_flightNumber:String;virtual;
procedure Set_flightNumber(v:String);virtual;
function Get_aircraft:String;virtual;
procedure Set_aircraft(v:String);virtual;
function Get_departureAirport:IAirport;virtual;
procedure Set_departureAirport(v:IAirport);virtual;
function Get_departureGate:String;virtual;
procedure Set_departureGate(v:String);virtual;
function Get_departureTerminal:String;virtual;
procedure Set_departureTerminal(v:String);virtual;
function Get_flightDistance:IDistance;virtual;
procedure Set_flightDistance(v:IDistance);virtual;
function Get_departureTime:TDateTime;virtual;
procedure Set_departureTime(v:TDateTime);virtual;
function Get_estimatedFlightDuration:IDuration;virtual;
procedure Set_estimatedFlightDuration(v:IDuration);virtual;
function Get_boardingPolicy:IBoardingPolicyType;virtual;
procedure Set_boardingPolicy(v:IBoardingPolicyType);virtual;
function Get_arrivalAirport:IAirport;virtual;
procedure Set_arrivalAirport(v:IAirport);virtual;
function Get_webCheckinTime:TDateTime;virtual;
procedure Set_webCheckinTime(v:TDateTime);virtual;
function Get_arrivalGate:String;virtual;
procedure Set_arrivalGate(v:String);virtual;
function Get_arrivalTerminal:String;virtual;
procedure Set_arrivalTerminal(v:String);virtual;
public
property carrier:IOrganization read Get_carrier write Set_carrier;
property departureAirport:IAirport read Get_departureAirport write Set_departureAirport;
property flightDistance:IDistance read Get_flightDistance write Set_flightDistance;
property estimatedFlightDuration:IDuration read Get_estimatedFlightDuration write Set_estimatedFlightDuration;
property boardingPolicy:IBoardingPolicyType read Get_boardingPolicy write Set_boardingPolicy;
property arrivalAirport:IAirport read Get_arrivalAirport write Set_arrivalAirport;
published
property mealService:String read Get_mealService write Set_mealService;
property flightNumber:String read Get_flightNumber write Set_flightNumber;
property aircraft:String read Get_aircraft write Set_aircraft;
property departureGate:String read Get_departureGate write Set_departureGate;
property departureTerminal:String read Get_departureTerminal write Set_departureTerminal;
property departureTime:TDateTime read Get_departureTime write Set_departureTime;
property webCheckinTime:TDateTime read Get_webCheckinTime write Set_webCheckinTime;
property arrivalGate:String read Get_arrivalGate write Set_arrivalGate;
property arrivalTerminal:String read Get_arrivalTerminal write Set_arrivalTerminal;
end;
(*Airport*)
TAirport=Class (TCivicStructure,IAirport)
private
FicaoCode:String;
protected
function Get_icaoCode:String;virtual;
procedure Set_icaoCode(v:String);virtual;
public
published
property icaoCode:String read Get_icaoCode write Set_icaoCode;
end;
(*BoardingPolicyType*)
TBoardingPolicyType=Class (TEnumeration,IBoardingPolicyType)
function TangBoardingPolicyType:TangibleValue;virtual;
end;
(*MovieSeries*)
TMovieSeries=Class (TCreativeWorkSeries,IMovieSeries)
(*No atribs*)
end;
TUnitPriceSpecification=Class; //forward
(*CompoundPriceSpecification*)
TCompoundPriceSpecification=Class (TPriceSpecification,ICompoundPriceSpecification)
private
FpriceComponent:IUnitPriceSpecification;
protected
function Get_priceComponent:IUnitPriceSpecification;virtual;
procedure Set_priceComponent(v:IUnitPriceSpecification);virtual;
public
property priceComponent:IUnitPriceSpecification read Get_priceComponent write Set_priceComponent;
published
end;
(*UnitPriceSpecification*)
TUnitPriceSpecification=Class (TPriceSpecification,IUnitPriceSpecification)
private
FpriceType:String;
FreferenceQuantity:IQuantitativeValue;
FbillingIncrement:INumber;
protected
function Get_priceType:String;virtual;
procedure Set_priceType(v:String);virtual;
function Get_referenceQuantity:IQuantitativeValue;virtual;
procedure Set_referenceQuantity(v:IQuantitativeValue);virtual;
function Get_billingIncrement:INumber;virtual;
procedure Set_billingIncrement(v:INumber);virtual;
public
property referenceQuantity:IQuantitativeValue read Get_referenceQuantity write Set_referenceQuantity;
property billingIncrement:INumber read Get_billingIncrement write Set_billingIncrement;
published
property priceType:String read Get_priceType write Set_priceType;
end;
(*EmergencyService*)
TEmergencyService=Class (TLocalBusiness,IEmergencyService)
(*No atribs*)
end;
(*IndividualProduct*)
TIndividualProduct=Class (TProduct,IIndividualProduct)
(*No atribs*)
end;
TComputerLanguage=Class; //forward
(*SoftwareSourceCode*)
TSoftwareSourceCode=Class (TCreativeWork,ISoftwareSourceCode)
private
FsampleType:String;
Fruntime:String;
FcodeRepository:String;
FtargetProduct:ISoftwareApplication;
FprogrammingLanguage:IComputerLanguage;
protected
function Get_sampleType:String;virtual;
procedure Set_sampleType(v:String);virtual;
function Get_runtime:String;virtual;
procedure Set_runtime(v:String);virtual;
function Get_codeRepository:String;virtual;
procedure Set_codeRepository(v:String);virtual;
function Get_targetProduct:ISoftwareApplication;virtual;
procedure Set_targetProduct(v:ISoftwareApplication);virtual;
function Get_programmingLanguage:IComputerLanguage;virtual;
procedure Set_programmingLanguage(v:IComputerLanguage);virtual;
public
property targetProduct:ISoftwareApplication read Get_targetProduct write Set_targetProduct;
property programmingLanguage:IComputerLanguage read Get_programmingLanguage write Set_programmingLanguage;
published
property sampleType:String read Get_sampleType write Set_sampleType;
property runtime:String read Get_runtime write Set_runtime;
property codeRepository:String read Get_codeRepository write Set_codeRepository;
end;
(*ComputerLanguage*)
TComputerLanguage=Class (TIntangible,IComputerLanguage)
function TangComputerLanguage:TangibleValue;virtual;
end;
(*FlightReservation*)
TFlightReservation=Class (TReservation,IFlightReservation)
private
FpassengerPriorityStatus:String;
FsecurityScreening:String;
FboardingGroup:String;
FpassengerSequenceNumber:String;
protected
function Get_passengerPriorityStatus:String;virtual;
procedure Set_passengerPriorityStatus(v:String);virtual;
function Get_securityScreening:String;virtual;
procedure Set_securityScreening(v:String);virtual;
function Get_boardingGroup:String;virtual;
procedure Set_boardingGroup(v:String);virtual;
function Get_passengerSequenceNumber:String;virtual;
procedure Set_passengerSequenceNumber(v:String);virtual;
public
published
property passengerPriorityStatus:String read Get_passengerPriorityStatus write Set_passengerPriorityStatus;
property securityScreening:String read Get_securityScreening write Set_securityScreening;
property boardingGroup:String read Get_boardingGroup write Set_boardingGroup;
property passengerSequenceNumber:String read Get_passengerSequenceNumber write Set_passengerSequenceNumber;
end;
(*Suite*)
TSuite=Class (TAccommodation,ISuite)
private
FnumberOfRooms:IQuantitativeValue;
protected
function Get_numberOfRooms:IQuantitativeValue;virtual;
procedure Set_numberOfRooms(v:IQuantitativeValue);virtual;
public
property numberOfRooms:IQuantitativeValue read Get_numberOfRooms write Set_numberOfRooms;
published
end;
(*EnumerationValueSet*)
TEnumerationValueSet=Class (TCreativeWork,IEnumerationValueSet)
private
FhasEnumerationValue:String;
protected
function Get_hasEnumerationValue:String;virtual;
procedure Set_hasEnumerationValue(v:String);virtual;
public
published
property hasEnumerationValue:String read Get_hasEnumerationValue write Set_hasEnumerationValue;
end;
(*ComicStory*)
TComicStory=Class (TCreativeWork,IComicStory)
private
Fcolorist:IPerson;
Fletterer:IPerson;
protected
function Get_colorist:IPerson;virtual;
procedure Set_colorist(v:IPerson);virtual;
function Get_letterer:IPerson;virtual;
procedure Set_letterer(v:IPerson);virtual;
public
property colorist:IPerson read Get_colorist write Set_colorist;
property letterer:IPerson read Get_letterer write Set_letterer;
published
end;
(*JobPosting*)
TJobPosting=Class (TIntangible,IJobPosting)
private
Fskills:String;
FspecialCommitments:String;
Fbenefits:String;
FhiringOrganization:IOrganization;
FdatePosted:TDateTime;
FemploymentType:String;
Ftitle:String;
FeducationRequirements:String;
FoccupationalCategory:String;
FjobLocation:IPlace;
Findustry:String;
Fresponsibilities:String;
FsalaryCurrency:String;
FexperienceRequirements:String;
FworkHours:String;
Fqualifications:String;
Fincentives:String;
protected
function Get_skills:String;virtual;
procedure Set_skills(v:String);virtual;
function Get_specialCommitments:String;virtual;
procedure Set_specialCommitments(v:String);virtual;
function Get_benefits:String;virtual;
procedure Set_benefits(v:String);virtual;
function Get_hiringOrganization:IOrganization;virtual;
procedure Set_hiringOrganization(v:IOrganization);virtual;
function Get_datePosted:TDateTime;virtual;
procedure Set_datePosted(v:TDateTime);virtual;
function Get_employmentType:String;virtual;
procedure Set_employmentType(v:String);virtual;
function Get_title:String;virtual;
procedure Set_title(v:String);virtual;
function Get_educationRequirements:String;virtual;
procedure Set_educationRequirements(v:String);virtual;
function Get_occupationalCategory:String;virtual;
procedure Set_occupationalCategory(v:String);virtual;
function Get_jobLocation:IPlace;virtual;
procedure Set_jobLocation(v:IPlace);virtual;
function Get_industry:String;virtual;
procedure Set_industry(v:String);virtual;
function Get_responsibilities:String;virtual;
procedure Set_responsibilities(v:String);virtual;
function Get_salaryCurrency:String;virtual;
procedure Set_salaryCurrency(v:String);virtual;
function Get_experienceRequirements:String;virtual;
procedure Set_experienceRequirements(v:String);virtual;
function Get_workHours:String;virtual;
procedure Set_workHours(v:String);virtual;
function Get_qualifications:String;virtual;
procedure Set_qualifications(v:String);virtual;
function Get_incentives:String;virtual;
procedure Set_incentives(v:String);virtual;
public
property hiringOrganization:IOrganization read Get_hiringOrganization write Set_hiringOrganization;
property jobLocation:IPlace read Get_jobLocation write Set_jobLocation;
published
property skills:String read Get_skills write Set_skills;
property specialCommitments:String read Get_specialCommitments write Set_specialCommitments;
property benefits:String read Get_benefits write Set_benefits;
property datePosted:TDateTime read Get_datePosted write Set_datePosted;
property employmentType:String read Get_employmentType write Set_employmentType;
property title:String read Get_title write Set_title;
property educationRequirements:String read Get_educationRequirements write Set_educationRequirements;
property occupationalCategory:String read Get_occupationalCategory write Set_occupationalCategory;
property industry:String read Get_industry write Set_industry;
property responsibilities:String read Get_responsibilities write Set_responsibilities;
property salaryCurrency:String read Get_salaryCurrency write Set_salaryCurrency;
property experienceRequirements:String read Get_experienceRequirements write Set_experienceRequirements;
property workHours:String read Get_workHours write Set_workHours;
property qualifications:String read Get_qualifications write Set_qualifications;
property incentives:String read Get_incentives write Set_incentives;
end;
(*PublicationIssue*)
TPublicationIssue=Class (TCreativeWork,IPublicationIssue)
private
Fpagination:String;
FissueNumber:Integer;
FpageStart:String;
protected
function Get_pagination:String;virtual;
procedure Set_pagination(v:String);virtual;
function Get_issueNumber:Integer;virtual;
procedure Set_issueNumber(v:Integer);virtual;
function Get_pageStart:String;virtual;
procedure Set_pageStart(v:String);virtual;
public
published
property pagination:String read Get_pagination write Set_pagination;
property issueNumber:Integer read Get_issueNumber write Set_issueNumber;
property pageStart:String read Get_pageStart write Set_pageStart;
end;
(*TVSeason*)
TTVSeason=Class (TCreativeWork,ITVSeason)
private
FcountryOfOrigin:ICountry;
protected
function Get_countryOfOrigin:ICountry;virtual;
procedure Set_countryOfOrigin(v:ICountry);virtual;
public
property countryOfOrigin:ICountry read Get_countryOfOrigin write Set_countryOfOrigin;
published
end;
(*InvestmentOrDeposit*)
TInvestmentOrDeposit=Class (TFinancialProduct,IInvestmentOrDeposit)
function TangInvestmentOrDeposit:TangibleValue;virtual;
end;
(*Vessel*)
TVessel=Class (TAnatomicalStructure,IVessel)
(*No atribs*)
end;
(*Vein*)
TVein=Class (TVessel,IVein)
private
FregionDrained:IAnatomicalStructure;
Ftributary:IAnatomicalStructure;
FdrainsTo:IVessel;
protected
function Get_regionDrained:IAnatomicalStructure;virtual;
procedure Set_regionDrained(v:IAnatomicalStructure);virtual;
function Get_tributary:IAnatomicalStructure;virtual;
procedure Set_tributary(v:IAnatomicalStructure);virtual;
function Get_drainsTo:IVessel;virtual;
procedure Set_drainsTo(v:IVessel);virtual;
public
property regionDrained:IAnatomicalStructure read Get_regionDrained write Set_regionDrained;
property tributary:IAnatomicalStructure read Get_tributary write Set_tributary;
property drainsTo:IVessel read Get_drainsTo write Set_drainsTo;
published
end;
TLanguage=Class; //forward
(*WriteAction*)
TWriteAction=Class (TCreateAction,IWriteAction)
private
Flanguage:ILanguage;
protected
function Get_language:ILanguage;virtual;
procedure Set_language(v:ILanguage);virtual;
public
property language:ILanguage read Get_language write Set_language;
published
end;
(*Language*)
TLanguage=Class (TIntangible,ILanguage)
function TangLanguage:TangibleValue;virtual;
end;
(*SellAction*)
TSellAction=Class (TTradeAction,ISellAction)
private
Fbuyer:IPerson;
protected
function Get_buyer:IPerson;virtual;
procedure Set_buyer(v:IPerson);virtual;
public
property buyer:IPerson read Get_buyer write Set_buyer;
published
end;
TAnswer=Class; //forward
(*Question*)
TQuestion=Class (TCreativeWork,IQuestion)
private
FanswerCount:Integer;
FacceptedAnswer:IAnswer;
FdownvoteCount:Integer;
protected
function Get_answerCount:Integer;virtual;
procedure Set_answerCount(v:Integer);virtual;
function Get_acceptedAnswer:IAnswer;virtual;
procedure Set_acceptedAnswer(v:IAnswer);virtual;
function Get_downvoteCount:Integer;virtual;
procedure Set_downvoteCount(v:Integer);virtual;
public
property acceptedAnswer:IAnswer read Get_acceptedAnswer write Set_acceptedAnswer;
published
property answerCount:Integer read Get_answerCount write Set_answerCount;
property downvoteCount:Integer read Get_downvoteCount write Set_downvoteCount;
end;
(*Comment*)
TComment=Class (TCreativeWork,IComment)
private
FupvoteCount:Integer;
FparentItem:IQuestion;
protected
function Get_upvoteCount:Integer;virtual;
procedure Set_upvoteCount(v:Integer);virtual;
function Get_parentItem:IQuestion;virtual;
procedure Set_parentItem(v:IQuestion);virtual;
public
property parentItem:IQuestion read Get_parentItem write Set_parentItem;
published
property upvoteCount:Integer read Get_upvoteCount write Set_upvoteCount;
end;
(*Answer*)
TAnswer=Class (TComment,IAnswer)
(*No atribs*)
end;
(*GiveAction*)
TGiveAction=Class (TTransferAction,IGiveAction)
(*No atribs*)
end;
(*URL*)
TURL=Class (TBaseSchema,IURL)
(*No atribs*)
end;
(*House*)
THouse=Class (TAccommodation,IHouse)
(*No atribs*)
end;
(*BedType*)
TBedType=Class (TQualitativeValue,IBedType)
function TangBedType:TangibleValue;virtual;
end;
TTrainStation=Class; //forward
(*TrainTrip*)
TTrainTrip=Class (TIntangible,ITrainTrip)
private
FtrainNumber:String;
FdeparturePlatform:String;
FarrivalStation:ITrainStation;
FarrivalTime:TDateTime;
FarrivalPlatform:String;
FdepartureStation:ITrainStation;
FtrainName:String;
protected
function Get_trainNumber:String;virtual;
procedure Set_trainNumber(v:String);virtual;
function Get_departurePlatform:String;virtual;
procedure Set_departurePlatform(v:String);virtual;
function Get_arrivalStation:ITrainStation;virtual;
procedure Set_arrivalStation(v:ITrainStation);virtual;
function Get_arrivalTime:TDateTime;virtual;
procedure Set_arrivalTime(v:TDateTime);virtual;
function Get_arrivalPlatform:String;virtual;
procedure Set_arrivalPlatform(v:String);virtual;
function Get_departureStation:ITrainStation;virtual;
procedure Set_departureStation(v:ITrainStation);virtual;
function Get_trainName:String;virtual;
procedure Set_trainName(v:String);virtual;
public
property arrivalStation:ITrainStation read Get_arrivalStation write Set_arrivalStation;
property departureStation:ITrainStation read Get_departureStation write Set_departureStation;
published
property trainNumber:String read Get_trainNumber write Set_trainNumber;
property departurePlatform:String read Get_departurePlatform write Set_departurePlatform;
property arrivalTime:TDateTime read Get_arrivalTime write Set_arrivalTime;
property arrivalPlatform:String read Get_arrivalPlatform write Set_arrivalPlatform;
property trainName:String read Get_trainName write Set_trainName;
end;
(*TrainStation*)
TTrainStation=Class (TCivicStructure,ITrainStation)
(*No atribs*)
end;
(*SportsOrganization*)
TSportsOrganization=Class (TOrganization,ISportsOrganization)
private
Fsport:String;
protected
function Get_sport:String;virtual;
procedure Set_sport(v:String);virtual;
public
published
property sport:String read Get_sport write Set_sport;
end;
(*SportsTeam*)
TSportsTeam=Class (TSportsOrganization,ISportsTeam)
private
Fathlete:IPerson;
Fcoach:IPerson;
protected
function Get_athlete:IPerson;virtual;
procedure Set_athlete(v:IPerson);virtual;
function Get_coach:IPerson;virtual;
procedure Set_coach(v:IPerson);virtual;
public
property athlete:IPerson read Get_athlete write Set_athlete;
property coach:IPerson read Get_coach write Set_coach;
published
end;
(*Joint*)
TJoint=Class (TAnatomicalStructure,IJoint)
private
FfunctionalClass:String;
FstructuralClass:String;
FbiomechnicalClass:String;
protected
function Get_functionalClass:String;virtual;
procedure Set_functionalClass(v:String);virtual;
function Get_structuralClass:String;virtual;
procedure Set_structuralClass(v:String);virtual;
function Get_biomechnicalClass:String;virtual;
procedure Set_biomechnicalClass(v:String);virtual;
public
published
property functionalClass:String read Get_functionalClass write Set_functionalClass;
property structuralClass:String read Get_structuralClass write Set_structuralClass;
property biomechnicalClass:String read Get_biomechnicalClass write Set_biomechnicalClass;
end;
(*SingleFamilyResidence*)
TSingleFamilyResidence=Class (THouse,ISingleFamilyResidence)
(*No atribs*)
end;
(*TravelAction*)
TTravelAction=Class (TMoveAction,ITravelAction)
(*No atribs*)
end;
(*ReplyAction*)
TReplyAction=Class (TCommunicateAction,IReplyAction)
(*No atribs*)
end;
(*SomeProducts*)
TSomeProducts=Class (TProduct,ISomeProducts)
(*No atribs*)
end;
(*DiagnosticLab*)
TDiagnosticLab=Class (TMedicalOrganization,IDiagnosticLab)
private
FavailableTest:IMedicalTest;
protected
function Get_availableTest:IMedicalTest;virtual;
procedure Set_availableTest(v:IMedicalTest);virtual;
public
property availableTest:IMedicalTest read Get_availableTest write Set_availableTest;
published
end;
TCourseInstance=Class; //forward
TCourse=Class; //forward
(*Course*)
TCourse=Class (TCreativeWork,ICourse)
private
FhasCourseInstance:ICourseInstance;
FcourseCode:String;
FeducationalCredentialAwarded:String;
FcoursePrerequisites:ICourse;
protected
function Get_hasCourseInstance:ICourseInstance;virtual;
procedure Set_hasCourseInstance(v:ICourseInstance);virtual;
function Get_courseCode:String;virtual;
procedure Set_courseCode(v:String);virtual;
function Get_educationalCredentialAwarded:String;virtual;
procedure Set_educationalCredentialAwarded(v:String);virtual;
function Get_coursePrerequisites:ICourse;virtual;
procedure Set_coursePrerequisites(v:ICourse);virtual;
public
property hasCourseInstance:ICourseInstance read Get_hasCourseInstance write Set_hasCourseInstance;
property coursePrerequisites:ICourse read Get_coursePrerequisites write Set_coursePrerequisites;
published
property courseCode:String read Get_courseCode write Set_courseCode;
property educationalCredentialAwarded:String read Get_educationalCredentialAwarded write Set_educationalCredentialAwarded;
end;
(*CourseInstance*)
TCourseInstance=Class (TEvent,ICourseInstance)
private
Finstructor:IPerson;
FcourseMode:String;
protected
function Get_instructor:IPerson;virtual;
procedure Set_instructor(v:IPerson);virtual;
function Get_courseMode:String;virtual;
procedure Set_courseMode(v:String);virtual;
public
property instructor:IPerson read Get_instructor write Set_instructor;
published
property courseMode:String read Get_courseMode write Set_courseMode;
end;
(*Photograph*)
TPhotograph=Class (TCreativeWork,IPhotograph)
(*No atribs*)
end;
(*ReplaceAction*)
TReplaceAction=Class (TUpdateAction,IReplaceAction)
private
Freplacee:IThing;
Freplacer:IThing;
protected
function Get_replacee:IThing;virtual;
procedure Set_replacee(v:IThing);virtual;
function Get_replacer:IThing;virtual;
procedure Set_replacer(v:IThing);virtual;
public
property replacee:IThing read Get_replacee write Set_replacee;
property replacer:IThing read Get_replacer write Set_replacer;
published
end;
(*PublicationVolume*)
TPublicationVolume=Class (TCreativeWork,IPublicationVolume)
private
FvolumeNumber:String;
protected
function Get_volumeNumber:String;virtual;
procedure Set_volumeNumber(v:String);virtual;
public
published
property volumeNumber:String read Get_volumeNumber write Set_volumeNumber;
end;
(*RestrictedDiet*)
TRestrictedDiet=Class (TEnumeration,IRestrictedDiet)
function TangRestrictedDiet:TangibleValue;virtual;
end;
(*InviteAction*)
TInviteAction=Class (TCommunicateAction,IInviteAction)
(*No atribs*)
end;
(*LoseAction*)
TLoseAction=Class (TAchieveAction,ILoseAction)
private
Fwinner:IPerson;
protected
function Get_winner:IPerson;virtual;
procedure Set_winner(v:IPerson);virtual;
public
property winner:IPerson read Get_winner write Set_winner;
published
end;
(*Physician*)
TPhysician=Class (TMedicalBusiness,IPhysician)
private
FhospitalAffiliation:IHospital;
FavailableService:IMedicalTest;
protected
function Get_hospitalAffiliation:IHospital;virtual;
procedure Set_hospitalAffiliation(v:IHospital);virtual;
function Get_availableService:IMedicalTest;virtual;
procedure Set_availableService(v:IMedicalTest);virtual;
public
property hospitalAffiliation:IHospital read Get_hospitalAffiliation write Set_hospitalAffiliation;
property availableService:IMedicalTest read Get_availableService write Set_availableService;
published
end;
(*ExercisePlan*)
TExercisePlan=Class (TCreativeWork,IExercisePlan)
private
Fworkload:IQualitativeValue;
FactivityDuration:IQualitativeValue;
FrestPeriods:String;
Frepetitions:IQualitativeValue;
Fintensity:String;
FadditionalVariable:String;
FactivityFrequency:IQualitativeValue;
protected
function Get_workload:IQualitativeValue;virtual;
procedure Set_workload(v:IQualitativeValue);virtual;
function Get_activityDuration:IQualitativeValue;virtual;
procedure Set_activityDuration(v:IQualitativeValue);virtual;
function Get_restPeriods:String;virtual;
procedure Set_restPeriods(v:String);virtual;
function Get_repetitions:IQualitativeValue;virtual;
procedure Set_repetitions(v:IQualitativeValue);virtual;
function Get_intensity:String;virtual;
procedure Set_intensity(v:String);virtual;
function Get_additionalVariable:String;virtual;
procedure Set_additionalVariable(v:String);virtual;
function Get_activityFrequency:IQualitativeValue;virtual;
procedure Set_activityFrequency(v:IQualitativeValue);virtual;
public
property workload:IQualitativeValue read Get_workload write Set_workload;
property activityDuration:IQualitativeValue read Get_activityDuration write Set_activityDuration;
property repetitions:IQualitativeValue read Get_repetitions write Set_repetitions;
property activityFrequency:IQualitativeValue read Get_activityFrequency write Set_activityFrequency;
published
property restPeriods:String read Get_restPeriods write Set_restPeriods;
property intensity:String read Get_intensity write Set_intensity;
property additionalVariable:String read Get_additionalVariable write Set_additionalVariable;
end;
(*MusicReleaseFormatType*)
TMusicReleaseFormatType=Class (TEnumeration,IMusicReleaseFormatType)
function TangMusicReleaseFormatType:TangibleValue;virtual;
end;
(*Airline*)
TAirline=Class (TOrganization,IAirline)
private
FiataCode:String;
protected
function Get_iataCode:String;virtual;
procedure Set_iataCode(v:String);virtual;
public
published
property iataCode:String read Get_iataCode write Set_iataCode;
end;
TInvoice=Class; //forward
TOrderStatus=Class; //forward
TOrderItem=Class; //forward
TParcelDelivery=Class; //forward
(*Order*)
TOrder=Class (TIntangible,IOrder)
private
FpartOfInvoice:IInvoice;
Fdiscount:INumber;
FdiscountCurrency:String;
ForderStatus:IOrderStatus;
Fmerchant:IPerson;
FacceptedOffer:IOffer;
FdiscountCode:String;
FpaymentUrl:String;
ForderDate:TDateTime;
FbillingAddress:IPostalAddress;
ForderedItem:IOrderItem;
ForderDelivery:IParcelDelivery;
FconfirmationNumber:String;
FisGift:Boolean;
ForderNumber:String;
protected
function Get_partOfInvoice:IInvoice;virtual;
procedure Set_partOfInvoice(v:IInvoice);virtual;
function Get_discount:INumber;virtual;
procedure Set_discount(v:INumber);virtual;
function Get_discountCurrency:String;virtual;
procedure Set_discountCurrency(v:String);virtual;
function Get_orderStatus:IOrderStatus;virtual;
procedure Set_orderStatus(v:IOrderStatus);virtual;
function Get_merchant:IPerson;virtual;
procedure Set_merchant(v:IPerson);virtual;
function Get_acceptedOffer:IOffer;virtual;
procedure Set_acceptedOffer(v:IOffer);virtual;
function Get_discountCode:String;virtual;
procedure Set_discountCode(v:String);virtual;
function Get_paymentUrl:String;virtual;
procedure Set_paymentUrl(v:String);virtual;
function Get_orderDate:TDateTime;virtual;
procedure Set_orderDate(v:TDateTime);virtual;
function Get_billingAddress:IPostalAddress;virtual;
procedure Set_billingAddress(v:IPostalAddress);virtual;
function Get_orderedItem:IOrderItem;virtual;
procedure Set_orderedItem(v:IOrderItem);virtual;
function Get_orderDelivery:IParcelDelivery;virtual;
procedure Set_orderDelivery(v:IParcelDelivery);virtual;
function Get_confirmationNumber:String;virtual;
procedure Set_confirmationNumber(v:String);virtual;
function Get_isGift:Boolean;virtual;
procedure Set_isGift(v:Boolean);virtual;
function Get_orderNumber:String;virtual;
procedure Set_orderNumber(v:String);virtual;
public
property partOfInvoice:IInvoice read Get_partOfInvoice write Set_partOfInvoice;
property discount:INumber read Get_discount write Set_discount;
property orderStatus:IOrderStatus read Get_orderStatus write Set_orderStatus;
property merchant:IPerson read Get_merchant write Set_merchant;
property acceptedOffer:IOffer read Get_acceptedOffer write Set_acceptedOffer;
property billingAddress:IPostalAddress read Get_billingAddress write Set_billingAddress;
property orderedItem:IOrderItem read Get_orderedItem write Set_orderedItem;
property orderDelivery:IParcelDelivery read Get_orderDelivery write Set_orderDelivery;
published
property discountCurrency:String read Get_discountCurrency write Set_discountCurrency;
property discountCode:String read Get_discountCode write Set_discountCode;
property paymentUrl:String read Get_paymentUrl write Set_paymentUrl;
property orderDate:TDateTime read Get_orderDate write Set_orderDate;
property confirmationNumber:String read Get_confirmationNumber write Set_confirmationNumber;
property isGift:Boolean read Get_isGift write Set_isGift;
property orderNumber:String read Get_orderNumber write Set_orderNumber;
end;
TPaymentStatusType=Class; //forward
TMonetaryAmount=Class; //forward
(*Invoice*)
TInvoice=Class (TIntangible,IInvoice)
private
FpaymentDue:TDateTime;
FpaymentMethod:IPaymentMethod;
FminimumPaymentDue:IPriceSpecification;
FpaymentMethodId:String;
FscheduledPaymentDate:TDateTime;
FaccountId:String;
FreferencesOrder:IOrder;
FpaymentStatus:IPaymentStatusType;
Fcustomer:IOrganization;
FtotalPaymentDue:IMonetaryAmount;
FbillingPeriod:IDuration;
protected
function Get_paymentDue:TDateTime;virtual;
procedure Set_paymentDue(v:TDateTime);virtual;
function Get_paymentMethod:IPaymentMethod;virtual;
procedure Set_paymentMethod(v:IPaymentMethod);virtual;
function Get_minimumPaymentDue:IPriceSpecification;virtual;
procedure Set_minimumPaymentDue(v:IPriceSpecification);virtual;
function Get_paymentMethodId:String;virtual;
procedure Set_paymentMethodId(v:String);virtual;
function Get_scheduledPaymentDate:TDateTime;virtual;
procedure Set_scheduledPaymentDate(v:TDateTime);virtual;
function Get_accountId:String;virtual;
procedure Set_accountId(v:String);virtual;
function Get_referencesOrder:IOrder;virtual;
procedure Set_referencesOrder(v:IOrder);virtual;
function Get_paymentStatus:IPaymentStatusType;virtual;
procedure Set_paymentStatus(v:IPaymentStatusType);virtual;
function Get_customer:IOrganization;virtual;
procedure Set_customer(v:IOrganization);virtual;
function Get_totalPaymentDue:IMonetaryAmount;virtual;
procedure Set_totalPaymentDue(v:IMonetaryAmount);virtual;
function Get_billingPeriod:IDuration;virtual;
procedure Set_billingPeriod(v:IDuration);virtual;
public
property paymentMethod:IPaymentMethod read Get_paymentMethod write Set_paymentMethod;
property minimumPaymentDue:IPriceSpecification read Get_minimumPaymentDue write Set_minimumPaymentDue;
property referencesOrder:IOrder read Get_referencesOrder write Set_referencesOrder;
property paymentStatus:IPaymentStatusType read Get_paymentStatus write Set_paymentStatus;
property customer:IOrganization read Get_customer write Set_customer;
property totalPaymentDue:IMonetaryAmount read Get_totalPaymentDue write Set_totalPaymentDue;
property billingPeriod:IDuration read Get_billingPeriod write Set_billingPeriod;
published
property paymentDue:TDateTime read Get_paymentDue write Set_paymentDue;
property paymentMethodId:String read Get_paymentMethodId write Set_paymentMethodId;
property scheduledPaymentDate:TDateTime read Get_scheduledPaymentDate write Set_scheduledPaymentDate;
property accountId:String read Get_accountId write Set_accountId;
end;
(*PaymentStatusType*)
TPaymentStatusType=Class (TEnumeration,IPaymentStatusType)
function TangPaymentStatusType:TangibleValue;virtual;
end;
(*MonetaryAmount*)
TMonetaryAmount=Class (TStructuredValue,IMonetaryAmount)
private
Fvalue:IStructuredValue;
protected
function Get_value:IStructuredValue;virtual;
procedure Set_value(v:IStructuredValue);virtual;
public
property value:IStructuredValue read Get_value write Set_value;
published
end;
(*OrderStatus*)
TOrderStatus=Class (TEnumeration,IOrderStatus)
function TangOrderStatus:TangibleValue;virtual;
end;
(*OrderItem*)
TOrderItem=Class (TIntangible,IOrderItem)
private
ForderQuantity:INumber;
ForderItemStatus:IOrderStatus;
ForderItemNumber:String;
protected
function Get_orderQuantity:INumber;virtual;
procedure Set_orderQuantity(v:INumber);virtual;
function Get_orderItemStatus:IOrderStatus;virtual;
procedure Set_orderItemStatus(v:IOrderStatus);virtual;
function Get_orderItemNumber:String;virtual;
procedure Set_orderItemNumber(v:String);virtual;
public
property orderQuantity:INumber read Get_orderQuantity write Set_orderQuantity;
property orderItemStatus:IOrderStatus read Get_orderItemStatus write Set_orderItemStatus;
published
property orderItemNumber:String read Get_orderItemNumber write Set_orderItemNumber;
end;
TDeliveryEvent=Class; //forward
(*ParcelDelivery*)
TParcelDelivery=Class (TIntangible,IParcelDelivery)
private
FtrackingNumber:String;
FpartOfOrder:IOrder;
FexpectedArrivalFrom:TDateTime;
FhasDeliveryMethod:IDeliveryMethod;
FitemShipped:IProduct;
FdeliveryAddress:IPostalAddress;
FdeliveryStatus:IDeliveryEvent;
ForiginAddress:IPostalAddress;
FtrackingUrl:String;
FexpectedArrivalUntil:TDateTime;
protected
function Get_trackingNumber:String;virtual;
procedure Set_trackingNumber(v:String);virtual;
function Get_partOfOrder:IOrder;virtual;
procedure Set_partOfOrder(v:IOrder);virtual;
function Get_expectedArrivalFrom:TDateTime;virtual;
procedure Set_expectedArrivalFrom(v:TDateTime);virtual;
function Get_hasDeliveryMethod:IDeliveryMethod;virtual;
procedure Set_hasDeliveryMethod(v:IDeliveryMethod);virtual;
function Get_itemShipped:IProduct;virtual;
procedure Set_itemShipped(v:IProduct);virtual;
function Get_deliveryAddress:IPostalAddress;virtual;
procedure Set_deliveryAddress(v:IPostalAddress);virtual;
function Get_deliveryStatus:IDeliveryEvent;virtual;
procedure Set_deliveryStatus(v:IDeliveryEvent);virtual;
function Get_originAddress:IPostalAddress;virtual;
procedure Set_originAddress(v:IPostalAddress);virtual;
function Get_trackingUrl:String;virtual;
procedure Set_trackingUrl(v:String);virtual;
function Get_expectedArrivalUntil:TDateTime;virtual;
procedure Set_expectedArrivalUntil(v:TDateTime);virtual;
public
property partOfOrder:IOrder read Get_partOfOrder write Set_partOfOrder;
property hasDeliveryMethod:IDeliveryMethod read Get_hasDeliveryMethod write Set_hasDeliveryMethod;
property itemShipped:IProduct read Get_itemShipped write Set_itemShipped;
property deliveryAddress:IPostalAddress read Get_deliveryAddress write Set_deliveryAddress;
property deliveryStatus:IDeliveryEvent read Get_deliveryStatus write Set_deliveryStatus;
property originAddress:IPostalAddress read Get_originAddress write Set_originAddress;
published
property trackingNumber:String read Get_trackingNumber write Set_trackingNumber;
property expectedArrivalFrom:TDateTime read Get_expectedArrivalFrom write Set_expectedArrivalFrom;
property trackingUrl:String read Get_trackingUrl write Set_trackingUrl;
property expectedArrivalUntil:TDateTime read Get_expectedArrivalUntil write Set_expectedArrivalUntil;
end;
(*DeliveryEvent*)
TDeliveryEvent=Class (TEvent,IDeliveryEvent)
private
FaccessCode:String;
FavailableFrom:TDateTime;
FavailableThrough:TDateTime;
protected
function Get_accessCode:String;virtual;
procedure Set_accessCode(v:String);virtual;
function Get_availableFrom:TDateTime;virtual;
procedure Set_availableFrom(v:TDateTime);virtual;
function Get_availableThrough:TDateTime;virtual;
procedure Set_availableThrough(v:TDateTime);virtual;
public
published
property accessCode:String read Get_accessCode write Set_accessCode;
property availableFrom:TDateTime read Get_availableFrom write Set_availableFrom;
property availableThrough:TDateTime read Get_availableThrough write Set_availableThrough;
end;
(*PlayAction*)
TPlayAction=Class (TAction,IPlayAction)
(*No atribs*)
end;
(*EndorseAction*)
TEndorseAction=Class (TReactAction,IEndorseAction)
private
Fendorsee:IOrganization;
protected
function Get_endorsee:IOrganization;virtual;
procedure Set_endorsee(v:IOrganization);virtual;
public
property endorsee:IOrganization read Get_endorsee write Set_endorsee;
published
end;
(*DatedMoneySpecification*)
TDatedMoneySpecification=Class (TStructuredValue,IDatedMoneySpecification)
private
Fcurrency:String;
protected
function Get_currency:String;virtual;
procedure Set_currency(v:String);virtual;
public
published
property currency:String read Get_currency write Set_currency;
end;
(*Quotation*)
TQuotation=Class (TCreativeWork,IQuotation)
private
FspokenByCharacter:IOrganization;
protected
function Get_spokenByCharacter:IOrganization;virtual;
procedure Set_spokenByCharacter(v:IOrganization);virtual;
public
property spokenByCharacter:IOrganization read Get_spokenByCharacter write Set_spokenByCharacter;
published
end;
(*MedicalWebPage*)
TMedicalWebPage=Class (TWebPage,IMedicalWebPage)
private
Faspect:String;
protected
function Get_aspect:String;virtual;
procedure Set_aspect(v:String);virtual;
public
published
property aspect:String read Get_aspect write Set_aspect;
end;
(*OrderAction*)
TOrderAction=Class (TTradeAction,IOrderAction)
(*No atribs*)
end;
(*MedicalTestPanel*)
TMedicalTestPanel=Class (TMedicalTest,IMedicalTestPanel)
private
FsubTest:IMedicalTest;
protected
function Get_subTest:IMedicalTest;virtual;
procedure Set_subTest(v:IMedicalTest);virtual;
public
property subTest:IMedicalTest read Get_subTest write Set_subTest;
published
end;
TNerve=Class; //forward
TMuscle=Class; //forward
(*Muscle*)
TMuscle=Class (TAnatomicalStructure,IMuscle)
private
Fnerve:INerve;
Forigin:IAnatomicalStructure;
Faction:String;
FbloodSupply:IVessel;
Finsertion:IAnatomicalStructure;
Fantagonist:IMuscle;
FmuscleAction:String;
protected
function Get_nerve:INerve;virtual;
procedure Set_nerve(v:INerve);virtual;
function Get_origin:IAnatomicalStructure;virtual;
procedure Set_origin(v:IAnatomicalStructure);virtual;
function Get_action:String;virtual;
procedure Set_action(v:String);virtual;
function Get_bloodSupply:IVessel;virtual;
procedure Set_bloodSupply(v:IVessel);virtual;
function Get_insertion:IAnatomicalStructure;virtual;
procedure Set_insertion(v:IAnatomicalStructure);virtual;
function Get_antagonist:IMuscle;virtual;
procedure Set_antagonist(v:IMuscle);virtual;
function Get_muscleAction:String;virtual;
procedure Set_muscleAction(v:String);virtual;
public
property nerve:INerve read Get_nerve write Set_nerve;
property origin:IAnatomicalStructure read Get_origin write Set_origin;
property bloodSupply:IVessel read Get_bloodSupply write Set_bloodSupply;
property insertion:IAnatomicalStructure read Get_insertion write Set_insertion;
property antagonist:IMuscle read Get_antagonist write Set_antagonist;
published
property action:String read Get_action write Set_action;
property muscleAction:String read Get_muscleAction write Set_muscleAction;
end;
TBrainStructure=Class; //forward
(*Nerve*)
TNerve=Class (TAnatomicalStructure,INerve)
private
FsourcedFrom:IBrainStructure;
Fbranch:IAnatomicalStructure;
FnerveMotor:IMuscle;
FsensoryUnit:IAnatomicalStructure;
protected
function Get_sourcedFrom:IBrainStructure;virtual;
procedure Set_sourcedFrom(v:IBrainStructure);virtual;
function Get_branch:IAnatomicalStructure;virtual;
procedure Set_branch(v:IAnatomicalStructure);virtual;
function Get_nerveMotor:IMuscle;virtual;
procedure Set_nerveMotor(v:IMuscle);virtual;
function Get_sensoryUnit:IAnatomicalStructure;virtual;
procedure Set_sensoryUnit(v:IAnatomicalStructure);virtual;
public
property sourcedFrom:IBrainStructure read Get_sourcedFrom write Set_sourcedFrom;
property branch:IAnatomicalStructure read Get_branch write Set_branch;
property nerveMotor:IMuscle read Get_nerveMotor write Set_nerveMotor;
property sensoryUnit:IAnatomicalStructure read Get_sensoryUnit write Set_sensoryUnit;
published
end;
(*BrainStructure*)
TBrainStructure=Class (TAnatomicalStructure,IBrainStructure)
(*No atribs*)
end;
(*SendAction*)
TSendAction=Class (TTransferAction,ISendAction)
private
FdeliveryMethod:IDeliveryMethod;
protected
function Get_deliveryMethod:IDeliveryMethod;virtual;
procedure Set_deliveryMethod(v:IDeliveryMethod);virtual;
public
property deliveryMethod:IDeliveryMethod read Get_deliveryMethod write Set_deliveryMethod;
published
end;
(*PaymentChargeSpecification*)
TPaymentChargeSpecification=Class (TPriceSpecification,IPaymentChargeSpecification)
private
FappliesToDeliveryMethod:IDeliveryMethod;
FappliesToPaymentMethod:IPaymentMethod;
protected
function Get_appliesToDeliveryMethod:IDeliveryMethod;virtual;
procedure Set_appliesToDeliveryMethod(v:IDeliveryMethod);virtual;
function Get_appliesToPaymentMethod:IPaymentMethod;virtual;
procedure Set_appliesToPaymentMethod(v:IPaymentMethod);virtual;
public
property appliesToDeliveryMethod:IDeliveryMethod read Get_appliesToDeliveryMethod write Set_appliesToDeliveryMethod;
property appliesToPaymentMethod:IPaymentMethod read Get_appliesToPaymentMethod write Set_appliesToPaymentMethod;
published
end;
(*InfectiousAgentClass*)
TInfectiousAgentClass=Class (TMedicalEnumeration,IInfectiousAgentClass)
function TangInfectiousAgentClass:TangibleValue;virtual;
end;
(*Artery*)
TArtery=Class (TVessel,IArtery)
private
FsupplyTo:IAnatomicalStructure;
Fsource:IAnatomicalStructure;
protected
function Get_supplyTo:IAnatomicalStructure;virtual;
procedure Set_supplyTo(v:IAnatomicalStructure);virtual;
function Get_source:IAnatomicalStructure;virtual;
procedure Set_source(v:IAnatomicalStructure);virtual;
public
property supplyTo:IAnatomicalStructure read Get_supplyTo write Set_supplyTo;
property source:IAnatomicalStructure read Get_source write Set_source;
published
end;
(*LiveBlogPosting*)
TLiveBlogPosting=Class (TBlogPosting,ILiveBlogPosting)
private
FcoverageEndTime:TDateTime;
FliveBlogUpdate:IBlogPosting;
FcoverageStartTime:TDateTime;
protected
function Get_coverageEndTime:TDateTime;virtual;
procedure Set_coverageEndTime(v:TDateTime);virtual;
function Get_liveBlogUpdate:IBlogPosting;virtual;
procedure Set_liveBlogUpdate(v:IBlogPosting);virtual;
function Get_coverageStartTime:TDateTime;virtual;
procedure Set_coverageStartTime(v:TDateTime);virtual;
public
property liveBlogUpdate:IBlogPosting read Get_liveBlogUpdate write Set_liveBlogUpdate;
published
property coverageEndTime:TDateTime read Get_coverageEndTime write Set_coverageEndTime;
property coverageStartTime:TDateTime read Get_coverageStartTime write Set_coverageStartTime;
end;
TMedicalObservationalStudyDesign=Class; //forward
(*MedicalObservationalStudy*)
TMedicalObservationalStudy=Class (TMedicalStudy,IMedicalObservationalStudy)
private
FstudyDesign:IMedicalObservationalStudyDesign;
protected
function Get_studyDesign:IMedicalObservationalStudyDesign;virtual;
procedure Set_studyDesign(v:IMedicalObservationalStudyDesign);virtual;
public
property studyDesign:IMedicalObservationalStudyDesign read Get_studyDesign write Set_studyDesign;
published
end;
(*MedicalObservationalStudyDesign*)
TMedicalObservationalStudyDesign=Class (TMedicalEnumeration,IMedicalObservationalStudyDesign)
function TangMedicalObservationalStudyDesign:TangibleValue;virtual;
end;
(*Boolean*)
TBoolean=Class (TBaseSchema,IBoolean)
(*No atribs*)
end;
(*SearchAction*)
TSearchAction=Class (TAction,ISearchAction)
private
Fquery:String;
protected
function Get_query:String;virtual;
procedure Set_query(v:String);virtual;
public
published
property query:String read Get_query write Set_query;
end;
(*Role*)
TRole=Class (TIntangible,IRole)
private
FnamedPosition:String;
FendDate:TDateTime;
protected
function Get_namedPosition:String;virtual;
procedure Set_namedPosition(v:String);virtual;
function Get_endDate:TDateTime;virtual;
procedure Set_endDate(v:TDateTime);virtual;
public
published
property namedPosition:String read Get_namedPosition write Set_namedPosition;
property endDate:TDateTime read Get_endDate write Set_endDate;
end;
(*OrganizationRole*)
TOrganizationRole=Class (TRole,IOrganizationRole)
private
FnumberedPosition:INumber;
protected
function Get_numberedPosition:INumber;virtual;
procedure Set_numberedPosition(v:INumber);virtual;
public
property numberedPosition:INumber read Get_numberedPosition write Set_numberedPosition;
published
end;
(*EmployeeRole*)
TEmployeeRole=Class (TOrganizationRole,IEmployeeRole)
private
FbaseSalary:INumber;
protected
function Get_baseSalary:INumber;virtual;
procedure Set_baseSalary(v:INumber);virtual;
public
property baseSalary:INumber read Get_baseSalary write Set_baseSalary;
published
end;
(*LifestyleModification*)
TLifestyleModification=Class (TMedicalEntity,ILifestyleModification)
(*No atribs*)
end;
TMapCategoryType=Class; //forward
(*Map*)
TMap=Class (TCreativeWork,IMap)
private
FmapType:IMapCategoryType;
protected
function Get_mapType:IMapCategoryType;virtual;
procedure Set_mapType(v:IMapCategoryType);virtual;
public
property mapType:IMapCategoryType read Get_mapType write Set_mapType;
published
end;
(*MapCategoryType*)
TMapCategoryType=Class (TEnumeration,IMapCategoryType)
function TangMapCategoryType:TangibleValue;virtual;
end;
TRsvpResponseType=Class; //forward
(*RsvpAction*)
TRsvpAction=Class (TInformAction,IRsvpAction)
private
FrsvpResponse:IRsvpResponseType;
Fcomment:IComment;
FadditionalNumberOfGuests:INumber;
protected
function Get_rsvpResponse:IRsvpResponseType;virtual;
procedure Set_rsvpResponse(v:IRsvpResponseType);virtual;
function Get_comment:IComment;virtual;
procedure Set_comment(v:IComment);virtual;
function Get_additionalNumberOfGuests:INumber;virtual;
procedure Set_additionalNumberOfGuests(v:INumber);virtual;
public
property rsvpResponse:IRsvpResponseType read Get_rsvpResponse write Set_rsvpResponse;
property comment:IComment read Get_comment write Set_comment;
property additionalNumberOfGuests:INumber read Get_additionalNumberOfGuests write Set_additionalNumberOfGuests;
published
end;
(*RsvpResponseType*)
TRsvpResponseType=Class (TEnumeration,IRsvpResponseType)
function TangRsvpResponseType:TangibleValue;virtual;
end;
(*Energy*)
TEnergy=Class (TQuantity,IEnergy)
function TangEnergy:TangibleValue;virtual;
end;
(*WarrantyScope*)
TWarrantyScope=Class (TEnumeration,IWarrantyScope)
function TangWarrantyScope:TangibleValue;virtual;
end;
(*FoodEvent*)
TFoodEvent=Class (TEvent,IFoodEvent)
(*No atribs*)
end;
(*LendAction*)
TLendAction=Class (TTransferAction,ILendAction)
private
Fborrower:IPerson;
protected
function Get_borrower:IPerson;virtual;
procedure Set_borrower(v:IPerson);virtual;
public
property borrower:IPerson read Get_borrower write Set_borrower;
published
end;
(*Game*)
TGame=Class (TCreativeWork,IGame)
private
FcharacterAttribute:IThing;
protected
function Get_characterAttribute:IThing;virtual;
procedure Set_characterAttribute(v:IThing);virtual;
public
property characterAttribute:IThing read Get_characterAttribute write Set_characterAttribute;
published
end;
(*Corporation*)
TCorporation=Class (TOrganization,ICorporation)
private
FtickerSymbol:String;
protected
function Get_tickerSymbol:String;virtual;
procedure Set_tickerSymbol(v:String);virtual;
public
published
property tickerSymbol:String read Get_tickerSymbol write Set_tickerSymbol;
end;
TProperty=Class; //forward
TClass=Class; //forward
(*Property*)
TProperty=Class (TIntangible,IProperty)
private
FsupersededBy:IEnumeration;
FinverseOf:IProperty;
FdomainIncludes:IClass;
FrangeIncludes:IClass;
protected
function Get_supersededBy:IEnumeration;virtual;
procedure Set_supersededBy(v:IEnumeration);virtual;
function Get_inverseOf:IProperty;virtual;
procedure Set_inverseOf(v:IProperty);virtual;
function Get_domainIncludes:IClass;virtual;
procedure Set_domainIncludes(v:IClass);virtual;
function Get_rangeIncludes:IClass;virtual;
procedure Set_rangeIncludes(v:IClass);virtual;
public
property supersededBy:IEnumeration read Get_supersededBy write Set_supersededBy;
property inverseOf:IProperty read Get_inverseOf write Set_inverseOf;
property domainIncludes:IClass read Get_domainIncludes write Set_domainIncludes;
property rangeIncludes:IClass read Get_rangeIncludes write Set_rangeIncludes;
published
end;
(*Class*)
TClass=Class (TIntangible,IClass)
function TangClass:TangibleValue;virtual;
end;
TSportsEvent=Class; //forward
TDiet=Class; //forward
(*ExerciseAction*)
TExerciseAction=Class (TPlayAction,IExerciseAction)
private
FfromLocation:IPlace;
Fcourse:IPlace;
FsportsTeam:ISportsTeam;
Fdistance:IDistance;
FsportsActivityLocation:ISportsActivityLocation;
Fopponent:IPerson;
FsportsEvent:ISportsEvent;
FexercisePlan:IExercisePlan;
Fdiet:IDiet;
FexerciseRelatedDiet:IDiet;
FexerciseType:String;
protected
function Get_fromLocation:IPlace;virtual;
procedure Set_fromLocation(v:IPlace);virtual;
function Get_course:IPlace;virtual;
procedure Set_course(v:IPlace);virtual;
function Get_sportsTeam:ISportsTeam;virtual;
procedure Set_sportsTeam(v:ISportsTeam);virtual;
function Get_distance:IDistance;virtual;
procedure Set_distance(v:IDistance);virtual;
function Get_sportsActivityLocation:ISportsActivityLocation;virtual;
procedure Set_sportsActivityLocation(v:ISportsActivityLocation);virtual;
function Get_opponent:IPerson;virtual;
procedure Set_opponent(v:IPerson);virtual;
function Get_sportsEvent:ISportsEvent;virtual;
procedure Set_sportsEvent(v:ISportsEvent);virtual;
function Get_exercisePlan:IExercisePlan;virtual;
procedure Set_exercisePlan(v:IExercisePlan);virtual;
function Get_diet:IDiet;virtual;
procedure Set_diet(v:IDiet);virtual;
function Get_exerciseRelatedDiet:IDiet;virtual;
procedure Set_exerciseRelatedDiet(v:IDiet);virtual;
function Get_exerciseType:String;virtual;
procedure Set_exerciseType(v:String);virtual;
public
property fromLocation:IPlace read Get_fromLocation write Set_fromLocation;
property course:IPlace read Get_course write Set_course;
property sportsTeam:ISportsTeam read Get_sportsTeam write Set_sportsTeam;
property distance:IDistance read Get_distance write Set_distance;
property sportsActivityLocation:ISportsActivityLocation read Get_sportsActivityLocation write Set_sportsActivityLocation;
property opponent:IPerson read Get_opponent write Set_opponent;
property sportsEvent:ISportsEvent read Get_sportsEvent write Set_sportsEvent;
property exercisePlan:IExercisePlan read Get_exercisePlan write Set_exercisePlan;
property diet:IDiet read Get_diet write Set_diet;
property exerciseRelatedDiet:IDiet read Get_exerciseRelatedDiet write Set_exerciseRelatedDiet;
published
property exerciseType:String read Get_exerciseType write Set_exerciseType;
end;
(*SportsEvent*)
TSportsEvent=Class (TEvent,ISportsEvent)
private
FhomeTeam:ISportsTeam;
FawayTeam:IPerson;
protected
function Get_homeTeam:ISportsTeam;virtual;
procedure Set_homeTeam(v:ISportsTeam);virtual;
function Get_awayTeam:IPerson;virtual;
procedure Set_awayTeam(v:IPerson);virtual;
public
property homeTeam:ISportsTeam read Get_homeTeam write Set_homeTeam;
property awayTeam:IPerson read Get_awayTeam write Set_awayTeam;
published
end;
(*Diet*)
TDiet=Class (TCreativeWork,IDiet)
private
FdietFeatures:String;
FexpertConsiderations:String;
Foverview:String;
Fendorsers:IOrganization;
Frisks:String;
FphysiologicalBenefits:String;
protected
function Get_dietFeatures:String;virtual;
procedure Set_dietFeatures(v:String);virtual;
function Get_expertConsiderations:String;virtual;
procedure Set_expertConsiderations(v:String);virtual;
function Get_overview:String;virtual;
procedure Set_overview(v:String);virtual;
function Get_endorsers:IOrganization;virtual;
procedure Set_endorsers(v:IOrganization);virtual;
function Get_risks:String;virtual;
procedure Set_risks(v:String);virtual;
function Get_physiologicalBenefits:String;virtual;
procedure Set_physiologicalBenefits(v:String);virtual;
public
property endorsers:IOrganization read Get_endorsers write Set_endorsers;
published
property dietFeatures:String read Get_dietFeatures write Set_dietFeatures;
property expertConsiderations:String read Get_expertConsiderations write Set_expertConsiderations;
property overview:String read Get_overview write Set_overview;
property risks:String read Get_risks write Set_risks;
property physiologicalBenefits:String read Get_physiologicalBenefits write Set_physiologicalBenefits;
end;
(*Audiobook*)
TAudiobook=Class (TAudioObject,IAudiobook)
private
FreadBy:IPerson;
protected
function Get_readBy:IPerson;virtual;
procedure Set_readBy(v:IPerson);virtual;
public
property readBy:IPerson read Get_readBy write Set_readBy;
published
end;
TBookFormatType=Class; //forward
(*Book*)
TBook=Class (TCreativeWork,IBook)
private
Fabridged:Boolean;
Fisbn:String;
FbookFormat:IBookFormatType;
FbookEdition:String;
FnumberOfPages:Integer;
Fillustrator:IPerson;
protected
function Get_abridged:Boolean;virtual;
procedure Set_abridged(v:Boolean);virtual;
function Get_isbn:String;virtual;
procedure Set_isbn(v:String);virtual;
function Get_bookFormat:IBookFormatType;virtual;
procedure Set_bookFormat(v:IBookFormatType);virtual;
function Get_bookEdition:String;virtual;
procedure Set_bookEdition(v:String);virtual;
function Get_numberOfPages:Integer;virtual;
procedure Set_numberOfPages(v:Integer);virtual;
function Get_illustrator:IPerson;virtual;
procedure Set_illustrator(v:IPerson);virtual;
public
property bookFormat:IBookFormatType read Get_bookFormat write Set_bookFormat;
property illustrator:IPerson read Get_illustrator write Set_illustrator;
published
property abridged:Boolean read Get_abridged write Set_abridged;
property isbn:String read Get_isbn write Set_isbn;
property bookEdition:String read Get_bookEdition write Set_bookEdition;
property numberOfPages:Integer read Get_numberOfPages write Set_numberOfPages;
end;
(*BookFormatType*)
TBookFormatType=Class (TEnumeration,IBookFormatType)
function TangBookFormatType:TangibleValue;virtual;
end;
(*BroadcastEvent*)
TBroadcastEvent=Class (TPublicationEvent,IBroadcastEvent)
private
FbroadcastOfEvent:IEvent;
FisLiveBroadcast:Boolean;
protected
function Get_broadcastOfEvent:IEvent;virtual;
procedure Set_broadcastOfEvent(v:IEvent);virtual;
function Get_isLiveBroadcast:Boolean;virtual;
procedure Set_isLiveBroadcast(v:Boolean);virtual;
public
property broadcastOfEvent:IEvent read Get_broadcastOfEvent write Set_broadcastOfEvent;
published
property isLiveBroadcast:Boolean read Get_isLiveBroadcast write Set_isLiveBroadcast;
end;
(*WarrantyPromise*)
TWarrantyPromise=Class (TStructuredValue,IWarrantyPromise)
private
FwarrantyScope:IWarrantyScope;
FdurationOfWarranty:IQuantitativeValue;
protected
function Get_warrantyScope:IWarrantyScope;virtual;
procedure Set_warrantyScope(v:IWarrantyScope);virtual;
function Get_durationOfWarranty:IQuantitativeValue;virtual;
procedure Set_durationOfWarranty(v:IQuantitativeValue);virtual;
public
property warrantyScope:IWarrantyScope read Get_warrantyScope write Set_warrantyScope;
property durationOfWarranty:IQuantitativeValue read Get_durationOfWarranty write Set_durationOfWarranty;
published
end;
(*DataFeedItem*)
TDataFeedItem=Class (TIntangible,IDataFeedItem)
private
FdateDeleted:TDateTime;
FdateCreated:TDateTime;
FdateModified:TDateTime;
protected
function Get_dateDeleted:TDateTime;virtual;
procedure Set_dateDeleted(v:TDateTime);virtual;
function Get_dateCreated:TDateTime;virtual;
procedure Set_dateCreated(v:TDateTime);virtual;
function Get_dateModified:TDateTime;virtual;
procedure Set_dateModified(v:TDateTime);virtual;
public
published
property dateDeleted:TDateTime read Get_dateDeleted write Set_dateDeleted;
property dateCreated:TDateTime read Get_dateCreated write Set_dateCreated;
property dateModified:TDateTime read Get_dateModified write Set_dateModified;
end;
(*Chapter*)
TChapter=Class (TCreativeWork,IChapter)
(*No atribs*)
end;
TGameServerStatus=Class; //forward
(*GameServer*)
TGameServer=Class (TIntangible,IGameServer)
private
FplayersOnline:Integer;
FserverStatus:IGameServerStatus;
protected
function Get_playersOnline:Integer;virtual;
procedure Set_playersOnline(v:Integer);virtual;
function Get_serverStatus:IGameServerStatus;virtual;
procedure Set_serverStatus(v:IGameServerStatus);virtual;
public
property serverStatus:IGameServerStatus read Get_serverStatus write Set_serverStatus;
published
property playersOnline:Integer read Get_playersOnline write Set_playersOnline;
end;
(*GameServerStatus*)
TGameServerStatus=Class (TEnumeration,IGameServerStatus)
function TangGameServerStatus:TangibleValue;virtual;
end;
(*OwnershipInfo*)
TOwnershipInfo=Class (TStructuredValue,IOwnershipInfo)
private
FownedThrough:TDateTime;
FownedFrom:TDateTime;
FacquiredFrom:IPerson;
protected
function Get_ownedThrough:TDateTime;virtual;
procedure Set_ownedThrough(v:TDateTime);virtual;
function Get_ownedFrom:TDateTime;virtual;
procedure Set_ownedFrom(v:TDateTime);virtual;
function Get_acquiredFrom:IPerson;virtual;
procedure Set_acquiredFrom(v:IPerson);virtual;
public
property acquiredFrom:IPerson read Get_acquiredFrom write Set_acquiredFrom;
published
property ownedThrough:TDateTime read Get_ownedThrough write Set_ownedThrough;
property ownedFrom:TDateTime read Get_ownedFrom write Set_ownedFrom;
end;
(*TrackAction*)
TTrackAction=Class (TFindAction,ITrackAction)
(*No atribs*)
end;
(*TaxiReservation*)
TTaxiReservation=Class (TReservation,ITaxiReservation)
private
FpartySize:Integer;
FpickupLocation:IPlace;
FpickupTime:TDateTime;
protected
function Get_partySize:Integer;virtual;
procedure Set_partySize(v:Integer);virtual;
function Get_pickupLocation:IPlace;virtual;
procedure Set_pickupLocation(v:IPlace);virtual;
function Get_pickupTime:TDateTime;virtual;
procedure Set_pickupTime(v:TDateTime);virtual;
public
property pickupLocation:IPlace read Get_pickupLocation write Set_pickupLocation;
published
property partySize:Integer read Get_partySize write Set_partySize;
property pickupTime:TDateTime read Get_pickupTime write Set_pickupTime;
end;
(*JoinAction*)
TJoinAction=Class (TInteractAction,IJoinAction)
(*No atribs*)
end;
(*HealthPlanCostSharingSpecification*)
THealthPlanCostSharingSpecification=Class (TIntangible,IHealthPlanCostSharingSpecification)
private
FhealthPlanCopay:IPriceSpecification;
FhealthPlanPharmacyCategory:String;
FhealthPlanCoinsuranceOption:String;
FhealthPlanCoinsuranceRate:INumber;
FhealthPlanCopayOption:String;
protected
function Get_healthPlanCopay:IPriceSpecification;virtual;
procedure Set_healthPlanCopay(v:IPriceSpecification);virtual;
function Get_healthPlanPharmacyCategory:String;virtual;
procedure Set_healthPlanPharmacyCategory(v:String);virtual;
function Get_healthPlanCoinsuranceOption:String;virtual;
procedure Set_healthPlanCoinsuranceOption(v:String);virtual;
function Get_healthPlanCoinsuranceRate:INumber;virtual;
procedure Set_healthPlanCoinsuranceRate(v:INumber);virtual;
function Get_healthPlanCopayOption:String;virtual;
procedure Set_healthPlanCopayOption(v:String);virtual;
public
property healthPlanCopay:IPriceSpecification read Get_healthPlanCopay write Set_healthPlanCopay;
property healthPlanCoinsuranceRate:INumber read Get_healthPlanCoinsuranceRate write Set_healthPlanCoinsuranceRate;
published
property healthPlanPharmacyCategory:String read Get_healthPlanPharmacyCategory write Set_healthPlanPharmacyCategory;
property healthPlanCoinsuranceOption:String read Get_healthPlanCoinsuranceOption write Set_healthPlanCoinsuranceOption;
property healthPlanCopayOption:String read Get_healthPlanCopayOption write Set_healthPlanCopayOption;
end;
(*PerformAction*)
TPerformAction=Class (TPlayAction,IPerformAction)
private
FentertainmentBusiness:IEntertainmentBusiness;
protected
function Get_entertainmentBusiness:IEntertainmentBusiness;virtual;
procedure Set_entertainmentBusiness(v:IEntertainmentBusiness);virtual;
public
property entertainmentBusiness:IEntertainmentBusiness read Get_entertainmentBusiness write Set_entertainmentBusiness;
published
end;
(*ClaimReview*)
TClaimReview=Class (TReview,IClaimReview)
private
FclaimReviewed:String;
protected
function Get_claimReviewed:String;virtual;
procedure Set_claimReviewed(v:String);virtual;
public
published
property claimReviewed:String read Get_claimReviewed write Set_claimReviewed;
end;
(*CarUsageType*)
TCarUsageType=Class (TQualitativeValue,ICarUsageType)
function TangCarUsageType:TangibleValue;virtual;
end;
TTVSeries=Class; //forward
(*TVEpisode*)
TTVEpisode=Class (TEpisode,ITVEpisode)
private
FpartOfTVSeries:ITVSeries;
protected
function Get_partOfTVSeries:ITVSeries;virtual;
procedure Set_partOfTVSeries(v:ITVSeries);virtual;
public
property partOfTVSeries:ITVSeries read Get_partOfTVSeries write Set_partOfTVSeries;
published
end;
(*TVSeries*)
TTVSeries=Class (TCreativeWorkSeries,ITVSeries)
private
Fseasons:ICreativeWorkSeason;
Ftrailer:IVideoObject;
FproductionCompany:IOrganization;
FcontainsSeason:ICreativeWorkSeason;
protected
function Get_seasons:ICreativeWorkSeason;virtual;
procedure Set_seasons(v:ICreativeWorkSeason);virtual;
function Get_trailer:IVideoObject;virtual;
procedure Set_trailer(v:IVideoObject);virtual;
function Get_productionCompany:IOrganization;virtual;
procedure Set_productionCompany(v:IOrganization);virtual;
function Get_containsSeason:ICreativeWorkSeason;virtual;
procedure Set_containsSeason(v:ICreativeWorkSeason);virtual;
public
property seasons:ICreativeWorkSeason read Get_seasons write Set_seasons;
property trailer:IVideoObject read Get_trailer write Set_trailer;
property productionCompany:IOrganization read Get_productionCompany write Set_productionCompany;
property containsSeason:ICreativeWorkSeason read Get_containsSeason write Set_containsSeason;
published
end;
(*Thesis*)
TThesis=Class (TCreativeWork,IThesis)
private
FinSupportOf:String;
protected
function Get_inSupportOf:String;virtual;
procedure Set_inSupportOf(v:String);virtual;
public
published
property inSupportOf:String read Get_inSupportOf write Set_inSupportOf;
end;
(*GovernmentService*)
TGovernmentService=Class (TService,IGovernmentService)
private
FserviceOperator:IOrganization;
protected
function Get_serviceOperator:IOrganization;virtual;
procedure Set_serviceOperator(v:IOrganization);virtual;
public
property serviceOperator:IOrganization read Get_serviceOperator write Set_serviceOperator;
published
end;
(*BedDetails*)
TBedDetails=Class (TIntangible,IBedDetails)
private
FtypeOfBed:String;
FnumberOfBeds:INumber;
protected
function Get_typeOfBed:String;virtual;
procedure Set_typeOfBed(v:String);virtual;
function Get_numberOfBeds:INumber;virtual;
procedure Set_numberOfBeds(v:INumber);virtual;
public
property numberOfBeds:INumber read Get_numberOfBeds write Set_numberOfBeds;
published
property typeOfBed:String read Get_typeOfBed write Set_typeOfBed;
end;
(*DeliveryChargeSpecification*)
TDeliveryChargeSpecification=Class (TPriceSpecification,IDeliveryChargeSpecification)
private
FeligibleRegion:IGeoShape;
protected
function Get_eligibleRegion:IGeoShape;virtual;
procedure Set_eligibleRegion(v:IGeoShape);virtual;
public
property eligibleRegion:IGeoShape read Get_eligibleRegion write Set_eligibleRegion;
published
end;
(*MedicalAudience*)
TMedicalAudience=Class (TAudience,IMedicalAudience)
function TangMedicalAudience:TangibleValue;virtual;
end;
(*MedicalRiskScore*)
TMedicalRiskScore=Class (TMedicalRiskEstimator,IMedicalRiskScore)
private
Falgorithm:String;
protected
function Get_algorithm:String;virtual;
procedure Set_algorithm(v:String);virtual;
public
published
property algorithm:String read Get_algorithm write Set_algorithm;
end;
(*PeopleAudience*)
TPeopleAudience=Class (TAudience,IPeopleAudience)
private
FrequiredMinAge:Integer;
FrequiredMaxAge:Integer;
FrequiredGender:String;
FsuggestedGender:String;
FsuggestedMinAge:INumber;
FsuggestedMaxAge:INumber;
protected
function Get_requiredMinAge:Integer;virtual;
procedure Set_requiredMinAge(v:Integer);virtual;
function Get_requiredMaxAge:Integer;virtual;
procedure Set_requiredMaxAge(v:Integer);virtual;
function Get_requiredGender:String;virtual;
procedure Set_requiredGender(v:String);virtual;
function Get_suggestedGender:String;virtual;
procedure Set_suggestedGender(v:String);virtual;
function Get_suggestedMinAge:INumber;virtual;
procedure Set_suggestedMinAge(v:INumber);virtual;
function Get_suggestedMaxAge:INumber;virtual;
procedure Set_suggestedMaxAge(v:INumber);virtual;
public
property suggestedMinAge:INumber read Get_suggestedMinAge write Set_suggestedMinAge;
property suggestedMaxAge:INumber read Get_suggestedMaxAge write Set_suggestedMaxAge;
published
property requiredMinAge:Integer read Get_requiredMinAge write Set_requiredMinAge;
property requiredMaxAge:Integer read Get_requiredMaxAge write Set_requiredMaxAge;
property requiredGender:String read Get_requiredGender write Set_requiredGender;
property suggestedGender:String read Get_suggestedGender write Set_suggestedGender;
end;
(*ParentAudience*)
TParentAudience=Class (TPeopleAudience,IParentAudience)
private
FchildMaxAge:INumber;
FchildMinAge:INumber;
protected
function Get_childMaxAge:INumber;virtual;
procedure Set_childMaxAge(v:INumber);virtual;
function Get_childMinAge:INumber;virtual;
procedure Set_childMinAge(v:INumber);virtual;
public
property childMaxAge:INumber read Get_childMaxAge write Set_childMaxAge;
property childMinAge:INumber read Get_childMinAge write Set_childMinAge;
published
end;
(*BorrowAction*)
TBorrowAction=Class (TTransferAction,IBorrowAction)
private
Flender:IPerson;
protected
function Get_lender:IPerson;virtual;
procedure Set_lender(v:IPerson);virtual;
public
property lender:IPerson read Get_lender write Set_lender;
published
end;
TRecommendedDoseSchedule=Class; //forward
(*DietarySupplement*)
TDietarySupplement=Class (TSubstance,IDietarySupplement)
private
FnonProprietaryName:String;
Fbackground:String;
FisProprietary:Boolean;
FrecommendedIntake:IRecommendedDoseSchedule;
FmechanismOfAction:String;
FtargetPopulation:String;
FsafetyConsideration:String;
Fmanufacturer:IOrganization;
protected
function Get_nonProprietaryName:String;virtual;
procedure Set_nonProprietaryName(v:String);virtual;
function Get_background:String;virtual;
procedure Set_background(v:String);virtual;
function Get_isProprietary:Boolean;virtual;
procedure Set_isProprietary(v:Boolean);virtual;
function Get_recommendedIntake:IRecommendedDoseSchedule;virtual;
procedure Set_recommendedIntake(v:IRecommendedDoseSchedule);virtual;
function Get_mechanismOfAction:String;virtual;
procedure Set_mechanismOfAction(v:String);virtual;
function Get_targetPopulation:String;virtual;
procedure Set_targetPopulation(v:String);virtual;
function Get_safetyConsideration:String;virtual;
procedure Set_safetyConsideration(v:String);virtual;
function Get_manufacturer:IOrganization;virtual;
procedure Set_manufacturer(v:IOrganization);virtual;
public
property recommendedIntake:IRecommendedDoseSchedule read Get_recommendedIntake write Set_recommendedIntake;
property manufacturer:IOrganization read Get_manufacturer write Set_manufacturer;
published
property nonProprietaryName:String read Get_nonProprietaryName write Set_nonProprietaryName;
property background:String read Get_background write Set_background;
property isProprietary:Boolean read Get_isProprietary write Set_isProprietary;
property mechanismOfAction:String read Get_mechanismOfAction write Set_mechanismOfAction;
property targetPopulation:String read Get_targetPopulation write Set_targetPopulation;
property safetyConsideration:String read Get_safetyConsideration write Set_safetyConsideration;
end;
(*RecommendedDoseSchedule*)
TRecommendedDoseSchedule=Class (TDoseSchedule,IRecommendedDoseSchedule)
(*No atribs*)
end;
(*BuyAction*)
TBuyAction=Class (TTradeAction,IBuyAction)
private
FwarrantyPromise:IWarrantyPromise;
Fvendor:IOrganization;
protected
function Get_warrantyPromise:IWarrantyPromise;virtual;
procedure Set_warrantyPromise(v:IWarrantyPromise);virtual;
function Get_vendor:IOrganization;virtual;
procedure Set_vendor(v:IOrganization);virtual;
public
property warrantyPromise:IWarrantyPromise read Get_warrantyPromise write Set_warrantyPromise;
property vendor:IOrganization read Get_vendor write Set_vendor;
published
end;
TRealEstateAgent=Class; //forward
(*RentAction*)
TRentAction=Class (TTradeAction,IRentAction)
private
FrealEstateAgent:IRealEstateAgent;
Flandlord:IPerson;
protected
function Get_realEstateAgent:IRealEstateAgent;virtual;
procedure Set_realEstateAgent(v:IRealEstateAgent);virtual;
function Get_landlord:IPerson;virtual;
procedure Set_landlord(v:IPerson);virtual;
public
property realEstateAgent:IRealEstateAgent read Get_realEstateAgent write Set_realEstateAgent;
property landlord:IPerson read Get_landlord write Set_landlord;
published
end;
(*RealEstateAgent*)
TRealEstateAgent=Class (TLocalBusiness,IRealEstateAgent)
(*No atribs*)
end;
(*MedicalDevicePurpose*)
TMedicalDevicePurpose=Class (TMedicalEnumeration,IMedicalDevicePurpose)
function TangMedicalDevicePurpose:TangibleValue;virtual;
end;
(*Report*)
TReport=Class (TArticle,IReport)
private
FreportNumber:String;
protected
function Get_reportNumber:String;virtual;
procedure Set_reportNumber(v:String);virtual;
public
published
property reportNumber:String read Get_reportNumber write Set_reportNumber;
end;
(*TechArticle*)
TTechArticle=Class (TArticle,ITechArticle)
private
Fdependencies:String;
FproficiencyLevel:String;
protected
function Get_dependencies:String;virtual;
procedure Set_dependencies(v:String);virtual;
function Get_proficiencyLevel:String;virtual;
procedure Set_proficiencyLevel(v:String);virtual;
public
published
property dependencies:String read Get_dependencies write Set_dependencies;
property proficiencyLevel:String read Get_proficiencyLevel write Set_proficiencyLevel;
end;
(*Integer*)
TInteger=Class (TNumber,IInteger)
(*No atribs*)
end;
(*MedicalGuidelineRecommendation*)
TMedicalGuidelineRecommendation=Class (TMedicalGuideline,IMedicalGuidelineRecommendation)
private
FrecommendationStrength:String;
protected
function Get_recommendationStrength:String;virtual;
procedure Set_recommendationStrength(v:String);virtual;
public
published
property recommendationStrength:String read Get_recommendationStrength write Set_recommendationStrength;
end;
(*FollowAction*)
TFollowAction=Class (TInteractAction,IFollowAction)
private
Ffollowee:IOrganization;
protected
function Get_followee:IOrganization;virtual;
procedure Set_followee(v:IOrganization);virtual;
public
property followee:IOrganization read Get_followee write Set_followee;
published
end;
(*TipAction*)
TTipAction=Class (TTradeAction,ITipAction)
(*No atribs*)
end;
(*BusinessAudience*)
TBusinessAudience=Class (TAudience,IBusinessAudience)
private
FyearsInOperation:IQuantitativeValue;
FyearlyRevenue:IQuantitativeValue;
FnumberOfEmployees:IQuantitativeValue;
protected
function Get_yearsInOperation:IQuantitativeValue;virtual;
procedure Set_yearsInOperation(v:IQuantitativeValue);virtual;
function Get_yearlyRevenue:IQuantitativeValue;virtual;
procedure Set_yearlyRevenue(v:IQuantitativeValue);virtual;
function Get_numberOfEmployees:IQuantitativeValue;virtual;
procedure Set_numberOfEmployees(v:IQuantitativeValue);virtual;
public
property yearsInOperation:IQuantitativeValue read Get_yearsInOperation write Set_yearsInOperation;
property yearlyRevenue:IQuantitativeValue read Get_yearlyRevenue write Set_yearlyRevenue;
property numberOfEmployees:IQuantitativeValue read Get_numberOfEmployees write Set_numberOfEmployees;
published
end;
TListItem=Class; //forward
(*ListItem*)
TListItem=Class (TIntangible,IListItem)
private
Fitem:IThing;
FpreviousItem:IListItem;
FnextItem:IListItem;
protected
function Get_item:IThing;virtual;
procedure Set_item(v:IThing);virtual;
function Get_previousItem:IListItem;virtual;
procedure Set_previousItem(v:IListItem);virtual;
function Get_nextItem:IListItem;virtual;
procedure Set_nextItem(v:IListItem);virtual;
public
property item:IThing read Get_item write Set_item;
property previousItem:IListItem read Get_previousItem write Set_previousItem;
property nextItem:IListItem read Get_nextItem write Set_nextItem;
published
end;
(*PhysicalActivity*)
TPhysicalActivity=Class (TLifestyleModification,IPhysicalActivity)
private
Fepidemiology:String;
protected
function Get_epidemiology:String;virtual;
procedure Set_epidemiology(v:String);virtual;
public
published
property epidemiology:String read Get_epidemiology write Set_epidemiology;
end;
(*APIReference*)
TAPIReference=Class (TTechArticle,IAPIReference)
private
FassemblyVersion:String;
FprogrammingModel:String;
FtargetPlatform:String;
Fassembly:String;
protected
function Get_assemblyVersion:String;virtual;
procedure Set_assemblyVersion(v:String);virtual;
function Get_programmingModel:String;virtual;
procedure Set_programmingModel(v:String);virtual;
function Get_targetPlatform:String;virtual;
procedure Set_targetPlatform(v:String);virtual;
function Get_assembly:String;virtual;
procedure Set_assembly(v:String);virtual;
public
published
property assemblyVersion:String read Get_assemblyVersion write Set_assemblyVersion;
property programmingModel:String read Get_programmingModel write Set_programmingModel;
property targetPlatform:String read Get_targetPlatform write Set_targetPlatform;
property assembly:String read Get_assembly write Set_assembly;
end;
(*Car*)
TCar=Class (TVehicle,ICar)
private
FroofLoad:IQuantitativeValue;
protected
function Get_roofLoad:IQuantitativeValue;virtual;
procedure Set_roofLoad(v:IQuantitativeValue);virtual;
public
property roofLoad:IQuantitativeValue read Get_roofLoad write Set_roofLoad;
published
end;
(*RentalCarReservation*)
TRentalCarReservation=Class (TReservation,IRentalCarReservation)
private
FdropoffLocation:IPlace;
FdropoffTime:TDateTime;
protected
function Get_dropoffLocation:IPlace;virtual;
procedure Set_dropoffLocation(v:IPlace);virtual;
function Get_dropoffTime:TDateTime;virtual;
procedure Set_dropoffTime(v:TDateTime);virtual;
public
property dropoffLocation:IPlace read Get_dropoffLocation write Set_dropoffLocation;
published
property dropoffTime:TDateTime read Get_dropoffTime write Set_dropoffTime;
end;
(*WebApplication*)
TWebApplication=Class (TSoftwareApplication,IWebApplication)
private
FbrowserRequirements:String;
protected
function Get_browserRequirements:String;virtual;
procedure Set_browserRequirements(v:String);virtual;
public
published
property browserRequirements:String read Get_browserRequirements write Set_browserRequirements;
end;
(*GamePlayMode*)
TGamePlayMode=Class (TEnumeration,IGamePlayMode)
function TangGamePlayMode:TangibleValue;virtual;
end;
(*AggregateOffer*)
TAggregateOffer=Class (TOffer,IAggregateOffer)
private
FhighPrice:INumber;
FofferCount:Integer;
FlowPrice:INumber;
protected
function Get_highPrice:INumber;virtual;
procedure Set_highPrice(v:INumber);virtual;
function Get_offerCount:Integer;virtual;
procedure Set_offerCount(v:Integer);virtual;
function Get_lowPrice:INumber;virtual;
procedure Set_lowPrice(v:INumber);virtual;
public
property highPrice:INumber read Get_highPrice write Set_highPrice;
property lowPrice:INumber read Get_lowPrice write Set_lowPrice;
published
property offerCount:Integer read Get_offerCount write Set_offerCount;
end;
(*Brand*)
TBrand=Class (TIntangible,IBrand)
function TangBrand:TangibleValue;virtual;
end;
(*PropertyValueSpecification*)
TPropertyValueSpecification=Class (TIntangible,IPropertyValueSpecification)
private
FmultipleValues:Boolean;
FreadonlyValue:Boolean;
FvalueMaxLength:INumber;
FvalueMinLength:INumber;
FdefaultValue:String;
FvaluePattern:String;
FvalueRequired:Boolean;
FvalueName:String;
FstepValue:INumber;
protected
function Get_multipleValues:Boolean;virtual;
procedure Set_multipleValues(v:Boolean);virtual;
function Get_readonlyValue:Boolean;virtual;
procedure Set_readonlyValue(v:Boolean);virtual;
function Get_valueMaxLength:INumber;virtual;
procedure Set_valueMaxLength(v:INumber);virtual;
function Get_valueMinLength:INumber;virtual;
procedure Set_valueMinLength(v:INumber);virtual;
function Get_defaultValue:String;virtual;
procedure Set_defaultValue(v:String);virtual;
function Get_valuePattern:String;virtual;
procedure Set_valuePattern(v:String);virtual;
function Get_valueRequired:Boolean;virtual;
procedure Set_valueRequired(v:Boolean);virtual;
function Get_valueName:String;virtual;
procedure Set_valueName(v:String);virtual;
function Get_stepValue:INumber;virtual;
procedure Set_stepValue(v:INumber);virtual;
public
property valueMaxLength:INumber read Get_valueMaxLength write Set_valueMaxLength;
property valueMinLength:INumber read Get_valueMinLength write Set_valueMinLength;
property stepValue:INumber read Get_stepValue write Set_stepValue;
published
property multipleValues:Boolean read Get_multipleValues write Set_multipleValues;
property readonlyValue:Boolean read Get_readonlyValue write Set_readonlyValue;
property defaultValue:String read Get_defaultValue write Set_defaultValue;
property valuePattern:String read Get_valuePattern write Set_valuePattern;
property valueRequired:Boolean read Get_valueRequired write Set_valueRequired;
property valueName:String read Get_valueName write Set_valueName;
end;
(*MobileApplication*)
TMobileApplication=Class (TSoftwareApplication,IMobileApplication)
private
FcarrierRequirements:String;
protected
function Get_carrierRequirements:String;virtual;
procedure Set_carrierRequirements(v:String);virtual;
public
published
property carrierRequirements:String read Get_carrierRequirements write Set_carrierRequirements;
end;
(*ReceiveAction*)
TReceiveAction=Class (TTransferAction,IReceiveAction)
private
Fsender:IOrganization;
protected
function Get_sender:IOrganization;virtual;
procedure Set_sender(v:IOrganization);virtual;
public
property sender:IOrganization read Get_sender write Set_sender;
published
end;
TMedicalTrialDesign=Class; //forward
(*MedicalTrial*)
TMedicalTrial=Class (TMedicalStudy,IMedicalTrial)
private
FtrialDesign:IMedicalTrialDesign;
Fphase:String;
protected
function Get_trialDesign:IMedicalTrialDesign;virtual;
procedure Set_trialDesign(v:IMedicalTrialDesign);virtual;
function Get_phase:String;virtual;
procedure Set_phase(v:String);virtual;
public
property trialDesign:IMedicalTrialDesign read Get_trialDesign write Set_trialDesign;
published
property phase:String read Get_phase write Set_phase;
end;
(*MedicalTrialDesign*)
TMedicalTrialDesign=Class (TEnumeration,IMedicalTrialDesign)
function TangMedicalTrialDesign:TangibleValue;virtual;
end;
TMass=Class; //forward
(*NutritionInformation*)
TNutritionInformation=Class (TStructuredValue,INutritionInformation)
private
FproteinContent:IMass;
FfatContent:IMass;
FtransFatContent:IMass;
Fcalories:IEnergy;
FcarbohydrateContent:IMass;
FsodiumContent:IMass;
FcholesterolContent:IMass;
FservingSize:String;
FfiberContent:IMass;
FsaturatedFatContent:IMass;
FsugarContent:IMass;
FunsaturatedFatContent:IMass;
protected
function Get_proteinContent:IMass;virtual;
procedure Set_proteinContent(v:IMass);virtual;
function Get_fatContent:IMass;virtual;
procedure Set_fatContent(v:IMass);virtual;
function Get_transFatContent:IMass;virtual;
procedure Set_transFatContent(v:IMass);virtual;
function Get_calories:IEnergy;virtual;
procedure Set_calories(v:IEnergy);virtual;
function Get_carbohydrateContent:IMass;virtual;
procedure Set_carbohydrateContent(v:IMass);virtual;
function Get_sodiumContent:IMass;virtual;
procedure Set_sodiumContent(v:IMass);virtual;
function Get_cholesterolContent:IMass;virtual;
procedure Set_cholesterolContent(v:IMass);virtual;
function Get_servingSize:String;virtual;
procedure Set_servingSize(v:String);virtual;
function Get_fiberContent:IMass;virtual;
procedure Set_fiberContent(v:IMass);virtual;
function Get_saturatedFatContent:IMass;virtual;
procedure Set_saturatedFatContent(v:IMass);virtual;
function Get_sugarContent:IMass;virtual;
procedure Set_sugarContent(v:IMass);virtual;
function Get_unsaturatedFatContent:IMass;virtual;
procedure Set_unsaturatedFatContent(v:IMass);virtual;
public
property proteinContent:IMass read Get_proteinContent write Set_proteinContent;
property fatContent:IMass read Get_fatContent write Set_fatContent;
property transFatContent:IMass read Get_transFatContent write Set_transFatContent;
property calories:IEnergy read Get_calories write Set_calories;
property carbohydrateContent:IMass read Get_carbohydrateContent write Set_carbohydrateContent;
property sodiumContent:IMass read Get_sodiumContent write Set_sodiumContent;
property cholesterolContent:IMass read Get_cholesterolContent write Set_cholesterolContent;
property fiberContent:IMass read Get_fiberContent write Set_fiberContent;
property saturatedFatContent:IMass read Get_saturatedFatContent write Set_saturatedFatContent;
property sugarContent:IMass read Get_sugarContent write Set_sugarContent;
property unsaturatedFatContent:IMass read Get_unsaturatedFatContent write Set_unsaturatedFatContent;
published
property servingSize:String read Get_servingSize write Set_servingSize;
end;
(*Mass*)
TMass=Class (TQuantity,IMass)
function TangMass:TangibleValue;virtual;
end;
(*PerformanceRole*)
TPerformanceRole=Class (TRole,IPerformanceRole)
private
FcharacterName:String;
protected
function Get_characterName:String;virtual;
procedure Set_characterName(v:String);virtual;
public
published
property characterName:String read Get_characterName write Set_characterName;
end;
(*LymphaticVessel*)
TLymphaticVessel=Class (TVessel,ILymphaticVessel)
private
ForiginatesFrom:IVessel;
FrunsTo:IVessel;
protected
function Get_originatesFrom:IVessel;virtual;
procedure Set_originatesFrom(v:IVessel);virtual;
function Get_runsTo:IVessel;virtual;
procedure Set_runsTo(v:IVessel);virtual;
public
property originatesFrom:IVessel read Get_originatesFrom write Set_originatesFrom;
property runsTo:IVessel read Get_runsTo write Set_runsTo;
published
end;
(*Apartment*)
TApartment=Class (TAccommodation,IApartment)
(*No atribs*)
end;
(*Patient*)
TPatient=Class (TMedicalAudience,IPatient)
function TangPatient:TangibleValue;virtual;
end;
(*EnumerationValue*)
TEnumerationValue=Class (TEnumeration,IEnumerationValue)
private
FpartOfEnumerationValueSet:String;
FenumerationValueCode:String;
protected
function Get_partOfEnumerationValueSet:String;virtual;
procedure Set_partOfEnumerationValueSet(v:String);virtual;
function Get_enumerationValueCode:String;virtual;
procedure Set_enumerationValueCode(v:String);virtual;
public
published
property partOfEnumerationValueSet:String read Get_partOfEnumerationValueSet write Set_partOfEnumerationValueSet;
property enumerationValueCode:String read Get_enumerationValueCode write Set_enumerationValueCode;
end;
TGeoCoordinates=Class; //forward
(*GeoCircle*)
TGeoCircle=Class (TGeoShape,IGeoCircle)
private
FgeoRadius:IDistance;
FgeoMidpoint:IGeoCoordinates;
protected
function Get_geoRadius:IDistance;virtual;
procedure Set_geoRadius(v:IDistance);virtual;
function Get_geoMidpoint:IGeoCoordinates;virtual;
procedure Set_geoMidpoint(v:IGeoCoordinates);virtual;
public
property geoRadius:IDistance read Get_geoRadius write Set_geoRadius;
property geoMidpoint:IGeoCoordinates read Get_geoMidpoint write Set_geoMidpoint;
published
end;
(*GeoCoordinates*)
TGeoCoordinates=Class (TStructuredValue,IGeoCoordinates)
private
Flatitude:INumber;
Flongitude:INumber;
FpostalCode:String;
protected
function Get_latitude:INumber;virtual;
procedure Set_latitude(v:INumber);virtual;
function Get_longitude:INumber;virtual;
procedure Set_longitude(v:INumber);virtual;
function Get_postalCode:String;virtual;
procedure Set_postalCode(v:String);virtual;
public
property latitude:INumber read Get_latitude write Set_latitude;
property longitude:INumber read Get_longitude write Set_longitude;
published
property postalCode:String read Get_postalCode write Set_postalCode;
end;
(*EducationalAudience*)
TEducationalAudience=Class (TAudience,IEducationalAudience)
private
FeducationalRole:String;
protected
function Get_educationalRole:String;virtual;
procedure Set_educationalRole(v:String);virtual;
public
published
property educationalRole:String read Get_educationalRole write Set_educationalRole;
end;
(*RadioSeries*)
TRadioSeries=Class (TCreativeWorkSeries,IRadioSeries)
(*No atribs*)
end;
(*ChooseAction*)
TChooseAction=Class (TAssessAction,IChooseAction)
private
Foption:IThing;
protected
function Get_option:IThing;virtual;
procedure Set_option(v:IThing);virtual;
public
property option:IThing read Get_option write Set_option;
published
end;
(*VoteAction*)
TVoteAction=Class (TChooseAction,IVoteAction)
private
Fcandidate:IPerson;
protected
function Get_candidate:IPerson;virtual;
procedure Set_candidate(v:IPerson);virtual;
public
property candidate:IPerson read Get_candidate write Set_candidate;
published
end;
(*LinkRole*)
TLinkRole=Class (TRole,ILinkRole)
private
FlinkRelationship:String;
protected
function Get_linkRelationship:String;virtual;
procedure Set_linkRelationship(v:String);virtual;
public
published
property linkRelationship:String read Get_linkRelationship write Set_linkRelationship;
end;
(*LoanOrCredit*)
TLoanOrCredit=Class (TFinancialProduct,ILoanOrCredit)
private
FloanTerm:IQuantitativeValue;
FrequiredCollateral:String;
Famount:IMonetaryAmount;
protected
function Get_loanTerm:IQuantitativeValue;virtual;
procedure Set_loanTerm(v:IQuantitativeValue);virtual;
function Get_requiredCollateral:String;virtual;
procedure Set_requiredCollateral(v:String);virtual;
function Get_amount:IMonetaryAmount;virtual;
procedure Set_amount(v:IMonetaryAmount);virtual;
public
property loanTerm:IQuantitativeValue read Get_loanTerm write Set_loanTerm;
property amount:IMonetaryAmount read Get_amount write Set_amount;
published
property requiredCollateral:String read Get_requiredCollateral write Set_requiredCollateral;
end;
(*MedicalImagingTechnique*)
TMedicalImagingTechnique=Class (TMedicalEnumeration,IMedicalImagingTechnique)
function TangMedicalImagingTechnique:TangibleValue;virtual;
end;
(*WebSite*)
TWebSite=Class (TCreativeWork,IWebSite)
(*No atribs*)
end;
(*BusOrCoach*)
TBusOrCoach=Class (TVehicle,IBusOrCoach)
private
FacrissCode:String;
protected
function Get_acrissCode:String;virtual;
procedure Set_acrissCode(v:String);virtual;
public
published
property acrissCode:String read Get_acrissCode write Set_acrissCode;
end;
(*BroadcastFrequencySpecification*)
TBroadcastFrequencySpecification=Class (TIntangible,IBroadcastFrequencySpecification)
private
FbroadcastFrequencyValue:IQuantitativeValue;
protected
function Get_broadcastFrequencyValue:IQuantitativeValue;virtual;
procedure Set_broadcastFrequencyValue(v:IQuantitativeValue);virtual;
public
property broadcastFrequencyValue:IQuantitativeValue read Get_broadcastFrequencyValue write Set_broadcastFrequencyValue;
published
end;
(*ReturnAction*)
TReturnAction=Class (TTransferAction,IReturnAction)
(*No atribs*)
end;
(*ImagingTest*)
TImagingTest=Class (TMedicalTest,IImagingTest)
private
FimagingTechnique:IMedicalImagingTechnique;
protected
function Get_imagingTechnique:IMedicalImagingTechnique;virtual;
procedure Set_imagingTechnique(v:IMedicalImagingTechnique);virtual;
public
property imagingTechnique:IMedicalImagingTechnique read Get_imagingTechnique write Set_imagingTechnique;
published
end;
(*LeaveAction*)
TLeaveAction=Class (TInteractAction,ILeaveAction)
(*No atribs*)
end;
(*InfectiousDisease*)
TInfectiousDisease=Class (TMedicalCondition,IInfectiousDisease)
private
FinfectiousAgentClass:IInfectiousAgentClass;
FtransmissionMethod:String;
FinfectiousAgent:String;
protected
function Get_infectiousAgentClass:IInfectiousAgentClass;virtual;
procedure Set_infectiousAgentClass(v:IInfectiousAgentClass);virtual;
function Get_transmissionMethod:String;virtual;
procedure Set_transmissionMethod(v:String);virtual;
function Get_infectiousAgent:String;virtual;
procedure Set_infectiousAgent(v:String);virtual;
public
property infectiousAgentClass:IInfectiousAgentClass read Get_infectiousAgentClass write Set_infectiousAgentClass;
published
property transmissionMethod:String read Get_transmissionMethod write Set_transmissionMethod;
property infectiousAgent:String read Get_infectiousAgent write Set_infectiousAgent;
end;
(*BusStop*)
TBusStop=Class (TCivicStructure,IBusStop)
(*No atribs*)
end;
(*MusicRelease*)
TMusicRelease=Class (TMusicPlaylist,IMusicRelease)
private
FcreditedTo:IOrganization;
FmusicReleaseFormat:IMusicReleaseFormatType;
FrecordLabel:IOrganization;
FcatalogNumber:String;
FreleaseOf:IMusicAlbum;
protected
function Get_creditedTo:IOrganization;virtual;
procedure Set_creditedTo(v:IOrganization);virtual;
function Get_musicReleaseFormat:IMusicReleaseFormatType;virtual;
procedure Set_musicReleaseFormat(v:IMusicReleaseFormatType);virtual;
function Get_recordLabel:IOrganization;virtual;
procedure Set_recordLabel(v:IOrganization);virtual;
function Get_catalogNumber:String;virtual;
procedure Set_catalogNumber(v:String);virtual;
function Get_releaseOf:IMusicAlbum;virtual;
procedure Set_releaseOf(v:IMusicAlbum);virtual;
public
property creditedTo:IOrganization read Get_creditedTo write Set_creditedTo;
property musicReleaseFormat:IMusicReleaseFormatType read Get_musicReleaseFormat write Set_musicReleaseFormat;
property recordLabel:IOrganization read Get_recordLabel write Set_recordLabel;
property releaseOf:IMusicAlbum read Get_releaseOf write Set_releaseOf;
published
property catalogNumber:String read Get_catalogNumber write Set_catalogNumber;
end;
(*FoodEstablishmentReservation*)
TFoodEstablishmentReservation=Class (TReservation,IFoodEstablishmentReservation)
private
FstartTime:TDateTime;
FendTime:TDateTime;
protected
function Get_startTime:TDateTime;virtual;
procedure Set_startTime(v:TDateTime);virtual;
function Get_endTime:TDateTime;virtual;
procedure Set_endTime(v:TDateTime);virtual;
public
published
property startTime:TDateTime read Get_startTime write Set_startTime;
property endTime:TDateTime read Get_endTime write Set_endTime;
end;
(*HotelRoom*)
THotelRoom=Class (TRoom,IHotelRoom)
private
Fbed:IBedType;
Foccupancy:IQuantitativeValue;
protected
function Get_bed:IBedType;virtual;
procedure Set_bed(v:IBedType);virtual;
function Get_occupancy:IQuantitativeValue;virtual;
procedure Set_occupancy(v:IQuantitativeValue);virtual;
public
property bed:IBedType read Get_bed write Set_bed;
property occupancy:IQuantitativeValue read Get_occupancy write Set_occupancy;
published
end;
(*MedicalClinic*)
TMedicalClinic=Class (TMedicalBusiness,IMedicalClinic)
(*No atribs*)
end;
(*InteractionCounter*)
TInteractionCounter=Class (TStructuredValue,IInteractionCounter)
private
FinteractionService:ISoftwareApplication;
FinteractionType:IAction;
FuserInteractionCount:Integer;
protected
function Get_interactionService:ISoftwareApplication;virtual;
procedure Set_interactionService(v:ISoftwareApplication);virtual;
function Get_interactionType:IAction;virtual;
procedure Set_interactionType(v:IAction);virtual;
function Get_userInteractionCount:Integer;virtual;
procedure Set_userInteractionCount(v:Integer);virtual;
public
property interactionService:ISoftwareApplication read Get_interactionService write Set_interactionService;
property interactionType:IAction read Get_interactionType write Set_interactionType;
published
property userInteractionCount:Integer read Get_userInteractionCount write Set_userInteractionCount;
end;
(*Recipe*)
TRecipe=Class (TCreativeWork,IRecipe)
private
FrecipeInstructions:IItemList;
FrecipeYield:String;
FrecipeCuisine:String;
Fnutrition:INutritionInformation;
FsuitableForDiet:IRestrictedDiet;
Fingredients:String;
FcookingMethod:String;
FrecipeCategory:String;
FtotalTime:IDuration;
FcookTime:IDuration;
FprepTime:IDuration;
protected
function Get_recipeInstructions:IItemList;virtual;
procedure Set_recipeInstructions(v:IItemList);virtual;
function Get_recipeYield:String;virtual;
procedure Set_recipeYield(v:String);virtual;
function Get_recipeCuisine:String;virtual;
procedure Set_recipeCuisine(v:String);virtual;
function Get_nutrition:INutritionInformation;virtual;
procedure Set_nutrition(v:INutritionInformation);virtual;
function Get_suitableForDiet:IRestrictedDiet;virtual;
procedure Set_suitableForDiet(v:IRestrictedDiet);virtual;
function Get_ingredients:String;virtual;
procedure Set_ingredients(v:String);virtual;
function Get_cookingMethod:String;virtual;
procedure Set_cookingMethod(v:String);virtual;
function Get_recipeCategory:String;virtual;
procedure Set_recipeCategory(v:String);virtual;
function Get_totalTime:IDuration;virtual;
procedure Set_totalTime(v:IDuration);virtual;
function Get_cookTime:IDuration;virtual;
procedure Set_cookTime(v:IDuration);virtual;
function Get_prepTime:IDuration;virtual;
procedure Set_prepTime(v:IDuration);virtual;
public
property recipeInstructions:IItemList read Get_recipeInstructions write Set_recipeInstructions;
property nutrition:INutritionInformation read Get_nutrition write Set_nutrition;
property suitableForDiet:IRestrictedDiet read Get_suitableForDiet write Set_suitableForDiet;
property totalTime:IDuration read Get_totalTime write Set_totalTime;
property cookTime:IDuration read Get_cookTime write Set_cookTime;
property prepTime:IDuration read Get_prepTime write Set_prepTime;
published
property recipeYield:String read Get_recipeYield write Set_recipeYield;
property recipeCuisine:String read Get_recipeCuisine write Set_recipeCuisine;
property ingredients:String read Get_ingredients write Set_ingredients;
property cookingMethod:String read Get_cookingMethod write Set_cookingMethod;
property recipeCategory:String read Get_recipeCategory write Set_recipeCategory;
end;
(*ReviewAction*)
TReviewAction=Class (TAssessAction,IReviewAction)
private
FresultReview:IReview;
protected
function Get_resultReview:IReview;virtual;
procedure Set_resultReview(v:IReview);virtual;
public
property resultReview:IReview read Get_resultReview write Set_resultReview;
published
end;
(*WinAction*)
TWinAction=Class (TAchieveAction,IWinAction)
private
Floser:IPerson;
protected
function Get_loser:IPerson;virtual;
procedure Set_loser(v:IPerson);virtual;
public
property loser:IPerson read Get_loser write Set_loser;
published
end;
(*ScholarlyArticle*)
TScholarlyArticle=Class (TArticle,IScholarlyArticle)
(*No atribs*)
end;
(*MedicalScholarlyArticle*)
TMedicalScholarlyArticle=Class (TScholarlyArticle,IMedicalScholarlyArticle)
private
FpublicationType:String;
protected
function Get_publicationType:String;virtual;
procedure Set_publicationType(v:String);virtual;
public
published
property publicationType:String read Get_publicationType write Set_publicationType;
end;
(*Blog*)
TBlog=Class (TCreativeWork,IBlog)
private
FblogPosts:IBlogPosting;
protected
function Get_blogPosts:IBlogPosting;virtual;
procedure Set_blogPosts(v:IBlogPosting);virtual;
public
property blogPosts:IBlogPosting read Get_blogPosts write Set_blogPosts;
published
end;
(*CookAction*)
TCookAction=Class (TCreateAction,ICookAction)
private
Frecipe:IRecipe;
FfoodEstablishment:IFoodEstablishment;
FfoodEvent:IFoodEvent;
protected
function Get_recipe:IRecipe;virtual;
procedure Set_recipe(v:IRecipe);virtual;
function Get_foodEstablishment:IFoodEstablishment;virtual;
procedure Set_foodEstablishment(v:IFoodEstablishment);virtual;
function Get_foodEvent:IFoodEvent;virtual;
procedure Set_foodEvent(v:IFoodEvent);virtual;
public
property recipe:IRecipe read Get_recipe write Set_recipe;
property foodEstablishment:IFoodEstablishment read Get_foodEstablishment write Set_foodEstablishment;
property foodEvent:IFoodEvent read Get_foodEvent write Set_foodEvent;
published
end;
(*PathologyTest*)
TPathologyTest=Class (TMedicalTest,IPathologyTest)
private
FtissueSample:String;
protected
function Get_tissueSample:String;virtual;
procedure Set_tissueSample(v:String);virtual;
public
published
property tissueSample:String read Get_tissueSample write Set_tissueSample;
end;
(*ReservationPackage*)
TReservationPackage=Class (TReservation,IReservationPackage)
private
FsubReservation:IReservation;
protected
function Get_subReservation:IReservation;virtual;
procedure Set_subReservation(v:IReservation);virtual;
public
property subReservation:IReservation read Get_subReservation write Set_subReservation;
published
end;
(*UserComments*)
TUserComments=Class (TUserInteraction,IUserComments)
private
Fcreator:IPerson;
Fdiscusses:ICreativeWork;
FcommentText:String;
FreplyToUrl:String;
FcommentTime:TDateTime;
protected
function Get_creator:IPerson;virtual;
procedure Set_creator(v:IPerson);virtual;
function Get_discusses:ICreativeWork;virtual;
procedure Set_discusses(v:ICreativeWork);virtual;
function Get_commentText:String;virtual;
procedure Set_commentText(v:String);virtual;
function Get_replyToUrl:String;virtual;
procedure Set_replyToUrl(v:String);virtual;
function Get_commentTime:TDateTime;virtual;
procedure Set_commentTime(v:TDateTime);virtual;
public
property creator:IPerson read Get_creator write Set_creator;
property discusses:ICreativeWork read Get_discusses write Set_discusses;
published
property commentText:String read Get_commentText write Set_commentText;
property replyToUrl:String read Get_replyToUrl write Set_replyToUrl;
property commentTime:TDateTime read Get_commentTime write Set_commentTime;
end;
TBusStation=Class; //forward
(*BusTrip*)
TBusTrip=Class (TIntangible,IBusTrip)
private
FarrivalBusStop:IBusStation;
FbusName:String;
FbusNumber:String;
FdepartureBusStop:IBusStop;
protected
function Get_arrivalBusStop:IBusStation;virtual;
procedure Set_arrivalBusStop(v:IBusStation);virtual;
function Get_busName:String;virtual;
procedure Set_busName(v:String);virtual;
function Get_busNumber:String;virtual;
procedure Set_busNumber(v:String);virtual;
function Get_departureBusStop:IBusStop;virtual;
procedure Set_departureBusStop(v:IBusStop);virtual;
public
property arrivalBusStop:IBusStation read Get_arrivalBusStop write Set_arrivalBusStop;
property departureBusStop:IBusStop read Get_departureBusStop write Set_departureBusStop;
published
property busName:String read Get_busName write Set_busName;
property busNumber:String read Get_busNumber write Set_busNumber;
end;
(*BusStation*)
TBusStation=Class (TCivicStructure,IBusStation)
(*No atribs*)
end;
(*GenderType*)
TGenderType=Class (TEnumeration,IGenderType)
function TangGenderType:TangibleValue;virtual;
end;
(*DataType*)
TDataType=Class (TBaseSchema,IDataType)
(*No atribs*)
end;
(*AuthorizeAction*)
TAuthorizeAction=Class (TAllocateAction,IAuthorizeAction)
(*No atribs*)
end;
(*TVClip*)
TTVClip=Class (TClip,ITVClip)
(*No atribs*)
end;
(*AskAction*)
TAskAction=Class (TCommunicateAction,IAskAction)
private
Fquestion:IQuestion;
protected
function Get_question:IQuestion;virtual;
procedure Set_question(v:IQuestion);virtual;
public
property question:IQuestion read Get_question write Set_question;
published
end;
(*PayAction*)
TPayAction=Class (TTradeAction,IPayAction)
private
Frecipient:IPerson;
protected
function Get_recipient:IPerson;virtual;
procedure Set_recipient(v:IPerson);virtual;
public
property recipient:IPerson read Get_recipient write Set_recipient;
published
end;
(*VideoGameSeries*)
TVideoGameSeries=Class (TCreativeWorkSeries,IVideoGameSeries)
private
FnumberOfPlayers:IQuantitativeValue;
FgameLocation:String;
Factors:IPerson;
Fquest:IThing;
FnumberOfSeasons:Integer;
FgamePlatform:String;
FgameItem:IThing;
FnumberOfEpisodes:Integer;
FplayMode:IGamePlayMode;
protected
function Get_numberOfPlayers:IQuantitativeValue;virtual;
procedure Set_numberOfPlayers(v:IQuantitativeValue);virtual;
function Get_gameLocation:String;virtual;
procedure Set_gameLocation(v:String);virtual;
function Get_actors:IPerson;virtual;
procedure Set_actors(v:IPerson);virtual;
function Get_quest:IThing;virtual;
procedure Set_quest(v:IThing);virtual;
function Get_numberOfSeasons:Integer;virtual;
procedure Set_numberOfSeasons(v:Integer);virtual;
function Get_gamePlatform:String;virtual;
procedure Set_gamePlatform(v:String);virtual;
function Get_gameItem:IThing;virtual;
procedure Set_gameItem(v:IThing);virtual;
function Get_numberOfEpisodes:Integer;virtual;
procedure Set_numberOfEpisodes(v:Integer);virtual;
function Get_playMode:IGamePlayMode;virtual;
procedure Set_playMode(v:IGamePlayMode);virtual;
public
property numberOfPlayers:IQuantitativeValue read Get_numberOfPlayers write Set_numberOfPlayers;
property actors:IPerson read Get_actors write Set_actors;
property quest:IThing read Get_quest write Set_quest;
property gameItem:IThing read Get_gameItem write Set_gameItem;
property playMode:IGamePlayMode read Get_playMode write Set_playMode;
published
property gameLocation:String read Get_gameLocation write Set_gameLocation;
property numberOfSeasons:Integer read Get_numberOfSeasons write Set_numberOfSeasons;
property gamePlatform:String read Get_gamePlatform write Set_gamePlatform;
property numberOfEpisodes:Integer read Get_numberOfEpisodes write Set_numberOfEpisodes;
end;
(*VideoGame*)
TVideoGame=Class (TGame,IVideoGame)
private
FcheatCode:ICreativeWork;
FgameTip:ICreativeWork;
FgameServer:IGameServer;
protected
function Get_cheatCode:ICreativeWork;virtual;
procedure Set_cheatCode(v:ICreativeWork);virtual;
function Get_gameTip:ICreativeWork;virtual;
procedure Set_gameTip(v:ICreativeWork);virtual;
function Get_gameServer:IGameServer;virtual;
procedure Set_gameServer(v:IGameServer);virtual;
public
property cheatCode:ICreativeWork read Get_cheatCode write Set_cheatCode;
property gameTip:ICreativeWork read Get_gameTip write Set_gameTip;
property gameServer:IGameServer read Get_gameServer write Set_gameServer;
published
end;
(*MovieTheater*)
TMovieTheater=Class (TEntertainmentBusiness,IMovieTheater)
private
FscreenCount:INumber;
protected
function Get_screenCount:INumber;virtual;
procedure Set_screenCount(v:INumber);virtual;
public
property screenCount:INumber read Get_screenCount write Set_screenCount;
published
end;
(*TaxiService*)
TTaxiService=Class (TService,ITaxiService)
function TangTaxiService:TangibleValue;virtual;
end;
(*LodgingReservation*)
TLodgingReservation=Class (TReservation,ILodgingReservation)
private
FnumChildren:IQuantitativeValue;
FnumAdults:Integer;
FlodgingUnitDescription:String;
FlodgingUnitType:String;
protected
function Get_numChildren:IQuantitativeValue;virtual;
procedure Set_numChildren(v:IQuantitativeValue);virtual;
function Get_numAdults:Integer;virtual;
procedure Set_numAdults(v:Integer);virtual;
function Get_lodgingUnitDescription:String;virtual;
procedure Set_lodgingUnitDescription(v:String);virtual;
function Get_lodgingUnitType:String;virtual;
procedure Set_lodgingUnitType(v:String);virtual;
public
property numChildren:IQuantitativeValue read Get_numChildren write Set_numChildren;
published
property numAdults:Integer read Get_numAdults write Set_numAdults;
property lodgingUnitDescription:String read Get_lodgingUnitDescription write Set_lodgingUnitDescription;
property lodgingUnitType:String read Get_lodgingUnitType write Set_lodgingUnitType;
end;
(*CommentAction*)
TCommentAction=Class (TCommunicateAction,ICommentAction)
private
FresultComment:IComment;
protected
function Get_resultComment:IComment;virtual;
procedure Set_resultComment(v:IComment);virtual;
public
property resultComment:IComment read Get_resultComment write Set_resultComment;
published
end;
(*DrugLegalStatus*)
TDrugLegalStatus=Class (TMedicalIntangible,IDrugLegalStatus)
(*No atribs*)
end;
(*SuperficialAnatomy*)
TSuperficialAnatomy=Class (TMedicalEntity,ISuperficialAnatomy)
private
Fsignificance:String;
FrelatedAnatomy:IAnatomicalSystem;
protected
function Get_significance:String;virtual;
procedure Set_significance(v:String);virtual;
function Get_relatedAnatomy:IAnatomicalSystem;virtual;
procedure Set_relatedAnatomy(v:IAnatomicalSystem);virtual;
public
property relatedAnatomy:IAnatomicalSystem read Get_relatedAnatomy write Set_relatedAnatomy;
published
property significance:String read Get_significance write Set_significance;
end;
(*ComicIssue*)
TComicIssue=Class (TPublicationIssue,IComicIssue)
private
Fpenciler:IPerson;
Finker:IPerson;
FvariantCover:String;
protected
function Get_penciler:IPerson;virtual;
procedure Set_penciler(v:IPerson);virtual;
function Get_inker:IPerson;virtual;
procedure Set_inker(v:IPerson);virtual;
function Get_variantCover:String;virtual;
procedure Set_variantCover(v:String);virtual;
public
property penciler:IPerson read Get_penciler write Set_penciler;
property inker:IPerson read Get_inker write Set_inker;
published
property variantCover:String read Get_variantCover write Set_variantCover;
end;
Implementation
// Implementation
{*** TThing ***}
function TThing.Get_sameAs:String;
Begin
result:=FsameAs;
End;
procedure TThing.Set_sameAs(v:String);
Begin
FsameAs:=v;
End;
function TThing.Get_additionalType:String;
Begin
result:=FadditionalType;
End;
procedure TThing.Set_additionalType(v:String);
Begin
FadditionalType:=v;
End;
function TThing.Get_disambiguatingDescription:String;
Begin
result:=FdisambiguatingDescription;
End;
procedure TThing.Set_disambiguatingDescription(v:String);
Begin
FdisambiguatingDescription:=v;
End;
function TThing.Get_potentialAction:IAction;
Begin
result:=FpotentialAction;
End;
procedure TThing.Set_potentialAction(v:IAction);
Begin
FpotentialAction:=v;
End;
function TThing.Get_url:String;
Begin
result:=Furl;
End;
procedure TThing.Set_url(v:String);
Begin
Furl:=v;
End;
function TThing.Get_alternateName:String;
Begin
result:=FalternateName;
End;
procedure TThing.Set_alternateName(v:String);
Begin
FalternateName:=v;
End;
function TThing.Get_name:String;
Begin
result:=Fname;
End;
procedure TThing.Set_name(v:String);
Begin
Fname:=v;
End;
function TThing.Get_mainEntityOfPage:ICreativeWork;
Begin
result:=FmainEntityOfPage;
End;
procedure TThing.Set_mainEntityOfPage(v:ICreativeWork);
Begin
FmainEntityOfPage:=v;
End;
{*** TAction ***}
function TAction.Get_target:IEntryPoint;
Begin
result:=Ftarget;
End;
procedure TAction.Set_target(v:IEntryPoint);
Begin
Ftarget:=v;
End;
function TAction.Get_actionStatus:IActionStatusType;
Begin
result:=FactionStatus;
End;
procedure TAction.Set_actionStatus(v:IActionStatusType);
Begin
FactionStatus:=v;
End;
function TAction.Get_agent:IOrganization;
Begin
result:=Fagent;
End;
procedure TAction.Set_agent(v:IOrganization);
Begin
Fagent:=v;
End;
function TAction.Get_error:IThing;
Begin
result:=Ferror;
End;
procedure TAction.Set_error(v:IThing);
Begin
Ferror:=v;
End;
{*** TIntangible ***}
function TIntangible.TangIntangible:TangibleValue;
Begin
result:=''
End;
{*** TEntryPoint ***}
function TEntryPoint.Get_application:ISoftwareApplication;
Begin
result:=Fapplication;
End;
procedure TEntryPoint.Set_application(v:ISoftwareApplication);
Begin
Fapplication:=v;
End;
function TEntryPoint.Get_actionPlatform:String;
Begin
result:=FactionPlatform;
End;
procedure TEntryPoint.Set_actionPlatform(v:String);
Begin
FactionPlatform:=v;
End;
function TEntryPoint.Get_httpMethod:String;
Begin
result:=FhttpMethod;
End;
procedure TEntryPoint.Set_httpMethod(v:String);
Begin
FhttpMethod:=v;
End;
function TEntryPoint.Get_encodingType:String;
Begin
result:=FencodingType;
End;
procedure TEntryPoint.Set_encodingType(v:String);
Begin
FencodingType:=v;
End;
function TEntryPoint.Get_urlTemplate:String;
Begin
result:=FurlTemplate;
End;
procedure TEntryPoint.Set_urlTemplate(v:String);
Begin
FurlTemplate:=v;
End;
function TEntryPoint.Get_contentType:String;
Begin
result:=FcontentType;
End;
procedure TEntryPoint.Set_contentType(v:String);
Begin
FcontentType:=v;
End;
{*** TCreativeWork ***}
function TCreativeWork.Get_commentCount:Integer;
Begin
result:=FcommentCount;
End;
procedure TCreativeWork.Set_commentCount(v:Integer);
Begin
FcommentCount:=v;
End;
function TCreativeWork.Get_reviews:IReview;
Begin
result:=Freviews;
End;
procedure TCreativeWork.Set_reviews(v:IReview);
Begin
Freviews:=v;
End;
function TCreativeWork.Get_headline:String;
Begin
result:=Fheadline;
End;
procedure TCreativeWork.Set_headline(v:String);
Begin
Fheadline:=v;
End;
function TCreativeWork.Get_editor:IPerson;
Begin
result:=Feditor;
End;
procedure TCreativeWork.Set_editor(v:IPerson);
Begin
Feditor:=v;
End;
function TCreativeWork.Get_associatedMedia:IMediaObject;
Begin
result:=FassociatedMedia;
End;
procedure TCreativeWork.Set_associatedMedia(v:IMediaObject);
Begin
FassociatedMedia:=v;
End;
function TCreativeWork.Get_thumbnailUrl:String;
Begin
result:=FthumbnailUrl;
End;
procedure TCreativeWork.Set_thumbnailUrl(v:String);
Begin
FthumbnailUrl:=v;
End;
function TCreativeWork.Get_mentions:IThing;
Begin
result:=Fmentions;
End;
procedure TCreativeWork.Set_mentions(v:IThing);
Begin
Fmentions:=v;
End;
function TCreativeWork.Get_contentRating:String;
Begin
result:=FcontentRating;
End;
procedure TCreativeWork.Set_contentRating(v:String);
Begin
FcontentRating:=v;
End;
function TCreativeWork.Get_accessibilityHazard:String;
Begin
result:=FaccessibilityHazard;
End;
procedure TCreativeWork.Set_accessibilityHazard(v:String);
Begin
FaccessibilityHazard:=v;
End;
function TCreativeWork.Get_accessibilityAPI:String;
Begin
result:=FaccessibilityAPI;
End;
procedure TCreativeWork.Set_accessibilityAPI(v:String);
Begin
FaccessibilityAPI:=v;
End;
function TCreativeWork.Get_locationCreated:IPlace;
Begin
result:=FlocationCreated;
End;
procedure TCreativeWork.Set_locationCreated(v:IPlace);
Begin
FlocationCreated:=v;
End;
function TCreativeWork.Get_alternativeHeadline:String;
Begin
result:=FalternativeHeadline;
End;
procedure TCreativeWork.Set_alternativeHeadline(v:String);
Begin
FalternativeHeadline:=v;
End;
function TCreativeWork.Get_awards:String;
Begin
result:=Fawards;
End;
procedure TCreativeWork.Set_awards(v:String);
Begin
Fawards:=v;
End;
function TCreativeWork.Get_encodings:IMediaObject;
Begin
result:=Fencodings;
End;
procedure TCreativeWork.Set_encodings(v:IMediaObject);
Begin
Fencodings:=v;
End;
function TCreativeWork.Get_producer:IPerson;
Begin
result:=Fproducer;
End;
procedure TCreativeWork.Set_producer(v:IPerson);
Begin
Fproducer:=v;
End;
function TCreativeWork.Get_accessibilityFeature:String;
Begin
result:=FaccessibilityFeature;
End;
procedure TCreativeWork.Set_accessibilityFeature(v:String);
Begin
FaccessibilityFeature:=v;
End;
function TCreativeWork.Get_video:IVideoObject;
Begin
result:=Fvideo;
End;
procedure TCreativeWork.Set_video(v:IVideoObject);
Begin
Fvideo:=v;
End;
function TCreativeWork.Get_releasedEvent:IPublicationEvent;
Begin
result:=FreleasedEvent;
End;
procedure TCreativeWork.Set_releasedEvent(v:IPublicationEvent);
Begin
FreleasedEvent:=v;
End;
function TCreativeWork.Get_educationalUse:String;
Begin
result:=FeducationalUse;
End;
procedure TCreativeWork.Set_educationalUse(v:String);
Begin
FeducationalUse:=v;
End;
function TCreativeWork.Get_isBasedOnUrl:IProduct;
Begin
result:=FisBasedOnUrl;
End;
procedure TCreativeWork.Set_isBasedOnUrl(v:IProduct);
Begin
FisBasedOnUrl:=v;
End;
function TCreativeWork.Get_copyrightHolder:IOrganization;
Begin
result:=FcopyrightHolder;
End;
procedure TCreativeWork.Set_copyrightHolder(v:IOrganization);
Begin
FcopyrightHolder:=v;
End;
function TCreativeWork.Get_discussionUrl:String;
Begin
result:=FdiscussionUrl;
End;
procedure TCreativeWork.Set_discussionUrl(v:String);
Begin
FdiscussionUrl:=v;
End;
function TCreativeWork.Get_publisherImprint:IOrganization;
Begin
result:=FpublisherImprint;
End;
procedure TCreativeWork.Set_publisherImprint(v:IOrganization);
Begin
FpublisherImprint:=v;
End;
function TCreativeWork.Get_fileFormat:String;
Begin
result:=FfileFormat;
End;
procedure TCreativeWork.Set_fileFormat(v:String);
Begin
FfileFormat:=v;
End;
function TCreativeWork.Get_text:String;
Begin
result:=Ftext;
End;
procedure TCreativeWork.Set_text(v:String);
Begin
Ftext:=v;
End;
function TCreativeWork.Get_publication:IPublicationEvent;
Begin
result:=Fpublication;
End;
procedure TCreativeWork.Set_publication(v:IPublicationEvent);
Begin
Fpublication:=v;
End;
function TCreativeWork.Get_license:String;
Begin
result:=Flicense;
End;
procedure TCreativeWork.Set_license(v:String);
Begin
Flicense:=v;
End;
function TCreativeWork.Get_accessModeSufficient:String;
Begin
result:=FaccessModeSufficient;
End;
procedure TCreativeWork.Set_accessModeSufficient(v:String);
Begin
FaccessModeSufficient:=v;
End;
function TCreativeWork.Get_keywords:String;
Begin
result:=Fkeywords;
End;
procedure TCreativeWork.Set_keywords(v:String);
Begin
Fkeywords:=v;
End;
function TCreativeWork.Get_contentReferenceTime:TDateTime;
Begin
result:=FcontentReferenceTime;
End;
procedure TCreativeWork.Set_contentReferenceTime(v:TDateTime);
Begin
FcontentReferenceTime:=v;
End;
function TCreativeWork.Get_accessibilitySummary:String;
Begin
result:=FaccessibilitySummary;
End;
procedure TCreativeWork.Set_accessibilitySummary(v:String);
Begin
FaccessibilitySummary:=v;
End;
function TCreativeWork.Get_version:INumber;
Begin
result:=Fversion;
End;
procedure TCreativeWork.Set_version(v:INumber);
Begin
Fversion:=v;
End;
function TCreativeWork.Get_datePublished:TDateTime;
Begin
result:=FdatePublished;
End;
procedure TCreativeWork.Set_datePublished(v:TDateTime);
Begin
FdatePublished:=v;
End;
function TCreativeWork.Get_timeRequired:IDuration;
Begin
result:=FtimeRequired;
End;
procedure TCreativeWork.Set_timeRequired(v:IDuration);
Begin
FtimeRequired:=v;
End;
function TCreativeWork.Get_audio:IAudioObject;
Begin
result:=Faudio;
End;
procedure TCreativeWork.Set_audio(v:IAudioObject);
Begin
Faudio:=v;
End;
function TCreativeWork.Get_isFamilyFriendly:Boolean;
Begin
result:=FisFamilyFriendly;
End;
procedure TCreativeWork.Set_isFamilyFriendly(v:Boolean);
Begin
FisFamilyFriendly:=v;
End;
function TCreativeWork.Get_interactivityType:String;
Begin
result:=FinteractivityType;
End;
procedure TCreativeWork.Set_interactivityType(v:String);
Begin
FinteractivityType:=v;
End;
function TCreativeWork.Get_educationalAlignment:IAlignmentObject;
Begin
result:=FeducationalAlignment;
End;
procedure TCreativeWork.Set_educationalAlignment(v:IAlignmentObject);
Begin
FeducationalAlignment:=v;
End;
function TCreativeWork.Get_publishingPrinciples:String;
Begin
result:=FpublishingPrinciples;
End;
procedure TCreativeWork.Set_publishingPrinciples(v:String);
Begin
FpublishingPrinciples:=v;
End;
function TCreativeWork.Get_accessibilityControl:String;
Begin
result:=FaccessibilityControl;
End;
procedure TCreativeWork.Set_accessibilityControl(v:String);
Begin
FaccessibilityControl:=v;
End;
function TCreativeWork.Get_accountablePerson:IPerson;
Begin
result:=FaccountablePerson;
End;
procedure TCreativeWork.Set_accountablePerson(v:IPerson);
Begin
FaccountablePerson:=v;
End;
function TCreativeWork.Get_accessMode:String;
Begin
result:=FaccessMode;
End;
procedure TCreativeWork.Set_accessMode(v:String);
Begin
FaccessMode:=v;
End;
function TCreativeWork.Get_about:IThing;
Begin
result:=Fabout;
End;
procedure TCreativeWork.Set_about(v:IThing);
Begin
Fabout:=v;
End;
function TCreativeWork.Get_sourceOrganization:IOrganization;
Begin
result:=FsourceOrganization;
End;
procedure TCreativeWork.Set_sourceOrganization(v:IOrganization);
Begin
FsourceOrganization:=v;
End;
function TCreativeWork.Get_citation:ICreativeWork;
Begin
result:=Fcitation;
End;
procedure TCreativeWork.Set_citation(v:ICreativeWork);
Begin
Fcitation:=v;
End;
function TCreativeWork.Get_schemaVersion:String;
Begin
result:=FschemaVersion;
End;
procedure TCreativeWork.Set_schemaVersion(v:String);
Begin
FschemaVersion:=v;
End;
function TCreativeWork.Get_copyrightYear:INumber;
Begin
result:=FcopyrightYear;
End;
procedure TCreativeWork.Set_copyrightYear(v:INumber);
Begin
FcopyrightYear:=v;
End;
function TCreativeWork.Get_publisher:IPerson;
Begin
result:=Fpublisher;
End;
procedure TCreativeWork.Set_publisher(v:IPerson);
Begin
Fpublisher:=v;
End;
function TCreativeWork.Get_learningResourceType:String;
Begin
result:=FlearningResourceType;
End;
procedure TCreativeWork.Set_learningResourceType(v:String);
Begin
FlearningResourceType:=v;
End;
function TCreativeWork.Get_character:IPerson;
Begin
result:=Fcharacter;
End;
procedure TCreativeWork.Set_character(v:IPerson);
Begin
Fcharacter:=v;
End;
function TCreativeWork.Get_exampleOfWork:ICreativeWork;
Begin
result:=FexampleOfWork;
End;
procedure TCreativeWork.Set_exampleOfWork(v:ICreativeWork);
Begin
FexampleOfWork:=v;
End;
function TCreativeWork.Get_workTranslation:ICreativeWork;
Begin
result:=FworkTranslation;
End;
procedure TCreativeWork.Set_workTranslation(v:ICreativeWork);
Begin
FworkTranslation:=v;
End;
function TCreativeWork.Get_contentLocation:IPlace;
Begin
result:=FcontentLocation;
End;
procedure TCreativeWork.Set_contentLocation(v:IPlace);
Begin
FcontentLocation:=v;
End;
{*** TReview ***}
function TReview.Get_reviewRating:IRating;
Begin
result:=FreviewRating;
End;
procedure TReview.Set_reviewRating(v:IRating);
Begin
FreviewRating:=v;
End;
function TReview.Get_itemReviewed:IThing;
Begin
result:=FitemReviewed;
End;
procedure TReview.Set_itemReviewed(v:IThing);
Begin
FitemReviewed:=v;
End;
function TReview.Get_reviewBody:String;
Begin
result:=FreviewBody;
End;
procedure TReview.Set_reviewBody(v:String);
Begin
FreviewBody:=v;
End;
{*** TRating ***}
function TRating.Get_author:IPerson;
Begin
result:=Fauthor;
End;
procedure TRating.Set_author(v:IPerson);
Begin
Fauthor:=v;
End;
function TRating.Get_ratingValue:String;
Begin
result:=FratingValue;
End;
procedure TRating.Set_ratingValue(v:String);
Begin
FratingValue:=v;
End;
function TRating.Get_worstRating:String;
Begin
result:=FworstRating;
End;
procedure TRating.Set_worstRating(v:String);
Begin
FworstRating:=v;
End;
function TRating.Get_bestRating:INumber;
Begin
result:=FbestRating;
End;
procedure TRating.Set_bestRating(v:INumber);
Begin
FbestRating:=v;
End;
{*** TPerson ***}
function TPerson.Get_vatID:String;
Begin
result:=FvatID;
End;
procedure TPerson.Set_vatID(v:String);
Begin
FvatID:=v;
End;
function TPerson.Get_naics:String;
Begin
result:=Fnaics;
End;
procedure TPerson.Set_naics(v:String);
Begin
Fnaics:=v;
End;
function TPerson.Get_workLocation:IContactPoint;
Begin
result:=FworkLocation;
End;
procedure TPerson.Set_workLocation(v:IContactPoint);
Begin
FworkLocation:=v;
End;
function TPerson.Get_givenName:String;
Begin
result:=FgivenName;
End;
procedure TPerson.Set_givenName(v:String);
Begin
FgivenName:=v;
End;
function TPerson.Get_birthPlace:IPlace;
Begin
result:=FbirthPlace;
End;
procedure TPerson.Set_birthPlace(v:IPlace);
Begin
FbirthPlace:=v;
End;
function TPerson.Get_deathDate:TDateTime;
Begin
result:=FdeathDate;
End;
procedure TPerson.Set_deathDate(v:TDateTime);
Begin
FdeathDate:=v;
End;
function TPerson.Get_relatedTo:IPerson;
Begin
result:=FrelatedTo;
End;
procedure TPerson.Set_relatedTo(v:IPerson);
Begin
FrelatedTo:=v;
End;
function TPerson.Get_honorificSuffix:String;
Begin
result:=FhonorificSuffix;
End;
procedure TPerson.Set_honorificSuffix(v:String);
Begin
FhonorificSuffix:=v;
End;
function TPerson.Get_isicV4:String;
Begin
result:=FisicV4;
End;
procedure TPerson.Set_isicV4(v:String);
Begin
FisicV4:=v;
End;
function TPerson.Get_deathPlace:IPlace;
Begin
result:=FdeathPlace;
End;
procedure TPerson.Set_deathPlace(v:IPlace);
Begin
FdeathPlace:=v;
End;
function TPerson.Get_colleagues:IPerson;
Begin
result:=Fcolleagues;
End;
procedure TPerson.Set_colleagues(v:IPerson);
Begin
Fcolleagues:=v;
End;
function TPerson.Get_worksFor:IOrganization;
Begin
result:=FworksFor;
End;
procedure TPerson.Set_worksFor(v:IOrganization);
Begin
FworksFor:=v;
End;
function TPerson.Get_additionalName:String;
Begin
result:=FadditionalName;
End;
procedure TPerson.Set_additionalName(v:String);
Begin
FadditionalName:=v;
End;
function TPerson.Get_follows:IPerson;
Begin
result:=Ffollows;
End;
procedure TPerson.Set_follows(v:IPerson);
Begin
Ffollows:=v;
End;
function TPerson.Get_spouse:IPerson;
Begin
result:=Fspouse;
End;
procedure TPerson.Set_spouse(v:IPerson);
Begin
Fspouse:=v;
End;
function TPerson.Get_knows:IPerson;
Begin
result:=Fknows;
End;
procedure TPerson.Set_knows(v:IPerson);
Begin
Fknows:=v;
End;
function TPerson.Get_birthDate:TDateTime;
Begin
result:=FbirthDate;
End;
procedure TPerson.Set_birthDate(v:TDateTime);
Begin
FbirthDate:=v;
End;
function TPerson.Get_gender:String;
Begin
result:=Fgender;
End;
procedure TPerson.Set_gender(v:String);
Begin
Fgender:=v;
End;
function TPerson.Get_siblings:IPerson;
Begin
result:=Fsiblings;
End;
procedure TPerson.Set_siblings(v:IPerson);
Begin
Fsiblings:=v;
End;
function TPerson.Get_children:IPerson;
Begin
result:=Fchildren;
End;
procedure TPerson.Set_children(v:IPerson);
Begin
Fchildren:=v;
End;
function TPerson.Get_funder:IPerson;
Begin
result:=Ffunder;
End;
procedure TPerson.Set_funder(v:IPerson);
Begin
Ffunder:=v;
End;
function TPerson.Get_affiliation:IOrganization;
Begin
result:=Faffiliation;
End;
procedure TPerson.Set_affiliation(v:IOrganization);
Begin
Faffiliation:=v;
End;
function TPerson.Get_honorificPrefix:String;
Begin
result:=FhonorificPrefix;
End;
procedure TPerson.Set_honorificPrefix(v:String);
Begin
FhonorificPrefix:=v;
End;
function TPerson.Get_netWorth:IPriceSpecification;
Begin
result:=FnetWorth;
End;
procedure TPerson.Set_netWorth(v:IPriceSpecification);
Begin
FnetWorth:=v;
End;
function TPerson.Get_familyName:String;
Begin
result:=FfamilyName;
End;
procedure TPerson.Set_familyName(v:String);
Begin
FfamilyName:=v;
End;
function TPerson.Get_parents:IPerson;
Begin
result:=Fparents;
End;
procedure TPerson.Set_parents(v:IPerson);
Begin
Fparents:=v;
End;
function TPerson.Get_homeLocation:IPlace;
Begin
result:=FhomeLocation;
End;
procedure TPerson.Set_homeLocation(v:IPlace);
Begin
FhomeLocation:=v;
End;
function TPerson.Get_nationality:ICountry;
Begin
result:=Fnationality;
End;
procedure TPerson.Set_nationality(v:ICountry);
Begin
Fnationality:=v;
End;
function TPerson.Get_jobTitle:String;
Begin
result:=FjobTitle;
End;
procedure TPerson.Set_jobTitle(v:String);
Begin
FjobTitle:=v;
End;
function TPerson.Get_performerIn:IEvent;
Begin
result:=FperformerIn;
End;
procedure TPerson.Set_performerIn(v:IEvent);
Begin
FperformerIn:=v;
End;
function TPerson.Get_alumniOf:IEducationalOrganization;
Begin
result:=FalumniOf;
End;
procedure TPerson.Set_alumniOf(v:IEducationalOrganization);
Begin
FalumniOf:=v;
End;
{*** TStructuredValue ***}
function TStructuredValue.TangStructuredValue:TangibleValue;
Begin
result:=''
End;
{*** TContactPoint ***}
function TContactPoint.Get_availableLanguage:String;
Begin
result:=FavailableLanguage;
End;
procedure TContactPoint.Set_availableLanguage(v:String);
Begin
FavailableLanguage:=v;
End;
function TContactPoint.Get_contactType:String;
Begin
result:=FcontactType;
End;
procedure TContactPoint.Set_contactType(v:String);
Begin
FcontactType:=v;
End;
function TContactPoint.Get_productSupported:String;
Begin
result:=FproductSupported;
End;
procedure TContactPoint.Set_productSupported(v:String);
Begin
FproductSupported:=v;
End;
function TContactPoint.Get_contactOption:IContactPointOption;
Begin
result:=FcontactOption;
End;
procedure TContactPoint.Set_contactOption(v:IContactPointOption);
Begin
FcontactOption:=v;
End;
function TContactPoint.Get_hoursAvailable:IOpeningHoursSpecification;
Begin
result:=FhoursAvailable;
End;
procedure TContactPoint.Set_hoursAvailable(v:IOpeningHoursSpecification);
Begin
FhoursAvailable:=v;
End;
{*** TEnumeration ***}
function TEnumeration.TangEnumeration:TangibleValue;
Begin
result:=''
End;
{*** TContactPointOption ***}
function TContactPointOption.TangContactPointOption:TangibleValue;
Begin
result:=''
End;
{*** TOpeningHoursSpecification ***}
function TOpeningHoursSpecification.Get_opens:TDateTime;
Begin
result:=Fopens;
End;
procedure TOpeningHoursSpecification.Set_opens(v:TDateTime);
Begin
Fopens:=v;
End;
function TOpeningHoursSpecification.Get_dayOfWeek:IDayOfWeek;
Begin
result:=FdayOfWeek;
End;
procedure TOpeningHoursSpecification.Set_dayOfWeek(v:IDayOfWeek);
Begin
FdayOfWeek:=v;
End;
function TOpeningHoursSpecification.Get_closes:TDateTime;
Begin
result:=Fcloses;
End;
procedure TOpeningHoursSpecification.Set_closes(v:TDateTime);
Begin
Fcloses:=v;
End;
{*** TDayOfWeek ***}
function TDayOfWeek.TangDayOfWeek:TangibleValue;
Begin
result:=''
End;
{*** TPlace ***}
function TPlace.Get_map:String;
Begin
result:=Fmap;
End;
procedure TPlace.Set_map(v:String);
Begin
Fmap:=v;
End;
function TPlace.Get_maps:String;
Begin
result:=Fmaps;
End;
procedure TPlace.Set_maps(v:String);
Begin
Fmaps:=v;
End;
function TPlace.Get_openingHoursSpecification:IOpeningHoursSpecification;
Begin
result:=FopeningHoursSpecification;
End;
procedure TPlace.Set_openingHoursSpecification(v:IOpeningHoursSpecification);
Begin
FopeningHoursSpecification:=v;
End;
function TPlace.Get_geo:IGeoShape;
Begin
result:=Fgeo;
End;
procedure TPlace.Set_geo(v:IGeoShape);
Begin
Fgeo:=v;
End;
function TPlace.Get_faxNumber:String;
Begin
result:=FfaxNumber;
End;
procedure TPlace.Set_faxNumber(v:String);
Begin
FfaxNumber:=v;
End;
function TPlace.Get_specialOpeningHoursSpecification:IOpeningHoursSpecification;
Begin
result:=FspecialOpeningHoursSpecification;
End;
procedure TPlace.Set_specialOpeningHoursSpecification(v:IOpeningHoursSpecification);
Begin
FspecialOpeningHoursSpecification:=v;
End;
function TPlace.Get_telephone:String;
Begin
result:=Ftelephone;
End;
procedure TPlace.Set_telephone(v:String);
Begin
Ftelephone:=v;
End;
function TPlace.Get_branchCode:String;
Begin
result:=FbranchCode;
End;
procedure TPlace.Set_branchCode(v:String);
Begin
FbranchCode:=v;
End;
function TPlace.Get_maximumAttendeeCapacity:Integer;
Begin
result:=FmaximumAttendeeCapacity;
End;
procedure TPlace.Set_maximumAttendeeCapacity(v:Integer);
Begin
FmaximumAttendeeCapacity:=v;
End;
function TPlace.Get_photos:IImageObject;
Begin
result:=Fphotos;
End;
procedure TPlace.Set_photos(v:IImageObject);
Begin
Fphotos:=v;
End;
function TPlace.Get_smokingAllowed:Boolean;
Begin
result:=FsmokingAllowed;
End;
procedure TPlace.Set_smokingAllowed(v:Boolean);
Begin
FsmokingAllowed:=v;
End;
function TPlace.Get_containedIn:IPlace;
Begin
result:=FcontainedIn;
End;
procedure TPlace.Set_containedIn(v:IPlace);
Begin
FcontainedIn:=v;
End;
function TPlace.Get_containsPlace:IPlace;
Begin
result:=FcontainsPlace;
End;
procedure TPlace.Set_containsPlace(v:IPlace);
Begin
FcontainsPlace:=v;
End;
{*** TGeoShape ***}
function TGeoShape.Get_addressCountry:ICountry;
Begin
result:=FaddressCountry;
End;
procedure TGeoShape.Set_addressCountry(v:ICountry);
Begin
FaddressCountry:=v;
End;
function TGeoShape.Get_polygon:String;
Begin
result:=Fpolygon;
End;
procedure TGeoShape.Set_polygon(v:String);
Begin
Fpolygon:=v;
End;
function TGeoShape.Get_address:IPostalAddress;
Begin
result:=Faddress;
End;
procedure TGeoShape.Set_address(v:IPostalAddress);
Begin
Faddress:=v;
End;
function TGeoShape.Get_line:String;
Begin
result:=Fline;
End;
procedure TGeoShape.Set_line(v:String);
Begin
Fline:=v;
End;
function TGeoShape.Get_circle:String;
Begin
result:=Fcircle;
End;
procedure TGeoShape.Set_circle(v:String);
Begin
Fcircle:=v;
End;
function TGeoShape.Get_elevation:INumber;
Begin
result:=Felevation;
End;
procedure TGeoShape.Set_elevation(v:INumber);
Begin
Felevation:=v;
End;
function TGeoShape.Get_box:String;
Begin
result:=Fbox;
End;
procedure TGeoShape.Set_box(v:String);
Begin
Fbox:=v;
End;
{*** TPostalAddress ***}
function TPostalAddress.Get_addressRegion:String;
Begin
result:=FaddressRegion;
End;
procedure TPostalAddress.Set_addressRegion(v:String);
Begin
FaddressRegion:=v;
End;
function TPostalAddress.Get_streetAddress:String;
Begin
result:=FstreetAddress;
End;
procedure TPostalAddress.Set_streetAddress(v:String);
Begin
FstreetAddress:=v;
End;
function TPostalAddress.Get_postOfficeBoxNumber:String;
Begin
result:=FpostOfficeBoxNumber;
End;
procedure TPostalAddress.Set_postOfficeBoxNumber(v:String);
Begin
FpostOfficeBoxNumber:=v;
End;
function TPostalAddress.Get_addressLocality:String;
Begin
result:=FaddressLocality;
End;
procedure TPostalAddress.Set_addressLocality(v:String);
Begin
FaddressLocality:=v;
End;
{*** TMediaObject ***}
function TMediaObject.Get_encodingFormat:String;
Begin
result:=FencodingFormat;
End;
procedure TMediaObject.Set_encodingFormat(v:String);
Begin
FencodingFormat:=v;
End;
function TMediaObject.Get_bitrate:String;
Begin
result:=Fbitrate;
End;
procedure TMediaObject.Set_bitrate(v:String);
Begin
Fbitrate:=v;
End;
function TMediaObject.Get_regionsAllowed:IPlace;
Begin
result:=FregionsAllowed;
End;
procedure TMediaObject.Set_regionsAllowed(v:IPlace);
Begin
FregionsAllowed:=v;
End;
function TMediaObject.Get_expires:TDateTime;
Begin
result:=Fexpires;
End;
procedure TMediaObject.Set_expires(v:TDateTime);
Begin
Fexpires:=v;
End;
function TMediaObject.Get_requiresSubscription:Boolean;
Begin
result:=FrequiresSubscription;
End;
procedure TMediaObject.Set_requiresSubscription(v:Boolean);
Begin
FrequiresSubscription:=v;
End;
function TMediaObject.Get_uploadDate:TDateTime;
Begin
result:=FuploadDate;
End;
procedure TMediaObject.Set_uploadDate(v:TDateTime);
Begin
FuploadDate:=v;
End;
function TMediaObject.Get_associatedArticle:INewsArticle;
Begin
result:=FassociatedArticle;
End;
procedure TMediaObject.Set_associatedArticle(v:INewsArticle);
Begin
FassociatedArticle:=v;
End;
function TMediaObject.Get_encodesCreativeWork:ICreativeWork;
Begin
result:=FencodesCreativeWork;
End;
procedure TMediaObject.Set_encodesCreativeWork(v:ICreativeWork);
Begin
FencodesCreativeWork:=v;
End;
function TMediaObject.Get_contentUrl:String;
Begin
result:=FcontentUrl;
End;
procedure TMediaObject.Set_contentUrl(v:String);
Begin
FcontentUrl:=v;
End;
function TMediaObject.Get_embedUrl:String;
Begin
result:=FembedUrl;
End;
procedure TMediaObject.Set_embedUrl(v:String);
Begin
FembedUrl:=v;
End;
function TMediaObject.Get_playerType:String;
Begin
result:=FplayerType;
End;
procedure TMediaObject.Set_playerType(v:String);
Begin
FplayerType:=v;
End;
function TMediaObject.Get_contentSize:String;
Begin
result:=FcontentSize;
End;
procedure TMediaObject.Set_contentSize(v:String);
Begin
FcontentSize:=v;
End;
{*** TArticle ***}
function TArticle.Get_wordCount:Integer;
Begin
result:=FwordCount;
End;
procedure TArticle.Set_wordCount(v:Integer);
Begin
FwordCount:=v;
End;
function TArticle.Get_pageEnd:String;
Begin
result:=FpageEnd;
End;
procedure TArticle.Set_pageEnd(v:String);
Begin
FpageEnd:=v;
End;
function TArticle.Get_articleSection:String;
Begin
result:=FarticleSection;
End;
procedure TArticle.Set_articleSection(v:String);
Begin
FarticleSection:=v;
End;
function TArticle.Get_articleBody:String;
Begin
result:=FarticleBody;
End;
procedure TArticle.Set_articleBody(v:String);
Begin
FarticleBody:=v;
End;
{*** TNewsArticle ***}
function TNewsArticle.Get_printEdition:String;
Begin
result:=FprintEdition;
End;
procedure TNewsArticle.Set_printEdition(v:String);
Begin
FprintEdition:=v;
End;
function TNewsArticle.Get_printColumn:String;
Begin
result:=FprintColumn;
End;
procedure TNewsArticle.Set_printColumn(v:String);
Begin
FprintColumn:=v;
End;
function TNewsArticle.Get_printPage:String;
Begin
result:=FprintPage;
End;
procedure TNewsArticle.Set_printPage(v:String);
Begin
FprintPage:=v;
End;
function TNewsArticle.Get_printSection:String;
Begin
result:=FprintSection;
End;
procedure TNewsArticle.Set_printSection(v:String);
Begin
FprintSection:=v;
End;
function TNewsArticle.Get_dateline:String;
Begin
result:=Fdateline;
End;
procedure TNewsArticle.Set_dateline(v:String);
Begin
Fdateline:=v;
End;
{*** TImageObject ***}
function TImageObject.Get_caption:String;
Begin
result:=Fcaption;
End;
procedure TImageObject.Set_caption(v:String);
Begin
Fcaption:=v;
End;
function TImageObject.Get_exifData:String;
Begin
result:=FexifData;
End;
procedure TImageObject.Set_exifData(v:String);
Begin
FexifData:=v;
End;
function TImageObject.Get_representativeOfPage:Boolean;
Begin
result:=FrepresentativeOfPage;
End;
procedure TImageObject.Set_representativeOfPage(v:Boolean);
Begin
FrepresentativeOfPage:=v;
End;
{*** TOrganization ***}
function TOrganization.Get_email:String;
Begin
result:=Femail;
End;
procedure TOrganization.Set_email(v:String);
Begin
Femail:=v;
End;
function TOrganization.Get_hasOfferCatalog:IOfferCatalog;
Begin
result:=FhasOfferCatalog;
End;
procedure TOrganization.Set_hasOfferCatalog(v:IOfferCatalog);
Begin
FhasOfferCatalog:=v;
End;
function TOrganization.Get_leiCode:String;
Begin
result:=FleiCode;
End;
procedure TOrganization.Set_leiCode(v:String);
Begin
FleiCode:=v;
End;
function TOrganization.Get_owns:IProduct;
Begin
result:=Fowns;
End;
procedure TOrganization.Set_owns(v:IProduct);
Begin
Fowns:=v;
End;
function TOrganization.Get_founders:IPerson;
Begin
result:=Ffounders;
End;
procedure TOrganization.Set_founders(v:IPerson);
Begin
Ffounders:=v;
End;
function TOrganization.Get_members:IOrganization;
Begin
result:=Fmembers;
End;
procedure TOrganization.Set_members(v:IOrganization);
Begin
Fmembers:=v;
End;
function TOrganization.Get_hasPOS:IPlace;
Begin
result:=FhasPOS;
End;
procedure TOrganization.Set_hasPOS(v:IPlace);
Begin
FhasPOS:=v;
End;
function TOrganization.Get_dissolutionDate:TDateTime;
Begin
result:=FdissolutionDate;
End;
procedure TOrganization.Set_dissolutionDate(v:TDateTime);
Begin
FdissolutionDate:=v;
End;
function TOrganization.Get_logo:IImageObject;
Begin
result:=Flogo;
End;
procedure TOrganization.Set_logo(v:IImageObject);
Begin
Flogo:=v;
End;
function TOrganization.Get_taxID:String;
Begin
result:=FtaxID;
End;
procedure TOrganization.Set_taxID(v:String);
Begin
FtaxID:=v;
End;
function TOrganization.Get_brand:IOrganization;
Begin
result:=Fbrand;
End;
procedure TOrganization.Set_brand(v:IOrganization);
Begin
Fbrand:=v;
End;
function TOrganization.Get_globalLocationNumber:String;
Begin
result:=FglobalLocationNumber;
End;
procedure TOrganization.Set_globalLocationNumber(v:String);
Begin
FglobalLocationNumber:=v;
End;
function TOrganization.Get_duns:String;
Begin
result:=Fduns;
End;
procedure TOrganization.Set_duns(v:String);
Begin
Fduns:=v;
End;
function TOrganization.Get_foundingDate:TDateTime;
Begin
result:=FfoundingDate;
End;
procedure TOrganization.Set_foundingDate(v:TDateTime);
Begin
FfoundingDate:=v;
End;
function TOrganization.Get_events:IEvent;
Begin
result:=Fevents;
End;
procedure TOrganization.Set_events(v:IEvent);
Begin
Fevents:=v;
End;
function TOrganization.Get_employees:IPerson;
Begin
result:=Femployees;
End;
procedure TOrganization.Set_employees(v:IPerson);
Begin
Femployees:=v;
End;
function TOrganization.Get_legalName:String;
Begin
result:=FlegalName;
End;
procedure TOrganization.Set_legalName(v:String);
Begin
FlegalName:=v;
End;
function TOrganization.Get_department:IOrganization;
Begin
result:=Fdepartment;
End;
procedure TOrganization.Set_department(v:IOrganization);
Begin
Fdepartment:=v;
End;
function TOrganization.Get_seeks:IDemand;
Begin
result:=Fseeks;
End;
procedure TOrganization.Set_seeks(v:IDemand);
Begin
Fseeks:=v;
End;
function TOrganization.Get_contactPoints:IContactPoint;
Begin
result:=FcontactPoints;
End;
procedure TOrganization.Set_contactPoints(v:IContactPoint);
Begin
FcontactPoints:=v;
End;
function TOrganization.Get_foundingLocation:IPlace;
Begin
result:=FfoundingLocation;
End;
procedure TOrganization.Set_foundingLocation(v:IPlace);
Begin
FfoundingLocation:=v;
End;
function TOrganization.Get_subOrganization:IOrganization;
Begin
result:=FsubOrganization;
End;
procedure TOrganization.Set_subOrganization(v:IOrganization);
Begin
FsubOrganization:=v;
End;
function TOrganization.Get_makesOffer:IOffer;
Begin
result:=FmakesOffer;
End;
procedure TOrganization.Set_makesOffer(v:IOffer);
Begin
FmakesOffer:=v;
End;
{*** TItemList ***}
function TItemList.Get_numberOfItems:Integer;
Begin
result:=FnumberOfItems;
End;
procedure TItemList.Set_numberOfItems(v:Integer);
Begin
FnumberOfItems:=v;
End;
function TItemList.Get_itemListOrder:String;
Begin
result:=FitemListOrder;
End;
procedure TItemList.Set_itemListOrder(v:String);
Begin
FitemListOrder:=v;
End;
function TItemList.Get_itemListElement:IThing;
Begin
result:=FitemListElement;
End;
procedure TItemList.Set_itemListElement(v:IThing);
Begin
FitemListElement:=v;
End;
{*** TOfferCatalog ***}
function TOfferCatalog.TangOfferCatalog:TangibleValue;
Begin
result:=''
End;
{*** TProduct ***}
function TProduct.Get_color:String;
Begin
result:=Fcolor;
End;
procedure TProduct.Set_color(v:String);
Begin
Fcolor:=v;
End;
function TProduct.Get_releaseDate:TDateTime;
Begin
result:=FreleaseDate;
End;
procedure TProduct.Set_releaseDate(v:TDateTime);
Begin
FreleaseDate:=v;
End;
function TProduct.Get_model:IProductModel;
Begin
result:=Fmodel;
End;
procedure TProduct.Set_model(v:IProductModel);
Begin
Fmodel:=v;
End;
function TProduct.Get_category:IThing;
Begin
result:=Fcategory;
End;
procedure TProduct.Set_category(v:IThing);
Begin
Fcategory:=v;
End;
function TProduct.Get_isAccessoryOrSparePartFor:IProduct;
Begin
result:=FisAccessoryOrSparePartFor;
End;
procedure TProduct.Set_isAccessoryOrSparePartFor(v:IProduct);
Begin
FisAccessoryOrSparePartFor:=v;
End;
function TProduct.Get_gtin8:String;
Begin
result:=Fgtin8;
End;
procedure TProduct.Set_gtin8(v:String);
Begin
Fgtin8:=v;
End;
function TProduct.Get_isSimilarTo:IService;
Begin
result:=FisSimilarTo;
End;
procedure TProduct.Set_isSimilarTo(v:IService);
Begin
FisSimilarTo:=v;
End;
function TProduct.Get_weight:IQuantitativeValue;
Begin
result:=Fweight;
End;
procedure TProduct.Set_weight(v:IQuantitativeValue);
Begin
Fweight:=v;
End;
function TProduct.Get_isConsumableFor:IProduct;
Begin
result:=FisConsumableFor;
End;
procedure TProduct.Set_isConsumableFor(v:IProduct);
Begin
FisConsumableFor:=v;
End;
function TProduct.Get_gtin12:String;
Begin
result:=Fgtin12;
End;
procedure TProduct.Set_gtin12(v:String);
Begin
Fgtin12:=v;
End;
function TProduct.Get_productID:String;
Begin
result:=FproductID;
End;
procedure TProduct.Set_productID(v:String);
Begin
FproductID:=v;
End;
{*** TProductModel ***}
function TProductModel.Get_predecessorOf:IProductModel;
Begin
result:=FpredecessorOf;
End;
procedure TProductModel.Set_predecessorOf(v:IProductModel);
Begin
FpredecessorOf:=v;
End;
function TProductModel.Get_isVariantOf:IProductModel;
Begin
result:=FisVariantOf;
End;
procedure TProductModel.Set_isVariantOf(v:IProductModel);
Begin
FisVariantOf:=v;
End;
function TProductModel.Get_successorOf:IProductModel;
Begin
result:=FsuccessorOf;
End;
procedure TProductModel.Set_successorOf(v:IProductModel);
Begin
FsuccessorOf:=v;
End;
{*** TService ***}
function TService.Get_isRelatedTo:IService;
Begin
result:=FisRelatedTo;
End;
procedure TService.Set_isRelatedTo(v:IService);
Begin
FisRelatedTo:=v;
End;
function TService.Get_produces:IThing;
Begin
result:=Fproduces;
End;
procedure TService.Set_produces(v:IThing);
Begin
Fproduces:=v;
End;
function TService.Get_serviceAudience:IAudience;
Begin
result:=FserviceAudience;
End;
procedure TService.Set_serviceAudience(v:IAudience);
Begin
FserviceAudience:=v;
End;
function TService.Get_providerMobility:String;
Begin
result:=FproviderMobility;
End;
procedure TService.Set_providerMobility(v:String);
Begin
FproviderMobility:=v;
End;
function TService.Get_availableChannel:IServiceChannel;
Begin
result:=FavailableChannel;
End;
procedure TService.Set_availableChannel(v:IServiceChannel);
Begin
FavailableChannel:=v;
End;
function TService.Get_serviceType:String;
Begin
result:=FserviceType;
End;
procedure TService.Set_serviceType(v:String);
Begin
FserviceType:=v;
End;
{*** TAudience ***}
function TAudience.Get_audienceType:String;
Begin
result:=FaudienceType;
End;
procedure TAudience.Set_audienceType(v:String);
Begin
FaudienceType:=v;
End;
function TAudience.Get_geographicArea:IAdministrativeArea;
Begin
result:=FgeographicArea;
End;
procedure TAudience.Set_geographicArea(v:IAdministrativeArea);
Begin
FgeographicArea:=v;
End;
{*** TServiceChannel ***}
function TServiceChannel.Get_servicePhone:IContactPoint;
Begin
result:=FservicePhone;
End;
procedure TServiceChannel.Set_servicePhone(v:IContactPoint);
Begin
FservicePhone:=v;
End;
function TServiceChannel.Get_serviceLocation:IPlace;
Begin
result:=FserviceLocation;
End;
procedure TServiceChannel.Set_serviceLocation(v:IPlace);
Begin
FserviceLocation:=v;
End;
function TServiceChannel.Get_serviceSmsNumber:IContactPoint;
Begin
result:=FserviceSmsNumber;
End;
procedure TServiceChannel.Set_serviceSmsNumber(v:IContactPoint);
Begin
FserviceSmsNumber:=v;
End;
function TServiceChannel.Get_serviceUrl:String;
Begin
result:=FserviceUrl;
End;
procedure TServiceChannel.Set_serviceUrl(v:String);
Begin
FserviceUrl:=v;
End;
function TServiceChannel.Get_servicePostalAddress:IPostalAddress;
Begin
result:=FservicePostalAddress;
End;
procedure TServiceChannel.Set_servicePostalAddress(v:IPostalAddress);
Begin
FservicePostalAddress:=v;
End;
function TServiceChannel.Get_providesService:IService;
Begin
result:=FprovidesService;
End;
procedure TServiceChannel.Set_providesService(v:IService);
Begin
FprovidesService:=v;
End;
function TServiceChannel.Get_processingTime:IDuration;
Begin
result:=FprocessingTime;
End;
procedure TServiceChannel.Set_processingTime(v:IDuration);
Begin
FprocessingTime:=v;
End;
{*** TQuantity ***}
function TQuantity.TangQuantity:TangibleValue;
Begin
result:=''
End;
{*** TDuration ***}
function TDuration.TangDuration:TangibleValue;
Begin
result:=''
End;
{*** TQuantitativeValue ***}
function TQuantitativeValue.Get_maxValue:INumber;
Begin
result:=FmaxValue;
End;
procedure TQuantitativeValue.Set_maxValue(v:INumber);
Begin
FmaxValue:=v;
End;
function TQuantitativeValue.Get_valueReference:IQuantitativeValue;
Begin
result:=FvalueReference;
End;
procedure TQuantitativeValue.Set_valueReference(v:IQuantitativeValue);
Begin
FvalueReference:=v;
End;
function TQuantitativeValue.Get_unitText:String;
Begin
result:=FunitText;
End;
procedure TQuantitativeValue.Set_unitText(v:String);
Begin
FunitText:=v;
End;
{*** TEvent ***}
function TEvent.Get_eventStatus:IEventStatusType;
Begin
result:=FeventStatus;
End;
procedure TEvent.Set_eventStatus(v:IEventStatusType);
Begin
FeventStatus:=v;
End;
function TEvent.Get_attendees:IOrganization;
Begin
result:=Fattendees;
End;
procedure TEvent.Set_attendees(v:IOrganization);
Begin
Fattendees:=v;
End;
function TEvent.Get_composer:IOrganization;
Begin
result:=Fcomposer;
End;
procedure TEvent.Set_composer(v:IOrganization);
Begin
Fcomposer:=v;
End;
function TEvent.Get_startDate:TDateTime;
Begin
result:=FstartDate;
End;
procedure TEvent.Set_startDate(v:TDateTime);
Begin
FstartDate:=v;
End;
function TEvent.Get_previousStartDate:TDateTime;
Begin
result:=FpreviousStartDate;
End;
procedure TEvent.Set_previousStartDate(v:TDateTime);
Begin
FpreviousStartDate:=v;
End;
function TEvent.Get_performers:IPerson;
Begin
result:=Fperformers;
End;
procedure TEvent.Set_performers(v:IPerson);
Begin
Fperformers:=v;
End;
function TEvent.Get_subEvents:IEvent;
Begin
result:=FsubEvents;
End;
procedure TEvent.Set_subEvents(v:IEvent);
Begin
FsubEvents:=v;
End;
function TEvent.Get_contributor:IOrganization;
Begin
result:=Fcontributor;
End;
procedure TEvent.Set_contributor(v:IOrganization);
Begin
Fcontributor:=v;
End;
function TEvent.Get_organizer:IOrganization;
Begin
result:=Forganizer;
End;
procedure TEvent.Set_organizer(v:IOrganization);
Begin
Forganizer:=v;
End;
function TEvent.Get_typicalAgeRange:String;
Begin
result:=FtypicalAgeRange;
End;
procedure TEvent.Set_typicalAgeRange(v:String);
Begin
FtypicalAgeRange:=v;
End;
function TEvent.Get_offers:IOffer;
Begin
result:=Foffers;
End;
procedure TEvent.Set_offers(v:IOffer);
Begin
Foffers:=v;
End;
function TEvent.Get_remainingAttendeeCapacity:Integer;
Begin
result:=FremainingAttendeeCapacity;
End;
procedure TEvent.Set_remainingAttendeeCapacity(v:Integer);
Begin
FremainingAttendeeCapacity:=v;
End;
function TEvent.Get_workPerformed:ICreativeWork;
Begin
result:=FworkPerformed;
End;
procedure TEvent.Set_workPerformed(v:ICreativeWork);
Begin
FworkPerformed:=v;
End;
function TEvent.Get_doorTime:TDateTime;
Begin
result:=FdoorTime;
End;
procedure TEvent.Set_doorTime(v:TDateTime);
Begin
FdoorTime:=v;
End;
function TEvent.Get_superEvent:IEvent;
Begin
result:=FsuperEvent;
End;
procedure TEvent.Set_superEvent(v:IEvent);
Begin
FsuperEvent:=v;
End;
function TEvent.Get_recordedIn:ICreativeWork;
Begin
result:=FrecordedIn;
End;
procedure TEvent.Set_recordedIn(v:ICreativeWork);
Begin
FrecordedIn:=v;
End;
{*** TEventStatusType ***}
function TEventStatusType.TangEventStatusType:TangibleValue;
Begin
result:=''
End;
{*** TOffer ***}
function TOffer.Get_aggregateRating:IAggregateRating;
Begin
result:=FaggregateRating;
End;
procedure TOffer.Set_aggregateRating(v:IAggregateRating);
Begin
FaggregateRating:=v;
End;
function TOffer.Get_availabilityStarts:TDateTime;
Begin
result:=FavailabilityStarts;
End;
procedure TOffer.Set_availabilityStarts(v:TDateTime);
Begin
FavailabilityStarts:=v;
End;
function TOffer.Get_sku:String;
Begin
result:=Fsku;
End;
procedure TOffer.Set_sku(v:String);
Begin
Fsku:=v;
End;
function TOffer.Get_itemOffered:IProduct;
Begin
result:=FitemOffered;
End;
procedure TOffer.Set_itemOffered(v:IProduct);
Begin
FitemOffered:=v;
End;
function TOffer.Get_availableAtOrFrom:IPlace;
Begin
result:=FavailableAtOrFrom;
End;
procedure TOffer.Set_availableAtOrFrom(v:IPlace);
Begin
FavailableAtOrFrom:=v;
End;
function TOffer.Get_addOn:IOffer;
Begin
result:=FaddOn;
End;
procedure TOffer.Set_addOn(v:IOffer);
Begin
FaddOn:=v;
End;
function TOffer.Get_eligibleQuantity:IQuantitativeValue;
Begin
result:=FeligibleQuantity;
End;
procedure TOffer.Set_eligibleQuantity(v:IQuantitativeValue);
Begin
FeligibleQuantity:=v;
End;
function TOffer.Get_availableDeliveryMethod:IDeliveryMethod;
Begin
result:=FavailableDeliveryMethod;
End;
procedure TOffer.Set_availableDeliveryMethod(v:IDeliveryMethod);
Begin
FavailableDeliveryMethod:=v;
End;
function TOffer.Get_deliveryLeadTime:IQuantitativeValue;
Begin
result:=FdeliveryLeadTime;
End;
procedure TOffer.Set_deliveryLeadTime(v:IQuantitativeValue);
Begin
FdeliveryLeadTime:=v;
End;
function TOffer.Get_acceptedPaymentMethod:IPaymentMethod;
Begin
result:=FacceptedPaymentMethod;
End;
procedure TOffer.Set_acceptedPaymentMethod(v:IPaymentMethod);
Begin
FacceptedPaymentMethod:=v;
End;
function TOffer.Get_advanceBookingRequirement:IQuantitativeValue;
Begin
result:=FadvanceBookingRequirement;
End;
procedure TOffer.Set_advanceBookingRequirement(v:IQuantitativeValue);
Begin
FadvanceBookingRequirement:=v;
End;
function TOffer.Get_priceValidUntil:TDateTime;
Begin
result:=FpriceValidUntil;
End;
procedure TOffer.Set_priceValidUntil(v:TDateTime);
Begin
FpriceValidUntil:=v;
End;
{*** TAggregateRating ***}
function TAggregateRating.Get_ratingCount:Integer;
Begin
result:=FratingCount;
End;
procedure TAggregateRating.Set_ratingCount(v:Integer);
Begin
FratingCount:=v;
End;
function TAggregateRating.Get_reviewCount:Integer;
Begin
result:=FreviewCount;
End;
procedure TAggregateRating.Set_reviewCount(v:Integer);
Begin
FreviewCount:=v;
End;
{*** TDeliveryMethod ***}
function TDeliveryMethod.TangDeliveryMethod:TangibleValue;
Begin
result:=''
End;
{*** TPaymentMethod ***}
function TPaymentMethod.TangPaymentMethod:TangibleValue;
Begin
result:=''
End;
{*** TDemand ***}
function TDemand.Get_availabilityEnds:TDateTime;
Begin
result:=FavailabilityEnds;
End;
procedure TDemand.Set_availabilityEnds(v:TDateTime);
Begin
FavailabilityEnds:=v;
End;
function TDemand.Get_itemCondition:IOfferItemCondition;
Begin
result:=FitemCondition;
End;
procedure TDemand.Set_itemCondition(v:IOfferItemCondition);
Begin
FitemCondition:=v;
End;
function TDemand.Get_eligibleDuration:IQuantitativeValue;
Begin
result:=FeligibleDuration;
End;
procedure TDemand.Set_eligibleDuration(v:IQuantitativeValue);
Begin
FeligibleDuration:=v;
End;
function TDemand.Get_mpn:String;
Begin
result:=Fmpn;
End;
procedure TDemand.Set_mpn(v:String);
Begin
Fmpn:=v;
End;
function TDemand.Get_gtin13:String;
Begin
result:=Fgtin13;
End;
procedure TDemand.Set_gtin13(v:String);
Begin
Fgtin13:=v;
End;
function TDemand.Get_gtin14:String;
Begin
result:=Fgtin14;
End;
procedure TDemand.Set_gtin14(v:String);
Begin
Fgtin14:=v;
End;
function TDemand.Get_validFrom:TDateTime;
Begin
result:=FvalidFrom;
End;
procedure TDemand.Set_validFrom(v:TDateTime);
Begin
FvalidFrom:=v;
End;
function TDemand.Get_ineligibleRegion:IPlace;
Begin
result:=FineligibleRegion;
End;
procedure TDemand.Set_ineligibleRegion(v:IPlace);
Begin
FineligibleRegion:=v;
End;
function TDemand.Get_availability:IItemAvailability;
Begin
result:=Favailability;
End;
procedure TDemand.Set_availability(v:IItemAvailability);
Begin
Favailability:=v;
End;
function TDemand.Get_eligibleTransactionVolume:IPriceSpecification;
Begin
result:=FeligibleTransactionVolume;
End;
procedure TDemand.Set_eligibleTransactionVolume(v:IPriceSpecification);
Begin
FeligibleTransactionVolume:=v;
End;
function TDemand.Get_includesObject:ITypeAndQuantityNode;
Begin
result:=FincludesObject;
End;
procedure TDemand.Set_includesObject(v:ITypeAndQuantityNode);
Begin
FincludesObject:=v;
End;
function TDemand.Get_eligibleCustomerType:IBusinessEntityType;
Begin
result:=FeligibleCustomerType;
End;
procedure TDemand.Set_eligibleCustomerType(v:IBusinessEntityType);
Begin
FeligibleCustomerType:=v;
End;
function TDemand.Get_inventoryLevel:IQuantitativeValue;
Begin
result:=FinventoryLevel;
End;
procedure TDemand.Set_inventoryLevel(v:IQuantitativeValue);
Begin
FinventoryLevel:=v;
End;
{*** TOfferItemCondition ***}
function TOfferItemCondition.TangOfferItemCondition:TangibleValue;
Begin
result:=''
End;
{*** TItemAvailability ***}
function TItemAvailability.TangItemAvailability:TangibleValue;
Begin
result:=''
End;
{*** TPriceSpecification ***}
function TPriceSpecification.Get_priceCurrency:String;
Begin
result:=FpriceCurrency;
End;
procedure TPriceSpecification.Set_priceCurrency(v:String);
Begin
FpriceCurrency:=v;
End;
function TPriceSpecification.Get_validThrough:TDateTime;
Begin
result:=FvalidThrough;
End;
procedure TPriceSpecification.Set_validThrough(v:TDateTime);
Begin
FvalidThrough:=v;
End;
function TPriceSpecification.Get_valueAddedTaxIncluded:Boolean;
Begin
result:=FvalueAddedTaxIncluded;
End;
procedure TPriceSpecification.Set_valueAddedTaxIncluded(v:Boolean);
Begin
FvalueAddedTaxIncluded:=v;
End;
function TPriceSpecification.Get_minPrice:INumber;
Begin
result:=FminPrice;
End;
procedure TPriceSpecification.Set_minPrice(v:INumber);
Begin
FminPrice:=v;
End;
function TPriceSpecification.Get_maxPrice:INumber;
Begin
result:=FmaxPrice;
End;
procedure TPriceSpecification.Set_maxPrice(v:INumber);
Begin
FmaxPrice:=v;
End;
{*** TTypeAndQuantityNode ***}
function TTypeAndQuantityNode.Get_typeOfGood:IService;
Begin
result:=FtypeOfGood;
End;
procedure TTypeAndQuantityNode.Set_typeOfGood(v:IService);
Begin
FtypeOfGood:=v;
End;
function TTypeAndQuantityNode.Get_unitCode:String;
Begin
result:=FunitCode;
End;
procedure TTypeAndQuantityNode.Set_unitCode(v:String);
Begin
FunitCode:=v;
End;
function TTypeAndQuantityNode.Get_businessFunction:IBusinessFunction;
Begin
result:=FbusinessFunction;
End;
procedure TTypeAndQuantityNode.Set_businessFunction(v:IBusinessFunction);
Begin
FbusinessFunction:=v;
End;
function TTypeAndQuantityNode.Get_amountOfThisGood:INumber;
Begin
result:=FamountOfThisGood;
End;
procedure TTypeAndQuantityNode.Set_amountOfThisGood(v:INumber);
Begin
FamountOfThisGood:=v;
End;
{*** TBusinessFunction ***}
function TBusinessFunction.TangBusinessFunction:TangibleValue;
Begin
result:=''
End;
{*** TBusinessEntityType ***}
function TBusinessEntityType.TangBusinessEntityType:TangibleValue;
Begin
result:=''
End;
{*** TVideoObject ***}
function TVideoObject.Get_thumbnail:IImageObject;
Begin
result:=Fthumbnail;
End;
procedure TVideoObject.Set_thumbnail(v:IImageObject);
Begin
Fthumbnail:=v;
End;
function TVideoObject.Get_videoFrameSize:String;
Begin
result:=FvideoFrameSize;
End;
procedure TVideoObject.Set_videoFrameSize(v:String);
Begin
FvideoFrameSize:=v;
End;
function TVideoObject.Get_videoQuality:String;
Begin
result:=FvideoQuality;
End;
procedure TVideoObject.Set_videoQuality(v:String);
Begin
FvideoQuality:=v;
End;
{*** TPublicationEvent ***}
function TPublicationEvent.Get_free:Boolean;
Begin
result:=Ffree;
End;
procedure TPublicationEvent.Set_free(v:Boolean);
Begin
Ffree:=v;
End;
function TPublicationEvent.Get_publishedOn:IBroadcastService;
Begin
result:=FpublishedOn;
End;
procedure TPublicationEvent.Set_publishedOn(v:IBroadcastService);
Begin
FpublishedOn:=v;
End;
function TPublicationEvent.Get_publishedBy:IOrganization;
Begin
result:=FpublishedBy;
End;
procedure TPublicationEvent.Set_publishedBy(v:IOrganization);
Begin
FpublishedBy:=v;
End;
{*** TBroadcastService ***}
function TBroadcastService.Get_broadcastTimezone:String;
Begin
result:=FbroadcastTimezone;
End;
procedure TBroadcastService.Set_broadcastTimezone(v:String);
Begin
FbroadcastTimezone:=v;
End;
function TBroadcastService.Get_parentService:IBroadcastService;
Begin
result:=FparentService;
End;
procedure TBroadcastService.Set_parentService(v:IBroadcastService);
Begin
FparentService:=v;
End;
function TBroadcastService.Get_broadcastFrequency:String;
Begin
result:=FbroadcastFrequency;
End;
procedure TBroadcastService.Set_broadcastFrequency(v:String);
Begin
FbroadcastFrequency:=v;
End;
function TBroadcastService.Get_broadcastAffiliateOf:IOrganization;
Begin
result:=FbroadcastAffiliateOf;
End;
procedure TBroadcastService.Set_broadcastAffiliateOf(v:IOrganization);
Begin
FbroadcastAffiliateOf:=v;
End;
function TBroadcastService.Get_broadcastDisplayName:String;
Begin
result:=FbroadcastDisplayName;
End;
procedure TBroadcastService.Set_broadcastDisplayName(v:String);
Begin
FbroadcastDisplayName:=v;
End;
function TBroadcastService.Get_area:IPlace;
Begin
result:=Farea;
End;
procedure TBroadcastService.Set_area(v:IPlace);
Begin
Farea:=v;
End;
function TBroadcastService.Get_broadcaster:IOrganization;
Begin
result:=Fbroadcaster;
End;
procedure TBroadcastService.Set_broadcaster(v:IOrganization);
Begin
Fbroadcaster:=v;
End;
{*** TAudioObject ***}
function TAudioObject.Get_transcript:String;
Begin
result:=Ftranscript;
End;
procedure TAudioObject.Set_transcript(v:String);
Begin
Ftranscript:=v;
End;
{*** TAlignmentObject ***}
function TAlignmentObject.Get_targetName:String;
Begin
result:=FtargetName;
End;
procedure TAlignmentObject.Set_targetName(v:String);
Begin
FtargetName:=v;
End;
function TAlignmentObject.Get_targetUrl:String;
Begin
result:=FtargetUrl;
End;
procedure TAlignmentObject.Set_targetUrl(v:String);
Begin
FtargetUrl:=v;
End;
function TAlignmentObject.Get_targetDescription:String;
Begin
result:=FtargetDescription;
End;
procedure TAlignmentObject.Set_targetDescription(v:String);
Begin
FtargetDescription:=v;
End;
function TAlignmentObject.Get_educationalFramework:String;
Begin
result:=FeducationalFramework;
End;
procedure TAlignmentObject.Set_educationalFramework(v:String);
Begin
FeducationalFramework:=v;
End;
function TAlignmentObject.Get_alignmentType:String;
Begin
result:=FalignmentType;
End;
procedure TAlignmentObject.Set_alignmentType(v:String);
Begin
FalignmentType:=v;
End;
{*** TSoftwareApplication ***}
function TSoftwareApplication.Get_storageRequirements:String;
Begin
result:=FstorageRequirements;
End;
procedure TSoftwareApplication.Set_storageRequirements(v:String);
Begin
FstorageRequirements:=v;
End;
function TSoftwareApplication.Get_releaseNotes:String;
Begin
result:=FreleaseNotes;
End;
procedure TSoftwareApplication.Set_releaseNotes(v:String);
Begin
FreleaseNotes:=v;
End;
function TSoftwareApplication.Get_operatingSystem:String;
Begin
result:=FoperatingSystem;
End;
procedure TSoftwareApplication.Set_operatingSystem(v:String);
Begin
FoperatingSystem:=v;
End;
function TSoftwareApplication.Get_countriesSupported:String;
Begin
result:=FcountriesSupported;
End;
procedure TSoftwareApplication.Set_countriesSupported(v:String);
Begin
FcountriesSupported:=v;
End;
function TSoftwareApplication.Get_permissions:String;
Begin
result:=Fpermissions;
End;
procedure TSoftwareApplication.Set_permissions(v:String);
Begin
Fpermissions:=v;
End;
function TSoftwareApplication.Get_screenshot:String;
Begin
result:=Fscreenshot;
End;
procedure TSoftwareApplication.Set_screenshot(v:String);
Begin
Fscreenshot:=v;
End;
function TSoftwareApplication.Get_softwareHelp:ICreativeWork;
Begin
result:=FsoftwareHelp;
End;
procedure TSoftwareApplication.Set_softwareHelp(v:ICreativeWork);
Begin
FsoftwareHelp:=v;
End;
function TSoftwareApplication.Get_softwareVersion:String;
Begin
result:=FsoftwareVersion;
End;
procedure TSoftwareApplication.Set_softwareVersion(v:String);
Begin
FsoftwareVersion:=v;
End;
function TSoftwareApplication.Get_downloadUrl:String;
Begin
result:=FdownloadUrl;
End;
procedure TSoftwareApplication.Set_downloadUrl(v:String);
Begin
FdownloadUrl:=v;
End;
function TSoftwareApplication.Get_device:String;
Begin
result:=Fdevice;
End;
procedure TSoftwareApplication.Set_device(v:String);
Begin
Fdevice:=v;
End;
function TSoftwareApplication.Get_applicationSuite:String;
Begin
result:=FapplicationSuite;
End;
procedure TSoftwareApplication.Set_applicationSuite(v:String);
Begin
FapplicationSuite:=v;
End;
function TSoftwareApplication.Get_featureList:String;
Begin
result:=FfeatureList;
End;
procedure TSoftwareApplication.Set_featureList(v:String);
Begin
FfeatureList:=v;
End;
function TSoftwareApplication.Get_supportingData:IDataFeed;
Begin
result:=FsupportingData;
End;
procedure TSoftwareApplication.Set_supportingData(v:IDataFeed);
Begin
FsupportingData:=v;
End;
function TSoftwareApplication.Get_applicationCategory:String;
Begin
result:=FapplicationCategory;
End;
procedure TSoftwareApplication.Set_applicationCategory(v:String);
Begin
FapplicationCategory:=v;
End;
function TSoftwareApplication.Get_installUrl:String;
Begin
result:=FinstallUrl;
End;
procedure TSoftwareApplication.Set_installUrl(v:String);
Begin
FinstallUrl:=v;
End;
function TSoftwareApplication.Get_processorRequirements:String;
Begin
result:=FprocessorRequirements;
End;
procedure TSoftwareApplication.Set_processorRequirements(v:String);
Begin
FprocessorRequirements:=v;
End;
function TSoftwareApplication.Get_fileSize:String;
Begin
result:=FfileSize;
End;
procedure TSoftwareApplication.Set_fileSize(v:String);
Begin
FfileSize:=v;
End;
function TSoftwareApplication.Get_applicationSubCategory:String;
Begin
result:=FapplicationSubCategory;
End;
procedure TSoftwareApplication.Set_applicationSubCategory(v:String);
Begin
FapplicationSubCategory:=v;
End;
function TSoftwareApplication.Get_countriesNotSupported:String;
Begin
result:=FcountriesNotSupported;
End;
procedure TSoftwareApplication.Set_countriesNotSupported(v:String);
Begin
FcountriesNotSupported:=v;
End;
function TSoftwareApplication.Get_requirements:String;
Begin
result:=Frequirements;
End;
procedure TSoftwareApplication.Set_requirements(v:String);
Begin
Frequirements:=v;
End;
function TSoftwareApplication.Get_memoryRequirements:String;
Begin
result:=FmemoryRequirements;
End;
procedure TSoftwareApplication.Set_memoryRequirements(v:String);
Begin
FmemoryRequirements:=v;
End;
function TSoftwareApplication.Get_softwareAddOn:ISoftwareApplication;
Begin
result:=FsoftwareAddOn;
End;
procedure TSoftwareApplication.Set_softwareAddOn(v:ISoftwareApplication);
Begin
FsoftwareAddOn:=v;
End;
{*** TDataset ***}
function TDataset.Get_temporal:TDateTime;
Begin
result:=Ftemporal;
End;
procedure TDataset.Set_temporal(v:TDateTime);
Begin
Ftemporal:=v;
End;
function TDataset.Get_variablesMeasured:String;
Begin
result:=FvariablesMeasured;
End;
procedure TDataset.Set_variablesMeasured(v:String);
Begin
FvariablesMeasured:=v;
End;
function TDataset.Get_spatial:IPlace;
Begin
result:=Fspatial;
End;
procedure TDataset.Set_spatial(v:IPlace);
Begin
Fspatial:=v;
End;
function TDataset.Get_includedDataCatalog:IDataCatalog;
Begin
result:=FincludedDataCatalog;
End;
procedure TDataset.Set_includedDataCatalog(v:IDataCatalog);
Begin
FincludedDataCatalog:=v;
End;
function TDataset.Get_datasetTimeInterval:TDateTime;
Begin
result:=FdatasetTimeInterval;
End;
procedure TDataset.Set_datasetTimeInterval(v:TDateTime);
Begin
FdatasetTimeInterval:=v;
End;
function TDataset.Get_catalog:IDataCatalog;
Begin
result:=Fcatalog;
End;
procedure TDataset.Set_catalog(v:IDataCatalog);
Begin
Fcatalog:=v;
End;
function TDataset.Get_distribution:IDataDownload;
Begin
result:=Fdistribution;
End;
procedure TDataset.Set_distribution(v:IDataDownload);
Begin
Fdistribution:=v;
End;
{*** TDataCatalog ***}
function TDataCatalog.Get_dataset:IDataset;
Begin
result:=Fdataset;
End;
procedure TDataCatalog.Set_dataset(v:IDataset);
Begin
Fdataset:=v;
End;
{*** TDataFeed ***}
function TDataFeed.Get_dataFeedElement:IThing;
Begin
result:=FdataFeedElement;
End;
procedure TDataFeed.Set_dataFeedElement(v:IThing);
Begin
FdataFeedElement:=v;
End;
{*** TActionStatusType ***}
function TActionStatusType.TangActionStatusType:TangibleValue;
Begin
result:=''
End;
{*** TPeriodical ***}
function TPeriodical.Get_issn:String;
Begin
result:=Fissn;
End;
procedure TPeriodical.Set_issn(v:String);
Begin
Fissn:=v;
End;
{*** TPermit ***}
function TPermit.Get_validFor:IDuration;
Begin
result:=FvalidFor;
End;
procedure TPermit.Set_validFor(v:IDuration);
Begin
FvalidFor:=v;
End;
function TPermit.Get_issuedThrough:IService;
Begin
result:=FissuedThrough;
End;
procedure TPermit.Set_issuedThrough(v:IService);
Begin
FissuedThrough:=v;
End;
function TPermit.Get_validUntil:TDateTime;
Begin
result:=FvalidUntil;
End;
procedure TPermit.Set_validUntil(v:TDateTime);
Begin
FvalidUntil:=v;
End;
function TPermit.Get_validIn:IAdministrativeArea;
Begin
result:=FvalidIn;
End;
procedure TPermit.Set_validIn(v:IAdministrativeArea);
Begin
FvalidIn:=v;
End;
function TPermit.Get_permitAudience:IAudience;
Begin
result:=FpermitAudience;
End;
procedure TPermit.Set_permitAudience(v:IAudience);
Begin
FpermitAudience:=v;
End;
function TPermit.Get_issuedBy:IOrganization;
Begin
result:=FissuedBy;
End;
procedure TPermit.Set_issuedBy(v:IOrganization);
Begin
FissuedBy:=v;
End;
{*** TGovernmentPermit ***}
function TGovernmentPermit.TangGovernmentPermit:TangibleValue;
Begin
result:=''
End;
{*** TUpdateAction ***}
function TUpdateAction.Get_collection:IThing;
Begin
result:=Fcollection;
End;
procedure TUpdateAction.Set_collection(v:IThing);
Begin
Fcollection:=v;
End;
{*** TEpisode ***}
function TEpisode.Get_episodeNumber:String;
Begin
result:=FepisodeNumber;
End;
procedure TEpisode.Set_episodeNumber(v:String);
Begin
FepisodeNumber:=v;
End;
{*** TLocalBusiness ***}
function TLocalBusiness.Get_priceRange:String;
Begin
result:=FpriceRange;
End;
procedure TLocalBusiness.Set_priceRange(v:String);
Begin
FpriceRange:=v;
End;
function TLocalBusiness.Get_branchOf:IOrganization;
Begin
result:=FbranchOf;
End;
procedure TLocalBusiness.Set_branchOf(v:IOrganization);
Begin
FbranchOf:=v;
End;
function TLocalBusiness.Get_openingHours:String;
Begin
result:=FopeningHours;
End;
procedure TLocalBusiness.Set_openingHours(v:String);
Begin
FopeningHours:=v;
End;
function TLocalBusiness.Get_paymentAccepted:String;
Begin
result:=FpaymentAccepted;
End;
procedure TLocalBusiness.Set_paymentAccepted(v:String);
Begin
FpaymentAccepted:=v;
End;
function TLocalBusiness.Get_currenciesAccepted:String;
Begin
result:=FcurrenciesAccepted;
End;
procedure TLocalBusiness.Set_currenciesAccepted(v:String);
Begin
FcurrenciesAccepted:=v;
End;
{*** TFoodEstablishment ***}
function TFoodEstablishment.Get_acceptsReservations:String;
Begin
result:=FacceptsReservations;
End;
procedure TFoodEstablishment.Set_acceptsReservations(v:String);
Begin
FacceptsReservations:=v;
End;
function TFoodEstablishment.Get_servesCuisine:String;
Begin
result:=FservesCuisine;
End;
procedure TFoodEstablishment.Set_servesCuisine(v:String);
Begin
FservesCuisine:=v;
End;
function TFoodEstablishment.Get_menu:String;
Begin
result:=Fmenu;
End;
procedure TFoodEstablishment.Set_menu(v:String);
Begin
Fmenu:=v;
End;
{*** TBroadcastChannel ***}
function TBroadcastChannel.Get_broadcastChannelId:String;
Begin
result:=FbroadcastChannelId;
End;
procedure TBroadcastChannel.Set_broadcastChannelId(v:String);
Begin
FbroadcastChannelId:=v;
End;
function TBroadcastChannel.Get_broadcastServiceTier:String;
Begin
result:=FbroadcastServiceTier;
End;
procedure TBroadcastChannel.Set_broadcastServiceTier(v:String);
Begin
FbroadcastServiceTier:=v;
End;
function TBroadcastChannel.Get_inBroadcastLineup:ICableOrSatelliteService;
Begin
result:=FinBroadcastLineup;
End;
procedure TBroadcastChannel.Set_inBroadcastLineup(v:ICableOrSatelliteService);
Begin
FinBroadcastLineup:=v;
End;
function TBroadcastChannel.Get_providesBroadcastService:IBroadcastService;
Begin
result:=FprovidesBroadcastService;
End;
procedure TBroadcastChannel.Set_providesBroadcastService(v:IBroadcastService);
Begin
FprovidesBroadcastService:=v;
End;
{*** TCableOrSatelliteService ***}
function TCableOrSatelliteService.TangCableOrSatelliteService:TangibleValue;
Begin
result:=''
End;
{*** TRadioChannel ***}
function TRadioChannel.TangRadioChannel:TangibleValue;
Begin
result:=''
End;
{*** TAMRadioChannel ***}
function TAMRadioChannel.TangAMRadioChannel:TangibleValue;
Begin
result:=''
End;
{*** TMedicalEntity ***}
function TMedicalEntity.Get_code:IMedicalCode;
Begin
result:=Fcode;
End;
procedure TMedicalEntity.Set_code(v:IMedicalCode);
Begin
Fcode:=v;
End;
function TMedicalEntity.Get_guideline:IMedicalGuideline;
Begin
result:=Fguideline;
End;
procedure TMedicalEntity.Set_guideline(v:IMedicalGuideline);
Begin
Fguideline:=v;
End;
function TMedicalEntity.Get_medicineSystem:IMedicineSystem;
Begin
result:=FmedicineSystem;
End;
procedure TMedicalEntity.Set_medicineSystem(v:IMedicineSystem);
Begin
FmedicineSystem:=v;
End;
function TMedicalEntity.Get_legalStatus:String;
Begin
result:=FlegalStatus;
End;
procedure TMedicalEntity.Set_legalStatus(v:String);
Begin
FlegalStatus:=v;
End;
function TMedicalEntity.Get_recognizingAuthority:IOrganization;
Begin
result:=FrecognizingAuthority;
End;
procedure TMedicalEntity.Set_recognizingAuthority(v:IOrganization);
Begin
FrecognizingAuthority:=v;
End;
function TMedicalEntity.Get_study:IMedicalStudy;
Begin
result:=Fstudy;
End;
procedure TMedicalEntity.Set_study(v:IMedicalStudy);
Begin
Fstudy:=v;
End;
function TMedicalEntity.Get_relevantSpecialty:IMedicalSpecialty;
Begin
result:=FrelevantSpecialty;
End;
procedure TMedicalEntity.Set_relevantSpecialty(v:IMedicalSpecialty);
Begin
FrelevantSpecialty:=v;
End;
{*** TMedicalCode ***}
function TMedicalCode.Get_codingSystem:String;
Begin
result:=FcodingSystem;
End;
procedure TMedicalCode.Set_codingSystem(v:String);
Begin
FcodingSystem:=v;
End;
function TMedicalCode.Get_codeValue:String;
Begin
result:=FcodeValue;
End;
procedure TMedicalCode.Set_codeValue(v:String);
Begin
FcodeValue:=v;
End;
{*** TMedicalGuideline ***}
function TMedicalGuideline.Get_evidenceOrigin:String;
Begin
result:=FevidenceOrigin;
End;
procedure TMedicalGuideline.Set_evidenceOrigin(v:String);
Begin
FevidenceOrigin:=v;
End;
function TMedicalGuideline.Get_guidelineSubject:IMedicalEntity;
Begin
result:=FguidelineSubject;
End;
procedure TMedicalGuideline.Set_guidelineSubject(v:IMedicalEntity);
Begin
FguidelineSubject:=v;
End;
function TMedicalGuideline.Get_guidelineDate:TDateTime;
Begin
result:=FguidelineDate;
End;
procedure TMedicalGuideline.Set_guidelineDate(v:TDateTime);
Begin
FguidelineDate:=v;
End;
function TMedicalGuideline.Get_evidenceLevel:IMedicalEvidenceLevel;
Begin
result:=FevidenceLevel;
End;
procedure TMedicalGuideline.Set_evidenceLevel(v:IMedicalEvidenceLevel);
Begin
FevidenceLevel:=v;
End;
{*** TMedicalEnumeration ***}
function TMedicalEnumeration.TangMedicalEnumeration:TangibleValue;
Begin
result:=''
End;
{*** TMedicalEvidenceLevel ***}
function TMedicalEvidenceLevel.TangMedicalEvidenceLevel:TangibleValue;
Begin
result:=''
End;
{*** TMedicineSystem ***}
function TMedicineSystem.TangMedicineSystem:TangibleValue;
Begin
result:=''
End;
{*** TMedicalStudy ***}
function TMedicalStudy.Get_healthCondition:IMedicalCondition;
Begin
result:=FhealthCondition;
End;
procedure TMedicalStudy.Set_healthCondition(v:IMedicalCondition);
Begin
FhealthCondition:=v;
End;
function TMedicalStudy.Get_population:String;
Begin
result:=Fpopulation;
End;
procedure TMedicalStudy.Set_population(v:String);
Begin
Fpopulation:=v;
End;
function TMedicalStudy.Get_studySubject:IMedicalEntity;
Begin
result:=FstudySubject;
End;
procedure TMedicalStudy.Set_studySubject(v:IMedicalEntity);
Begin
FstudySubject:=v;
End;
function TMedicalStudy.Get_studyLocation:IAdministrativeArea;
Begin
result:=FstudyLocation;
End;
procedure TMedicalStudy.Set_studyLocation(v:IAdministrativeArea);
Begin
FstudyLocation:=v;
End;
{*** TMedicalCondition ***}
function TMedicalCondition.Get_primaryPrevention:IMedicalTherapy;
Begin
result:=FprimaryPrevention;
End;
procedure TMedicalCondition.Set_primaryPrevention(v:IMedicalTherapy);
Begin
FprimaryPrevention:=v;
End;
function TMedicalCondition.Get_typicalTest:IMedicalTest;
Begin
result:=FtypicalTest;
End;
procedure TMedicalCondition.Set_typicalTest(v:IMedicalTest);
Begin
FtypicalTest:=v;
End;
function TMedicalCondition.Get_cause:IMedicalCause;
Begin
result:=Fcause;
End;
procedure TMedicalCondition.Set_cause(v:IMedicalCause);
Begin
Fcause:=v;
End;
function TMedicalCondition.Get_status:IMedicalStudyStatus;
Begin
result:=Fstatus;
End;
procedure TMedicalCondition.Set_status(v:IMedicalStudyStatus);
Begin
Fstatus:=v;
End;
function TMedicalCondition.Get_subtype:String;
Begin
result:=Fsubtype;
End;
procedure TMedicalCondition.Set_subtype(v:String);
Begin
Fsubtype:=v;
End;
function TMedicalCondition.Get_expectedPrognosis:String;
Begin
result:=FexpectedPrognosis;
End;
procedure TMedicalCondition.Set_expectedPrognosis(v:String);
Begin
FexpectedPrognosis:=v;
End;
function TMedicalCondition.Get_possibleComplication:String;
Begin
result:=FpossibleComplication;
End;
procedure TMedicalCondition.Set_possibleComplication(v:String);
Begin
FpossibleComplication:=v;
End;
function TMedicalCondition.Get_associatedAnatomy:IAnatomicalStructure;
Begin
result:=FassociatedAnatomy;
End;
procedure TMedicalCondition.Set_associatedAnatomy(v:IAnatomicalStructure);
Begin
FassociatedAnatomy:=v;
End;
function TMedicalCondition.Get_pathophysiology:String;
Begin
result:=Fpathophysiology;
End;
procedure TMedicalCondition.Set_pathophysiology(v:String);
Begin
Fpathophysiology:=v;
End;
function TMedicalCondition.Get_riskFactor:IMedicalRiskFactor;
Begin
result:=FriskFactor;
End;
procedure TMedicalCondition.Set_riskFactor(v:IMedicalRiskFactor);
Begin
FriskFactor:=v;
End;
function TMedicalCondition.Get_signOrSymptom:IMedicalSignOrSymptom;
Begin
result:=FsignOrSymptom;
End;
procedure TMedicalCondition.Set_signOrSymptom(v:IMedicalSignOrSymptom);
Begin
FsignOrSymptom:=v;
End;
function TMedicalCondition.Get_differentialDiagnosis:IDDxElement;
Begin
result:=FdifferentialDiagnosis;
End;
procedure TMedicalCondition.Set_differentialDiagnosis(v:IDDxElement);
Begin
FdifferentialDiagnosis:=v;
End;
function TMedicalCondition.Get_stage:IMedicalConditionStage;
Begin
result:=Fstage;
End;
procedure TMedicalCondition.Set_stage(v:IMedicalConditionStage);
Begin
Fstage:=v;
End;
function TMedicalCondition.Get_naturalProgression:String;
Begin
result:=FnaturalProgression;
End;
procedure TMedicalCondition.Set_naturalProgression(v:String);
Begin
FnaturalProgression:=v;
End;
function TMedicalCondition.Get_possibleTreatment:IMedicalTherapy;
Begin
result:=FpossibleTreatment;
End;
procedure TMedicalCondition.Set_possibleTreatment(v:IMedicalTherapy);
Begin
FpossibleTreatment:=v;
End;
function TMedicalCondition.Get_secondaryPrevention:IMedicalTherapy;
Begin
result:=FsecondaryPrevention;
End;
procedure TMedicalCondition.Set_secondaryPrevention(v:IMedicalTherapy);
Begin
FsecondaryPrevention:=v;
End;
{*** TMedicalProcedure ***}
function TMedicalProcedure.Get_followup:String;
Begin
result:=Ffollowup;
End;
procedure TMedicalProcedure.Set_followup(v:String);
Begin
Ffollowup:=v;
End;
function TMedicalProcedure.Get_preparation:IMedicalEntity;
Begin
result:=Fpreparation;
End;
procedure TMedicalProcedure.Set_preparation(v:IMedicalEntity);
Begin
Fpreparation:=v;
End;
function TMedicalProcedure.Get_howPerformed:String;
Begin
result:=FhowPerformed;
End;
procedure TMedicalProcedure.Set_howPerformed(v:String);
Begin
FhowPerformed:=v;
End;
function TMedicalProcedure.Get_indication:IMedicalIndication;
Begin
result:=Findication;
End;
procedure TMedicalProcedure.Set_indication(v:IMedicalIndication);
Begin
Findication:=v;
End;
function TMedicalProcedure.Get_procedureType:IMedicalProcedureType;
Begin
result:=FprocedureType;
End;
procedure TMedicalProcedure.Set_procedureType(v:IMedicalProcedureType);
Begin
FprocedureType:=v;
End;
function TMedicalProcedure.Get_bodyLocation:String;
Begin
result:=FbodyLocation;
End;
procedure TMedicalProcedure.Set_bodyLocation(v:String);
Begin
FbodyLocation:=v;
End;
function TMedicalProcedure.Get_outcome:IMedicalEntity;
Begin
result:=Foutcome;
End;
procedure TMedicalProcedure.Set_outcome(v:IMedicalEntity);
Begin
Foutcome:=v;
End;
{*** TMedicalProcedureType ***}
function TMedicalProcedureType.TangMedicalProcedureType:TangibleValue;
Begin
result:=''
End;
{*** TMedicalTherapy ***}
function TMedicalTherapy.Get_seriousAdverseOutcome:IMedicalEntity;
Begin
result:=FseriousAdverseOutcome;
End;
procedure TMedicalTherapy.Set_seriousAdverseOutcome(v:IMedicalEntity);
Begin
FseriousAdverseOutcome:=v;
End;
function TMedicalTherapy.Get_duplicateTherapy:IMedicalTherapy;
Begin
result:=FduplicateTherapy;
End;
procedure TMedicalTherapy.Set_duplicateTherapy(v:IMedicalTherapy);
Begin
FduplicateTherapy:=v;
End;
{*** TMedicalTest ***}
function TMedicalTest.Get_usesDevice:IMedicalDevice;
Begin
result:=FusesDevice;
End;
procedure TMedicalTest.Set_usesDevice(v:IMedicalDevice);
Begin
FusesDevice:=v;
End;
function TMedicalTest.Get_affectedBy:IDrug;
Begin
result:=FaffectedBy;
End;
procedure TMedicalTest.Set_affectedBy(v:IDrug);
Begin
FaffectedBy:=v;
End;
function TMedicalTest.Get_normalRange:IMedicalEnumeration;
Begin
result:=FnormalRange;
End;
procedure TMedicalTest.Set_normalRange(v:IMedicalEnumeration);
Begin
FnormalRange:=v;
End;
function TMedicalTest.Get_signDetected:IMedicalSign;
Begin
result:=FsignDetected;
End;
procedure TMedicalTest.Set_signDetected(v:IMedicalSign);
Begin
FsignDetected:=v;
End;
function TMedicalTest.Get_usedToDiagnose:IMedicalCondition;
Begin
result:=FusedToDiagnose;
End;
procedure TMedicalTest.Set_usedToDiagnose(v:IMedicalCondition);
Begin
FusedToDiagnose:=v;
End;
{*** TMedicalDevice ***}
function TMedicalDevice.Get_preOp:String;
Begin
result:=FpreOp;
End;
procedure TMedicalDevice.Set_preOp(v:String);
Begin
FpreOp:=v;
End;
function TMedicalDevice.Get_postOp:String;
Begin
result:=FpostOp;
End;
procedure TMedicalDevice.Set_postOp(v:String);
Begin
FpostOp:=v;
End;
function TMedicalDevice.Get_purpose:IThing;
Begin
result:=Fpurpose;
End;
procedure TMedicalDevice.Set_purpose(v:IThing);
Begin
Fpurpose:=v;
End;
function TMedicalDevice.Get_adverseOutcome:IMedicalEntity;
Begin
result:=FadverseOutcome;
End;
procedure TMedicalDevice.Set_adverseOutcome(v:IMedicalEntity);
Begin
FadverseOutcome:=v;
End;
function TMedicalDevice.Get_contraindication:IMedicalContraindication;
Begin
result:=Fcontraindication;
End;
procedure TMedicalDevice.Set_contraindication(v:IMedicalContraindication);
Begin
Fcontraindication:=v;
End;
function TMedicalDevice.Get__procedure:String;
Begin
result:=F_procedure;
End;
procedure TMedicalDevice.Set__procedure(v:String);
Begin
F_procedure:=v;
End;
{*** TSubstance ***}
function TSubstance.Get_maximumIntake:IMaximumDoseSchedule;
Begin
result:=FmaximumIntake;
End;
procedure TSubstance.Set_maximumIntake(v:IMaximumDoseSchedule);
Begin
FmaximumIntake:=v;
End;
{*** TDoseSchedule ***}
function TDoseSchedule.Get_doseUnit:String;
Begin
result:=FdoseUnit;
End;
procedure TDoseSchedule.Set_doseUnit(v:String);
Begin
FdoseUnit:=v;
End;
function TDoseSchedule.Get_doseValue:IQualitativeValue;
Begin
result:=FdoseValue;
End;
procedure TDoseSchedule.Set_doseValue(v:IQualitativeValue);
Begin
FdoseValue:=v;
End;
function TDoseSchedule.Get_frequency:String;
Begin
result:=Ffrequency;
End;
procedure TDoseSchedule.Set_frequency(v:String);
Begin
Ffrequency:=v;
End;
{*** TQualitativeValue ***}
function TQualitativeValue.Get_lesser:IQualitativeValue;
Begin
result:=Flesser;
End;
procedure TQualitativeValue.Set_lesser(v:IQualitativeValue);
Begin
Flesser:=v;
End;
function TQualitativeValue.Get_nonEqual:IQualitativeValue;
Begin
result:=FnonEqual;
End;
procedure TQualitativeValue.Set_nonEqual(v:IQualitativeValue);
Begin
FnonEqual:=v;
End;
function TQualitativeValue.Get_lesserOrEqual:IQualitativeValue;
Begin
result:=FlesserOrEqual;
End;
procedure TQualitativeValue.Set_lesserOrEqual(v:IQualitativeValue);
Begin
FlesserOrEqual:=v;
End;
function TQualitativeValue.Get_greater:IQualitativeValue;
Begin
result:=Fgreater;
End;
procedure TQualitativeValue.Set_greater(v:IQualitativeValue);
Begin
Fgreater:=v;
End;
function TQualitativeValue.Get_additionalProperty:IPropertyValue;
Begin
result:=FadditionalProperty;
End;
procedure TQualitativeValue.Set_additionalProperty(v:IPropertyValue);
Begin
FadditionalProperty:=v;
End;
function TQualitativeValue.Get_equal:IQualitativeValue;
Begin
result:=Fequal;
End;
procedure TQualitativeValue.Set_equal(v:IQualitativeValue);
Begin
Fequal:=v;
End;
function TQualitativeValue.Get_greaterOrEqual:IQualitativeValue;
Begin
result:=FgreaterOrEqual;
End;
procedure TQualitativeValue.Set_greaterOrEqual(v:IQualitativeValue);
Begin
FgreaterOrEqual:=v;
End;
{*** TPropertyValue ***}
function TPropertyValue.Get_minValue:INumber;
Begin
result:=FminValue;
End;
procedure TPropertyValue.Set_minValue(v:INumber);
Begin
FminValue:=v;
End;
function TPropertyValue.Get_propertyID:String;
Begin
result:=FpropertyID;
End;
procedure TPropertyValue.Set_propertyID(v:String);
Begin
FpropertyID:=v;
End;
{*** TDrug ***}
function TDrug.Get_warning:String;
Begin
result:=Fwarning;
End;
procedure TDrug.Set_warning(v:String);
Begin
Fwarning:=v;
End;
function TDrug.Get_includedInHealthInsurancePlan:IHealthInsurancePlan;
Begin
result:=FincludedInHealthInsurancePlan;
End;
procedure TDrug.Set_includedInHealthInsurancePlan(v:IHealthInsurancePlan);
Begin
FincludedInHealthInsurancePlan:=v;
End;
function TDrug.Get_proprietaryName:String;
Begin
result:=FproprietaryName;
End;
procedure TDrug.Set_proprietaryName(v:String);
Begin
FproprietaryName:=v;
End;
function TDrug.Get_cost:IDrugCost;
Begin
result:=Fcost;
End;
procedure TDrug.Set_cost(v:IDrugCost);
Begin
Fcost:=v;
End;
function TDrug.Get_drugUnit:String;
Begin
result:=FdrugUnit;
End;
procedure TDrug.Set_drugUnit(v:String);
Begin
FdrugUnit:=v;
End;
function TDrug.Get_pregnancyCategory:IDrugPregnancyCategory;
Begin
result:=FpregnancyCategory;
End;
procedure TDrug.Set_pregnancyCategory(v:IDrugPregnancyCategory);
Begin
FpregnancyCategory:=v;
End;
function TDrug.Get_doseSchedule:IDoseSchedule;
Begin
result:=FdoseSchedule;
End;
procedure TDrug.Set_doseSchedule(v:IDoseSchedule);
Begin
FdoseSchedule:=v;
End;
function TDrug.Get_dosageForm:String;
Begin
result:=FdosageForm;
End;
procedure TDrug.Set_dosageForm(v:String);
Begin
FdosageForm:=v;
End;
function TDrug.Get_prescribingInfo:String;
Begin
result:=FprescribingInfo;
End;
procedure TDrug.Set_prescribingInfo(v:String);
Begin
FprescribingInfo:=v;
End;
function TDrug.Get_prescriptionStatus:IDrugPrescriptionStatus;
Begin
result:=FprescriptionStatus;
End;
procedure TDrug.Set_prescriptionStatus(v:IDrugPrescriptionStatus);
Begin
FprescriptionStatus:=v;
End;
function TDrug.Get_rxcui:String;
Begin
result:=Frxcui;
End;
procedure TDrug.Set_rxcui(v:String);
Begin
Frxcui:=v;
End;
function TDrug.Get_pregnancyWarning:String;
Begin
result:=FpregnancyWarning;
End;
procedure TDrug.Set_pregnancyWarning(v:String);
Begin
FpregnancyWarning:=v;
End;
function TDrug.Get_availableStrength:IDrugStrength;
Begin
result:=FavailableStrength;
End;
procedure TDrug.Set_availableStrength(v:IDrugStrength);
Begin
FavailableStrength:=v;
End;
function TDrug.Get_clincalPharmacology:String;
Begin
result:=FclincalPharmacology;
End;
procedure TDrug.Set_clincalPharmacology(v:String);
Begin
FclincalPharmacology:=v;
End;
function TDrug.Get_relatedDrug:IDrug;
Begin
result:=FrelatedDrug;
End;
procedure TDrug.Set_relatedDrug(v:IDrug);
Begin
FrelatedDrug:=v;
End;
function TDrug.Get_drugClass:IDrugClass;
Begin
result:=FdrugClass;
End;
procedure TDrug.Set_drugClass(v:IDrugClass);
Begin
FdrugClass:=v;
End;
function TDrug.Get_administrationRoute:String;
Begin
result:=FadministrationRoute;
End;
procedure TDrug.Set_administrationRoute(v:String);
Begin
FadministrationRoute:=v;
End;
function TDrug.Get_breastfeedingWarning:String;
Begin
result:=FbreastfeedingWarning;
End;
procedure TDrug.Set_breastfeedingWarning(v:String);
Begin
FbreastfeedingWarning:=v;
End;
function TDrug.Get_interactingDrug:IDrug;
Begin
result:=FinteractingDrug;
End;
procedure TDrug.Set_interactingDrug(v:IDrug);
Begin
FinteractingDrug:=v;
End;
function TDrug.Get_foodWarning:String;
Begin
result:=FfoodWarning;
End;
procedure TDrug.Set_foodWarning(v:String);
Begin
FfoodWarning:=v;
End;
function TDrug.Get_alcoholWarning:String;
Begin
result:=FalcoholWarning;
End;
procedure TDrug.Set_alcoholWarning(v:String);
Begin
FalcoholWarning:=v;
End;
function TDrug.Get_labelDetails:String;
Begin
result:=FlabelDetails;
End;
procedure TDrug.Set_labelDetails(v:String);
Begin
FlabelDetails:=v;
End;
function TDrug.Get_overdosage:String;
Begin
result:=Foverdosage;
End;
procedure TDrug.Set_overdosage(v:String);
Begin
Foverdosage:=v;
End;
function TDrug.Get_isAvailableGenerically:Boolean;
Begin
result:=FisAvailableGenerically;
End;
procedure TDrug.Set_isAvailableGenerically(v:Boolean);
Begin
FisAvailableGenerically:=v;
End;
{*** THealthInsurancePlan ***}
function THealthInsurancePlan.Get_includesHealthPlanNetwork:IHealthPlanNetwork;
Begin
result:=FincludesHealthPlanNetwork;
End;
procedure THealthInsurancePlan.Set_includesHealthPlanNetwork(v:IHealthPlanNetwork);
Begin
FincludesHealthPlanNetwork:=v;
End;
function THealthInsurancePlan.Get_healthPlanId:String;
Begin
result:=FhealthPlanId;
End;
procedure THealthInsurancePlan.Set_healthPlanId(v:String);
Begin
FhealthPlanId:=v;
End;
function THealthInsurancePlan.Get_healthPlanDrugTier:String;
Begin
result:=FhealthPlanDrugTier;
End;
procedure THealthInsurancePlan.Set_healthPlanDrugTier(v:String);
Begin
FhealthPlanDrugTier:=v;
End;
function THealthInsurancePlan.Get_healthPlanMarketingUrl:String;
Begin
result:=FhealthPlanMarketingUrl;
End;
procedure THealthInsurancePlan.Set_healthPlanMarketingUrl(v:String);
Begin
FhealthPlanMarketingUrl:=v;
End;
function THealthInsurancePlan.Get_usesHealthPlanIdStandard:String;
Begin
result:=FusesHealthPlanIdStandard;
End;
procedure THealthInsurancePlan.Set_usesHealthPlanIdStandard(v:String);
Begin
FusesHealthPlanIdStandard:=v;
End;
function THealthInsurancePlan.Get_healthPlanDrugOption:String;
Begin
result:=FhealthPlanDrugOption;
End;
procedure THealthInsurancePlan.Set_healthPlanDrugOption(v:String);
Begin
FhealthPlanDrugOption:=v;
End;
function THealthInsurancePlan.Get_includesHealthPlanFormulary:IHealthPlanFormulary;
Begin
result:=FincludesHealthPlanFormulary;
End;
procedure THealthInsurancePlan.Set_includesHealthPlanFormulary(v:IHealthPlanFormulary);
Begin
FincludesHealthPlanFormulary:=v;
End;
function THealthInsurancePlan.Get_benefitsSummaryUrl:String;
Begin
result:=FbenefitsSummaryUrl;
End;
procedure THealthInsurancePlan.Set_benefitsSummaryUrl(v:String);
Begin
FbenefitsSummaryUrl:=v;
End;
{*** THealthPlanNetwork ***}
function THealthPlanNetwork.Get_healthPlanNetworkTier:String;
Begin
result:=FhealthPlanNetworkTier;
End;
procedure THealthPlanNetwork.Set_healthPlanNetworkTier(v:String);
Begin
FhealthPlanNetworkTier:=v;
End;
function THealthPlanNetwork.Get_healthPlanCostSharing:Boolean;
Begin
result:=FhealthPlanCostSharing;
End;
procedure THealthPlanNetwork.Set_healthPlanCostSharing(v:Boolean);
Begin
FhealthPlanCostSharing:=v;
End;
{*** THealthPlanFormulary ***}
function THealthPlanFormulary.Get_offersPrescriptionByMail:Boolean;
Begin
result:=FoffersPrescriptionByMail;
End;
procedure THealthPlanFormulary.Set_offersPrescriptionByMail(v:Boolean);
Begin
FoffersPrescriptionByMail:=v;
End;
{*** TDrugCost ***}
function TDrugCost.Get_costPerUnit:IQualitativeValue;
Begin
result:=FcostPerUnit;
End;
procedure TDrugCost.Set_costPerUnit(v:IQualitativeValue);
Begin
FcostPerUnit:=v;
End;
function TDrugCost.Get_applicableLocation:IAdministrativeArea;
Begin
result:=FapplicableLocation;
End;
procedure TDrugCost.Set_applicableLocation(v:IAdministrativeArea);
Begin
FapplicableLocation:=v;
End;
function TDrugCost.Get_costCategory:IDrugCostCategory;
Begin
result:=FcostCategory;
End;
procedure TDrugCost.Set_costCategory(v:IDrugCostCategory);
Begin
FcostCategory:=v;
End;
function TDrugCost.Get_costCurrency:String;
Begin
result:=FcostCurrency;
End;
procedure TDrugCost.Set_costCurrency(v:String);
Begin
FcostCurrency:=v;
End;
function TDrugCost.Get_costOrigin:String;
Begin
result:=FcostOrigin;
End;
procedure TDrugCost.Set_costOrigin(v:String);
Begin
FcostOrigin:=v;
End;
{*** TDrugCostCategory ***}
function TDrugCostCategory.TangDrugCostCategory:TangibleValue;
Begin
result:=''
End;
{*** TDrugPregnancyCategory ***}
function TDrugPregnancyCategory.TangDrugPregnancyCategory:TangibleValue;
Begin
result:=''
End;
{*** TDrugPrescriptionStatus ***}
function TDrugPrescriptionStatus.TangDrugPrescriptionStatus:TangibleValue;
Begin
result:=''
End;
{*** TDrugStrength ***}
function TDrugStrength.Get_strengthUnit:String;
Begin
result:=FstrengthUnit;
End;
procedure TDrugStrength.Set_strengthUnit(v:String);
Begin
FstrengthUnit:=v;
End;
function TDrugStrength.Get_activeIngredient:String;
Begin
result:=FactiveIngredient;
End;
procedure TDrugStrength.Set_activeIngredient(v:String);
Begin
FactiveIngredient:=v;
End;
function TDrugStrength.Get_availableIn:IAdministrativeArea;
Begin
result:=FavailableIn;
End;
procedure TDrugStrength.Set_availableIn(v:IAdministrativeArea);
Begin
FavailableIn:=v;
End;
function TDrugStrength.Get_strengthValue:INumber;
Begin
result:=FstrengthValue;
End;
procedure TDrugStrength.Set_strengthValue(v:INumber);
Begin
FstrengthValue:=v;
End;
{*** TDrugClass ***}
function TDrugClass.Get_drug:IDrug;
Begin
result:=Fdrug;
End;
procedure TDrugClass.Set_drug(v:IDrug);
Begin
Fdrug:=v;
End;
{*** TMedicalSign ***}
function TMedicalSign.Get_identifyingTest:IMedicalTest;
Begin
result:=FidentifyingTest;
End;
procedure TMedicalSign.Set_identifyingTest(v:IMedicalTest);
Begin
FidentifyingTest:=v;
End;
function TMedicalSign.Get_identifyingExam:IPhysicalExam;
Begin
result:=FidentifyingExam;
End;
procedure TMedicalSign.Set_identifyingExam(v:IPhysicalExam);
Begin
FidentifyingExam:=v;
End;
{*** TPhysicalExam ***}
function TPhysicalExam.TangPhysicalExam:TangibleValue;
Begin
result:=''
End;
{*** TMedicalCause ***}
function TMedicalCause.Get_causeOf:IMedicalEntity;
Begin
result:=FcauseOf;
End;
procedure TMedicalCause.Set_causeOf(v:IMedicalEntity);
Begin
FcauseOf:=v;
End;
{*** TMedicalStudyStatus ***}
function TMedicalStudyStatus.TangMedicalStudyStatus:TangibleValue;
Begin
result:=''
End;
{*** TAnatomicalStructure ***}
function TAnatomicalStructure.Get_relatedTherapy:IMedicalTherapy;
Begin
result:=FrelatedTherapy;
End;
procedure TAnatomicalStructure.Set_relatedTherapy(v:IMedicalTherapy);
Begin
FrelatedTherapy:=v;
End;
function TAnatomicalStructure.Get__function:String;
Begin
result:=F_function;
End;
procedure TAnatomicalStructure.Set__function(v:String);
Begin
F_function:=v;
End;
function TAnatomicalStructure.Get_connectedTo:IAnatomicalStructure;
Begin
result:=FconnectedTo;
End;
procedure TAnatomicalStructure.Set_connectedTo(v:IAnatomicalStructure);
Begin
FconnectedTo:=v;
End;
function TAnatomicalStructure.Get_diagram:IImageObject;
Begin
result:=Fdiagram;
End;
procedure TAnatomicalStructure.Set_diagram(v:IImageObject);
Begin
Fdiagram:=v;
End;
function TAnatomicalStructure.Get_partOfSystem:IAnatomicalSystem;
Begin
result:=FpartOfSystem;
End;
procedure TAnatomicalStructure.Set_partOfSystem(v:IAnatomicalSystem);
Begin
FpartOfSystem:=v;
End;
function TAnatomicalStructure.Get_subStructure:IAnatomicalStructure;
Begin
result:=FsubStructure;
End;
procedure TAnatomicalStructure.Set_subStructure(v:IAnatomicalStructure);
Begin
FsubStructure:=v;
End;
{*** TAnatomicalSystem ***}
function TAnatomicalSystem.Get_comprisedOf:IAnatomicalStructure;
Begin
result:=FcomprisedOf;
End;
procedure TAnatomicalSystem.Set_comprisedOf(v:IAnatomicalStructure);
Begin
FcomprisedOf:=v;
End;
function TAnatomicalSystem.Get_associatedPathophysiology:String;
Begin
result:=FassociatedPathophysiology;
End;
procedure TAnatomicalSystem.Set_associatedPathophysiology(v:String);
Begin
FassociatedPathophysiology:=v;
End;
function TAnatomicalSystem.Get_relatedCondition:IMedicalCondition;
Begin
result:=FrelatedCondition;
End;
procedure TAnatomicalSystem.Set_relatedCondition(v:IMedicalCondition);
Begin
FrelatedCondition:=v;
End;
function TAnatomicalSystem.Get_relatedStructure:IAnatomicalStructure;
Begin
result:=FrelatedStructure;
End;
procedure TAnatomicalSystem.Set_relatedStructure(v:IAnatomicalStructure);
Begin
FrelatedStructure:=v;
End;
{*** TMedicalRiskFactor ***}
function TMedicalRiskFactor.Get_increasesRiskOf:IMedicalEntity;
Begin
result:=FincreasesRiskOf;
End;
procedure TMedicalRiskFactor.Set_increasesRiskOf(v:IMedicalEntity);
Begin
FincreasesRiskOf:=v;
End;
{*** TDDxElement ***}
function TDDxElement.Get_diagnosis:IMedicalCondition;
Begin
result:=Fdiagnosis;
End;
procedure TDDxElement.Set_diagnosis(v:IMedicalCondition);
Begin
Fdiagnosis:=v;
End;
function TDDxElement.Get_distinguishingSign:IMedicalSignOrSymptom;
Begin
result:=FdistinguishingSign;
End;
procedure TDDxElement.Set_distinguishingSign(v:IMedicalSignOrSymptom);
Begin
FdistinguishingSign:=v;
End;
{*** TMedicalConditionStage ***}
function TMedicalConditionStage.Get_stageAsNumber:INumber;
Begin
result:=FstageAsNumber;
End;
procedure TMedicalConditionStage.Set_stageAsNumber(v:INumber);
Begin
FstageAsNumber:=v;
End;
function TMedicalConditionStage.Get_subStageSuffix:String;
Begin
result:=FsubStageSuffix;
End;
procedure TMedicalConditionStage.Set_subStageSuffix(v:String);
Begin
FsubStageSuffix:=v;
End;
{*** TSpecialty ***}
function TSpecialty.TangSpecialty:TangibleValue;
Begin
result:=''
End;
{*** TMedicalSpecialty ***}
function TMedicalSpecialty.TangMedicalSpecialty:TangibleValue;
Begin
result:=''
End;
{*** TClip ***}
function TClip.Get_partOfEpisode:IEpisode;
Begin
result:=FpartOfEpisode;
End;
procedure TClip.Set_partOfEpisode(v:IEpisode);
Begin
FpartOfEpisode:=v;
End;
function TClip.Get_clipNumber:String;
Begin
result:=FclipNumber;
End;
procedure TClip.Set_clipNumber(v:String);
Begin
FclipNumber:=v;
End;
function TClip.Get_partOfSeason:ICreativeWorkSeason;
Begin
result:=FpartOfSeason;
End;
procedure TClip.Set_partOfSeason(v:ICreativeWorkSeason);
Begin
FpartOfSeason:=v;
End;
function TClip.Get_directors:IPerson;
Begin
result:=Fdirectors;
End;
procedure TClip.Set_directors(v:IPerson);
Begin
Fdirectors:=v;
End;
{*** TCreativeWorkSeason ***}
function TCreativeWorkSeason.Get_episodes:IEpisode;
Begin
result:=Fepisodes;
End;
procedure TCreativeWorkSeason.Set_episodes(v:IEpisode);
Begin
Fepisodes:=v;
End;
function TCreativeWorkSeason.Get_seasonNumber:Integer;
Begin
result:=FseasonNumber;
End;
procedure TCreativeWorkSeason.Set_seasonNumber(v:Integer);
Begin
FseasonNumber:=v;
End;
{*** TConsumeAction ***}
function TConsumeAction.Get_expectsAcceptanceOf:IOffer;
Begin
result:=FexpectsAcceptanceOf;
End;
procedure TConsumeAction.Set_expectsAcceptanceOf(v:IOffer);
Begin
FexpectsAcceptanceOf:=v;
End;
{*** TMoveAction ***}
function TMoveAction.Get_toLocation:IPlace;
Begin
result:=FtoLocation;
End;
procedure TMoveAction.Set_toLocation(v:IPlace);
Begin
FtoLocation:=v;
End;
{*** TTelevisionChannel ***}
function TTelevisionChannel.TangTelevisionChannel:TangibleValue;
Begin
result:=''
End;
{*** TLodgingBusiness ***}
function TLodgingBusiness.Get_petsAllowed:Boolean;
Begin
result:=FpetsAllowed;
End;
procedure TLodgingBusiness.Set_petsAllowed(v:Boolean);
Begin
FpetsAllowed:=v;
End;
function TLodgingBusiness.Get_checkoutTime:TDateTime;
Begin
result:=FcheckoutTime;
End;
procedure TLodgingBusiness.Set_checkoutTime(v:TDateTime);
Begin
FcheckoutTime:=v;
End;
function TLodgingBusiness.Get_checkinTime:TDateTime;
Begin
result:=FcheckinTime;
End;
procedure TLodgingBusiness.Set_checkinTime(v:TDateTime);
Begin
FcheckinTime:=v;
End;
function TLodgingBusiness.Get_starRating:IRating;
Begin
result:=FstarRating;
End;
procedure TLodgingBusiness.Set_starRating(v:IRating);
Begin
FstarRating:=v;
End;
{*** TReservation ***}
function TReservation.Get_totalPrice:String;
Begin
result:=FtotalPrice;
End;
procedure TReservation.Set_totalPrice(v:String);
Begin
FtotalPrice:=v;
End;
function TReservation.Get_reservationId:String;
Begin
result:=FreservationId;
End;
procedure TReservation.Set_reservationId(v:String);
Begin
FreservationId:=v;
End;
function TReservation.Get_modifiedTime:TDateTime;
Begin
result:=FmodifiedTime;
End;
procedure TReservation.Set_modifiedTime(v:TDateTime);
Begin
FmodifiedTime:=v;
End;
function TReservation.Get_programMembershipUsed:IProgramMembership;
Begin
result:=FprogramMembershipUsed;
End;
procedure TReservation.Set_programMembershipUsed(v:IProgramMembership);
Begin
FprogramMembershipUsed:=v;
End;
function TReservation.Get_bookingTime:TDateTime;
Begin
result:=FbookingTime;
End;
procedure TReservation.Set_bookingTime(v:TDateTime);
Begin
FbookingTime:=v;
End;
function TReservation.Get_reservedTicket:ITicket;
Begin
result:=FreservedTicket;
End;
procedure TReservation.Set_reservedTicket(v:ITicket);
Begin
FreservedTicket:=v;
End;
function TReservation.Get_reservationFor:IThing;
Begin
result:=FreservationFor;
End;
procedure TReservation.Set_reservationFor(v:IThing);
Begin
FreservationFor:=v;
End;
function TReservation.Get_bookingAgent:IOrganization;
Begin
result:=FbookingAgent;
End;
procedure TReservation.Set_bookingAgent(v:IOrganization);
Begin
FbookingAgent:=v;
End;
function TReservation.Get_reservationStatus:IReservationStatusType;
Begin
result:=FreservationStatus;
End;
procedure TReservation.Set_reservationStatus(v:IReservationStatusType);
Begin
FreservationStatus:=v;
End;
{*** TProgramMembership ***}
function TProgramMembership.Get_hostingOrganization:IOrganization;
Begin
result:=FhostingOrganization;
End;
procedure TProgramMembership.Set_hostingOrganization(v:IOrganization);
Begin
FhostingOrganization:=v;
End;
function TProgramMembership.Get_programName:String;
Begin
result:=FprogramName;
End;
procedure TProgramMembership.Set_programName(v:String);
Begin
FprogramName:=v;
End;
function TProgramMembership.Get_membershipNumber:String;
Begin
result:=FmembershipNumber;
End;
procedure TProgramMembership.Set_membershipNumber(v:String);
Begin
FmembershipNumber:=v;
End;
{*** TTicket ***}
function TTicket.Get_ticketToken:String;
Begin
result:=FticketToken;
End;
procedure TTicket.Set_ticketToken(v:String);
Begin
FticketToken:=v;
End;
function TTicket.Get_ticketedSeat:ISeat;
Begin
result:=FticketedSeat;
End;
procedure TTicket.Set_ticketedSeat(v:ISeat);
Begin
FticketedSeat:=v;
End;
function TTicket.Get_ticketNumber:String;
Begin
result:=FticketNumber;
End;
procedure TTicket.Set_ticketNumber(v:String);
Begin
FticketNumber:=v;
End;
function TTicket.Get_underName:IOrganization;
Begin
result:=FunderName;
End;
procedure TTicket.Set_underName(v:IOrganization);
Begin
FunderName:=v;
End;
function TTicket.Get_dateIssued:TDateTime;
Begin
result:=FdateIssued;
End;
procedure TTicket.Set_dateIssued(v:TDateTime);
Begin
FdateIssued:=v;
End;
{*** TSeat ***}
function TSeat.Get_seatRow:String;
Begin
result:=FseatRow;
End;
procedure TSeat.Set_seatRow(v:String);
Begin
FseatRow:=v;
End;
function TSeat.Get_seatNumber:String;
Begin
result:=FseatNumber;
End;
procedure TSeat.Set_seatNumber(v:String);
Begin
FseatNumber:=v;
End;
function TSeat.Get_seatSection:String;
Begin
result:=FseatSection;
End;
procedure TSeat.Set_seatSection(v:String);
Begin
FseatSection:=v;
End;
function TSeat.Get_seatingType:IQualitativeValue;
Begin
result:=FseatingType;
End;
procedure TSeat.Set_seatingType(v:IQualitativeValue);
Begin
FseatingType:=v;
End;
{*** TReservationStatusType ***}
function TReservationStatusType.TangReservationStatusType:TangibleValue;
Begin
result:=''
End;
{*** TBusReservation ***}
function TBusReservation.TangBusReservation:TangibleValue;
Begin
result:=''
End;
{*** TTaxi ***}
function TTaxi.TangTaxi:TangibleValue;
Begin
result:=''
End;
{*** TVehicle ***}
function TVehicle.Get_numberOfPreviousOwners:INumber;
Begin
result:=FnumberOfPreviousOwners;
End;
procedure TVehicle.Set_numberOfPreviousOwners(v:INumber);
Begin
FnumberOfPreviousOwners:=v;
End;
function TVehicle.Get_meetsEmissionStandard:IQualitativeValue;
Begin
result:=FmeetsEmissionStandard;
End;
procedure TVehicle.Set_meetsEmissionStandard(v:IQualitativeValue);
Begin
FmeetsEmissionStandard:=v;
End;
function TVehicle.Get_driveWheelConfiguration:IDriveWheelConfigurationValue;
Begin
result:=FdriveWheelConfiguration;
End;
procedure TVehicle.Set_driveWheelConfiguration(v:IDriveWheelConfigurationValue);
Begin
FdriveWheelConfiguration:=v;
End;
function TVehicle.Get_fuelConsumption:IQuantitativeValue;
Begin
result:=FfuelConsumption;
End;
procedure TVehicle.Set_fuelConsumption(v:IQuantitativeValue);
Begin
FfuelConsumption:=v;
End;
function TVehicle.Get_wheelbase:IQuantitativeValue;
Begin
result:=Fwheelbase;
End;
procedure TVehicle.Set_wheelbase(v:IQuantitativeValue);
Begin
Fwheelbase:=v;
End;
function TVehicle.Get_vehicleInteriorType:String;
Begin
result:=FvehicleInteriorType;
End;
procedure TVehicle.Set_vehicleInteriorType(v:String);
Begin
FvehicleInteriorType:=v;
End;
function TVehicle.Get_modelDate:TDateTime;
Begin
result:=FmodelDate;
End;
procedure TVehicle.Set_modelDate(v:TDateTime);
Begin
FmodelDate:=v;
End;
function TVehicle.Get_knownVehicleDamages:String;
Begin
result:=FknownVehicleDamages;
End;
procedure TVehicle.Set_knownVehicleDamages(v:String);
Begin
FknownVehicleDamages:=v;
End;
function TVehicle.Get_bodyType:String;
Begin
result:=FbodyType;
End;
procedure TVehicle.Set_bodyType(v:String);
Begin
FbodyType:=v;
End;
function TVehicle.Get_vehicleInteriorColor:String;
Begin
result:=FvehicleInteriorColor;
End;
procedure TVehicle.Set_vehicleInteriorColor(v:String);
Begin
FvehicleInteriorColor:=v;
End;
function TVehicle.Get_vehicleSpecialUsage:String;
Begin
result:=FvehicleSpecialUsage;
End;
procedure TVehicle.Set_vehicleSpecialUsage(v:String);
Begin
FvehicleSpecialUsage:=v;
End;
function TVehicle.Get_productionDate:TDateTime;
Begin
result:=FproductionDate;
End;
procedure TVehicle.Set_productionDate(v:TDateTime);
Begin
FproductionDate:=v;
End;
function TVehicle.Get_mileageFromOdometer:IQuantitativeValue;
Begin
result:=FmileageFromOdometer;
End;
procedure TVehicle.Set_mileageFromOdometer(v:IQuantitativeValue);
Begin
FmileageFromOdometer:=v;
End;
function TVehicle.Get_vehicleModelDate:TDateTime;
Begin
result:=FvehicleModelDate;
End;
procedure TVehicle.Set_vehicleModelDate(v:TDateTime);
Begin
FvehicleModelDate:=v;
End;
function TVehicle.Get_numberOfAirbags:INumber;
Begin
result:=FnumberOfAirbags;
End;
procedure TVehicle.Set_numberOfAirbags(v:INumber);
Begin
FnumberOfAirbags:=v;
End;
function TVehicle.Get_seatingCapacity:IQuantitativeValue;
Begin
result:=FseatingCapacity;
End;
procedure TVehicle.Set_seatingCapacity(v:IQuantitativeValue);
Begin
FseatingCapacity:=v;
End;
function TVehicle.Get_steeringPosition:ISteeringPositionValue;
Begin
result:=FsteeringPosition;
End;
procedure TVehicle.Set_steeringPosition(v:ISteeringPositionValue);
Begin
FsteeringPosition:=v;
End;
function TVehicle.Get_dateVehicleFirstRegistered:TDateTime;
Begin
result:=FdateVehicleFirstRegistered;
End;
procedure TVehicle.Set_dateVehicleFirstRegistered(v:TDateTime);
Begin
FdateVehicleFirstRegistered:=v;
End;
function TVehicle.Get_numberOfDoors:INumber;
Begin
result:=FnumberOfDoors;
End;
procedure TVehicle.Set_numberOfDoors(v:INumber);
Begin
FnumberOfDoors:=v;
End;
function TVehicle.Get_weightTotal:IQuantitativeValue;
Begin
result:=FweightTotal;
End;
procedure TVehicle.Set_weightTotal(v:IQuantitativeValue);
Begin
FweightTotal:=v;
End;
function TVehicle.Get_numberOfForwardGears:INumber;
Begin
result:=FnumberOfForwardGears;
End;
procedure TVehicle.Set_numberOfForwardGears(v:INumber);
Begin
FnumberOfForwardGears:=v;
End;
function TVehicle.Get_tongueWeight:IQuantitativeValue;
Begin
result:=FtongueWeight;
End;
procedure TVehicle.Set_tongueWeight(v:IQuantitativeValue);
Begin
FtongueWeight:=v;
End;
function TVehicle.Get_vehicleConfiguration:String;
Begin
result:=FvehicleConfiguration;
End;
procedure TVehicle.Set_vehicleConfiguration(v:String);
Begin
FvehicleConfiguration:=v;
End;
function TVehicle.Get_fuelEfficiency:IQuantitativeValue;
Begin
result:=FfuelEfficiency;
End;
procedure TVehicle.Set_fuelEfficiency(v:IQuantitativeValue);
Begin
FfuelEfficiency:=v;
End;
function TVehicle.Get_cargoVolume:IQuantitativeValue;
Begin
result:=FcargoVolume;
End;
procedure TVehicle.Set_cargoVolume(v:IQuantitativeValue);
Begin
FcargoVolume:=v;
End;
function TVehicle.Get_vehicleTransmission:IQualitativeValue;
Begin
result:=FvehicleTransmission;
End;
procedure TVehicle.Set_vehicleTransmission(v:IQualitativeValue);
Begin
FvehicleTransmission:=v;
End;
function TVehicle.Get_vehicleSeatingCapacity:IQuantitativeValue;
Begin
result:=FvehicleSeatingCapacity;
End;
procedure TVehicle.Set_vehicleSeatingCapacity(v:IQuantitativeValue);
Begin
FvehicleSeatingCapacity:=v;
End;
function TVehicle.Get_accelerationTime:IQuantitativeValue;
Begin
result:=FaccelerationTime;
End;
procedure TVehicle.Set_accelerationTime(v:IQuantitativeValue);
Begin
FaccelerationTime:=v;
End;
function TVehicle.Get_purchaseDate:TDateTime;
Begin
result:=FpurchaseDate;
End;
procedure TVehicle.Set_purchaseDate(v:TDateTime);
Begin
FpurchaseDate:=v;
End;
function TVehicle.Get_payload:IQuantitativeValue;
Begin
result:=Fpayload;
End;
procedure TVehicle.Set_payload(v:IQuantitativeValue);
Begin
Fpayload:=v;
End;
function TVehicle.Get_fuelCapacity:IQuantitativeValue;
Begin
result:=FfuelCapacity;
End;
procedure TVehicle.Set_fuelCapacity(v:IQuantitativeValue);
Begin
FfuelCapacity:=v;
End;
function TVehicle.Get_vehicleEngine:IEngineSpecification;
Begin
result:=FvehicleEngine;
End;
procedure TVehicle.Set_vehicleEngine(v:IEngineSpecification);
Begin
FvehicleEngine:=v;
End;
function TVehicle.Get_emissionsCO2:INumber;
Begin
result:=FemissionsCO2;
End;
procedure TVehicle.Set_emissionsCO2(v:INumber);
Begin
FemissionsCO2:=v;
End;
function TVehicle.Get_numberOfAxles:INumber;
Begin
result:=FnumberOfAxles;
End;
procedure TVehicle.Set_numberOfAxles(v:INumber);
Begin
FnumberOfAxles:=v;
End;
function TVehicle.Get_speed:IQuantitativeValue;
Begin
result:=Fspeed;
End;
procedure TVehicle.Set_speed(v:IQuantitativeValue);
Begin
Fspeed:=v;
End;
function TVehicle.Get_vehicleIdentificationNumber:String;
Begin
result:=FvehicleIdentificationNumber;
End;
procedure TVehicle.Set_vehicleIdentificationNumber(v:String);
Begin
FvehicleIdentificationNumber:=v;
End;
function TVehicle.Get_trailerWeight:IQuantitativeValue;
Begin
result:=FtrailerWeight;
End;
procedure TVehicle.Set_trailerWeight(v:IQuantitativeValue);
Begin
FtrailerWeight:=v;
End;
{*** TDriveWheelConfigurationValue ***}
function TDriveWheelConfigurationValue.TangDriveWheelConfigurationValue:TangibleValue;
Begin
result:=''
End;
{*** TSteeringPositionValue ***}
function TSteeringPositionValue.TangSteeringPositionValue:TangibleValue;
Begin
result:=''
End;
{*** TEngineSpecification ***}
function TEngineSpecification.Get_enginePower:IQuantitativeValue;
Begin
result:=FenginePower;
End;
procedure TEngineSpecification.Set_enginePower(v:IQuantitativeValue);
Begin
FenginePower:=v;
End;
function TEngineSpecification.Get_engineDisplacement:IQuantitativeValue;
Begin
result:=FengineDisplacement;
End;
procedure TEngineSpecification.Set_engineDisplacement(v:IQuantitativeValue);
Begin
FengineDisplacement:=v;
End;
function TEngineSpecification.Get_fuelType:String;
Begin
result:=FfuelType;
End;
procedure TEngineSpecification.Set_fuelType(v:String);
Begin
FfuelType:=v;
End;
function TEngineSpecification.Get_engineType:String;
Begin
result:=FengineType;
End;
procedure TEngineSpecification.Set_engineType(v:String);
Begin
FengineType:=v;
End;
function TEngineSpecification.Get_torque:IQuantitativeValue;
Begin
result:=Ftorque;
End;
procedure TEngineSpecification.Set_torque(v:IQuantitativeValue);
Begin
Ftorque:=v;
End;
{*** TWebPage ***}
function TWebPage.Get_primaryImageOfPage:IImageObject;
Begin
result:=FprimaryImageOfPage;
End;
procedure TWebPage.Set_primaryImageOfPage(v:IImageObject);
Begin
FprimaryImageOfPage:=v;
End;
function TWebPage.Get_breadcrumb:IBreadcrumbList;
Begin
result:=Fbreadcrumb;
End;
procedure TWebPage.Set_breadcrumb(v:IBreadcrumbList);
Begin
Fbreadcrumb:=v;
End;
function TWebPage.Get_significantLinks:String;
Begin
result:=FsignificantLinks;
End;
procedure TWebPage.Set_significantLinks(v:String);
Begin
FsignificantLinks:=v;
End;
function TWebPage.Get_relatedLink:String;
Begin
result:=FrelatedLink;
End;
procedure TWebPage.Set_relatedLink(v:String);
Begin
FrelatedLink:=v;
End;
function TWebPage.Get_reviewedBy:IPerson;
Begin
result:=FreviewedBy;
End;
procedure TWebPage.Set_reviewedBy(v:IPerson);
Begin
FreviewedBy:=v;
End;
function TWebPage.Get_specialty:ISpecialty;
Begin
result:=Fspecialty;
End;
procedure TWebPage.Set_specialty(v:ISpecialty);
Begin
Fspecialty:=v;
End;
function TWebPage.Get_lastReviewed:TDateTime;
Begin
result:=FlastReviewed;
End;
procedure TWebPage.Set_lastReviewed(v:TDateTime);
Begin
FlastReviewed:=v;
End;
{*** TBreadcrumbList ***}
function TBreadcrumbList.TangBreadcrumbList:TangibleValue;
Begin
result:=''
End;
{*** TFinancialService ***}
function TFinancialService.Get_feesAndCommissionsSpecification:String;
Begin
result:=FfeesAndCommissionsSpecification;
End;
procedure TFinancialService.Set_feesAndCommissionsSpecification(v:String);
Begin
FfeesAndCommissionsSpecification:=v;
End;
{*** TGoodRelationsClass ***}
function TGoodRelationsClass.TangGoodRelationsClass:TangibleValue;
Begin
result:=''
End;
{*** TDigitalDocument ***}
function TDigitalDocument.Get_hasDigitalDocumentPermission:IDigitalDocumentPermission;
Begin
result:=FhasDigitalDocumentPermission;
End;
procedure TDigitalDocument.Set_hasDigitalDocumentPermission(v:IDigitalDocumentPermission);
Begin
FhasDigitalDocumentPermission:=v;
End;
{*** TDigitalDocumentPermission ***}
function TDigitalDocumentPermission.Get_permissionType:IDigitalDocumentPermissionType;
Begin
result:=FpermissionType;
End;
procedure TDigitalDocumentPermission.Set_permissionType(v:IDigitalDocumentPermissionType);
Begin
FpermissionType:=v;
End;
function TDigitalDocumentPermission.Get_grantee:IAudience;
Begin
result:=Fgrantee;
End;
procedure TDigitalDocumentPermission.Set_grantee(v:IAudience);
Begin
Fgrantee:=v;
End;
{*** TDigitalDocumentPermissionType ***}
function TDigitalDocumentPermissionType.TangDigitalDocumentPermissionType:TangibleValue;
Begin
result:=''
End;
{*** TSocialMediaPosting ***}
function TSocialMediaPosting.Get_sharedContent:ICreativeWork;
Begin
result:=FsharedContent;
End;
procedure TSocialMediaPosting.Set_sharedContent(v:ICreativeWork);
Begin
FsharedContent:=v;
End;
{*** TMedicalOrganization ***}
function TMedicalOrganization.Get_medicalSpecialty:IMedicalSpecialty;
Begin
result:=FmedicalSpecialty;
End;
procedure TMedicalOrganization.Set_medicalSpecialty(v:IMedicalSpecialty);
Begin
FmedicalSpecialty:=v;
End;
function TMedicalOrganization.Get_healthPlanNetworkId:String;
Begin
result:=FhealthPlanNetworkId;
End;
procedure TMedicalOrganization.Set_healthPlanNetworkId(v:String);
Begin
FhealthPlanNetworkId:=v;
End;
function TMedicalOrganization.Get_isAcceptingNewPatients:Boolean;
Begin
result:=FisAcceptingNewPatients;
End;
procedure TMedicalOrganization.Set_isAcceptingNewPatients(v:Boolean);
Begin
FisAcceptingNewPatients:=v;
End;
{*** TFinancialProduct ***}
function TFinancialProduct.Get_annualPercentageRate:IQuantitativeValue;
Begin
result:=FannualPercentageRate;
End;
procedure TFinancialProduct.Set_annualPercentageRate(v:IQuantitativeValue);
Begin
FannualPercentageRate:=v;
End;
function TFinancialProduct.Get_interestRate:INumber;
Begin
result:=FinterestRate;
End;
procedure TFinancialProduct.Set_interestRate(v:INumber);
Begin
FinterestRate:=v;
End;
{*** TCurrencyConversionService ***}
function TCurrencyConversionService.TangCurrencyConversionService:TangibleValue;
Begin
result:=''
End;
{*** TTradeAction ***}
function TTradeAction.Get_price:INumber;
Begin
result:=Fprice;
End;
procedure TTradeAction.Set_price(v:INumber);
Begin
Fprice:=v;
End;
function TTradeAction.Get_priceSpecification:IPriceSpecification;
Begin
result:=FpriceSpecification;
End;
procedure TTradeAction.Set_priceSpecification(v:IPriceSpecification);
Begin
FpriceSpecification:=v;
End;
{*** TPaymentCard ***}
function TPaymentCard.TangPaymentCard:TangibleValue;
Begin
result:=''
End;
{*** TCreditCard ***}
function TCreditCard.TangCreditCard:TangibleValue;
Begin
result:=''
End;
{*** TEndorsementRating ***}
function TEndorsementRating.TangEndorsementRating:TangibleValue;
Begin
result:=''
End;
{*** TFoodService ***}
function TFoodService.TangFoodService:TangibleValue;
Begin
result:=''
End;
{*** TAccommodation ***}
function TAccommodation.Get_amenityFeature:ILocationFeatureSpecification;
Begin
result:=FamenityFeature;
End;
procedure TAccommodation.Set_amenityFeature(v:ILocationFeatureSpecification);
Begin
FamenityFeature:=v;
End;
function TAccommodation.Get_floorSize:IQuantitativeValue;
Begin
result:=FfloorSize;
End;
procedure TAccommodation.Set_floorSize(v:IQuantitativeValue);
Begin
FfloorSize:=v;
End;
function TAccommodation.Get_permittedUsage:String;
Begin
result:=FpermittedUsage;
End;
procedure TAccommodation.Set_permittedUsage(v:String);
Begin
FpermittedUsage:=v;
End;
{*** TLocationFeatureSpecification ***}
function TLocationFeatureSpecification.TangLocationFeatureSpecification:TangibleValue;
Begin
result:=''
End;
{*** TPlanAction ***}
function TPlanAction.Get_scheduledTime:TDateTime;
Begin
result:=FscheduledTime;
End;
procedure TPlanAction.Set_scheduledTime(v:TDateTime);
Begin
FscheduledTime:=v;
End;
{*** TLockerDelivery ***}
function TLockerDelivery.TangLockerDelivery:TangibleValue;
Begin
result:=''
End;
{*** TMedicalRiskEstimator ***}
function TMedicalRiskEstimator.Get_estimatesRiskOf:IMedicalEntity;
Begin
result:=FestimatesRiskOf;
End;
procedure TMedicalRiskEstimator.Set_estimatesRiskOf(v:IMedicalEntity);
Begin
FestimatesRiskOf:=v;
End;
function TMedicalRiskEstimator.Get_includedRiskFactor:IMedicalRiskFactor;
Begin
result:=FincludedRiskFactor;
End;
procedure TMedicalRiskEstimator.Set_includedRiskFactor(v:IMedicalRiskFactor);
Begin
FincludedRiskFactor:=v;
End;
{*** TPaymentService ***}
function TPaymentService.TangPaymentService:TangibleValue;
Begin
result:=''
End;
{*** TEventReservation ***}
function TEventReservation.TangEventReservation:TangibleValue;
Begin
result:=''
End;
{*** TVisualArtwork ***}
function TVisualArtwork.Get_artist:IPerson;
Begin
result:=Fartist;
End;
procedure TVisualArtwork.Set_artist(v:IPerson);
Begin
Fartist:=v;
End;
function TVisualArtwork.Get_width:IQuantitativeValue;
Begin
result:=Fwidth;
End;
procedure TVisualArtwork.Set_width(v:IQuantitativeValue);
Begin
Fwidth:=v;
End;
function TVisualArtwork.Get_surface:String;
Begin
result:=Fsurface;
End;
procedure TVisualArtwork.Set_surface(v:String);
Begin
Fsurface:=v;
End;
function TVisualArtwork.Get_depth:IQuantitativeValue;
Begin
result:=Fdepth;
End;
procedure TVisualArtwork.Set_depth(v:IQuantitativeValue);
Begin
Fdepth:=v;
End;
function TVisualArtwork.Get_artMedium:String;
Begin
result:=FartMedium;
End;
procedure TVisualArtwork.Set_artMedium(v:String);
Begin
FartMedium:=v;
End;
function TVisualArtwork.Get_artEdition:Integer;
Begin
result:=FartEdition;
End;
procedure TVisualArtwork.Set_artEdition(v:Integer);
Begin
FartEdition:=v;
End;
function TVisualArtwork.Get_artform:String;
Begin
result:=Fartform;
End;
procedure TVisualArtwork.Set_artform(v:String);
Begin
Fartform:=v;
End;
function TVisualArtwork.Get_height:IDistance;
Begin
result:=Fheight;
End;
procedure TVisualArtwork.Set_height(v:IDistance);
Begin
Fheight:=v;
End;
{*** TDistance ***}
function TDistance.TangDistance:TangibleValue;
Begin
result:=''
End;
{*** TBankAccount ***}
function TBankAccount.TangBankAccount:TangibleValue;
Begin
result:=''
End;
{*** TDepositAccount ***}
function TDepositAccount.TangDepositAccount:TangibleValue;
Begin
result:=''
End;
{*** TTrainReservation ***}
function TTrainReservation.TangTrainReservation:TangibleValue;
Begin
result:=''
End;
{*** TFMRadioChannel ***}
function TFMRadioChannel.TangFMRadioChannel:TangibleValue;
Begin
result:=''
End;
{*** TMessage ***}
function TMessage.Get_dateSent:TDateTime;
Begin
result:=FdateSent;
End;
procedure TMessage.Set_dateSent(v:TDateTime);
Begin
FdateSent:=v;
End;
function TMessage.Get_dateRead:TDateTime;
Begin
result:=FdateRead;
End;
procedure TMessage.Set_dateRead(v:TDateTime);
Begin
FdateRead:=v;
End;
function TMessage.Get_messageAttachment:ICreativeWork;
Begin
result:=FmessageAttachment;
End;
procedure TMessage.Set_messageAttachment(v:ICreativeWork);
Begin
FmessageAttachment:=v;
End;
function TMessage.Get_dateReceived:TDateTime;
Begin
result:=FdateReceived;
End;
procedure TMessage.Set_dateReceived(v:TDateTime);
Begin
FdateReceived:=v;
End;
{*** TPhysicalActivityCategory ***}
function TPhysicalActivityCategory.TangPhysicalActivityCategory:TangibleValue;
Begin
result:=''
End;
{*** TItemListOrderType ***}
function TItemListOrderType.TangItemListOrderType:TangibleValue;
Begin
result:=''
End;
{*** TScreeningEvent ***}
function TScreeningEvent.Get_videoFormat:String;
Begin
result:=FvideoFormat;
End;
procedure TScreeningEvent.Set_videoFormat(v:String);
Begin
FvideoFormat:=v;
End;
function TScreeningEvent.Get_workPresented:IMovie;
Begin
result:=FworkPresented;
End;
procedure TScreeningEvent.Set_workPresented(v:IMovie);
Begin
FworkPresented:=v;
End;
{*** TMovie ***}
function TMovie.Get_musicBy:IMusicGroup;
Begin
result:=FmusicBy;
End;
procedure TMovie.Set_musicBy(v:IMusicGroup);
Begin
FmusicBy:=v;
End;
function TMovie.Get_subtitleLanguage:String;
Begin
result:=FsubtitleLanguage;
End;
procedure TMovie.Set_subtitleLanguage(v:String);
Begin
FsubtitleLanguage:=v;
End;
{*** TMusicGroup ***}
function TMusicGroup.Get_musicGroupMember:IPerson;
Begin
result:=FmusicGroupMember;
End;
procedure TMusicGroup.Set_musicGroupMember(v:IPerson);
Begin
FmusicGroupMember:=v;
End;
function TMusicGroup.Get_albums:IMusicAlbum;
Begin
result:=Falbums;
End;
procedure TMusicGroup.Set_albums(v:IMusicAlbum);
Begin
Falbums:=v;
End;
function TMusicGroup.Get_genre:String;
Begin
result:=Fgenre;
End;
procedure TMusicGroup.Set_genre(v:String);
Begin
Fgenre:=v;
End;
{*** TMusicPlaylist ***}
function TMusicPlaylist.Get_tracks:IMusicRecording;
Begin
result:=Ftracks;
End;
procedure TMusicPlaylist.Set_tracks(v:IMusicRecording);
Begin
Ftracks:=v;
End;
function TMusicPlaylist.Get_numTracks:Integer;
Begin
result:=FnumTracks;
End;
procedure TMusicPlaylist.Set_numTracks(v:Integer);
Begin
FnumTracks:=v;
End;
{*** TMusicRecording ***}
function TMusicRecording.Get_inAlbum:IMusicAlbum;
Begin
result:=FinAlbum;
End;
procedure TMusicRecording.Set_inAlbum(v:IMusicAlbum);
Begin
FinAlbum:=v;
End;
function TMusicRecording.Get_inPlaylist:IMusicPlaylist;
Begin
result:=FinPlaylist;
End;
procedure TMusicRecording.Set_inPlaylist(v:IMusicPlaylist);
Begin
FinPlaylist:=v;
End;
function TMusicRecording.Get_byArtist:IMusicGroup;
Begin
result:=FbyArtist;
End;
procedure TMusicRecording.Set_byArtist(v:IMusicGroup);
Begin
FbyArtist:=v;
End;
function TMusicRecording.Get_isrcCode:String;
Begin
result:=FisrcCode;
End;
procedure TMusicRecording.Set_isrcCode(v:String);
Begin
FisrcCode:=v;
End;
function TMusicRecording.Get_recordingOf:IMusicComposition;
Begin
result:=FrecordingOf;
End;
procedure TMusicRecording.Set_recordingOf(v:IMusicComposition);
Begin
FrecordingOf:=v;
End;
{*** TMusicAlbum ***}
function TMusicAlbum.Get_albumReleaseType:IMusicAlbumReleaseType;
Begin
result:=FalbumReleaseType;
End;
procedure TMusicAlbum.Set_albumReleaseType(v:IMusicAlbumReleaseType);
Begin
FalbumReleaseType:=v;
End;
function TMusicAlbum.Get_albumProductionType:IMusicAlbumProductionType;
Begin
result:=FalbumProductionType;
End;
procedure TMusicAlbum.Set_albumProductionType(v:IMusicAlbumProductionType);
Begin
FalbumProductionType:=v;
End;
{*** TMusicAlbumReleaseType ***}
function TMusicAlbumReleaseType.TangMusicAlbumReleaseType:TangibleValue;
Begin
result:=''
End;
{*** TMusicAlbumProductionType ***}
function TMusicAlbumProductionType.TangMusicAlbumProductionType:TangibleValue;
Begin
result:=''
End;
{*** TMusicComposition ***}
function TMusicComposition.Get_musicalKey:String;
Begin
result:=FmusicalKey;
End;
procedure TMusicComposition.Set_musicalKey(v:String);
Begin
FmusicalKey:=v;
End;
function TMusicComposition.Get_iswcCode:String;
Begin
result:=FiswcCode;
End;
procedure TMusicComposition.Set_iswcCode(v:String);
Begin
FiswcCode:=v;
End;
function TMusicComposition.Get_includedComposition:IMusicComposition;
Begin
result:=FincludedComposition;
End;
procedure TMusicComposition.Set_includedComposition(v:IMusicComposition);
Begin
FincludedComposition:=v;
End;
function TMusicComposition.Get_musicCompositionForm:String;
Begin
result:=FmusicCompositionForm;
End;
procedure TMusicComposition.Set_musicCompositionForm(v:String);
Begin
FmusicCompositionForm:=v;
End;
function TMusicComposition.Get_musicArrangement:IMusicComposition;
Begin
result:=FmusicArrangement;
End;
procedure TMusicComposition.Set_musicArrangement(v:IMusicComposition);
Begin
FmusicArrangement:=v;
End;
function TMusicComposition.Get_lyricist:IPerson;
Begin
result:=Flyricist;
End;
procedure TMusicComposition.Set_lyricist(v:IPerson);
Begin
Flyricist:=v;
End;
function TMusicComposition.Get_firstPerformance:IEvent;
Begin
result:=FfirstPerformance;
End;
procedure TMusicComposition.Set_firstPerformance(v:IEvent);
Begin
FfirstPerformance:=v;
End;
function TMusicComposition.Get_lyrics:ICreativeWork;
Begin
result:=Flyrics;
End;
procedure TMusicComposition.Set_lyrics(v:ICreativeWork);
Begin
Flyrics:=v;
End;
{*** TFlight ***}
function TFlight.Get_carrier:IOrganization;
Begin
result:=Fcarrier;
End;
procedure TFlight.Set_carrier(v:IOrganization);
Begin
Fcarrier:=v;
End;
function TFlight.Get_mealService:String;
Begin
result:=FmealService;
End;
procedure TFlight.Set_mealService(v:String);
Begin
FmealService:=v;
End;
function TFlight.Get_flightNumber:String;
Begin
result:=FflightNumber;
End;
procedure TFlight.Set_flightNumber(v:String);
Begin
FflightNumber:=v;
End;
function TFlight.Get_aircraft:String;
Begin
result:=Faircraft;
End;
procedure TFlight.Set_aircraft(v:String);
Begin
Faircraft:=v;
End;
function TFlight.Get_departureAirport:IAirport;
Begin
result:=FdepartureAirport;
End;
procedure TFlight.Set_departureAirport(v:IAirport);
Begin
FdepartureAirport:=v;
End;
function TFlight.Get_departureGate:String;
Begin
result:=FdepartureGate;
End;
procedure TFlight.Set_departureGate(v:String);
Begin
FdepartureGate:=v;
End;
function TFlight.Get_departureTerminal:String;
Begin
result:=FdepartureTerminal;
End;
procedure TFlight.Set_departureTerminal(v:String);
Begin
FdepartureTerminal:=v;
End;
function TFlight.Get_flightDistance:IDistance;
Begin
result:=FflightDistance;
End;
procedure TFlight.Set_flightDistance(v:IDistance);
Begin
FflightDistance:=v;
End;
function TFlight.Get_departureTime:TDateTime;
Begin
result:=FdepartureTime;
End;
procedure TFlight.Set_departureTime(v:TDateTime);
Begin
FdepartureTime:=v;
End;
function TFlight.Get_estimatedFlightDuration:IDuration;
Begin
result:=FestimatedFlightDuration;
End;
procedure TFlight.Set_estimatedFlightDuration(v:IDuration);
Begin
FestimatedFlightDuration:=v;
End;
function TFlight.Get_boardingPolicy:IBoardingPolicyType;
Begin
result:=FboardingPolicy;
End;
procedure TFlight.Set_boardingPolicy(v:IBoardingPolicyType);
Begin
FboardingPolicy:=v;
End;
function TFlight.Get_arrivalAirport:IAirport;
Begin
result:=FarrivalAirport;
End;
procedure TFlight.Set_arrivalAirport(v:IAirport);
Begin
FarrivalAirport:=v;
End;
function TFlight.Get_webCheckinTime:TDateTime;
Begin
result:=FwebCheckinTime;
End;
procedure TFlight.Set_webCheckinTime(v:TDateTime);
Begin
FwebCheckinTime:=v;
End;
function TFlight.Get_arrivalGate:String;
Begin
result:=FarrivalGate;
End;
procedure TFlight.Set_arrivalGate(v:String);
Begin
FarrivalGate:=v;
End;
function TFlight.Get_arrivalTerminal:String;
Begin
result:=FarrivalTerminal;
End;
procedure TFlight.Set_arrivalTerminal(v:String);
Begin
FarrivalTerminal:=v;
End;
{*** TAirport ***}
function TAirport.Get_icaoCode:String;
Begin
result:=FicaoCode;
End;
procedure TAirport.Set_icaoCode(v:String);
Begin
FicaoCode:=v;
End;
{*** TBoardingPolicyType ***}
function TBoardingPolicyType.TangBoardingPolicyType:TangibleValue;
Begin
result:=''
End;
{*** TCompoundPriceSpecification ***}
function TCompoundPriceSpecification.Get_priceComponent:IUnitPriceSpecification;
Begin
result:=FpriceComponent;
End;
procedure TCompoundPriceSpecification.Set_priceComponent(v:IUnitPriceSpecification);
Begin
FpriceComponent:=v;
End;
{*** TUnitPriceSpecification ***}
function TUnitPriceSpecification.Get_priceType:String;
Begin
result:=FpriceType;
End;
procedure TUnitPriceSpecification.Set_priceType(v:String);
Begin
FpriceType:=v;
End;
function TUnitPriceSpecification.Get_referenceQuantity:IQuantitativeValue;
Begin
result:=FreferenceQuantity;
End;
procedure TUnitPriceSpecification.Set_referenceQuantity(v:IQuantitativeValue);
Begin
FreferenceQuantity:=v;
End;
function TUnitPriceSpecification.Get_billingIncrement:INumber;
Begin
result:=FbillingIncrement;
End;
procedure TUnitPriceSpecification.Set_billingIncrement(v:INumber);
Begin
FbillingIncrement:=v;
End;
{*** TSoftwareSourceCode ***}
function TSoftwareSourceCode.Get_sampleType:String;
Begin
result:=FsampleType;
End;
procedure TSoftwareSourceCode.Set_sampleType(v:String);
Begin
FsampleType:=v;
End;
function TSoftwareSourceCode.Get_runtime:String;
Begin
result:=Fruntime;
End;
procedure TSoftwareSourceCode.Set_runtime(v:String);
Begin
Fruntime:=v;
End;
function TSoftwareSourceCode.Get_codeRepository:String;
Begin
result:=FcodeRepository;
End;
procedure TSoftwareSourceCode.Set_codeRepository(v:String);
Begin
FcodeRepository:=v;
End;
function TSoftwareSourceCode.Get_targetProduct:ISoftwareApplication;
Begin
result:=FtargetProduct;
End;
procedure TSoftwareSourceCode.Set_targetProduct(v:ISoftwareApplication);
Begin
FtargetProduct:=v;
End;
function TSoftwareSourceCode.Get_programmingLanguage:IComputerLanguage;
Begin
result:=FprogrammingLanguage;
End;
procedure TSoftwareSourceCode.Set_programmingLanguage(v:IComputerLanguage);
Begin
FprogrammingLanguage:=v;
End;
{*** TComputerLanguage ***}
function TComputerLanguage.TangComputerLanguage:TangibleValue;
Begin
result:=''
End;
{*** TFlightReservation ***}
function TFlightReservation.Get_passengerPriorityStatus:String;
Begin
result:=FpassengerPriorityStatus;
End;
procedure TFlightReservation.Set_passengerPriorityStatus(v:String);
Begin
FpassengerPriorityStatus:=v;
End;
function TFlightReservation.Get_securityScreening:String;
Begin
result:=FsecurityScreening;
End;
procedure TFlightReservation.Set_securityScreening(v:String);
Begin
FsecurityScreening:=v;
End;
function TFlightReservation.Get_boardingGroup:String;
Begin
result:=FboardingGroup;
End;
procedure TFlightReservation.Set_boardingGroup(v:String);
Begin
FboardingGroup:=v;
End;
function TFlightReservation.Get_passengerSequenceNumber:String;
Begin
result:=FpassengerSequenceNumber;
End;
procedure TFlightReservation.Set_passengerSequenceNumber(v:String);
Begin
FpassengerSequenceNumber:=v;
End;
{*** TSuite ***}
function TSuite.Get_numberOfRooms:IQuantitativeValue;
Begin
result:=FnumberOfRooms;
End;
procedure TSuite.Set_numberOfRooms(v:IQuantitativeValue);
Begin
FnumberOfRooms:=v;
End;
{*** TEnumerationValueSet ***}
function TEnumerationValueSet.Get_hasEnumerationValue:String;
Begin
result:=FhasEnumerationValue;
End;
procedure TEnumerationValueSet.Set_hasEnumerationValue(v:String);
Begin
FhasEnumerationValue:=v;
End;
{*** TComicStory ***}
function TComicStory.Get_colorist:IPerson;
Begin
result:=Fcolorist;
End;
procedure TComicStory.Set_colorist(v:IPerson);
Begin
Fcolorist:=v;
End;
function TComicStory.Get_letterer:IPerson;
Begin
result:=Fletterer;
End;
procedure TComicStory.Set_letterer(v:IPerson);
Begin
Fletterer:=v;
End;
{*** TJobPosting ***}
function TJobPosting.Get_skills:String;
Begin
result:=Fskills;
End;
procedure TJobPosting.Set_skills(v:String);
Begin
Fskills:=v;
End;
function TJobPosting.Get_specialCommitments:String;
Begin
result:=FspecialCommitments;
End;
procedure TJobPosting.Set_specialCommitments(v:String);
Begin
FspecialCommitments:=v;
End;
function TJobPosting.Get_benefits:String;
Begin
result:=Fbenefits;
End;
procedure TJobPosting.Set_benefits(v:String);
Begin
Fbenefits:=v;
End;
function TJobPosting.Get_hiringOrganization:IOrganization;
Begin
result:=FhiringOrganization;
End;
procedure TJobPosting.Set_hiringOrganization(v:IOrganization);
Begin
FhiringOrganization:=v;
End;
function TJobPosting.Get_datePosted:TDateTime;
Begin
result:=FdatePosted;
End;
procedure TJobPosting.Set_datePosted(v:TDateTime);
Begin
FdatePosted:=v;
End;
function TJobPosting.Get_employmentType:String;
Begin
result:=FemploymentType;
End;
procedure TJobPosting.Set_employmentType(v:String);
Begin
FemploymentType:=v;
End;
function TJobPosting.Get_title:String;
Begin
result:=Ftitle;
End;
procedure TJobPosting.Set_title(v:String);
Begin
Ftitle:=v;
End;
function TJobPosting.Get_educationRequirements:String;
Begin
result:=FeducationRequirements;
End;
procedure TJobPosting.Set_educationRequirements(v:String);
Begin
FeducationRequirements:=v;
End;
function TJobPosting.Get_occupationalCategory:String;
Begin
result:=FoccupationalCategory;
End;
procedure TJobPosting.Set_occupationalCategory(v:String);
Begin
FoccupationalCategory:=v;
End;
function TJobPosting.Get_jobLocation:IPlace;
Begin
result:=FjobLocation;
End;
procedure TJobPosting.Set_jobLocation(v:IPlace);
Begin
FjobLocation:=v;
End;
function TJobPosting.Get_industry:String;
Begin
result:=Findustry;
End;
procedure TJobPosting.Set_industry(v:String);
Begin
Findustry:=v;
End;
function TJobPosting.Get_responsibilities:String;
Begin
result:=Fresponsibilities;
End;
procedure TJobPosting.Set_responsibilities(v:String);
Begin
Fresponsibilities:=v;
End;
function TJobPosting.Get_salaryCurrency:String;
Begin
result:=FsalaryCurrency;
End;
procedure TJobPosting.Set_salaryCurrency(v:String);
Begin
FsalaryCurrency:=v;
End;
function TJobPosting.Get_experienceRequirements:String;
Begin
result:=FexperienceRequirements;
End;
procedure TJobPosting.Set_experienceRequirements(v:String);
Begin
FexperienceRequirements:=v;
End;
function TJobPosting.Get_workHours:String;
Begin
result:=FworkHours;
End;
procedure TJobPosting.Set_workHours(v:String);
Begin
FworkHours:=v;
End;
function TJobPosting.Get_qualifications:String;
Begin
result:=Fqualifications;
End;
procedure TJobPosting.Set_qualifications(v:String);
Begin
Fqualifications:=v;
End;
function TJobPosting.Get_incentives:String;
Begin
result:=Fincentives;
End;
procedure TJobPosting.Set_incentives(v:String);
Begin
Fincentives:=v;
End;
{*** TPublicationIssue ***}
function TPublicationIssue.Get_pagination:String;
Begin
result:=Fpagination;
End;
procedure TPublicationIssue.Set_pagination(v:String);
Begin
Fpagination:=v;
End;
function TPublicationIssue.Get_issueNumber:Integer;
Begin
result:=FissueNumber;
End;
procedure TPublicationIssue.Set_issueNumber(v:Integer);
Begin
FissueNumber:=v;
End;
function TPublicationIssue.Get_pageStart:String;
Begin
result:=FpageStart;
End;
procedure TPublicationIssue.Set_pageStart(v:String);
Begin
FpageStart:=v;
End;
{*** TTVSeason ***}
function TTVSeason.Get_countryOfOrigin:ICountry;
Begin
result:=FcountryOfOrigin;
End;
procedure TTVSeason.Set_countryOfOrigin(v:ICountry);
Begin
FcountryOfOrigin:=v;
End;
{*** TInvestmentOrDeposit ***}
function TInvestmentOrDeposit.TangInvestmentOrDeposit:TangibleValue;
Begin
result:=''
End;
{*** TVein ***}
function TVein.Get_regionDrained:IAnatomicalStructure;
Begin
result:=FregionDrained;
End;
procedure TVein.Set_regionDrained(v:IAnatomicalStructure);
Begin
FregionDrained:=v;
End;
function TVein.Get_tributary:IAnatomicalStructure;
Begin
result:=Ftributary;
End;
procedure TVein.Set_tributary(v:IAnatomicalStructure);
Begin
Ftributary:=v;
End;
function TVein.Get_drainsTo:IVessel;
Begin
result:=FdrainsTo;
End;
procedure TVein.Set_drainsTo(v:IVessel);
Begin
FdrainsTo:=v;
End;
{*** TWriteAction ***}
function TWriteAction.Get_language:ILanguage;
Begin
result:=Flanguage;
End;
procedure TWriteAction.Set_language(v:ILanguage);
Begin
Flanguage:=v;
End;
{*** TLanguage ***}
function TLanguage.TangLanguage:TangibleValue;
Begin
result:=''
End;
{*** TSellAction ***}
function TSellAction.Get_buyer:IPerson;
Begin
result:=Fbuyer;
End;
procedure TSellAction.Set_buyer(v:IPerson);
Begin
Fbuyer:=v;
End;
{*** TQuestion ***}
function TQuestion.Get_answerCount:Integer;
Begin
result:=FanswerCount;
End;
procedure TQuestion.Set_answerCount(v:Integer);
Begin
FanswerCount:=v;
End;
function TQuestion.Get_acceptedAnswer:IAnswer;
Begin
result:=FacceptedAnswer;
End;
procedure TQuestion.Set_acceptedAnswer(v:IAnswer);
Begin
FacceptedAnswer:=v;
End;
function TQuestion.Get_downvoteCount:Integer;
Begin
result:=FdownvoteCount;
End;
procedure TQuestion.Set_downvoteCount(v:Integer);
Begin
FdownvoteCount:=v;
End;
{*** TComment ***}
function TComment.Get_upvoteCount:Integer;
Begin
result:=FupvoteCount;
End;
procedure TComment.Set_upvoteCount(v:Integer);
Begin
FupvoteCount:=v;
End;
function TComment.Get_parentItem:IQuestion;
Begin
result:=FparentItem;
End;
procedure TComment.Set_parentItem(v:IQuestion);
Begin
FparentItem:=v;
End;
{*** TBedType ***}
function TBedType.TangBedType:TangibleValue;
Begin
result:=''
End;
{*** TTrainTrip ***}
function TTrainTrip.Get_trainNumber:String;
Begin
result:=FtrainNumber;
End;
procedure TTrainTrip.Set_trainNumber(v:String);
Begin
FtrainNumber:=v;
End;
function TTrainTrip.Get_departurePlatform:String;
Begin
result:=FdeparturePlatform;
End;
procedure TTrainTrip.Set_departurePlatform(v:String);
Begin
FdeparturePlatform:=v;
End;
function TTrainTrip.Get_arrivalStation:ITrainStation;
Begin
result:=FarrivalStation;
End;
procedure TTrainTrip.Set_arrivalStation(v:ITrainStation);
Begin
FarrivalStation:=v;
End;
function TTrainTrip.Get_arrivalTime:TDateTime;
Begin
result:=FarrivalTime;
End;
procedure TTrainTrip.Set_arrivalTime(v:TDateTime);
Begin
FarrivalTime:=v;
End;
function TTrainTrip.Get_arrivalPlatform:String;
Begin
result:=FarrivalPlatform;
End;
procedure TTrainTrip.Set_arrivalPlatform(v:String);
Begin
FarrivalPlatform:=v;
End;
function TTrainTrip.Get_departureStation:ITrainStation;
Begin
result:=FdepartureStation;
End;
procedure TTrainTrip.Set_departureStation(v:ITrainStation);
Begin
FdepartureStation:=v;
End;
function TTrainTrip.Get_trainName:String;
Begin
result:=FtrainName;
End;
procedure TTrainTrip.Set_trainName(v:String);
Begin
FtrainName:=v;
End;
{*** TSportsOrganization ***}
function TSportsOrganization.Get_sport:String;
Begin
result:=Fsport;
End;
procedure TSportsOrganization.Set_sport(v:String);
Begin
Fsport:=v;
End;
{*** TSportsTeam ***}
function TSportsTeam.Get_athlete:IPerson;
Begin
result:=Fathlete;
End;
procedure TSportsTeam.Set_athlete(v:IPerson);
Begin
Fathlete:=v;
End;
function TSportsTeam.Get_coach:IPerson;
Begin
result:=Fcoach;
End;
procedure TSportsTeam.Set_coach(v:IPerson);
Begin
Fcoach:=v;
End;
{*** TJoint ***}
function TJoint.Get_functionalClass:String;
Begin
result:=FfunctionalClass;
End;
procedure TJoint.Set_functionalClass(v:String);
Begin
FfunctionalClass:=v;
End;
function TJoint.Get_structuralClass:String;
Begin
result:=FstructuralClass;
End;
procedure TJoint.Set_structuralClass(v:String);
Begin
FstructuralClass:=v;
End;
function TJoint.Get_biomechnicalClass:String;
Begin
result:=FbiomechnicalClass;
End;
procedure TJoint.Set_biomechnicalClass(v:String);
Begin
FbiomechnicalClass:=v;
End;
{*** TDiagnosticLab ***}
function TDiagnosticLab.Get_availableTest:IMedicalTest;
Begin
result:=FavailableTest;
End;
procedure TDiagnosticLab.Set_availableTest(v:IMedicalTest);
Begin
FavailableTest:=v;
End;
{*** TCourse ***}
function TCourse.Get_hasCourseInstance:ICourseInstance;
Begin
result:=FhasCourseInstance;
End;
procedure TCourse.Set_hasCourseInstance(v:ICourseInstance);
Begin
FhasCourseInstance:=v;
End;
function TCourse.Get_courseCode:String;
Begin
result:=FcourseCode;
End;
procedure TCourse.Set_courseCode(v:String);
Begin
FcourseCode:=v;
End;
function TCourse.Get_educationalCredentialAwarded:String;
Begin
result:=FeducationalCredentialAwarded;
End;
procedure TCourse.Set_educationalCredentialAwarded(v:String);
Begin
FeducationalCredentialAwarded:=v;
End;
function TCourse.Get_coursePrerequisites:ICourse;
Begin
result:=FcoursePrerequisites;
End;
procedure TCourse.Set_coursePrerequisites(v:ICourse);
Begin
FcoursePrerequisites:=v;
End;
{*** TCourseInstance ***}
function TCourseInstance.Get_instructor:IPerson;
Begin
result:=Finstructor;
End;
procedure TCourseInstance.Set_instructor(v:IPerson);
Begin
Finstructor:=v;
End;
function TCourseInstance.Get_courseMode:String;
Begin
result:=FcourseMode;
End;
procedure TCourseInstance.Set_courseMode(v:String);
Begin
FcourseMode:=v;
End;
{*** TReplaceAction ***}
function TReplaceAction.Get_replacee:IThing;
Begin
result:=Freplacee;
End;
procedure TReplaceAction.Set_replacee(v:IThing);
Begin
Freplacee:=v;
End;
function TReplaceAction.Get_replacer:IThing;
Begin
result:=Freplacer;
End;
procedure TReplaceAction.Set_replacer(v:IThing);
Begin
Freplacer:=v;
End;
{*** TPublicationVolume ***}
function TPublicationVolume.Get_volumeNumber:String;
Begin
result:=FvolumeNumber;
End;
procedure TPublicationVolume.Set_volumeNumber(v:String);
Begin
FvolumeNumber:=v;
End;
{*** TRestrictedDiet ***}
function TRestrictedDiet.TangRestrictedDiet:TangibleValue;
Begin
result:=''
End;
{*** TLoseAction ***}
function TLoseAction.Get_winner:IPerson;
Begin
result:=Fwinner;
End;
procedure TLoseAction.Set_winner(v:IPerson);
Begin
Fwinner:=v;
End;
{*** TPhysician ***}
function TPhysician.Get_hospitalAffiliation:IHospital;
Begin
result:=FhospitalAffiliation;
End;
procedure TPhysician.Set_hospitalAffiliation(v:IHospital);
Begin
FhospitalAffiliation:=v;
End;
function TPhysician.Get_availableService:IMedicalTest;
Begin
result:=FavailableService;
End;
procedure TPhysician.Set_availableService(v:IMedicalTest);
Begin
FavailableService:=v;
End;
{*** TExercisePlan ***}
function TExercisePlan.Get_workload:IQualitativeValue;
Begin
result:=Fworkload;
End;
procedure TExercisePlan.Set_workload(v:IQualitativeValue);
Begin
Fworkload:=v;
End;
function TExercisePlan.Get_activityDuration:IQualitativeValue;
Begin
result:=FactivityDuration;
End;
procedure TExercisePlan.Set_activityDuration(v:IQualitativeValue);
Begin
FactivityDuration:=v;
End;
function TExercisePlan.Get_restPeriods:String;
Begin
result:=FrestPeriods;
End;
procedure TExercisePlan.Set_restPeriods(v:String);
Begin
FrestPeriods:=v;
End;
function TExercisePlan.Get_repetitions:IQualitativeValue;
Begin
result:=Frepetitions;
End;
procedure TExercisePlan.Set_repetitions(v:IQualitativeValue);
Begin
Frepetitions:=v;
End;
function TExercisePlan.Get_intensity:String;
Begin
result:=Fintensity;
End;
procedure TExercisePlan.Set_intensity(v:String);
Begin
Fintensity:=v;
End;
function TExercisePlan.Get_additionalVariable:String;
Begin
result:=FadditionalVariable;
End;
procedure TExercisePlan.Set_additionalVariable(v:String);
Begin
FadditionalVariable:=v;
End;
function TExercisePlan.Get_activityFrequency:IQualitativeValue;
Begin
result:=FactivityFrequency;
End;
procedure TExercisePlan.Set_activityFrequency(v:IQualitativeValue);
Begin
FactivityFrequency:=v;
End;
{*** TMusicReleaseFormatType ***}
function TMusicReleaseFormatType.TangMusicReleaseFormatType:TangibleValue;
Begin
result:=''
End;
{*** TAirline ***}
function TAirline.Get_iataCode:String;
Begin
result:=FiataCode;
End;
procedure TAirline.Set_iataCode(v:String);
Begin
FiataCode:=v;
End;
{*** TOrder ***}
function TOrder.Get_partOfInvoice:IInvoice;
Begin
result:=FpartOfInvoice;
End;
procedure TOrder.Set_partOfInvoice(v:IInvoice);
Begin
FpartOfInvoice:=v;
End;
function TOrder.Get_discount:INumber;
Begin
result:=Fdiscount;
End;
procedure TOrder.Set_discount(v:INumber);
Begin
Fdiscount:=v;
End;
function TOrder.Get_discountCurrency:String;
Begin
result:=FdiscountCurrency;
End;
procedure TOrder.Set_discountCurrency(v:String);
Begin
FdiscountCurrency:=v;
End;
function TOrder.Get_orderStatus:IOrderStatus;
Begin
result:=ForderStatus;
End;
procedure TOrder.Set_orderStatus(v:IOrderStatus);
Begin
ForderStatus:=v;
End;
function TOrder.Get_merchant:IPerson;
Begin
result:=Fmerchant;
End;
procedure TOrder.Set_merchant(v:IPerson);
Begin
Fmerchant:=v;
End;
function TOrder.Get_acceptedOffer:IOffer;
Begin
result:=FacceptedOffer;
End;
procedure TOrder.Set_acceptedOffer(v:IOffer);
Begin
FacceptedOffer:=v;
End;
function TOrder.Get_discountCode:String;
Begin
result:=FdiscountCode;
End;
procedure TOrder.Set_discountCode(v:String);
Begin
FdiscountCode:=v;
End;
function TOrder.Get_paymentUrl:String;
Begin
result:=FpaymentUrl;
End;
procedure TOrder.Set_paymentUrl(v:String);
Begin
FpaymentUrl:=v;
End;
function TOrder.Get_orderDate:TDateTime;
Begin
result:=ForderDate;
End;
procedure TOrder.Set_orderDate(v:TDateTime);
Begin
ForderDate:=v;
End;
function TOrder.Get_billingAddress:IPostalAddress;
Begin
result:=FbillingAddress;
End;
procedure TOrder.Set_billingAddress(v:IPostalAddress);
Begin
FbillingAddress:=v;
End;
function TOrder.Get_orderedItem:IOrderItem;
Begin
result:=ForderedItem;
End;
procedure TOrder.Set_orderedItem(v:IOrderItem);
Begin
ForderedItem:=v;
End;
function TOrder.Get_orderDelivery:IParcelDelivery;
Begin
result:=ForderDelivery;
End;
procedure TOrder.Set_orderDelivery(v:IParcelDelivery);
Begin
ForderDelivery:=v;
End;
function TOrder.Get_confirmationNumber:String;
Begin
result:=FconfirmationNumber;
End;
procedure TOrder.Set_confirmationNumber(v:String);
Begin
FconfirmationNumber:=v;
End;
function TOrder.Get_isGift:Boolean;
Begin
result:=FisGift;
End;
procedure TOrder.Set_isGift(v:Boolean);
Begin
FisGift:=v;
End;
function TOrder.Get_orderNumber:String;
Begin
result:=ForderNumber;
End;
procedure TOrder.Set_orderNumber(v:String);
Begin
ForderNumber:=v;
End;
{*** TInvoice ***}
function TInvoice.Get_paymentDue:TDateTime;
Begin
result:=FpaymentDue;
End;
procedure TInvoice.Set_paymentDue(v:TDateTime);
Begin
FpaymentDue:=v;
End;
function TInvoice.Get_paymentMethod:IPaymentMethod;
Begin
result:=FpaymentMethod;
End;
procedure TInvoice.Set_paymentMethod(v:IPaymentMethod);
Begin
FpaymentMethod:=v;
End;
function TInvoice.Get_minimumPaymentDue:IPriceSpecification;
Begin
result:=FminimumPaymentDue;
End;
procedure TInvoice.Set_minimumPaymentDue(v:IPriceSpecification);
Begin
FminimumPaymentDue:=v;
End;
function TInvoice.Get_paymentMethodId:String;
Begin
result:=FpaymentMethodId;
End;
procedure TInvoice.Set_paymentMethodId(v:String);
Begin
FpaymentMethodId:=v;
End;
function TInvoice.Get_scheduledPaymentDate:TDateTime;
Begin
result:=FscheduledPaymentDate;
End;
procedure TInvoice.Set_scheduledPaymentDate(v:TDateTime);
Begin
FscheduledPaymentDate:=v;
End;
function TInvoice.Get_accountId:String;
Begin
result:=FaccountId;
End;
procedure TInvoice.Set_accountId(v:String);
Begin
FaccountId:=v;
End;
function TInvoice.Get_referencesOrder:IOrder;
Begin
result:=FreferencesOrder;
End;
procedure TInvoice.Set_referencesOrder(v:IOrder);
Begin
FreferencesOrder:=v;
End;
function TInvoice.Get_paymentStatus:IPaymentStatusType;
Begin
result:=FpaymentStatus;
End;
procedure TInvoice.Set_paymentStatus(v:IPaymentStatusType);
Begin
FpaymentStatus:=v;
End;
function TInvoice.Get_customer:IOrganization;
Begin
result:=Fcustomer;
End;
procedure TInvoice.Set_customer(v:IOrganization);
Begin
Fcustomer:=v;
End;
function TInvoice.Get_totalPaymentDue:IMonetaryAmount;
Begin
result:=FtotalPaymentDue;
End;
procedure TInvoice.Set_totalPaymentDue(v:IMonetaryAmount);
Begin
FtotalPaymentDue:=v;
End;
function TInvoice.Get_billingPeriod:IDuration;
Begin
result:=FbillingPeriod;
End;
procedure TInvoice.Set_billingPeriod(v:IDuration);
Begin
FbillingPeriod:=v;
End;
{*** TPaymentStatusType ***}
function TPaymentStatusType.TangPaymentStatusType:TangibleValue;
Begin
result:=''
End;
{*** TMonetaryAmount ***}
function TMonetaryAmount.Get_value:IStructuredValue;
Begin
result:=Fvalue;
End;
procedure TMonetaryAmount.Set_value(v:IStructuredValue);
Begin
Fvalue:=v;
End;
{*** TOrderStatus ***}
function TOrderStatus.TangOrderStatus:TangibleValue;
Begin
result:=''
End;
{*** TOrderItem ***}
function TOrderItem.Get_orderQuantity:INumber;
Begin
result:=ForderQuantity;
End;
procedure TOrderItem.Set_orderQuantity(v:INumber);
Begin
ForderQuantity:=v;
End;
function TOrderItem.Get_orderItemStatus:IOrderStatus;
Begin
result:=ForderItemStatus;
End;
procedure TOrderItem.Set_orderItemStatus(v:IOrderStatus);
Begin
ForderItemStatus:=v;
End;
function TOrderItem.Get_orderItemNumber:String;
Begin
result:=ForderItemNumber;
End;
procedure TOrderItem.Set_orderItemNumber(v:String);
Begin
ForderItemNumber:=v;
End;
{*** TParcelDelivery ***}
function TParcelDelivery.Get_trackingNumber:String;
Begin
result:=FtrackingNumber;
End;
procedure TParcelDelivery.Set_trackingNumber(v:String);
Begin
FtrackingNumber:=v;
End;
function TParcelDelivery.Get_partOfOrder:IOrder;
Begin
result:=FpartOfOrder;
End;
procedure TParcelDelivery.Set_partOfOrder(v:IOrder);
Begin
FpartOfOrder:=v;
End;
function TParcelDelivery.Get_expectedArrivalFrom:TDateTime;
Begin
result:=FexpectedArrivalFrom;
End;
procedure TParcelDelivery.Set_expectedArrivalFrom(v:TDateTime);
Begin
FexpectedArrivalFrom:=v;
End;
function TParcelDelivery.Get_hasDeliveryMethod:IDeliveryMethod;
Begin
result:=FhasDeliveryMethod;
End;
procedure TParcelDelivery.Set_hasDeliveryMethod(v:IDeliveryMethod);
Begin
FhasDeliveryMethod:=v;
End;
function TParcelDelivery.Get_itemShipped:IProduct;
Begin
result:=FitemShipped;
End;
procedure TParcelDelivery.Set_itemShipped(v:IProduct);
Begin
FitemShipped:=v;
End;
function TParcelDelivery.Get_deliveryAddress:IPostalAddress;
Begin
result:=FdeliveryAddress;
End;
procedure TParcelDelivery.Set_deliveryAddress(v:IPostalAddress);
Begin
FdeliveryAddress:=v;
End;
function TParcelDelivery.Get_deliveryStatus:IDeliveryEvent;
Begin
result:=FdeliveryStatus;
End;
procedure TParcelDelivery.Set_deliveryStatus(v:IDeliveryEvent);
Begin
FdeliveryStatus:=v;
End;
function TParcelDelivery.Get_originAddress:IPostalAddress;
Begin
result:=ForiginAddress;
End;
procedure TParcelDelivery.Set_originAddress(v:IPostalAddress);
Begin
ForiginAddress:=v;
End;
function TParcelDelivery.Get_trackingUrl:String;
Begin
result:=FtrackingUrl;
End;
procedure TParcelDelivery.Set_trackingUrl(v:String);
Begin
FtrackingUrl:=v;
End;
function TParcelDelivery.Get_expectedArrivalUntil:TDateTime;
Begin
result:=FexpectedArrivalUntil;
End;
procedure TParcelDelivery.Set_expectedArrivalUntil(v:TDateTime);
Begin
FexpectedArrivalUntil:=v;
End;
{*** TDeliveryEvent ***}
function TDeliveryEvent.Get_accessCode:String;
Begin
result:=FaccessCode;
End;
procedure TDeliveryEvent.Set_accessCode(v:String);
Begin
FaccessCode:=v;
End;
function TDeliveryEvent.Get_availableFrom:TDateTime;
Begin
result:=FavailableFrom;
End;
procedure TDeliveryEvent.Set_availableFrom(v:TDateTime);
Begin
FavailableFrom:=v;
End;
function TDeliveryEvent.Get_availableThrough:TDateTime;
Begin
result:=FavailableThrough;
End;
procedure TDeliveryEvent.Set_availableThrough(v:TDateTime);
Begin
FavailableThrough:=v;
End;
{*** TEndorseAction ***}
function TEndorseAction.Get_endorsee:IOrganization;
Begin
result:=Fendorsee;
End;
procedure TEndorseAction.Set_endorsee(v:IOrganization);
Begin
Fendorsee:=v;
End;
{*** TDatedMoneySpecification ***}
function TDatedMoneySpecification.Get_currency:String;
Begin
result:=Fcurrency;
End;
procedure TDatedMoneySpecification.Set_currency(v:String);
Begin
Fcurrency:=v;
End;
{*** TQuotation ***}
function TQuotation.Get_spokenByCharacter:IOrganization;
Begin
result:=FspokenByCharacter;
End;
procedure TQuotation.Set_spokenByCharacter(v:IOrganization);
Begin
FspokenByCharacter:=v;
End;
{*** TMedicalWebPage ***}
function TMedicalWebPage.Get_aspect:String;
Begin
result:=Faspect;
End;
procedure TMedicalWebPage.Set_aspect(v:String);
Begin
Faspect:=v;
End;
{*** TMedicalTestPanel ***}
function TMedicalTestPanel.Get_subTest:IMedicalTest;
Begin
result:=FsubTest;
End;
procedure TMedicalTestPanel.Set_subTest(v:IMedicalTest);
Begin
FsubTest:=v;
End;
{*** TMuscle ***}
function TMuscle.Get_nerve:INerve;
Begin
result:=Fnerve;
End;
procedure TMuscle.Set_nerve(v:INerve);
Begin
Fnerve:=v;
End;
function TMuscle.Get_origin:IAnatomicalStructure;
Begin
result:=Forigin;
End;
procedure TMuscle.Set_origin(v:IAnatomicalStructure);
Begin
Forigin:=v;
End;
function TMuscle.Get_action:String;
Begin
result:=Faction;
End;
procedure TMuscle.Set_action(v:String);
Begin
Faction:=v;
End;
function TMuscle.Get_bloodSupply:IVessel;
Begin
result:=FbloodSupply;
End;
procedure TMuscle.Set_bloodSupply(v:IVessel);
Begin
FbloodSupply:=v;
End;
function TMuscle.Get_insertion:IAnatomicalStructure;
Begin
result:=Finsertion;
End;
procedure TMuscle.Set_insertion(v:IAnatomicalStructure);
Begin
Finsertion:=v;
End;
function TMuscle.Get_antagonist:IMuscle;
Begin
result:=Fantagonist;
End;
procedure TMuscle.Set_antagonist(v:IMuscle);
Begin
Fantagonist:=v;
End;
function TMuscle.Get_muscleAction:String;
Begin
result:=FmuscleAction;
End;
procedure TMuscle.Set_muscleAction(v:String);
Begin
FmuscleAction:=v;
End;
{*** TNerve ***}
function TNerve.Get_sourcedFrom:IBrainStructure;
Begin
result:=FsourcedFrom;
End;
procedure TNerve.Set_sourcedFrom(v:IBrainStructure);
Begin
FsourcedFrom:=v;
End;
function TNerve.Get_branch:IAnatomicalStructure;
Begin
result:=Fbranch;
End;
procedure TNerve.Set_branch(v:IAnatomicalStructure);
Begin
Fbranch:=v;
End;
function TNerve.Get_nerveMotor:IMuscle;
Begin
result:=FnerveMotor;
End;
procedure TNerve.Set_nerveMotor(v:IMuscle);
Begin
FnerveMotor:=v;
End;
function TNerve.Get_sensoryUnit:IAnatomicalStructure;
Begin
result:=FsensoryUnit;
End;
procedure TNerve.Set_sensoryUnit(v:IAnatomicalStructure);
Begin
FsensoryUnit:=v;
End;
{*** TSendAction ***}
function TSendAction.Get_deliveryMethod:IDeliveryMethod;
Begin
result:=FdeliveryMethod;
End;
procedure TSendAction.Set_deliveryMethod(v:IDeliveryMethod);
Begin
FdeliveryMethod:=v;
End;
{*** TPaymentChargeSpecification ***}
function TPaymentChargeSpecification.Get_appliesToDeliveryMethod:IDeliveryMethod;
Begin
result:=FappliesToDeliveryMethod;
End;
procedure TPaymentChargeSpecification.Set_appliesToDeliveryMethod(v:IDeliveryMethod);
Begin
FappliesToDeliveryMethod:=v;
End;
function TPaymentChargeSpecification.Get_appliesToPaymentMethod:IPaymentMethod;
Begin
result:=FappliesToPaymentMethod;
End;
procedure TPaymentChargeSpecification.Set_appliesToPaymentMethod(v:IPaymentMethod);
Begin
FappliesToPaymentMethod:=v;
End;
{*** TInfectiousAgentClass ***}
function TInfectiousAgentClass.TangInfectiousAgentClass:TangibleValue;
Begin
result:=''
End;
{*** TArtery ***}
function TArtery.Get_supplyTo:IAnatomicalStructure;
Begin
result:=FsupplyTo;
End;
procedure TArtery.Set_supplyTo(v:IAnatomicalStructure);
Begin
FsupplyTo:=v;
End;
function TArtery.Get_source:IAnatomicalStructure;
Begin
result:=Fsource;
End;
procedure TArtery.Set_source(v:IAnatomicalStructure);
Begin
Fsource:=v;
End;
{*** TLiveBlogPosting ***}
function TLiveBlogPosting.Get_coverageEndTime:TDateTime;
Begin
result:=FcoverageEndTime;
End;
procedure TLiveBlogPosting.Set_coverageEndTime(v:TDateTime);
Begin
FcoverageEndTime:=v;
End;
function TLiveBlogPosting.Get_liveBlogUpdate:IBlogPosting;
Begin
result:=FliveBlogUpdate;
End;
procedure TLiveBlogPosting.Set_liveBlogUpdate(v:IBlogPosting);
Begin
FliveBlogUpdate:=v;
End;
function TLiveBlogPosting.Get_coverageStartTime:TDateTime;
Begin
result:=FcoverageStartTime;
End;
procedure TLiveBlogPosting.Set_coverageStartTime(v:TDateTime);
Begin
FcoverageStartTime:=v;
End;
{*** TMedicalObservationalStudy ***}
function TMedicalObservationalStudy.Get_studyDesign:IMedicalObservationalStudyDesign;
Begin
result:=FstudyDesign;
End;
procedure TMedicalObservationalStudy.Set_studyDesign(v:IMedicalObservationalStudyDesign);
Begin
FstudyDesign:=v;
End;
{*** TMedicalObservationalStudyDesign ***}
function TMedicalObservationalStudyDesign.TangMedicalObservationalStudyDesign:TangibleValue;
Begin
result:=''
End;
{*** TSearchAction ***}
function TSearchAction.Get_query:String;
Begin
result:=Fquery;
End;
procedure TSearchAction.Set_query(v:String);
Begin
Fquery:=v;
End;
{*** TRole ***}
function TRole.Get_namedPosition:String;
Begin
result:=FnamedPosition;
End;
procedure TRole.Set_namedPosition(v:String);
Begin
FnamedPosition:=v;
End;
function TRole.Get_endDate:TDateTime;
Begin
result:=FendDate;
End;
procedure TRole.Set_endDate(v:TDateTime);
Begin
FendDate:=v;
End;
{*** TOrganizationRole ***}
function TOrganizationRole.Get_numberedPosition:INumber;
Begin
result:=FnumberedPosition;
End;
procedure TOrganizationRole.Set_numberedPosition(v:INumber);
Begin
FnumberedPosition:=v;
End;
{*** TEmployeeRole ***}
function TEmployeeRole.Get_baseSalary:INumber;
Begin
result:=FbaseSalary;
End;
procedure TEmployeeRole.Set_baseSalary(v:INumber);
Begin
FbaseSalary:=v;
End;
{*** TMap ***}
function TMap.Get_mapType:IMapCategoryType;
Begin
result:=FmapType;
End;
procedure TMap.Set_mapType(v:IMapCategoryType);
Begin
FmapType:=v;
End;
{*** TMapCategoryType ***}
function TMapCategoryType.TangMapCategoryType:TangibleValue;
Begin
result:=''
End;
{*** TRsvpAction ***}
function TRsvpAction.Get_rsvpResponse:IRsvpResponseType;
Begin
result:=FrsvpResponse;
End;
procedure TRsvpAction.Set_rsvpResponse(v:IRsvpResponseType);
Begin
FrsvpResponse:=v;
End;
function TRsvpAction.Get_comment:IComment;
Begin
result:=Fcomment;
End;
procedure TRsvpAction.Set_comment(v:IComment);
Begin
Fcomment:=v;
End;
function TRsvpAction.Get_additionalNumberOfGuests:INumber;
Begin
result:=FadditionalNumberOfGuests;
End;
procedure TRsvpAction.Set_additionalNumberOfGuests(v:INumber);
Begin
FadditionalNumberOfGuests:=v;
End;
{*** TRsvpResponseType ***}
function TRsvpResponseType.TangRsvpResponseType:TangibleValue;
Begin
result:=''
End;
{*** TEnergy ***}
function TEnergy.TangEnergy:TangibleValue;
Begin
result:=''
End;
{*** TWarrantyScope ***}
function TWarrantyScope.TangWarrantyScope:TangibleValue;
Begin
result:=''
End;
{*** TLendAction ***}
function TLendAction.Get_borrower:IPerson;
Begin
result:=Fborrower;
End;
procedure TLendAction.Set_borrower(v:IPerson);
Begin
Fborrower:=v;
End;
{*** TGame ***}
function TGame.Get_characterAttribute:IThing;
Begin
result:=FcharacterAttribute;
End;
procedure TGame.Set_characterAttribute(v:IThing);
Begin
FcharacterAttribute:=v;
End;
{*** TCorporation ***}
function TCorporation.Get_tickerSymbol:String;
Begin
result:=FtickerSymbol;
End;
procedure TCorporation.Set_tickerSymbol(v:String);
Begin
FtickerSymbol:=v;
End;
{*** TProperty ***}
function TProperty.Get_supersededBy:IEnumeration;
Begin
result:=FsupersededBy;
End;
procedure TProperty.Set_supersededBy(v:IEnumeration);
Begin
FsupersededBy:=v;
End;
function TProperty.Get_inverseOf:IProperty;
Begin
result:=FinverseOf;
End;
procedure TProperty.Set_inverseOf(v:IProperty);
Begin
FinverseOf:=v;
End;
function TProperty.Get_domainIncludes:IClass;
Begin
result:=FdomainIncludes;
End;
procedure TProperty.Set_domainIncludes(v:IClass);
Begin
FdomainIncludes:=v;
End;
function TProperty.Get_rangeIncludes:IClass;
Begin
result:=FrangeIncludes;
End;
procedure TProperty.Set_rangeIncludes(v:IClass);
Begin
FrangeIncludes:=v;
End;
{*** TClass ***}
function TClass.TangClass:TangibleValue;
Begin
result:=''
End;
{*** TExerciseAction ***}
function TExerciseAction.Get_fromLocation:IPlace;
Begin
result:=FfromLocation;
End;
procedure TExerciseAction.Set_fromLocation(v:IPlace);
Begin
FfromLocation:=v;
End;
function TExerciseAction.Get_course:IPlace;
Begin
result:=Fcourse;
End;
procedure TExerciseAction.Set_course(v:IPlace);
Begin
Fcourse:=v;
End;
function TExerciseAction.Get_sportsTeam:ISportsTeam;
Begin
result:=FsportsTeam;
End;
procedure TExerciseAction.Set_sportsTeam(v:ISportsTeam);
Begin
FsportsTeam:=v;
End;
function TExerciseAction.Get_distance:IDistance;
Begin
result:=Fdistance;
End;
procedure TExerciseAction.Set_distance(v:IDistance);
Begin
Fdistance:=v;
End;
function TExerciseAction.Get_sportsActivityLocation:ISportsActivityLocation;
Begin
result:=FsportsActivityLocation;
End;
procedure TExerciseAction.Set_sportsActivityLocation(v:ISportsActivityLocation);
Begin
FsportsActivityLocation:=v;
End;
function TExerciseAction.Get_opponent:IPerson;
Begin
result:=Fopponent;
End;
procedure TExerciseAction.Set_opponent(v:IPerson);
Begin
Fopponent:=v;
End;
function TExerciseAction.Get_sportsEvent:ISportsEvent;
Begin
result:=FsportsEvent;
End;
procedure TExerciseAction.Set_sportsEvent(v:ISportsEvent);
Begin
FsportsEvent:=v;
End;
function TExerciseAction.Get_exercisePlan:IExercisePlan;
Begin
result:=FexercisePlan;
End;
procedure TExerciseAction.Set_exercisePlan(v:IExercisePlan);
Begin
FexercisePlan:=v;
End;
function TExerciseAction.Get_diet:IDiet;
Begin
result:=Fdiet;
End;
procedure TExerciseAction.Set_diet(v:IDiet);
Begin
Fdiet:=v;
End;
function TExerciseAction.Get_exerciseRelatedDiet:IDiet;
Begin
result:=FexerciseRelatedDiet;
End;
procedure TExerciseAction.Set_exerciseRelatedDiet(v:IDiet);
Begin
FexerciseRelatedDiet:=v;
End;
function TExerciseAction.Get_exerciseType:String;
Begin
result:=FexerciseType;
End;
procedure TExerciseAction.Set_exerciseType(v:String);
Begin
FexerciseType:=v;
End;
{*** TSportsEvent ***}
function TSportsEvent.Get_homeTeam:ISportsTeam;
Begin
result:=FhomeTeam;
End;
procedure TSportsEvent.Set_homeTeam(v:ISportsTeam);
Begin
FhomeTeam:=v;
End;
function TSportsEvent.Get_awayTeam:IPerson;
Begin
result:=FawayTeam;
End;
procedure TSportsEvent.Set_awayTeam(v:IPerson);
Begin
FawayTeam:=v;
End;
{*** TDiet ***}
function TDiet.Get_dietFeatures:String;
Begin
result:=FdietFeatures;
End;
procedure TDiet.Set_dietFeatures(v:String);
Begin
FdietFeatures:=v;
End;
function TDiet.Get_expertConsiderations:String;
Begin
result:=FexpertConsiderations;
End;
procedure TDiet.Set_expertConsiderations(v:String);
Begin
FexpertConsiderations:=v;
End;
function TDiet.Get_overview:String;
Begin
result:=Foverview;
End;
procedure TDiet.Set_overview(v:String);
Begin
Foverview:=v;
End;
function TDiet.Get_endorsers:IOrganization;
Begin
result:=Fendorsers;
End;
procedure TDiet.Set_endorsers(v:IOrganization);
Begin
Fendorsers:=v;
End;
function TDiet.Get_risks:String;
Begin
result:=Frisks;
End;
procedure TDiet.Set_risks(v:String);
Begin
Frisks:=v;
End;
function TDiet.Get_physiologicalBenefits:String;
Begin
result:=FphysiologicalBenefits;
End;
procedure TDiet.Set_physiologicalBenefits(v:String);
Begin
FphysiologicalBenefits:=v;
End;
{*** TAudiobook ***}
function TAudiobook.Get_readBy:IPerson;
Begin
result:=FreadBy;
End;
procedure TAudiobook.Set_readBy(v:IPerson);
Begin
FreadBy:=v;
End;
{*** TBook ***}
function TBook.Get_abridged:Boolean;
Begin
result:=Fabridged;
End;
procedure TBook.Set_abridged(v:Boolean);
Begin
Fabridged:=v;
End;
function TBook.Get_isbn:String;
Begin
result:=Fisbn;
End;
procedure TBook.Set_isbn(v:String);
Begin
Fisbn:=v;
End;
function TBook.Get_bookFormat:IBookFormatType;
Begin
result:=FbookFormat;
End;
procedure TBook.Set_bookFormat(v:IBookFormatType);
Begin
FbookFormat:=v;
End;
function TBook.Get_bookEdition:String;
Begin
result:=FbookEdition;
End;
procedure TBook.Set_bookEdition(v:String);
Begin
FbookEdition:=v;
End;
function TBook.Get_numberOfPages:Integer;
Begin
result:=FnumberOfPages;
End;
procedure TBook.Set_numberOfPages(v:Integer);
Begin
FnumberOfPages:=v;
End;
function TBook.Get_illustrator:IPerson;
Begin
result:=Fillustrator;
End;
procedure TBook.Set_illustrator(v:IPerson);
Begin
Fillustrator:=v;
End;
{*** TBookFormatType ***}
function TBookFormatType.TangBookFormatType:TangibleValue;
Begin
result:=''
End;
{*** TBroadcastEvent ***}
function TBroadcastEvent.Get_broadcastOfEvent:IEvent;
Begin
result:=FbroadcastOfEvent;
End;
procedure TBroadcastEvent.Set_broadcastOfEvent(v:IEvent);
Begin
FbroadcastOfEvent:=v;
End;
function TBroadcastEvent.Get_isLiveBroadcast:Boolean;
Begin
result:=FisLiveBroadcast;
End;
procedure TBroadcastEvent.Set_isLiveBroadcast(v:Boolean);
Begin
FisLiveBroadcast:=v;
End;
{*** TWarrantyPromise ***}
function TWarrantyPromise.Get_warrantyScope:IWarrantyScope;
Begin
result:=FwarrantyScope;
End;
procedure TWarrantyPromise.Set_warrantyScope(v:IWarrantyScope);
Begin
FwarrantyScope:=v;
End;
function TWarrantyPromise.Get_durationOfWarranty:IQuantitativeValue;
Begin
result:=FdurationOfWarranty;
End;
procedure TWarrantyPromise.Set_durationOfWarranty(v:IQuantitativeValue);
Begin
FdurationOfWarranty:=v;
End;
{*** TDataFeedItem ***}
function TDataFeedItem.Get_dateDeleted:TDateTime;
Begin
result:=FdateDeleted;
End;
procedure TDataFeedItem.Set_dateDeleted(v:TDateTime);
Begin
FdateDeleted:=v;
End;
function TDataFeedItem.Get_dateCreated:TDateTime;
Begin
result:=FdateCreated;
End;
procedure TDataFeedItem.Set_dateCreated(v:TDateTime);
Begin
FdateCreated:=v;
End;
function TDataFeedItem.Get_dateModified:TDateTime;
Begin
result:=FdateModified;
End;
procedure TDataFeedItem.Set_dateModified(v:TDateTime);
Begin
FdateModified:=v;
End;
{*** TGameServer ***}
function TGameServer.Get_playersOnline:Integer;
Begin
result:=FplayersOnline;
End;
procedure TGameServer.Set_playersOnline(v:Integer);
Begin
FplayersOnline:=v;
End;
function TGameServer.Get_serverStatus:IGameServerStatus;
Begin
result:=FserverStatus;
End;
procedure TGameServer.Set_serverStatus(v:IGameServerStatus);
Begin
FserverStatus:=v;
End;
{*** TGameServerStatus ***}
function TGameServerStatus.TangGameServerStatus:TangibleValue;
Begin
result:=''
End;
{*** TOwnershipInfo ***}
function TOwnershipInfo.Get_ownedThrough:TDateTime;
Begin
result:=FownedThrough;
End;
procedure TOwnershipInfo.Set_ownedThrough(v:TDateTime);
Begin
FownedThrough:=v;
End;
function TOwnershipInfo.Get_ownedFrom:TDateTime;
Begin
result:=FownedFrom;
End;
procedure TOwnershipInfo.Set_ownedFrom(v:TDateTime);
Begin
FownedFrom:=v;
End;
function TOwnershipInfo.Get_acquiredFrom:IPerson;
Begin
result:=FacquiredFrom;
End;
procedure TOwnershipInfo.Set_acquiredFrom(v:IPerson);
Begin
FacquiredFrom:=v;
End;
{*** TTaxiReservation ***}
function TTaxiReservation.Get_partySize:Integer;
Begin
result:=FpartySize;
End;
procedure TTaxiReservation.Set_partySize(v:Integer);
Begin
FpartySize:=v;
End;
function TTaxiReservation.Get_pickupLocation:IPlace;
Begin
result:=FpickupLocation;
End;
procedure TTaxiReservation.Set_pickupLocation(v:IPlace);
Begin
FpickupLocation:=v;
End;
function TTaxiReservation.Get_pickupTime:TDateTime;
Begin
result:=FpickupTime;
End;
procedure TTaxiReservation.Set_pickupTime(v:TDateTime);
Begin
FpickupTime:=v;
End;
{*** THealthPlanCostSharingSpecification ***}
function THealthPlanCostSharingSpecification.Get_healthPlanCopay:IPriceSpecification;
Begin
result:=FhealthPlanCopay;
End;
procedure THealthPlanCostSharingSpecification.Set_healthPlanCopay(v:IPriceSpecification);
Begin
FhealthPlanCopay:=v;
End;
function THealthPlanCostSharingSpecification.Get_healthPlanPharmacyCategory:String;
Begin
result:=FhealthPlanPharmacyCategory;
End;
procedure THealthPlanCostSharingSpecification.Set_healthPlanPharmacyCategory(v:String);
Begin
FhealthPlanPharmacyCategory:=v;
End;
function THealthPlanCostSharingSpecification.Get_healthPlanCoinsuranceOption:String;
Begin
result:=FhealthPlanCoinsuranceOption;
End;
procedure THealthPlanCostSharingSpecification.Set_healthPlanCoinsuranceOption(v:String);
Begin
FhealthPlanCoinsuranceOption:=v;
End;
function THealthPlanCostSharingSpecification.Get_healthPlanCoinsuranceRate:INumber;
Begin
result:=FhealthPlanCoinsuranceRate;
End;
procedure THealthPlanCostSharingSpecification.Set_healthPlanCoinsuranceRate(v:INumber);
Begin
FhealthPlanCoinsuranceRate:=v;
End;
function THealthPlanCostSharingSpecification.Get_healthPlanCopayOption:String;
Begin
result:=FhealthPlanCopayOption;
End;
procedure THealthPlanCostSharingSpecification.Set_healthPlanCopayOption(v:String);
Begin
FhealthPlanCopayOption:=v;
End;
{*** TPerformAction ***}
function TPerformAction.Get_entertainmentBusiness:IEntertainmentBusiness;
Begin
result:=FentertainmentBusiness;
End;
procedure TPerformAction.Set_entertainmentBusiness(v:IEntertainmentBusiness);
Begin
FentertainmentBusiness:=v;
End;
{*** TClaimReview ***}
function TClaimReview.Get_claimReviewed:String;
Begin
result:=FclaimReviewed;
End;
procedure TClaimReview.Set_claimReviewed(v:String);
Begin
FclaimReviewed:=v;
End;
{*** TCarUsageType ***}
function TCarUsageType.TangCarUsageType:TangibleValue;
Begin
result:=''
End;
{*** TTVEpisode ***}
function TTVEpisode.Get_partOfTVSeries:ITVSeries;
Begin
result:=FpartOfTVSeries;
End;
procedure TTVEpisode.Set_partOfTVSeries(v:ITVSeries);
Begin
FpartOfTVSeries:=v;
End;
{*** TTVSeries ***}
function TTVSeries.Get_seasons:ICreativeWorkSeason;
Begin
result:=Fseasons;
End;
procedure TTVSeries.Set_seasons(v:ICreativeWorkSeason);
Begin
Fseasons:=v;
End;
function TTVSeries.Get_trailer:IVideoObject;
Begin
result:=Ftrailer;
End;
procedure TTVSeries.Set_trailer(v:IVideoObject);
Begin
Ftrailer:=v;
End;
function TTVSeries.Get_productionCompany:IOrganization;
Begin
result:=FproductionCompany;
End;
procedure TTVSeries.Set_productionCompany(v:IOrganization);
Begin
FproductionCompany:=v;
End;
function TTVSeries.Get_containsSeason:ICreativeWorkSeason;
Begin
result:=FcontainsSeason;
End;
procedure TTVSeries.Set_containsSeason(v:ICreativeWorkSeason);
Begin
FcontainsSeason:=v;
End;
{*** TThesis ***}
function TThesis.Get_inSupportOf:String;
Begin
result:=FinSupportOf;
End;
procedure TThesis.Set_inSupportOf(v:String);
Begin
FinSupportOf:=v;
End;
{*** TGovernmentService ***}
function TGovernmentService.Get_serviceOperator:IOrganization;
Begin
result:=FserviceOperator;
End;
procedure TGovernmentService.Set_serviceOperator(v:IOrganization);
Begin
FserviceOperator:=v;
End;
{*** TBedDetails ***}
function TBedDetails.Get_typeOfBed:String;
Begin
result:=FtypeOfBed;
End;
procedure TBedDetails.Set_typeOfBed(v:String);
Begin
FtypeOfBed:=v;
End;
function TBedDetails.Get_numberOfBeds:INumber;
Begin
result:=FnumberOfBeds;
End;
procedure TBedDetails.Set_numberOfBeds(v:INumber);
Begin
FnumberOfBeds:=v;
End;
{*** TDeliveryChargeSpecification ***}
function TDeliveryChargeSpecification.Get_eligibleRegion:IGeoShape;
Begin
result:=FeligibleRegion;
End;
procedure TDeliveryChargeSpecification.Set_eligibleRegion(v:IGeoShape);
Begin
FeligibleRegion:=v;
End;
{*** TMedicalAudience ***}
function TMedicalAudience.TangMedicalAudience:TangibleValue;
Begin
result:=''
End;
{*** TMedicalRiskScore ***}
function TMedicalRiskScore.Get_algorithm:String;
Begin
result:=Falgorithm;
End;
procedure TMedicalRiskScore.Set_algorithm(v:String);
Begin
Falgorithm:=v;
End;
{*** TPeopleAudience ***}
function TPeopleAudience.Get_requiredMinAge:Integer;
Begin
result:=FrequiredMinAge;
End;
procedure TPeopleAudience.Set_requiredMinAge(v:Integer);
Begin
FrequiredMinAge:=v;
End;
function TPeopleAudience.Get_requiredMaxAge:Integer;
Begin
result:=FrequiredMaxAge;
End;
procedure TPeopleAudience.Set_requiredMaxAge(v:Integer);
Begin
FrequiredMaxAge:=v;
End;
function TPeopleAudience.Get_requiredGender:String;
Begin
result:=FrequiredGender;
End;
procedure TPeopleAudience.Set_requiredGender(v:String);
Begin
FrequiredGender:=v;
End;
function TPeopleAudience.Get_suggestedGender:String;
Begin
result:=FsuggestedGender;
End;
procedure TPeopleAudience.Set_suggestedGender(v:String);
Begin
FsuggestedGender:=v;
End;
function TPeopleAudience.Get_suggestedMinAge:INumber;
Begin
result:=FsuggestedMinAge;
End;
procedure TPeopleAudience.Set_suggestedMinAge(v:INumber);
Begin
FsuggestedMinAge:=v;
End;
function TPeopleAudience.Get_suggestedMaxAge:INumber;
Begin
result:=FsuggestedMaxAge;
End;
procedure TPeopleAudience.Set_suggestedMaxAge(v:INumber);
Begin
FsuggestedMaxAge:=v;
End;
{*** TParentAudience ***}
function TParentAudience.Get_childMaxAge:INumber;
Begin
result:=FchildMaxAge;
End;
procedure TParentAudience.Set_childMaxAge(v:INumber);
Begin
FchildMaxAge:=v;
End;
function TParentAudience.Get_childMinAge:INumber;
Begin
result:=FchildMinAge;
End;
procedure TParentAudience.Set_childMinAge(v:INumber);
Begin
FchildMinAge:=v;
End;
{*** TBorrowAction ***}
function TBorrowAction.Get_lender:IPerson;
Begin
result:=Flender;
End;
procedure TBorrowAction.Set_lender(v:IPerson);
Begin
Flender:=v;
End;
{*** TDietarySupplement ***}
function TDietarySupplement.Get_nonProprietaryName:String;
Begin
result:=FnonProprietaryName;
End;
procedure TDietarySupplement.Set_nonProprietaryName(v:String);
Begin
FnonProprietaryName:=v;
End;
function TDietarySupplement.Get_background:String;
Begin
result:=Fbackground;
End;
procedure TDietarySupplement.Set_background(v:String);
Begin
Fbackground:=v;
End;
function TDietarySupplement.Get_isProprietary:Boolean;
Begin
result:=FisProprietary;
End;
procedure TDietarySupplement.Set_isProprietary(v:Boolean);
Begin
FisProprietary:=v;
End;
function TDietarySupplement.Get_recommendedIntake:IRecommendedDoseSchedule;
Begin
result:=FrecommendedIntake;
End;
procedure TDietarySupplement.Set_recommendedIntake(v:IRecommendedDoseSchedule);
Begin
FrecommendedIntake:=v;
End;
function TDietarySupplement.Get_mechanismOfAction:String;
Begin
result:=FmechanismOfAction;
End;
procedure TDietarySupplement.Set_mechanismOfAction(v:String);
Begin
FmechanismOfAction:=v;
End;
function TDietarySupplement.Get_targetPopulation:String;
Begin
result:=FtargetPopulation;
End;
procedure TDietarySupplement.Set_targetPopulation(v:String);
Begin
FtargetPopulation:=v;
End;
function TDietarySupplement.Get_safetyConsideration:String;
Begin
result:=FsafetyConsideration;
End;
procedure TDietarySupplement.Set_safetyConsideration(v:String);
Begin
FsafetyConsideration:=v;
End;
function TDietarySupplement.Get_manufacturer:IOrganization;
Begin
result:=Fmanufacturer;
End;
procedure TDietarySupplement.Set_manufacturer(v:IOrganization);
Begin
Fmanufacturer:=v;
End;
{*** TBuyAction ***}
function TBuyAction.Get_warrantyPromise:IWarrantyPromise;
Begin
result:=FwarrantyPromise;
End;
procedure TBuyAction.Set_warrantyPromise(v:IWarrantyPromise);
Begin
FwarrantyPromise:=v;
End;
function TBuyAction.Get_vendor:IOrganization;
Begin
result:=Fvendor;
End;
procedure TBuyAction.Set_vendor(v:IOrganization);
Begin
Fvendor:=v;
End;
{*** TRentAction ***}
function TRentAction.Get_realEstateAgent:IRealEstateAgent;
Begin
result:=FrealEstateAgent;
End;
procedure TRentAction.Set_realEstateAgent(v:IRealEstateAgent);
Begin
FrealEstateAgent:=v;
End;
function TRentAction.Get_landlord:IPerson;
Begin
result:=Flandlord;
End;
procedure TRentAction.Set_landlord(v:IPerson);
Begin
Flandlord:=v;
End;
{*** TMedicalDevicePurpose ***}
function TMedicalDevicePurpose.TangMedicalDevicePurpose:TangibleValue;
Begin
result:=''
End;
{*** TReport ***}
function TReport.Get_reportNumber:String;
Begin
result:=FreportNumber;
End;
procedure TReport.Set_reportNumber(v:String);
Begin
FreportNumber:=v;
End;
{*** TTechArticle ***}
function TTechArticle.Get_dependencies:String;
Begin
result:=Fdependencies;
End;
procedure TTechArticle.Set_dependencies(v:String);
Begin
Fdependencies:=v;
End;
function TTechArticle.Get_proficiencyLevel:String;
Begin
result:=FproficiencyLevel;
End;
procedure TTechArticle.Set_proficiencyLevel(v:String);
Begin
FproficiencyLevel:=v;
End;
{*** TMedicalGuidelineRecommendation ***}
function TMedicalGuidelineRecommendation.Get_recommendationStrength:String;
Begin
result:=FrecommendationStrength;
End;
procedure TMedicalGuidelineRecommendation.Set_recommendationStrength(v:String);
Begin
FrecommendationStrength:=v;
End;
{*** TFollowAction ***}
function TFollowAction.Get_followee:IOrganization;
Begin
result:=Ffollowee;
End;
procedure TFollowAction.Set_followee(v:IOrganization);
Begin
Ffollowee:=v;
End;
{*** TBusinessAudience ***}
function TBusinessAudience.Get_yearsInOperation:IQuantitativeValue;
Begin
result:=FyearsInOperation;
End;
procedure TBusinessAudience.Set_yearsInOperation(v:IQuantitativeValue);
Begin
FyearsInOperation:=v;
End;
function TBusinessAudience.Get_yearlyRevenue:IQuantitativeValue;
Begin
result:=FyearlyRevenue;
End;
procedure TBusinessAudience.Set_yearlyRevenue(v:IQuantitativeValue);
Begin
FyearlyRevenue:=v;
End;
function TBusinessAudience.Get_numberOfEmployees:IQuantitativeValue;
Begin
result:=FnumberOfEmployees;
End;
procedure TBusinessAudience.Set_numberOfEmployees(v:IQuantitativeValue);
Begin
FnumberOfEmployees:=v;
End;
{*** TListItem ***}
function TListItem.Get_item:IThing;
Begin
result:=Fitem;
End;
procedure TListItem.Set_item(v:IThing);
Begin
Fitem:=v;
End;
function TListItem.Get_previousItem:IListItem;
Begin
result:=FpreviousItem;
End;
procedure TListItem.Set_previousItem(v:IListItem);
Begin
FpreviousItem:=v;
End;
function TListItem.Get_nextItem:IListItem;
Begin
result:=FnextItem;
End;
procedure TListItem.Set_nextItem(v:IListItem);
Begin
FnextItem:=v;
End;
{*** TPhysicalActivity ***}
function TPhysicalActivity.Get_epidemiology:String;
Begin
result:=Fepidemiology;
End;
procedure TPhysicalActivity.Set_epidemiology(v:String);
Begin
Fepidemiology:=v;
End;
{*** TAPIReference ***}
function TAPIReference.Get_assemblyVersion:String;
Begin
result:=FassemblyVersion;
End;
procedure TAPIReference.Set_assemblyVersion(v:String);
Begin
FassemblyVersion:=v;
End;
function TAPIReference.Get_programmingModel:String;
Begin
result:=FprogrammingModel;
End;
procedure TAPIReference.Set_programmingModel(v:String);
Begin
FprogrammingModel:=v;
End;
function TAPIReference.Get_targetPlatform:String;
Begin
result:=FtargetPlatform;
End;
procedure TAPIReference.Set_targetPlatform(v:String);
Begin
FtargetPlatform:=v;
End;
function TAPIReference.Get_assembly:String;
Begin
result:=Fassembly;
End;
procedure TAPIReference.Set_assembly(v:String);
Begin
Fassembly:=v;
End;
{*** TCar ***}
function TCar.Get_roofLoad:IQuantitativeValue;
Begin
result:=FroofLoad;
End;
procedure TCar.Set_roofLoad(v:IQuantitativeValue);
Begin
FroofLoad:=v;
End;
{*** TRentalCarReservation ***}
function TRentalCarReservation.Get_dropoffLocation:IPlace;
Begin
result:=FdropoffLocation;
End;
procedure TRentalCarReservation.Set_dropoffLocation(v:IPlace);
Begin
FdropoffLocation:=v;
End;
function TRentalCarReservation.Get_dropoffTime:TDateTime;
Begin
result:=FdropoffTime;
End;
procedure TRentalCarReservation.Set_dropoffTime(v:TDateTime);
Begin
FdropoffTime:=v;
End;
{*** TWebApplication ***}
function TWebApplication.Get_browserRequirements:String;
Begin
result:=FbrowserRequirements;
End;
procedure TWebApplication.Set_browserRequirements(v:String);
Begin
FbrowserRequirements:=v;
End;
{*** TGamePlayMode ***}
function TGamePlayMode.TangGamePlayMode:TangibleValue;
Begin
result:=''
End;
{*** TAggregateOffer ***}
function TAggregateOffer.Get_highPrice:INumber;
Begin
result:=FhighPrice;
End;
procedure TAggregateOffer.Set_highPrice(v:INumber);
Begin
FhighPrice:=v;
End;
function TAggregateOffer.Get_offerCount:Integer;
Begin
result:=FofferCount;
End;
procedure TAggregateOffer.Set_offerCount(v:Integer);
Begin
FofferCount:=v;
End;
function TAggregateOffer.Get_lowPrice:INumber;
Begin
result:=FlowPrice;
End;
procedure TAggregateOffer.Set_lowPrice(v:INumber);
Begin
FlowPrice:=v;
End;
{*** TBrand ***}
function TBrand.TangBrand:TangibleValue;
Begin
result:=''
End;
{*** TPropertyValueSpecification ***}
function TPropertyValueSpecification.Get_multipleValues:Boolean;
Begin
result:=FmultipleValues;
End;
procedure TPropertyValueSpecification.Set_multipleValues(v:Boolean);
Begin
FmultipleValues:=v;
End;
function TPropertyValueSpecification.Get_readonlyValue:Boolean;
Begin
result:=FreadonlyValue;
End;
procedure TPropertyValueSpecification.Set_readonlyValue(v:Boolean);
Begin
FreadonlyValue:=v;
End;
function TPropertyValueSpecification.Get_valueMaxLength:INumber;
Begin
result:=FvalueMaxLength;
End;
procedure TPropertyValueSpecification.Set_valueMaxLength(v:INumber);
Begin
FvalueMaxLength:=v;
End;
function TPropertyValueSpecification.Get_valueMinLength:INumber;
Begin
result:=FvalueMinLength;
End;
procedure TPropertyValueSpecification.Set_valueMinLength(v:INumber);
Begin
FvalueMinLength:=v;
End;
function TPropertyValueSpecification.Get_defaultValue:String;
Begin
result:=FdefaultValue;
End;
procedure TPropertyValueSpecification.Set_defaultValue(v:String);
Begin
FdefaultValue:=v;
End;
function TPropertyValueSpecification.Get_valuePattern:String;
Begin
result:=FvaluePattern;
End;
procedure TPropertyValueSpecification.Set_valuePattern(v:String);
Begin
FvaluePattern:=v;
End;
function TPropertyValueSpecification.Get_valueRequired:Boolean;
Begin
result:=FvalueRequired;
End;
procedure TPropertyValueSpecification.Set_valueRequired(v:Boolean);
Begin
FvalueRequired:=v;
End;
function TPropertyValueSpecification.Get_valueName:String;
Begin
result:=FvalueName;
End;
procedure TPropertyValueSpecification.Set_valueName(v:String);
Begin
FvalueName:=v;
End;
function TPropertyValueSpecification.Get_stepValue:INumber;
Begin
result:=FstepValue;
End;
procedure TPropertyValueSpecification.Set_stepValue(v:INumber);
Begin
FstepValue:=v;
End;
{*** TMobileApplication ***}
function TMobileApplication.Get_carrierRequirements:String;
Begin
result:=FcarrierRequirements;
End;
procedure TMobileApplication.Set_carrierRequirements(v:String);
Begin
FcarrierRequirements:=v;
End;
{*** TReceiveAction ***}
function TReceiveAction.Get_sender:IOrganization;
Begin
result:=Fsender;
End;
procedure TReceiveAction.Set_sender(v:IOrganization);
Begin
Fsender:=v;
End;
{*** TMedicalTrial ***}
function TMedicalTrial.Get_trialDesign:IMedicalTrialDesign;
Begin
result:=FtrialDesign;
End;
procedure TMedicalTrial.Set_trialDesign(v:IMedicalTrialDesign);
Begin
FtrialDesign:=v;
End;
function TMedicalTrial.Get_phase:String;
Begin
result:=Fphase;
End;
procedure TMedicalTrial.Set_phase(v:String);
Begin
Fphase:=v;
End;
{*** TMedicalTrialDesign ***}
function TMedicalTrialDesign.TangMedicalTrialDesign:TangibleValue;
Begin
result:=''
End;
{*** TNutritionInformation ***}
function TNutritionInformation.Get_proteinContent:IMass;
Begin
result:=FproteinContent;
End;
procedure TNutritionInformation.Set_proteinContent(v:IMass);
Begin
FproteinContent:=v;
End;
function TNutritionInformation.Get_fatContent:IMass;
Begin
result:=FfatContent;
End;
procedure TNutritionInformation.Set_fatContent(v:IMass);
Begin
FfatContent:=v;
End;
function TNutritionInformation.Get_transFatContent:IMass;
Begin
result:=FtransFatContent;
End;
procedure TNutritionInformation.Set_transFatContent(v:IMass);
Begin
FtransFatContent:=v;
End;
function TNutritionInformation.Get_calories:IEnergy;
Begin
result:=Fcalories;
End;
procedure TNutritionInformation.Set_calories(v:IEnergy);
Begin
Fcalories:=v;
End;
function TNutritionInformation.Get_carbohydrateContent:IMass;
Begin
result:=FcarbohydrateContent;
End;
procedure TNutritionInformation.Set_carbohydrateContent(v:IMass);
Begin
FcarbohydrateContent:=v;
End;
function TNutritionInformation.Get_sodiumContent:IMass;
Begin
result:=FsodiumContent;
End;
procedure TNutritionInformation.Set_sodiumContent(v:IMass);
Begin
FsodiumContent:=v;
End;
function TNutritionInformation.Get_cholesterolContent:IMass;
Begin
result:=FcholesterolContent;
End;
procedure TNutritionInformation.Set_cholesterolContent(v:IMass);
Begin
FcholesterolContent:=v;
End;
function TNutritionInformation.Get_servingSize:String;
Begin
result:=FservingSize;
End;
procedure TNutritionInformation.Set_servingSize(v:String);
Begin
FservingSize:=v;
End;
function TNutritionInformation.Get_fiberContent:IMass;
Begin
result:=FfiberContent;
End;
procedure TNutritionInformation.Set_fiberContent(v:IMass);
Begin
FfiberContent:=v;
End;
function TNutritionInformation.Get_saturatedFatContent:IMass;
Begin
result:=FsaturatedFatContent;
End;
procedure TNutritionInformation.Set_saturatedFatContent(v:IMass);
Begin
FsaturatedFatContent:=v;
End;
function TNutritionInformation.Get_sugarContent:IMass;
Begin
result:=FsugarContent;
End;
procedure TNutritionInformation.Set_sugarContent(v:IMass);
Begin
FsugarContent:=v;
End;
function TNutritionInformation.Get_unsaturatedFatContent:IMass;
Begin
result:=FunsaturatedFatContent;
End;
procedure TNutritionInformation.Set_unsaturatedFatContent(v:IMass);
Begin
FunsaturatedFatContent:=v;
End;
{*** TMass ***}
function TMass.TangMass:TangibleValue;
Begin
result:=''
End;
{*** TPerformanceRole ***}
function TPerformanceRole.Get_characterName:String;
Begin
result:=FcharacterName;
End;
procedure TPerformanceRole.Set_characterName(v:String);
Begin
FcharacterName:=v;
End;
{*** TLymphaticVessel ***}
function TLymphaticVessel.Get_originatesFrom:IVessel;
Begin
result:=ForiginatesFrom;
End;
procedure TLymphaticVessel.Set_originatesFrom(v:IVessel);
Begin
ForiginatesFrom:=v;
End;
function TLymphaticVessel.Get_runsTo:IVessel;
Begin
result:=FrunsTo;
End;
procedure TLymphaticVessel.Set_runsTo(v:IVessel);
Begin
FrunsTo:=v;
End;
{*** TPatient ***}
function TPatient.TangPatient:TangibleValue;
Begin
result:=''
End;
{*** TEnumerationValue ***}
function TEnumerationValue.Get_partOfEnumerationValueSet:String;
Begin
result:=FpartOfEnumerationValueSet;
End;
procedure TEnumerationValue.Set_partOfEnumerationValueSet(v:String);
Begin
FpartOfEnumerationValueSet:=v;
End;
function TEnumerationValue.Get_enumerationValueCode:String;
Begin
result:=FenumerationValueCode;
End;
procedure TEnumerationValue.Set_enumerationValueCode(v:String);
Begin
FenumerationValueCode:=v;
End;
{*** TGeoCircle ***}
function TGeoCircle.Get_geoRadius:IDistance;
Begin
result:=FgeoRadius;
End;
procedure TGeoCircle.Set_geoRadius(v:IDistance);
Begin
FgeoRadius:=v;
End;
function TGeoCircle.Get_geoMidpoint:IGeoCoordinates;
Begin
result:=FgeoMidpoint;
End;
procedure TGeoCircle.Set_geoMidpoint(v:IGeoCoordinates);
Begin
FgeoMidpoint:=v;
End;
{*** TGeoCoordinates ***}
function TGeoCoordinates.Get_latitude:INumber;
Begin
result:=Flatitude;
End;
procedure TGeoCoordinates.Set_latitude(v:INumber);
Begin
Flatitude:=v;
End;
function TGeoCoordinates.Get_longitude:INumber;
Begin
result:=Flongitude;
End;
procedure TGeoCoordinates.Set_longitude(v:INumber);
Begin
Flongitude:=v;
End;
function TGeoCoordinates.Get_postalCode:String;
Begin
result:=FpostalCode;
End;
procedure TGeoCoordinates.Set_postalCode(v:String);
Begin
FpostalCode:=v;
End;
{*** TEducationalAudience ***}
function TEducationalAudience.Get_educationalRole:String;
Begin
result:=FeducationalRole;
End;
procedure TEducationalAudience.Set_educationalRole(v:String);
Begin
FeducationalRole:=v;
End;
{*** TChooseAction ***}
function TChooseAction.Get_option:IThing;
Begin
result:=Foption;
End;
procedure TChooseAction.Set_option(v:IThing);
Begin
Foption:=v;
End;
{*** TVoteAction ***}
function TVoteAction.Get_candidate:IPerson;
Begin
result:=Fcandidate;
End;
procedure TVoteAction.Set_candidate(v:IPerson);
Begin
Fcandidate:=v;
End;
{*** TLinkRole ***}
function TLinkRole.Get_linkRelationship:String;
Begin
result:=FlinkRelationship;
End;
procedure TLinkRole.Set_linkRelationship(v:String);
Begin
FlinkRelationship:=v;
End;
{*** TLoanOrCredit ***}
function TLoanOrCredit.Get_loanTerm:IQuantitativeValue;
Begin
result:=FloanTerm;
End;
procedure TLoanOrCredit.Set_loanTerm(v:IQuantitativeValue);
Begin
FloanTerm:=v;
End;
function TLoanOrCredit.Get_requiredCollateral:String;
Begin
result:=FrequiredCollateral;
End;
procedure TLoanOrCredit.Set_requiredCollateral(v:String);
Begin
FrequiredCollateral:=v;
End;
function TLoanOrCredit.Get_amount:IMonetaryAmount;
Begin
result:=Famount;
End;
procedure TLoanOrCredit.Set_amount(v:IMonetaryAmount);
Begin
Famount:=v;
End;
{*** TMedicalImagingTechnique ***}
function TMedicalImagingTechnique.TangMedicalImagingTechnique:TangibleValue;
Begin
result:=''
End;
{*** TBusOrCoach ***}
function TBusOrCoach.Get_acrissCode:String;
Begin
result:=FacrissCode;
End;
procedure TBusOrCoach.Set_acrissCode(v:String);
Begin
FacrissCode:=v;
End;
{*** TBroadcastFrequencySpecification ***}
function TBroadcastFrequencySpecification.Get_broadcastFrequencyValue:IQuantitativeValue;
Begin
result:=FbroadcastFrequencyValue;
End;
procedure TBroadcastFrequencySpecification.Set_broadcastFrequencyValue(v:IQuantitativeValue);
Begin
FbroadcastFrequencyValue:=v;
End;
{*** TImagingTest ***}
function TImagingTest.Get_imagingTechnique:IMedicalImagingTechnique;
Begin
result:=FimagingTechnique;
End;
procedure TImagingTest.Set_imagingTechnique(v:IMedicalImagingTechnique);
Begin
FimagingTechnique:=v;
End;
{*** TInfectiousDisease ***}
function TInfectiousDisease.Get_infectiousAgentClass:IInfectiousAgentClass;
Begin
result:=FinfectiousAgentClass;
End;
procedure TInfectiousDisease.Set_infectiousAgentClass(v:IInfectiousAgentClass);
Begin
FinfectiousAgentClass:=v;
End;
function TInfectiousDisease.Get_transmissionMethod:String;
Begin
result:=FtransmissionMethod;
End;
procedure TInfectiousDisease.Set_transmissionMethod(v:String);
Begin
FtransmissionMethod:=v;
End;
function TInfectiousDisease.Get_infectiousAgent:String;
Begin
result:=FinfectiousAgent;
End;
procedure TInfectiousDisease.Set_infectiousAgent(v:String);
Begin
FinfectiousAgent:=v;
End;
{*** TMusicRelease ***}
function TMusicRelease.Get_creditedTo:IOrganization;
Begin
result:=FcreditedTo;
End;
procedure TMusicRelease.Set_creditedTo(v:IOrganization);
Begin
FcreditedTo:=v;
End;
function TMusicRelease.Get_musicReleaseFormat:IMusicReleaseFormatType;
Begin
result:=FmusicReleaseFormat;
End;
procedure TMusicRelease.Set_musicReleaseFormat(v:IMusicReleaseFormatType);
Begin
FmusicReleaseFormat:=v;
End;
function TMusicRelease.Get_recordLabel:IOrganization;
Begin
result:=FrecordLabel;
End;
procedure TMusicRelease.Set_recordLabel(v:IOrganization);
Begin
FrecordLabel:=v;
End;
function TMusicRelease.Get_catalogNumber:String;
Begin
result:=FcatalogNumber;
End;
procedure TMusicRelease.Set_catalogNumber(v:String);
Begin
FcatalogNumber:=v;
End;
function TMusicRelease.Get_releaseOf:IMusicAlbum;
Begin
result:=FreleaseOf;
End;
procedure TMusicRelease.Set_releaseOf(v:IMusicAlbum);
Begin
FreleaseOf:=v;
End;
{*** TFoodEstablishmentReservation ***}
function TFoodEstablishmentReservation.Get_startTime:TDateTime;
Begin
result:=FstartTime;
End;
procedure TFoodEstablishmentReservation.Set_startTime(v:TDateTime);
Begin
FstartTime:=v;
End;
function TFoodEstablishmentReservation.Get_endTime:TDateTime;
Begin
result:=FendTime;
End;
procedure TFoodEstablishmentReservation.Set_endTime(v:TDateTime);
Begin
FendTime:=v;
End;
{*** THotelRoom ***}
function THotelRoom.Get_bed:IBedType;
Begin
result:=Fbed;
End;
procedure THotelRoom.Set_bed(v:IBedType);
Begin
Fbed:=v;
End;
function THotelRoom.Get_occupancy:IQuantitativeValue;
Begin
result:=Foccupancy;
End;
procedure THotelRoom.Set_occupancy(v:IQuantitativeValue);
Begin
Foccupancy:=v;
End;
{*** TInteractionCounter ***}
function TInteractionCounter.Get_interactionService:ISoftwareApplication;
Begin
result:=FinteractionService;
End;
procedure TInteractionCounter.Set_interactionService(v:ISoftwareApplication);
Begin
FinteractionService:=v;
End;
function TInteractionCounter.Get_interactionType:IAction;
Begin
result:=FinteractionType;
End;
procedure TInteractionCounter.Set_interactionType(v:IAction);
Begin
FinteractionType:=v;
End;
function TInteractionCounter.Get_userInteractionCount:Integer;
Begin
result:=FuserInteractionCount;
End;
procedure TInteractionCounter.Set_userInteractionCount(v:Integer);
Begin
FuserInteractionCount:=v;
End;
{*** TRecipe ***}
function TRecipe.Get_recipeInstructions:IItemList;
Begin
result:=FrecipeInstructions;
End;
procedure TRecipe.Set_recipeInstructions(v:IItemList);
Begin
FrecipeInstructions:=v;
End;
function TRecipe.Get_recipeYield:String;
Begin
result:=FrecipeYield;
End;
procedure TRecipe.Set_recipeYield(v:String);
Begin
FrecipeYield:=v;
End;
function TRecipe.Get_recipeCuisine:String;
Begin
result:=FrecipeCuisine;
End;
procedure TRecipe.Set_recipeCuisine(v:String);
Begin
FrecipeCuisine:=v;
End;
function TRecipe.Get_nutrition:INutritionInformation;
Begin
result:=Fnutrition;
End;
procedure TRecipe.Set_nutrition(v:INutritionInformation);
Begin
Fnutrition:=v;
End;
function TRecipe.Get_suitableForDiet:IRestrictedDiet;
Begin
result:=FsuitableForDiet;
End;
procedure TRecipe.Set_suitableForDiet(v:IRestrictedDiet);
Begin
FsuitableForDiet:=v;
End;
function TRecipe.Get_ingredients:String;
Begin
result:=Fingredients;
End;
procedure TRecipe.Set_ingredients(v:String);
Begin
Fingredients:=v;
End;
function TRecipe.Get_cookingMethod:String;
Begin
result:=FcookingMethod;
End;
procedure TRecipe.Set_cookingMethod(v:String);
Begin
FcookingMethod:=v;
End;
function TRecipe.Get_recipeCategory:String;
Begin
result:=FrecipeCategory;
End;
procedure TRecipe.Set_recipeCategory(v:String);
Begin
FrecipeCategory:=v;
End;
function TRecipe.Get_totalTime:IDuration;
Begin
result:=FtotalTime;
End;
procedure TRecipe.Set_totalTime(v:IDuration);
Begin
FtotalTime:=v;
End;
function TRecipe.Get_cookTime:IDuration;
Begin
result:=FcookTime;
End;
procedure TRecipe.Set_cookTime(v:IDuration);
Begin
FcookTime:=v;
End;
function TRecipe.Get_prepTime:IDuration;
Begin
result:=FprepTime;
End;
procedure TRecipe.Set_prepTime(v:IDuration);
Begin
FprepTime:=v;
End;
{*** TReviewAction ***}
function TReviewAction.Get_resultReview:IReview;
Begin
result:=FresultReview;
End;
procedure TReviewAction.Set_resultReview(v:IReview);
Begin
FresultReview:=v;
End;
{*** TWinAction ***}
function TWinAction.Get_loser:IPerson;
Begin
result:=Floser;
End;
procedure TWinAction.Set_loser(v:IPerson);
Begin
Floser:=v;
End;
{*** TMedicalScholarlyArticle ***}
function TMedicalScholarlyArticle.Get_publicationType:String;
Begin
result:=FpublicationType;
End;
procedure TMedicalScholarlyArticle.Set_publicationType(v:String);
Begin
FpublicationType:=v;
End;
{*** TBlog ***}
function TBlog.Get_blogPosts:IBlogPosting;
Begin
result:=FblogPosts;
End;
procedure TBlog.Set_blogPosts(v:IBlogPosting);
Begin
FblogPosts:=v;
End;
{*** TCookAction ***}
function TCookAction.Get_recipe:IRecipe;
Begin
result:=Frecipe;
End;
procedure TCookAction.Set_recipe(v:IRecipe);
Begin
Frecipe:=v;
End;
function TCookAction.Get_foodEstablishment:IFoodEstablishment;
Begin
result:=FfoodEstablishment;
End;
procedure TCookAction.Set_foodEstablishment(v:IFoodEstablishment);
Begin
FfoodEstablishment:=v;
End;
function TCookAction.Get_foodEvent:IFoodEvent;
Begin
result:=FfoodEvent;
End;
procedure TCookAction.Set_foodEvent(v:IFoodEvent);
Begin
FfoodEvent:=v;
End;
{*** TPathologyTest ***}
function TPathologyTest.Get_tissueSample:String;
Begin
result:=FtissueSample;
End;
procedure TPathologyTest.Set_tissueSample(v:String);
Begin
FtissueSample:=v;
End;
{*** TReservationPackage ***}
function TReservationPackage.Get_subReservation:IReservation;
Begin
result:=FsubReservation;
End;
procedure TReservationPackage.Set_subReservation(v:IReservation);
Begin
FsubReservation:=v;
End;
{*** TUserComments ***}
function TUserComments.Get_creator:IPerson;
Begin
result:=Fcreator;
End;
procedure TUserComments.Set_creator(v:IPerson);
Begin
Fcreator:=v;
End;
function TUserComments.Get_discusses:ICreativeWork;
Begin
result:=Fdiscusses;
End;
procedure TUserComments.Set_discusses(v:ICreativeWork);
Begin
Fdiscusses:=v;
End;
function TUserComments.Get_commentText:String;
Begin
result:=FcommentText;
End;
procedure TUserComments.Set_commentText(v:String);
Begin
FcommentText:=v;
End;
function TUserComments.Get_replyToUrl:String;
Begin
result:=FreplyToUrl;
End;
procedure TUserComments.Set_replyToUrl(v:String);
Begin
FreplyToUrl:=v;
End;
function TUserComments.Get_commentTime:TDateTime;
Begin
result:=FcommentTime;
End;
procedure TUserComments.Set_commentTime(v:TDateTime);
Begin
FcommentTime:=v;
End;
{*** TBusTrip ***}
function TBusTrip.Get_arrivalBusStop:IBusStation;
Begin
result:=FarrivalBusStop;
End;
procedure TBusTrip.Set_arrivalBusStop(v:IBusStation);
Begin
FarrivalBusStop:=v;
End;
function TBusTrip.Get_busName:String;
Begin
result:=FbusName;
End;
procedure TBusTrip.Set_busName(v:String);
Begin
FbusName:=v;
End;
function TBusTrip.Get_busNumber:String;
Begin
result:=FbusNumber;
End;
procedure TBusTrip.Set_busNumber(v:String);
Begin
FbusNumber:=v;
End;
function TBusTrip.Get_departureBusStop:IBusStop;
Begin
result:=FdepartureBusStop;
End;
procedure TBusTrip.Set_departureBusStop(v:IBusStop);
Begin
FdepartureBusStop:=v;
End;
{*** TGenderType ***}
function TGenderType.TangGenderType:TangibleValue;
Begin
result:=''
End;
{*** TAskAction ***}
function TAskAction.Get_question:IQuestion;
Begin
result:=Fquestion;
End;
procedure TAskAction.Set_question(v:IQuestion);
Begin
Fquestion:=v;
End;
{*** TPayAction ***}
function TPayAction.Get_recipient:IPerson;
Begin
result:=Frecipient;
End;
procedure TPayAction.Set_recipient(v:IPerson);
Begin
Frecipient:=v;
End;
{*** TVideoGameSeries ***}
function TVideoGameSeries.Get_numberOfPlayers:IQuantitativeValue;
Begin
result:=FnumberOfPlayers;
End;
procedure TVideoGameSeries.Set_numberOfPlayers(v:IQuantitativeValue);
Begin
FnumberOfPlayers:=v;
End;
function TVideoGameSeries.Get_gameLocation:String;
Begin
result:=FgameLocation;
End;
procedure TVideoGameSeries.Set_gameLocation(v:String);
Begin
FgameLocation:=v;
End;
function TVideoGameSeries.Get_actors:IPerson;
Begin
result:=Factors;
End;
procedure TVideoGameSeries.Set_actors(v:IPerson);
Begin
Factors:=v;
End;
function TVideoGameSeries.Get_quest:IThing;
Begin
result:=Fquest;
End;
procedure TVideoGameSeries.Set_quest(v:IThing);
Begin
Fquest:=v;
End;
function TVideoGameSeries.Get_numberOfSeasons:Integer;
Begin
result:=FnumberOfSeasons;
End;
procedure TVideoGameSeries.Set_numberOfSeasons(v:Integer);
Begin
FnumberOfSeasons:=v;
End;
function TVideoGameSeries.Get_gamePlatform:String;
Begin
result:=FgamePlatform;
End;
procedure TVideoGameSeries.Set_gamePlatform(v:String);
Begin
FgamePlatform:=v;
End;
function TVideoGameSeries.Get_gameItem:IThing;
Begin
result:=FgameItem;
End;
procedure TVideoGameSeries.Set_gameItem(v:IThing);
Begin
FgameItem:=v;
End;
function TVideoGameSeries.Get_numberOfEpisodes:Integer;
Begin
result:=FnumberOfEpisodes;
End;
procedure TVideoGameSeries.Set_numberOfEpisodes(v:Integer);
Begin
FnumberOfEpisodes:=v;
End;
function TVideoGameSeries.Get_playMode:IGamePlayMode;
Begin
result:=FplayMode;
End;
procedure TVideoGameSeries.Set_playMode(v:IGamePlayMode);
Begin
FplayMode:=v;
End;
{*** TVideoGame ***}
function TVideoGame.Get_cheatCode:ICreativeWork;
Begin
result:=FcheatCode;
End;
procedure TVideoGame.Set_cheatCode(v:ICreativeWork);
Begin
FcheatCode:=v;
End;
function TVideoGame.Get_gameTip:ICreativeWork;
Begin
result:=FgameTip;
End;
procedure TVideoGame.Set_gameTip(v:ICreativeWork);
Begin
FgameTip:=v;
End;
function TVideoGame.Get_gameServer:IGameServer;
Begin
result:=FgameServer;
End;
procedure TVideoGame.Set_gameServer(v:IGameServer);
Begin
FgameServer:=v;
End;
{*** TMovieTheater ***}
function TMovieTheater.Get_screenCount:INumber;
Begin
result:=FscreenCount;
End;
procedure TMovieTheater.Set_screenCount(v:INumber);
Begin
FscreenCount:=v;
End;
{*** TTaxiService ***}
function TTaxiService.TangTaxiService:TangibleValue;
Begin
result:=''
End;
{*** TLodgingReservation ***}
function TLodgingReservation.Get_numChildren:IQuantitativeValue;
Begin
result:=FnumChildren;
End;
procedure TLodgingReservation.Set_numChildren(v:IQuantitativeValue);
Begin
FnumChildren:=v;
End;
function TLodgingReservation.Get_numAdults:Integer;
Begin
result:=FnumAdults;
End;
procedure TLodgingReservation.Set_numAdults(v:Integer);
Begin
FnumAdults:=v;
End;
function TLodgingReservation.Get_lodgingUnitDescription:String;
Begin
result:=FlodgingUnitDescription;
End;
procedure TLodgingReservation.Set_lodgingUnitDescription(v:String);
Begin
FlodgingUnitDescription:=v;
End;
function TLodgingReservation.Get_lodgingUnitType:String;
Begin
result:=FlodgingUnitType;
End;
procedure TLodgingReservation.Set_lodgingUnitType(v:String);
Begin
FlodgingUnitType:=v;
End;
{*** TCommentAction ***}
function TCommentAction.Get_resultComment:IComment;
Begin
result:=FresultComment;
End;
procedure TCommentAction.Set_resultComment(v:IComment);
Begin
FresultComment:=v;
End;
{*** TSuperficialAnatomy ***}
function TSuperficialAnatomy.Get_significance:String;
Begin
result:=Fsignificance;
End;
procedure TSuperficialAnatomy.Set_significance(v:String);
Begin
Fsignificance:=v;
End;
function TSuperficialAnatomy.Get_relatedAnatomy:IAnatomicalSystem;
Begin
result:=FrelatedAnatomy;
End;
procedure TSuperficialAnatomy.Set_relatedAnatomy(v:IAnatomicalSystem);
Begin
FrelatedAnatomy:=v;
End;
{*** TComicIssue ***}
function TComicIssue.Get_penciler:IPerson;
Begin
result:=Fpenciler;
End;
procedure TComicIssue.Set_penciler(v:IPerson);
Begin
Fpenciler:=v;
End;
function TComicIssue.Get_inker:IPerson;
Begin
result:=Finker;
End;
procedure TComicIssue.Set_inker(v:IPerson);
Begin
Finker:=v;
End;
function TComicIssue.Get_variantCover:String;
Begin
result:=FvariantCover;
End;
procedure TComicIssue.Set_variantCover(v:String);
Begin
FvariantCover:=v;
End;
end.
| 27.56428 | 157 | 0.779611 |
61d41821ba3ddf49708260b129de0440abedff65
| 10,007 |
pas
|
Pascal
|
src/Config/Implementations/Ini/IniConfigImpl.pas
|
zamronypj/fano-framework
|
559e385be5e1d26beada94c46eb8e760c4d855da
|
[
"MIT"
] | 78 |
2019-01-31T13:40:48.000Z
|
2022-03-22T17:26:54.000Z
|
src/Config/Implementations/Ini/IniConfigImpl.pas
|
zamronypj/fano-framework
|
559e385be5e1d26beada94c46eb8e760c4d855da
|
[
"MIT"
] | 24 |
2020-01-04T11:50:53.000Z
|
2022-02-17T09:55:23.000Z
|
src/Config/Implementations/Ini/IniConfigImpl.pas
|
zamronypj/fano-framework
|
559e385be5e1d26beada94c46eb8e760c4d855da
|
[
"MIT"
] | 9 |
2018-11-05T03:43:24.000Z
|
2022-01-21T17:23:30.000Z
|
{*!
* Fano Web Framework (https://fanoframework.github.io)
*
* @link https://github.com/fanoframework/fano
* @copyright Copyright (c) 2018 - 2021 Zamrony P. Juhara
* @license https://github.com/fanoframework/fano/blob/master/LICENSE (MIT)
*}
unit IniConfigImpl;
interface
{$MODE OBJFPC}
{$H+}
uses
IniFiles,
DependencyIntf,
ConfigIntf;
type
(*!------------------------------------------------------------
* Application configuration base class that load data from INI
*
* @author Zamrony P. Juhara <zamronypj@yahoo.com>
*-------------------------------------------------------------*)
TIniConfig = class(TInterfacedObject, IAppConfiguration, IDependency)
private
fDefaultSection : string;
(*!------------------------------------------------
* retrieve section name from config name or use
* default section
*-------------------------------------------------
* @param configName name of config to retrieve
* @return section name of section
* @return ident name of key to retrieve
*-------------------------------------------------
* For configName = 'server.host', it returns
* section = 'server' and ident = 'host'
*
* For configName = 'host', it returns
* section = fDefaultSection and ident = 'host'
*-------------------------------------------------*)
procedure getSectionIdentFromConfigName(
const configName : string;
out section : string;
out ident : string
);
protected
FIniConfig :TIniFile;
function buildIniData() : TIniFile; virtual; abstract;
public
constructor create(const defaultSection : string);
destructor destroy(); override;
(*!------------------------------------------------
* retrieve string value by name
*-------------------------------------------------
* @param configName name of config to retrieve
* @return value of key
*-------------------------------------------------
* For INI content
*
* [fano]
* host=example.com
* [server]
* host=localhost
*
* where [fano] section is default section
*
* For configName = 'server.host', it returns 'localhost'
* For configName = 'host', it returns 'example.com'
*-------------------------------------------------*)
function getString(const configName : string; const defaultValue : string = '') : string;
(*!------------------------------------------------
* retrieve integer value by name
*-------------------------------------------------
* @param configName name of config to retrieve
* @return value of key
*-------------------------------------------------
* For INI content
*
* [fano]
* port=8080
* [server]
* port=9000
*
* where [fano] section is default section
*
* For configName = 'server.port', it returns integer of 9000
* For configName = 'port', it returns integer value of 8080
*-------------------------------------------------*)
function getInt(const configName : string; const defaultValue : integer = 0) : integer;
(*!------------------------------------------------
* retrieve boolean value by name
*-------------------------------------------------
* @param configName name of config to retrieve
* @return value of key
*-------------------------------------------------*)
function getBool(const configName : string; const defaultValue : boolean = false) : boolean;
(*!------------------------------------------------
* retrieve double value by name
*-------------------------------------------------
* @param configName name of config to retrieve
* @return value of key
*-------------------------------------------------*)
function getFloat(const configName : string; const defaultValue : double = 0.0) : double;
(*!------------------------------------------------
* test if config name is exists in configuration
*-------------------------------------------------
* @param configName name of config to check
* @return true if configName is exists otherwise false
*-------------------------------------------------*)
function has(const configName : string) : boolean;
end;
implementation
uses
sysutils,
classes;
constructor TIniConfig.create(const defaultSection : string);
begin
fDefaultSection := defaultSection;
fIniConfig := buildIniData();
end;
destructor TIniConfig.destroy();
begin
fIniConfig.free();
inherited destroy();
end;
(*!------------------------------------------------
* retrieve section and ident name from config name or use
* default section
*-------------------------------------------------
* @param configName name of config to retrieve
* @return section name of section
* @return ident name of key to retrieve
*-------------------------------------------------
* For configName = 'server.host', it returns
* section = 'server' and ident = 'host'
*
* For configName = 'host', it returns
* section = fDefaultSection and ident = 'host'
*-------------------------------------------------*)
procedure TIniConfig.getSectionIdentFromConfigName(
const configName : string;
out section : string;
out ident : string
);
var sectionPos : integer;
begin
sectionPos := pos('.', configName);
if sectionPos = 0 then
begin
//no section found, use default section
section := fDefaultSection;
ident := configName;
end else
begin
section := copy(configName, 1, sectionPos - 1);
ident := copy(configName, sectionPos + 1, length(configName) - sectionPos);
end;
end;
(*!------------------------------------------------
* retrieve string value by name
*-------------------------------------------------
* @param configName name of config to retrieve
* @return value of key
*-------------------------------------------------
* For INI content
*
* [fano]
* host=example.com
* [server]
* host=localhost
*
* where [fano] section is default section
*
* For configName = 'server.host', it returns 'localhost'
* For configName = 'host', it returns 'example.com'
*-------------------------------------------------*)
function TIniConfig.getString(
const configName : string;
const defaultValue : string = ''
) : string;
var section, ident : string;
begin
getSectionIdentFromConfigName(configName, section, ident);
result := fIniConfig.readString(section, ident, defaultValue);
end;
(*!------------------------------------------------
* retrieve integer value by name
*-------------------------------------------------
* @param configName name of config to retrieve
* @return value of key
*-------------------------------------------------
* For INI content
*
* [fano]
* port=8080
* [server]
* port=9000
*
* where [fano] section is default section
*
* For configName = 'server.port', it returns integer of 9000
* For configName = 'port', it returns integer value of 8080
*-------------------------------------------------*)
function TIniConfig.getInt(
const configName : string;
const defaultValue : integer = 0
) : integer;
var section, ident : string;
begin
getSectionIdentFromConfigName(configName, section, ident);
result := fIniConfig.readInteger(section, ident, defaultValue);
end;
(*!------------------------------------------------
* retrieve boolean value by name
*-------------------------------------------------
* @param configName name of config to retrieve
* @return value of key
*-------------------------------------------------*)
function TIniConfig.getBool(
const configName : string;
const defaultValue : boolean = false
) : boolean;
var section, ident : string;
begin
getSectionIdentFromConfigName(configName, section, ident);
result := fIniConfig.readBool(section, ident, defaultValue);
end;
(*!------------------------------------------------
* retrieve double value by name
*-------------------------------------------------
* @param configName name of config to retrieve
* @return value of key
*-------------------------------------------------*)
function TIniConfig.getFloat(
const configName : string;
const defaultValue : double = 0.0
) : double;
var section, ident : string;
begin
getSectionIdentFromConfigName(configName, section, ident);
result := fIniConfig.readFloat(section, ident, defaultValue);
end;
(*!------------------------------------------------
* test if config name is exists in configuration
*-------------------------------------------------
* @param configName name of config to check
* @return true if configName is exists otherwise false
*-------------------------------------------------*)
function TIniConfig.has(const configName : string) : boolean;
var section, ident : string;
begin
getSectionIdentFromConfigName(configName, section, ident);
result := fIniConfig.sectionExists(section) and
fIniConfig.ValueExists(section, ident);
end;
end.
| 35.739286 | 100 | 0.459578 |
6aede3366f120ffcb1b01b7f37c6593a84dbf744
| 339 |
dfm
|
Pascal
|
dlgattch.dfm
|
tatmanblue/emailmax
|
23ded6e54c40e90cabdff5fef5e6c6ce7602c10b
|
[
"Apache-2.0"
] | null | null | null |
dlgattch.dfm
|
tatmanblue/emailmax
|
23ded6e54c40e90cabdff5fef5e6c6ce7602c10b
|
[
"Apache-2.0"
] | null | null | null |
dlgattch.dfm
|
tatmanblue/emailmax
|
23ded6e54c40e90cabdff5fef5e6c6ce7602c10b
|
[
"Apache-2.0"
] | null | null | null |
object dlgAttachFiles: TdlgAttachFiles
Left = 250
Top = 109
Width = 696
Height = 480
Caption = 'dlgAttachFiles'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
end
| 19.941176 | 38 | 0.696165 |
83fde826d155c04a64ef88d2f99da59f8971b06b
| 976 |
pas
|
Pascal
|
Version8/Source/CMD/MyDSSClassDefs.pas
|
dss-extensions/electricdss-src
|
fab07b5584090556b003ef037feb25ec2de3b7c9
|
[
"BSD-3-Clause"
] | 1 |
2022-01-23T14:43:30.000Z
|
2022-01-23T14:43:30.000Z
|
Version8/Source/CMD/MyDSSClassDefs.pas
|
PMeira/electricdss-src
|
fab07b5584090556b003ef037feb25ec2de3b7c9
|
[
"BSD-3-Clause"
] | 7 |
2018-08-15T04:00:26.000Z
|
2018-10-25T10:15:59.000Z
|
Version8/Source/CMD/MyDSSClassDefs.pas
|
PMeira/electricdss-src
|
fab07b5584090556b003ef037feb25ec2de3b7c9
|
[
"BSD-3-Clause"
] | null | null | null |
unit MyDSSClassDefs;
{
----------------------------------------------------------
Copyright (c) 2008-2015, Electric Power Research Institute, Inc.
All rights reserved.
----------------------------------------------------------
}
{
Prototype unit for creating custom version of DSS
}
interface
const
MYCLASS_ELEMENT_CONST = 99 * 8; // make unique constants for your classes
// SEE DSSClassDefs.pas
{Assign (typically by adding) this constant to DSSClassType when objects of
your custom class are instantiated. See Tline.Create in Line.Pas, for example}
procedure CreateMyDSSClasses; // Called in DSSClassDefs
implementation
uses
DSSClass
{Add Special Uses clauses here: }
{,MyDSSClass};
procedure CreateMyDSSClasses;
begin
{Put your custom class instantiations here}
{ Example:
DSSClasses.New := TMyDSSClass.Create;
}
end;
initialization
finalization
end.
| 19.52 | 84 | 0.601434 |
f199ce4960d6132a7548478f48f2afcffedac3fc
| 63,928 |
pas
|
Pascal
|
server/tests/tests_server_restful.pas
|
atkins126/fhirserver
|
b6c2527f449ba76ce7c06d6b1c03be86cf4235aa
|
[
"BSD-3-Clause"
] | null | null | null |
server/tests/tests_server_restful.pas
|
atkins126/fhirserver
|
b6c2527f449ba76ce7c06d6b1c03be86cf4235aa
|
[
"BSD-3-Clause"
] | null | null | null |
server/tests/tests_server_restful.pas
|
atkins126/fhirserver
|
b6c2527f449ba76ce7c06d6b1c03be86cf4235aa
|
[
"BSD-3-Clause"
] | null | null | null |
unit FHIR.Tests.RestfulServer;
{
Copyright (c) 2017+, Health Intersections Pty Ltd (http://www.healthintersections.com.au)
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
}
{$IFDEF FPC}{$MODE DELPHI}{$ENDIF}
interface
uses
Windows, Sysutils, Classes, IniFiles,
{$IFDEF FPC} FPCUnit, TestRegistry, {$ELSE} DUnitX.TestFramework, {$ENDIF}
IdHttp, IdSSLOpenSSL,
fsl_base, fsl_utilities, fsl_tests, fsl_json, fsl_http,
fhir_factory, fhir_common,
ftx_ucum_services,
fhir4_constants, fhir4_context, fhir_objects, fhir_utilities, fhir4_types, fhir4_resources, fhir4_resources_base, fhir_pathengine,
fhir4_utilities, fhir4_validator, fhir4_indexinfo, fhir4_javascript,
fhir4_factory, fhir_indexing, fhir_javascript, fhir4_pathengine,
fhir_client, FHIR.Version.Client, fsl_scim,
fhir_oauth, FHIR.Tests.SmartLogin,
FHIR.Tx.Server,
FHIR.Server.Constants, FHIR.Server.Utilities, FHIR.Server.Context, FHIR.Server.Storage, FHIR.Server.UserMgr, FHIR.Server.Indexing, FHIR.Server.Session, FHIR.Server.Ini,
FHIR.Server.Web, FHIR.Server.WebSource, FHIR.Server.Factory, FHIR.Server.Subscriptions, FHIR.Server.Javascript, FHIR.Server.JWT, FHIR.Server.Telnet,
FHIR.Server.ValidatorR4, FHIR.Server.IndexingR4, FHIR.Server.SubscriptionsR4;
{$IFNDEF FPC}
Const
TEST_USER_NAME = 'DunitX-test-user';
TEST_ANON_USER_NAME = 'DunitX-anon-user';
JWT = 'eyJhbGciOiJSUzI1NiIsImtpZCI6IjZjZDg1OTdhMWY2ODVjZTA2Y2NhNDJkZTBjMjVmNmY0YjA0OGQ2ODkifQ.'+
'eyJhenAiOiI5NDAwMDYzMTAxMzguYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJhdWQiOiI5NDAwMDYzMTAxMzguYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJzdWIiOiIxMTE5MDQ2MjAwNTMzNjQzOTIyODYiLCJlbWFpbCI6ImdyYWhhbWVnQGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLC'+'JhdF9oYXNoIjoiRGltRTh0Zy1XM1U3dFY1ZkxFS2tuUSIsImlzcyI6ImFjY291bnRzLmdvb2dsZS5jb20iLCJpYXQiOjE1MDExMjg2NTgsImV4cCI6MTUwMTEzMjI1OH0.'+
'DIQA4SvN66r6re8WUxcM9sa5PnVaX1t0Sh34H7ltJE1ElFrwzRAQ3Hz2u_M_gE7a4NaxmbJDFQnVGI3PvZ1TD_bT5zFcFKcq1NWe6kHNFYYn3slxSzGuj02bCdRsTRKu9LXs0YZM1uhbbimOyyajJHckT3tT2dpXYCdfZvBLVu7LUwchBigxE7Q-QnsXwJh28f9P-C1SrA-hLkVf9F7E7zBXgUtkoEyN4rI7FLI6tP7Yc_i'+'ryICAVu2rR9AZCU-hTICbN-uBC7Fuy-kMr-yuu9zdZsaS4LYJxyoAPZNIengjtNcceDVX9m-Evw-Z1iwSFTtDvVyBlC7xbf4JdxaSRw'; // token from google for Grahame Grieve
Type
TTestServerFactory = class (TFHIRServerFactory)
private
FVersion : TFHIRVersion;
public
constructor Create(version : TFHIRVersion);
function makeIndexes : TFHIRIndexBuilder; override;
function makeValidator: TFHIRValidatorV; override;
function makeIndexer : TFHIRIndexManager; override;
function makeSubscriptionManager(ServerContext : TFslObject) : TSubscriptionManager; override;
function makeEngine(validatorContext : TFHIRWorkerContextWithFactory; ucum : TUcumServiceImplementation) : TFHIRPathEngineV; override;
procedure setTerminologyServer(validatorContext : TFHIRWorkerContextWithFactory; server : TFslObject{TTerminologyServer}); override;
end;
TTestStorageService = class;
TTestFHIROperationEngine = class (TFHIROperationEngine)
private
FIsReadAllowed : boolean;
FStorage : TTestStorageService;
protected
procedure processGraphQL(graphql: String; request : TFHIRRequest; response : TFHIRResponse); override;
public
function opAllowed(resource : string; command : TFHIRCommandType) : Boolean; override;
procedure StartTransaction; override;
procedure CommitTransaction; override;
procedure RollbackTransaction; override;
procedure ExecuteMetadata(context : TOperationContext; request: TFHIRRequest; response : TFHIRResponse); override;
function ExecuteRead(request: TFHIRRequest; response : TFHIRResponse; ignoreHeaders : boolean) : boolean; override;
procedure ExecuteSearch(request: TFHIRRequest; response : TFHIRResponse); override;
function LookupReference(context : TFHIRRequest; id : String) : TResourceWithReference; override;
function GetResourceById(request: TFHIRRequest; aType : String; id, base : String; var needSecure : boolean) : TFHIRResourceV; override;
function getResourceByUrl(aType : string; url, version : string; allowNil : boolean; var needSecure : boolean): TFHIRResourceV; override;
procedure AuditRest(session : TFhirSession; intreqid, extreqid, ip, resourceName : string; id, ver : String; verkey : integer; op : TFHIRCommandType; provenance : TFhirProvenanceW; httpCode : Integer; name, message : String; patients : TArray<String>); overload; override;
procedure AuditRest(session : TFhirSession; intreqid, extreqid, ip, resourceName : string; id, ver : String; verkey : integer; op : TFHIRCommandType; provenance : TFhirProvenanceW; opName : String; httpCode : Integer; name, message : String; patients : TArray<String>); overload; override;
function patientIds(request : TFHIRRequest; res : TFHIRResourceV) : TArray<String>; override;
property IsReadAllowed : boolean read FIsReadAllowed write FIsReadAllowed;
end;
TTestingFHIRUserProvider = class (TFHIRUserProvider)
public
Function loadUser(id : String; var key : integer) : TSCIMUser; override;
function CheckLogin(username, password : String; var key : integer) : boolean; override;
Function loadUser(key : integer) : TSCIMUser; overload; override;
function CheckId(id : String; var username, hash : String) : boolean; override;
function loadOrCreateUser(id, name, email : String; var key : integer) : TSCIMUser; override;
end;
TTestOAuthLogin = class (TFslObject)
private
client_id, name, redirect, state, scope, jwt, patient, launch: String;
public
function Link : TTestOAuthLogin; overload;
end;
TTestStorageService = class (TFHIRStorageService)
private
FlastSession : TFHIRSession;
FLastReadSystem : String;
FLastReadUser : String;
FLastUserEvidence : TFHIRUseridEvidence;
FLastSystemEvidence : TFHIRSystemIdEvidence;
FContext : TFHIRServerContext;
FServer : TFhirWebServer;
FEndpoint : TFhirWebServerEndpoint;
FOAuths : TFslMap<TTestOAuthLogin>;
procedure reset;
procedure SetContext(const Value: TFHIRServerContext);
protected
function GetTotalResourceCount: integer; override;
public
constructor Create(factory : TFHIRFactory); override;
destructor Destroy; override;
procedure RecordFhirSession(session: TFhirSession); override;
procedure QueueResource(session : TFHIRSession; r: TFhirResourceV; dateTime: TFslDateTime); override;
function createOperationContext(const lang : THTTPLanguages) : TFHIROperationEngine; override;
Procedure Yield(op : TFHIROperationEngine; exception : Exception); override;
procedure recordOAuthLogin(id, client_id, scope, redirect_uri, state, launch : String); override;
function hasOAuthSession(id : String; status : integer) : boolean; override;
function fetchOAuthDetails(key, status : integer; var client_id, name, redirect, state, scope, launch : String) : boolean; overload; override;
function fetchOAuthDetails(id : String; var client_id, redirect, state, scope, launch : String) : boolean; overload; override;
procedure updateOAuthSession(id : String; state, key : integer; var client_id : String); override;
procedure recordOAuthChoice(id : String; scopes, jwt, patient : String); override;
procedure RegisterAuditEvent(session: TFhirSession; ip: String); override;
procedure RegisterConsentRecord(session: TFhirSession); override;
function getClientInfo(id : String) : TRegisteredClientInformation; override;
function getClientName(id : String) : string; override;
function storeClient(client : TRegisteredClientInformation; sessionKey : integer) : String; override;
procedure FetchResourceCounts(compList : TFslList<TFHIRCompartmentId>; counts : TStringList); override;
procedure Sweep; override;
procedure CloseFhirSession(key: integer); override;
procedure QueueResource(session : TFHIRSession; r: TFhirResourceV); overload; override;
function RetrieveSession(key : integer; var UserKey, Provider : integer; var Id, Name, Email : String) : boolean; override;
function ProfilesAsOptionList : String; override;
procedure ProcessSubscriptions; override;
procedure ProcessEmails; override;
procedure ProcessObservations; override;
procedure RunValidation; override;
function FetchResource(key : integer) : TFHIRResourceV; override;
procedure fetchClients(list : TFslList<TRegisteredClientInformation>); override;
property ServerContext : TFHIRServerContext read FContext write SetContext;
function loadPackages : TFslMap<TLoadedPackageInformation>; override;
function fetchLoadedPackage(id : String) : TBytes; override;
procedure recordPackageLoaded(id, ver : String; count : integer; blob : TBytes); override;
Procedure SetUpRecording(Session : TFHIRSession); override;
procedure RecordExchange(req: TFHIRRequest; resp: TFHIRResponse; e: exception); override;
procedure FinishRecording(); override;
end;
[TextFixture]
TRestFulServerTests = Class (TObject)
private
FIni : TFHIRServerIniFile;
FGlobals : TFHIRServerSettings;
FStore : TTestStorageService;
FContext : TFHIRServerContext;
FServer : TFhirWebServer;
FClientXml : TFhirClient;
FClientJson : TFhirClient;
FClientSSL : TFhirClient;
FClientSSLCert : TFhirClient;
FEndpoint : TFhirWebServerEndpoint;
procedure registerJs(snder : TObject; js : TJsHost);
function SslGet(url: String): TFHIRResource;
function getJson(url: String): TJsonObject;
public
[Setup] Procedure SetUp;
[TearDown] procedure TearDown;
[TestCase] Procedure TestLowLevelXml;
[TestCase] Procedure TestLowLevelJson;
[TestCase] Procedure TestCapabilityStatementXml;
[TestCase] Procedure TestCapabilityStatementJson;
[TestCase] Procedure TestSSL;
[TestCase] Procedure TestCapabilityStatementSSL;
[TestCase] Procedure TestPatientExampleJson;
[TestCase] Procedure TestPatientExampleXml;
[TestCase] Procedure TestPatientExampleSSL;
[TestCase] Procedure TestPatientExampleOWin;
[TestCase] procedure TestSmartStandaloneLaunchCS;
[TestCase] procedure TestSmartStandaloneLaunchWK;
[TestCase] procedure TestSmartStandaloneLaunchNU;
[TestCase] procedure TestSmartStandaloneLaunchError;
[TestCase] procedure TestSmartStandaloneLaunchBadRedirect;
[TestCase] Procedure TestPatientExampleSmartOnFhir;
[TestCase] Procedure TestConformanceCertificateNone;
[TestCase] Procedure TestConformanceCertificate;
[TestCase] Procedure TestConformanceCertificateNotOk;
[TestCase] Procedure TestConformanceCertificateSpecified;
[TestCase] Procedure TestConformanceCertificateWrong;
[TestCase] Procedure TestConformanceCertificateOptionalNone;
[TestCase] Procedure TestConformanceCertificateOptionalRight;
[TestCase] Procedure TestConformanceCertificateOptionalWrong;
[TestCase] Procedure TestPatientExampleCertificate;
[TestCase] Procedure TestPatientExampleCertificateJWT;
[TestCase] Procedure TestPatientExampleCertificateJWTNoCert;
end;
{$ENDIF}
implementation
{$IFNDEF FPC}
{ TTestStorageService }
destructor TTestStorageService.Destroy;
begin
FOAuths.Free;
FlastSession.Free;
inherited;
end;
procedure TTestStorageService.CloseFhirSession(key: integer);
begin
raise EFslException.Create('Not Implemented');
end;
constructor TTestStorageService.Create(factory : TFHIRFactory);
begin
inherited;
FOAuths := TFslMap<TTestOAuthLogin>.create('oauths');
end;
function TTestStorageService.createOperationContext(const lang : THTTPLanguages): TFHIROperationEngine;
begin
result := TTestFHIROperationEngine.create(self, FContext.Link, lang);
TTestFHIROperationEngine(result).FIsReadAllowed := true;
TTestFHIROperationEngine(result).FStorage := self;
end;
procedure TTestStorageService.Yield(op: TFHIROperationEngine; exception: Exception);
begin
TTestFHIROperationEngine(op).FServerContext.Free;
op.free;
end;
function TTestStorageService.GetTotalResourceCount: integer;
begin
result := 1;
end;
procedure TTestStorageService.QueueResource(session : TFHIRSession; r: TFhirResourceV; dateTime: TFslDateTime);
begin
end;
procedure TTestStorageService.RecordExchange(req: TFHIRRequest; resp: TFHIRResponse; e: exception);
begin
end;
procedure TTestStorageService.RecordFhirSession(session: TFhirSession);
begin
FlastSession.Free;
FlastSession := session.Link;
end;
procedure TTestStorageService.recordOAuthChoice(id, scopes, jwt, patient: String);
var
l : TTestOAuthLogin;
begin
l := FOAuths[id];
l.scope := scopes;
l.jwt := jwt;
l.patient := patient;
end;
procedure TTestStorageService.recordOAuthLogin(id, client_id, scope, redirect_uri, state, launch: String);
var
l : TTestOAuthLogin;
begin
l := TTestOAuthLogin.Create;
try
l.client_id := client_id;
l.redirect := redirect_uri;
l.state := state;
l.scope := scope;
l.launch := launch;
FOAuths.Add(id, l.Link);
finally
l.Free;
end;
end;
procedure TTestStorageService.recordPackageLoaded(id, ver: String; count: integer; blob: TBytes);
begin
raise EFslException.Create('Not Implemented');
end;
function TTestStorageService.hasOAuthSession(id: String; status: integer): boolean;
begin
result := FOAuths.ContainsKey(id);
end;
function TTestStorageService.loadPackages: TFslMap<TLoadedPackageInformation>;
begin
raise EFslException.Create('Not Implemented');
end;
procedure TTestStorageService.ProcessEmails;
begin
raise EFslException.Create('Not Implemented');
end;
procedure TTestStorageService.ProcessObservations;
begin
//
end;
procedure TTestStorageService.ProcessSubscriptions;
begin
// do nothing...
end;
function TTestStorageService.ProfilesAsOptionList: String;
begin
raise EFslException.Create('Not Implemented');
end;
procedure TTestStorageService.QueueResource(session : TFHIRSession; r: TFhirResourceV);
begin
raise EFslException.Create('Not Implemented');
end;
procedure TTestStorageService.updateOAuthSession(id: String; state, key: integer; var client_id : String);
var
l : TTestOAuthLogin;
begin
l := FOAuths[id];
if not FOAuths.containsKey(inttostr(key)) then
FOAuths.Add(inttostr(key), l.Link);
client_id := FOAuths[inttostr(key)].client_id;
end;
procedure TTestStorageService.fetchClients(list: TFslList<TRegisteredClientInformation>);
begin
raise EFslException.Create('Not Implemented');
end;
function TTestStorageService.fetchLoadedPackage(id: String): TBytes;
begin
raise EFslException.Create('Not Implemented');
end;
function TTestStorageService.fetchOAuthDetails(id: String; var client_id, redirect, state, scope, launch: String): boolean;
var
l : TTestOAuthLogin;
begin
result := FOAuths.ContainsKey(id);
if result then
begin
l := FOAuths[id];
client_id := l.client_id;
redirect := l.redirect;
state := l.state;
scope := l.scope;
launch := l.launch;
end;
end;
function TTestStorageService.fetchOAuthDetails(key, status: integer; var client_id, name, redirect, state, scope, launch: String): boolean;
var
l : TTestOAuthLogin;
begin
result := FOAuths.ContainsKey(inttostr(key));
if result then
begin
l := FOAuths[inttostr(key)];
client_id := l.client_id;
name := l.name;
redirect := l.redirect;
state := l.state;
scope := l.scope;
launch := l.launch;
end;
end;
function TTestStorageService.FetchResource(key: integer): TFHIRResourceV;
begin
raise EFslException.Create('Not Implemented');
end;
procedure TTestStorageService.FetchResourceCounts(compList : TFslList<TFHIRCompartmentId>; counts : TStringList);
begin
raise EFslException.Create('Not Implemented');
end;
procedure TTestStorageService.FinishRecording();
begin
end;
function TTestStorageService.getClientInfo(id: String): TRegisteredClientInformation;
begin
result := TRegisteredClientInformation.Create;
result.name := getClientName(id);
result.redirects.Add('http://localhost:961/done');
result.secret := 'this-password-is-never-used';
end;
function TTestStorageService.getClientName(id: String): string;
begin
result := 'test server';
end;
procedure TTestStorageService.RegisterAuditEvent(session: TFhirSession; ip: String);
begin
end;
procedure TTestStorageService.RegisterConsentRecord(session: TFhirSession);
begin
end;
procedure TTestStorageService.reset;
begin
FlastSession.Free;
FlastSession := nil;
FLastReadSystem := '';
FLastReadUser := '';
FLastUserEvidence := userNoInformation;
FLastSystemEvidence := systemNoInformation;
FOAuths.Clear;
end;
function TTestStorageService.RetrieveSession(key: integer; var UserKey, Provider: integer; var Id, Name, Email: String): boolean;
begin
raise EFslException.Create('Not Implemented');
end;
procedure TTestStorageService.RunValidation;
begin
raise EFslException.Create('Not Implemented');
end;
procedure TTestStorageService.SetContext(const Value: TFHIRServerContext);
begin
FContext := Value;
end;
procedure TTestStorageService.SetupRecording(Session : TFHIRSession);
begin
end;
function TTestStorageService.storeClient(client: TRegisteredClientInformation; sessionKey: integer): String;
begin
end;
procedure TTestStorageService.Sweep;
begin
//
end;
{ TTestingFHIRUserProvider }
function TTestingFHIRUserProvider.CheckId(id: String; var username, hash: String): boolean;
begin
raise EFslException.Create('Not Implemented');
end;
function TTestingFHIRUserProvider.CheckLogin(username, password: String; var key: integer): boolean;
begin
result := true;
if (username = 'test') and (password = 'test') then
key := 1
else
result := false;
end;
function TTestingFHIRUserProvider.loadUser(id: String; var key: integer): TSCIMUser;
begin
result := TSCIMUser.CreateNew;
if (id = 'ANONYMOUS') then
result.userName := TEST_ANON_USER_NAME
else
result.userName := TEST_USER_NAME;
result.formattedName := result.userName+'.formatted';
key := 1;
end;
function TTestingFHIRUserProvider.loadOrCreateUser(id, name, email: String; var key: integer): TSCIMUser;
begin
raise EFslException.Create('Not Implemented');
end;
function TTestingFHIRUserProvider.loadUser(key: integer): TSCIMUser;
begin
raise EFslException.Create('Not Implemented');
end;
{ TTestFHIROperationEngine }
procedure TTestFHIROperationEngine.AuditRest(session: TFhirSession; intreqid, extreqid, ip, resourceName, id, ver: String; verkey: integer; op: TFHIRCommandType; provenance: TFhirProvenanceW; httpCode: Integer; name, message: String; patients : TArray<String>);
begin
raise EFslException.Create('Not Implemented');
end;
procedure TTestFHIROperationEngine.AuditRest(session: TFhirSession; intreqid, extreqid, ip, resourceName, id, ver: String; verkey: integer; op: TFHIRCommandType; provenance: TFhirProvenanceW; opName: String; httpCode: Integer; name, message: String; patients : TArray<String>);
begin
raise EFslException.Create('Not Implemented');
end;
procedure TTestFHIROperationEngine.CommitTransaction;
begin
end;
procedure TTestFHIROperationEngine.ExecuteMetadata(context : TOperationContext; request: TFHIRRequest; response: TFHIRResponse);
var
oConf : TFhirCapabilityStatement;
c : TFhirContactPoint;
ct: TFhirContactDetail;
rest : TFhirCapabilityStatementRest;
ext : TFhirExtension;
begin
FStorage.FLastReadUser := request.Session.Username;
FStorage.FLastReadSystem := request.Session.SystemName;
FStorage.FLastUserEvidence := request.Session.UserEvidence;
FStorage.FLastSystemEvidence := request.Session.SystemEvidence;
response.HTTPCode := 200;
oConf := TFhirCapabilityStatement.Create;
response.Resource := oConf;
oConf.id := 'FhirServer';
ct := oConf.contactList.Append;
c := ct.telecomList.Append;
c.system := ContactPointSystemOther;
c.value := 'http://healthintersections.com.au/';
oConf.version := FHIR_GENERATED_VERSION+'-'+SERVER_FULL_VERSION; // this conformance statement is versioned by both
oConf.name := 'Health Intersections FHIR Server Conformance Statement';
oConf.publisher := 'Health Intersections'; //
oConf.description := 'Standard Conformance Statement for the open source Reference FHIR Server provided by Health Intersections';
oConf.status := PublicationStatusActive;
oConf.experimental := false;
oConf.date := TFslDateTime.makeUTC;
oConf.software := TFhirCapabilityStatementSoftware.Create;
oConf.software.name := 'Reference Server';
oConf.software.version := SERVER_FULL_VERSION;
oConf.software.releaseDate := TFslDateTime.fromXml(SERVER_RELEASE_DATE);
rest := oConf.restList.Append;
rest.security := TFhirCapabilityStatementRestSecurity.Create;
ext := rest.security.addExtension('http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris');
ext.addExtension('authorize', 'https://'+FStorage.FServer.host+':'+inttostr(FStorage.FServer.SSLPort)+FStorage.FEndpoint.path + FStorage.FEndpoint.AuthServer.AuthPath);
ext.addExtension('token', 'https://'+FStorage.FServer.host+':'+inttostr(FStorage.FServer.SSLPort)+FStorage.FEndpoint.path + FStorage.FEndpoint.AuthServer.TokenPath);
end;
function TTestFHIROperationEngine.ExecuteRead(request: TFHIRRequest; response: TFHIRResponse; ignoreHeaders: boolean): boolean;
//var
// resourceKey : integer;
// field : String;
// comp : TFHIRParserClass;
// needsObject : boolean;
var
filename : String;
format : TFHIRFormat;
begin
result := false;
NotFound(request, response);
filename := FHIR_TESTING_FILE(4, 'examples', 'patient-'+request.Id+'.xml');
if check(response, FIsReadAllowed and (request.ResourceName = 'Patient') and FileExists(filename), 400, lang, StringFormat(GetFhirMessage('MSG_OP_NOT_ALLOWED', lang), [CODES_TFHIRCommandType[request.CommandType], request.ResourceName]), itForbidden) then
begin
result := true;
FStorage.FLastReadUser := request.Session.Username;
FStorage.FLastReadSystem := request.Session.SystemName;
FStorage.FLastUserEvidence := request.Session.UserEvidence;
FStorage.FLastSystemEvidence := request.Session.SystemEvidence;
response.HTTPCode := 200;
response.Message := 'OK';
response.Body := '';
response.versionId := '1';
response.LastModifiedDate := FileGetModified(filename);
format := ffXml;
response.Resource := FileToResource(filename, format);
end;
end;
procedure TTestFHIROperationEngine.ExecuteSearch(request: TFHIRRequest; response: TFHIRResponse);
begin
response.resource := TFhirBundle.Create(BundleTypeSearchset);
end;
function TTestFHIROperationEngine.GetResourceById(request: TFHIRRequest; aType, id, base: String; var needSecure: boolean): TFHIRResourceV;
begin
raise EFslException.Create('Not Implemented');
end;
function TTestFHIROperationEngine.getResourceByUrl(aType: String; url, version: string; allowNil: boolean; var needSecure: boolean): TFHIRResourceV;
begin
raise EFslException.Create('Not Implemented');
end;
function TTestFHIROperationEngine.LookupReference(context: TFHIRRequest; id: String): TResourceWithReference;
begin
raise EFslException.Create('Not Implemented');
end;
function TTestFHIROperationEngine.opAllowed(resource: string; command: TFHIRCommandType): Boolean;
begin
result := true;
end;
function TTestFHIROperationEngine.patientIds(request: TFHIRRequest; res: TFHIRResourceV): TArray<String>;
begin
result := nil;
end;
procedure TTestFHIROperationEngine.processGraphQL(graphql: String; request: TFHIRRequest; response: TFHIRResponse);
begin
raise EFslException.Create('Not Implemented');
end;
procedure TTestFHIROperationEngine.RollbackTransaction;
begin
end;
procedure TTestFHIROperationEngine.StartTransaction;
begin
end;
{ TRestFulServerTests }
function TRestFulServerTests.getJson(url: String): TJsonObject;
var
http : TIdHTTP;
resp : TBytesStream;
fmt : TFHIRFormat;
begin
http := TIdHTTP.Create(nil);
Try
http.Request.Accept := 'application/fhir+json';
resp := TBytesStream.create;
try
http.Get(FEndpoint.ClientAddress(false)+url, resp);
resp.position := 0;
fmt := ffJson;
result := TJSONParser.Parse(resp);
finally
resp.free;
end;
finally
http.free;
end;
end;
procedure TRestFulServerTests.registerJs(snder: TObject; js: TJsHost);
begin
js.engine.registerFactory(fhir4_javascript.registerFHIRTypes, fhirVersionRelease4, TFHIRFactoryR4.create);
js.engine.registerFactory(fhir4_javascript.registerFHIRTypesDef, fhirVersionUnknown, TFHIRFactoryR4.create);
end;
procedure TRestFulServerTests.Setup;
begin
FIni := TFHIRServerIniFile.Create('C:\work\fhirserver\utilities\tests\server-tests.ini');
FGlobals := TFHIRServerSettings.Create;
FGLobals.load(FIni);
FServer := TFhirWebServer.create(FGlobals.Link, TFHIRTelnetServer.create(44122, 'test'), 'Test-Server');
FServer.OnRegisterJs := registerJs;
FServer.loadConfiguration(FIni);
FServer.SourceProvider := TFHIRWebServerSourceFolderProvider.Create('C:\work\fhirserver\server\web');
FStore := TTestStorageService.create(TFHIRFactoryX.create);
FContext := TFHIRServerContext.Create(FStore.Link, TTestServerFactory.create(FStore.Factory.version));
FContext.Globals := FGlobals.Link;
FStore.ServerContext := FContext;
FContext.TerminologyServer := TTerminologyServer.Create(nil, FContext.factory.Link, nil);
FContext.Validate := true; // move to database config FIni.ReadBool(voVersioningNotApplicable, 'fhir', 'validate', true);
FContext.UserProvider := TTestingFHIRUserProvider.Create;
FEndpoint := FServer.registerEndPoint('test', '/test', FContext.Link, FIni);
FServer.OWinSecuritySecure := true;
FServer.ServeMissingCertificate := true;
FServer.ServeUnknownCertificate := true;
FStore.FServer := FServer;
FStore.FEndpoint := FEndpoint;
FServer.Start(true, true);
FClientXml := TFhirClients.makeIndy(FContext.ValidatorContext.Link as TFHIRWorkerContext, FEndpoint.ClientAddress(false), false);
FClientJson := TFhirClients.makeIndy(FContext.ValidatorContext.Link as TFHIRWorkerContext, FEndpoint.ClientAddress(false), true);
FClientSSL := TFhirClients.makeIndy(FContext.ValidatorContext.Link as TFHIRWorkerContext, FEndpoint.ClientAddress(true), false);
FClientSSLCert := TFhirClients.makeIndy(FContext.ValidatorContext.Link as TFHIRWorkerContext, FEndpoint.ClientAddress(true), true);
end;
procedure TRestFulServerTests.TearDown;
begin
FClientXml.Free;
FClientJson.Free;
FClientSSL.Free;
FClientSSLCert.Free;
FServer.Stop;
FServer.Free;
FStore.Free;
FContext.Free;
FGlobals.Free;
FIni.Free;
end;
procedure TRestFulServerTests.TestCapabilityStatementJson;
var
cs : TFhirCapabilityStatement;
begin
cs := FClientJson.conformance(false);
try
Assert.IsNotNull(cs);
finally
cs.Free;
end;
end;
procedure TRestFulServerTests.TestCapabilityStatementSSL;
var
cs : TFhirCapabilityStatement;
begin
FClientSSL.smartToken := nil;
cs := FClientSSL.conformance(false);
try
Assert.IsNotNull(cs);
finally
cs.Free;
end;
end;
procedure TRestFulServerTests.TestCapabilityStatementXml;
var
cs : TFhirCapabilityStatement;
begin
cs := FClientXml.conformance(false);
try
Assert.IsNotNull(cs);
finally
cs.Free;
end;
end;
procedure TRestFulServerTests.TestLowLevelXml;
var
http : TIdHTTP;
resp : TBytesStream;
begin
http := TIdHTTP.Create(nil);
Try
// ssl := TIdSSLIOHandlerSocketOpenSSL.Create(Nil);
// Try
// http.IOHandler := ssl;
// ssl.SSLOptions.Mode := sslmClient;
// ssl.SSLOptions.Method := sslvTLSv1_2;
// finally
// ssl.free;
// end;
http.Request.Accept := 'application/fhir+xml';
resp := TBytesStream.create;
try
http.Get(FEndpoint.ClientAddress(false)+'/metadata', resp);
resp.position := 0;
Assert.isTrue(http.ResponseCode = 200, 'response code <> 200');
Assert.isTrue(http.Response.ContentType = 'application/fhir+xml', 'response content type <> application/fhir+xml');;
finally
resp.free;
end;
finally
http.free;
end;
end;
procedure TRestFulServerTests.TestConformanceCertificate;
var
cs : TFHIRCapabilityStatement;
begin
FStore.reset;
FServer.Stop;
FServer.ServeMissingCertificate := false;
FServer.ServeUnknownCertificate := true;
FServer.CertificateIdList.clear;
FServer.Start(true, true);
FClientSSL.smartToken := nil;
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certFile := 'C:\work\fhirserver\utilities\tests\client.test.fhir.org.cert';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certPWord := 'test';
cs := FClientSSL.conformance(false);
try
Assert.IsNotNull(cs);
finally
cs.Free;
end;
Assert.IsTrue(FStore.FLastReadSystem = 'client.test.fhir.org', 'SystemName should be "client.test.fhir.org" not "'+FStore.FLastReadSystem+'"');
Assert.IsTrue(FStore.FLastReadUser = TEST_ANON_USER_NAME, 'Username should be "'+TEST_ANON_USER_NAME+'" not '+FStore.FLastReadUser+'"');
Assert.IsTrue(FStore.FLastUserEvidence = userAnonymous, 'UserEvidence should be "'+CODES_UserIdEvidence[userAnonymous]+'" not "'+CODES_UserIdEvidence[FStore.FLastUserEvidence]+'"');
Assert.IsTrue(FStore.FLastSystemEvidence = systemFromCertificate, 'SystemEvidence should be "'+CODES_SystemIdEvidence[systemFromCertificate]+'" not "'+CODES_SystemIdEvidence[FStore.FLastSystemEvidence]+'"');
end;
procedure TRestFulServerTests.TestConformanceCertificateNotOk;
var
cs : TFHIRCapabilityStatement;
begin
FStore.reset;
FServer.Stop;
FServer.ServeMissingCertificate := false;
FServer.ServeUnknownCertificate := false;
FServer.CertificateIdList.clear;
FServer.Start(true, true);
FClientSSL.smartToken := nil;
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certFile := 'C:\work\fhirserver\utilities\tests\client.test.fhir.org.cert';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certPWord := 'test';
try
cs := FClientSSL.conformance(false);
try
Assert.IsFalse(true);
finally
cs.Free;
end;
except
on e:exception do
Assert.IsTrue(e.message.contains('SSL')); // all good - access should be refused
end;
Assert.IsTrue(FStore.FLastReadSystem = '', 'SystemName should be "" not "'+FStore.FLastReadSystem+'"');
Assert.IsTrue(FStore.FLastReadUser = '', 'Username should be "", not "'+FStore.FLastReadUser+'"');
Assert.IsTrue(FStore.FLastUserEvidence = userNoInformation, 'UserEvidence should be "'+CODES_UserIdEvidence[userNoInformation]+'" not "'+CODES_UserIdEvidence[FStore.FLastUserEvidence]+'"');
Assert.IsTrue(FStore.FLastSystemEvidence = systemNoInformation, 'SystemEvidence should be "'+CODES_SystemIdEvidence[systemNoInformation]+'" not "'+CODES_SystemIdEvidence[FStore.FLastSystemEvidence]+'"');
end;
procedure TRestFulServerTests.TestConformanceCertificateNone;
var
cs : TFHIRCapabilityStatement;
begin
FStore.reset;
FServer.Stop;
FServer.ServeMissingCertificate := false;
FServer.CertificateIdList.clear;
FServer.Start(true, true);
FClientSSL.smartToken := nil;
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certFile := '';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certPWord := '';
try
cs := FClientSSL.conformance(false);
try
Assert.IsFalse(true);
finally
cs.Free;
end;
except
on e:exception do
Assert.IsTrue(e.message.contains('handshake')); // all good - access should be refused
end;
Assert.IsTrue(FStore.FLastReadSystem = '', 'SystemName should be "" not "'+FStore.FLastReadSystem+'"');
Assert.IsTrue(FStore.FLastReadUser = '', 'Username should be "", not '+FStore.FLastReadUser+'"');
Assert.IsTrue(FStore.FLastUserEvidence = userNoInformation, 'UserEvidence should be "'+CODES_UserIdEvidence[userNoInformation]+'" not "'+CODES_UserIdEvidence[FStore.FLastUserEvidence]+'"');
Assert.IsTrue(FStore.FLastSystemEvidence = systemNoInformation, 'SystemEvidence should be "'+CODES_SystemIdEvidence[systemNoInformation]+'" not "'+CODES_SystemIdEvidence[FStore.FLastSystemEvidence]+'"');
end;
procedure TRestFulServerTests.TestConformanceCertificateOptionalNone;
var
cs : TFHIRCapabilityStatement;
begin
FStore.reset;
FServer.Stop;
FServer.ServeMissingCertificate := true;
FServer.CertificateIdList.add('B7:90:70:D1:D8:D1:1B:9D:03:86:F4:5B:B5:69:E3:C4');
FServer.Start(true, true);
FClientSSL.smartToken := nil;
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certFile := '';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certPWord := '';
cs := FClientSSL.conformance(false);
try
Assert.IsNotNull(cs);
finally
cs.Free;
end;
Assert.IsTrue(FStore.FLastReadSystem = 'Unknown', 'SystemName should be "Unknown" not "'+FStore.FLastReadSystem+'"');
Assert.IsTrue(FStore.FLastReadUser = TEST_ANON_USER_NAME, 'Username should be "'+TEST_ANON_USER_NAME+'" not '+FStore.FLastReadUser+'"');
Assert.IsTrue(FStore.FLastUserEvidence = userAnonymous, 'UserEvidence should be "'+CODES_UserIdEvidence[userAnonymous]+'" not "'+CODES_UserIdEvidence[FStore.FLastUserEvidence]+'"');
Assert.IsTrue(FStore.FLastSystemEvidence = systemUnknown, 'SystemEvidence should be "'+CODES_SystemIdEvidence[systemUnknown]+'" not "'+CODES_SystemIdEvidence[FStore.FLastSystemEvidence]+'"');
end;
procedure TRestFulServerTests.TestConformanceCertificateOptionalRight;
var
cs : TFHIRCapabilityStatement;
begin
FStore.reset;
FServer.Stop;
FServer.ServeMissingCertificate := true;
FServer.CertificateIdList.add('B7:90:70:D1:D8:D1:1B:9D:03:86:F4:5B:B5:69:E3:C4');
FServer.Start(true, true);
FClientSSL.smartToken := nil;
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certFile := 'C:\work\fhirserver\utilities\tests\client.test.fhir.org.cert';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certPWord := 'test';
cs := FClientSSL.conformance(false);
try
Assert.IsNotNull(cs);
finally
cs.Free;
end;
Assert.IsTrue(FStore.FLastReadSystem = 'client.test.fhir.org', 'SystemName should be "client.test.fhir.org" not "'+FStore.FLastReadSystem+'"');
Assert.IsTrue(FStore.FLastReadUser = TEST_ANON_USER_NAME, 'Username should be "'+TEST_ANON_USER_NAME+'" not '+FStore.FLastReadUser+'"');
Assert.IsTrue(FStore.FLastUserEvidence = userAnonymous, 'UserEvidence should be "'+CODES_UserIdEvidence[userAnonymous]+'" not "'+CODES_UserIdEvidence[FStore.FLastUserEvidence]+'"');
Assert.IsTrue(FStore.FLastSystemEvidence = systemFromCertificate, 'SystemEvidence should be "'+CODES_SystemIdEvidence[systemFromCertificate]+'" not "'+CODES_SystemIdEvidence[FStore.FLastSystemEvidence]+'"');
end;
procedure TRestFulServerTests.TestConformanceCertificateOptionalWrong;
var
cs : TFHIRCapabilityStatement;
begin
FStore.reset;
FServer.Stop;
FServer.ServeMissingCertificate := true;
FServer.ServeUnknownCertificate := false;
FServer.CertificateIdList.add('B7:90:70:D1:D8:D1:1B:9D:03:86:F4:5B:B5:69:E3:C4');
FServer.Start(true, true);
FClientSSL.smartToken := nil;
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certFile := 'C:\work\fhirserver\utilities\tests\local.fhir.org.cert';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certPWord := 'test';
try
cs := FClientSSL.conformance(false);
try
Assert.IsFalse(true);
finally
cs.Free;
end;
except
on e:exception do
Assert.IsTrue(e.message.contains('connecting')); // all good - access should be refused
end;
Assert.IsTrue(FStore.FLastReadSystem = '', 'SystemName should be "" not "'+FStore.FLastReadSystem+'"');
Assert.IsTrue(FStore.FLastReadUser = '', 'Username should be "", not '+FStore.FLastReadUser+'"');
Assert.IsTrue(FStore.FLastUserEvidence = userNoInformation, 'UserEvidence should be "'+CODES_UserIdEvidence[userNoInformation]+'" not "'+CODES_UserIdEvidence[FStore.FLastUserEvidence]+'"');
Assert.IsTrue(FStore.FLastSystemEvidence = systemNoInformation, 'SystemEvidence should be "'+CODES_SystemIdEvidence[systemNoInformation]+'" not "'+CODES_SystemIdEvidence[FStore.FLastSystemEvidence]+'"');
end;
procedure TRestFulServerTests.TestConformanceCertificateSpecified;
var
cs : TFHIRCapabilityStatement;
begin
FStore.reset;
FServer.Stop;
FServer.ServeMissingCertificate := false;
FServer.CertificateIdList.add('B7:90:70:D1:D8:D1:1B:9D:03:86:F4:5B:B5:69:E3:C4');
FServer.Start(true, true);
FClientSSL.smartToken := nil;
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certFile := 'C:\work\fhirserver\utilities\tests\client.test.fhir.org.cert';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certPWord := 'test';
cs := FClientSSL.conformance(false);
try
Assert.IsNotNull(cs);
finally
cs.Free;
end;
Assert.IsTrue(FStore.FLastReadSystem = 'client.test.fhir.org', 'SystemName should be "client.test.fhir.org" not "'+FStore.FLastReadSystem+'"');
Assert.IsTrue(FStore.FLastReadUser = TEST_ANON_USER_NAME, 'Username should be "'+TEST_ANON_USER_NAME+'" not '+FStore.FLastReadUser+'"');
Assert.IsTrue(FStore.FLastUserEvidence = userAnonymous, 'UserEvidence should be "'+CODES_UserIdEvidence[userAnonymous]+'" not "'+CODES_UserIdEvidence[FStore.FLastUserEvidence]+'"');
Assert.IsTrue(FStore.FLastSystemEvidence = systemFromCertificate, 'SystemEvidence should be "'+CODES_SystemIdEvidence[systemFromCertificate]+'" not "'+CODES_SystemIdEvidence[FStore.FLastSystemEvidence]+'"');
end;
procedure TRestFulServerTests.TestConformanceCertificateWrong;
var
cs : TFHIRCapabilityStatement;
begin
FStore.reset;
FServer.Stop;
FServer.ServeMissingCertificate := false;
FServer.ServeUnknownCertificate := false;
FServer.CertificateIdList.add('B7:90:70:D1:D8:D1:1B:9D:03:86:F4:5B:B5:69:E3:C4');
FServer.Start(true, true);
FClientSSL.smartToken := nil;
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certFile := 'C:\work\fhirserver\utilities\tests\local.fhir.org.cert';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certPWord := 'test';
try
cs := FClientSSL.conformance(false);
try
Assert.IsFalse(true);
finally
cs.Free;
end;
except
on e:exception do
Assert.IsTrue(e.message.contains('connecting')); // all good - access should be refused
end;
Assert.IsTrue(FStore.FLastReadSystem = '', 'SystemName should be "" not "'+FStore.FLastReadSystem+'"');
Assert.IsTrue(FStore.FLastReadUser = '', 'Username should be "", not "'+FStore.FLastReadUser+'"');
Assert.IsTrue(FStore.FLastUserEvidence = userNoInformation, 'UserEvidence should be "'+CODES_UserIdEvidence[userNoInformation]+'" not "'+CODES_UserIdEvidence[FStore.FLastUserEvidence]+'"');
Assert.IsTrue(FStore.FLastSystemEvidence = systemNoInformation, 'SystemEvidence should be "'+CODES_SystemIdEvidence[systemNoInformation]+'" not "'+CODES_SystemIdEvidence[FStore.FLastSystemEvidence]+'"');
end;
procedure TRestFulServerTests.TestPatientExampleCertificate;
var
res : TFhirResource;
begin
FStore.reset;
FServer.Stop;
FServer.ServeMissingCertificate := false;
FServer.Start(true, true);
FClientSSL.smartToken := nil;
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certFile := 'C:\work\fhirserver\utilities\tests\client.test.fhir.org.cert';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certPWord := 'test';
try
res := FClientSSL.readResource(frtPatient, 'example');
try
Assert.IsFalse(true, 'should not be abe to read without authorization, but got a '+res.className);
finally
res.free;
end;
except
on e:EFHIRClientException do
Assert.isTrue(e.issue.code = itLogin, 'Isseue type is wrong');
on e:exception do
Assert.isTrue(false, e.ClassName+'; '+ e.Message);
end;
Assert.IsTrue(FStore.FLastReadSystem = '', 'SystemName should be "" not "'+FStore.FLastReadSystem+'"');
Assert.IsTrue(FStore.FLastReadUser = '', 'Username should be "", not "'+FStore.FLastReadUser+'"');
Assert.IsTrue(FStore.FLastUserEvidence = userNoInformation, 'UserEvidence should be "'+CODES_UserIdEvidence[userNoInformation]+'" not "'+CODES_UserIdEvidence[FStore.FLastUserEvidence]+'"');
Assert.IsTrue(FStore.FLastSystemEvidence = systemNoInformation, 'SystemEvidence should be "'+CODES_SystemIdEvidence[systemNoInformation]+'" not "'+CODES_SystemIdEvidence[FStore.FLastSystemEvidence]+'"');
end;
procedure TRestFulServerTests.TestPatientExampleCertificateJWT;
var
res : TFhirResource;
begin
FStore.reset;
FServer.Stop;
FServer.ServeMissingCertificate := true;
FServer.Start(true, true);
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certFile := 'C:\work\fhirserver\utilities\tests\client.test.fhir.org.cert';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certPWord := 'test';
FClientSSL.smartToken := TClientAccessToken.create;
FClientSSL.smartToken.accessToken := JWT;
FClientSSL.smartToken.expires := now + 20 * DATETIME_MINUTE_ONE;
res := FClientSSL.readResource(frtPatient, 'example');
try
Assert.IsNotNull(res, 'no resource returned');
Assert.isTrue(res is TFHIRPatient, 'Resource should be Patient, not '+res.className);
Assert.IsTrue(res.id = 'example');
finally
res.free;
end;
Assert.IsTrue(FStore.FLastReadSystem = 'client.test.fhir.org', 'SystemName should be "client.test.fhir.org" not "'+FStore.FLastReadSystem+'"');
Assert.IsTrue(FStore.FLastReadUser = 'grahameg@gmail.com', 'Username should be "grahameg@gmail.com", not "'+FStore.FLastReadUser+'"');
Assert.IsTrue(FStore.FLastUserEvidence = userBearerJWT, 'UserEvidence should be "'+CODES_UserIdEvidence[userBearerJWT]+'" not "'+CODES_UserIdEvidence[FStore.FLastUserEvidence]+'"');
Assert.IsTrue(FStore.FLastSystemEvidence = systemFromCertificate, 'SystemEvidence should be "'+CODES_SystemIdEvidence[systemFromCertificate]+'" not "'+CODES_SystemIdEvidence[FStore.FLastSystemEvidence]+'"');
end;
procedure TRestFulServerTests.TestPatientExampleCertificateJWTNoCert;
var
res : TFhirResource;
begin
FStore.reset;
FServer.Stop;
FServer.ServeMissingCertificate := true;
FServer.Start(true, true);
FClientSSL.smartToken := TClientAccessToken.create;
FClientSSL.smartToken.accessToken := JWT;
FClientSSL.smartToken.expires := now + 20 * DATETIME_MINUTE_ONE;
res := FClientSSL.readResource(frtPatient, 'example');
try
Assert.IsNotNull(res, 'no resource returned');
Assert.isTrue(res is TFHIRPatient, 'Resource should be Patient, not '+res.className);
Assert.IsTrue(res.id = 'example');
finally
res.free;
end;
Assert.IsTrue(FStore.FLastReadSystem = 'Unknown', 'SystemName should be "Unknown" not "'+FStore.FLastReadSystem+'"');
Assert.IsTrue(FStore.FLastReadUser = 'grahameg@gmail.com', 'Username should be "grahameg@gmail.com", not "'+FStore.FLastReadUser+'"');
Assert.IsTrue(FStore.FLastUserEvidence = userBearerJWT, 'UserEvidence should be "'+CODES_UserIdEvidence[userBearerJWT]+'" not "'+CODES_UserIdEvidence[FStore.FLastUserEvidence]+'"');
Assert.IsTrue(FStore.FLastSystemEvidence = systemUnknown, 'SystemEvidence should be "'+CODES_SystemIdEvidence[systemUnknown]+'" not "'+CODES_SystemIdEvidence[FStore.FLastSystemEvidence]+'"');
end;
procedure TRestFulServerTests.TestPatientExampleJson;
var
res : TFhirResource;
begin
FStore.reset;
res := FClientJson.readResource(frtPatient, 'example');
try
Assert.IsNotNull(res, 'no resource returned');
Assert.isTrue(res is TFHIRPatient, 'Resource should be Patient, not '+res.className);
Assert.IsTrue(res.id = 'example');
finally
res.Free;
end;
Assert.IsTrue(FStore.FLastReadSystem = 'Unknown', 'SystemName should be "Unknown" not "'+FStore.FLastReadSystem+'"');
Assert.IsTrue(FStore.FLastReadUser = TEST_ANON_USER_NAME, 'Username should be "'+TEST_ANON_USER_NAME+'" not "'+FStore.FLastReadUser+'"');
Assert.IsTrue(FStore.FLastUserEvidence = userAnonymous, 'UserEvidence should be "'+CODES_UserIdEvidence[userAnonymous]+'" not "'+CODES_UserIdEvidence[FStore.FLastUserEvidence]+'"');
Assert.IsTrue(FStore.FLastSystemEvidence = systemUnknown, 'SystemEvidence should be "'+CODES_SystemIdEvidence[systemUnknown]+'" not "'+CODES_SystemIdEvidence[FStore.FLastSystemEvidence]+'"');
end;
procedure TRestFulServerTests.TestPatientExampleOWin;
var
res : TFhirResource;
begin
FStore.reset;
FServer.Stop;
FServer.ServeMissingCertificate := true;
FServer.CertificateIdList.clear;
FServer.Start(true, true);
FClientSSL.smartToken := nil;
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certFile := '';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certPWord := '';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).authoriseByOWin(FClientSSL.address+'/'+OWIN_TOKEN_PATH, 'test', 'test');
res := FClientSSL.readResource(frtPatient, 'example');
try
Assert.IsNotNull(res, 'no resource returned');
Assert.isTrue(res is TFHIRPatient, 'Resource should be Patient, not '+res.className);
Assert.IsTrue(res.id = 'example');
finally
res.Free;
end;
Assert.IsTrue(FStore.FLastReadSystem = 'test', 'SystemName should be "test" not "'+FStore.FLastReadSystem+'"');
Assert.IsTrue(FStore.FLastReadUser = TEST_ANON_USER_NAME, 'Username should be "'+TEST_ANON_USER_NAME+'" not "'+FStore.FLastReadUser+'"');
Assert.IsTrue(FStore.FLastUserEvidence = userAnonymous, 'UserEvidence should be "'+CODES_UserIdEvidence[userAnonymous]+'" not "'+CODES_UserIdEvidence[FStore.FLastUserEvidence]+'"');
Assert.IsTrue(FStore.FLastSystemEvidence = systemFromOWin, 'SystemEvidence should be "'+CODES_SystemIdEvidence[systemFromOWin]+'" not "'+CODES_SystemIdEvidence[FStore.FLastSystemEvidence]+'"');
end;
procedure TRestFulServerTests.TestPatientExampleSmartOnFhir;
var
res : TFhirResource;
tester : TSmartOnFhirTestingLogin;
begin
FStore.reset;
FServer.Stop;
FServer.ServeMissingCertificate := true;
FServer.CertificateIdList.clear;
FServer.Start(true, true);
FClientSSL.smartToken := nil;
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certFile := '';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certPWord := '';
tester := TSmartOnFhirTestingLogin.create;
try
tester.server.fhirEndPoint := FEndpoint.ClientAddress(true);
tester.server.thishost := 'localhost';
tester.server.authorizeEndpoint := 'https://'+FServer.host+':'+inttostr(FServer.SSLPort)+FEndpoint.path + FEndpoint.AuthServer.AuthPath;
tester.server.tokenEndPoint := 'https://'+FServer.host+':'+inttostr(FServer.SSLPort)+FEndpoint.path + FEndpoint.AuthServer.TokenPath;
tester.scopes := 'openid profile user/*.*';
tester.server.clientid := 'web';
tester.server.redirectport := 961;
tester.server.clientsecret := 'this-password-is-never-used';
tester.username := 'test';
tester.password := 'test';
tester.login(stmAllOk);
FClientSSL.SmartToken := tester.token.link;
finally
tester.Free;
end;
res := FClientSSL.readResource(frtPatient, 'example');
try
Assert.IsNotNull(res, 'no resource returned');
Assert.isTrue(res is TFHIRPatient, 'Resource should be Patient, not '+res.className);
Assert.IsTrue(res.id = 'example');
finally
res.Free;
end;
Assert.IsTrue(FStore.FLastReadSystem = 'web', 'SystemName should be "web" not "'+FStore.FLastReadSystem+'"');
Assert.IsTrue(FStore.FLastReadUser = TEST_USER_NAME, 'Username should be "'+TEST_USER_NAME+'", not "'+FStore.FLastReadUser+'"');
Assert.IsTrue(FStore.FLastUserEvidence = userLogin, 'UserEvidence should be "'+CODES_UserIdEvidence[userLogin]+'" not "'+CODES_UserIdEvidence[FStore.FLastUserEvidence]+'"');
Assert.IsTrue(FStore.FLastSystemEvidence = systemFromOAuth, 'SystemEvidence should be "'+CODES_SystemIdEvidence[systemFromOAuth]+'" not "'+CODES_SystemIdEvidence[FStore.FLastSystemEvidence]+'"');
end;
procedure TRestFulServerTests.TestPatientExampleSSL;
var
res : TFhirResource;
begin
FStore.reset;
FServer.Stop;
FServer.ServeMissingCertificate := true;
FServer.CertificateIdList.clear;
FServer.Start(true, true);
FClientSSL.smartToken := nil;
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certFile := '';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certPWord := '';
try
res := FClientSSL.readResource(frtPatient, 'example');
try
Assert.IsFalse(true, 'should not be abe to read without authorization, but got a '+res.className);
finally
res.free;
end;
except
on e:EFHIRClientException do
Assert.isTrue(e.issue.code = itLogin, 'Isseue type is wrong');
on e:exception do
Assert.isTrue(false, e.ClassName+'; '+ e.Message);
end;
Assert.IsTrue(FStore.FLastReadSystem = '', 'SystemName should be "" not "'+FStore.FLastReadSystem+'"');
Assert.IsTrue(FStore.FLastReadUser = '', 'Username should be "", not "'+FStore.FLastReadUser+'"');
Assert.IsTrue(FStore.FLastUserEvidence = userNoInformation, 'UserEvidence should be "'+CODES_UserIdEvidence[userNoInformation]+'" not "'+CODES_UserIdEvidence[FStore.FLastUserEvidence]+'"');
Assert.IsTrue(FStore.FLastSystemEvidence = systemNoInformation, 'SystemEvidence should be "'+CODES_SystemIdEvidence[systemNoInformation]+'" not "'+CODES_SystemIdEvidence[FStore.FLastSystemEvidence]+'"');
end;
procedure TRestFulServerTests.TestPatientExampleXml;
var
res : TFhirResource;
begin
FStore.reset;
res := FClientXml.readResource(frtPatient, 'example');
try
Assert.IsNotNull(res, 'no resource returned');
Assert.isTrue(res is TFHIRPatient, 'Resource should be Patient, not '+res.className);
Assert.IsTrue(res.id = 'example');
finally
res.Free;
end;
Assert.IsTrue(FStore.FLastReadSystem = 'Unknown', 'SystemName should be "Unknown" not "'+FStore.FLastReadSystem+'"');
Assert.IsTrue(FStore.FLastReadUser = TEST_ANON_USER_NAME, 'Username should be "'+TEST_ANON_USER_NAME+'" not "'+FStore.FLastReadUser+'"');
Assert.IsTrue(FStore.FLastUserEvidence = userAnonymous, 'UserEvidence should be "'+CODES_UserIdEvidence[userAnonymous]+'" not "'+CODES_UserIdEvidence[FStore.FLastUserEvidence]+'"');
Assert.IsTrue(FStore.FLastSystemEvidence = systemUnknown, 'SystemEvidence should be "'+CODES_SystemIdEvidence[systemUnknown]+'" not "'+CODES_SystemIdEvidence[FStore.FLastSystemEvidence]+'"');
end;
procedure TRestFulServerTests.TestSmartStandaloneLaunchBadRedirect;
var
json : TJsonObject;
tester : TSmartOnFhirTestingLogin;
res : TFhirResource;
begin
FClientSSL.smartToken := nil;
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certFile := '';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certPWord := '';
json := getJson('/.well-known/smart-configuration');
try
tester := TSmartOnFhirTestingLogin.create;
try
tester.server.fhirEndPoint := FEndpoint.ClientAddress(true);
tester.server.thishost := 'localhost';
tester.server.authorizeEndpoint := json.str['authorization_endpoint'];
tester.server.tokenEndPoint := json.str['token_endpoint'];
tester.scopes := 'openid profile user/*.*';
tester.server.clientid := 'web';
tester.server.redirectport := 961;
tester.server.clientsecret := 'this-password-is-never-used';
tester.username := 'test';
tester.password := 'test';
Assert.WillRaiseWithMessage(procedure begin
tester.login(stmBadRedirect);
end, EFHIRException, 'HTTP/1.1 400 Bad Request');
finally
tester.Free;
end;
finally
json.Free;
end;
end;
procedure TRestFulServerTests.TestSmartStandaloneLaunchCS;
var
cs : TFhirCapabilityStatement;
tester : TSmartOnFhirTestingLogin;
res : TFhirResource;
begin
FClientSSL.smartToken := nil;
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certFile := '';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certPWord := '';
cs := sslGet('/metadata') as TFhirCapabilityStatement;
try
tester := TSmartOnFhirTestingLogin.create;
try
tester.server.fhirEndPoint := FEndpoint.ClientAddress(true);
tester.server.thishost := 'localhost';
tester.server.authorizeEndpoint := cs.restList[0].security.getExtensionByUrl('http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris').getExtensionString('authorize');
tester.server.tokenEndPoint := cs.restList[0].security.getExtensionByUrl('http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris').getExtensionString('token');
tester.scopes := 'openid fhirUser user/*.*';
tester.server.clientid := 'web';
tester.server.redirectport := 961;
tester.server.clientsecret := 'this-password-is-never-used';
tester.username := 'test';
tester.password := 'test';
tester.login(stmAllOk);
FClientSSL.SmartToken := tester.token.link;
finally
tester.Free;
end;
Assert.IsTrue(FClientSSL.SmartToken.idToken <> nil);
res := FClientSSL.readResource(frtPatient, 'example');
try
Assert.IsNotNull(res, 'no resource returned');
Assert.isTrue(res is TFHIRPatient, 'Resource should be Patient, not '+res.className);
Assert.IsTrue(res.id = 'example');
finally
res.Free;
end;
finally
cs.Free;
end;
end;
procedure TRestFulServerTests.TestSmartStandaloneLaunchError;
var
json : TJsonObject;
tester : TSmartOnFhirTestingLogin;
res : TFhirResource;
begin
FClientSSL.smartToken := nil;
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certFile := '';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certPWord := '';
json := getJson('/.well-known/smart-configuration');
try
tester := TSmartOnFhirTestingLogin.create;
try
tester.server.fhirEndPoint := FEndpoint.ClientAddress(true);
tester.server.thishost := 'localhost';
tester.server.authorizeEndpoint := json.str['authorization_endpoint'];
tester.server.tokenEndPoint := json.str['token_endpoint'];
tester.scopes := 'openid profile user/*.*';
tester.server.clientid := 'web';
tester.server.redirectport := 961;
tester.server.clientsecret := 'this-password-is-never-used';
tester.username := 'test';
tester.password := 'test';
Assert.WillRaiseWithMessage(procedure begin
tester.login(stmBadLogin);
end, EFHIRException, 'http://localhost:961/done?error=access_denied&error_description=Login%20failed&state='+tester.state);
finally
tester.Free;
end;
finally
json.Free;
end;
end;
procedure TRestFulServerTests.TestSmartStandaloneLaunchNU;
var
json : TJsonObject;
tester : TSmartOnFhirTestingLogin;
res : TFhirResource;
begin
FClientSSL.smartToken := nil;
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certFile := '';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certPWord := '';
json := getJson('/.well-known/smart-configuration');
try
tester := TSmartOnFhirTestingLogin.create;
try
tester.server.fhirEndPoint := FEndpoint.ClientAddress(true);
tester.server.thishost := 'localhost';
tester.server.authorizeEndpoint := json.str['authorization_endpoint'];
tester.server.tokenEndPoint := json.str['token_endpoint'];
tester.scopes := 'user/*.*';
tester.server.clientid := 'web';
tester.server.redirectport := 961;
tester.server.clientsecret := 'this-password-is-never-used';
tester.username := 'test';
tester.password := 'test';
tester.login(stmAllOk);
FClientSSL.SmartToken := tester.token.link;
finally
tester.Free;
end;
Assert.IsTrue(FClientSSL.SmartToken.idToken = nil);
res := FClientSSL.readResource(frtPatient, 'example');
try
Assert.IsNotNull(res, 'no resource returned');
Assert.isTrue(res is TFHIRPatient, 'Resource should be Patient, not '+res.className);
Assert.IsTrue(res.id = 'example');
finally
res.Free;
end;
finally
json.Free;
end;
end;
procedure TRestFulServerTests.TestSmartStandaloneLaunchWK;
var
json : TJsonObject;
tester : TSmartOnFhirTestingLogin;
res : TFhirResource;
begin
FClientSSL.smartToken := nil;
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certFile := '';
(FClientSSL.Communicator as TFHIRHTTPCommunicator).certPWord := '';
json := getJson('/.well-known/smart-configuration');
try
tester := TSmartOnFhirTestingLogin.create;
try
tester.server.fhirEndPoint := FEndpoint.ClientAddress(true);
tester.server.thishost := 'localhost';
tester.server.authorizeEndpoint := json.str['authorization_endpoint'];
tester.server.tokenEndPoint := json.str['token_endpoint'];
tester.scopes := 'openid profile user/*.*';
tester.server.clientid := 'web';
tester.server.redirectport := 961;
tester.server.clientsecret := 'this-password-is-never-used';
tester.username := 'test';
tester.password := 'test';
tester.login(stmAllOk);
FClientSSL.SmartToken := tester.token.link;
finally
tester.Free;
end;
Assert.IsTrue(FClientSSL.SmartToken.idToken <> nil);
res := FClientSSL.readResource(frtPatient, 'example');
try
Assert.IsNotNull(res, 'no resource returned');
Assert.isTrue(res is TFHIRPatient, 'Resource should be Patient, not '+res.className);
Assert.IsTrue(res.id = 'example');
finally
res.Free;
end;
finally
json.Free;
end;
end;
function TRestFulServerTests.SslGet(url : String) : TFHIRResource;
var
http : TIdHTTP;
resp : TBytesStream;
ssl : TIdSSLIOHandlerSocketOpenSSL;
fmt : TFHIRFormat;
begin
http := TIdHTTP.Create(nil);
Try
ssl := TIdSSLIOHandlerSocketOpenSSL.Create(Nil);
Try
http.IOHandler := ssl;
ssl.SSLOptions.Mode := sslmClient;
ssl.SSLOptions.Method := sslvTLSv1_2;
http.Request.Accept := 'application/fhir+json';
resp := TBytesStream.create;
try
http.Get(FEndpoint.ClientAddress(true)+url, resp);
resp.position := 0;
fmt := ffJson;
result := streamToResource(resp, fmt);
finally
resp.free;
end;
finally
ssl.free;
end;
finally
http.free;
end;
end;
procedure TRestFulServerTests.TestSSL;
var
http : TIdHTTP;
resp : TBytesStream;
ssl : TIdSSLIOHandlerSocketOpenSSL;
begin
http := TIdHTTP.Create(nil);
Try
ssl := TIdSSLIOHandlerSocketOpenSSL.Create(Nil);
Try
http.IOHandler := ssl;
ssl.SSLOptions.Mode := sslmClient;
ssl.SSLOptions.Method := sslvTLSv1_2;
http.Request.Accept := 'application/fhir+xml';
resp := TBytesStream.create;
try
http.Get(FEndpoint.ClientAddress(true)+'/metadata', resp);
resp.position := 0;
Assert.isTrue(http.ResponseCode = 200, 'response code <> 200');
Assert.isTrue(http.Response.ContentType = 'application/fhir+xml', 'response content type <> application/fhir+xml');;
finally
resp.free;
end;
finally
ssl.free;
end;
finally
http.free;
end;
end;
procedure TRestFulServerTests.TestLowLevelJson;
var
http : TIdHTTP;
resp : TBytesStream;
begin
http := TIdHTTP.Create(nil);
Try
// ssl := TIdSSLIOHandlerSocketOpenSSL.Create(Nil);
// Try
// http.IOHandler := ssl;
// ssl.SSLOptions.Mode := sslmClient;
// ssl.SSLOptions.Method := sslvTLSv1_2;
// finally
// ssl.free;
// end;
http.Request.Accept := 'application/fhir+json';
resp := TBytesStream.create;
try
http.Get(FEndpoint.ClientAddress(false)+'/metadata', resp);
resp.position := 0;
Assert.isTrue(http.ResponseCode = 200, 'response code <> 200');
Assert.isTrue(http.Response.ContentType = 'application/fhir+json', 'response content type <> application/fhir+json');;
finally
resp.free;
end;
finally
http.free;
end;
end;
{ TTestOAuthLogin }
function TTestOAuthLogin.Link: TTestOAuthLogin;
begin
result := TTestOAuthLogin(inherited Link);
end;
{ TTestServerFactory }
constructor TTestServerFactory.create(version : TFHIRVersion);
begin
inherited Create;
FVersion := version;
end;
function TTestServerFactory.makeValidator: TFHIRValidatorV;
begin
result := TFHIRValidator4.Create(TFHIRServerWorkerContextR4.Create(TFHIRFactoryR4.create));
end;
function TTestServerFactory.makeEngine(validatorContext: TFHIRWorkerContextWithFactory; ucum: TUcumServiceImplementation): TFHIRPathEngineV;
begin
result := TFHIRPathEngine4.Create(validatorContext as TFHIRWorkerContext4, ucum);
end;
function TTestServerFactory.makeIndexer : TFHIRIndexManager;
begin
result := TFhirIndexManager4.Create;
end;
function TTestServerFactory.makeIndexes: TFHIRIndexBuilder;
begin
result := TFHIRIndexBuilderR4.create;
end;
function TTestServerFactory.makeSubscriptionManager(ServerContext : TFslObject) : TSubscriptionManager;
begin
result := TSubscriptionManagerR4.Create(ServerContext);
end;
procedure TTestServerFactory.setTerminologyServer(validatorContext : TFHIRWorkerContextWithFactory; server : TFslObject{TTerminologyServer});
begin
TFHIRServerWorkerContextR4(ValidatorContext).TerminologyServer := (server as TTerminologyServer);
end;
initialization
TDUnitX.RegisterTestFixture(TRestFulServerTests);
{$ENDIF}
end.
| 39.955 | 394 | 0.736892 |
6a67f7188b223f79e1a8618dd1944003089b59b0
| 7,943 |
dfm
|
Pascal
|
Packages/Order Entry Results Reporting/CPRS/CPRS-Chart/Options/fOptionsOther.dfm
|
timmvt/VistA_tt
|
05694e3a98c026f682f99ca9eb701bdd1e82af28
|
[
"Apache-2.0"
] | 1 |
2015-11-03T14:56:42.000Z
|
2015-11-03T14:56:42.000Z
|
CPRSChart/OR_30_377V9_SRC/CPRS-chart/Options/fOptionsOther.dfm
|
VHAINNOVATIONS/Transplant
|
a6c000a0df4f46a17330cec95ff25119fca1f472
|
[
"Apache-2.0"
] | null | null | null |
CPRSChart/OR_30_377V9_SRC/CPRS-chart/Options/fOptionsOther.dfm
|
VHAINNOVATIONS/Transplant
|
a6c000a0df4f46a17330cec95ff25119fca1f472
|
[
"Apache-2.0"
] | null | null | null |
inherited frmOptionsOther: TfrmOptionsOther
Left = 341
Top = 96
Hint = 'Use system default settings'
HelpContext = 9110
Align = alCustom
BorderIcons = [biSystemMenu, biHelp]
BorderStyle = bsDialog
Caption = 'Other Parameters'
ClientHeight = 436
ClientWidth = 329
HelpFile = 'CPRSWT.HLP'
Position = poScreenCenter
ShowHint = True
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object lblMedsTab: TLabel [0]
Left = 7
Top = 121
Width = 135
Height = 26
Hint = 'Set date ranges for displaying medication orders on Meds tab.'
Caption = 'Set date range for Meds tab display:'
ParentShowHint = False
ShowHint = True
WordWrap = True
end
object lblTab: TLabel [1]
Left = 8
Top = 27
Width = 134
Height = 13
Caption = 'Initial tab when CPRS starts:'
end
object Bevel1: TBevel [2]
Left = 1
Top = 110
Width = 327
Height = 2
end
object lblEncAppts: TLabel [3]
Left = 8
Top = 269
Width = 207
Height = 13
Hint = 'Set date range for Encounter Appointments.'
Caption = 'Set date range for Encounter Appointments:'
ParentShowHint = False
ShowHint = True
WordWrap = True
end
object Bevel2: TBevel [4]
Left = 1
Top = 256
Width = 327
Height = 2
end
object pnlBottom: TPanel [5]
Left = 0
Top = 403
Width = 329
Height = 33
HelpContext = 9110
Align = alBottom
BevelOuter = bvNone
ParentColor = True
TabOrder = 7
object bvlBottom: TBevel
Left = 0
Top = 0
Width = 329
Height = 2
Align = alTop
end
object btnOK: TButton
Left = 167
Top = 7
Width = 75
Height = 22
HelpContext = 9996
Caption = 'OK'
Default = True
ModalResult = 1
TabOrder = 0
OnClick = btnOKClick
end
object btnCancel: TButton
Left = 248
Top = 7
Width = 75
Height = 22
HelpContext = 9997
Cancel = True
Caption = 'Cancel'
ModalResult = 2
TabOrder = 1
OnClick = btnCancelClick
end
end
object stStart: TStaticText [6]
Left = 7
Top = 151
Width = 55
Height = 17
Caption = 'Start Date:'
TabOrder = 1
end
object stStop: TStaticText [7]
Left = 7
Top = 207
Width = 55
Height = 17
Caption = 'Stop Date:'
TabOrder = 5
end
object dtStart: TORDateBox [8]
Left = 7
Top = 170
Width = 187
Height = 21
TabOrder = 4
OnChange = dtStartChange
OnExit = dtStartExit
DateOnly = True
RequireTime = False
Caption = 'Start Date'
end
object dtStop: TORDateBox [9]
Left = 8
Top = 225
Width = 186
Height = 21
TabOrder = 6
OnExit = dtStopExit
DateOnly = True
RequireTime = False
Caption = 'Stop Date'
end
object lblTabDefault: TStaticText [10]
Left = 8
Top = 6
Width = 52
Height = 17
Caption = 'Chart tabs'
TabOrder = 0
end
object cboTab: TORComboBox [11]
Left = 8
Top = 51
Width = 217
Height = 21
HelpContext = 9111
Style = orcsDropDown
AutoSelect = True
Caption = 'Initial tab when CPRS starts:'
Color = clWindow
DropDownCount = 8
ItemHeight = 13
ItemTipColor = clWindow
ItemTipEnable = True
ListItemsOnly = False
LongList = False
LookupPiece = 0
MaxLength = 0
Pieces = '2'
Sorted = True
SynonymChars = '<>'
TabOrder = 2
TabStop = True
CharsNeedMatch = 1
end
object chkLastTab: TCheckBox [12]
Left = 8
Top = 82
Width = 312
Height = 21
HelpContext = 9112
Caption = 'Use last selected tab on patient change'
TabOrder = 3
end
object stStartEncAppts: TStaticText [13]
Left = 9
Top = 296
Width = 55
Height = 17
Caption = 'Start Date:'
TabOrder = 13
end
object txtTodayMinus: TStaticText [14]
Left = 38
Top = 321
Width = 64
Height = 17
Alignment = taRightJustify
Caption = 'Today minus'
Color = clBtnFace
ParentColor = False
TabOrder = 14
end
object txtEncStart: TCaptionEdit [15]
Left = 110
Top = 318
Width = 50
Height = 21
HelpContext = 9015
MaxLength = 12
TabOrder = 8
Text = '0'
OnChange = txtEncStartChange
OnExit = txtEncStartExit
Caption = 'Stop'
end
object txtDaysMinus: TStaticText [16]
Left = 178
Top = 322
Width = 26
Height = 17
Caption = 'days'
Color = clBtnFace
ParentColor = False
TabOrder = 16
end
object spnEncStart: TUpDown [17]
Tag = 30
Left = 160
Top = 318
Width = 15
Height = 21
HelpContext = 9015
Associate = txtEncStart
Min = -999
Max = 999
TabOrder = 17
Thousands = False
end
object txtDaysPlus: TStaticText [18]
Left = 180
Top = 374
Width = 26
Height = 17
Caption = 'days'
Color = clBtnFace
ParentColor = False
TabOrder = 18
end
object spnEncStop: TUpDown [19]
Tag = 30
Left = 162
Top = 369
Width = 15
Height = 21
HelpContext = 9015
Associate = txtEncStop
Min = -999
Max = 999
TabOrder = 19
Thousands = False
end
object txtEncStop: TCaptionEdit [20]
Left = 112
Top = 369
Width = 50
Height = 21
HelpContext = 9015
MaxLength = 12
TabOrder = 10
Text = '0'
OnChange = txtEncStopChange
OnExit = txtEncStopExit
Caption = 'Stop'
end
object txtTodayPlus: TStaticText [21]
Left = 46
Top = 372
Width = 56
Height = 17
Alignment = taRightJustify
Caption = 'Today plus'
Color = clBtnFace
ParentColor = False
TabOrder = 21
end
object stStopEncAppts: TStaticText [22]
Left = 10
Top = 348
Width = 55
Height = 17
Caption = 'Stop Date:'
TabOrder = 22
end
object btnEncDefaults: TButton [23]
Left = 248
Top = 287
Width = 75
Height = 22
HelpContext = 9011
Caption = 'Use Defaults'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 12
OnClick = btnEncDefaultsClick
end
inherited amgrMain: TVA508AccessibilityManager
Data = (
(
'Component = pnlBottom'
'Status = stsDefault')
(
'Component = btnOK'
'Status = stsDefault')
(
'Component = btnCancel'
'Status = stsDefault')
(
'Component = stStart'
'Status = stsDefault')
(
'Component = stStop'
'Status = stsDefault')
(
'Component = dtStart'
'Status = stsDefault')
(
'Component = dtStop'
'Status = stsDefault')
(
'Component = lblTabDefault'
'Status = stsDefault')
(
'Component = cboTab'
'Status = stsDefault')
(
'Component = chkLastTab'
'Status = stsDefault')
(
'Component = stStartEncAppts'
'Status = stsDefault')
(
'Component = txtTodayMinus'
'Status = stsDefault')
(
'Component = txtEncStart'
'Status = stsDefault')
(
'Component = txtDaysMinus'
'Status = stsDefault')
(
'Component = spnEncStart'
'Status = stsDefault')
(
'Component = txtDaysPlus'
'Status = stsDefault')
(
'Component = spnEncStop'
'Status = stsDefault')
(
'Component = txtEncStop'
'Status = stsDefault')
(
'Component = txtTodayPlus'
'Status = stsDefault')
(
'Component = stStopEncAppts'
'Status = stsDefault')
(
'Component = btnEncDefaults'
'Status = stsDefault')
(
'Component = frmOptionsOther'
'Status = stsDefault'))
end
end
| 20.902632 | 74 | 0.577616 |
83868b50a5743d6b3ce15ad5ff0467b61ffc557e
| 8,045 |
pas
|
Pascal
|
LJ-ExternalIntensityControl/Delphi5/Main.pas
|
jstnryan/LJ-API-Examples
|
d8345d33f2df7b83e49d0d124be4ecc17ff04539
|
[
"Unlicense",
"MIT"
] | null | null | null |
LJ-ExternalIntensityControl/Delphi5/Main.pas
|
jstnryan/LJ-API-Examples
|
d8345d33f2df7b83e49d0d124be4ecc17ff04539
|
[
"Unlicense",
"MIT"
] | null | null | null |
LJ-ExternalIntensityControl/Delphi5/Main.pas
|
jstnryan/LJ-API-Examples
|
d8345d33f2df7b83e49d0d124be4ecc17ff04539
|
[
"Unlicense",
"MIT"
] | null | null | null |
unit Main;
// April 16 - 2002
// Sample app for Martin LightJockey
// Sample app. that demonstrates how to set the Intensity Master levels from another Windows app. using
// WM_COPYDATA messagees. Note this function is only implemented in LightJockey versions from version 2.2 build 2.
// Notes :
// Setting the level remotely will not stop users from setting the levels manually
// The function will not work on intensity masters that are patched to DMX in
//
//
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Buttons, ExtCtrls;
Const
_R_LJReady = WM_USER+1502; // LJ Returns 1 when ready, 0 otherwise
_LJVersion = 1; // LParam : Returns TLJVersion
_WMCOPY_SetIntensityMasters = 266; // Message sub-code to decode COPYDATA as Master Intensity Data
_MinVersion : DWord = $02020200; // Major,Minor,Build,NA; // previous versions does not support this function
type
TMasterIntensitySettings = Packed Record // structure must be byte aligned !
//Index 0 : Master
//Index 1-8 : Submasters
Flags : Array[0..8] Of Byte; // = 0 LJ Ignore, <> 0 :LJ set-value
Values : Array[0..8] Of Byte; // Master value (0-255)
End;
TMainForm = class(TForm)
ScrollBar1: TScrollBar;
ScrollBar2: TScrollBar;
ScrollBar3: TScrollBar;
ScrollBar4: TScrollBar;
ScrollBar5: TScrollBar;
ScrollBar6: TScrollBar;
ScrollBar7: TScrollBar;
ScrollBar8: TScrollBar;
ScrollBar9: TScrollBar;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
lv3: TLabel;
lv4: TLabel;
lv5: TLabel;
lv6: TLabel;
lv7: TLabel;
lv8: TLabel;
lv0: TLabel;
lv1: TLabel;
lv2: TLabel;
SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton;
SpeedButton3: TSpeedButton;
SpeedButton4: TSpeedButton;
SpeedButton5: TSpeedButton;
SpeedButton6: TSpeedButton;
SpeedButton7: TSpeedButton;
SpeedButton8: TSpeedButton;
SpeedButton9: TSpeedButton;
Shape1: TShape;
Label19: TLabel;
Timer1: TTimer;
lVersion: TLabel;
procedure Timer1Timer(Sender: TObject);
procedure ScrollBarChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure SpeedButtonMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
private
LJHandle : THandle;
ErrorMsgShown : Boolean;
IntensityData : TMasterIntensitySettings;
Procedure UpdateFaderValues;
Procedure SendData;
public
end;
var
MainForm: TMainForm;
implementation
{$R *.DFM}
procedure TMainForm.FormCreate(Sender: TObject);
Var
I : Integer;
begin
ZeroMemory(@IntensityData,SizeOf(TMasterIntensitySettings));
For I := 0 To 8 Do IntensityData.Values[I] := 255;
For I := 0 To 8 Do IntensityData.Flags[I] := 1;
lVersion.Caption := '';
ScrollBarChange(NIL);
UpdateFaderValues;
end;
procedure TMainForm.Timer1Timer(Sender: TObject);
Var
Version : DWord;
Const
_ReadyCol : Array[Boolean] Of TColor = (clRed,clLime);
begin
LJHandle := FindWindow('TLJMainForm',NIL);
If LJHandle <> 0 Then Begin
If SendMessage(LJHandle,_R_LJReady,0,0) = 1 Then Begin
Version := SendMessage(LJHandle,_R_LJReady,_LJVersion,0);
lVersion.Caption := Format('Version %d.%d - build %d',[Version SHR 24 And $FF, Version SHR 16 And $FF, Version SHR 8 And $FF]);
If (Version < _MinVersion) Then Begin
If Not ErrorMsgShown Then Begin
ErrorMsgShown := True;
MessageDlg('This function requires LJ version 2.2 build 2 or higher.',mtError,[mbOk],0);
End;
LJHandle := 0;
End;
End
Else LJHandle := 0;
End;
Shape1.Brush.Color := _ReadyCol[LJHandle <> 0];
If LJHandle = 0 Then lVersion.Caption := '';
end;
Procedure TMainForm.UpdateFaderValues;
Begin
ScrollBar1.Position := 255-IntensityData.Values[0];
ScrollBar2.Position := 255-IntensityData.Values[1];
ScrollBar3.Position := 255-IntensityData.Values[2];
ScrollBar4.Position := 255-IntensityData.Values[3];
ScrollBar5.Position := 255-IntensityData.Values[4];
ScrollBar6.Position := 255-IntensityData.Values[5];
ScrollBar7.Position := 255-IntensityData.Values[6];
ScrollBar8.Position := 255-IntensityData.Values[7];
ScrollBar9.Position := 255-IntensityData.Values[8];
SpeedButton1.Down := IntensityData.Flags[0] <> 0;
SpeedButton2.Down := IntensityData.Flags[1] <> 0;
SpeedButton3.Down := IntensityData.Flags[2] <> 0;
SpeedButton4.Down := IntensityData.Flags[3] <> 0;
SpeedButton5.Down := IntensityData.Flags[4] <> 0;
SpeedButton6.Down := IntensityData.Flags[5] <> 0;
SpeedButton7.Down := IntensityData.Flags[6] <> 0;
SpeedButton8.Down := IntensityData.Flags[7] <> 0;
SpeedButton9.Down := IntensityData.Flags[8] <> 0;
End;
procedure TMainForm.ScrollBarChange(Sender: TObject);
begin
IntensityData.Values[0] := 255-ScrollBar1.Position;
IntensityData.Values[1] := 255-ScrollBar2.Position;
IntensityData.Values[2] := 255-ScrollBar3.Position;
IntensityData.Values[3] := 255-ScrollBar4.Position;
IntensityData.Values[4] := 255-ScrollBar5.Position;
IntensityData.Values[5] := 255-ScrollBar6.Position;
IntensityData.Values[6] := 255-ScrollBar7.Position;
IntensityData.Values[7] := 255-ScrollBar8.Position;
IntensityData.Values[8] := 255-ScrollBar9.Position;
SendData;
lv0.Caption := Format('%d',[IntensityData.Values[0]]);
lv1.Caption := Format('%d',[IntensityData.Values[1]]);
lv2.Caption := Format('%d',[IntensityData.Values[2]]);
lv3.Caption := Format('%d',[IntensityData.Values[3]]);
lv4.Caption := Format('%d',[IntensityData.Values[4]]);
lv5.Caption := Format('%d',[IntensityData.Values[5]]);
lv6.Caption := Format('%d',[IntensityData.Values[6]]);
lv7.Caption := Format('%d',[IntensityData.Values[7]]);
lv8.Caption := Format('%d',[IntensityData.Values[8]]);
end;
procedure TMainForm.SpeedButtonMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
If Sender = SpeedButton1 Then Begin
If SpeedButton1.Down Then IntensityData.Flags[0] := 0
Else IntensityData.Flags[0] := 1;
End;
If Sender = SpeedButton2 Then Begin
If SpeedButton2.Down Then IntensityData.Flags[1] := 0
Else IntensityData.Flags[1] := 1;
End;
If Sender = SpeedButton3 Then Begin
If SpeedButton3.Down Then IntensityData.Flags[2] := 0
Else IntensityData.Flags[2] := 1;
End;
If Sender = SpeedButton4 Then Begin
If SpeedButton4.Down Then IntensityData.Flags[3] := 0
Else IntensityData.Flags[3] := 1;
End;
If Sender = SpeedButton5 Then Begin
If SpeedButton5.Down Then IntensityData.Flags[4] := 0
Else IntensityData.Flags[4] := 1;
End;
If Sender = SpeedButton6 Then Begin
If SpeedButton6.Down Then IntensityData.Flags[5] := 0
Else IntensityData.Flags[5] := 1;
End;
If Sender = SpeedButton7 Then Begin
If SpeedButton7.Down Then IntensityData.Flags[6] := 0
Else IntensityData.Flags[6] := 1;
End;
If Sender = SpeedButton8 Then Begin
If SpeedButton8.Down Then IntensityData.Flags[7] := 0
Else IntensityData.Flags[7] := 1;
End;
If Sender = SpeedButton9 Then Begin
If SpeedButton9.Down Then IntensityData.Flags[8] := 0
Else IntensityData.Flags[8] := 1;
End;
SendData;
end;
Procedure TMainForm.SendData;
var
CopyDataStruct : TCopyDataStruct;
Begin
If (LJHandle <>0) Then Begin
CopyDataStruct.dwData :=_WMCOPY_SetIntensityMasters;
CopyDataStruct.cbData := SizeOf(TMasterIntensitySettings);
CopyDataStruct.lpData := @IntensityData;
SendMessage(LJHandle,WM_COPYDATA,Self.Handle,Integer(@CopyDataStruct));
End;
End;
end.
| 33.243802 | 133 | 0.678434 |
f12be0887071e9f749404363668b7d3fd14cc924
| 1,581 |
dfm
|
Pascal
|
Components/JVCL/lib/d7/JvYearGridEditForm.dfm
|
sabatex/Delphi
|
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
|
[
"MIT"
] | null | null | null |
Components/JVCL/lib/d7/JvYearGridEditForm.dfm
|
sabatex/Delphi
|
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
|
[
"MIT"
] | null | null | null |
Components/JVCL/lib/d7/JvYearGridEditForm.dfm
|
sabatex/Delphi
|
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
|
[
"MIT"
] | 1 |
2019-12-24T08:39:18.000Z
|
2019-12-24T08:39:18.000Z
|
object YearGridEditForm: TYearGridEditForm
Left = 303
Top = 154
BorderStyle = bsDialog
Caption = 'YearGrid Edit'
ClientHeight = 364
ClientWidth = 313
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -10
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
Position = poDesktopCenter
Scaled = False
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Panel1: TPanel
Left = 0
Top = 331
Width = 313
Height = 33
Align = alBottom
TabOrder = 0
object BitBtn1: TBitBtn
Left = 160
Top = 7
Width = 65
Height = 22
TabOrder = 0
Kind = bkOK
end
object BitBtn2: TBitBtn
Left = 233
Top = 7
Width = 77
Height = 22
TabOrder = 1
Kind = bkCancel
end
object BtnLoad: TButton
Left = 5
Top = 7
Width = 60
Height = 22
Caption = '&Load...'
TabOrder = 2
OnClick = BtnLoadClick
end
object BtnSave: TButton
Left = 70
Top = 7
Width = 59
Height = 22
Caption = '&Save...'
TabOrder = 3
OnClick = BtnSaveClick
end
end
object MemoText: TMemo
Left = 0
Top = 0
Width = 313
Height = 331
Align = alClient
TabOrder = 1
end
object OpenDialog: TOpenDialog
Filter = 'Text Files|*.txt|All Files|*.*'
Left = 88
Top = 104
end
object SaveDialog: TSaveDialog
DefaultExt = 'txt'
Filter = 'Text Files|*.txt|All Files|*.*'
Left = 120
Top = 104
end
end
| 19.280488 | 45 | 0.578748 |
f181bec4bbb39d668d70676aaec4352a9d3382d3
| 2,896 |
pas
|
Pascal
|
mail/0022.pas
|
nickelsworth/swag
|
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
|
[
"BSD-2-Clause"
] | 11 |
2015-12-12T05:13:15.000Z
|
2020-10-14T13:32:08.000Z
|
mail/0022.pas
|
nickelsworth/swag
|
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
|
[
"BSD-2-Clause"
] | null | null | null |
mail/0022.pas
|
nickelsworth/swag
|
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
|
[
"BSD-2-Clause"
] | 8 |
2017-05-05T05:24:01.000Z
|
2021-07-03T20:30:09.000Z
|
{
From: Norman.User@telos.org (Norman User)
Here is the revised NewSquishList function you need.
}
Function NewSquishList(Urec,Arec:MaxRecPtr;NewOnly,ToYouOnly:Boolean):pointer;
Var
Sq : SqiColPtr;
f : PDosStream;
fb : PBufStream;
sql: sqlType;
sqi: sqiType;
Sqp: SqiPtr;
tempN : longint;
lhn : LongInt;
lhs : string;
sqz : Longint;
Begin
NewSquishList := nil;
sq := nil;
sql := 0;
tempN := 0;
if NewOnly
then Begin
(***** last read message number from the SQL file *****)
New(F,init(StrPas(@MaxAreaRec(Arec^.rec^).mpath) +
'.SQL',StOpenRead or StDenyNone));
if f^.status = StOk
then begin
f^.seek(MaxUserRec(Urec^.rec^).LastRead*SizeOf(sqlType));
if f^.status = stok then f^.read(sql,sizeof(sql));
if f^.status <> Stok then sql := -1;
end;
dispose(f,done);
if sql < 0 then exit;
End;
lhn := sql;
sqz := sql;
fillchar(sqi,sizeof(sqi),0);
New(fb,init(StrPas(@MaxAreaRec(Arec^.rec^).mpath) + '.SQI',StOpenRead or
StDenyNone,2048));
if fb^.status = StOk then fb^.read(sqi,sizeof(sqitype));
while (fb^.status = StOk) and (sqi.msgnum <= sql)
do begin
inc(tempN);
fillchar(sqi,sizeof(sqitype),0);
fb^.read(sqi,sizeof(sqitype));
end;
while (fb^.status = StOk)
do begin
if Sqi.msgnum > SQZ
then begin
sqz := sqi.MsgNum;
inc(tempN);
if Sqi.MsgNum > lhn
then lhn := Sqi.MsgNum;
sqi.msgnum := TempN;
if (Not ToYouOnly) or
(SqHashName(StrPas(@MaxUserRec(Urec^.rec^).name)) =
Sqi.Hashname)
then begin
new(sqp);
sqp^ := sqi;
if sq = nil then new(sq,init(20,5));
sq^.insert(sqp);
end
end
else inc(tempN);
fb^.read(sqi,sizeof(sqitype));
end;
dispose(fb,done);
if lhn > sql
then begin
if LRMCollection = Nil
then New(LRMCollection,init(10,5));
lhs := StrPas(@MaxAreaRec(Arec^.rec^).mpath) + '.SQL';
LRMCollection^.Insert(New(P0Base,init(newstr(lhs),
LongInt((MaxUserRec(Urec^.rec^).lastread)),
lhn,true)));
end;
NewSquishList := sq;
End;
| 34.070588 | 80 | 0.439227 |
f192441ff3ec0979b9e337643fe2b7ad7f731949
| 11,535 |
pas
|
Pascal
|
src/nxData.pas
|
Zaflis/nxpascal
|
cfc616ddf925182e492a32b842b0aa2cd31c2b21
|
[
"MIT"
] | 26 |
2015-05-13T18:27:53.000Z
|
2022-03-21T05:06:06.000Z
|
src/nxData.pas
|
Zaflis/nxpascal
|
cfc616ddf925182e492a32b842b0aa2cd31c2b21
|
[
"MIT"
] | 8 |
2015-05-13T18:31:43.000Z
|
2019-03-23T06:43:49.000Z
|
src/nxData.pas
|
Zaflis/nxpascal
|
cfc616ddf925182e492a32b842b0aa2cd31c2b21
|
[
"MIT"
] | 9 |
2015-08-09T12:23:00.000Z
|
2022-02-09T01:00:44.000Z
|
unit nxData;
interface
uses {$IFDEF UNIX}cthreads,{$ENDIF}
Forms, Classes, SysUtils, {$IFDEF fpc}zstream{$ELSE}zlib{$ENDIF},
nxGraph, nxTypes;
type
TDataBlock = record
data: DynamicByteArray;
compressed: TMemoryStream;
useTime: cardinal;
threading: boolean;
end;
pDataBlock = ^TDataBlock;
TCustomDataThread = class;
PCustomDataThread = ^TCustomDataThread;
{ TCustomDataThread }
TCustomDataThread = class(TThread)
protected
pBlock: pDataBlock;
pt: PCustomDataThread;
public
destructor Destroy; override;
end;
{ TCompressThread }
TCompressThread = class(TCustomDataThread)
private
leaveData: boolean;
level: TCompressionlevel;
blockSize: longint;
public
constructor Create(_pBlock: pDataBlock; _blockSize: longint;
_level: TCompressionlevel; _leaveData: boolean);
procedure Execute; override;
end;
{ TDeCompressThread }
TDeCompressThread = class(TCustomDataThread)
private
leaveCompressed: boolean;
blockSize: longint;
public
constructor Create(_pBlock: pDataBlock; _blockSize: longint;
_leaveCompressed: boolean);
procedure Execute; override;
end;
{ TDataStore }
TDataStore = class
private
block: array of TDataBlock;
level: TCompressionlevel;
FCount, blockSize, FCompressed: longint;
tick: cardinal;
FFilename: string;
threadList: array of TCustomDataThread;
procedure LoadStore(source: TStream);
procedure SaveStore(dest: TStream);
procedure SaveToFile(filename: string);
public
MaxTime, lastCheck: cardinal;
property compressed: longint read FCompressed;
property count: longint read FCount;
constructor Create(_blockSize: longint; _level: TCompressionlevel = clDefault);
destructor Destroy; override;
function AddThread: integer;
procedure Clear; overload;
procedure Compress(n: longint; leaveData, forced: boolean);
procedure DeCompress(n: longint; leaveCompressed, forced: boolean);
function GetBlock(n: longint; forced: boolean): DynamicByteArray;
procedure Initialize(newBlockSize: longint); overload;
function IsLoaded(n: longint): boolean;
procedure LoadFromFile(filename: string; CanCreate: boolean = false);
procedure Save;
procedure SetCompressionlevel(_level: TCompressionlevel);
procedure SetFile(filename: string);
procedure SetSize(n: longint);
procedure Update;
procedure WaitAllThreads;
procedure WaitFor(n: longint);
end;
var nxDataThreadCount: integer;
implementation
{ TDataStore }
constructor TDataStore.Create(_blockSize: longint; _level: TCompressionlevel);
begin
blockSize:=_blockSize;
MaxTime:=1000*15; // 15 seconds default expiration time
tick:=(nxEngine.GetTick div 1000)*1000;
level:=_level;
end;
destructor TDataStore.Destroy;
begin
WaitAllThreads;
Clear;
inherited Destroy;
end;
function TDataStore.AddThread: integer;
var i: integer;
begin
// Check if there exists free slot for new thread in current list
for i:=0 to high(threadList) do
if threadList[i]=nil then begin
result:=i; exit;
end;
// Increase list size by 1
result:=length(threadList);
setlength(threadList, result+1);
// Pointers changed after array size changed! Update addresses to threads
for i:=0 to result-1 do
if threadList[i]<>nil then threadList[i].pt:=@threadList[i];
end;
procedure TDataStore.Clear;
begin
SetSize(0); FFilename:='';
end;
procedure TDataStore.Compress(n: longint; leaveData, forced: boolean);
var cs: TCompressionStream; t: integer;
begin
if (n<0) or (n>=count) then exit;
with block[n] do begin
if threading then
if forced then begin
WaitFor(n);
end else exit;
if forced or (nxDataThreadCount>=100) then begin
if data<>nil then begin
// Start compression
if compressed<>nil then compressed.Clear
else begin
compressed:=TMemoryStream.Create;
end;
cs:=TCompressionStream.create(level, compressed);
cs.Write(data[0], blockSize);
cs.Free;
if not leaveData then begin
setlength(data, 0);
end;
inc(FCompressed);
end;
end else begin
t:=AddThread;
threadList[t]:=TCompressThread.Create(@block[n], blocksize, level, leaveData);
threadList[t].pt:=@threadList[t];
end;
inc(FCompressed);
end;
end;
procedure TDataStore.DeCompress(n: longint; leaveCompressed, forced: boolean);
var ds: TDeCompressionStream; t: integer;
begin
if (n<0) or (n>=count) then exit;
with block[n] do begin
if threading then
if forced then begin
WaitFor(n);
end else exit;
if forced or (nxDataThreadCount>=100) then begin
if compressed<>nil then begin
compressed.Position:=0;
ds:=TDeCompressionStream.create(compressed);
setlength(data, blocksize);
ds.read(data[0], blocksize);
ds.Free;
if not leaveCompressed then FreeAndNil(compressed);
UseTime:=tick;
end;
end else begin
t:=AddThread;
threadList[t]:=TDeCompressThread.Create(@block[n], blocksize, leaveCompressed);
threadList[t].pt:=@threadList[t];
end;
dec(FCompressed);
end;
end;
function TDataStore.GetBlock(n: longint; forced: boolean): DynamicByteArray;
begin
result:=nil;
if (n<0) or (n>=count) then exit;
with block[n] do begin
if threading then
if forced then begin
WaitFor(n);
end else exit;
if data=nil then
if compressed<>nil then begin
DeCompress(n, false, forced);
end else begin
setlength(data, blockSize);
end;
result:=data; UseTime:=tick;
end;
end;
procedure TDataStore.Initialize(newBlockSize: longint);
begin
SetSize(0); blockSize:=newBlockSize; FFilename:='';
end;
function TDataStore.IsLoaded(n: longint): boolean;
begin
if (n>=0) and (n<count) then
result:=(block[n].data<>nil) and (not block[n].threading)
else result:=false;
end;
procedure TDataStore.LoadFromFile(filename: string; CanCreate: boolean = false);
var fs: TFileStream;
begin
if not fileexists(filename) then begin
if CanCreate then begin
FFilename:=filename; Save;
end;
exit;
end;
fs:=nil;
try
fs:=TFileStream.Create(filename, fmOpenRead);
LoadStore(fs);
FFilename:=filename;
finally
fs.Free;
end;
end;
procedure TDataStore.Save;
begin
if FFilename='' then exit;
SaveToFile(FFilename);
end;
procedure TDataStore.SetCompressionlevel(_level: TCompressionlevel);
begin
level:=_level;
end;
procedure TDataStore.SetFile(filename: string);
begin
FFilename:=filename;
end;
procedure TDataStore.LoadStore(source: TStream);
var i: longint; n: cardinal; b: byte;
begin
Clear;
blockSize:=0; n:=0; b:=0;
source.Read(blockSize, sizeof(blockSize));
source.Read(n, sizeof(n));
SetSize(n);
for i:=0 to Count-1 do
with block[i] do begin
source.Read(b, sizeof(b));
if b=1 then begin
source.Read(n, sizeof(n));
compressed:=TMemoryStream.Create;
compressed.CopyFrom(source, n);
end;
end;
FCompressed:=FCount;
end;
procedure TDataStore.SaveStore(dest: TStream);
var i: longint; hasComp: boolean; bVar: byte; intVar: cardinal;
begin
dest.Write(blockSize, sizeof(blockSize));
dest.Write(Count, sizeof(Count));
for i:=0 to Count-1 do
with block[i] do begin
if (data<>nil) or (compressed<>nil) then begin
bVar:=1;
dest.Write(bVar, sizeof(bVar));
HasComp:=compressed<>nil;
if data<>nil then begin
WaitFor(i);
Compress(i, true, true);
end;
intVar:=compressed.Size;
dest.Write(intVar, sizeof(intVar));
compressed.Position:=0;
dest.CopyFrom(compressed, compressed.Size);
if not HasComp then FreeAndNil(compressed);
end else begin
bVar:=0;
dest.Write(bVar, sizeof(bVar));
end;
end;
end;
procedure TDataStore.SaveToFile(filename: string);
var fs: TFileStream;
begin
fs:=nil;
try
fs:=TFileStream.Create(filename, fmCreate);
SaveStore(fs);
FFilename:=filename;
finally
fs.Free;
end;
end;
procedure TDataStore.SetSize(n: longint);
var i: longint;
begin
WaitAllThreads;
// Free left out blocks
for i:=n to FCount-1 do
with block[i] do begin
setlength(data, 0);
FreeAndNil(compressed);
threading:=false;
end;
setlength(block, n);
// Initialize new blocks
for i:=fCount to n-1 do
with block[i] do begin
compressed:=nil; data:=nil; threading:=false;
end;
FCount:=n; FCompressed:=0;
end;
procedure TDataStore.Update;
var i: longint;
begin
tick:=(nxEngine.GetTick div 1000)*1000;
if tick<>lastCheck then begin
// Compress unused and expired data blocks
for i:=0 to count-1 do
with block[i] do
if (data<>nil) and (not threading) and (tick>block[i].useTime+MaxTime) then
Compress(i, false, false);
lastCheck:=tick;
end;
end;
procedure TDataStore.WaitAllThreads;
var i: integer;
begin
for i:=0 to high(threadList) do
if threadList[i]<>nil then threadList[i].WaitFor;
end;
procedure TDataStore.WaitFor(n: longint);
var i: integer;
begin
for i:=high(threadList) downto 0 do
if (threadList[i]<>nil) and (threadList[i].pBlock=@block[n]) then
threadList[i].WaitFor;
end;
{ TCompressThread }
constructor TCompressThread.Create(_pBlock: pDataBlock; _blockSize: longint;
_level: TCompressionlevel; _leaveData: boolean);
begin
inc(nxDataThreadCount);
pBlock:=_pBlock; pBlock^.threading:=true;
leaveData:=_leaveData; level:=_level; blockSize:=_blockSize;
inherited Create(false);
FreeOnTerminate:=true;
end;
procedure TCompressThread.Execute;
var cs: TCompressionStream;
begin
with pBlock^ do begin
if data<>nil then begin
if compressed<>nil then compressed.Clear
else begin
compressed:=TMemoryStream.Create;
end;
cs:=TCompressionStream.create(level, compressed);
cs.Write(data[0], blockSize);
cs.Free;
if not leaveData then begin
setlength(data, 0);
end;
end;
pt^:=nil; threading:=false;
end;
end;
{ TDeCompressThread }
constructor TDeCompressThread.Create(_pBlock: pDataBlock; _blockSize: longint;
_leaveCompressed: boolean);
begin
inherited Create(false);
inc(nxDataThreadCount);
pBlock:=_pBlock; pBlock^.threading:=true;
leaveCompressed:=_leaveCompressed; blockSize:=_blockSize;
FreeOnTerminate:=true;
end;
procedure TDeCompressThread.Execute;
var ds: TDeCompressionStream;
begin
with pBlock^ do begin
if compressed<>nil then begin
compressed.Position:=0;
ds:=TDeCompressionStream.create(compressed);
setlength(data, blocksize);
ds.read(data[0], blocksize);
ds.Free;
if not leaveCompressed then FreeAndNil(compressed);
UseTime:=nxEngine.FrameTick;
end;
pt^:=nil; threading:=false;
end;
end;
{ TCustomDataThread }
destructor TCustomDataThread.Destroy;
begin
dec(nxDataThreadCount);
inherited Destroy;
end;
end.
| 26.097285 | 86 | 0.661032 |
f14f4cbffdd646c8770447054bbfcab80dc82979
| 361 |
pas
|
Pascal
|
Unit2.pas
|
rafaelrrn/Pular_Edits_Com_Enter
|
adad1f08ad5819cf449d3464943dbfca72bb8cd3
|
[
"MIT"
] | null | null | null |
Unit2.pas
|
rafaelrrn/Pular_Edits_Com_Enter
|
adad1f08ad5819cf449d3464943dbfca72bb8cd3
|
[
"MIT"
] | null | null | null |
Unit2.pas
|
rafaelrrn/Pular_Edits_Com_Enter
|
adad1f08ad5819cf449d3464943dbfca72bb8cd3
|
[
"MIT"
] | null | null | null |
unit Unit2;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs;
type
TForm2 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
end.
| 14.44 | 99 | 0.65928 |
83571ab5bbdbe787e3bd89f664556cdfb95d0625
| 307 |
pas
|
Pascal
|
Pascal/test/cohadar/pascal/errors/cofor_outside.pas
|
cohadar/parapascal
|
863bc9b8d7f813dd3bbf8f6e7df36d70de8f5242
|
[
"MIT"
] | null | null | null |
Pascal/test/cohadar/pascal/errors/cofor_outside.pas
|
cohadar/parapascal
|
863bc9b8d7f813dd3bbf8f6e7df36d70de8f5242
|
[
"MIT"
] | null | null | null |
Pascal/test/cohadar/pascal/errors/cofor_outside.pas
|
cohadar/parapascal
|
863bc9b8d7f813dd3bbf8f6e7df36d70de8f5242
|
[
"MIT"
] | null | null | null |
{* test cofor statement *}
program test03;
var mutex : semaphore;
x : shared integer;
procedure writexy(a:integer);
begin
wait(mutex);
x := x + a;
signal(mutex);
end;
var i: integer;
begin
x := 0;
init(mutex, 1);
begin
cofor i := 1 to 10 do writexy(i);
end;
debug(x);
end.
| 13.954545 | 36 | 0.596091 |
83eb17d9c3fc76cdd7bd5d70ab2dd50935ec4450
| 499 |
pas
|
Pascal
|
ALG-1/lista_06/funcoes_01/num_inverso.pas
|
leommartin/ERE-2-UFPR
|
b6dfe367507566b4bd7fa10aa15ed7567880a4d2
|
[
"MIT"
] | null | null | null |
ALG-1/lista_06/funcoes_01/num_inverso.pas
|
leommartin/ERE-2-UFPR
|
b6dfe367507566b4bd7fa10aa15ed7567880a4d2
|
[
"MIT"
] | null | null | null |
ALG-1/lista_06/funcoes_01/num_inverso.pas
|
leommartin/ERE-2-UFPR
|
b6dfe367507566b4bd7fa10aa15ed7567880a4d2
|
[
"MIT"
] | null | null | null |
program num_inverso;
var n1,n2:longint;
function inverso(num1, num2: longint):boolean;
var n1_invertido:longint;
resto: integer;
begin
n1_invertido:= 0;
while num1<>0 do
begin
resto:= num1 mod 10;
n1_invertido:= n1_invertido * 10 + resto;
num1:= num1 div 10;
end;
if(n1_invertido = num2) then
inverso:= true
else
inverso:=false;
end;
begin
read(n1,n2);
if inverso(n1,n2) then
writeln(n1,' eh o contrario de ',n2)
else
writeln(n1,' nao eh o contrario de ',n2);
end.
| 16.633333 | 46 | 0.683367 |
f16e5c723fdf756b21697e5064690b792b7cd7ed
| 2,407 |
dpr
|
Pascal
|
references/jcl/jcl/packages/d22/JclRepositoryExpertDLL.dpr
|
zekiguven/alcinoe
|
e55c5368ee8bfe7cd6d92424c29ab07d8a3e844c
|
[
"Apache-2.0"
] | 851 |
2018-02-05T09:54:56.000Z
|
2022-03-24T23:13:10.000Z
|
references/jcl/jcl/packages/d22/JclRepositoryExpertDLL.dpr
|
zekiguven/alcinoe
|
e55c5368ee8bfe7cd6d92424c29ab07d8a3e844c
|
[
"Apache-2.0"
] | 200 |
2018-02-06T18:52:39.000Z
|
2022-03-24T19:59:14.000Z
|
references/jcl/jcl/packages/d22/JclRepositoryExpertDLL.dpr
|
zekiguven/alcinoe
|
e55c5368ee8bfe7cd6d92424c29ab07d8a3e844c
|
[
"Apache-2.0"
] | 197 |
2018-03-20T20:49:55.000Z
|
2022-03-21T17:38:14.000Z
|
Library JclRepositoryExpertDLL;
{
-----------------------------------------------------------------------------
DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
ALWAYS EDIT THE RELATED XML FILE (JclRepositoryExpertDLL-L.xml)
Last generated: 01-09-2015 20:38:09 UTC
-----------------------------------------------------------------------------
}
{$R *.res}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO OFF}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS OFF}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION ON}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
{$REFERENCEINFO OFF}
{$SAFEDIVIDE OFF}
{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST ON}
{$MINENUMSIZE 1}
{$IMAGEBASE $58180000}
{$DESCRIPTION 'JCL Package containing repository wizards'}
{$LIBSUFFIX '220'}
{$IMPLICITBUILD OFF}
{$DEFINE BCB}
{$DEFINE WIN32}
{$DEFINE CONDITIONALEXPRESSIONS}
{$DEFINE VER290}
{$DEFINE RELEASE}
uses
ToolsAPI,
JclOtaRepositoryUtils in '..\..\experts\repository\JclOtaRepositoryUtils.pas' ,
JclOtaRepositoryReg in '..\..\experts\repository\JclOtaRepositoryReg.pas' ,
JclOtaExcDlgRepository in '..\..\experts\repository\ExceptionDialog\JclOtaExcDlgRepository.pas' ,
JclOtaExcDlgWizard in '..\..\experts\repository\ExceptionDialog\JclOtaExcDlgWizard.pas' {JclOtaExcDlgForm},
JclOtaExcDlgFileFrame in '..\..\experts\repository\ExceptionDialog\JclOtaExcDlgFileFrame.pas' {JclOtaExcDlgFilePage: TFrame},
JclOtaExcDlgFormFrame in '..\..\experts\repository\ExceptionDialog\JclOtaExcDlgFormFrame.pas' {JclOtaExcDlgFormPage: TFrame},
JclOtaExcDlgSystemFrame in '..\..\experts\repository\ExceptionDialog\JclOtaExcDlgSystemFrame.pas' {JclOtaExcDlgSystemPage: TFrame},
JclOtaExcDlgLogFrame in '..\..\experts\repository\ExceptionDialog\JclOtaExcDlgLogFrame.pas' {JclOtaExcDlgLogPage: TFrame},
JclOtaExcDlgTraceFrame in '..\..\experts\repository\ExceptionDialog\JclOtaExcDlgTraceFrame.pas' {JclOtaExcDlgTracePage: TFrame},
JclOtaExcDlgThreadFrame in '..\..\experts\repository\ExceptionDialog\JclOtaExcDlgThreadFrame.pas' {JclOtaExcDlgThreadPage: TFrame},
JclOtaExcDlgIgnoreFrame in '..\..\experts\repository\ExceptionDialog\JclOtaExcDlgIgnoreFrame.pas' {JclOtaExcDlgIgnorePage: TFrame}
;
exports
JCLWizardInit name WizardEntryPoint;
end.
| 38.822581 | 134 | 0.708351 |
aa5b714ae78700d6478c571fe5a3ef64f3ffe227
| 2,402 |
pas
|
Pascal
|
src/Unit1.pas
|
bartimaeusnek/hexreplacer
|
d00bbd0e3b214dbca2da9dc8bcc9ee51349e3ab1
|
[
"MIT"
] | 1 |
2018-11-22T21:31:43.000Z
|
2018-11-22T21:31:43.000Z
|
src/Unit1.pas
|
bartimaeusnek/hexreplacer
|
d00bbd0e3b214dbca2da9dc8bcc9ee51349e3ab1
|
[
"MIT"
] | null | null | null |
src/Unit1.pas
|
bartimaeusnek/hexreplacer
|
d00bbd0e3b214dbca2da9dc8bcc9ee51349e3ab1
|
[
"MIT"
] | null | null | null |
{
created on 12.03.2018 - bartimaeusnek
}
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
TBConvert: TButton;
Edit1: TEdit;
Edit2: TEdit;
OpenDialog1: TOpenDialog;
SaveDialog1: TSaveDialog;
Label1: TLabel;
Label2: TLabel;
procedure TBConvertClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
function GetFileSizeEx(const AFileName: string): Int64;
function HexStrToInt(const str: string): byte;
var
Form1: TForm1;
TCharFile,output : File;
b : array of byte;
regrex,replace : byte;
implementation
{$R *.dfm}
procedure TForm1.TBConvertClick(Sender: TObject);
var i : Integer;
begin
//open original file
if OpenDialog1.Execute then
if FileExists(OpenDialog1.FileName) then
begin
AssignFile(TCharFile, OpenDialog1.FileName);
//open as readonly
Reset(TCharFile,1);
//set the array b to the files byte lenth
SetLength(b,GetFileSizeEx(OpenDialog1.FileName));
//read the file to the array
while not Eof(TCharFile) do
begin
for i:=0 to (Length(b)-1) do
blockread(TCharFile,b[i],1);
end;
//close the file, since we dont need it anymore data is in array
CloseFile(TCharFile);
//get the regrex and replacement
regrex := HexStrToInt(Edit1.Text);
replace := HexStrToInt(Edit2.Text);
for i:=0 to (Length(b)-1) do
if b[i] = regrex then //check for the regrex
b[i] := replace; //replace it
//open/create a new file in RW mode & save byte array to it.
if SaveDialog1.Execute then begin
AssignFile(output,SaveDialog1.FileName);
ReWrite(output,1);
for i:=0 to (Length(b)-1) do
blockwrite(output,b[i],1);
end;
CloseFile(output);
ShowMessage('Done.');
end;
end;
function GetFileSizeEx(const AFileName: string): Int64;
var
F: TSearchRec;
begin
Result := -1;
if FindFirst(AFileName, faAnyFile, F) = 0 then
begin
try
Result := F.FindData.nFileSizeLow or (F.FindData.nFileSizeHigh shl 32);
finally
SysUtils.FindClose(F);
end;
end;
end;
function HexStrToInt(const str: string): byte;
begin
Result := StrToInt('$' + str);
end;
end.
| 22.448598 | 78 | 0.644047 |
6172eedc62786206bd15e8d622b0bf88194d7198
| 4,738 |
pas
|
Pascal
|
source/Api/Server/Fido.Api.Server.Consul.pas
|
atkins126/FidoLib
|
219fb0e1b78599251248971234ddac0913c912b1
|
[
"MIT"
] | 27 |
2021-09-26T18:14:51.000Z
|
2022-01-04T09:26:42.000Z
|
source/Api/Server/Fido.Api.Server.Consul.pas
|
atkins126/FidoLib
|
219fb0e1b78599251248971234ddac0913c912b1
|
[
"MIT"
] | 5 |
2021-11-08T19:20:29.000Z
|
2022-01-29T18:50:23.000Z
|
source/Api/Server/Fido.Api.Server.Consul.pas
|
atkins126/FidoLib
|
219fb0e1b78599251248971234ddac0913c912b1
|
[
"MIT"
] | 7 |
2021-09-26T17:30:40.000Z
|
2022-02-14T02:19:05.000Z
|
(*
* Copyright 2022 Mirko Bianco (email: writetomirko@gmail.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without Apiriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*)
unit Fido.Api.Server.Consul;
interface
uses
System.SysUtils,
System.Rtti,
IdStack,
Spring.Collections,
Fido.Utilities,
Fido.Api.Server.Resource.Attributes,
Fido.Api.Server.Intf,
Fido.Consul.Service.Intf,
Fido.Api.Server.Consul.Resource.Attributes;
type
TConsulAwareApiServer = class(TInterfacedObject, IApiServer)
private
FApiServer: IApiServer;
FConsulService: IConsulService;
FServiceName: string;
FHealthEndpoint: string;
public
constructor Create(const ApiServer: IApiServer; const ConsulService: IConsulService; const ServiceName: string);
destructor Destroy; override;
Function Port: Word;
function IsActive: Boolean;
procedure SetActive(const Value: Boolean);
procedure RegisterResource(const Resource: TObject);
procedure RegisterWebSocket(const WebSocketClass: TClass);
procedure RegisterRequestMiddleware(const Name: string; const Step: TRequestMiddlewareFunc);
procedure RegisterResponseMiddleware(const Name: string; const Step: TResponseMiddlewareProc);
end;
implementation
{ TConsulAwareApiServer }
constructor TConsulAwareApiServer.Create(
const ApiServer: IApiServer;
const ConsulService: IConsulService;
const ServiceName: string);
begin
inherited Create;
FApiServer := Utilities.CheckNotNullAndSet(ApiServer, 'ApiServer');
FConsulService := Utilities.CheckNotNullAndSet(ConsulService, 'ConsulService');
FServiceName := ServiceName;
FHealthEndpoint := '';
end;
destructor TConsulAwareApiServer.Destroy;
begin
FApiServer := nil;
inherited;
end;
function TConsulAwareApiServer.IsActive: Boolean;
begin
Result := FApiServer.IsActive;
end;
function TConsulAwareApiServer.Port: Word;
begin
Result := FApiServer.Port;
end;
procedure TConsulAwareApiServer.RegisterRequestMiddleware(
const Name: string;
const Step: TRequestMiddlewareFunc);
begin
FApiServer.RegisterRequestMiddleware(Name, Step);
end;
procedure TConsulAwareApiServer.RegisterResource(const Resource: TObject);
var
Ctx: TRttiContext;
RttiType: TRttiType;
RttiMethod: TRttiMethod;
Attr: TCustomAttribute;
Path: string;
BaseUrl: string;
begin
FApiServer.RegisterResource(Resource);
Ctx := TRttiContext.Create;
RttiType := Ctx.GetType(Resource.ClassType);
for Attr in RttiType.GetAttributes do
if Attr is BaseUrlAttribute then
BaseUrl := (Attr as BaseUrlAttribute).BaseUrl;
for RttiMethod in RttiType.GetMethods do
begin
Path := '';
for Attr in RttiMethod.GetAttributes do
if Attr is PathAttribute then
begin
Path := (Attr as PathAttribute).Path;
if Path.Contains('/{') then
Path := Copy(Path, 1, Pos('/{', Path) - 1)
else if Path.Contains('{') then
Path := Copy(Path, 1, Pos('{', Path) - 1);
end;
if Path.IsEmpty then
Continue;
for Attr in RttiMethod.GetAttributes do
if Attr is ConsulHealthCheckAttribute then
FHealthEndpoint := Format('%s%s', [BaseUrl, Path]);
end;
end;
procedure TConsulAwareApiServer.RegisterResponseMiddleware(
const Name: string;
const Step: TResponseMiddlewareProc);
begin
FApiServer.RegisterResponseMiddleware(Name, Step);
end;
procedure TConsulAwareApiServer.RegisterWebSocket(const WebSocketClass: TClass);
begin
FApiServer.RegisterWebSocket(WebSocketClass);
end;
procedure TConsulAwareApiServer.SetActive(const Value: Boolean);
begin
FApiServer.SetActive(Value);
case Value of
True: FConsulService.Register(FServiceName, FApiServer.Port, FHealthEndpoint);
False: FConsulService.Deregister;
end;
end;
end.
| 29.067485 | 116 | 0.754327 |
85c5cf75ad5d231ad99999eecafb64882d429549
| 20,014 |
dfm
|
Pascal
|
Tools/Level designer 2D/TShapeSelection.dfm
|
Jeanmilost/CompactStar
|
1c1a416f3abddbe4690e4dfa537f748c31412256
|
[
"MIT"
] | 4 |
2019-12-20T00:29:45.000Z
|
2022-03-10T10:09:43.000Z
|
Tools/Level designer 2D/TShapeSelection.dfm
|
Jeanmilost/CompactStar
|
1c1a416f3abddbe4690e4dfa537f748c31412256
|
[
"MIT"
] | null | null | null |
Tools/Level designer 2D/TShapeSelection.dfm
|
Jeanmilost/CompactStar
|
1c1a416f3abddbe4690e4dfa537f748c31412256
|
[
"MIT"
] | 3 |
2020-02-10T15:18:15.000Z
|
2022-01-31T06:28:23.000Z
|
object ShapeSelection: TShapeSelection
Left = 0
Top = 0
AutoSize = True
BorderStyle = bsDialog
Caption = 'Add a %s'
ClientHeight = 554
ClientWidth = 315
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poOwnerFormCenter
PrintScale = poNone
Scaled = False
PixelsPerInch = 96
TextHeight = 13
object laTransform: TLabel
AlignWithMargins = True
Left = 3
Top = 3
Width = 309
Height = 25
Align = alTop
Caption = 'Transform'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -21
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
ExplicitWidth = 96
end
object laPosition: TLabel
AlignWithMargins = True
Left = 3
Top = 34
Width = 309
Height = 13
Align = alTop
Caption = 'Position'
ExplicitWidth = 37
end
object laRotation: TLabel
AlignWithMargins = True
Left = 3
Top = 97
Width = 309
Height = 13
Align = alTop
Caption = 'Rotation'
ExplicitWidth = 41
end
object laScaling: TLabel
AlignWithMargins = True
Left = 3
Top = 160
Width = 309
Height = 13
Align = alTop
Caption = 'Scaling'
ExplicitWidth = 33
end
object laOptions: TLabel
AlignWithMargins = True
Left = 3
Top = 357
Width = 309
Height = 25
Margins.Top = 0
Align = alTop
Caption = 'Options'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -21
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
ExplicitWidth = 71
end
object blBottomLine: TBevel
AlignWithMargins = True
Left = 3
Top = 519
Width = 309
Height = 1
Align = alTop
Shape = bsTopLine
ExplicitLeft = -79
ExplicitTop = 383
ExplicitWidth = 394
end
object blMiddleLine: TBevel
AlignWithMargins = True
Left = 3
Top = 353
Width = 309
Height = 1
Margins.Top = 6
Align = alTop
Shape = bsTopLine
ExplicitLeft = -2
ExplicitTop = 350
end
object blTopLine: TBevel
AlignWithMargins = True
Left = 3
Top = 223
Width = 309
Height = 1
Align = alTop
Shape = bsTopLine
ExplicitLeft = -2
ExplicitTop = 216
end
inline vfPosition: TVector3Frame
Left = 0
Top = 50
Width = 315
Height = 44
Align = alTop
DoubleBuffered = True
Padding.Left = 3
Padding.Top = 3
Padding.Right = 3
Padding.Bottom = 3
ParentDoubleBuffered = False
TabOrder = 0
ExplicitTop = 50
ExplicitWidth = 315
inherited paLabels: TPanel
Width = 309
ExplicitWidth = 309
end
inherited paValues: TPanel
Width = 309
ExplicitWidth = 309
end
end
inline vfRotation: TVector3Frame
Left = 0
Top = 113
Width = 315
Height = 44
Align = alTop
DoubleBuffered = True
Padding.Left = 3
Padding.Top = 3
Padding.Right = 3
Padding.Bottom = 3
ParentDoubleBuffered = False
TabOrder = 1
ExplicitTop = 113
ExplicitWidth = 315
inherited paLabels: TPanel
Width = 309
ExplicitWidth = 309
end
inherited paValues: TPanel
Width = 309
ExplicitWidth = 309
end
end
inline vfScaling: TVector3Frame
Left = 0
Top = 176
Width = 315
Height = 44
Align = alTop
DoubleBuffered = True
Padding.Left = 3
Padding.Top = 3
Padding.Right = 3
Padding.Bottom = 3
ParentDoubleBuffered = False
TabOrder = 2
ExplicitTop = 176
ExplicitWidth = 315
inherited paLabels: TPanel
Width = 309
ExplicitWidth = 309
end
inherited paValues: TPanel
Width = 309
ExplicitWidth = 309
end
end
object paShapeTexture: TPanel
Left = 0
Top = 227
Width = 315
Height = 120
Align = alTop
AutoSize = True
BevelOuter = bvNone
TabOrder = 3
object laTexture: TLabel
AlignWithMargins = True
Left = 3
Top = 0
Width = 69
Height = 24
Margins.Top = 0
Align = alTop
Caption = 'Texture'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -20
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object paTexture: TPanel
AlignWithMargins = True
Left = 20
Top = 30
Width = 292
Height = 90
Margins.Left = 20
Margins.Bottom = 0
Align = alTop
BevelOuter = bvNone
TabOrder = 0
object imTexture: TImage
AlignWithMargins = True
Left = 0
Top = 0
Width = 90
Height = 90
Margins.Left = 0
Margins.Top = 0
Margins.Right = 0
Margins.Bottom = 0
Align = alLeft
Center = True
Picture.Data = {
0954506E67496D61676589504E470D0A1A0A0000000D49484452000000640000
0064080600000070E295540000000473424954080808087C0864880000000970
485973000038C9000038C901774E6AC20000001974455874536F667477617265
007777772E696E6B73636170652E6F72679BEE3C1A000006DC4944415478DAED
9D7D6C136518C09FF7D66D84F1B1C180100DFE81A28221E8305B0B98865E3FC6
4624042511A3F8079A880A7E4645604685040D09060D242448A2F163212120E9
AE1FD844B276E05043E4239818A3C198094360C176ED3D3ED75D471D15AE5BE1
DEA4CF2FB9DCFB5EDFF7DEF79E5FEF7ABDBBBE159047837B717D5545EA7910D0
4AD9BB69AA81C2A401C421BD523CD2150C5E048B383DFE0008DC45756FB35AA7
00FFD0B4231ED15E2CA692530DBC0A80EB293976046D9F47C49712D1D01EAB15
DC6EB723E9A836CA2FA3A9CA5CDC27004EE9800774CC6C3F128D9ECB95175783
E55B0242ECA664ADE5EE09581B0F6BDBAC1677A9FED30830630401194457706E
5728D46DA56CA3C73345118EB394544AD0745F753A591B8BC5D216B7F961DAE6
7DD729D28B42AC4C843BF61B99AC1053C6DE623B8C025625C2DA2EABE59DAAFF
18CDEE2F41501021332B11899CB452787E4B4B5D2699FE8392D5236D9802F657
E77CE714686BD3AD946F52FD2AD509DFA05886A42C35A48805CDCD93D2FDFA19
5A387E4821DA8DC4DFFF138F7E012294ECED79B9BBBBBBDFEAC6B8BCDE393A2A
5BA9EE1DC30F89DE2750D9D119EDF8B8985A2E8F6F196DF41BB44DD68F00D76E
F79F42C1B73A43A1434554124EAF7F3D202CA7E428733D461F260C29D79BC1F4
5D828EEB6F93F60D792FF450E527E2514D336A0EBFF3CC7510F3BC8166FA3CDA
4301AEBFBA14360A3A8C7C4FC939796503F1488766778FCB0192B248473C98CB
D3A1ADDB107219CCB3A9ECF131A24D06DE336E1546FC8D33AC3A337FC958901F
FC53743A79AFDDBD2C27869C79220BB1198AFF2918F8CE67C042EC868548060B
910C162219147FE35BBC6A667F652136D3E8699EA9087D07256B1484570C2157
28637EA5871F484829AE3531C34434797DDB048A17B21914AB8BBD46C49496EC
D5DE795EEFDC0C629FD5ABA7CCCD438C7C154C29612192C14224838548060B91
0C1622192C4432588864B0109B71BBDDA39295D5CF802E46830377B2109B71AA
819D00F8B49146806FB2425C3EDFE4AA542A158BC52ED8DDC172C3A9FA4FD02C
77853D2D9A3CFED78480CD94E9273B2B3A23DA5EBB3B594E14BA41653C2C6D3E
802CBE8B473A1EB4BB93E504DF31940C1622192C4432588864B010C9602192C1
4224838548060B910C1622192C4432588864B010C9A0F81B4F8BDE6366751662
332E35F02902AE30B3475988CD34A8EAF82A70BC4E47AB316905B7E47E963B30
AA8080CE78589B677727CB19E152FD4FD12EB29DD25784828F16396C045362B2
F7D48D2184626EB76E754015E6E6C14F9D48060B910C1622192C4432588864B0
10C9602192C142248385D8CC7C559D96818A0FC8C41801FA9B2CC4669C9EC07E
10B8D8CC9E160D0D0D9555B5135B5088CB898816051E6FF19652E806D5679478
6C200B1BE251ED1DBB3B594E14129284C131C9F1783C129A6D7727CB09BE852B
192C4432588864B010C9602192C14224838548060B910C1622192C4432588864
B010C960219241F13F4EB3FBCC6C8A85D88C4BF5BF4B02D699D97616623FC2E9
F1193708475FAA1BB7CF10F2332D9C6EBE789084B4DADDC3724634F97C8D22A3
6CA2745FA6425F732414FAC5EE4E9533FC908364B010C9602192C14224838548
060B910C1622192C4432588864B0109B71F97C0FA12E3EA7640D4DCFB2109B71
AA81C300981BCEA4472CF0FBA76674588B007DD5FDC9ADB158ECB2DD9D2C270A
DDA04A50A2319B15624F3CDCB1D2EE4E961385846428A1980B4EC423DA2CBB3B
594EF02D5CC970A9FED324608699CD0A313E336ACC05E748C824E09FB5DD2A72
E395D599F94BC6826394B8FA1FEA08CDF1A8D661774FCB01DA3B5AE89DFF752E
4FA7BCDDC2A506DA1070635EB91ED4F1C9C4A1902185F7949B833170DC229A7F
4201AE1F5C8AB04134B817D757395267285B3BA4D279AA57E04FC23083885D58
55B1BA2B18BC68B507D9DF63A3633B089C699CCE0D6F3B30499D6EA73DB80D8A
78B30C7CF9CADEA69E3AFC18E205DAEE2D8968E8CB626A51E057E908AB851063
F3D665C47AC290A2BD5001776603E3F4F896508C8C3F0353AC362410367546B5
7556CB3BBD8176405C36FC80E4B50DD0DA19D10E5A6E5BF59F8511C91824E5A8
546EFF3618ECB152D8B5B0793A2AFA19B8F115910C0AB13411EED83F58D094B2
1BAEDD530A82023F4C84436B8A084A9066811204C5D835962722DA57960AB7B5
29CEC371DADB617C299AD6D3CAB4AE58F0772B851B3D81D98AC01F6F50AC9764
AC34641899FF98330E5FD58EFEE7A8DD561C18DCB7A6C00AE825D19D56F4A547
43A1DFAC6E49D342FF0342812F2879D70802D24FD3BE8B75E31EFFA9BD3D65B9
6D8F6F051D32B65172E208DAEEA3CFDACD8948E8BD622A39D5C0FB14328A298C
CA5F17C5F0241D660E64F4F44747A2D173B917FE0531C73269550D0E0A000000
0049454E44AE426082}
Proportional = True
Stretch = True
ExplicitLeft = 8
ExplicitHeight = 167
end
object paTextureFile: TPanel
AlignWithMargins = True
Left = 90
Top = 0
Width = 202
Height = 90
Margins.Left = 0
Margins.Top = 0
Margins.Right = 0
Margins.Bottom = 0
Align = alClient
BevelOuter = bvNone
TabOrder = 0
object laTextureFileName: TLabel
AlignWithMargins = True
Left = 3
Top = 53
Width = 55
Height = 13
Margins.Top = 0
Margins.Bottom = 0
Align = alBottom
Caption = 'Select a file'
end
object paTextureScreenshot: TPanel
AlignWithMargins = True
Left = 3
Top = 69
Width = 196
Height = 21
Margins.Bottom = 0
Align = alBottom
BevelOuter = bvNone
TabOrder = 0
object edTextureFileName: TEdit
AlignWithMargins = True
Left = 0
Top = 0
Width = 172
Height = 21
Margins.Left = 0
Margins.Top = 0
Margins.Bottom = 0
Align = alClient
ReadOnly = True
TabOrder = 0
end
object btTextureBrowse: TButton
AlignWithMargins = True
Left = 175
Top = 0
Width = 21
Height = 21
Margins.Left = 0
Margins.Top = 0
Margins.Right = 0
Margins.Bottom = 0
Align = alRight
Caption = '...'
TabOrder = 1
OnClick = btTextureBrowseClick
end
end
end
end
end
object ckRepeatTextureOnEachFace: TCheckBox
AlignWithMargins = True
Left = 3
Top = 388
Width = 309
Height = 17
Align = alTop
Caption = 'Repeat texture on each face'
TabOrder = 4
end
object paButtons: TPanel
AlignWithMargins = True
Left = 3
Top = 526
Width = 309
Height = 25
Align = alTop
BevelOuter = bvNone
TabOrder = 5
object btOk: TButton
Left = 234
Top = 0
Width = 75
Height = 25
Align = alRight
Caption = 'Ok'
TabOrder = 1
OnClick = btOkClick
end
object btCancel: TButton
Left = 0
Top = 0
Width = 75
Height = 25
Align = alLeft
Caption = 'Cancel'
TabOrder = 0
OnClick = btCancelClick
end
end
object paSlicesAndStacks: TPanel
AlignWithMargins = True
Left = 3
Top = 411
Width = 309
Height = 21
Align = alTop
BevelOuter = bvNone
TabOrder = 6
object laStacks: TLabel
AlignWithMargins = True
Left = 198
Top = 0
Width = 60
Height = 21
Margins.Left = 0
Margins.Top = 0
Margins.Right = 5
Margins.Bottom = 0
Align = alRight
Alignment = taRightJustify
AutoSize = False
Caption = 'Stacks'
Layout = tlCenter
ExplicitLeft = 207
end
object laSlices: TLabel
AlignWithMargins = True
Left = 0
Top = 0
Width = 60
Height = 21
Margins.Left = 0
Margins.Top = 0
Margins.Right = 5
Margins.Bottom = 0
Align = alLeft
Alignment = taRightJustify
AutoSize = False
Caption = 'Slices'
Layout = tlCenter
end
object edSlices: TEdit
AlignWithMargins = True
Left = 65
Top = 0
Width = 30
Height = 21
Margins.Left = 0
Margins.Top = 0
Margins.Right = 0
Margins.Bottom = 0
Align = alLeft
NumbersOnly = True
ReadOnly = True
TabOrder = 0
Text = '25'
end
object udSlices: TUpDown
Left = 95
Top = 0
Width = 16
Height = 21
Associate = edSlices
Min = 3
Max = 50
Position = 25
TabOrder = 1
end
object edStacks: TEdit
Left = 263
Top = 0
Width = 30
Height = 21
Margins.Left = 0
Margins.Top = 0
Margins.Right = 16
Margins.Bottom = 0
Align = alRight
NumbersOnly = True
ReadOnly = True
TabOrder = 2
Text = '25'
end
object udStacks: TUpDown
Left = 293
Top = 0
Width = 16
Height = 21
Associate = edStacks
Min = 2
Max = 50
Position = 25
TabOrder = 3
end
end
object paFaces: TPanel
AlignWithMargins = True
Left = 3
Top = 438
Width = 309
Height = 21
Align = alTop
BevelOuter = bvNone
TabOrder = 7
object laFaces: TLabel
AlignWithMargins = True
Left = 0
Top = 0
Width = 60
Height = 21
Margins.Left = 0
Margins.Top = 0
Margins.Right = 5
Margins.Bottom = 0
Align = alLeft
Alignment = taRightJustify
AutoSize = False
Caption = 'Faces'
Layout = tlCenter
end
object edFaces: TEdit
AlignWithMargins = True
Left = 65
Top = 0
Width = 30
Height = 21
Margins.Left = 0
Margins.Top = 0
Margins.Right = 0
Margins.Bottom = 0
Align = alLeft
NumbersOnly = True
ReadOnly = True
TabOrder = 0
Text = '25'
end
object udFaces: TUpDown
Left = 95
Top = 0
Width = 16
Height = 21
Associate = edFaces
Min = 3
Max = 50
Position = 25
TabOrder = 1
end
end
object paMinRadius: TPanel
AlignWithMargins = True
Left = 3
Top = 465
Width = 309
Height = 21
Align = alTop
BevelOuter = bvNone
TabOrder = 9
object laMinRadius: TLabel
AlignWithMargins = True
Left = 0
Top = 0
Width = 60
Height = 21
Margins.Left = 0
Margins.Top = 0
Margins.Right = 5
Margins.Bottom = 0
Align = alLeft
Alignment = taRightJustify
AutoSize = False
Caption = 'Min. Radius'
Layout = tlCenter
end
object laMinRadiusPercent: TLabel
AlignWithMargins = True
Left = 98
Top = 0
Width = 11
Height = 13
Margins.Top = 0
Margins.Right = 0
Margins.Bottom = 0
Align = alLeft
Caption = '%'
Layout = tlCenter
end
object edMinRadius: TEdit
AlignWithMargins = True
Left = 65
Top = 0
Width = 30
Height = 21
Margins.Left = 0
Margins.Top = 0
Margins.Right = 0
Margins.Bottom = 0
Align = alLeft
NumbersOnly = True
ReadOnly = True
TabOrder = 0
Text = '50'
end
object udMinRadius: TUpDown
Left = 95
Top = 0
Width = 16
Height = 21
Associate = edMinRadius
Min = 1
Max = 99
Position = 50
TabOrder = 1
end
end
object paDeltas: TPanel
AlignWithMargins = True
Left = 3
Top = 492
Width = 309
Height = 21
Align = alTop
BevelOuter = bvNone
TabOrder = 8
object laDeltaMiax: TLabel
AlignWithMargins = True
Left = 111
Top = 0
Width = 55
Height = 21
Margins.Left = 16
Margins.Top = 0
Margins.Right = 5
Margins.Bottom = 0
Align = alLeft
Alignment = taRightJustify
AutoSize = False
Caption = 'Delta max'
Layout = tlCenter
ExplicitLeft = 95
end
object laDeltaMin: TLabel
AlignWithMargins = True
Left = 0
Top = 0
Width = 60
Height = 21
Margins.Left = 0
Margins.Top = 0
Margins.Right = 5
Margins.Bottom = 0
Align = alLeft
Alignment = taRightJustify
AutoSize = False
Caption = 'Delta min'
Layout = tlCenter
ExplicitLeft = -44
ExplicitTop = -3
end
object laDeltaZ: TLabel
AlignWithMargins = True
Left = 203
Top = 0
Width = 55
Height = 21
Margins.Left = 16
Margins.Top = 0
Margins.Right = 5
Margins.Bottom = 0
Align = alRight
Alignment = taRightJustify
AutoSize = False
Caption = 'Delta Z'
Layout = tlCenter
ExplicitLeft = 198
end
object edDeltaMin: TEdit
AlignWithMargins = True
Left = 65
Top = 0
Width = 30
Height = 21
Margins.Left = 0
Margins.Top = 0
Margins.Right = 0
Margins.Bottom = 0
Align = alLeft
NumbersOnly = True
ReadOnly = True
TabOrder = 0
Text = '0'
end
object udDeltaMin: TUpDown
Left = 95
Top = 0
Width = 16
Height = 21
Associate = edDeltaMin
Max = 1000
TabOrder = 1
end
object edDeltaMax: TEdit
Left = 171
Top = 0
Width = 30
Height = 21
Margins.Left = 0
Margins.Top = 0
Margins.Right = 16
Margins.Bottom = 0
Align = alLeft
NumbersOnly = True
ReadOnly = True
TabOrder = 2
Text = '0'
end
object udDeltaMax: TUpDown
Left = 201
Top = 0
Width = 16
Height = 21
Associate = edDeltaMax
Max = 1000
TabOrder = 3
end
object edDeltaZ: TEdit
AlignWithMargins = True
Left = 263
Top = 0
Width = 30
Height = 21
Margins.Left = 0
Margins.Top = 0
Margins.Right = 0
Margins.Bottom = 0
Align = alRight
NumbersOnly = True
ReadOnly = True
TabOrder = 4
Text = '10'
end
object udDeltaZ: TUpDown
Left = 293
Top = 0
Width = 16
Height = 21
Associate = edDeltaZ
Position = 10
TabOrder = 5
end
end
object opdPicture: TOpenPictureDialog
Options = [ofHideReadOnly, ofFileMustExist, ofEnableSizing]
Left = 279
Top = 5
end
end
| 26.059896 | 75 | 0.595033 |
83f034d374f1adbad6329a40802b708e462caa37
| 1,767 |
pas
|
Pascal
|
Demos/ApiSamples/Src/GraphInfo/GraphInfo.pas
|
wxinix/TensorFlow-Island
|
d25c332607f8fee0c72260e2b78ff1185f0437f1
|
[
"MIT"
] | 8 |
2019-12-22T01:23:47.000Z
|
2021-09-23T14:21:53.000Z
|
Demos/ApiSamples/Src/GraphInfo/GraphInfo.pas
|
wxinix/TensorFlow-Island
|
d25c332607f8fee0c72260e2b78ff1185f0437f1
|
[
"MIT"
] | 1 |
2020-01-27T02:18:54.000Z
|
2020-01-29T00:49:09.000Z
|
Demos/ApiSamples/Src/GraphInfo/GraphInfo.pas
|
wxinix/TensorFlow-Island
|
d25c332607f8fee0c72260e2b78ff1185f0437f1
|
[
"MIT"
] | 2 |
2020-02-05T17:21:09.000Z
|
2021-03-20T16:55:23.000Z
|
// MIT License
// Copyright (c) 2019-2021 Wuping Xin.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
namespace TensorFlow.Island.Samples.GraphInfo;
uses
TensorFlow.Island.Api,
TensorFlow.Island.Api.Helpers;
type
Program = class
public
class method Main(args: array of String): Int32;
begin
var graph := LoadGraph(Environment.CurrentDirectory+ '\graph.pb');
if not assigned(graph) then begin
writeLn('Cannot load graph');
exit 1;
end;
var status := TF_NewStatus();
try
PrintOps(graph, status);
readLn;
finally
DeleteGraph(graph);
TF_DeleteStatus(status);
end;
end;
end;
end.
| 34.647059 | 81 | 0.696095 |
83ec4b32bd7d0f7474eb0268ba0c8318bb1ca6d6
| 9,434 |
pas
|
Pascal
|
Projects/SecurityFunc.pas
|
winter-wh/issrc-is-5_4
|
bebd906f45bcaa3e3a22944e2511c583ae3dfb13
|
[
"FSFAP"
] | null | null | null |
Projects/SecurityFunc.pas
|
winter-wh/issrc-is-5_4
|
bebd906f45bcaa3e3a22944e2511c583ae3dfb13
|
[
"FSFAP"
] | 1 |
2019-01-12T22:44:23.000Z
|
2019-01-12T22:44:23.000Z
|
Projects/SecurityFunc.pas
|
winter-wh/issrc-is-5_4
|
bebd906f45bcaa3e3a22944e2511c583ae3dfb13
|
[
"FSFAP"
] | null | null | null |
unit SecurityFunc;
{
Inno Setup
Copyright (C) 1997-2008 Jordan Russell
Portions by Martijn Laan
For conditions of distribution and use, see LICENSE.TXT.
Functions for altering ACLs on files & registry keys
$jrsoftware: issrc/Projects/SecurityFunc.pas,v 1.6 2008/10/17 22:18:14 jr Exp $
}
interface
uses
Windows, SysUtils, CmnFunc2, Struct;
function GrantPermissionOnFile(const DisableFsRedir: Boolean; Filename: String;
const Entries: TGrantPermissionEntry; const EntryCount: Integer): Boolean;
function GrantPermissionOnKey(const RegView: TRegView; const RootKey: HKEY;
const Subkey: String; const Entries: TGrantPermissionEntry;
const EntryCount: Integer): Boolean;
implementation
uses
PathFunc, Msgs, InstFunc, Logging, RedirFunc, Helper;
{$IFNDEF UNICODE}
function AllocWideCharStr(const S: String): PWideChar;
{ Allocates a null-terminated Unicode copy of S on the heap. Use FreeMem to
free the returned pointer. }
var
SourceLen, DestLen: Integer;
begin
SourceLen := Length(S);
if SourceLen = 0 then
DestLen := 0
else begin
DestLen := MultiByteToWideChar(CP_ACP, 0, PChar(S), SourceLen, nil, 0);
if (DestLen <= 0) or (DestLen >= High(Integer) div SizeOf(WideChar)) then
InternalError('AllocWideCharStr: MultiByteToWideChar failed');
end;
GetMem(Result, (DestLen + 1) * SizeOf(WideChar));
try
if DestLen <> 0 then
if MultiByteToWideChar(CP_ACP, 0, PChar(S), SourceLen, Result, DestLen) <> DestLen then
InternalError('AllocWideCharStr: MultiByteToWideChar failed');
Result[DestLen] := #0;
except
FreeMem(Result);
raise;
end;
end;
{$ENDIF}
function InternalGrantPermission(const ObjectType: DWORD; const ObjectName: String;
const Entries: TGrantPermissionEntry; const EntryCount: Integer;
const Inheritance: DWORD): DWORD;
{ Grants the specified access to the specified object. Returns ERROR_SUCCESS if
successful. Always fails on Windows 9x/Me and NT 4.0. }
type
PPSID = ^PSID;
PPACL = ^PACL;
PTrusteeW = ^TTrusteeW;
TTrusteeW = record
pMultipleTrustee: PTrusteeW;
MultipleTrusteeOperation: DWORD; { MULTIPLE_TRUSTEE_OPERATION }
TrusteeForm: DWORD; { TRUSTEE_FORM }
TrusteeType: DWORD; { TRUSTEE_TYPE }
ptstrName: PWideChar;
end;
TExplicitAccessW = record
grfAccessPermissions: DWORD;
grfAccessMode: DWORD; { ACCESS_MODE }
grfInheritance: DWORD;
Trustee: TTrusteeW;
end;
PArrayOfExplicitAccessW = ^TArrayOfExplicitAccessW;
TArrayOfExplicitAccessW = array[0..999999] of TExplicitAccessW;
const
GRANT_ACCESS = 1;
TRUSTEE_IS_SID = 0;
TRUSTEE_IS_UNKNOWN = 0;
var
AdvApiHandle: HMODULE;
GetNamedSecurityInfoW: function(pObjectName: PWideChar; ObjectType: DWORD;
SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PPSID;
ppDacl, ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD;
stdcall;
SetNamedSecurityInfoW: function(pObjectName: PWideChar; ObjectType: DWORD;
SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PSID;
ppDacl, ppSacl: PACL): DWORD; stdcall;
SetEntriesInAclW: function(cCountOfExplicitEntries: ULONG;
const pListOfExplicitEntries: TExplicitAccessW; OldAcl: PACL;
var NewAcl: PACL): DWORD; stdcall;
{$IFNDEF UNICODE}
WideObjectName: PWideChar;
{$ENDIF}
SD: PSECURITY_DESCRIPTOR;
Dacl, NewDacl: PACL;
ExplicitAccess: PArrayOfExplicitAccessW;
E: ^TGrantPermissionEntry;
I: Integer;
Sid: PSID;
begin
{ Windows 9x/Me don't support ACLs, and GetNamedSecurityInfo and
SetEntriesInACL are buggy on NT 4 }
if (Win32Platform <> VER_PLATFORM_WIN32_NT) or (Lo(GetVersion) < 5) then begin
Result := ERROR_INVALID_FUNCTION;
Exit;
end;
AdvApiHandle := GetModuleHandle(advapi32);
GetNamedSecurityInfoW := GetProcAddress(AdvApiHandle, PAnsiChar('GetNamedSecurityInfoW'));
SetNamedSecurityInfoW := GetProcAddress(AdvApiHandle, PAnsiChar('SetNamedSecurityInfoW'));
SetEntriesInAclW := GetProcAddress(AdvApiHandle, PAnsiChar('SetEntriesInAclW'));
if (@GetNamedSecurityInfoW = nil) or (@SetNamedSecurityInfoW = nil) or
(@SetEntriesInAclW = nil) then begin
Result := ERROR_PROC_NOT_FOUND;
Exit;
end;
{$IFNDEF UNICODE}
WideObjectName := AllocWideCharStr(ObjectName);
try
{$ENDIF}
ExplicitAccess := nil;
Result := GetNamedSecurityInfoW(
{$IFDEF UNICODE} PChar(ObjectName) {$ELSE} WideObjectName {$ENDIF},
ObjectType, DACL_SECURITY_INFORMATION, nil, nil, @Dacl, nil, SD);
if Result <> ERROR_SUCCESS then
Exit;
try
{ Note: Dacl will be nil if GetNamedSecurityInfo is called on a FAT partition.
Be careful not to dereference a nil pointer. }
ExplicitAccess := AllocMem(EntryCount * SizeOf(ExplicitAccess[0]));
E := @Entries;
for I := 0 to EntryCount-1 do begin
if not AllocateAndInitializeSid(E.Sid.Authority, E.Sid.SubAuthCount,
E.Sid.SubAuth[0], E.Sid.SubAuth[1], 0, 0, 0, 0, 0, 0, Sid) then begin
Result := GetLastError;
if Result = ERROR_SUCCESS then { just in case... }
Result := ERROR_INVALID_PARAMETER;
Exit;
end;
ExplicitAccess[I].grfAccessPermissions := E.AccessMask;
ExplicitAccess[I].grfAccessMode := GRANT_ACCESS;
ExplicitAccess[I].grfInheritance := Inheritance;
ExplicitAccess[I].Trustee.TrusteeForm := TRUSTEE_IS_SID;
ExplicitAccess[I].Trustee.TrusteeType := TRUSTEE_IS_UNKNOWN;
PSID(ExplicitAccess[I].Trustee.ptstrName) := Sid;
Inc(E);
end;
Result := SetEntriesInAclW(EntryCount, ExplicitAccess[0], Dacl, NewDacl);
if Result <> ERROR_SUCCESS then
Exit;
try
Result := SetNamedSecurityInfoW(
{$IFDEF UNICODE} PChar(ObjectName) {$ELSE} WideObjectName {$ENDIF},
ObjectType, DACL_SECURITY_INFORMATION, nil, nil, NewDacl, nil);
finally
LocalFree(HLOCAL(NewDacl));
end;
finally
if Assigned(ExplicitAccess) then begin
for I := EntryCount-1 downto 0 do begin
Sid := PSID(ExplicitAccess[I].Trustee.ptstrName);
if Assigned(Sid) then
FreeSid(Sid);
end;
FreeMem(ExplicitAccess);
end;
LocalFree(HLOCAL(SD));
end;
{$IFNDEF UNICODE}
finally
FreeMem(WideObjectName);
end;
{$ENDIF}
end;
function GrantPermission(const Use64BitHelper: Boolean; const ObjectType: DWORD;
const ObjectName: String; const Entries: TGrantPermissionEntry;
const EntryCount: Integer; const Inheritance: DWORD): DWORD;
{ Invokes either the internal GrantPermission function or the one inside the
64-bit helper, depending on the setting of Use64BitHelper }
begin
try
if Use64BitHelper then
Result := HelperGrantPermission(ObjectType, ObjectName, Entries,
EntryCount, Inheritance)
else
Result := InternalGrantPermission(ObjectType, ObjectName, Entries,
EntryCount, Inheritance);
except
{ If the helper interface (or even InternalGrantPermission) raises an
exception, don't propogate it. Just log it and return an error code, as
that's what the caller is expecting on failure. }
Log('Exception while setting permissions:' + SNewLine + GetExceptMessage);
Result := ERROR_GEN_FAILURE;
end;
end;
const
OBJECT_INHERIT_ACE = 1;
CONTAINER_INHERIT_ACE = 2;
function GrantPermissionOnFile(const DisableFsRedir: Boolean; Filename: String;
const Entries: TGrantPermissionEntry; const EntryCount: Integer): Boolean;
{ Grants the specified access to the specified file/directory. Returns True if
successful. On failure, the thread's last error code is set. Always fails on
Windows 9x/Me and NT 4.0. }
const
SE_FILE_OBJECT = 1;
var
Attr, Inheritance, ErrorCode: DWORD;
begin
{ Expand filename if needed because the 64-bit helper may not have the same
current directory as us }
Filename := PathExpand(Filename);
Attr := GetFileAttributesRedir(DisableFsRedir, Filename);
if Attr = $FFFFFFFF then begin
Result := False;
Exit;
end;
if Attr and FILE_ATTRIBUTE_DIRECTORY <> 0 then
Inheritance := OBJECT_INHERIT_ACE or CONTAINER_INHERIT_ACE
else
Inheritance := 0;
ErrorCode := GrantPermission(DisableFsRedir, SE_FILE_OBJECT, Filename, Entries,
EntryCount, Inheritance);
SetLastError(ErrorCode);
Result := (ErrorCode = ERROR_SUCCESS);
end;
function GrantPermissionOnKey(const RegView: TRegView; const RootKey: HKEY;
const Subkey: String; const Entries: TGrantPermissionEntry;
const EntryCount: Integer): Boolean;
{ Grants the specified access to the specified registry key. Returns True if
successful. On failure, the thread's last error code is set. Always fails on
Windows 9x/Me and NT 4.0. }
const
SE_REGISTRY_KEY = 4;
var
ObjName: String;
ErrorCode: DWORD;
begin
case RootKey of
HKEY_CLASSES_ROOT: ObjName := 'CLASSES_ROOT';
HKEY_CURRENT_USER: ObjName := 'CURRENT_USER';
HKEY_LOCAL_MACHINE: ObjName := 'MACHINE';
HKEY_USERS: ObjName := 'USERS';
else
{ Other root keys are not supported by Get/SetNamedSecurityInfo }
SetLastError(ERROR_INVALID_PARAMETER);
Result := False;
Exit;
end;
ObjName := ObjName + '\' + Subkey;
ErrorCode := GrantPermission(RegView = rv64Bit, SE_REGISTRY_KEY, ObjName,
Entries, EntryCount, CONTAINER_INHERIT_ACE);
SetLastError(ErrorCode);
Result := (ErrorCode = ERROR_SUCCESS);
end;
end.
| 35.070632 | 93 | 0.719313 |
83ee93ca69adfdb5bf7c18f90b5224e4c3c78bd6
| 6,543 |
pas
|
Pascal
|
examples/library/Elastic.pas
|
azrael11/GamePascal
|
e3c2811651b103fb7db691f3cc9697f949cf723b
|
[
"RSA-MD"
] | 1 |
2020-07-20T11:22:36.000Z
|
2020-07-20T11:22:36.000Z
|
examples/library/Elastic.pas
|
azrael11/GamePascal
|
e3c2811651b103fb7db691f3cc9697f949cf723b
|
[
"RSA-MD"
] | null | null | null |
examples/library/Elastic.pas
|
azrael11/GamePascal
|
e3c2811651b103fb7db691f3cc9697f949cf723b
|
[
"RSA-MD"
] | 1 |
2020-07-20T11:22:37.000Z
|
2020-07-20T11:22:37.000Z
|
{$REGION 'Project Directives'}
// Modual Info
{$CONSOLEAPP}
{$MODULENAME "..\bin\"}
{.$EXEICON ".\bin\arc\icons\icon.ico"}
{$SEARCHPATH "..\common"}
{.$ENABLERUNTIMETHEMES}
{.$HIGHDPIAWARE}
// Version Infp
{.$ADDVERSIONINFO}
{.$COMPANYNAME "Company XYZ"}
{.$FILEVERSION "1.0.0.0"}
{.$FILEDESCRIPTION "Demo XYZ"}
{.$INTERNALNAME "Demo XYZ"}
{.$LEGALCOPYRIGHT "Copyright (c) 2015 Company XYZ"}
{.$LEGALTRADEMARK "All Rights Reserved."}
{.$ORIGINALFILENAME "DemoXYZ.exe"}
{.$PRODUCTNAME "Demo XYZ"}
{.$PRODUCTVERSION "1.0.0.0"}
{.$COMMENTS "http://companyxyz.com"}
{$ENDREGION}
program Elastic;
uses
SysUtils,
GamePascal,
uCommon;
const
// beads
cGravity = 0.04;
cXDecay = 0.97;
cYDecay = 0.97;
cBeadCount = 10;
cXElasticity = 0.02;
cYElasticity = 0.02;
cWallDecay = 0.9;
cSlackness = 1;
cBeadSize = 12;
cBedHalfSize = cBeadSize / 2;
cBeadFilled = True;
type
{ TBead }
TBead = record
X : Single;
Y : Single;
XMove: Single;
YMove: Single;
end;
{ TMyGame }
TMyGame = class(TBaseGame)
protected
FViewWidth: Single;
FViewHeight: Single;
FBead : array[0..cBeadCount] of TBead;
FTimer: Single;
FBmp: TBitmap;
public
procedure OnStartup; override;
procedure OnShutdown; override;
procedure OnDisplayReady(aReady: Boolean); override;
procedure OnUpdate(aDeltaTime: Single); override;
procedure OnRender; override;
procedure OnRenderGUI; override;
end;
{ --- TMyGame --------------------------------------------------------------- }
procedure TMyGame.OnStartup;
var
vp: TRectangle;
begin
inherited;
// open display
Display_Open(-1, -1, cDisplayWidth, cDisplayHeight, cDisplayFullscreen,
cDisplayVSync, cDisplayaAntiAlias, cDisplayRenderAPI,
cDisplayTitle + 'Elastic Demo');
// init data
FillChar(FBead, SizeOf(FBead), 0);
// init audio
Audio_Open;
Audio_MusicLoad(Archive, 'arc\music\nightmere.ogg');
Audio_MusicSetLoop(True);
Audio_MusicSetOffset(8);
Audio_MusicPlay;
// set the view port size
Display_GetViewportSize(vp);
FViewWidth := vp.Width;
FViewHeight := vp.Height;
FBmp := Bitmap_Load(Archive, 'arc/textures/avatar.png', nil);
end;
procedure TMyGame.OnShutdown;
begin
Bitmap_Unload(FBmp);
Audio_MusicUnload;
Audio_Close;
Display_Close;
inherited;
end;
procedure TMyGame.OnDisplayReady(aReady: Boolean);
begin
inherited;
{ TODO: Todo test 1 }
end;
procedure TMyGame.OnUpdate(aDeltaTime: Single);
var
i: Integer;
Dist, DistX, DistY: Single;
begin
inherited;
if not Time_FrameSpeed(FTimer, Engine_GetTargetSpeed) then
Exit;
Mouse_GetInfo(FMousePos);
FBead[0].X := FMousePos.X;
FBead[0].Y := FMousePos.Y;
if FBead[0].X - (cBeadSize+10)/2<0 then
begin
FBead[0].X := (cBeadSize+10)/2;
end;
if FBead[0].X + ((cBeadSize+10)/2) >FViewWidth then
begin
FBead[0].X := FViewWidth - (cBeadSize+10)/2;
end;
if FBead[0].Y - ((cBeadSize+10)/2) < 0 then
begin
FBead[0].Y := (cBeadSize+10)/2;
end;
//TODO: Todo test 4
if FBead[0].Y + ((cBeadSize+10)/2) > FViewHeight then
begin
FBead[0].Y := FViewHeight - (cBeadSize+10)/2;
end;
// loop though other beads
for i := 1 to cBeadCount do
begin
// calc X and Y distance between the bead and the one before it
DistX := FBead[i].X - FBead[i-1].X;
DistY := FBead[i].Y - FBead[i-1].Y;
// calc total distance
Dist := sqrt(DistX*DistX + DistY * DistY);
// if the beads are far enough apart, decrease the movement to create elasticity
if Dist > cSlackness then
begin
FBead[i].XMove := FBead[i].XMove - (cXElasticity * DistX);
FBead[i].YMove := FBead[i].YMove - (cYElasticity * DistY);
end;
// if bead is not last bead
if i <> cBeadCount then
begin
// calc distances between the bead and the one after it
DistX := FBead[i].X - FBead[i+1].X;
DistY := FBead[i].Y - FBead[i+1].Y;
Dist := sqrt(DistX*DistX + DistY*DistY);
// if beads are far enough apart, decrease the movement to create elasticity
if Dist > 1 then
begin
FBead[i].XMove := FBead[i].XMove - (cXElasticity * DistX);
FBead[i].YMove := FBead[i].YMove - (cYElasticity * DistY);
end;
end;
// decay the movement of the beads to simulate loss of energy
FBead[i].XMove := FBead[i].XMove * cXDecay;
FBead[i].YMove := FBead[i].YMove * cYDecay;
// apply cGravity to bead movement
FBead[i].YMove := FBead[i].YMove + cGravity;
// move beads
FBead[i].X := FBead[i].X + FBead[i].XMove;
FBead[i].Y := FBead[i].Y + FBead[i].YMove;
// ff the beads hit a wall, make them bounce off of it
if FBead[i].X - ((cBeadSize + 10 ) / 2) < 0 then
begin
FBead[i].X := FBead[i].X + (cBeadSize+10)/2;
FBead[i].XMove := -FBead[i].XMove * cWallDecay;
end;
if FBead[i].X + ((cBeadSize+10)/2) > FViewWidth then
begin
FBead[i].X := FViewWidth - (cBeadSize+10)/2;
FBead[i].xMove := -FBead[i].XMove * cWallDecay;
end;
if FBead[i].Y - ((cBeadSize+10)/2) < 0 then
begin
FBead[i].YMove := -FBead[i].YMove * cWallDecay;
FBead[i].Y :=(cBeadSize+10)/2;
end;
if FBead[i].Y + ((cBeadSize+10)/2) > FViewHeight then
begin
FBead[i].YMove := -FBead[i].YMove * cWallDecay;
FBead[i].Y := FViewHeight - (cBeadSize+10)/2;
end;
end;
end;
procedure TMyGame.OnRender;
var
I: Integer;
begin
inherited;
{TODO: Todo test 2 }
Bitmap_Draw(FBmp, 240, 300, nil, @Vector(0.5, 0.5), @Vector(0.26, 0.26), 0, WHITE, False, False);
// draw last bead
Display_DrawFilledRectangle(FBead[0].X, FBead[0].Y, cBeadSize, cBeadSize, GREEN);
// loop though other beads
for I := 1 to cBeadCount do
begin
// draw bead and string from it to the one before it
Display_DrawLine(FBead[i].x+cBedHalfSize, FBead[i].y+cBedHalfSize,
FBead[i-1].x+cBedHalfSize, FBead[i-1].y+cBedHalfSize, YELLOW, 1);
Display_DrawFilledRectangle(FBead[i].X, FBead[i].Y, cBeadSize, cBeadSize, GREEN);
end;
end;
procedure TMyGame.OnRenderGUI;
begin
inherited;
end;
{ --- Main ----------------------------------------------------------------- }
begin
RunGame(TMyGame);
// TODO: Todo test 3
end.
| 25.658824 | 99 | 0.60217 |
f16fd77702a6d78b9ecdffc1bbf01ade34e47e98
| 712 |
dpr
|
Pascal
|
windows/src/buildtools/build_standards_data/build_standards_data.dpr
|
bravogeorge/keyman
|
c0797e36292de903d7313214d1f765e3d9a2bf4d
|
[
"MIT"
] | 219 |
2017-06-21T03:37:03.000Z
|
2022-03-27T12:09:28.000Z
|
windows/src/buildtools/build_standards_data/build_standards_data.dpr
|
bravogeorge/keyman
|
c0797e36292de903d7313214d1f765e3d9a2bf4d
|
[
"MIT"
] | 4,451 |
2017-05-29T02:52:06.000Z
|
2022-03-31T23:53:23.000Z
|
windows/src/buildtools/build_standards_data/build_standards_data.dpr
|
bravogeorge/keyman
|
c0797e36292de903d7313214d1f765e3d9a2bf4d
|
[
"MIT"
] | 72 |
2017-05-26T04:08:37.000Z
|
2022-03-03T10:26:20.000Z
|
program build_standards_data;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
Keyman.System.BuildLanguageSubtagRegistry in 'Keyman.System.BuildLanguageSubtagRegistry.pas',
Keyman.System.BuildISO6393Registry in 'Keyman.System.BuildISO6393Registry.pas',
Keyman.Console.BuildStandardsData in 'Keyman.Console.BuildStandardsData.pas',
Keyman.System.BuildLCIDToBCP47Registry in 'Keyman.System.BuildLCIDToBCP47Registry.pas',
Keyman.System.BuildLangTags in 'Keyman.System.BuildLangTags.pas',
JsonUtil in '..\..\global\delphi\general\JsonUtil.pas';
begin
try
Run;
except
on E: Exception do
begin
Writeln(E.ClassName, ': ', E.Message);
ExitCode := 1;
end;
end;
end.
| 26.37037 | 95 | 0.748596 |
f1a539d714c079e42b8df43756a49eba84897464
| 1,864 |
pas
|
Pascal
|
src/Tasks/Implementations/Deploy/Core/WebServer/Apache/ApacheDebianVHostWriterImpl.pas
|
fanoframework/fano-cli
|
d790f304e54cd855f5887d93bf8b3b5c98da0b22
|
[
"MIT"
] | 10 |
2018-11-10T22:58:49.000Z
|
2022-03-09T23:36:18.000Z
|
src/Tasks/Implementations/Deploy/Core/WebServer/Apache/ApacheDebianVHostWriterImpl.pas
|
zamronypj/fano-cli
|
bf3bc68356302c03c5fde2e98edc4d04567c7101
|
[
"MIT"
] | 8 |
2019-09-24T03:30:27.000Z
|
2021-09-14T02:15:06.000Z
|
src/Tasks/Implementations/Deploy/Core/WebServer/Apache/ApacheDebianVHostWriterImpl.pas
|
zamronypj/fano-cli
|
bf3bc68356302c03c5fde2e98edc4d04567c7101
|
[
"MIT"
] | 2 |
2018-11-05T03:49:45.000Z
|
2020-09-22T02:11:08.000Z
|
(*!------------------------------------------------------------
* Fano CLI Application (https://fanoframework.github.io)
*
* @link https://github.com/fanoframework/fano-cli
* @copyright Copyright (c) 2018 - 2020 Zamrony P. Juhara
* @license https://github.com/fanoframework/fano-cli/blob/master/LICENSE (MIT)
*------------------------------------------------------------- *)
unit ApacheDebianVHostWriterImpl;
interface
{$MODE OBJFPC}
{$H+}
uses
TaskOptionsIntf,
TextFileCreatorIntf,
ContentModifierIntf,
VirtualHostWriterIntf;
type
(*!--------------------------------------
* Task that creates Apache web server virtual host file
* in Debian-based distros
*------------------------------------------
* @author Zamrony P. Juhara <zamronypj@yahoo.com>
*---------------------------------------*)
TApacheDebianVHostWriter = class(TInterfacedObject, IVirtualHostWriter)
private
fTextFileCreator : ITextFileCreator;
public
constructor create(const txtFileCreator : ITextFileCreator);
procedure writeVhost(
const serverName : string;
const vhostTpl : string;
const cntModifier : IContentModifier
);
end;
implementation
uses
SysUtils;
constructor TApacheDebianVHostWriter.create(const txtFileCreator : ITextFileCreator);
begin
fTextFileCreator := txtFileCreator;
end;
procedure TApacheDebianVHostWriter.writeVhost(
const serverName : string;
const vhostTpl : string;
const cntModifier : IContentModifier
);
begin
cntModifier.setVar('[[APACHE_LOG_DIR]]', '/var/log/apache2');
fTextFileCreator.createTextFile(
'/etc/apache2/sites-available/' + serverName + '.conf',
cntModifier.modify(vhostTpl)
);
end;
end.
| 27.820896 | 89 | 0.57779 |
f19fae54b7a00a7d95c5a2350ce48ff6398f5d93
| 308 |
dpr
|
Pascal
|
Chapter04/SunApp/SunAppInCodeAnim/SunAppCodeAnim.dpr
|
PacktPublishing/Expert-Delpi
|
b80f67884cfde32fff4c88cd8bd8dab30bfb8270
|
[
"MIT"
] | 22 |
2017-09-13T23:05:34.000Z
|
2022-01-09T11:36:41.000Z
|
Chapter04/SunApp/SunAppInCodeAnim/SunAppCodeAnim.dpr
|
Nitin-Mane/Expert-Delphi
|
b80f67884cfde32fff4c88cd8bd8dab30bfb8270
|
[
"MIT"
] | null | null | null |
Chapter04/SunApp/SunAppInCodeAnim/SunAppCodeAnim.dpr
|
Nitin-Mane/Expert-Delphi
|
b80f67884cfde32fff4c88cd8bd8dab30bfb8270
|
[
"MIT"
] | 11 |
2017-10-30T17:31:21.000Z
|
2021-08-29T22:39:39.000Z
|
program SunAppCodeAnim;
uses
System.StartUpCopy,
FMX.Forms,
uFormSunCodeAnim in 'uFormSunCodeAnim.pas' {FormSunCodeAnim},
uFmxCanvasHelper in '..\uFmxCanvasHelper.pas';
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TFormSunCodeAnim, FormSunCodeAnim);
Application.Run;
end.
| 19.25 | 63 | 0.772727 |
85579d05f844ec86bc17a9c4d7a0df536cff1a5a
| 11,047 |
pas
|
Pascal
|
ArcIWInteropReg.pas
|
aftabgardan2006/iwelite
|
a68fcc8d423e8837ae2e2cd351b84a98d90df33e
|
[
"MIT"
] | 1 |
2018-01-09T12:32:40.000Z
|
2018-01-09T12:32:40.000Z
|
ArcIWInteropReg.pas
|
aftabgardan2006/iwelite
|
a68fcc8d423e8837ae2e2cd351b84a98d90df33e
|
[
"MIT"
] | null | null | null |
ArcIWInteropReg.pas
|
aftabgardan2006/iwelite
|
a68fcc8d423e8837ae2e2cd351b84a98d90df33e
|
[
"MIT"
] | 2 |
2019-05-13T11:28:16.000Z
|
2020-03-10T17:47:48.000Z
|
////////////////////////////////////////////////////////////////////////////////
//
// The MIT License
//
// Copyright (c) 2008 by Arcana Technologies Incorporated
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
////////////////////////////////////////////////////////////////////////////////
unit ArcIWInteropReg;
interface
uses
Classes, SysUtils,ArcIWEliteResources,
{$IFDEF Linux}{$ELSE}Windows,{$ENDIF}
{$IFDEF Linux}QForms,{$ELSE}Forms,{$ENDIF}
{$IFDEF Linux}QDialogs,{$ELSE}Dialogs,{$ENDIF}
{$IFDEF Linux}QControls,{$ELSE}Controls,{$ENDIF}
InGlobal, IWDsnWizard, ToolsApi;
{$I IntraWebVersion.inc}
type
TArcIWNotifierObject = class(TIWNotifierObject)
private
function GetIsBCB: boolean;
public
property IsBCB : boolean read GetIsBCB;
end;
TArcWebModuleCreator = class(TArcIWNotifierObject, IOTACreator, IOTAModuleCreator)
private
FOwner: IOTAModule;
public
// IOTACreator
function GetCreatorType: string;
function GetExisting: Boolean;
function GetFileSystem: string;
function GetOwner: IOTAModule;
function GetUnnamed: Boolean;
// IOTAModuleCreator
function GetAncestorName: string;
function GetImplFileName: string;
function GetIntfFileName: string;
function GetFormName: string;
function GetMainForm: Boolean;
function GetShowForm: Boolean;
function GetShowSource: Boolean;
function NewFormFile(const FormIdent, AncestorIdent: string): IOTAFile;
function NewImplSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
function NewIntfSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
procedure FormCreated(const FormEditor: IOTAFormEditor);
constructor Create (AOwner : IOTAModule);
end;
TArcWebModuleFile = class(TArcIWNotifierObject, IOTAFile)
public
function GetSource: string;
function GetAge: TDateTime;
end;
TArcWebModuleFileHeader = class(TArcIWNotifierObject, IOTAFile)
public
function GetSource: string;
function GetAge: TDateTime;
end;
TArcWebModuleFormFile = class(TArcIWNotifierObject, IOTAFile)
public
function GetSource: string;
function GetAge: TDateTime;
end;
TArcWebModuleWizard = class(TArcIWNotifierObject, IOTAWizard, IOTAProjectWizard, IOTARepositoryWizard, IUnknown)
public
// IOTAWizard
function GetIDString: string;
function GetName: string;
function GetState: TWizardState;
{ IOTAProjectWizard }
function GetAuthor: string;
function GetComment: string;
function GetPage: string;
function GetGlyph: Cardinal;
procedure Execute;
end;
procedure Register;
var
GIncludeSOAP : boolean;
WizardServ: IOTAWizardServices;
WebModuleWizard: Integer;
implementation
uses ArcIWInteropController, ArcIWInteropRenderer, ArcIWInteropReceiver
{$IFNDEF INTRAWEB120}, ArcIWWebModuleBridge {$ENDIF};
procedure Register;
begin
RegisterComponents( 'IWES NonVisual',
[TArcIWInteropController, TArcIWInteropRenderer,
TArcIWInteropReceiver {$IFNDEF INTRAWEB120}, TArcIWWebModuleBridge {$ENDIF}]);
end;
{ TArcWebModuleWizard }
procedure TArcWebModuleWizard.Execute;
var
Proj : IOTAProject;
ModuleServices : IOTAModuleServices;
sUnit, sClass, sFile : string;
begin
GIncludeSOAP := MessageDlg('Would you like to turn your web module into a SOAP server?',mtConfirmation, [mbYes, mbNo],0) = mrYes;
ModuleServices := (BorlandIDEServices as IOTAModuleServices);
ModuleServices.GetNewModuleAndClassName('ArcIWWebModule', sUnit, sClass, sFile);
Proj := GetCurrentProject;
if Proj <> nil then
begin
ModuleServices.CreateModule(TArcWebModuleCreator.Create(Proj));
{if GIsBCB then // Not sure what this was for???
begin
TIWApplicationWizard.SetupProject(LProj);
end;}
end;
end;
function TArcWebModuleWizard.GetAuthor: string;
begin
Result := 'Arcana Technologies';
end;
function TArcWebModuleWizard.GetComment: string;
begin
Result := 'Add WebModule to your IntraWeb Project';
end;
function TArcWebModuleWizard.GetIDString: string;
begin
Result := 'Arcana.InteropWebModule';
end;
function TArcWebModuleWizard.GetName: string;
begin
Result := 'New WebModule';
end;
function TArcWebModuleWizard.GetPage: string;
begin
Result := 'IntraWeb';
end;
function TArcWebModuleWizard.GetState: TWizardState;
begin
Result := [wsEnabled];
end;
function TArcWebModuleWizard.GetGlyph: Cardinal;
{$IFDEF Linux}
{Var
ResInfo: Cardinal;}
{$ENDIF}
begin
{$IFDEF Linux}
// ResInfo := FindResource(hInstance, 'IW_FORM_XPM', RT_RCDATA);
result := 0; //LoadResource(hInstance, ResInfo);
{$ELSE}
Result := LoadIcon(hInstance, 'IW_FORM_ICON');
{$ENDIF}
end;
{ TArcWebModuleCreator }
constructor TArcWebModuleCreator.Create(AOwner: IOTAModule);
begin
inherited Create;
FOwner := AOWner;
end;
procedure TArcWebModuleCreator.FormCreated(
const FormEditor: IOTAFormEditor);
begin
end;
function TArcWebModuleCreator.GetAncestorName: string;
begin
Result := '';
end;
function TArcWebModuleCreator.GetCreatorType: string;
begin
Result := ToolsAPI.sForm;
end;
function TArcWebModuleCreator.GetExisting: Boolean;
begin
Result := False;
end;
function TArcWebModuleCreator.GetFileSystem: string;
begin
Result := '';
end;
function TArcWebModuleCreator.GetFormName: string;
begin
Result := '';
end;
function TArcWebModuleCreator.GetImplFileName: string;
begin
Result := MakeFileName('WebModuleUnit', InGlobal.iif(IsBCB, 'cpp', 'pas'));
end;
function TArcWebModuleCreator.GetIntfFileName: string;
begin
if IsBCB then begin
Result := MakeFileName('WebModule', 'h');
end else begin
Result := '';
end;
end;
function TArcWebModuleCreator.GetMainForm: Boolean;
begin
Result := False;
end;
function TArcWebModuleCreator.GetOwner: IOTAModule;
begin
Result := FOwner;
end;
function TArcWebModuleCreator.GetShowForm: Boolean;
begin
Result := True;
end;
function TArcWebModuleCreator.GetShowSource: Boolean;
begin
Result := True;
end;
function TArcWebModuleCreator.GetUnnamed: Boolean;
begin
Result := True;
end;
function TArcWebModuleCreator.NewFormFile(const FormIdent,
AncestorIdent: string): IOTAFile;
begin
Result := TArcWebModuleFormFile.Create;
end;
function TArcWebModuleCreator.NewImplSource(const ModuleIdent, FormIdent,
AncestorIdent: string): IOTAFile;
begin
Result := TArcWebModuleFile.Create;
end;
function TArcWebModuleCreator.NewIntfSource(const ModuleIdent, FormIdent,
AncestorIdent: string): IOTAFile;
begin
if IsBCB then begin
Result := TArcWebModuleFileHeader.Create;
end else begin
end;
end;
{ TArcWebModuleFile }
function TArcWebModuleFile.GetAge: TDateTime;
begin
Result := -1;
end;
function TArcWebModuleFile.GetSource: string;
var
LText: string;
LResInstance: THandle;
LHRes: HRSRC;
LFormFile: String;
LPlatform: String;
begin
{$IFDEF Linux}
LFormFile := '*.xfm';
LPlatform := 'clx';
{$ENDIF}
{$IFNDEF Linux}
LFormFile := '*.dfm';
LPlatform := 'vcl';
{$ENDIF}
LResInstance := FindResourceHInstance(HInstance);
{if IsBCB then
LHRes := FindResource(LResInstance, 'ARCIW_WEBMODULE_FILE', RT_RCDATA);
else}
if GIncludeSOAP then
LHRes := FindResource(LResInstance, 'ARCIW_SOAPMODULE_FILE', RT_RCDATA)
else
LHRes := FindResource(LResInstance, 'ARCIW_WEBMODULE_FILE', RT_RCDATA);
LText := PChar(LockResource(LoadResource(LResInstance, LHRes)));
SetLength(LText, SizeOfResource(LResInstance, LHRes));
if IsBCB then begin
Result := Format(LText, [LPlatform, LFormFile]);
end else begin
Result := Format(LText, [LFormFile]);
end;
end;
{ TArcWebModuleFileHeader }
function TArcWebModuleFileHeader.GetAge: TDateTime;
begin
Result := -1;
end;
function TArcWebModuleFileHeader.GetSource: string;
var
LText: string;
LResInstance: THandle;
LHRes: HRSRC;
LPlatform: String;
begin
{$IFDEF Linux}
LPlatform := 'Q';
{$ENDIF}
{$IFNDEF Linux}
LPlatform := '';
{$ENDIF}
LResInstance := FindResourceHInstance(HInstance);
if GIncludeSOAP then
LHRes := FindResource(LResInstance, 'ARCIW_SOAPMODULE_HEADER', RT_RCDATA)
else
LHRes := FindResource(LResInstance, 'ARCIW_WEBMODULE_HEADER', RT_RCDATA);
LText := PChar(LockResource(LoadResource(LResInstance, LHRes)));
SetLength(LText, SizeOfResource(LResInstance, LHRes));
Result := Format(LText, [LPlatform, LPlatform, LPlatform]);
// ShowMessage(result);
end;
{ TArcWebModuleFormFile }
function TArcWebModuleFormFile.GetAge: TDateTime;
begin
Result := -1;
end;
function TArcWebModuleFormFile.GetSource: string;
var
LText: string;
LResInstance: THandle;
LHRes: HRSRC;
begin
LResInstance := FindResourceHInstance(HInstance);
if GIncludeSOAP then
LHRes := FindResource(LResInstance, 'ARCIW_SOAPMODULE_FORM', RT_RCDATA)
else
LHRes := FindResource(LResInstance, 'ARCIW_WEBMODULE_FORM', RT_RCDATA);
LText := PChar(LockResource(LoadResource(LResInstance, LHRes)));
SetLength(LText, SizeOfResource(LResInstance, LHRes));
Result := LText;
end;
{ TArcIWNotifierObject }
function TArcIWNotifierObject.GetIsBCB: boolean;
begin
Result := (AnsiPos('BCB', ExtractFilename(Application.exename)) > 0);
end;
initialization
BorlandIDEServices.QueryInterface(IOTAWizardServices, WizardServ);
if WizardServ <> nil then
WebModuleWizard := WizardServ.AddWizard(TArcWebModuleWizard.Create);
WizardServ := nil;
finalization
// Cleanup Wizard registrations
BorlandIDEServices.QueryInterface(IOTAWizardServices, WizardServ);
if WizardServ <> nil then
WizardServ.RemoveWizard(WebModuleWizard);
end.
| 27.07598 | 132 | 0.713497 |
f136836add62a24709a74d3788af8e7aa00feaba
| 6,557 |
pas
|
Pascal
|
source/CallStackFrame.pas
|
rtapson/DelphiCallStackSave
|
7dc167615b34eaac3d7184f297e12b7d46a6aeee
|
[
"MIT"
] | null | null | null |
source/CallStackFrame.pas
|
rtapson/DelphiCallStackSave
|
7dc167615b34eaac3d7184f297e12b7d46a6aeee
|
[
"MIT"
] | null | null | null |
source/CallStackFrame.pas
|
rtapson/DelphiCallStackSave
|
7dc167615b34eaac3d7184f297e12b7d46a6aeee
|
[
"MIT"
] | 1 |
2019-10-08T12:22:10.000Z
|
2019-10-08T12:22:10.000Z
|
unit CallStackFrame;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes,
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ComCtrls,
System.Generics.Collections,
CallStack;
type
TSelectionChange = procedure(const FileName: string; const LineNumber: Integer) of object;
TOfflineCallStackFrame = class(TFrame)
CallStackListBox: TListBox;
CallStackFilesDropdown: TComboBoxEx;
procedure CallStackFilesDropdownChange(Sender: TObject);
procedure CallStackListBoxDblClick(Sender: TObject);
procedure CallStackListBoxDrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
procedure FrameEnter(Sender: TObject);
private
FOnSelectionChange: TSelectionChange;
FOnFocus: TNotifyEvent;
FOnOptionsChange: TNotifyEvent;
FCallStack: TObjectList<TCallStackFrame>;
procedure AddCallStackFilesToDropdown;
procedure OpenInIDEEditor(const EditorFileName: string; const LineNumber: Integer);
public
{ Public declarations }
procedure LoadCallStackData;
procedure LoadCallStackExecute(Sender: TObject);
procedure RefreshStackFiles(Sender: TObject);
procedure RefreshData;
property OnSelectionChange: TSelectionChange read FOnSelectionChange write FOnSelectionChange;
property OnFocus: TNotifyEvent read FOnFocus write FOnFocus;
property OnOptionsChange: TNotifyEvent read FOnOptionsChange write FOnOptionsChange;
end;
implementation
{$R *.dfm}
uses
System.Types,
System.Json,
System.IOUtils,
ToolsApi,
ApplicationOptions;
{ TOfflineCallStackFrame }
procedure TOfflineCallStackFrame.AddCallStackFilesToDropdown;
var
FileName: string;
begin
CallStackFilesDropdown.Clear;
for FileName in TDirectory.GetFiles(AppOptions.JsonFileSavePath, '*.json') do
begin
CallStackFilesDropdown.Items.Add(FileName);
end;
end;
procedure TOfflineCallStackFrame.CallStackFilesDropdownChange(Sender: TObject);
var
CallStackFrame: TCallStackFrame;
begin
TCallStackReader.ReadCallStack(CallStackFilesDropdown.Text, FCallStack);
CallStackListBox.Clear;
for CallStackFrame in FCallStack do
begin
CallStackListBox.Items.Add(CallStackFrame.Header);
end;
end;
procedure TOfflineCallStackFrame.CallStackListBoxDblClick(Sender: TObject);
var
SelectionIndex: Integer;
begin
SelectionIndex := CallStackListBox.ItemIndex;
if FCallStack[SelectionIndex].FileName <> '' then
OpenInIDEEditor(FCallStack[SelectionIndex].FileName, FCallStack[SelectionIndex].LineNumber );
end;
procedure TOfflineCallStackFrame.CallStackListBoxDrawItem(Control: TWinControl;
Index: Integer; Rect: TRect; State: TOwnerDrawState);
begin
with (Control as TListBox).Canvas do
begin
if FCallStack[Index].FileName = '' then
Font.Color := clRed;
FillRect(Rect);
TextOut(Rect.Left, Rect.Top, (Control as TListBox).Items[Index]);
end;
end;
procedure TOfflineCallStackFrame.FrameEnter(Sender: TObject);
begin
if Assigned(FOnFocus) then OnFocus(Self);
end;
procedure TOfflineCallStackFrame.LoadCallStackData;
begin
if not Assigned(FCallStack) then
FCallStack := TObjectList<TCallStackFrame>.Create;
FCallStack.Clear;
AddCallStackFilesToDropdown;
end;
procedure TOfflineCallStackFrame.LoadCallStackExecute(Sender: TObject);
begin
end;
procedure TOfflineCallStackFrame.OpenInIDEEditor(const EditorFileName: string; const LineNumber: Integer);
var
IServices : IOTAServices;
IActionServices : IOTAActionServices;
IModuleServices : IOTAModuleServices;
IEditorServices : IOTAEditorServices60;
IModule : IOTAModule;
i : Integer;
IEditor : IOTAEditor;
ISourceEditor : IOTASourceEditor;
IFormEditor : IOTAFormEditor;
IComponent : IOTAComponent;
INTAComp : INTAComponent;
AForm : TForm;
IEditView : IOTAEditView;
CursorPos : TOTAEditPos;
FileName : String;
begin
IServices := BorlandIDEServices as IOTAServices;
Assert(Assigned(IServices), 'IOTAServices not available');
IServices.QueryInterface(IOTAACtionServices, IActionServices);
if IActionServices <> Nil then begin
IServices.QueryInterface(IOTAModuleServices, IModuleServices);
Assert(IModuleServices <> Nil);
if IActionServices.OpenFile(EditorFileName) then begin
// At this point, if the named file has an associated .DFM and
// we stopped here, the form designer would be in front of the
// code editor.
IModule := IModuleServices.Modules[0];
// IModule is the one holding our .Pas file and its .Dfm, if any
// So, iterate the IModule's editors until we find the one
// for the .Pas file and then call .Show on it. This will
// bring the code editor in front of the form editor.
ISourceEditor := Nil;
for i := 0 to IModule.ModuleFileCount - 1 do begin
IEditor := IModule.ModuleFileEditors[i];
FileName := IEditor.FileName;
//RWT Memo1.Lines.Add(Format('%d %s', [i, FileName]));
if CompareText(ExtractFileExt(IEditor.FileName), '.Pas') = 0 then begin
if ISourceEditor = Nil then begin
IEditor.QueryInterface(IOTASourceEditor, ISourceEditor);
IEditor.Show;
end
end
else begin
// Maybe the editor is a Form Editor. If it is
// close the form (the counterpart to the .Pas, that is}
IEditor.QueryInterface(IOTAFormEditor, IFormEditor);
if IFormEditor <> Nil then begin
IComponent := IFormEditor.GetRootComponent;
IComponent.QueryInterface(INTAComponent, INTAComp);
AForm := TForm(INTAComp.GetComponent);
//AForm.Close; < this does NOT close the on-screen form
// IActionServices.CloseFile(IEditor.FileName); <- neither does this
SendMessage(AForm.Handle, WM_Close, 0, 0); // But this does !
end;
end;
end;
// Next, place the editor caret where we want it ...
IServices.QueryInterface(IOTAEditorServices, IEditorServices);
Assert(IEditorServices <> Nil);
IEditView := IEditorServices.TopView;
Assert(IEditView <> Nil);
CursorPos.Line := LineNumber;
CursorPos.Col := 0;
IEditView.SetCursorPos(CursorPos);
// and scroll the IEditView to the caret
IEditView.MoveViewToCursor;
end;
end;
end;
procedure TOfflineCallStackFrame.RefreshData;
begin
LoadCallStackData;
end;
procedure TOfflineCallStackFrame.RefreshStackFiles(Sender: TObject);
begin
LoadCallStackData;
end;
end.
| 31.075829 | 106 | 0.736312 |
f13dd1d4b7dd449846e485e2e47118e8a1c52c23
| 1,989 |
pas
|
Pascal
|
Client/fCompanyOffices.pas
|
Sembium/Sembium3
|
0179c38c6a217f71016f18f8a419edd147294b73
|
[
"Apache-2.0"
] | null | null | null |
Client/fCompanyOffices.pas
|
Sembium/Sembium3
|
0179c38c6a217f71016f18f8a419edd147294b73
|
[
"Apache-2.0"
] | null | null | null |
Client/fCompanyOffices.pas
|
Sembium/Sembium3
|
0179c38c6a217f71016f18f8a419edd147294b73
|
[
"Apache-2.0"
] | 3 |
2021-06-30T10:11:17.000Z
|
2021-07-01T09:13:29.000Z
|
unit fCompanyOffices;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
fRightButtonGridForm, ImgList, ParamDataSet, ActnList, Db,
DBClient, AbmesClientDataSet, GridsEh, DBGridEh, AbmesDBGrid, DBCtrls,
ColorNavigator, Buttons, StdCtrls, ExtCtrls, AbmesFields, Menus,
JvButtons, ComCtrls, ToolWin, JvComponent, JvCaptionButton, JvComponentBase,
DBGridEhGrouping;
type
TfmCompanyOffices = class(TRightButtonGridForm)
cdsGridDataCOMPANY_CODE: TAbmesFloatField;
cdsGridDataOFFICE_CODE: TAbmesFloatField;
cdsGridDataOFFICE_NAME: TAbmesWideStringField;
cdsGridDataCOUNTRY_CODE: TAbmesFloatField;
cdsGridDataSTATE: TAbmesWideStringField;
cdsGridDataREGION: TAbmesWideStringField;
cdsGridDataZIP: TAbmesWideStringField;
cdsGridDataCITY: TAbmesWideStringField;
cdsGridDataADDRESS: TAbmesWideStringField;
cdsGridDataI_OFFICE_NAME: TAbmesWideStringField;
cdsGridDataI_STATE: TAbmesWideStringField;
cdsGridDataI_REGION: TAbmesWideStringField;
cdsGridDataI_CITY: TAbmesWideStringField;
cdsGridDataI_ADDRESS: TAbmesWideStringField;
procedure FormCreate(Sender: TObject);
procedure cdsGridDataNewRecord(DataSet: TDataSet);
procedure cdsGridDataAfterPost(DataSet: TDataSet);
private
{ Private declarations }
public
{ Public declarations }
end;
implementation
uses
dMain, fCompanyOffice, uClientUtils;
{$R *.DFM}
procedure TfmCompanyOffices.FormCreate(Sender: TObject);
begin
inherited;
EditFormClass:= TfmCompanyOffice;
end;
procedure TfmCompanyOffices.cdsGridDataNewRecord(DataSet: TDataSet);
begin
inherited;
cdsGridDataCOMPANY_CODE.AsInteger:= cdsGridData.Params.ParamByName('COMPANY_CODE').AsInteger;
end;
procedure TfmCompanyOffices.cdsGridDataAfterPost(DataSet: TDataSet);
begin
inherited;
RefreshDataSet(DataSet);
end;
end.
| 30.136364 | 96 | 0.757667 |
83a40e4f94edb3e994b4397122724e12e8ea8c12
| 951 |
pas
|
Pascal
|
RegistroDeProdutos.pas
|
GabrielSilva2y3d/Crud-Produtos-Delphi
|
826d8026fed456a44112d8e56666aafc3bbac404
|
[
"MIT"
] | null | null | null |
RegistroDeProdutos.pas
|
GabrielSilva2y3d/Crud-Produtos-Delphi
|
826d8026fed456a44112d8e56666aafc3bbac404
|
[
"MIT"
] | null | null | null |
RegistroDeProdutos.pas
|
GabrielSilva2y3d/Crud-Produtos-Delphi
|
826d8026fed456a44112d8e56666aafc3bbac404
|
[
"MIT"
] | null | null | null |
unit RegistroDeProdutos;
interface
uses
System.SysUtils, System.Classes, FireDAC.Stan.Intf, FireDAC.Stan.Option,
FireDAC.Stan.Error, FireDAC.UI.Intf, FireDAC.Phys.Intf, FireDAC.Stan.Def,
FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.Phys.PG,
FireDAC.Phys.PGDef, FireDAC.VCLUI.Wait, FireDAC.Stan.Param, FireDAC.DatS,
FireDAC.DApt.Intf, FireDAC.DApt, Data.DB, FireDAC.Comp.DataSet,
FireDAC.Comp.Client;
type
TDM = class(TDataModule)
PGconnection: TFDConnection;
TBprodutos: TFDTable;
DSprodutos: TDataSource;
TBprodutosid: TIntegerField;
TBprodutosnome: TWideStringField;
TBprodutosdescricao: TWideMemoField;
TBprodutospreco: TFloatField;
TBprodutosestoque: TIntegerField;
TBprodutosfornecedor: TWideStringField;
private
{ Private declarations }
public
{ Public declarations }
end;
var
DM: TDM;
implementation
{%CLASSGROUP 'Vcl.Controls.TControl'}
{$R *.dfm}
end.
| 23.775 | 75 | 0.747634 |
832148e98f190a80e4aaa6e51c3175faa339931a
| 10,100 |
pas
|
Pascal
|
Source/PXL.Devices.DX7.pas
|
svn2github/AsphyrePXL
|
e29f402b27b3133e3971ecd4a7f14dddf81c2e34
|
[
"Apache-2.0"
] | 33 |
2018-03-19T15:54:14.000Z
|
2021-03-09T15:58:05.000Z
|
Source/PXL.Devices.DX7.pas
|
svn2github/AsphyrePXL
|
e29f402b27b3133e3971ecd4a7f14dddf81c2e34
|
[
"Apache-2.0"
] | 2 |
2019-01-13T23:05:21.000Z
|
2019-02-03T08:06:13.000Z
|
Source/PXL.Devices.DX7.pas
|
svn2github/AsphyrePXL
|
e29f402b27b3133e3971ecd4a7f14dddf81c2e34
|
[
"Apache-2.0"
] | 2 |
2019-01-21T08:52:17.000Z
|
2020-08-30T15:16:58.000Z
|
unit PXL.Devices.DX7;
(*
* This file is part of Asphyre Framework, also known as Platform eXtended Library (PXL).
* Copyright (c) 2015 - 2017 Yuriy Kotsarenko. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*)
interface
{$INCLUDE PXL.Config.inc}
uses
PXL.Windows.DDraw, PXL.Types, PXL.Devices, PXL.SwapChains, PXL.Types.DX7, PXL.SwapChains.DX7;
// Remove the dot to enable multi-threading mode.
{.$DEFINE DX7_MULTITHREADED}
type
TDX7Device = class(TCustomSwapChainDevice)
private
FContext: TDX7DeviceContext;
FContextWriter: TDX7DeviceContextWriter;
FDXSwapChains: TDX7SwapChains;
FPrimarySurface: IDirectDrawSurface7;
FLostState: Boolean;
FCurrentSwapChain: Integer;
function CreateDirectDraw: Boolean;
procedure DestroyDirectDraw;
function CreateDirect3D: Boolean;
procedure DestroyDirect3D;
function SetCooperativeLevel: Boolean;
function CreatePrimarySurface: Boolean;
procedure DestroyPrimarySurface;
function CreateDevice: Boolean;
procedure DestroyDevice;
procedure MoveIntoLostState;
function MoveIntoRecoveredState: Boolean;
protected
function GetDeviceContext: TCustomDeviceContext; override;
function InitDevice: Boolean; override;
procedure DoneDevice; override;
function ResizeSwapChain(const SwapChainIndex: Integer; const NewSwapChainInfo: PSwapChainInfo): Boolean; override;
function MayRender(const SwapChainIndex: Integer): Boolean; override;
public
constructor Create(const AProvider: TCustomDeviceProvider);
destructor Destroy; override;
function Clear(const ClearTypes: TClearTypes; const ColorValue: TIntColor; const DepthValue: Single = 1.0;
const StencilValue: Cardinal = 0): Boolean; override;
function BeginScene(const SwapChainIndex: Integer = 0): Boolean; override;
function EndScene: Boolean; override;
property DXSwapChains: TDX7SwapChains read FDXSwapChains;
property PrimarySurface: IDirectDrawSurface7 read FPrimarySurface;
end;
implementation
uses
Windows, SysUtils, PXL.Windows.D3D7;
constructor TDX7Device.Create(const AProvider: TCustomDeviceProvider);
begin
inherited;
FContext := TDX7DeviceContext.Create(Self, FContextWriter);
FDXSwapChains := TDX7SwapChains.Create(FContext);
FTechnology := TDeviceTechnology.Direct3D;
FTechVersion := $700;
FCurrentSwapChain := -1;
end;
destructor TDX7Device.Destroy;
begin
inherited;
FDXSwapChains.Free;
FContextWriter.Free;
FContext.Free;
end;
function TDX7Device.GetDeviceContext: TCustomDeviceContext;
begin
Result := FContext;
end;
function TDX7Device.CreateDirectDraw: Boolean;
var
LocalObject: IDirectDraw7;
begin
if Failed(DirectDrawCreateEx(nil, LocalObject, IID_IDirectDraw7, nil)) then
Exit(False);
FContextWriter.DD7Object := LocalObject;
Result := True;
end;
procedure TDX7Device.DestroyDirectDraw;
begin
FContextWriter.DD7Object := nil;
end;
function TDX7Device.CreateDirect3D: Boolean;
var
LocalObject: IDirect3D7;
begin
if not Supports(FContext.DD7Object, IID_IDirect3D7, LocalObject) then
Exit(False);
FContextWriter.D3D7Object := LocalObject;
Result := True;
end;
procedure TDX7Device.DestroyDirect3D;
begin
FContextWriter.D3D7Object := nil;
end;
function TDX7Device.SetCooperativeLevel: Boolean;
var
Flags: Cardinal;
begin
if FContext.DD7Object = nil then
Exit(False);
Flags := DDSCL_NORMAL or DDSCL_NOWINDOWCHANGES or DDSCL_FPUPRESERVE;
{$IFDEF DX7_MULTITHREADED}
Flags := Flags or DDSCL_MULTITHREADED;
{$ENDIF}
Result := Succeeded(FContext.DD7Object.SetCooperativeLevel(0, Flags));
end;
function TDX7Device.CreatePrimarySurface: Boolean;
var
Desc: DDSURFACEDESC2;
begin
if FContext.DD7Object = nil then
Exit(False);
FillChar(Desc, SizeOf(DDSURFACEDESC2), 0);
Desc.dwSize := SizeOf(DDSURFACEDESC2);
Desc.dwFlags := DDSD_CAPS;
Desc.ddsCaps.dwCaps := DDSCAPS_PRIMARYSURFACE;
Result := Succeeded(FContext.DD7Object.CreateSurface(Desc, FPrimarySurface, nil));
end;
procedure TDX7Device.DestroyPrimarySurface;
begin
FPrimarySurface := nil;
end;
function TDX7Device.CreateDevice: Boolean;
var
SwapChain: TDX7SwapChain;
LocalObject: IDirect3DDevice7;
begin
if FContext.D3D7Object = nil then
Exit(False);
SwapChain := FDXSwapChains[0];
if SwapChain = nil then
Exit(False);
if Failed(FContext.D3D7Object.CreateDevice(IID_IDirect3DTnLHalDevice, SwapChain.Surface, LocalObject)) then
begin // Hardware T&L not available, try software T&L.
if Failed(FContext.D3D7Object.CreateDevice(IID_IDirect3DHALDevice, SwapChain.Surface, LocalObject)) then
Exit(False);
end;
FContextWriter.D3D7Device := LocalObject;
Result := True;
end;
procedure TDX7Device.DestroyDevice;
begin
FContextWriter.D3D7Device := nil;
end;
function TDX7Device.InitDevice: Boolean;
var
SwapChainInfo: PSwapChainInfo;
begin
if not LinkDDraw then
Exit(False);
SwapChainInfo := SwapChains[0];
if SwapChainInfo = nil then
Exit(False);
if not CreateDirectDraw then
Exit(False);
if not CreateDirect3D then
begin
DestroyDirectDraw;
Exit(False);
end;
if not SetCooperativeLevel then
begin
DestroyDirect3D;
DestroyDirectDraw;
Exit(False);
end;
if not CreatePrimarySurface then
begin
DestroyDirect3D;
DestroyDirectDraw;
Exit(False);
end;
if not FDXSwapChains.Recreate(SwapChains) then
begin
DestroyPrimarySurface;
DestroyDirect3D;
DestroyDirectDraw;
Exit(False);
end;
if not CreateDevice then
begin
FDXSwapChains.Clear;
DestroyPrimarySurface;
DestroyDirect3D;
DestroyDirectDraw;
Exit(False);
end;
FLostState := False;
Result := True;
end;
procedure TDX7Device.DoneDevice;
begin
FDXSwapChains.Clear;
DestroyDevice;
DestroyPrimarySurface;
DestroyDirect3D;
DestroyDirectDraw;
end;
procedure TDX7Device.MoveIntoLostState;
begin
if not FLostState then
begin
OnRelease.Notify(Self);
FDXSwapChains.Clear;
FLostState := True;
end;
end;
function TDX7Device.MoveIntoRecoveredState: Boolean;
begin
if Failed(FPrimarySurface.Restore) then
Exit(False);
if not FDXSwapChains.Recreate(SwapChains) then
Exit(False);
FLostState := False;
OnRestore.Notify(Self);
Result := True;
end;
function TDX7Device.ResizeSwapChain(const SwapChainIndex: Integer; const NewSwapChainInfo: PSwapChainInfo): Boolean;
var
SwapChainInfo: PSwapChainInfo;
SwapChain: TDX7SwapChain;
begin
SwapChainInfo := SwapChains[SwapChainIndex];
if SwapChainInfo = nil then
Exit(False);
SwapChain := FDXSwapChains[SwapChainIndex];
if SwapChain = nil then
Exit(False);
SwapChainInfo.Width := NewSwapChainInfo.Width;
SwapChainInfo.Height := NewSwapChainInfo.Height;
SwapChain.Finalize;
Result := SwapChain.Initialize(SwapChainInfo);
end;
function TDX7Device.MayRender(const SwapChainIndex: Integer): Boolean;
var
Res: HResult;
IsLostState, IsRecoverable: Boolean;
begin
if FContext.DD7Object = nil then
Exit(False);
Res := FContext.DD7Object.TestCooperativeLevel;
IsLostState := Failed(Res);
IsRecoverable := (FLostState and (not IsLostState)) or (Res = DDERR_WRONGMODE);
// Transition from normal to lost state.
if IsLostState and (not FLostState) then
begin
MoveIntoLostState;
Exit(False);
end;
// Transition from lost to recovered state.
if FLostState and (not IsLostState) then
Exit(MoveIntoRecoveredState);
// Lost state but may be potentially recoverable (maybe later on?)
if IsLostState and IsRecoverable then
begin
MoveIntoLostState;
MoveIntoRecoveredState;
Exit(False);
end;
Result := not IsLostState;
end;
function TDX7Device.Clear(const ClearTypes: TClearTypes; const ColorValue: TIntColor; const DepthValue: Single;
const StencilValue: Cardinal): Boolean;
begin
if (FContext.D3D7Device = nil) or (ClearTypes = []) or (TClearType.Depth in ClearTypes) or
(TClearType.Stencil in ClearTypes) then
Exit(False);
Result := Succeeded(FContext.D3D7Device.Clear(0, nil, D3DCLEAR_TARGET, ColorValue, DepthValue, StencilValue));
end;
function TDX7Device.BeginScene(const SwapChainIndex: Integer): Boolean;
var
SwapChain: TDX7SwapChain;
begin
if FContext.D3D7Device = nil then
Exit(False);
SwapChain := FDXSwapChains[SwapChainIndex];
if SwapChain = nil then
Exit(False);
if not SwapChain.SetRenderBuffers then
Exit(False);
if not SwapChain.SetDefaultViewport then
begin
SwapChain.RestoreRenderBuffers;
Exit(False);
end;
if Failed(FContext.D3D7Device.BeginScene) then
begin
SwapChain.RestoreRenderBuffers;
Exit(False);
end;
FCurrentSwapChain := SwapChainIndex;
Result := True;
end;
function TDX7Device.EndScene: Boolean;
var
SwapChain: TDX7SwapChain;
begin
if (FContext.D3D7Device = nil) or (FCurrentSwapChain = -1) then
Exit(False);
if Failed(FContext.D3D7Device.EndScene) then
Exit(False);
SwapChain := FDXSwapChains[FCurrentSwapChain];
if SwapChain = nil then
Exit(False);
if not SwapChain.RestoreRenderBuffers then
Exit(False);
Result := SwapChain.Present(FPrimarySurface);
end;
end.
| 24.938272 | 120 | 0.723267 |
8561d8f7c5a7502bd68e8ef6c6938a32da197b4d
| 1,918 |
pas
|
Pascal
|
screen/0030.pas
|
nickelsworth/swag
|
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
|
[
"BSD-2-Clause"
] | 11 |
2015-12-12T05:13:15.000Z
|
2020-10-14T13:32:08.000Z
|
screen/0030.pas
|
nickelsworth/swag
|
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
|
[
"BSD-2-Clause"
] | null | null | null |
screen/0030.pas
|
nickelsworth/swag
|
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
|
[
"BSD-2-Clause"
] | 8 |
2017-05-05T05:24:01.000Z
|
2021-07-03T20:30:09.000Z
|
{
LOU DUCHEZ
> When I open the window, I want to give it a shadow, in C what you
>would do is switch the 2nd bit of each character.
Shadowing here. You'll need "Crt" for this to work:
}
procedure atshadow(x1, y1, x2, y2 : byte);
{ Makes a "shadow" to the right of and below a screen region, by setting the
foreground there to low intensity and the background to black. }
type
videolocation = record
videodata : char;
videoattribute : byte;
end;
var
xbegin, xend,
ybegin, yend,
xcnt, ycnt : byte;
videosegment : word;
monosystem : boolean;
vidptr : ^videolocation;
begin
{ Determine location of video memory. }
monosystem := (lastmode in [0, 2, 7]);
if monosystem then
videosegment := $b000
else
videosegment := $b800;
{ Determine the x coordinates where the shadowing begins and ends on the
lower edge. (Basically two spaces to the right of the box.) }
xbegin := x1 + 2;
xend := x2 + 2;
{ Determine the y coordinates where the shadowing begins and ends on the
right. (Basically one row below the box.) }
ybegin := y1 + 1;
yend := y2 + 1;
ycnt := ybegin;
while (ycnt <= yend) and (ycnt <= 25) do
begin
{ This loop goes through each row, putting in the shadows on the right and
bottom. First thing to check on each pass: if we're not below the region
to shadow, shade only to the right. Otherwise, start at the left. }
if ycnt > y2 then
xcnt := xbegin
else
xcnt := x2 + 1;
vidptr := ptr(videosegment, 2 * (80 * (ycnt - 1) + (xcnt - 1)));
while (xcnt <= xend) and (xcnt <= 80) do
begin
{ This loop does the appropriate shadowing for this row. }
vidptr^.videoattribute := vidptr^.videoattribute and $07; { SHADOW! }
xcnt := xcnt + 1;
inc(vidptr);
end;
ycnt := ycnt + 1;
end;
end;
| 29.060606 | 78 | 0.616788 |
83438c3c59dac29b7aaf2239d82b66f6ed116cdb
| 1,832 |
pas
|
Pascal
|
Samples/High Level/02 Context Popup/FMain.pas
|
FDE-LC2L/RibbonFramework
|
4769c64e17b56cc794a5263a63ac260d733ac665
|
[
"BSD-3-Clause"
] | 42 |
2020-06-18T05:41:11.000Z
|
2022-03-15T13:26:23.000Z
|
Samples/High Level/02 Context Popup/FMain.pas
|
FDE-LC2L/RibbonFramework
|
4769c64e17b56cc794a5263a63ac260d733ac665
|
[
"BSD-3-Clause"
] | 14 |
2018-12-12T10:06:24.000Z
|
2020-02-06T16:05:43.000Z
|
Samples/High Level/02 Context Popup/FMain.pas
|
FDE-LC2L/RibbonFramework
|
4769c64e17b56cc794a5263a63ac260d733ac665
|
[
"BSD-3-Clause"
] | 16 |
2020-05-29T12:01:06.000Z
|
2022-02-13T07:53:17.000Z
|
unit FMain;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, UIRibbonCommands, UIRibbon, Vcl.ExtCtrls;
type
TFormMain = class(TForm)
Ribbon: TUIRibbon;
procedure FormContextPopup(Sender: TObject; MousePos: TPoint;
var Handled: Boolean);
procedure RibbonLoaded(Sender: TObject);
private
{ Private declarations }
FCurrentContext: Integer;
FCommandContexts: array [0..3] of TUICommandBoolean;
private
procedure ContextToggle(const Args: TUICommandBooleanEventArgs);
end;
var
FormMain: TFormMain;
implementation
{$R *.dfm}
uses
ContextPopupUI;
{ TFormMain }
procedure TFormMain.ContextToggle(const Args: TUICommandBooleanEventArgs);
var
I: Integer;
begin
FCurrentContext := Args.Command.Tag;
{ Make the Command button appear checked, and the other ones not. }
for I := 0 to 3 do
FCommandContexts[I].Checked := (FCommandContexts[I] = Args.Command);
end;
procedure TFormMain.FormContextPopup(Sender: TObject; MousePos: TPoint;
var Handled: Boolean);
var
P: TPoint;
begin
P := ClientToScreen(MousePos);
Ribbon.ShowContextPopup(FCurrentContext, P);
end;
procedure TFormMain.RibbonLoaded(Sender: TObject);
const
CONTEXTS: array [0..3] of Integer = (
IDC_CMD_CONTEXT1, IDC_CMD_CONTEXT2, IDC_CMD_CONTEXT3, IDC_CMD_CONTEXT4);
TAGS: array [0..3] of Integer = (
IDC_CMD_CONTEXTMAP1, IDC_CMD_CONTEXTMAP2, IDC_CMD_CONTEXTMAP3, IDC_CMD_CONTEXTMAP4);
var
I: Integer;
begin
inherited;
FCurrentContext := IDC_CMD_CONTEXTMAP1;
for I := 0 to 3 do
begin
FCommandContexts[I] := Ribbon[CONTEXTS[I]] as TUICommandBoolean;
FCommandContexts[I].Tag := TAGS[I];
FCommandContexts[I].OnToggle := ContextToggle;
end;
{ Check the first button }
FCommandContexts[0].Checked := True;
end;
end.
| 23.487179 | 88 | 0.734716 |
f15d1b41025d9fb029c721374785b11c312a479d
| 30,388 |
pas
|
Pascal
|
Jx3Full/Source/Source/Tools/LuaWorkshop/synedit/Source/SynEditHighlighter.pas
|
RivenZoo/FullSource
|
cfd7fd7ad422fd2dae5d657a18839c91ff9521fd
|
[
"MIT"
] | 2 |
2021-07-31T15:35:01.000Z
|
2022-02-28T05:54:54.000Z
|
Jx3Full/Source/Source/Tools/LuaWorkshop/synedit/Source/SynEditHighlighter.pas
|
RivenZoo/FullSource
|
cfd7fd7ad422fd2dae5d657a18839c91ff9521fd
|
[
"MIT"
] | null | null | null |
Jx3Full/Source/Source/Tools/LuaWorkshop/synedit/Source/SynEditHighlighter.pas
|
RivenZoo/FullSource
|
cfd7fd7ad422fd2dae5d657a18839c91ff9521fd
|
[
"MIT"
] | 5 |
2021-02-03T10:25:39.000Z
|
2022-02-23T07:08:37.000Z
|
{-------------------------------------------------------------------------------
The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
the specific language governing rights and limitations under the License.
The Original Code is: SynEditHighlighter.pas, released 2000-04-07.
The Original Code is based on mwHighlighter.pas by Martin Waldenburg, part of
the mwEdit component suite.
Portions created by Martin Waldenburg are Copyright (C) 1998 Martin Waldenburg.
All Rights Reserved.
Contributors to the SynEdit and mwEdit projects are listed in the
Contributors.txt file.
$Id: SynEditHighlighter.pas,v 1.1 2005/06/20 03:13:15 zhujianqiu Exp $
You may retrieve the latest version of this file at the SynEdit home page,
located at http://SynEdit.SourceForge.net
Known Issues:
-------------------------------------------------------------------------------}
{$IFNDEF QSYNEDITHIGHLIGHTER}
unit SynEditHighlighter;
{$ENDIF}
{$I SynEdit.inc}
interface
uses
{$IFDEF SYN_CLX}
kTextDrawer,
Types,
QGraphics,
QSynEditTypes,
QSynEditMiscClasses,
{$ELSE}
Graphics,
Windows,
Registry,
IniFiles,
SynEditTypes,
SynEditMiscClasses,
{$ENDIF}
SysUtils,
Classes;
{$IFNDEF SYN_CLX}
type
TBetterRegistry = SynEditMiscClasses.TBetterRegistry;
{$ENDIF}
type
TSynHighlighterAttributes = class(TPersistent)
private
fBackground: TColor;
fBackgroundDefault: TColor;
fForeground: TColor;
fForegroundDefault: TColor;
fName: string;
fStyle: TFontStyles;
fStyleDefault: TFontStyles;
fOnChange: TNotifyEvent;
procedure Changed; virtual;
function GetBackgroundColorStored: boolean;
function GetForegroundColorStored: boolean;
function GetFontStyleStored: boolean;
procedure SetBackground(Value: TColor);
procedure SetForeground(Value: TColor);
procedure SetStyle(Value: TFontStyles);
function GetStyleFromInt: integer;
procedure SetStyleFromInt(const Value: integer);
public
procedure Assign(Source: TPersistent); override;
procedure AssignColorAndStyle(Source: TSynHighlighterAttributes);
constructor Create(attribName: string);
procedure InternalSaveDefaultValues;
{$IFNDEF SYN_CLX}
function LoadFromBorlandRegistry(rootKey: HKEY; attrKey, attrName: string;
oldStyle: boolean): boolean; virtual;
function LoadFromRegistry(Reg: TBetterRegistry): boolean;
function SaveToRegistry(Reg: TBetterRegistry): boolean;
function LoadFromFile(Ini : TIniFile): boolean; //DDH 10/16/01
function SaveToFile(Ini : TIniFile): boolean; //DDH 10/16/01
{$ENDIF}
public
property IntegerStyle: integer read GetStyleFromInt write SetStyleFromInt;
property Name: string read fName;
property OnChange: TNotifyEvent read fOnChange write fOnChange;
published
property Background: TColor read fBackground write SetBackground
stored GetBackgroundColorStored;
property Foreground: TColor read fForeground write SetForeground
stored GetForegroundColorStored;
property Style: TFontStyles read fStyle write SetStyle
stored GetFontStyleStored;
end;
TSynHighlighterCapability = (
hcUserSettings, // supports Enum/UseUserSettings
hcRegistry // supports LoadFrom/SaveToRegistry
);
TSynHighlighterCapabilities = set of TSynHighlighterCapability;
const
SYN_ATTR_COMMENT = 0;
SYN_ATTR_IDENTIFIER = 1;
SYN_ATTR_KEYWORD = 2;
SYN_ATTR_STRING = 3;
SYN_ATTR_WHITESPACE = 4;
SYN_ATTR_SYMBOL = 5; //mh 2001-09-13
type
TSynCustomHighlighter = class(TComponent)
private
fAttributes: TStringList;
fAttrChangeHooks: TSynNotifyEventChain;
fUpdateCount: integer; //mh 2001-09-13
fEnabled: Boolean;
fWordBreakChars: TSynIdentChars;
procedure SetEnabled(const Value: boolean); //DDH 2001-10-23
protected
fDefaultFilter: string;
fUpdateChange: boolean; //mh 2001-09-13
procedure Loaded; override;
procedure AddAttribute(AAttrib: TSynHighlighterAttributes);
procedure DefHighlightChange(Sender: TObject);
procedure FreeHighlighterAttributes; //mh 2001-09-13
function GetAttribCount: integer; virtual;
function GetAttribute(idx: integer): TSynHighlighterAttributes; virtual;
function GetDefaultAttribute(Index: integer): TSynHighlighterAttributes;
virtual; abstract;
function GetDefaultFilter: string; virtual;
function GetIdentChars: TSynIdentChars; virtual;
function GetSampleSource: string; virtual;
function IsFilterStored: boolean; virtual;
procedure SetAttributesOnChange(AEvent: TNotifyEvent);
procedure SetDefaultFilter(Value: string); virtual;
procedure SetSampleSource(Value: string); virtual;
procedure SetWordBreakChars(AChars: TSynIdentChars); virtual;
protected
function GetCapabilitiesProp: TSynHighlighterCapabilities;
function GetLanguageNameProp: string;
public
class function GetCapabilities: TSynHighlighterCapabilities; virtual;
class function GetLanguageName: string; virtual;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Assign(Source: TPersistent); override;
{begin} //mh 2001-09-13
procedure BeginUpdate;
procedure EndUpdate;
{end} //mh 2001-09-13
function GetEol: Boolean; virtual; abstract;
function GetRange: Pointer; virtual;
function GetToken: String; virtual; abstract;
function GetTokenAttribute: TSynHighlighterAttributes; virtual; abstract;
function GetTokenKind: integer; virtual; abstract;
function GetTokenPos: Integer; virtual; abstract;
function IsKeyword(const AKeyword: string): boolean; virtual; // DJLP 2000-08-09
procedure Next; virtual; abstract;
procedure NextToEol;
procedure SetLine(NewValue: String; LineNumber:Integer); virtual; abstract;
procedure SetRange(Value: Pointer); virtual;
procedure ResetRange; virtual;
function UseUserSettings(settingIndex: integer): boolean; virtual;
procedure EnumUserSettings(Settings: TStrings); virtual;
{$IFNDEF SYN_CLX}
function LoadFromRegistry(RootKey: HKEY; Key: string): boolean; virtual;
function SaveToRegistry(RootKey: HKEY; Key: string): boolean; virtual;
function LoadFromFile(AFileName: String): boolean; //DDH 10/16/01
function SaveToFile(AFileName: String): boolean; //DDH 10/16/01
{$ENDIF}
procedure HookAttrChangeEvent(ANotifyEvent: TNotifyEvent);
procedure UnhookAttrChangeEvent(ANotifyEvent: TNotifyEvent);
property IdentChars: TSynIdentChars read GetIdentChars;
property WordBreakChars: TSynIdentChars read fWordBreakChars write SetWordBreakChars;
property LanguageName: string read GetLanguageNameProp;
public
property AttrCount: integer read GetAttribCount;
property Attribute[idx: integer]: TSynHighlighterAttributes
read GetAttribute;
property Capabilities: TSynHighlighterCapabilities read GetCapabilitiesProp;
property SampleSource: string read GetSampleSource write SetSampleSource;
property CommentAttribute: TSynHighlighterAttributes
index SYN_ATTR_COMMENT read GetDefaultAttribute;
property IdentifierAttribute: TSynHighlighterAttributes
index SYN_ATTR_IDENTIFIER read GetDefaultAttribute;
property KeywordAttribute: TSynHighlighterAttributes
index SYN_ATTR_KEYWORD read GetDefaultAttribute;
property StringAttribute: TSynHighlighterAttributes
index SYN_ATTR_STRING read GetDefaultAttribute;
property SymbolAttribute: TSynHighlighterAttributes
index SYN_ATTR_SYMBOL read GetDefaultAttribute;
property WhitespaceAttribute: TSynHighlighterAttributes
index SYN_ATTR_WHITESPACE read GetDefaultAttribute;
published
property DefaultFilter: string read GetDefaultFilter write SetDefaultFilter
stored IsFilterStored;
property Enabled: boolean read fEnabled write SetEnabled default TRUE;
end;
TSynCustomHighlighterClass = class of TSynCustomHighlighter;
{$IFNDEF SYN_CPPB_1}
TSynHighlighterList = class(TList)
private
hlList: TList;
function GetItem(idx: integer): TSynCustomHighlighterClass;
public
constructor Create;
destructor Destroy; override;
function Count: integer;
function FindByName(name: string): integer;
function FindByClass(comp: TComponent): integer;
property Items[idx: integer]: TSynCustomHighlighterClass
read GetItem; default;
end;
procedure RegisterPlaceableHighlighter(highlighter:
TSynCustomHighlighterClass);
function GetPlaceableHighlighters: TSynHighlighterList;
{$ENDIF}
implementation
{$IFNDEF SYN_CPPB_1}
{ THighlighterList }
function TSynHighlighterList.Count: integer;
begin
Result := hlList.Count;
end;
constructor TSynHighlighterList.Create;
begin
inherited Create;
hlList := TList.Create;
end;
destructor TSynHighlighterList.Destroy;
begin
hlList.Free;
inherited;
end;
function TSynHighlighterList.FindByClass(comp: TComponent): integer;
var
i: integer;
begin
Result := -1;
for i := 0 to Count-1 do begin
if comp is Items[i] then begin
Result := i;
Exit;
end;
end; //for
end;
function TSynHighlighterList.FindByName(name: string): integer;
var
i: integer;
begin
Result := -1;
for i := 0 to Count-1 do begin
if Items[i].GetLanguageName = name then begin
Result := i;
Exit;
end;
end; //for
end;
function TSynHighlighterList.GetItem(idx: integer): TSynCustomHighlighterClass;
begin
Result := TSynCustomHighlighterClass(hlList[idx]);
end;
var
G_PlaceableHighlighters: TSynHighlighterList;
function GetPlaceableHighlighters: TSynHighlighterList;
begin
Result := G_PlaceableHighlighters;
end;
procedure RegisterPlaceableHighlighter(highlighter: TSynCustomHighlighterClass);
begin
if G_PlaceableHighlighters.hlList.IndexOf(highlighter) < 0 then
G_PlaceableHighlighters.hlList.Add(highlighter);
end;
{$ENDIF}
{ TSynHighlighterAttributes }
procedure TSynHighlighterAttributes.Assign(Source: TPersistent);
begin
if Source is TSynHighlighterAttributes then begin
fName := TSynHighlighterAttributes(Source).fName;
AssignColorAndStyle( TSynHighlighterAttributes(Source) );
end else
inherited Assign(Source);
end;
procedure TSynHighlighterAttributes.AssignColorAndStyle(Source: TSynHighlighterAttributes);
var
bChanged: boolean;
begin
bChanged := FALSE;
if fBackground <> Source.fBackground then begin
fBackground := Source.fBackground;
bChanged := TRUE;
end;
if fForeground <> Source.fForeground then begin
fForeground := Source.fForeground;
bChanged := TRUE;
end;
if fStyle <> Source.fStyle then begin
fStyle := Source.fStyle;
bChanged := TRUE;
end;
if bChanged then
Changed;
end;
procedure TSynHighlighterAttributes.Changed;
begin
if Assigned(fOnChange) then
fOnChange(Self);
end;
constructor TSynHighlighterAttributes.Create(attribName: string);
begin
inherited Create;
Background := clNone;
Foreground := clNone;
fName := attribName;
end;
function TSynHighlighterAttributes.GetBackgroundColorStored: boolean;
begin
Result := fBackground <> fBackgroundDefault;
end;
function TSynHighlighterAttributes.GetForegroundColorStored: boolean;
begin
Result := fForeground <> fForegroundDefault;
end;
function TSynHighlighterAttributes.GetFontStyleStored: boolean;
begin
Result := fStyle <> fStyleDefault;
end;
procedure TSynHighlighterAttributes.InternalSaveDefaultValues;
begin
fForegroundDefault := fForeground;
fBackgroundDefault := fBackground;
fStyleDefault := fStyle;
end;
{$IFNDEF SYN_CLX}
function TSynHighlighterAttributes.LoadFromBorlandRegistry(rootKey: HKEY;
attrKey, attrName: string; oldStyle: boolean): boolean;
// How the highlighting information is stored:
// Delphi 1.0:
// I don't know and I don't care.
// Delphi 2.0 & 3.0:
// In the registry branch HKCU\Software\Borland\Delphi\x.0\Highlight
// where x=2 or x=3.
// Each entry is one string value, encoded as
// <foreground RGB>,<background RGB>,<font style>,<default fg>,<default Background>,<fg index>,<Background index>
// Example:
// 0,16777215,BI,0,1,0,15
// foreground color (RGB): 0
// background color (RGB): 16777215 ($FFFFFF)
// font style: BI (bold italic), possible flags: B(old), I(talic), U(nderline)
// default foreground: no, specified color will be used (black (0) is used when this flag is 1)
// default background: yes, white ($FFFFFF, 15) will be used for background
// foreground index: 0 (foreground index (Pal16), corresponds to foreground RGB color)
// background index: 15 (background index (Pal16), corresponds to background RGB color)
// Delphi 4.0 & 5.0:
// In the registry branch HKCU\Software\Borland\Delphi\4.0\Editor\Highlight.
// Each entry is subkey containing several values:
// Foreground Color: foreground index (Pal16), 0..15 (dword)
// Background Color: background index (Pal16), 0..15 (dword)
// Bold: fsBold yes/no, 0/True (string)
// Italic: fsItalic yes/no, 0/True (string)
// Underline: fsUnderline yes/no, 0/True (string)
// Default Foreground: use default foreground (clBlack) yes/no, False/-1 (string)
// Default Background: use default backround (clWhite) yes/no, False/-1 (string)
const
Pal16: array [0..15] of TColor = (clBlack, clMaroon, clGreen, clOlive,
clNavy, clPurple, clTeal, clLtGray, clDkGray, clRed, clLime,
clYellow, clBlue, clFuchsia, clAqua, clWhite);
function LoadOldStyle(rootKey: HKEY; attrKey, attrName: string): boolean;
var
descript : string;
fgColRGB : string;
bgColRGB : string;
fontStyle: string;
fgDefault: string;
bgDefault: string;
fgIndex16: string;
bgIndex16: string;
reg : TBetterRegistry;
function Get(var name: string): string;
var
p: integer;
begin
p := Pos(',',name);
if p = 0 then p := Length(name)+1;
Result := Copy(name,1,p-1);
name := Copy(name,p+1,Length(name)-p);
end; { Get }
begin { LoadOldStyle }
Result := false;
try
reg := TBetterRegistry.Create;
reg.RootKey := rootKey;
try
with reg do begin
if OpenKeyReadOnly(attrKey) then begin
try
if ValueExists(attrName) then begin
descript := ReadString(attrName);
fgColRGB := Get(descript);
bgColRGB := Get(descript);
fontStyle := Get(descript);
fgDefault := Get(descript);
bgDefault := Get(descript);
fgIndex16 := Get(descript);
bgIndex16 := Get(descript);
if bgDefault = '1'
then Background := clWindow
else Background := Pal16[StrToInt(bgIndex16)];
if fgDefault = '1'
then Foreground := clWindowText
else Foreground := Pal16[StrToInt(fgIndex16)];
Style := [];
if Pos('B',fontStyle) > 0 then Style := Style + [fsBold];
if Pos('I',fontStyle) > 0 then Style := Style + [fsItalic];
if Pos('U',fontStyle) > 0 then Style := Style + [fsUnderline];
Result := true;
end;
finally CloseKey; end;
end; // if
end; // with
finally reg.Free; end;
except end;
end; { LoadOldStyle }
function LoadNewStyle(rootKey: HKEY; attrKey, attrName: string): boolean;
var
fgColor : integer;
bgColor : integer;
fontBold : string;
fontItalic : string;
fontUnderline: string;
fgDefault : string;
bgDefault : string;
reg : TBetterRegistry;
function IsTrue(value: string): boolean;
begin
Result := not ((UpperCase(value) = 'FALSE') or (value = '0'));
end; { IsTrue }
begin
Result := false;
try
reg := TBetterRegistry.Create;
reg.RootKey := rootKey;
try
with reg do begin
if OpenKeyReadOnly(attrKey+'\'+attrName) then begin
try
if ValueExists('Foreground Color')
then fgColor := Pal16[ReadInteger('Foreground Color')]
else if ValueExists('Foreground Color New') then
fgColor := StringToColor( ReadString('Foreground Color New') )
else
Exit;
if ValueExists('Background Color')
then bgColor := Pal16[ReadInteger('Background Color')]
else if ValueExists('Background Color New') then
bgColor := StringToColor( ReadString('Background Color New') )
else
Exit;
if ValueExists('Bold')
then fontBold := ReadString('Bold')
else Exit;
if ValueExists('Italic')
then fontItalic := ReadString('Italic')
else Exit;
if ValueExists('Underline')
then fontUnderline := ReadString('Underline')
else Exit;
if ValueExists('Default Foreground')
then fgDefault := ReadString('Default Foreground')
else Exit;
if ValueExists('Default Background')
then bgDefault := ReadString('Default Background')
else Exit;
if IsTrue(bgDefault)
then Background := clWindow
else Background := bgColor;
if IsTrue(fgDefault)
then Foreground := clWindowText
else Foreground := fgColor;
Style := [];
if IsTrue(fontBold) then Style := Style + [fsBold];
if IsTrue(fontItalic) then Style := Style + [fsItalic];
if IsTrue(fontUnderline) then Style := Style + [fsUnderline];
Result := true;
finally CloseKey; end;
end; // if
end; // with
finally reg.Free; end;
except end;
end; { LoadNewStyle }
begin
if oldStyle then Result := LoadOldStyle(rootKey, attrKey, attrName)
else Result := LoadNewStyle(rootKey, attrKey, attrName);
end; { TSynHighlighterAttributes.LoadFromBorlandRegistry }
{$ENDIF}
procedure TSynHighlighterAttributes.SetBackground(Value: TColor);
begin
if fBackGround <> Value then begin
fBackGround := Value;
Changed;
end;
end;
procedure TSynHighlighterAttributes.SetForeground(Value: TColor);
begin
if fForeGround <> Value then begin
fForeGround := Value;
Changed;
end;
end;
procedure TSynHighlighterAttributes.SetStyle(Value: TFontStyles);
begin
if fStyle <> Value then begin
fStyle := Value;
Changed;
end;
end;
{$IFNDEF SYN_CLX}
function TSynHighlighterAttributes.LoadFromRegistry(Reg: TBetterRegistry): boolean;
var
key: string;
begin
key := Reg.CurrentPath;
if Reg.OpenKeyReadOnly(Name) then begin
if Reg.ValueExists('Background') then
Background := Reg.ReadInteger('Background');
if Reg.ValueExists('Foreground') then
Foreground := Reg.ReadInteger('Foreground');
if Reg.ValueExists('Style') then
IntegerStyle := Reg.ReadInteger('Style');
reg.OpenKeyReadOnly('\' + key);
Result := true;
end else
Result := false;
end;
function TSynHighlighterAttributes.SaveToRegistry(Reg: TBetterRegistry): boolean;
var
key: string;
begin
key := Reg.CurrentPath;
if Reg.OpenKey(Name,true) then begin
Reg.WriteInteger('Background', Background);
Reg.WriteInteger('Foreground', Foreground);
Reg.WriteInteger('Style', IntegerStyle);
reg.OpenKey('\' + key, false);
Result := true;
end else
Result := false;
end;
function TSynHighlighterAttributes.LoadFromFile(Ini : TIniFile): boolean;
var
S: TStringList;
begin
S := TStringList.Create;
try
Ini.ReadSection(Name, S);
if S.Count > 0 then
begin
if S.IndexOf('Background') <> -1 then
Background := Ini.ReadInteger(Name, 'Background', Background);
if S.IndexOf('Foreground') <> -1 then
Foreground := Ini.ReadInteger(Name, 'Foreground', Foreground);
if S.IndexOf('Style') <> -1 then
IntegerStyle := Ini.ReadInteger(Name, 'Style', IntegerStyle);
Result := true;
end else Result := false;
finally
S.Free;
end;
end;
function TSynHighlighterAttributes.SaveToFile(Ini : TIniFile): boolean;
begin
Ini.WriteInteger(Name, 'Background', Background);
Ini.WriteInteger(Name, 'Foreground', Foreground);
Ini.WriteInteger(Name, 'Style', IntegerStyle);
Result := true;
end;
{$ENDIF}
function TSynHighlighterAttributes.GetStyleFromInt: integer;
begin
if fsBold in Style then Result:= 1 else Result:= 0;
if fsItalic in Style then Result:= Result + 2;
if fsUnderline in Style then Result:= Result + 4;
if fsStrikeout in Style then Result:= Result + 8;
end;
procedure TSynHighlighterAttributes.SetStyleFromInt(const Value: integer);
begin
if Value and $1 = 0 then Style:= [] else Style:= [fsBold];
if Value and $2 <> 0 then Style:= Style + [fsItalic];
if Value and $4 <> 0 then Style:= Style + [fsUnderline];
if Value and $8 <> 0 then Style:= Style + [fsStrikeout];
end;
{ TSynCustomHighlighter }
constructor TSynCustomHighlighter.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
fWordBreakChars := TSynWordBreakChars;
fAttributes := TStringList.Create;
fAttributes.Duplicates := dupError;
fAttributes.Sorted := TRUE;
fAttrChangeHooks := TSynNotifyEventChain.CreateEx(Self);
fDefaultFilter := '';
fEnabled := True;
end;
destructor TSynCustomHighlighter.Destroy;
begin
inherited Destroy;
FreeHighlighterAttributes;
fAttributes.Free;
fAttrChangeHooks.Free;
end;
procedure TSynCustomHighlighter.BeginUpdate;
begin
Inc(fUpdateCount);
end;
procedure TSynCustomHighlighter.EndUpdate;
begin
if fUpdateCount > 0 then begin
Dec(fUpdateCount);
if (fUpdateCount = 0) and fUpdateChange then begin
fUpdateChange := FALSE;
DefHighlightChange( nil );
end;
end;
end;
procedure TSynCustomHighlighter.FreeHighlighterAttributes;
var
i: integer;
begin
if fAttributes <> nil then begin
for i := fAttributes.Count - 1 downto 0 do
TSynHighlighterAttributes(fAttributes.Objects[i]).Free;
fAttributes.Clear;
end;
end;
procedure TSynCustomHighlighter.Assign(Source: TPersistent);
var
Src: TSynCustomHighlighter;
i, j: integer;
AttriName: string;
SrcAttri: TSynHighlighterAttributes;
begin
if (Source <> nil) and (Source is TSynCustomHighlighter) then begin
Src := TSynCustomHighlighter(Source);
for i := 0 to AttrCount - 1 do begin
// assign first attribute with the same name
AttriName := Attribute[i].Name;
for j := 0 to Src.AttrCount - 1 do begin
SrcAttri := Src.Attribute[j];
if AttriName = SrcAttri.Name then begin
Attribute[i].Assign(SrcAttri);
break;
end;
end;
end;
// assign the sample source text only if same or descendant class
if Src is ClassType then
SampleSource := Src.SampleSource;
fWordBreakChars := Src.WordBreakChars;
DefaultFilter := Src.DefaultFilter;
Enabled := Src.Enabled;
end else
inherited Assign(Source);
end;
procedure TSynCustomHighlighter.EnumUserSettings(Settings: TStrings);
begin
Settings.Clear;
end;
function TSynCustomHighlighter.UseUserSettings(settingIndex: integer): boolean;
begin
Result := false;
end;
{$IFNDEF SYN_CLX}
function TSynCustomHighlighter.LoadFromRegistry(RootKey: HKEY;
Key: string): boolean;
var
r: TBetterRegistry;
i: integer;
begin
r := TBetterRegistry.Create;
try
r.RootKey := RootKey;
if r.OpenKeyReadOnly(Key) then begin
Result := true;
for i := 0 to AttrCount-1 do
Result := Attribute[i].LoadFromRegistry(r) and Result;
end
else Result := false;
finally r.Free; end;
end;
function TSynCustomHighlighter.SaveToRegistry(RootKey: HKEY;
Key: string): boolean;
var
r: TBetterRegistry;
i: integer;
begin
r := TBetterRegistry.Create;
try
r.RootKey := RootKey;
if r.OpenKey(Key,true) then begin
Result := true;
for i := 0 to AttrCount-1 do
Result := Attribute[i].SaveToRegistry(r) and Result;
end
else Result := false;
finally r.Free; end;
end;
function TSynCustomHighlighter.LoadFromFile(AFileName : String): boolean;
var AIni : TIniFile;
i : Integer;
begin
AIni := TIniFile.Create(AFileName);
try
with AIni do
begin
Result := true;
for i := 0 to AttrCount-1 do
Result := Attribute[i].LoadFromFile(AIni) and Result;
end;
finally
AIni.Free;
end;
end;
function TSynCustomHighlighter.SaveToFile(AFileName : String): boolean;
var AIni : TIniFile;
i: integer;
begin
AIni := TIniFile.Create(AFileName);
try
with AIni do
begin
Result := true;
for i := 0 to AttrCount-1 do
Result := Attribute[i].SaveToFile(AIni) and Result;
end;
finally
AIni.Free;
end;
end;
{$ENDIF}
procedure TSynCustomHighlighter.AddAttribute(AAttrib: TSynHighlighterAttributes);
begin
fAttributes.AddObject(AAttrib.Name, AAttrib);
end;
procedure TSynCustomHighlighter.DefHighlightChange(Sender: TObject);
begin
if fUpdateCount > 0 then
fUpdateChange := TRUE
else if not( csLoading in ComponentState ) then
begin
fAttrChangeHooks.Sender := Sender;
fAttrChangeHooks.Fire;
end;
end;
function TSynCustomHighlighter.GetAttribCount: integer;
begin
Result := fAttributes.Count;
end;
function TSynCustomHighlighter.GetAttribute(idx: integer):
TSynHighlighterAttributes;
begin
Result := nil;
if (idx >= 0) and (idx < fAttributes.Count) then
Result := TSynHighlighterAttributes(fAttributes.Objects[idx]);
end;
class function TSynCustomHighlighter.GetCapabilities: TSynHighlighterCapabilities;
begin
Result := [hcRegistry]; //registry save/load supported by default
end;
function TSynCustomHighlighter.GetCapabilitiesProp: TSynHighlighterCapabilities;
begin
Result := GetCapabilities;
end;
function TSynCustomHighlighter.GetDefaultFilter: string;
begin
Result := fDefaultFilter;
end;
function TSynCustomHighlighter.GetIdentChars: TSynIdentChars;
begin
Result := [#33..#255];
end;
procedure TSynCustomHighlighter.SetWordBreakChars(AChars: TSynIdentChars);
begin
fWordBreakChars := AChars;
end;
class function TSynCustomHighlighter.GetLanguageName: string;
begin
{$IFDEF SYN_DEVELOPMENT_CHECKS}
raise Exception.CreateFmt('%s.GetLanguageName not implemented', [ClassName]);
{$ENDIF}
Result := '<Unknown>';
end;
function TSynCustomHighlighter.GetLanguageNameProp: string;
begin
Result := GetLanguageName;
end;
function TSynCustomHighlighter.GetRange: pointer;
begin
Result := nil;
end;
function TSynCustomHighlighter.GetSampleSource: string;
begin
Result := '';
end;
procedure TSynCustomHighlighter.HookAttrChangeEvent(ANotifyEvent: TNotifyEvent);
begin
fAttrChangeHooks.Add(ANotifyEvent);
end;
function TSynCustomHighlighter.IsFilterStored: boolean;
begin
Result := TRUE;
end;
function TSynCustomHighlighter.IsKeyword(const AKeyword: string): boolean;
begin
Result := FALSE;
end;
procedure TSynCustomHighlighter.NextToEol;
begin
while not GetEol do Next;
end;
procedure TSynCustomHighlighter.ResetRange;
begin
end;
procedure TSynCustomHighlighter.SetAttributesOnChange(AEvent: TNotifyEvent);
var
i: integer;
Attri: TSynHighlighterAttributes;
begin
for i := fAttributes.Count - 1 downto 0 do begin
Attri := TSynHighlighterAttributes(fAttributes.Objects[i]);
if Attri <> nil then begin
Attri.OnChange := AEvent;
Attri.InternalSaveDefaultValues;
end;
end;
end;
procedure TSynCustomHighlighter.SetRange(Value: Pointer);
begin
end;
procedure TSynCustomHighlighter.SetDefaultFilter(Value: string);
begin
fDefaultFilter := Value;
end;
procedure TSynCustomHighlighter.SetSampleSource(Value: string);
begin
end;
procedure TSynCustomHighlighter.UnhookAttrChangeEvent(ANotifyEvent: TNotifyEvent);
begin
fAttrChangeHooks.Remove(ANotifyEvent);
end;
procedure TSynCustomHighlighter.SetEnabled(const Value: boolean);
begin
if fEnabled <> Value then
begin
fEnabled := Value;
DefHighlightChange( nil );
end;
end;
procedure TSynCustomHighlighter.Loaded;
begin
inherited;
DefHighlightChange( nil );
end;
{$IFNDEF SYN_CPPB_1}
initialization
G_PlaceableHighlighters := TSynHighlighterList.Create;
finalization
G_PlaceableHighlighters.Free;
G_PlaceableHighlighters := nil;
{$ENDIF}
end.
| 31.457557 | 122 | 0.669146 |
cd39bd0b708fdcdca2e090f415d426920fb33a70
| 9,469 |
pas
|
Pascal
|
codigos/implicita/backup/mainform.pas
|
ausabino/SIN5014
|
265ce35c6a40d019ea5fe728217bcf5fc527999a
|
[
"MIT"
] | null | null | null |
codigos/implicita/backup/mainform.pas
|
ausabino/SIN5014
|
265ce35c6a40d019ea5fe728217bcf5fc527999a
|
[
"MIT"
] | null | null | null |
codigos/implicita/backup/mainform.pas
|
ausabino/SIN5014
|
265ce35c6a40d019ea5fe728217bcf5fc527999a
|
[
"MIT"
] | null | null | null |
{ Copyright (C) 2004 Mattias Gaertner
Example for loading and saving jpeg images.
Important:
This example uses the JPEGForLazarusPackage (see in the directory above).
You must first open once this package so that the IDE knows, where to find
the lpk file.
See the README.txt.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place - Suite 330, Boston, MA 02111-1307, USA.
}
unit MainForm;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
ExtCtrls, Buttons, ExtDlgs,Math;
type
{ TJPEGExampleForm }
TJPEGExampleForm = class(TForm)
Button1: TButton;
Button2: TButton;
save: TButton;
OpenPictureDialog1: TOpenPictureDialog;
ImageGroupBox: TGroupBox;
Image1: TImage;
save1: TButton;
SavePictureDialog1: TSavePictureDialog;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure LoadJPEGButtonClick(Sender: TObject);
procedure LoadImageButtonClick(Sender: TObject);
procedure saveClick(Sender: TObject);
procedure SaveJPEGButtonClick(Sender: TObject);
procedure SaveImageButtonClick(Sender: TObject);
private
procedure UpdateInfo(const Filename: string);
end;
var
JPEGExampleForm: TJPEGExampleForm;
implementation
{ TJPEGExampleForm }
procedure plotaEixos;
var w,h,xstep,ystep,i:integer;
begin
h := JPEGExampleForm.Image1.Height;
w:= JPEGExampleForm.Image1.Width;
xstep := w div 10;
ystep := h div 10;
JPEGExampleForm.Image1.Canvas.Line(w div 2,0,w div 2,h);
JPEGExampleForm.Image1.Canvas.Line(0,h div 2,w ,h div 2);
JPEGExampleForm.Image1.Canvas.TextOut(w div 2 +3,h div 2 +3,'0');
for i:=1 to 4 do
begin
JPEGExampleForm.Image1.Canvas.Line(w div 2 -5 ,(h div 2) -i*ystep,w div 2+5, (h div 2) -i*ystep);
JPEGExampleForm.Image1.Canvas.TextOut(w div 2 +4,(h div 2) -i*ystep +1,inttostr(i));
JPEGExampleForm.Image1.Canvas.Line(w div 2 -5 ,(h div 2) +i*ystep,w div 2+5, (h div 2) +i*ystep);
JPEGExampleForm.Image1.Canvas.TextOut(w div 2 +4,(h div 2) +i*ystep +1,inttostr(-i));
JPEGExampleForm.Image1.Canvas.Line((w div 2) -i*xstep ,h div 2 -5,(w div 2) -i*xstep, h div 2 +5);
JPEGExampleForm.Image1.Canvas.TextOut((w div 2) -i*xstep +4,h div 2 +1,inttostr(-i));
JPEGExampleForm.Image1.Canvas.Line((w div 2) +i*xstep ,h div 2 -5,(w div 2) +i*xstep, h div 2 +5);
JPEGExampleForm.Image1.Canvas.TextOut((w div 2) +i*xstep +4,h div 2 +1,inttostr(i));
end;
end;
function f(x,y:real):real ;
begin
f:= x*x+y*y-4;
//f:= x*x-y*y-4;
//f:=ln(1+x*x+y*y)+sin(x+y)-1;
end;
function xToInteger(x:real):integer;
var w,xstep:integer;
begin
w:= JPEGExampleForm.Image1.Width;
xstep := w div 10;
xToInteger := w div 2 +round(x*xstep);
end;
function yToInteger(y:real):integer;
var h,ystep,aux:integer;
begin
h:= JPEGExampleForm.Image1.Height;
ystep := h div 10;
aux:=round(y*ystep);
yToInteger := h-(h div 2 +aux);
end;
procedure plotCruveImp;
var
begin
end;
procedure plotCruveExp;
var t,pi,step,x,y,xnext,ynext,r:real;
begin
pi:= 3.14159;
t:=0.0;
step:=0.1;
r:=2.0;
JPEGExampleForm.Image1.Canvas.Pen.Color:=RGBToColor(255,0,0);
while (t<(2*pi)) do
begin
x:=r*cos(t);
y:=r*sin(t);
xnext:=r*cos(t+step);
ynext:=r*sin(t+step);
JPEGExampleForm.Image1.Canvas.Line(xToInteger(x),yToInteger(y),xToInteger(xnext),yToInteger(ynext));
t:=t+step;
end;
end;
procedure TJPEGExampleForm.LoadJPEGButtonClick(Sender: TObject);
var
JPEG: TJPEGImage;
begin
OpenPictureDialog1.Options:=OpenPictureDialog1.Options+[ofFileMustExist];
if not OpenPictureDialog1.Execute then exit;
try
//--------------------------------------------------------------------------
// Create a TJPEGImage and load the file, then copy it to the TImage.
// A TJPEGImage can only load jpeg images.
JPEG:=TJPEGImage.Create;
try
JPEG.LoadFromFile(OpenPictureDialog1.Filename);
// copy jpeg content to a TImage
Image1.Picture.Assign(JPEG);
finally
JPEG.Free;
end;
//--------------------------------------------------------------------------
UpdateInfo(OpenPictureDialog1.Filename);
except
on E: Exception do begin
MessageDlg('Error','Error: '+E.Message,mtError,[mbOk],0);
end;
end;
end;
procedure TJPEGExampleForm.Button1Click(Sender: TObject);
begin
Image1.Canvas.Brush.Color:=RGBToColor(255,255,255); // this will not create a new brush handle
Image1.Canvas.FillRect(1,1,Image1.Width,Image1.Height); // this will create the brush handle with the currently active theme brush for hint windows
Image1.Canvas.Pen.Color:=RGBToColor(0,0,0);
plotaEixos;
plotCruveImp;
end;
procedure TJPEGExampleForm.Button2Click(Sender: TObject);
begin
Image1.Canvas.Brush.Color:=RGBToColor(255,255,255); // this will not create a new brush handle
Image1.Canvas.FillRect(1,1,Image1.Width,Image1.Height); // this will create the brush handle with the currently active theme brush for hint windows
plotaEixos;
plotCruveExp;
end;
procedure TJPEGExampleForm.FormCreate(Sender: TObject);
begin
end;
procedure TJPEGExampleForm.LoadImageButtonClick(Sender: TObject);
begin
OpenPictureDialog1.Options:=OpenPictureDialog1.Options+[ofFileMustExist];
if not OpenPictureDialog1.Execute then exit;
try
//--------------------------------------------------------------------------
// Loading directly into a TImage. This will load any registered image
// format. .bmp, .xpm, .png are the standard LCL formats.
// The jpeg units register .jpeg and .jpg.
Image1.Picture.LoadFromFile(OpenPictureDialog1.Filename);
//--------------------------------------------------------------------------
UpdateInfo(OpenPictureDialog1.Filename);
except
on E: Exception do begin
MessageDlg('Error','Error: '+E.Message,mtError,[mbOk],0);
end;
end;
end;
procedure TJPEGExampleForm.saveClick(Sender: TObject);
begin
Application.Terminate;
end;
procedure TJPEGExampleForm.SaveJPEGButtonClick(Sender: TObject);
var
JPEG: TJPEGImage;
begin
if Image1.Picture.Graphic=nil then begin
MessageDlg('No image','Please open an image, before save',mtError,
[mbOk],0);
exit;
end;
SavePictureDialog1.Options:=SavePictureDialog1.Options+[ofPathMustExist];
if not SavePictureDialog1.Execute then exit;
try
//--------------------------------------------------------------------------
// Create a TImage1 and copy the TImage into it. Then save to file.
// This will ignore the file extension. TImage1 will always save as jpeg.
JPEG:=TJPEGImage.Create;
try
// copy content of the TImage to jpeg
JPEG.Assign(Image1.Picture.Graphic);
// save to file
JPEG.SaveToFile(SavePictureDialog1.Filename);
finally
JPEG.Free;
end;
//--------------------------------------------------------------------------
UpdateInfo(SavePictureDialog1.Filename);
except
on E: Exception do begin
MessageDlg('Error','Error: '+E.Message,mtError,[mbOk],0);
end;
end;
end;
procedure TJPEGExampleForm.SaveImageButtonClick(Sender: TObject);
begin
if Image1.Picture.Graphic=nil then begin
MessageDlg('No image','Please open an image, before save',mtError,
[mbOk],0);
exit;
end;
SavePictureDialog1.Options:=SavePictureDialog1.Options+[ofPathMustExist];
if not SavePictureDialog1.Execute then exit;
try
//--------------------------------------------------------------------------
// Saving directly from a TImage to a file. This will save in any registered
// image format. .bmp, .xpm, .png are the standard LCL formats.
// The jpeg units register .jpeg and .jpg.
// So, saving as file1.jpg will save as jpeg, while saving a file1.bmp will
// save as bmp.
Image1.Picture.SaveToFile(SavePictureDialog1.Filename);
//--------------------------------------------------------------------------
UpdateInfo(SavePictureDialog1.Filename);
except
on E: Exception do begin
MessageDlg('Error','Error: '+E.Message,mtError,[mbOk],0);
end;
end;
end;
procedure TJPEGExampleForm.UpdateInfo(const Filename: string);
var
Info: String;
begin
if Image1.Picture.Graphic<>nil then begin
Info:=Image1.Picture.Graphic.ClassName+':'+Filename;
end else begin
Info:=Filename;
end;
ImageGroupBox.Caption:=Info;
end;
initialization
{$I mainform.lrs}
end.
| 31.458472 | 151 | 0.639983 |
83e634883cbdf2c0429f940530ecc3938ab78669
| 1,694 |
pas
|
Pascal
|
HODLER_Multiplatform_Win_And_iOS_Linux/additionalUnits/CryptoLib/src/Interfaces/ClpIAsymmetricCipherKeyPair.pas
|
devilking6105/HODLER-Open-Source-Multi-Asset-Wallet
|
2554bce0ad3e3e08e4617787acf93176243ce758
|
[
"Unlicense"
] | 148 |
2018-02-08T23:36:43.000Z
|
2022-03-16T01:33:20.000Z
|
HODLER_Multiplatform_Win_And_iOS_Linux/additionalUnits/CryptoLib/src/Interfaces/ClpIAsymmetricCipherKeyPair.pas
|
Ecoent/HODLER-Open-Source-Multi-Asset-Wallet
|
a8c54ecfc569d0ee959b6f0e7826c4ee4b5c4848
|
[
"Unlicense"
] | 85 |
2018-10-23T17:09:20.000Z
|
2022-01-12T07:12:54.000Z
|
HODLER_Multiplatform_Win_And_iOS_Linux/additionalUnits/CryptoLib/src/Interfaces/ClpIAsymmetricCipherKeyPair.pas
|
Ecoent/HODLER-Open-Source-Multi-Asset-Wallet
|
a8c54ecfc569d0ee959b6f0e7826c4ee4b5c4848
|
[
"Unlicense"
] | 46 |
2018-03-18T17:25:59.000Z
|
2022-02-07T16:52:15.000Z
|
{ *********************************************************************************** }
{ * CryptoLib Library * }
{ * Copyright (c) 2018 - 20XX Ugochukwu Mmaduekwe * }
{ * Github Repository <https://github.com/Xor-el> * }
{ * Distributed under the MIT software license, see the accompanying file LICENSE * }
{ * or visit http://www.opensource.org/licenses/mit-license.php. * }
{ * Acknowledgements: * }
{ * * }
{ * Thanks to Sphere 10 Software (http://www.sphere10.com/) for sponsoring * }
{ * development of this library * }
{ * ******************************************************************************* * }
(* &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& *)
unit ClpIAsymmetricCipherKeyPair;
{$I ..\Include\CryptoLib.inc}
interface
uses
ClpIAsymmetricKeyParameter;
type
IAsymmetricCipherKeyPair = interface(IInterface)
['{66AD23CF-CE95-49C3-B9F0-83153174E9D7}']
function GetPrivate: IAsymmetricKeyParameter;
function GetPublic: IAsymmetricKeyParameter;
/// <summary>
/// return the public key parameters.
/// </summary>
property &Public: IAsymmetricKeyParameter read GetPublic;
/// <summary>
/// return the private key parameters.
/// </summary>
property &Private: IAsymmetricKeyParameter read GetPrivate;
end;
implementation
end.
| 34.571429 | 87 | 0.44451 |
6afd4ac4f04d8cbb1e6554fde9767db595d79149
| 24,456 |
pas
|
Pascal
|
src/u_libmaneditor.pas
|
DarthSnow/dide2
|
8d91dbf87fe3e513cbac09bd803b53b33676d41a
|
[
"BSL-1.0"
] | null | null | null |
src/u_libmaneditor.pas
|
DarthSnow/dide2
|
8d91dbf87fe3e513cbac09bd803b53b33676d41a
|
[
"BSL-1.0"
] | null | null | null |
src/u_libmaneditor.pas
|
DarthSnow/dide2
|
8d91dbf87fe3e513cbac09bd803b53b33676d41a
|
[
"BSL-1.0"
] | null | null | null |
unit u_libmaneditor;
{$I u_defines.inc}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
Menus, ComCtrls, Buttons, LazFileUtils, StdCtrls, fpjson,
u_widget, u_interfaces, u_ceproject, u_dmdwrap, u_common, u_dialogs,
u_sharedres, process, u_dubproject, u_observer, u_libman,
u_projutils, u_dsgncontrols, u_controls;
type
TDubPackageQueryForm = class(TForm)
private
class var fList: TJSONData;
class var fGetLatestTag: boolean;
cbb: TComboBox;
function getPackageName: string;
function getPackageVersion: string;
procedure getList(sender: TObject);
procedure fillList;
procedure btnTagCLick(sender: TObject);
procedure updateHint(sender: TObject);
public
class function showAndWait(out pName, pVersion: string): TModalResult; static;
class destructor classDtor;
constructor Create(TheOwner: TComponent); override;
property packageName: string read getPackageName;
property packageVersion: string read getPackageVersion;
end;
TLibManEditorWidget = class(TDexedWidget, IProjectObserver)
btnAddLib: TDexedToolButton;
btnDubFetch: TDexedToolButton;
btnEditAlias: TDexedToolButton;
btnEnabled: TDexedToolButton;
btnMoveDown: TDexedToolButton;
btnMoveUp: TDexedToolButton;
btnOpenProj: TDexedToolButton;
btnReg: TDexedToolButton;
btnRemLib: TDexedToolButton;
btnSelFile: TDexedToolButton;
btnSelfoldOfFiles: TDexedToolButton;
btnSelProj: TDexedToolButton;
btnSelRoot: TDexedToolButton;
List: TListView;
procedure btnAddLibClick(Sender: TObject);
procedure btnEnabledClick(Sender: TObject);
procedure btnDubFetchClick(Sender: TObject);
procedure btnEditAliasClick(Sender: TObject);
procedure btnOpenProjClick(Sender: TObject);
procedure btnRegClick(Sender: TObject);
procedure btnRemLibClick(Sender: TObject);
procedure btnSelFileClick(Sender: TObject);
procedure btnSelfoldOfFilesClick(Sender: TObject);
procedure btnSelProjClick(Sender: TObject);
procedure btnSelRootClick(Sender: TObject);
procedure btnMoveUpClick(Sender: TObject);
procedure btnMoveDownClick(Sender: TObject);
procedure ListEdited(Sender: TObject; Item: TListItem; var value: string);
procedure ListSelectItem(Sender: TObject; Item: TListItem; Selected: Boolean);
private
fProj: ICommonProject;
fFreeProj: ICommonProject;
fLibman: TLibraryManager;
procedure updateButtonsState;
procedure projNew(project: ICommonProject);
procedure projChanged(project: ICommonProject);
procedure projClosing(project: ICommonProject);
procedure projFocused(project: ICommonProject);
procedure projCompiling(project: ICommonProject);
procedure projCompiled(project: ICommonProject; success: boolean);
function itemForRow(row: TListItem): TLibraryItem;
procedure RowToLibrary(row: TListItem; added: boolean = false);
procedure dataToGrid;
function isAliasRegistered(const anAlias: string): boolean;
protected
procedure DoShow; override;
public
constructor Create(aOwner: TComponent); override;
end;
implementation
{$R *.lfm}
uses
u_simpleget;
const
notav: string = '< n/a >';
enableStr: array [boolean] of string = ('false','true');
function YesOrNoAddProjSourceFolder: TModalResult;
begin
result :=
dlgYesNo('The registered project is not a library '+
'however it is possible to make its sources accessible for unittesting and executing runnable modules. ' +
'If you click `YES` this will be done, otherwise the new entry will only be used for the completions.');
end;
constructor TLibManEditorWidget.Create(aOwner: TComponent);
begin
inherited;
TListViewCopyMenu.create(List);
fLibman := LibMan;
end;
procedure TLibManEditorWidget.updateButtonsState;
var
i: TIconScaledSize;
begin
btnReg.Enabled := fProj.isAssigned and fProj.Filename.fileExists;
btnOpenProj.Enabled := List.Selected.isAssigned and
List.Selected.SubItems[2].fileExists;
i := GetIconScaledSize;
if List.Selected.isAssigned and itemForRow(List.Selected).isAssigned and
itemForRow(List.Selected).enabled then
begin
case i of
iss16: btnEnabled.resourceName := 'BOOK';
iss24: btnEnabled.resourceName := 'BOOK24';
iss32: btnEnabled.resourceName := 'BOOK32';
end;
end
else
begin
case i of
iss16: btnEnabled.resourceName := 'BOOK_GREY';
iss24: btnEnabled.resourceName := 'BOOK_GREY24';
iss32: btnEnabled.resourceName := 'BOOK_GREY32';
end;
end;
end;
function TLibManEditorWidget.isAliasRegistered(const anAlias: string): boolean;
var
i: TListItem = nil;
begin
result := list.Items.findCaption(anAlias, i);
end;
procedure TLibManEditorWidget.projNew(project: ICommonProject);
begin
fProj := project;
if not project.inGroup then
fFreeProj := project;
end;
procedure TLibManEditorWidget.projChanged(project: ICommonProject);
begin
if fProj.isNotAssigned then
exit;
if fProj <> project then
exit;
updateButtonsState;
end;
procedure TLibManEditorWidget.projClosing(project: ICommonProject);
begin
if fProj = project then
fProj := nil;
if project = fFreeProj then
fFreeProj := nil;
updateButtonsState;
end;
procedure TLibManEditorWidget.projFocused(project: ICommonProject);
begin
fProj := project;
if not project.inGroup then
fFreeProj := project
else if project = fFreeProj then
fFreeProj := nil;
updateButtonsState;
end;
procedure TLibManEditorWidget.projCompiling(project: ICommonProject);
begin
end;
procedure TLibManEditorWidget.projCompiled(project: ICommonProject; success: boolean);
begin
end;
function TLibManEditorWidget.itemForRow(row: TListItem): TLibraryItem;
begin
result := TLibraryItem(row.Data);
end;
procedure TLibManEditorWidget.ListEdited(Sender: TObject; Item: TListItem; var value: string);
begin
if Item.isAssigned then
RowToLibrary(item);
end;
procedure TLibManEditorWidget.ListSelectItem(Sender: TObject;
Item: TListItem; Selected: Boolean);
begin
updateButtonsState;
end;
procedure TLibManEditorWidget.btnAddLibClick(Sender: TObject);
var
itm: TListItem;
begin
itm := List.Items.Add;
itm.Data := fLibman.libraries.Add;
itm.Caption := notav;
itm.SubItems.Add(notav);
itm.SubItems.Add(notav);
itm.SubItems.Add(notav);
itm.SubItems.Add(enableStr[true]);
SetFocus;
itm.Selected := True;
end;
class destructor TDubPackageQueryForm.classDtor;
begin
fList.Free;
end;
constructor TDubPackageQueryForm.Create(TheOwner: TComponent);
var
bok: TBitBtn;
bno: TBitBtn;
bww: TBitBtn;
bsv: TSpeedButton;
ics: TIconScaledSize;
begin
inherited;
ics := GetIconScaledSize;
width := ScaleX(400,96);
height := ScaleY(40,96);
BorderStyle:= bsToolWindow;
caption := 'Select or type the DUB package name';
Position:= poMainFormCenter;
cbb := TComboBox.Create(self);
cbb.Parent := self;
cbb.AutoComplete := true;
cbb.Align := alClient;
cbb.BorderSpacing.Around := 6;
cbb.Sorted:= true;
cbb.ShowHint:=true;
cbb.OnSelect:= @updateHint;
cbb.OnCloseUp:=@updateHint;
cbb.AutoSize:=true;
bsv := TSpeedButton.Create(self);
bsv.Parent := self;
bsv.Align := alRight;
bsv.AutoSize:= true;
bsv.BorderSpacing.Around := 4;
bsv.ShowHint := true;
bsv.Hint := 'get latest tag, by default get master';
bsv.OnClick:= @btnTagCLick;
bsv.AllowAllUp := true;
bsv.GroupIndex := 1;
bsv.Layout:= blGlyphTop;
bsv.Spacing:= 2;
bsv.Down:=fGetLatestTag;
case ics of
iss16: AssignPng(bsv, 'TAG_PURPLE');
iss24: AssignPng(bsv, 'TAG_PURPLE24');
iss32: AssignPng(bsv, 'TAG_PURPLE32');
end;
bww := TBitBtn.Create(self);
bww.Parent := self;
bww.Align := alRight;
bww.AutoSize:=true;
bww.BorderSpacing.Around := 4;
bww.ShowHint := true;
bww.Hint := 'get the package list';
bww.OnClick:= @getList;
bww.Layout:= blGlyphTop;
bww.Spacing:= 2;
case ics of
iss16: AssignPng(bww, 'ARROW_UPDATE');
iss24: AssignPng(bww, 'ARROW_UPDATE24');
iss32: AssignPng(bww, 'ARROW_UPDATE32');
end;
bok := TBitBtn.Create(self);
bok.Parent := self;
bok.ModalResult:= mrOk;
bok.Align := alRight;
bok.AutoSize:=true;
bok.BorderSpacing.Around := 4;
bok.Hint := 'try to fetch, compile and auto-register';
bok.ShowHint := true;
bok.Layout:= blGlyphTop;
bok.Spacing:= 2;
case ics of
iss16: AssignPng(bok, 'ACCEPT');
iss24: AssignPng(bok, 'ACCEPT24');
iss32: AssignPng(bok, 'ACCEPT32');
end;
bno := TBitBtn.Create(self);
bno.Parent := self;
bno.ModalResult:= mrCancel;
bno.Align := alRight;
bno.AutoSize:=true;
bno.BorderSpacing.Around := 4;
bno.Hint := 'cancel and do nothing';
bno.ShowHint := true;
bno.Layout:= blGlyphTop;
bno.Spacing:= 2;
case ics of
iss16: AssignPng(bno, 'CANCEL');
iss24: AssignPng(bno, 'CANCEL24');
iss32: AssignPng(bno, 'CANCEL32');
end;
fillList;
end;
procedure TDubPackageQueryForm.btnTagCLick(sender: TObject);
begin
fGetLatestTag:= TSpeedButton(sender).down;
end;
procedure TDubPackageQueryForm.getList(sender: TObject);
begin
if fList.isAssigned then
fList.free;
simpleGet('https://code.dlang.org/api/packages/search', fList);
if fList.isAssigned then
fillList
else
dlgOkError('could not get the package list, ' + simpleGetErrMsg);
end;
procedure TDubPackageQueryForm.fillList;
var
itm: TJSONData;
i: integer;
begin
cbb.Clear;
if fList.isAssigned and (fList.JSONType = jtArray) then
for i := 0 to fList.Count -1 do
begin
itm := fList.Items[i].FindPath('version');
if itm.isNotAssigned then
continue;
itm := fList.Items[i].FindPath('name');
if itm.isNotAssigned then
continue;
cbb.Items.AddObject(itm.AsString, fList.Items[i]);
end;
end;
function TDubPackageQueryForm.getPackageName: string;
begin
result := cbb.Text;
end;
function TDubPackageQueryForm.getPackageVersion: string;
var
jsn: TJSONData;
begin
result := 'master';
if not fGetLatestTag then
exit;
// list is updated
if fList.isAssigned and (cbb.ItemIndex <> -1) and
cbb.Items.Objects[cbb.ItemIndex].isAssigned then
begin
jsn := TJSONData(cbb.Items.Objects[cbb.ItemIndex]);
jsn := jsn.FindPath('version');
result := jsn.AsString;
end
// use API
else
begin
result := '';
if not simpleGet('https://code.dlang.org/api/packages/' + packageName + '/latest', result) then
result := 'master';
if (result.length >= 7) and (result[2] in ['0'..'9']) then
result := result[2..result.length-1]
end;
end;
procedure TDubPackageQueryForm.updateHint(sender: TObject);
var
jsn: TJSONData;
begin
if (cbb.ItemIndex <> -1) and cbb.Items.Objects[cbb.ItemIndex].isAssigned then
try
jsn := TJSONData(cbb.Items.Objects[cbb.ItemIndex]);
jsn := jsn.FindPath('description');
if jsn.isAssigned then
cbb.Hint:= jsn.AsString;
except
end;
end;
class function TDubPackageQueryForm.showAndWait(out pName, pVersion: string): TModalResult;
var
frm: TDubPackageQueryForm;
begin
frm := TDubPackageQueryForm.Create(nil);
result := frm.ShowModal;
if result = mrOk then
begin
pName := frm.packageName;
pVersion := frm.packageVersion;
end
else
begin
pName := '';
pVersion := '';
end;
frm.Free;
end;
procedure TLibManEditorWidget.btnDubFetchClick(Sender: TObject);
var
dub: TProcess;
nme: string = '';
ver: string;
msg: string;
pth: string;
dfn: string;
str: TStringList;
itf: IMessagesDisplay;
err: integer;
prj: TDubProject;
ovw: boolean = false;
row: TListItem = nil;
begin
if TDubPackageQueryForm.showAndWait(nme, ver) <> mrOk then
exit;
if isAliasRegistered(nme) then
begin
if dlgYesNo(format('a library item with the alias "%s" already exists, do you wish to update it ?',
[nme])) <> mrYes then
exit
else
ovw := true;
end;
{$IFDEF WINDOWS}
pth := GetEnvironmentVariable('APPDATA') + '\dub\packages\' + nme + '-' + ver;
{$ELSE}
pth := GetEnvironmentVariable('HOME') + '/.dub/packages/' + nme + '-' + ver;
{$ENDIF}
itf := getMessageDisplay;
if pth.dirExists and not DeleteDirectory(pth, false) then
begin
itf.message('the existing package cant be deleted. To be updated the package must be deleted manually',
nil, amcMisc, amkWarn);
exit;
end;
// fetch
dub := TProcess.Create(nil);
try
dub.Executable:= 'dub';
dub.Options:= [poUsePipes, poStderrToOutPut];
dub.ShowWindow:= swoHIDE;
dub.Parameters.AddStrings(['fetch', nme]);
if ver = 'master' then
dub.Parameters.Add('--version=~master')
else
dub.Parameters.Add('--version=' + ver);
dub.Execute;
str := TStringList.Create;
try
processOutputToStrings(dub, str);
while dub.Running do;
err := dub.ExitStatus;
for msg in str do
itf.message(msg, nil, amcMisc, amkAuto);
finally
str.Free;
end;
finally
dub.Free;
end;
if not err.equals(0) then
begin
itf.message('error, failed to fetch the package', nil, amcMisc, amkErr);
exit;
end;
// get the description
if FileExists(pth + DirectorySeparator + 'dub.json') then
dfn := pth + DirectorySeparator + 'dub.json'
else if FileExists(pth + DirectorySeparator + 'package.json') then
dfn := pth + DirectorySeparator + 'package.json'
else if FileExists(pth + DirectorySeparator + nme + DirectorySeparator + 'dub.json') then
dfn := pth + DirectorySeparator + nme + DirectorySeparator + 'dub.json'
else if FileExists(pth + DirectorySeparator + nme + DirectorySeparator + 'package.json') then
dfn := pth + DirectorySeparator + nme + DirectorySeparator + 'package.json'
else
dfn := '';
if not dfn.fileExists or dfn.isEmpty then
begin
itf.message('error, the DUB description cannot be located or it has not the JSON format',
nil, amcMisc, amkErr);
exit;
end;
pth := dfn.extractFileDir;
// build
dub := TProcess.Create(nil);
try
dub.Executable:= 'dub';
dub.ShowWindow:= swoHIDE;
dub.Options:= [poUsePipes, poStderrToOutPut];
dub.Parameters.AddStrings(['build', '--build=release', '--force']);
dub.Parameters.Add('--compiler=' + getCompilerSelector.getCompilerPath(DubCompiler, false));
dub.CurrentDirectory:= pth;
dub.Execute;
str := TStringList.Create;
try
processOutputToStrings(dub, str);
while dub.Running do ;
err := dub.ExitStatus;
for msg in str do
itf.message(msg, nil, amcMisc, amkAuto);
finally
str.Free;
end;
finally
dub.Free;
end;
if not err.equals(0) then
begin
// allow "sourceLibrary"
EntitiesConnector.beginUpdate;
prj := TDubProject.create(nil);
try
prj.loadFromFile(dfn);
if prj.json.isAssigned and TJSONObject(prj.json).Find('targetType').isAssigned
and (TJSONObject(prj.json).Find('targetType').AsString = 'sourceLibrary')
then
begin
if (ovw and not List.items.findCaption(nme, row)) or not ovw then
row := List.Items.Add;
if row.Data.isNotAssigned then
row.Data := fLibman.libraries.Add;
row.Caption:= nme;
row.SubItems.Clear;
nme := projectSourcePath(prj as ICommonProject);
row.SubItems.Add(nme);
row.SubItems.Add(nme);
row.SubItems.Add(prj.filename);
row.SubItems.Add(enableStr[true]);
row.Selected:=true;
RowToLibrary(row, true);
row.MakeVisible(false);
itf.message('The package to register is a source library.' +
'It is not pre-compiled but its sources are registered', nil, amcMisc, amkInf);
end else
itf.message('error, failed to compile the package to register', nil, amcMisc, amkErr);
finally
prj.Free;
EntitiesConnector.endUpdate;
end;
showWidget;
exit;
end;
// project used to get the infos
EntitiesConnector.beginUpdate;
prj := TDubProject.create(nil);
try
prj.loadFromFile(dfn);
if prj.filename.isNotEmpty then
begin
if (ovw and not List.items.findCaption(nme, row)) or not ovw then
row := List.Items.Add;
if row.Data.isNotAssigned then
row.Data := fLibman.libraries.Add;
row.Caption := nme;
row.SubItems.Clear;
if prj.binaryKind = staticlib then
row.SubItems.Add(prj.outputFilename)
else
begin
if YesOrNoAddProjSourceFolder() = mrYes then
row.SubItems.add(projectSourcePath(prj))
else
row.SubItems.Add('');
end;
row.SubItems.Add(projectSourcePath(prj as ICommonProject));
row.SubItems.Add(prj.filename);
row.SubItems.Add(enableStr[true]);
row.Selected:=true;
RowToLibrary(row, true);
row.MakeVisible(false);
showWidget;
end else
itf.message('warning, the package json description can not be found or the target is not a static library',
nil, amcMisc, amkWarn);
finally
prj.Free;
EntitiesConnector.endUpdate;
end;
end;
procedure TLibManEditorWidget.btnEditAliasClick(Sender: TObject);
var
al: string;
i: integer;
begin
if List.Selected.isNotAssigned then
exit;
al := List.Selected.Caption;
if inputQuery('library alias', '', al) then
begin
for i := 0 to fLibman.librariesCount-1 do
if (fLibman.libraryByIndex[i].libAlias = al) and
(fLibman.libraryByIndex[i] <> itemForRow(List.Selected)) then
begin
dlgOkError('This alias is already used by another library, the renaming is canceled');
exit;
end;
List.Selected.Caption := al;
fLibman.updateItemsByAlias;
RowToLibrary(List.Selected);
end;
end;
procedure TLibManEditorWidget.btnEnabledClick(Sender: TObject);
begin
if List.Selected.isNotAssigned then
exit;
if List.Selected.SubItems[3] = 'true' then
List.Selected.SubItems[3] := 'false'
else
List.Selected.SubItems[3] := 'true';
RowToLibrary(List.Selected);
updateButtonsState;
end;
procedure TLibManEditorWidget.btnOpenProjClick(Sender: TObject);
var
fname: string;
fmt: TProjectFileFormat;
begin
if List.Selected.isNotAssigned then
exit;
fname := List.Selected.SubItems[2];
if not fname.fileExists then
exit;
fmt := projectFormat(fname);
if fmt in [pffDexed, pffDub] then
begin
if fFreeProj.isAssigned then
begin
if fFreeProj.modified and (dlgFileChangeClose(fFreeProj.filename, UnsavedProj) = mrCancel) then
exit;
fFreeProj.getProject.Free;
end;
if fmt = pffDexed then
TNativeProject.create(nil)
else
TDubProject.create(nil);
fProj.loadFromFile(fname);
fProj.activate;
end
else dlgOkInfo('the project file for this library seems to be invalid');
end;
procedure TLibManEditorWidget.btnRegClick(Sender: TObject);
var
str: TStringList;
fname: string;
root: string;
lalias: string;
row: TListItem;
itf: IMessagesDisplay;
begin
if fProj.isNotAssigned then
exit;
fname := fProj.outputFilename;
lalias := ExtractFileNameOnly(fname);
if isAliasRegistered(lalias) then
begin
dlgOkInfo(format('a library item with the alias "%s" already exists, delete it before trying again.',
[lalias]));
exit;
end;
itf := getMessageDisplay;
str := TStringList.Create;
try
root := projectSourcePath(fProj);
if root.isEmpty then
begin
dlgOkInfo('the static library can not be registered because its source files have no common folder');
exit;
end;
row := List.Items.Add;
row.Data := fLibman.libraries.Add;
row.Caption := lalias;
if (fname.extractFileExt <> libExt) then
begin
if (fname + libExt).fileExists then
begin
row.SubItems.add(fname + libExt);
if not row.SubItems[0].fileExists then
itf.message('warning, the library file does not exist, maybe the project not been already compiled ?',
nil, amcMisc, amkWarn);
end
else
begin
if YesOrNoAddProjSourceFolder() = mrYes then
row.SubItems.add(projectSourcePath(fProj))
else
row.SubItems.add('');
end;
end
else
row.SubItems.add(fname);
row.SubItems.add(root);
row.SubItems.add(fProj.filename);
row.SubItems.add(enableStr[true]);
row.Selected:= true;
row.MakeVisible(false);
SetFocus;
RowToLibrary(row, true);
finally
str.free;
end;
end;
procedure TLibManEditorWidget.btnRemLibClick(Sender: TObject);
begin
if List.Selected.isNotAssigned then
exit;
flibman.libraries.Delete(List.Selected.Index);
List.Items.Delete(List.Selected.Index);
updateButtonsState;
end;
procedure TLibManEditorWidget.btnSelProjClick(Sender: TObject);
var
ini: string;
begin
if List.Selected.isNotAssigned then
exit;
ini := List.Selected.SubItems[2];
with TOpenDialog.Create(nil) do
try
Title := 'Select the project that compiles the library';
FileName := ini;
if Execute then
List.Selected.SubItems[2] := FileName.normalizePath;
finally
free;
end;
RowToLibrary(List.Selected);
end;
procedure TLibManEditorWidget.btnSelFileClick(Sender: TObject);
var
ini: string = '';
begin
if List.Selected.isNotAssigned then
exit;
ini := List.Selected.SubItems[0];
with TOpenDialog.Create(nil) do
try
Title := 'Select the static library file';
filename := ini;
if Execute then
begin
filename := filename.normalizePath;
if not filename.fileExists then
List.Selected.SubItems[0] := filename.extractFilePath
else
begin
List.Selected.SubItems[0] := filename;
if (List.Selected.Caption.isEmpty) or (List.Selected.Caption = notav) then
List.Selected.Caption := ChangeFileExt(filename.extractFileName, '');
end;
end;
finally
Free;
end;
RowToLibrary(List.Selected);
end;
procedure TLibManEditorWidget.btnSelfoldOfFilesClick(Sender: TObject);
var
dir, outdir: string;
begin
if List.Selected.isNotAssigned then
exit;
dir := List.Selected.SubItems[0];
if selectDirectory('folder of static libraries', dir, outdir, True, 0) then
List.Selected.SubItems[0] := outdir;
RowToLibrary(List.Selected);
end;
procedure TLibManEditorWidget.btnSelRootClick(Sender: TObject);
var
dir: string;
begin
if List.Selected.isNotAssigned then
exit;
dir := List.Selected.SubItems[1];
with TSelectDirectoryDialog.Create(nil) do
try
InitialDir:= dir;
Title := 'Select the root of the sources';
Options := options + [ofNoDereferenceLinks, ofForceShowHidden];
if execute then
List.Selected.SubItems[1] := FileName;
finally
free;
end;
RowToLibrary(List.Selected);
end;
procedure TLibManEditorWidget.btnMoveUpClick(Sender: TObject);
var
i: integer;
begin
if list.Selected.isNotAssigned or list.Selected.Index.equals(0) then
exit;
i := list.Selected.Index;
list.Items.Exchange(i, i - 1);
fLibman.libraries.Exchange(i, i - 1);
end;
procedure TLibManEditorWidget.btnMoveDownClick(Sender: TObject);
var
i: integer;
begin
if list.Selected.isNotAssigned or (list.Selected.Index = list.Items.Count - 1) then
exit;
i := list.Selected.Index;
list.Items.Exchange(i, i + 1);
fLibman.libraries.Exchange(i, i + 1);
end;
procedure TLibManEditorWidget.DoShow;
begin
inherited;
dataToGrid;
end;
procedure TLibManEditorWidget.dataToGrid;
var
itm: TLibraryItem;
row: TListItem;
i: Integer;
begin
List.BeginUpdate;
List.Clear;
for i := 0 to fLibman.libraries.Count - 1 do
begin
itm := TLibraryItem(flibman.libraries.Items[i]);
row := List.Items.Add;
row.Data:= itm;
row.Caption := itm.libAlias;
row.SubItems.Add(itm.libFile);
row.SubItems.Add(itm.libSourcePath);
row.SubItems.Add(itm.libProject);
row.SubItems.Add(enableStr[itm.enabled]);
end;
List.EndUpdate;
end;
procedure TLibManEditorWidget.RowToLibrary(row: TListItem; added: boolean = false);
var
itm: TLibraryItem;
begin
itm := itemForRow(row);
if itm.isNotAssigned then
exit;
itm.libAlias := row.Caption;
itm.libFile := row.SubItems[0];
itm.libSourcePath := row.SubItems[1];
itm.libProject := row.SubItems[2];
itm.enabled := row.SubItems[3] = enableStr[true];
itm.updateModulesInfo;
fLibman.updateDCD;
if added then
fLibman.updateCrossDependencies
else
fLibman.updateAfterAddition(itm);
end;
end.
| 26.669575 | 113 | 0.695658 |
f18578270e2e9881b44279ad570a8bbed5b6c693
| 475 |
dpr
|
Pascal
|
Yaz.dpr
|
Avenroot/yaz-yahtzee-clone
|
0df86be9661822c10fbf31af999e6da3608e64fb
|
[
"MIT"
] | null | null | null |
Yaz.dpr
|
Avenroot/yaz-yahtzee-clone
|
0df86be9661822c10fbf31af999e6da3608e64fb
|
[
"MIT"
] | 4 |
2017-07-14T13:31:38.000Z
|
2017-07-18T13:47:10.000Z
|
Yaz.dpr
|
Avenroot/yaz-yahtzee-clone
|
0df86be9661822c10fbf31af999e6da3608e64fb
|
[
"MIT"
] | null | null | null |
program Yaz;
uses
Forms,
MainMenu in 'MainMenu.pas' {frmMainMenu},
MainGameBoard in 'MainGameBoard.pas' {frmMainGameBoard},
YazRules in 'YazRules.pas',
Scoreboard in 'Scoreboard.pas';
{$R *.res}
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.Title := 'Yaz Game';
Application.CreateForm(TfrmMainMenu, frmMainMenu);
Application.CreateForm(TfrmMainGameBoard, frmMainGameBoard);
Application.Run;
end.
| 23.75 | 63 | 0.724211 |
6ae63ff3a2ddb394aa5767d411429412186eafad
| 979 |
dpr
|
Pascal
|
setup/unzipper.dpr
|
jalvarez54/Me.WCFTPSyncWrapper
|
a5e653cc60874b40019d164c9d44921256abb7b4
|
[
"MIT"
] | null | null | null |
setup/unzipper.dpr
|
jalvarez54/Me.WCFTPSyncWrapper
|
a5e653cc60874b40019d164c9d44921256abb7b4
|
[
"MIT"
] | null | null | null |
setup/unzipper.dpr
|
jalvarez54/Me.WCFTPSyncWrapper
|
a5e653cc60874b40019d164c9d44921256abb7b4
|
[
"MIT"
] | null | null | null |
library unzipper;
{
title : UnZip for InnoSetup
version : 1.0
author : Daniel P. Stasinski
email : daniel@genericinbox.com
begin : Fri Nov 22 17:31:33 MST 2013
license : None
}
uses
Windows,
ComObj;
const
SHCONTCH_NOPROGRESSBOX = 4;
SHCONTCH_AUTORENAME = 8;
SHCONTCH_RESPONDYESTOALL = 16;
SHCONTF_INCLUDEHIDDEN = 128;
SHCONTF_FOLDERS = 32;
SHCONTF_NONFOLDERS = 64;
procedure unzip(ZipFile, TargetFolder: PAnsiChar); stdcall;
var
shellobj: variant;
ZipFileV, SrcFile: variant;
TargetFolderV, DestFolder: variant;
shellfldritems: variant;
begin
shellobj := CreateOleObject('Shell.Application');
ZipFileV := string(ZipFile);
TargetFolderV := string(TargetFolder);
SrcFile := shellobj.NameSpace(ZipFileV);
DestFolder := shellobj.NameSpace(TargetFolderV);
shellfldritems := SrcFile.Items;
DestFolder.CopyHere(shellfldritems, SHCONTCH_NOPROGRESSBOX or SHCONTCH_RESPONDYESTOALL);
end;
exports unzip;
begin
end.
| 22.25 | 90 | 0.735444 |
8300103b7903f8662b02f165fb56c522e51610b2
| 546 |
pas
|
Pascal
|
Test/Test.MSFA.LFO.pas
|
WouterVanNifterick/DX7
|
baa636a1b0556eea7ac5fa1ea6564eda63964bd9
|
[
"MIT"
] | 7 |
2018-06-19T06:08:40.000Z
|
2021-01-20T21:38:11.000Z
|
Test/Test.MSFA.LFO.pas
|
WouterVanNifterick/DX7
|
baa636a1b0556eea7ac5fa1ea6564eda63964bd9
|
[
"MIT"
] | 1 |
2019-02-20T12:57:04.000Z
|
2019-02-20T12:57:04.000Z
|
Test/Test.MSFA.LFO.pas
|
WouterVanNifterick/DX7
|
baa636a1b0556eea7ac5fa1ea6564eda63964bd9
|
[
"MIT"
] | 3 |
2018-03-06T11:36:30.000Z
|
2019-03-06T14:48:20.000Z
|
unit Test.MSFA.LFO;
interface
uses
WvN.Console,
System.TypInfo,
System.diagnostics,
lfo,
System.SysUtils,
DUnitX.TestFramework;
type
[TestFixture]
LFOTest = class(TObject)
[test]
procedure TestLFOValue;
end;
implementation
{ LFOTest }
procedure LFOTest.TestLFOValue;
var
LFO:TLfo;
Params:TLFOParameters;
begin
Params.rate := 10;
Params.delay := 0;
Params.p1 := 0;
Params.p2 := 1;
LFO := TLfo.Create(44100, Params);
LFO.keydown;
end;
initialization
TDUnitX.RegisterTestFixture(LFOTest);
end.
| 12.409091 | 39 | 0.694139 |
6ab7e9198c4890704c4d699356ca0ac28e495032
| 2,196 |
pas
|
Pascal
|
windows/src/ext/jedi/jvcl/jvcl/examples/JvXMLDatabase/Sources/ClassHospital.pas
|
bravogeorge/keyman
|
c0797e36292de903d7313214d1f765e3d9a2bf4d
|
[
"MIT"
] | 219 |
2017-06-21T03:37:03.000Z
|
2022-03-27T12:09:28.000Z
|
windows/src/ext/jedi/jvcl/jvcl/examples/JvXMLDatabase/Sources/ClassHospital.pas
|
bravogeorge/keyman
|
c0797e36292de903d7313214d1f765e3d9a2bf4d
|
[
"MIT"
] | 4,451 |
2017-05-29T02:52:06.000Z
|
2022-03-31T23:53:23.000Z
|
windows/src/ext/jedi/jvcl/jvcl/examples/JvXMLDatabase/Sources/ClassHospital.pas
|
bravogeorge/keyman
|
c0797e36292de903d7313214d1f765e3d9a2bf4d
|
[
"MIT"
] | 72 |
2017-05-26T04:08:37.000Z
|
2022-03-03T10:26:20.000Z
|
{******************************************************************
JEDI-VCL Demo
Copyright (C) 2002 Project JEDI
Original author:
Contributor(s):
You may retrieve the latest version of this file at the JEDI-JVCL
home page, located at http://jvcl.delphi-jedi.org
The contents of this file are used with permission, subject to
the Mozilla Public License Version 1.1 (the "License"); you may
not use this file except in compliance with the License. You may
obtain a copy of the License at
http://www.mozilla.org/MPL/MPL-1_1Final.html
Software distributed under the License is distributed on an
"AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
******************************************************************}
unit ClassHospital;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ClassUtils, ClassRequest, JvXmlDatabase;
type
THospital = class
private
FRequests: TRequestHandler;
FDatabase: TJvXmlDatabase;
public
constructor Create;
destructor Destroy;override;
function GetDataPath: string;
property Requests: TRequestHandler read FRequests write FRequests;
property Database: TJvXmlDatabase read FDatabase write FDatabase;
end;
var
GHospital: THospital;
implementation
{ THospital }
{**********************************************************************}
constructor THospital.Create;
begin
FRequests := TRequestHandler.Create;
FDatabase := TJvXmlDatabase.Create(nil);
FDatabase.TablesPath := GetDataPath;
end;
{**********************************************************************}
destructor THospital.Destroy;
begin
FDatabase.Free;
FRequests.Free;
inherited;
end;
{**********************************************************************}
function THospital.GetDataPath: string;
begin
result := ExtractFilePath(Application.ExeName) + 'Data\';
end;
{**********************************************************************}
initialization
GHospital := THospital.Create;
finalization
FreeAndNil(GHospital);
end.
| 26.142857 | 76 | 0.609745 |
83abc0e0557cabe36398f2e366ca7ba0ded60c41
| 3,029 |
pas
|
Pascal
|
source/Plugins/MarkdownProcessorItem.pas
|
novuslogic/Zcodegen
|
3d53bf6b49690be918b129dd27400e56de7e470d
|
[
"Apache-2.0"
] | 1 |
2021-03-04T02:11:59.000Z
|
2021-03-04T02:11:59.000Z
|
source/Plugins/MarkdownProcessorItem.pas
|
novuslogic/Zcodegen
|
3d53bf6b49690be918b129dd27400e56de7e470d
|
[
"Apache-2.0"
] | null | null | null |
source/Plugins/MarkdownProcessorItem.pas
|
novuslogic/Zcodegen
|
3d53bf6b49690be918b129dd27400e56de7e470d
|
[
"Apache-2.0"
] | 3 |
2019-12-26T05:40:58.000Z
|
2021-03-04T02:12:00.000Z
|
unit MarkdownProcessorItem;
interface
uses Classes, Plugin, NovusPlugin, NovusVersionUtils, Project, NovusTemplate,
Output, SysUtils, System.Generics.Defaults, runtime, Config, NovusStringUtils,
APIBase, MarkdownDaringFireball, MarkdownProcessor, ProjectItem, TagType,
Loader, template, CodeGenerator, TagParser;
type
tMarkdownProcessorItem = class(TProcessorItem)
private
protected
foCodeGenerator: tCodeGenerator;
foProjectItem: tProjectItem;
function GetProcessorName: String; override;
procedure DoBlockEvent(const aBlock: tBlock);
public
function PreProcessor(aProjectItem: tObject; var aFilename: String;
var aTemplate: tTemplate;aNodeLoader: tNodeLoader; aCodeGenerator: tObject): TPluginReturn; override;
function PostProcessor(aProjectItem: tObject; var aTemplate: tTemplate;
aTemplateFile: String; var aOutputFilename: string)
: TPluginReturn; override;
function Convert(aProjectItem: tObject; aInputFilename: string;
var aOutputFilename: string): TPluginReturn; override;
end;
implementation
function tMarkdownProcessorItem.GetProcessorName: String;
begin
Result := 'Markdown';
end;
procedure tMarkdownProcessorItem.DoBlockEvent(const aBlock: tBlock);
var
fTagType: TTagType;
loTemplate: ttemplate;
fTagParser: TTagParser;
begin
aBlock.type_ := btNONE;
if Assigned(aBlock.lines) then
begin
try
fTagParser := TTagParser.ParseTag(foProjectItem, foCodeGenerator,
aBlock.lines.value, oOutput);
if fTagParser.Execute then
begin
// if fTagParser.IsAnyDeleteLine then ;
end;
finally
fTagParser.Free;
end;
end;
end;
function tMarkdownProcessorItem.PreProcessor(aProjectItem: tObject;
var aFilename: String; var aTemplate: tTemplate; aNodeLoader: tNodeLoader; aCodeGenerator: tObject): TPluginReturn;
Var
fMarkdownprocessor: TMarkdownDaringFireball;
begin
Try
Try
fMarkdownprocessor := TMarkdownDaringFireball.Create;
FoCodeGenerator := (aCodeGenerator as tCodeGenerator);
foProjectItem := (aProjectItem as tProjectItem);
fMarkdownprocessor.OnBlock := DoBlockEvent;
aTemplate.TemplateDoc.Text := fMarkdownprocessor.process
(aTemplate.TemplateDoc.Text);
Result := TPluginReturn.PRPassed;
Except
Result := TPluginReturn.PRFailed;
oOutput.InternalError;
End;
Finally
fMarkdownprocessor.Free;
End;
Result := TPluginReturn.PRIgnore;
end;
function tMarkdownProcessorItem.PostProcessor(aProjectItem: tObject;
var aTemplate: tTemplate; aTemplateFile: String; var aOutputFilename: string)
: TPluginReturn;
begin
aOutputFilename := ChangeFileExt(aOutputFilename, '.' + outputextension);
oOutput.Log('New output:' + aOutputFilename);
Result := TPluginReturn.PRPassed;
end;
function tMarkdownProcessorItem.Convert(aProjectItem: tObject;
aInputFilename: string; var aOutputFilename: string): TPluginReturn;
begin
Result := PRIgnore;
end;
end.
| 26.570175 | 117 | 0.747111 |
f165871318e70afcb6e13a01d8df90877bf371c7
| 740 |
pas
|
Pascal
|
src/Security/Validation/Validators/SameValidatorImpl.pas
|
atkins126/fano
|
472679437cb42637b0527dda8255ec52a3e1e953
|
[
"MIT"
] | null | null | null |
src/Security/Validation/Validators/SameValidatorImpl.pas
|
atkins126/fano
|
472679437cb42637b0527dda8255ec52a3e1e953
|
[
"MIT"
] | null | null | null |
src/Security/Validation/Validators/SameValidatorImpl.pas
|
atkins126/fano
|
472679437cb42637b0527dda8255ec52a3e1e953
|
[
"MIT"
] | null | null | null |
{*!
* Fano Web Framework (https://fanoframework.github.io)
*
* @link https://github.com/fanoframework/fano
* @copyright Copyright (c) 2018 - 2020 Zamrony P. Juhara
* @license https://github.com/fanoframework/fano/blob/master/LICENSE (MIT)
*}
unit SameValidatorImpl;
interface
{$MODE OBJFPC}
{$H+}
uses
ConfirmedValidatorImpl;
type
(*!------------------------------------------------
* basic class having capability to
* validate data that must be equal to other field.
* This is alias name for TConfirmedValidator
*
* @author Zamrony P. Juhara <zamronypj@yahoo.com>
*-------------------------------------------------*)
TSameValidator = TConfirmedValidator;
implementation
end.
| 22.424242 | 77 | 0.591892 |
85c559e1f467dd91e5e47f20d4a9b120fb593d38
| 1,144 |
dfm
|
Pascal
|
src/Moon_TestApp/FormMain.dfm
|
milanqiu/moon
|
a187e46b551db696d3e1d88574218249552950e0
|
[
"Apache-2.0"
] | null | null | null |
src/Moon_TestApp/FormMain.dfm
|
milanqiu/moon
|
a187e46b551db696d3e1d88574218249552950e0
|
[
"Apache-2.0"
] | null | null | null |
src/Moon_TestApp/FormMain.dfm
|
milanqiu/moon
|
a187e46b551db696d3e1d88574218249552950e0
|
[
"Apache-2.0"
] | null | null | null |
object MainForm: TMainForm
Left = 682
Top = 202
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'TestApp'
ClientHeight = 621
ClientWidth = 424
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
PixelsPerInch = 96
TextHeight = 13
object cxmclbModule: TcxMCListBox
Left = 24
Top = 24
Width = 297
Height = 577
HeaderSections = <
item
Text = 'Package'
Width = 100
end
item
Text = 'Module'
Width = 200
end>
Items.Strings = (
'Moon_Utilities;mnCOM'
';mnControl'
';mnDialog'
';mnFile'
';mnForm'
';mnGraphics'
';mnNetwork'
';mnSystem'
';mnTPL'
';mnWindows'
'Moon_Components;mnDateRange')
TabOrder = 0
OnDblClick = cxmclbModuleDblClick
end
object cxbtnTest: TcxButton
Left = 336
Top = 296
Width = 75
Height = 25
Caption = 'Test'
TabOrder = 1
OnClick = cxbtnTestClick
end
end
| 19.724138 | 42 | 0.59965 |
83557c8d5d15e8dc547242bc31b48834c20fbddc
| 2,570 |
lpr
|
Pascal
|
examples/text/01_SimpleTiledWorld/SimpleTiledWorld.lpr
|
mr-highball/wfc
|
e2bc0d06303d0793aca97851d281ec01598908be
|
[
"MIT"
] | 4 |
2021-01-11T01:04:23.000Z
|
2021-04-22T02:29:15.000Z
|
examples/text/01_SimpleTiledWorld/SimpleTiledWorld.lpr
|
mr-highball/wfc
|
e2bc0d06303d0793aca97851d281ec01598908be
|
[
"MIT"
] | 4 |
2021-01-11T02:25:09.000Z
|
2022-01-25T23:12:17.000Z
|
examples/text/01_SimpleTiledWorld/SimpleTiledWorld.lpr
|
mr-highball/wfc
|
e2bc0d06303d0793aca97851d281ec01598908be
|
[
"MIT"
] | 1 |
2021-04-22T02:29:24.000Z
|
2021-04-22T02:29:24.000Z
|
{$Mode delphi}
(*
below example uses the following article describing a simple world
with Land, Coast, Sea and Mountains that have constraints for
where they can appear. Because this is a textual example we will use
the first letter for each tile name to represent the type of tile used.
https://robertheaton.com/2018/12/17/wavefunction-collapse-algorithm/
*)
program SimpleTiledWorld;
uses
math,
crt, //colors for console
wfc; //library code
procedure RenderWorld(const AWorld : TGraph);
var
X, Y: Integer;
LVal: TGraphValue;
begin
WriteLn('');
for Y := 0 to Pred(AWorld.Dimension.Height) do
begin
for X := 0 to Pred(AWorld.Dimension.Width) do
begin
LVal := AWorld[X, Y, 0].Value;
if LVal = 'L' then
TextColor(Green)
else if LVal = 'S' then
TextColor(Cyan)
else if LVal = 'C' then
TextColor(Yellow)
else if LVal = 'M' then
TextColor(Brown);
Write(LVal);
end;
WriteLn('');
end;
end;
(*
the rules we have in place allow for invalid board states, so we could
either fix the rules to handle all cases, or provide a default with this
*)
procedure InvalidHandler(const AGraph : TGraph; const AEntry : TGraphEntry;
var AValue : TGraphValue);
begin
//just use land or sea when no other solution
AValue := TArray<String>.Create('L', 'S')[RandomRange(0, 2)];
end;
var
LWorld : TGraph;
begin
LWorld := TGraph.Create;
try
//set our shape to be 2D and size it appropriately for the console window
LWorld.Reshape({width} 80, {height} 25, {depth} 1);
//LWorld.WrapNeighbors := False;
LWorld.InvalidStateCallback := InvalidHandler;
//"coast" can have "sea" to the right (east)
//and "land" to the left (west)
LWorld.AddValue('C')
.NewRule([gdEast], 'S')
.NewRule([gdWest], 'L');
//"sea" can go next to other sea tile
LWorld.Rules['S']
.NewRule(AllDirections, 'S');
//"land" can be next to other land
LWorld.Rules['L']
.NewRule(AllDirections, 'L');
//"mountain" isn't really defined on the article even though
//the tile is there, so we'll just say it needs be to the west of cost
//or west/east of another mountain and east of land
LWorld.AddValue('M')
.NewRule([gdEast, gdWest], 'L')
.NewRule([gdEast], 'C')
.NewRule(AllDirections, 'M');
//run the graph
LWorld.Run;
//now call our helper print function to display the world
RenderWorld(LWorld);
finally
LWorld.Free;
end;
//wait for user to close
ReadLn;
end.
| 25.196078 | 77 | 0.653307 |
83c2f41212c7e2f02dde832215839d3e0a37f639
| 3,117 |
pas
|
Pascal
|
src/VCL.Wait.pas
|
jfhyn/wait-vcl
|
6b359455954875c77de5275b41efebdd34f3dde3
|
[
"Apache-2.0"
] | 7 |
2019-07-05T11:14:17.000Z
|
2021-11-15T23:11:57.000Z
|
src/VCL.Wait.pas
|
LivingInFHL/wait-vcl
|
3229ffcacda248b1de7795e8f92e08e6e13d0c76
|
[
"Apache-2.0"
] | null | null | null |
src/VCL.Wait.pas
|
LivingInFHL/wait-vcl
|
3229ffcacda248b1de7795e8f92e08e6e13d0c76
|
[
"Apache-2.0"
] | 6 |
2019-07-05T02:09:05.000Z
|
2021-06-03T06:02:54.000Z
|
unit VCL.Wait;
interface
uses VCL.BlockUI.Intf, VCL.Forms, VCL.Controls, VCL.BlockUI, VCL.ExtCtrls, System.Classes, Providers.ProgressBar.Intf,
View.Wait, System.SysUtils;
type
TWait = class
private
FBlockUI: IBlockUI;
FProgressBar: IProgressBar;
FWaitForm: TFrmWait;
public
/// <summary>
/// Creates the required resources.
/// </summary>
/// <param name="Content">
/// Message to be set.
/// </param>
constructor Create(const Content: string);
/// <summary>
/// Get the message from the screen to wait.
/// </summary>
/// <returns>
/// Defined message.
/// </returns>
function Content: string;
/// <summary>
/// Sets a new message to the screen to wait.
/// </summary>
/// <param name="Content">
/// New message to be set.
/// </param>
/// <returns>
/// Returns the instance itself.
/// </returns>
function SetContent(const Content: string): TWait;
/// <summary>
/// Access the progress bar.
/// </summary>
/// <returns>
/// Returns an instance of the IProgressBar interface.
/// </returns>
function ProgressBar: IProgressBar;
/// <summary>
/// Creates a wait screen.
/// </summary>
/// <param name="Process">
/// Procedure that should be performed with the wait screen.
/// </param>
/// <returns>
/// Returns the instance itself.
/// </returns>
function Start(const Process: TProc): TWait;
/// <summary>
/// Destroys the resources created.
/// </summary>
destructor Destroy; override;
end;
implementation
uses Providers.ProgressBar.Default;
function TWait.ProgressBar: IProgressBar;
begin
Result := Self.FProgressBar;
end;
constructor TWait.Create(const Content: string);
begin
Self.FBlockUI := TBlockUI.Create(Application.MainForm);
Self.FWaitForm := TFrmWait.Create(Application);
Self.FProgressBar := TProgressBarDefault.Create(Self.FWaitForm.pbWait);
Self.SetContent(Content);
end;
destructor TWait.Destroy;
begin
FBlockUI := nil;
FProgressBar := nil;
if (Assigned(FWaitForm)) then
begin
FWaitForm.Close;
FWaitForm := nil;
end;
inherited;
end;
function TWait.Content: string;
begin
Result := Self.FWaitForm.lblContent.Caption;
end;
function TWait.SetContent(const Content: string): TWait;
begin
Result := Self;
TThread.Synchronize(TThread.Current,
procedure
begin
Self.FWaitForm.lblContent.Caption := Content;
Self.FWaitForm.lblContent.Update;
end);
end;
function TWait.Start(const Process: TProc): TWait;
var
FActivityThread: TThread;
begin
Result := Self;
FActivityThread := TThread.CreateAnonymousThread(
procedure
begin
try
try
Process;
except on E:Exception do
Application.ShowException(E);
end;
finally
TThread.Synchronize(nil,
procedure
begin
Self.Destroy;
end);
end;
end);
FActivityThread.FreeOnTerminate := True;
FActivityThread.Start;
Self.FWaitForm.ShowModal;
end;
end.
| 23.088889 | 118 | 0.638434 |
f15d1302581d827064914a925cfd0925b0dbc873
| 1,522 |
pas
|
Pascal
|
Demos/Demo.DDuce.Dialogs.pas
|
atkins126/dduce
|
c52b44344524a180ba4c88cfe3c66e72d9066d4c
|
[
"Apache-2.0"
] | null | null | null |
Demos/Demo.DDuce.Dialogs.pas
|
atkins126/dduce
|
c52b44344524a180ba4c88cfe3c66e72d9066d4c
|
[
"Apache-2.0"
] | null | null | null |
Demos/Demo.DDuce.Dialogs.pas
|
atkins126/dduce
|
c52b44344524a180ba4c88cfe3c66e72d9066d4c
|
[
"Apache-2.0"
] | null | null | null |
{
Copyright (C) 2013-2021 Tim Sinaeve tim.sinaeve@gmail.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
}
unit Demo.DDuce.Dialogs;
interface
uses
Winapi.Windows, Winapi.Messages,
System.SysUtils, System.Variants, System.Classes,
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, System.Actions,
Vcl.ActnList, Vcl.StdCtrls;
type
TfrmDialogs = class(TForm)
btnAboutDialog : TButton;
aclMain : TActionList;
actAboutDialog : TAction;
actRTTEye : TAction;
btnRTTEye : TButton;
procedure actAboutDialogExecute(Sender: TObject);
procedure actRTTEyeExecute(Sender: TObject);
end;
implementation
uses
DDuce.AboutDialog, DDuce.RTTEye;
{$R *.dfm}
{$REGION 'action handlers'}
procedure TfrmDialogs.actAboutDialogExecute(Sender: TObject);
begin
ShowAboutDialog;
end;
procedure TfrmDialogs.actRTTEyeExecute(Sender: TObject);
var
F : TfrmRTTEye;
begin
F := TfrmRTTEye.Create(Self);
try
F.ShowModal;
finally
F.Free;
end;
end;
{$ENDREGION}
end.
| 22.716418 | 74 | 0.733903 |
6acddbd66a769416748dd5f7c4439c659a5bc7ce
| 1,119 |
pas
|
Pascal
|
delphi/0372.pas
|
nickelsworth/swag
|
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
|
[
"BSD-2-Clause"
] | 11 |
2015-12-12T05:13:15.000Z
|
2020-10-14T13:32:08.000Z
|
delphi/0372.pas
|
nickelsworth/swag
|
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
|
[
"BSD-2-Clause"
] | null | null | null |
delphi/0372.pas
|
nickelsworth/swag
|
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
|
[
"BSD-2-Clause"
] | 8 |
2017-05-05T05:24:01.000Z
|
2021-07-03T20:30:09.000Z
|
> I'd like to have my Delphi Program dial up my ISP (using the WIN95)
Hi Scott
To start your Dial Up Connection, you can use something like this:
WinExec('rundll32.exe rnaui.dll,RnaDial NAME',SW_SHOWNORMAL);
where NAME is the exact title of your connectoid in dial up networking.
To automatic press button "Connect" you can use this:
procedure TForm1.Timer1Timer(Sender: TObject);
var buf,buf1 : array [0..100] of char;
hnd,hnd1 : hWnd;
ln : integer;
begin
Try
hnd := GetForegroundWindow;
ln:=GetWindowTextLength(hnd);
GetMem(lpStr,ln+1);
GetWindowText(hnd,lpStr,ln+1);
Edit1.Text := StrPas(lpStr);
if lpstr='Connect with' then
begin
hnd1 := GetWindow(hnd,GW_child);
getwindowtext(hnd1,buf1,sizeof(buf1));
while (buf1<>'Connect') do
begin
hnd1 := GetWindow(hnd1,GW_hwndnext);
getwindowtext(hnd1,buf1,sizeof(buf1));
end;
beep;
PostMessage(hnd1,BM_CLICK,0,0);
end;
Finally
FreeMem(lpStr,ln);
end;
end;
| 29.447368 | 72 | 0.610366 |
f1462219ac222c94ea3febe5e170a22ff09185d5
| 6,656 |
pas
|
Pascal
|
engine/Lib/particles/tdpe.lib.particle.group.pas
|
jomael/thundax-delphi-physics-engine
|
a86f38cdaba1f00c5ef5296a8ae67b816a59448e
|
[
"MIT"
] | 56 |
2015-03-15T10:22:50.000Z
|
2022-02-22T11:58:08.000Z
|
engine/Lib/particles/tdpe.lib.particle.group.pas
|
jomael/thundax-delphi-physics-engine
|
a86f38cdaba1f00c5ef5296a8ae67b816a59448e
|
[
"MIT"
] | 2 |
2016-07-10T07:57:05.000Z
|
2019-10-14T15:49:06.000Z
|
engine/Lib/particles/tdpe.lib.particle.group.pas
|
jomael/thundax-delphi-physics-engine
|
a86f38cdaba1f00c5ef5296a8ae67b816a59448e
|
[
"MIT"
] | 18 |
2015-07-17T19:24:39.000Z
|
2022-01-20T05:40:46.000Z
|
(*
* Copyright (c) 2010-2012 Thundax Delphi Physics Engine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of 'TDPE' nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*)
unit tdpe.lib.particle.group;
interface
uses tdpe.lib.particle.abstract.collection, tdpe.lib.vector, Classes, tdpe.lib.particle.pattern.composite,
tdpe.lib.particle.abstractparticle, tdpe.lib.particle.abstract.restriction, generics.Collections,
tdpe.lib.force.contract, tdpe.lib.force.list;
Type
TGroup = Class(TAbstractCollection)
Private
FCollideInternal: Boolean;
FComposites: TList<TComposite>;
FCollisionList: TList<TGroup>;
Procedure CheckCollisionGroupInternal;
Procedure CheckCollisionAgainstGroup(group: TGroup);
public
constructor Create(CollideInternal: Boolean = False); Reintroduce; Virtual;
Destructor Destroy(); Override;
Procedure Init; Override;
Procedure AddComposite(composite: TComposite);
Procedure RemoveComposite(composite: TComposite);
Procedure Paint; Override;
Procedure AddCollidable(group: TGroup);
Procedure RemoveCollidable(group: TGroup);
Procedure AddCollidableList(list: TList<TGroup>);
Function GetAll: TList;
Procedure Integrate(deltaTime: Double; MassLessForce: TForceList; Damping: Double); Override;
Procedure SatisfyRestrictions; Override;
Procedure CheckCollision;
Property CollideInternal: Boolean read FCollideInternal Write FCollideInternal;
property Composites: TList<TComposite>read FComposites write FComposites;
property CollisionList: TList<TGroup>read FCollisionList write FCollisionList;
end;
implementation
uses MaskUtils, SysUtils;
{ TGroup }
procedure TGroup.AddCollidable(group: TGroup);
begin
FCollisionList.Add(group);
end;
procedure TGroup.AddCollidableList(list: TList<TGroup>);
var
group: TGroup;
begin
for group in list do
FCollisionList.Add(group);
end;
procedure TGroup.AddComposite(composite: TComposite);
begin
FComposites.Add(composite);
composite.IsParented := true;
if IsParented then
composite.Init;
end;
procedure TGroup.CheckCollision;
var
group: TGroup;
begin
if CollideInternal then
CheckCollisionGroupInternal;
for group in FCollisionList do
CheckCollisionAgainstGroup(group);
end;
procedure TGroup.CheckCollisionGroupInternal;
var
i, j: Integer;
composite: TComposite;
begin
CheckInternalCollision;
for j := 0 to FComposites.Count - 1 do
begin
composite := Composites[j];
composite.CheckCollisionAgainstCollection(Self);
for i := j + 1 to FComposites.Count - 1 do
composite.CheckCollisionAgainstCollection(Composites[i]);
end;
end;
procedure TGroup.CheckCollisionAgainstGroup(group: TGroup);
var
composite: TComposite;
gComposite: TComposite;
begin
CheckCollisionAgainstCollection(group);
for composite in FComposites do
begin
composite.CheckCollisionAgainstCollection(group);
for gComposite in group.Composites do
composite.CheckCollisionAgainstCollection(gComposite);
end;
for gComposite in group.Composites do
CheckCollisionAgainstCollection(gComposite);
end;
constructor TGroup.Create(CollideInternal: Boolean);
begin
inherited Create;
FCollideInternal := CollideInternal;
FComposites := TList<TComposite>.Create;
FCollisionList := TList<TGroup>.Create;
end;
destructor TGroup.Destroy;
begin
FreeAndNil(FComposites);
FreeAndNil(FCollisionList);
inherited;
end;
function TGroup.GetAll: TList;
var
abstractParticle : TAbstractParticle;
abstractRestriction : TAbstractRestriction;
composite : TComposite;
begin
Result := TList.Create;
for abstractParticle in Particles do
Result.Add(abstractParticle);
for abstractRestriction in Restrictions do
Result.Add(abstractRestriction);
for composite in Composites do
Result.Add(composite);
end;
procedure TGroup.Init;
var
composite : TComposite;
begin
For composite in FComposites do
composite.Init;
end;
procedure TGroup.Integrate(deltaTime: Double; MassLessForce: TForceList; Damping: Double);
var
composite : TComposite;
begin
inherited Integrate(deltaTime, MassLessForce, Damping);
For composite in FComposites do
composite.Integrate(deltaTime, MassLessForce, Damping);
end;
procedure TGroup.Paint;
var
abstractParticle : TAbstractParticle;
abstractRestriction : TAbstractRestriction;
composite : TComposite;
begin
for composite in FComposites do
composite.Paint;
for abstractParticle in Particles do
abstractParticle.Paint;
for abstractRestriction in Restrictions do
abstractRestriction.Paint;
end;
procedure TGroup.RemoveCollidable(group: TGroup);
begin
FCollisionList.Remove(group);
end;
procedure TGroup.RemoveComposite(composite: TComposite);
begin
FComposites.Remove(composite);
composite.IsParented := False;
composite.Free;
end;
procedure TGroup.SatisfyRestrictions;
var
composite : TComposite;
begin
inherited SatisfyRestrictions;
for composite in FComposites do
composite.SatisfyRestrictions;
end;
end.
| 30.117647 | 107 | 0.75 |
f120dd64758c59e1a2910413dc7c9e85df610542
| 54 |
pas
|
Pascal
|
resources/0.pas
|
darkey91/Pascal-interpreter-pretty-printer
|
1ad676e02474948d42d9aa927b38ae20de08bcd8
|
[
"BSD-3-Clause"
] | null | null | null |
resources/0.pas
|
darkey91/Pascal-interpreter-pretty-printer
|
1ad676e02474948d42d9aa927b38ae20de08bcd8
|
[
"BSD-3-Clause"
] | null | null | null |
resources/0.pas
|
darkey91/Pascal-interpreter-pretty-printer
|
1ad676e02474948d42d9aa927b38ae20de08bcd8
|
[
"BSD-3-Clause"
] | null | null | null |
program simple;
begin
writeln('Hello world!');
end.
| 10.8 | 26 | 0.703704 |
83933c9eaed40fb460219fff51738ae9e656f60e
| 1,282 |
pas
|
Pascal
|
exercises/kindergarten-garden/uKindergartenGardenExample.pas
|
neoprez/delphi
|
2207cd228c4fde294f8b4c810239286f5ea50032
|
[
"MIT"
] | 28 |
2017-08-02T16:18:29.000Z
|
2021-12-25T22:38:15.000Z
|
exercises/kindergarten-garden/uKindergartenGardenExample.pas
|
neoprez/delphi
|
2207cd228c4fde294f8b4c810239286f5ea50032
|
[
"MIT"
] | 103 |
2017-06-18T22:48:20.000Z
|
2021-09-02T13:17:06.000Z
|
exercises/kindergarten-garden/uKindergartenGardenExample.pas
|
filiptoskovic/delphi
|
3e0fdad99efb579ac319e708be326124ae3179e0
|
[
"MIT"
] | 30 |
2017-07-21T17:48:26.000Z
|
2021-11-05T15:59:25.000Z
|
unit uKindergartenGarden;
interface
uses
System.Generics.Collections;
type
TGarden = class
private
FArr : TArray<string>;
FStudents : TList<string>;
FPlants : TDictionary<char, string>;
public
constructor Create(AGarden : string);
destructor Destroy; override;
function Plants(AStudent : string) : TArray<string>;
end;
implementation
uses
System.SysUtils;
{ TGarden }
constructor TGarden.Create(AGarden: string);
begin
FArr := AGarden.Split(['\n']);
FStudents := TList<string>.Create;
FStudents.AddRange(['Alice', 'Bob', 'Charlie', 'David', 'Eve', 'Fred', 'Ginny',
'Harriet', 'Ileana', 'Joseph', 'Kincaid', 'Larry']);
FPlants := TDictionary<char, string>.Create;
FPlants.Add('G', 'grass');
FPlants.Add('C', 'clover');
FPlants.Add('R', 'radishes');
FPlants.Add('V', 'violets');
end;
destructor TGarden.Destroy;
begin
FStudents.DisposeOf;
FPlants.DisposeOf;
end;
function TGarden.Plants(AStudent: string): TArray<string>;
var
P : TList<string>;
i, j: Integer;
begin
P := TList<string>.Create;
i := FStudents.IndexOf(AStudent);
if i > -1 then
for j := 0 to 1 do
P.AddRange([FPlants.Items[FArr[j, i * 2 + 1]], FPlants.Items[FArr[j, i * 2 + 2]]]);
Result := p.ToArray;
P.DisposeOf;
end;
end.
| 20.677419 | 89 | 0.659126 |
83ef7c6cd4141c5160ef14b192944597001a1c9a
| 267 |
pas
|
Pascal
|
CAT/tests/001. arithmetic/boolean/or/bool_or_3.pas
|
SkliarOleksandr/NextPascal
|
4dc26abba6613f64c0e6b5864b3348711eb9617a
|
[
"Apache-2.0"
] | 19 |
2018-10-22T23:45:31.000Z
|
2021-05-16T00:06:49.000Z
|
CAT/tests/001. arithmetic/boolean/or/bool_or_3.pas
|
SkliarOleksandr/NextPascal
|
4dc26abba6613f64c0e6b5864b3348711eb9617a
|
[
"Apache-2.0"
] | 1 |
2019-06-01T06:17:08.000Z
|
2019-12-28T10:27:42.000Z
|
CAT/tests/001. arithmetic/boolean/or/bool_or_3.pas
|
SkliarOleksandr/NextPascal
|
4dc26abba6613f64c0e6b5864b3348711eb9617a
|
[
"Apache-2.0"
] | 6 |
2018-08-30T05:16:21.000Z
|
2021-05-12T20:25:43.000Z
|
unit bool_or_3;
interface
implementation
var
d1, d2: Boolean = False;
b1, b2, b3: Boolean = True;
procedure Test;
begin
d1 := b1 or b2 or b3;
d2 := not(b1 or b2 or b3);
end;
initialization
Test();
finalization
Assert(d1);
Assert(not d2);
end.
| 11.125 | 30 | 0.644195 |
85ca8bc02d1087e081c371ba227abdbf14e8c001
| 120 |
pas
|
Pascal
|
Test/FunctionsTime/parse_year.pas
|
caxsf/dwscript
|
410a0416db3d4baf984e041b9cbf5707f2f8895f
|
[
"Condor-1.1"
] | 79 |
2015-03-18T10:46:13.000Z
|
2022-03-17T18:05:11.000Z
|
Test/FunctionsTime/parse_year.pas
|
caxsf/dwscript
|
410a0416db3d4baf984e041b9cbf5707f2f8895f
|
[
"Condor-1.1"
] | 6 |
2016-03-29T14:39:00.000Z
|
2020-09-14T10:04:14.000Z
|
Test/FunctionsTime/parse_year.pas
|
caxsf/dwscript
|
410a0416db3d4baf984e041b9cbf5707f2f8895f
|
[
"Condor-1.1"
] | 25 |
2016-05-04T13:11:38.000Z
|
2021-09-29T13:34:31.000Z
|
PrintLn(ParseDateTime('dd/mm/yy', '01/01/20').ToString(0));
PrintLn(ParseDateTime('dd/mm/yy', '01/01/99').ToString(0));
| 60 | 60 | 0.683333 |
85b43c2e77ca9120878f9de22d10e52838b82d0a
| 137,067 |
pas
|
Pascal
|
Source/DIOCP/source/Z.ElAES.pas
|
PassByYou888/ZNet
|
8f5439ec275ee4eb5d68e00c33675e6117379fcf
|
[
"BSD-3-Clause"
] | 24 |
2022-01-20T13:59:38.000Z
|
2022-03-25T01:11:43.000Z
|
Source/DIOCP/source/Z.ElAES.pas
|
lovong/ZNet
|
ad67382654ea1979c316c2dc9716fd6d8509f028
|
[
"BSD-3-Clause"
] | null | null | null |
Source/DIOCP/source/Z.ElAES.pas
|
lovong/ZNet
|
ad67382654ea1979c316c2dc9716fd6d8509f028
|
[
"BSD-3-Clause"
] | 5 |
2022-01-20T14:44:24.000Z
|
2022-02-13T10:07:38.000Z
|
(**************************************************)
(* *)
(* Advanced Encryption Standard (AES) *)
(* *)
(* Copyright (c) 1998-2001 *)
(* EldoS, Alexander Ionov *)
(* *)
(**************************************************)
unit Z.ElAES;
interface
uses
Classes, SysUtils;
type
EAESError = class(Exception);
PInteger = ^Integer;
TAESBuffer = array [0..15] of byte;
TAESKey128 = array [0..15] of byte;
TAESKey192 = array [0..23] of byte;
TAESKey256 = array [0..31] of byte;
TAESExpandedKey128 = array [0..43] of longword;
TAESExpandedKey192 = array [0..53] of longword;
TAESExpandedKey256 = array [0..63] of longword;
PAESBuffer =^TAESBuffer;
PAESKey128 =^TAESKey128;
PAESKey192 =^TAESKey192;
PAESKey256 =^TAESKey256;
PAESExpandedKey128 =^TAESExpandedKey128;
PAESExpandedKey192 =^TAESExpandedKey192;
PAESExpandedKey256 =^TAESExpandedKey256;
// Key expansion routines for encryption
procedure ExpandAESKeyForEncryption(const Key: TAESKey128;
var ExpandedKey: TAESExpandedKey128); overload;
procedure ExpandAESKeyForEncryption(const Key: TAESKey192;
var ExpandedKey: TAESExpandedKey192); overload;
procedure ExpandAESKeyForEncryption(const Key: TAESKey256;
var ExpandedKey: TAESExpandedKey256); overload;
// Block encryption routines
procedure EncryptAES(const InBuf: TAESBuffer; const Key: TAESExpandedKey128;
var OutBuf: TAESBuffer); overload;
procedure EncryptAES(const InBuf: TAESBuffer; const Key: TAESExpandedKey192;
var OutBuf: TAESBuffer); overload;
procedure EncryptAES(const InBuf: TAESBuffer; const Key: TAESExpandedKey256;
var OutBuf: TAESBuffer); overload;
// Stream encryption routines (ECB mode)
procedure EncryptAESStreamECB(Source: TStream; Count: cardinal;
const Key: TAESKey128; Dest: TStream); overload;
procedure EncryptAESStreamECB(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey128; Dest: TStream); overload;
procedure EncryptAESStreamECB(Source: TStream; Count: cardinal;
const Key: TAESKey192; Dest: TStream); overload;
procedure EncryptAESStreamECB(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey192; Dest: TStream); overload;
procedure EncryptAESStreamECB(Source: TStream; Count: cardinal;
const Key: TAESKey256; Dest: TStream); overload;
procedure EncryptAESStreamECB(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey256; Dest: TStream); overload;
// Stream encryption routines (CBC mode)
procedure EncryptAESStreamCBC(Source: TStream; Count: cardinal;
const Key: TAESKey128; const InitVector: TAESBuffer; Dest: TStream); overload;
procedure EncryptAESStreamCBC(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey128; const InitVector: TAESBuffer;
Dest: TStream); overload;
procedure EncryptAESStreamCBC(Source: TStream; Count: cardinal;
const Key: TAESKey192; const InitVector: TAESBuffer; Dest: TStream); overload;
procedure EncryptAESStreamCBC(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey192; const InitVector: TAESBuffer;
Dest: TStream); overload;
procedure EncryptAESStreamCBC(Source: TStream; Count: cardinal;
const Key: TAESKey256; const InitVector: TAESBuffer; Dest: TStream); overload;
procedure EncryptAESStreamCBC(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey256; const InitVector: TAESBuffer;
Dest: TStream); overload;
// Key transformation routines for decryption
procedure ExpandAESKeyForDecryption(var ExpandedKey: TAESExpandedKey128); overload;
procedure ExpandAESKeyForDecryption(const Key: TAESKey128;
var ExpandedKey: TAESExpandedKey128); overload;
procedure ExpandAESKeyForDecryption(var ExpandedKey: TAESExpandedKey192); overload;
procedure ExpandAESKeyForDecryption(const Key: TAESKey192;
var ExpandedKey: TAESExpandedKey192); overload;
procedure ExpandAESKeyForDecryption(var ExpandedKey: TAESExpandedKey256); overload;
procedure ExpandAESKeyForDecryption(const Key: TAESKey256;
var ExpandedKey: TAESExpandedKey256); overload;
// Block decryption routines
procedure DecryptAES(const InBuf: TAESBuffer; const Key: TAESExpandedKey128;
var OutBuf: TAESBuffer); overload;
procedure DecryptAES(const InBuf: TAESBuffer; const Key: TAESExpandedKey192;
var OutBuf: TAESBuffer); overload;
procedure DecryptAES(const InBuf: TAESBuffer; const Key: TAESExpandedKey256;
var OutBuf: TAESBuffer); overload;
// Stream decryption routines (ECB mode)
procedure DecryptAESStreamECB(Source: TStream; Count: cardinal;
const Key: TAESKey128; Dest: TStream); overload;
procedure DecryptAESStreamECB(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey128; Dest: TStream); overload;
procedure DecryptAESStreamECB(Source: TStream; Count: cardinal;
const Key: TAESKey192; Dest: TStream); overload;
procedure DecryptAESStreamECB(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey192; Dest: TStream); overload;
procedure DecryptAESStreamECB(Source: TStream; Count: cardinal;
const Key: TAESKey256; Dest: TStream); overload;
procedure DecryptAESStreamECB(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey256; Dest: TStream); overload;
// Stream decryption routines (CBC mode)
procedure DecryptAESStreamCBC(Source: TStream; Count: cardinal;
const Key: TAESKey128; const InitVector: TAESBuffer; Dest: TStream); overload;
procedure DecryptAESStreamCBC(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey128; const InitVector: TAESBuffer;
Dest: TStream); overload;
procedure DecryptAESStreamCBC(Source: TStream; Count: cardinal;
const Key: TAESKey192; const InitVector: TAESBuffer; Dest: TStream); overload;
procedure DecryptAESStreamCBC(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey192; const InitVector: TAESBuffer;
Dest: TStream); overload;
procedure DecryptAESStreamCBC(Source: TStream; Count: cardinal;
const Key: TAESKey256; const InitVector: TAESBuffer; Dest: TStream); overload;
procedure DecryptAESStreamCBC(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey256; const InitVector: TAESBuffer;
Dest: TStream); overload;
resourcestring
SInvalidInBufSize = 'Invalid buffer size for decryption';
SReadError = 'Stream read error';
SWriteError = 'Stream write error';
implementation
type
PLongWord = ^LongWord;
function Min(A, B: integer): integer;
begin
if A < B then
Result := A
else
Result := B;
end;
const
Rcon: array [1..30] of longword = (
$00000001, $00000002, $00000004, $00000008, $00000010, $00000020,
$00000040, $00000080, $0000001B, $00000036, $0000006C, $000000D8,
$000000AB, $0000004D, $0000009A, $0000002F, $0000005E, $000000BC,
$00000063, $000000C6, $00000097, $00000035, $0000006A, $000000D4,
$000000B3, $0000007D, $000000FA, $000000EF, $000000C5, $00000091
);
ForwardTable: array [0..255] of longword = (
$A56363C6, $847C7CF8, $997777EE, $8D7B7BF6, $0DF2F2FF, $BD6B6BD6, $B16F6FDE, $54C5C591,
$50303060, $03010102, $A96767CE, $7D2B2B56, $19FEFEE7, $62D7D7B5, $E6ABAB4D, $9A7676EC,
$45CACA8F, $9D82821F, $40C9C989, $877D7DFA, $15FAFAEF, $EB5959B2, $C947478E, $0BF0F0FB,
$ECADAD41, $67D4D4B3, $FDA2A25F, $EAAFAF45, $BF9C9C23, $F7A4A453, $967272E4, $5BC0C09B,
$C2B7B775, $1CFDFDE1, $AE93933D, $6A26264C, $5A36366C, $413F3F7E, $02F7F7F5, $4FCCCC83,
$5C343468, $F4A5A551, $34E5E5D1, $08F1F1F9, $937171E2, $73D8D8AB, $53313162, $3F15152A,
$0C040408, $52C7C795, $65232346, $5EC3C39D, $28181830, $A1969637, $0F05050A, $B59A9A2F,
$0907070E, $36121224, $9B80801B, $3DE2E2DF, $26EBEBCD, $6927274E, $CDB2B27F, $9F7575EA,
$1B090912, $9E83831D, $742C2C58, $2E1A1A34, $2D1B1B36, $B26E6EDC, $EE5A5AB4, $FBA0A05B,
$F65252A4, $4D3B3B76, $61D6D6B7, $CEB3B37D, $7B292952, $3EE3E3DD, $712F2F5E, $97848413,
$F55353A6, $68D1D1B9, $00000000, $2CEDEDC1, $60202040, $1FFCFCE3, $C8B1B179, $ED5B5BB6,
$BE6A6AD4, $46CBCB8D, $D9BEBE67, $4B393972, $DE4A4A94, $D44C4C98, $E85858B0, $4ACFCF85,
$6BD0D0BB, $2AEFEFC5, $E5AAAA4F, $16FBFBED, $C5434386, $D74D4D9A, $55333366, $94858511,
$CF45458A, $10F9F9E9, $06020204, $817F7FFE, $F05050A0, $443C3C78, $BA9F9F25, $E3A8A84B,
$F35151A2, $FEA3A35D, $C0404080, $8A8F8F05, $AD92923F, $BC9D9D21, $48383870, $04F5F5F1,
$DFBCBC63, $C1B6B677, $75DADAAF, $63212142, $30101020, $1AFFFFE5, $0EF3F3FD, $6DD2D2BF,
$4CCDCD81, $140C0C18, $35131326, $2FECECC3, $E15F5FBE, $A2979735, $CC444488, $3917172E,
$57C4C493, $F2A7A755, $827E7EFC, $473D3D7A, $AC6464C8, $E75D5DBA, $2B191932, $957373E6,
$A06060C0, $98818119, $D14F4F9E, $7FDCDCA3, $66222244, $7E2A2A54, $AB90903B, $8388880B,
$CA46468C, $29EEEEC7, $D3B8B86B, $3C141428, $79DEDEA7, $E25E5EBC, $1D0B0B16, $76DBDBAD,
$3BE0E0DB, $56323264, $4E3A3A74, $1E0A0A14, $DB494992, $0A06060C, $6C242448, $E45C5CB8,
$5DC2C29F, $6ED3D3BD, $EFACAC43, $A66262C4, $A8919139, $A4959531, $37E4E4D3, $8B7979F2,
$32E7E7D5, $43C8C88B, $5937376E, $B76D6DDA, $8C8D8D01, $64D5D5B1, $D24E4E9C, $E0A9A949,
$B46C6CD8, $FA5656AC, $07F4F4F3, $25EAEACF, $AF6565CA, $8E7A7AF4, $E9AEAE47, $18080810,
$D5BABA6F, $887878F0, $6F25254A, $722E2E5C, $241C1C38, $F1A6A657, $C7B4B473, $51C6C697,
$23E8E8CB, $7CDDDDA1, $9C7474E8, $211F1F3E, $DD4B4B96, $DCBDBD61, $868B8B0D, $858A8A0F,
$907070E0, $423E3E7C, $C4B5B571, $AA6666CC, $D8484890, $05030306, $01F6F6F7, $120E0E1C,
$A36161C2, $5F35356A, $F95757AE, $D0B9B969, $91868617, $58C1C199, $271D1D3A, $B99E9E27,
$38E1E1D9, $13F8F8EB, $B398982B, $33111122, $BB6969D2, $70D9D9A9, $898E8E07, $A7949433,
$B69B9B2D, $221E1E3C, $92878715, $20E9E9C9, $49CECE87, $FF5555AA, $78282850, $7ADFDFA5,
$8F8C8C03, $F8A1A159, $80898909, $170D0D1A, $DABFBF65, $31E6E6D7, $C6424284, $B86868D0,
$C3414182, $B0999929, $772D2D5A, $110F0F1E, $CBB0B07B, $FC5454A8, $D6BBBB6D, $3A16162C
);
LastForwardTable: array [0..255] of longword = (
$00000063, $0000007C, $00000077, $0000007B, $000000F2, $0000006B, $0000006F, $000000C5,
$00000030, $00000001, $00000067, $0000002B, $000000FE, $000000D7, $000000AB, $00000076,
$000000CA, $00000082, $000000C9, $0000007D, $000000FA, $00000059, $00000047, $000000F0,
$000000AD, $000000D4, $000000A2, $000000AF, $0000009C, $000000A4, $00000072, $000000C0,
$000000B7, $000000FD, $00000093, $00000026, $00000036, $0000003F, $000000F7, $000000CC,
$00000034, $000000A5, $000000E5, $000000F1, $00000071, $000000D8, $00000031, $00000015,
$00000004, $000000C7, $00000023, $000000C3, $00000018, $00000096, $00000005, $0000009A,
$00000007, $00000012, $00000080, $000000E2, $000000EB, $00000027, $000000B2, $00000075,
$00000009, $00000083, $0000002C, $0000001A, $0000001B, $0000006E, $0000005A, $000000A0,
$00000052, $0000003B, $000000D6, $000000B3, $00000029, $000000E3, $0000002F, $00000084,
$00000053, $000000D1, $00000000, $000000ED, $00000020, $000000FC, $000000B1, $0000005B,
$0000006A, $000000CB, $000000BE, $00000039, $0000004A, $0000004C, $00000058, $000000CF,
$000000D0, $000000EF, $000000AA, $000000FB, $00000043, $0000004D, $00000033, $00000085,
$00000045, $000000F9, $00000002, $0000007F, $00000050, $0000003C, $0000009F, $000000A8,
$00000051, $000000A3, $00000040, $0000008F, $00000092, $0000009D, $00000038, $000000F5,
$000000BC, $000000B6, $000000DA, $00000021, $00000010, $000000FF, $000000F3, $000000D2,
$000000CD, $0000000C, $00000013, $000000EC, $0000005F, $00000097, $00000044, $00000017,
$000000C4, $000000A7, $0000007E, $0000003D, $00000064, $0000005D, $00000019, $00000073,
$00000060, $00000081, $0000004F, $000000DC, $00000022, $0000002A, $00000090, $00000088,
$00000046, $000000EE, $000000B8, $00000014, $000000DE, $0000005E, $0000000B, $000000DB,
$000000E0, $00000032, $0000003A, $0000000A, $00000049, $00000006, $00000024, $0000005C,
$000000C2, $000000D3, $000000AC, $00000062, $00000091, $00000095, $000000E4, $00000079,
$000000E7, $000000C8, $00000037, $0000006D, $0000008D, $000000D5, $0000004E, $000000A9,
$0000006C, $00000056, $000000F4, $000000EA, $00000065, $0000007A, $000000AE, $00000008,
$000000BA, $00000078, $00000025, $0000002E, $0000001C, $000000A6, $000000B4, $000000C6,
$000000E8, $000000DD, $00000074, $0000001F, $0000004B, $000000BD, $0000008B, $0000008A,
$00000070, $0000003E, $000000B5, $00000066, $00000048, $00000003, $000000F6, $0000000E,
$00000061, $00000035, $00000057, $000000B9, $00000086, $000000C1, $0000001D, $0000009E,
$000000E1, $000000F8, $00000098, $00000011, $00000069, $000000D9, $0000008E, $00000094,
$0000009B, $0000001E, $00000087, $000000E9, $000000CE, $00000055, $00000028, $000000DF,
$0000008C, $000000A1, $00000089, $0000000D, $000000BF, $000000E6, $00000042, $00000068,
$00000041, $00000099, $0000002D, $0000000F, $000000B0, $00000054, $000000BB, $00000016
);
InverseTable: array [0..255] of longword = (
$50A7F451, $5365417E, $C3A4171A, $965E273A, $CB6BAB3B, $F1459D1F, $AB58FAAC, $9303E34B,
$55FA3020, $F66D76AD, $9176CC88, $254C02F5, $FCD7E54F, $D7CB2AC5, $80443526, $8FA362B5,
$495AB1DE, $671BBA25, $980EEA45, $E1C0FE5D, $02752FC3, $12F04C81, $A397468D, $C6F9D36B,
$E75F8F03, $959C9215, $EB7A6DBF, $DA595295, $2D83BED4, $D3217458, $2969E049, $44C8C98E,
$6A89C275, $78798EF4, $6B3E5899, $DD71B927, $B64FE1BE, $17AD88F0, $66AC20C9, $B43ACE7D,
$184ADF63, $82311AE5, $60335197, $457F5362, $E07764B1, $84AE6BBB, $1CA081FE, $942B08F9,
$58684870, $19FD458F, $876CDE94, $B7F87B52, $23D373AB, $E2024B72, $578F1FE3, $2AAB5566,
$0728EBB2, $03C2B52F, $9A7BC586, $A50837D3, $F2872830, $B2A5BF23, $BA6A0302, $5C8216ED,
$2B1CCF8A, $92B479A7, $F0F207F3, $A1E2694E, $CDF4DA65, $D5BE0506, $1F6234D1, $8AFEA6C4,
$9D532E34, $A055F3A2, $32E18A05, $75EBF6A4, $39EC830B, $AAEF6040, $069F715E, $51106EBD,
$F98A213E, $3D06DD96, $AE053EDD, $46BDE64D, $B58D5491, $055DC471, $6FD40604, $FF155060,
$24FB9819, $97E9BDD6, $CC434089, $779ED967, $BD42E8B0, $888B8907, $385B19E7, $DBEEC879,
$470A7CA1, $E90F427C, $C91E84F8, $00000000, $83868009, $48ED2B32, $AC70111E, $4E725A6C,
$FBFF0EFD, $5638850F, $1ED5AE3D, $27392D36, $64D90F0A, $21A65C68, $D1545B9B, $3A2E3624,
$B1670A0C, $0FE75793, $D296EEB4, $9E919B1B, $4FC5C080, $A220DC61, $694B775A, $161A121C,
$0ABA93E2, $E52AA0C0, $43E0223C, $1D171B12, $0B0D090E, $ADC78BF2, $B9A8B62D, $C8A91E14,
$8519F157, $4C0775AF, $BBDD99EE, $FD607FA3, $9F2601F7, $BCF5725C, $C53B6644, $347EFB5B,
$7629438B, $DCC623CB, $68FCEDB6, $63F1E4B8, $CADC31D7, $10856342, $40229713, $2011C684,
$7D244A85, $F83DBBD2, $1132F9AE, $6DA129C7, $4B2F9E1D, $F330B2DC, $EC52860D, $D0E3C177,
$6C16B32B, $99B970A9, $FA489411, $2264E947, $C48CFCA8, $1A3FF0A0, $D82C7D56, $EF903322,
$C74E4987, $C1D138D9, $FEA2CA8C, $360BD498, $CF81F5A6, $28DE7AA5, $268EB7DA, $A4BFAD3F,
$E49D3A2C, $0D927850, $9BCC5F6A, $62467E54, $C2138DF6, $E8B8D890, $5EF7392E, $F5AFC382,
$BE805D9F, $7C93D069, $A92DD56F, $B31225CF, $3B99ACC8, $A77D1810, $6E639CE8, $7BBB3BDB,
$097826CD, $F418596E, $01B79AEC, $A89A4F83, $656E95E6, $7EE6FFAA, $08CFBC21, $E6E815EF,
$D99BE7BA, $CE366F4A, $D4099FEA, $D67CB029, $AFB2A431, $31233F2A, $3094A5C6, $C066A235,
$37BC4E74, $A6CA82FC, $B0D090E0, $15D8A733, $4A9804F1, $F7DAEC41, $0E50CD7F, $2FF69117,
$8DD64D76, $4DB0EF43, $544DAACC, $DF0496E4, $E3B5D19E, $1B886A4C, $B81F2CC1, $7F516546,
$04EA5E9D, $5D358C01, $737487FA, $2E410BFB, $5A1D67B3, $52D2DB92, $335610E9, $1347D66D,
$8C61D79A, $7A0CA137, $8E14F859, $893C13EB, $EE27A9CE, $35C961B7, $EDE51CE1, $3CB1477A,
$59DFD29C, $3F73F255, $79CE1418, $BF37C773, $EACDF753, $5BAAFD5F, $146F3DDF, $86DB4478,
$81F3AFCA, $3EC468B9, $2C342438, $5F40A3C2, $72C31D16, $0C25E2BC, $8B493C28, $41950DFF,
$7101A839, $DEB30C08, $9CE4B4D8, $90C15664, $6184CB7B, $70B632D5, $745C6C48, $4257B8D0
);
LastInverseTable: array [0..255] of longword = (
$00000052, $00000009, $0000006A, $000000D5, $00000030, $00000036, $000000A5, $00000038,
$000000BF, $00000040, $000000A3, $0000009E, $00000081, $000000F3, $000000D7, $000000FB,
$0000007C, $000000E3, $00000039, $00000082, $0000009B, $0000002F, $000000FF, $00000087,
$00000034, $0000008E, $00000043, $00000044, $000000C4, $000000DE, $000000E9, $000000CB,
$00000054, $0000007B, $00000094, $00000032, $000000A6, $000000C2, $00000023, $0000003D,
$000000EE, $0000004C, $00000095, $0000000B, $00000042, $000000FA, $000000C3, $0000004E,
$00000008, $0000002E, $000000A1, $00000066, $00000028, $000000D9, $00000024, $000000B2,
$00000076, $0000005B, $000000A2, $00000049, $0000006D, $0000008B, $000000D1, $00000025,
$00000072, $000000F8, $000000F6, $00000064, $00000086, $00000068, $00000098, $00000016,
$000000D4, $000000A4, $0000005C, $000000CC, $0000005D, $00000065, $000000B6, $00000092,
$0000006C, $00000070, $00000048, $00000050, $000000FD, $000000ED, $000000B9, $000000DA,
$0000005E, $00000015, $00000046, $00000057, $000000A7, $0000008D, $0000009D, $00000084,
$00000090, $000000D8, $000000AB, $00000000, $0000008C, $000000BC, $000000D3, $0000000A,
$000000F7, $000000E4, $00000058, $00000005, $000000B8, $000000B3, $00000045, $00000006,
$000000D0, $0000002C, $0000001E, $0000008F, $000000CA, $0000003F, $0000000F, $00000002,
$000000C1, $000000AF, $000000BD, $00000003, $00000001, $00000013, $0000008A, $0000006B,
$0000003A, $00000091, $00000011, $00000041, $0000004F, $00000067, $000000DC, $000000EA,
$00000097, $000000F2, $000000CF, $000000CE, $000000F0, $000000B4, $000000E6, $00000073,
$00000096, $000000AC, $00000074, $00000022, $000000E7, $000000AD, $00000035, $00000085,
$000000E2, $000000F9, $00000037, $000000E8, $0000001C, $00000075, $000000DF, $0000006E,
$00000047, $000000F1, $0000001A, $00000071, $0000001D, $00000029, $000000C5, $00000089,
$0000006F, $000000B7, $00000062, $0000000E, $000000AA, $00000018, $000000BE, $0000001B,
$000000FC, $00000056, $0000003E, $0000004B, $000000C6, $000000D2, $00000079, $00000020,
$0000009A, $000000DB, $000000C0, $000000FE, $00000078, $000000CD, $0000005A, $000000F4,
$0000001F, $000000DD, $000000A8, $00000033, $00000088, $00000007, $000000C7, $00000031,
$000000B1, $00000012, $00000010, $00000059, $00000027, $00000080, $000000EC, $0000005F,
$00000060, $00000051, $0000007F, $000000A9, $00000019, $000000B5, $0000004A, $0000000D,
$0000002D, $000000E5, $0000007A, $0000009F, $00000093, $000000C9, $0000009C, $000000EF,
$000000A0, $000000E0, $0000003B, $0000004D, $000000AE, $0000002A, $000000F5, $000000B0,
$000000C8, $000000EB, $000000BB, $0000003C, $00000083, $00000053, $00000099, $00000061,
$00000017, $0000002B, $00000004, $0000007E, $000000BA, $00000077, $000000D6, $00000026,
$000000E1, $00000069, $00000014, $00000063, $00000055, $00000021, $0000000C, $0000007D
);
procedure ExpandAESKeyForEncryption(const Key: TAESKey128; var ExpandedKey: TAESExpandedKey128);
var
I, J: integer;
T: longword;
W0, W1, W2, W3: longword;
begin
ExpandedKey[0] := PLongWord(@Key[0])^;
ExpandedKey[1] := PLongWord(@Key[4])^;
ExpandedKey[2] := PLongWord(@Key[8])^;
ExpandedKey[3] := PLongWord(@Key[12])^;
I := 0; J := 1;
repeat
T := (ExpandedKey[I + 3] shl 24) or (ExpandedKey[I + 3] shr 8);
W0 := LastForwardTable[Byte(T)]; W1 := LastForwardTable[Byte(T shr 8)];
W2 := LastForwardTable[Byte(T shr 16)]; W3 := LastForwardTable[Byte(T shr 24)];
ExpandedKey[I + 4] := ExpandedKey[I] xor
(W0 xor ((W1 shl 8) or (W1 shr 24)) xor
((W2 shl 16) or (W2 shr 16)) xor ((W3 shl 24) or (W3 shr 8))) xor Rcon[J];
Inc(J);
ExpandedKey[I + 5] := ExpandedKey[I + 1] xor ExpandedKey[I + 4];
ExpandedKey[I + 6] := ExpandedKey[I + 2] xor ExpandedKey[I + 5];
ExpandedKey[I + 7] := ExpandedKey[I + 3] xor ExpandedKey[I + 6];
Inc(I, 4);
until I >= 40;
end;
procedure ExpandAESKeyForEncryption(const Key: TAESKey192; var ExpandedKey: TAESExpandedKey192); overload;
var
I, J: integer;
T: longword;
W0, W1, W2, W3: longword;
begin
ExpandedKey[0] := PLongWord(@Key[0])^;
ExpandedKey[1] := PLongWord(@Key[4])^;
ExpandedKey[2] := PLongWord(@Key[8])^;
ExpandedKey[3] := PLongWord(@Key[12])^;
ExpandedKey[4] := PLongWord(@Key[16])^;
ExpandedKey[5] := PLongWord(@Key[20])^;
I := 0; J := 1;
repeat
T := (ExpandedKey[I + 5] shl 24) or (ExpandedKey[I + 5] shr 8);
W0 := LastForwardTable[Byte(T)]; W1 := LastForwardTable[Byte(T shr 8)];
W2 := LastForwardTable[Byte(T shr 16)]; W3 := LastForwardTable[Byte(T shr 24)];
ExpandedKey[I + 6] := ExpandedKey[I] xor
(W0 xor ((W1 shl 8) or (W1 shr 24)) xor
((W2 shl 16) or (W2 shr 16)) xor ((W3 shl 24) or (W3 shr 8))) xor Rcon[J];
Inc(J);
ExpandedKey[I + 7] := ExpandedKey[I + 1] xor ExpandedKey[I + 6];
ExpandedKey[I + 8] := ExpandedKey[I + 2] xor ExpandedKey[I + 7];
ExpandedKey[I + 9] := ExpandedKey[I + 3] xor ExpandedKey[I + 8];
ExpandedKey[I + 10] := ExpandedKey[I + 4] xor ExpandedKey[I + 9];
ExpandedKey[I + 11] := ExpandedKey[I + 5] xor ExpandedKey[I + 10];
Inc(I, 6);
until I >= 46;
end;
procedure ExpandAESKeyForEncryption(const Key: TAESKey256; var ExpandedKey: TAESExpandedKey256); overload;
var
I, J: integer;
T: longword;
W0, W1, W2, W3: longword;
begin
ExpandedKey[0] := PLongWord(@Key[0])^;
ExpandedKey[1] := PLongWord(@Key[4])^;
ExpandedKey[2] := PLongWord(@Key[8])^;
ExpandedKey[3] := PLongWord(@Key[12])^;
ExpandedKey[4] := PLongWord(@Key[16])^;
ExpandedKey[5] := PLongWord(@Key[20])^;
ExpandedKey[6] := PLongWord(@Key[24])^;
ExpandedKey[7] := PLongWord(@Key[28])^;
I := 0; J := 1;
repeat
T := (ExpandedKey[I + 7] shl 24) or (ExpandedKey[I + 7] shr 8);
W0 := LastForwardTable[Byte(T)]; W1 := LastForwardTable[Byte(T shr 8)];
W2 := LastForwardTable[Byte(T shr 16)]; W3 := LastForwardTable[Byte(T shr 24)];
ExpandedKey[I + 8] := ExpandedKey[I] xor
(W0 xor ((W1 shl 8) or (W1 shr 24)) xor
((W2 shl 16) or (W2 shr 16)) xor ((W3 shl 24) or (W3 shr 8))) xor Rcon[J];
Inc(J);
ExpandedKey[I + 9] := ExpandedKey[I + 1] xor ExpandedKey[I + 8];
ExpandedKey[I + 10] := ExpandedKey[I + 2] xor ExpandedKey[I + 9];
ExpandedKey[I + 11] := ExpandedKey[I + 3] xor ExpandedKey[I + 10];
W0 := LastForwardTable[Byte(ExpandedKey[I + 11])];
W1 := LastForwardTable[Byte(ExpandedKey[I + 11] shr 8)];
W2 := LastForwardTable[Byte(ExpandedKey[I + 11] shr 16)];
W3 := LastForwardTable[Byte(ExpandedKey[I + 11] shr 24)];
ExpandedKey[I + 12] := ExpandedKey[I + 4] xor
(W0 xor ((W1 shl 8) or (W1 shr 24)) xor
((W2 shl 16) or (W2 shr 16)) xor ((W3 shl 24) or (W3 shr 8)));
ExpandedKey[I + 13] := ExpandedKey[I + 5] xor ExpandedKey[I + 12];
ExpandedKey[I + 14] := ExpandedKey[I + 6] xor ExpandedKey[I + 13];
ExpandedKey[I + 15] := ExpandedKey[I + 7] xor ExpandedKey[I + 14];
Inc(I, 8);
until I >= 52;
end;
procedure EncryptAES(const InBuf: TAESBuffer; const Key: TAESExpandedKey128;
var OutBuf: TAESBuffer);
var
T0, T1: array [0..3] of longword;
W0, W1, W2, W3: longword;
begin
// initializing
T0[0] := PLongWord(@InBuf[0])^ xor Key[0];
T0[1] := PLongWord(@InBuf[4])^ xor Key[1];
T0[2] := PLongWord(@InBuf[8])^ xor Key[2];
T0[3] := PLongWord(@InBuf[12])^ xor Key[3];
// performing transformation 9 times
// round 1
W0 := ForwardTable[Byte(T0[0])]; W1 := ForwardTable[Byte(T0[1] shr 8)];
W2 := ForwardTable[Byte(T0[2] shr 16)]; W3 := ForwardTable[Byte(T0[3] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[4];
W0 := ForwardTable[Byte(T0[1])]; W1 := ForwardTable[Byte(T0[2] shr 8)];
W2 := ForwardTable[Byte(T0[3] shr 16)]; W3 := ForwardTable[Byte(T0[0] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[5];
W0 := ForwardTable[Byte(T0[2])]; W1 := ForwardTable[Byte(T0[3] shr 8)];
W2 := ForwardTable[Byte(T0[0] shr 16)]; W3 := ForwardTable[Byte(T0[1] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[6];
W0 := ForwardTable[Byte(T0[3])]; W1 := ForwardTable[Byte(T0[0] shr 8)];
W2 := ForwardTable[Byte(T0[1] shr 16)]; W3 := ForwardTable[Byte(T0[2] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[7];
// round 2
W0 := ForwardTable[Byte(T1[0])]; W1 := ForwardTable[Byte(T1[1] shr 8)];
W2 := ForwardTable[Byte(T1[2] shr 16)]; W3 := ForwardTable[Byte(T1[3] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[8];
W0 := ForwardTable[Byte(T1[1])]; W1 := ForwardTable[Byte(T1[2] shr 8)];
W2 := ForwardTable[Byte(T1[3] shr 16)]; W3 := ForwardTable[Byte(T1[0] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[9];
W0 := ForwardTable[Byte(T1[2])]; W1 := ForwardTable[Byte(T1[3] shr 8)];
W2 := ForwardTable[Byte(T1[0] shr 16)]; W3 := ForwardTable[Byte(T1[1] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[10];
W0 := ForwardTable[Byte(T1[3])]; W1 := ForwardTable[Byte(T1[0] shr 8)];
W2 := ForwardTable[Byte(T1[1] shr 16)]; W3 := ForwardTable[Byte(T1[2] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[11];
// round 3
W0 := ForwardTable[Byte(T0[0])]; W1 := ForwardTable[Byte(T0[1] shr 8)];
W2 := ForwardTable[Byte(T0[2] shr 16)]; W3 := ForwardTable[Byte(T0[3] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[12];
W0 := ForwardTable[Byte(T0[1])]; W1 := ForwardTable[Byte(T0[2] shr 8)];
W2 := ForwardTable[Byte(T0[3] shr 16)]; W3 := ForwardTable[Byte(T0[0] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[13];
W0 := ForwardTable[Byte(T0[2])]; W1 := ForwardTable[Byte(T0[3] shr 8)];
W2 := ForwardTable[Byte(T0[0] shr 16)]; W3 := ForwardTable[Byte(T0[1] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[14];
W0 := ForwardTable[Byte(T0[3])]; W1 := ForwardTable[Byte(T0[0] shr 8)];
W2 := ForwardTable[Byte(T0[1] shr 16)]; W3 := ForwardTable[Byte(T0[2] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[15];
// round 4
W0 := ForwardTable[Byte(T1[0])]; W1 := ForwardTable[Byte(T1[1] shr 8)];
W2 := ForwardTable[Byte(T1[2] shr 16)]; W3 := ForwardTable[Byte(T1[3] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[16];
W0 := ForwardTable[Byte(T1[1])]; W1 := ForwardTable[Byte(T1[2] shr 8)];
W2 := ForwardTable[Byte(T1[3] shr 16)]; W3 := ForwardTable[Byte(T1[0] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[17];
W0 := ForwardTable[Byte(T1[2])]; W1 := ForwardTable[Byte(T1[3] shr 8)];
W2 := ForwardTable[Byte(T1[0] shr 16)]; W3 := ForwardTable[Byte(T1[1] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[18];
W0 := ForwardTable[Byte(T1[3])]; W1 := ForwardTable[Byte(T1[0] shr 8)];
W2 := ForwardTable[Byte(T1[1] shr 16)]; W3 := ForwardTable[Byte(T1[2] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[19];
// round 5
W0 := ForwardTable[Byte(T0[0])]; W1 := ForwardTable[Byte(T0[1] shr 8)];
W2 := ForwardTable[Byte(T0[2] shr 16)]; W3 := ForwardTable[Byte(T0[3] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[20];
W0 := ForwardTable[Byte(T0[1])]; W1 := ForwardTable[Byte(T0[2] shr 8)];
W2 := ForwardTable[Byte(T0[3] shr 16)]; W3 := ForwardTable[Byte(T0[0] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[21];
W0 := ForwardTable[Byte(T0[2])]; W1 := ForwardTable[Byte(T0[3] shr 8)];
W2 := ForwardTable[Byte(T0[0] shr 16)]; W3 := ForwardTable[Byte(T0[1] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[22];
W0 := ForwardTable[Byte(T0[3])]; W1 := ForwardTable[Byte(T0[0] shr 8)];
W2 := ForwardTable[Byte(T0[1] shr 16)]; W3 := ForwardTable[Byte(T0[2] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[23];
// round 6
W0 := ForwardTable[Byte(T1[0])]; W1 := ForwardTable[Byte(T1[1] shr 8)];
W2 := ForwardTable[Byte(T1[2] shr 16)]; W3 := ForwardTable[Byte(T1[3] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[24];
W0 := ForwardTable[Byte(T1[1])]; W1 := ForwardTable[Byte(T1[2] shr 8)];
W2 := ForwardTable[Byte(T1[3] shr 16)]; W3 := ForwardTable[Byte(T1[0] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[25];
W0 := ForwardTable[Byte(T1[2])]; W1 := ForwardTable[Byte(T1[3] shr 8)];
W2 := ForwardTable[Byte(T1[0] shr 16)]; W3 := ForwardTable[Byte(T1[1] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[26];
W0 := ForwardTable[Byte(T1[3])]; W1 := ForwardTable[Byte(T1[0] shr 8)];
W2 := ForwardTable[Byte(T1[1] shr 16)]; W3 := ForwardTable[Byte(T1[2] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[27];
// round 7
W0 := ForwardTable[Byte(T0[0])]; W1 := ForwardTable[Byte(T0[1] shr 8)];
W2 := ForwardTable[Byte(T0[2] shr 16)]; W3 := ForwardTable[Byte(T0[3] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[28];
W0 := ForwardTable[Byte(T0[1])]; W1 := ForwardTable[Byte(T0[2] shr 8)];
W2 := ForwardTable[Byte(T0[3] shr 16)]; W3 := ForwardTable[Byte(T0[0] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[29];
W0 := ForwardTable[Byte(T0[2])]; W1 := ForwardTable[Byte(T0[3] shr 8)];
W2 := ForwardTable[Byte(T0[0] shr 16)]; W3 := ForwardTable[Byte(T0[1] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[30];
W0 := ForwardTable[Byte(T0[3])]; W1 := ForwardTable[Byte(T0[0] shr 8)];
W2 := ForwardTable[Byte(T0[1] shr 16)]; W3 := ForwardTable[Byte(T0[2] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[31];
// round 8
W0 := ForwardTable[Byte(T1[0])]; W1 := ForwardTable[Byte(T1[1] shr 8)];
W2 := ForwardTable[Byte(T1[2] shr 16)]; W3 := ForwardTable[Byte(T1[3] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[32];
W0 := ForwardTable[Byte(T1[1])]; W1 := ForwardTable[Byte(T1[2] shr 8)];
W2 := ForwardTable[Byte(T1[3] shr 16)]; W3 := ForwardTable[Byte(T1[0] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[33];
W0 := ForwardTable[Byte(T1[2])]; W1 := ForwardTable[Byte(T1[3] shr 8)];
W2 := ForwardTable[Byte(T1[0] shr 16)]; W3 := ForwardTable[Byte(T1[1] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[34];
W0 := ForwardTable[Byte(T1[3])]; W1 := ForwardTable[Byte(T1[0] shr 8)];
W2 := ForwardTable[Byte(T1[1] shr 16)]; W3 := ForwardTable[Byte(T1[2] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[35];
// round 9
W0 := ForwardTable[Byte(T0[0])]; W1 := ForwardTable[Byte(T0[1] shr 8)];
W2 := ForwardTable[Byte(T0[2] shr 16)]; W3 := ForwardTable[Byte(T0[3] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[36];
W0 := ForwardTable[Byte(T0[1])]; W1 := ForwardTable[Byte(T0[2] shr 8)];
W2 := ForwardTable[Byte(T0[3] shr 16)]; W3 := ForwardTable[Byte(T0[0] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[37];
W0 := ForwardTable[Byte(T0[2])]; W1 := ForwardTable[Byte(T0[3] shr 8)];
W2 := ForwardTable[Byte(T0[0] shr 16)]; W3 := ForwardTable[Byte(T0[1] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[38];
W0 := ForwardTable[Byte(T0[3])]; W1 := ForwardTable[Byte(T0[0] shr 8)];
W2 := ForwardTable[Byte(T0[1] shr 16)]; W3 := ForwardTable[Byte(T0[2] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[39];
// last round of transformations
W0 := LastForwardTable[Byte(T1[0])]; W1 := LastForwardTable[Byte(T1[1] shr 8)];
W2 := LastForwardTable[Byte(T1[2] shr 16)]; W3 := LastForwardTable[Byte(T1[3] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[40];
W0 := LastForwardTable[Byte(T1[1])]; W1 := LastForwardTable[Byte(T1[2] shr 8)];
W2 := LastForwardTable[Byte(T1[3] shr 16)]; W3 := LastForwardTable[Byte(T1[0] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[41];
W0 := LastForwardTable[Byte(T1[2])]; W1 := LastForwardTable[Byte(T1[3] shr 8)];
W2 := LastForwardTable[Byte(T1[0] shr 16)]; W3 := LastForwardTable[Byte(T1[1] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[42];
W0 := LastForwardTable[Byte(T1[3])]; W1 := LastForwardTable[Byte(T1[0] shr 8)];
W2 := LastForwardTable[Byte(T1[1] shr 16)]; W3 := LastForwardTable[Byte(T1[2] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[43];
// finalizing
PLongWord(@OutBuf[0])^ := T0[0]; PLongWord(@OutBuf[4])^ := T0[1];
PLongWord(@OutBuf[8])^ := T0[2]; PLongWord(@OutBuf[12])^ := T0[3];
end;
procedure EncryptAES(const InBuf: TAESBuffer; const Key: TAESExpandedKey192;
var OutBuf: TAESBuffer);
var
T0, T1: array [0..3] of longword;
W0, W1, W2, W3: longword;
begin
// initializing
T0[0] := PLongWord(@InBuf[0])^ xor Key[0];
T0[1] := PLongWord(@InBuf[4])^ xor Key[1];
T0[2] := PLongWord(@InBuf[8])^ xor Key[2];
T0[3] := PLongWord(@InBuf[12])^ xor Key[3];
// performing transformation 11 times
// round 1
W0 := ForwardTable[Byte(T0[0])]; W1 := ForwardTable[Byte(T0[1] shr 8)];
W2 := ForwardTable[Byte(T0[2] shr 16)]; W3 := ForwardTable[Byte(T0[3] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[4];
W0 := ForwardTable[Byte(T0[1])]; W1 := ForwardTable[Byte(T0[2] shr 8)];
W2 := ForwardTable[Byte(T0[3] shr 16)]; W3 := ForwardTable[Byte(T0[0] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[5];
W0 := ForwardTable[Byte(T0[2])]; W1 := ForwardTable[Byte(T0[3] shr 8)];
W2 := ForwardTable[Byte(T0[0] shr 16)]; W3 := ForwardTable[Byte(T0[1] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[6];
W0 := ForwardTable[Byte(T0[3])]; W1 := ForwardTable[Byte(T0[0] shr 8)];
W2 := ForwardTable[Byte(T0[1] shr 16)]; W3 := ForwardTable[Byte(T0[2] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[7];
// round 2
W0 := ForwardTable[Byte(T1[0])]; W1 := ForwardTable[Byte(T1[1] shr 8)];
W2 := ForwardTable[Byte(T1[2] shr 16)]; W3 := ForwardTable[Byte(T1[3] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[8];
W0 := ForwardTable[Byte(T1[1])]; W1 := ForwardTable[Byte(T1[2] shr 8)];
W2 := ForwardTable[Byte(T1[3] shr 16)]; W3 := ForwardTable[Byte(T1[0] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[9];
W0 := ForwardTable[Byte(T1[2])]; W1 := ForwardTable[Byte(T1[3] shr 8)];
W2 := ForwardTable[Byte(T1[0] shr 16)]; W3 := ForwardTable[Byte(T1[1] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[10];
W0 := ForwardTable[Byte(T1[3])]; W1 := ForwardTable[Byte(T1[0] shr 8)];
W2 := ForwardTable[Byte(T1[1] shr 16)]; W3 := ForwardTable[Byte(T1[2] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[11];
// round 3
W0 := ForwardTable[Byte(T0[0])]; W1 := ForwardTable[Byte(T0[1] shr 8)];
W2 := ForwardTable[Byte(T0[2] shr 16)]; W3 := ForwardTable[Byte(T0[3] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[12];
W0 := ForwardTable[Byte(T0[1])]; W1 := ForwardTable[Byte(T0[2] shr 8)];
W2 := ForwardTable[Byte(T0[3] shr 16)]; W3 := ForwardTable[Byte(T0[0] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[13];
W0 := ForwardTable[Byte(T0[2])]; W1 := ForwardTable[Byte(T0[3] shr 8)];
W2 := ForwardTable[Byte(T0[0] shr 16)]; W3 := ForwardTable[Byte(T0[1] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[14];
W0 := ForwardTable[Byte(T0[3])]; W1 := ForwardTable[Byte(T0[0] shr 8)];
W2 := ForwardTable[Byte(T0[1] shr 16)]; W3 := ForwardTable[Byte(T0[2] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[15];
// round 4
W0 := ForwardTable[Byte(T1[0])]; W1 := ForwardTable[Byte(T1[1] shr 8)];
W2 := ForwardTable[Byte(T1[2] shr 16)]; W3 := ForwardTable[Byte(T1[3] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[16];
W0 := ForwardTable[Byte(T1[1])]; W1 := ForwardTable[Byte(T1[2] shr 8)];
W2 := ForwardTable[Byte(T1[3] shr 16)]; W3 := ForwardTable[Byte(T1[0] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[17];
W0 := ForwardTable[Byte(T1[2])]; W1 := ForwardTable[Byte(T1[3] shr 8)];
W2 := ForwardTable[Byte(T1[0] shr 16)]; W3 := ForwardTable[Byte(T1[1] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[18];
W0 := ForwardTable[Byte(T1[3])]; W1 := ForwardTable[Byte(T1[0] shr 8)];
W2 := ForwardTable[Byte(T1[1] shr 16)]; W3 := ForwardTable[Byte(T1[2] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[19];
// round 5
W0 := ForwardTable[Byte(T0[0])]; W1 := ForwardTable[Byte(T0[1] shr 8)];
W2 := ForwardTable[Byte(T0[2] shr 16)]; W3 := ForwardTable[Byte(T0[3] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[20];
W0 := ForwardTable[Byte(T0[1])]; W1 := ForwardTable[Byte(T0[2] shr 8)];
W2 := ForwardTable[Byte(T0[3] shr 16)]; W3 := ForwardTable[Byte(T0[0] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[21];
W0 := ForwardTable[Byte(T0[2])]; W1 := ForwardTable[Byte(T0[3] shr 8)];
W2 := ForwardTable[Byte(T0[0] shr 16)]; W3 := ForwardTable[Byte(T0[1] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[22];
W0 := ForwardTable[Byte(T0[3])]; W1 := ForwardTable[Byte(T0[0] shr 8)];
W2 := ForwardTable[Byte(T0[1] shr 16)]; W3 := ForwardTable[Byte(T0[2] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[23];
// round 6
W0 := ForwardTable[Byte(T1[0])]; W1 := ForwardTable[Byte(T1[1] shr 8)];
W2 := ForwardTable[Byte(T1[2] shr 16)]; W3 := ForwardTable[Byte(T1[3] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[24];
W0 := ForwardTable[Byte(T1[1])]; W1 := ForwardTable[Byte(T1[2] shr 8)];
W2 := ForwardTable[Byte(T1[3] shr 16)]; W3 := ForwardTable[Byte(T1[0] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[25];
W0 := ForwardTable[Byte(T1[2])]; W1 := ForwardTable[Byte(T1[3] shr 8)];
W2 := ForwardTable[Byte(T1[0] shr 16)]; W3 := ForwardTable[Byte(T1[1] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[26];
W0 := ForwardTable[Byte(T1[3])]; W1 := ForwardTable[Byte(T1[0] shr 8)];
W2 := ForwardTable[Byte(T1[1] shr 16)]; W3 := ForwardTable[Byte(T1[2] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[27];
// round 7
W0 := ForwardTable[Byte(T0[0])]; W1 := ForwardTable[Byte(T0[1] shr 8)];
W2 := ForwardTable[Byte(T0[2] shr 16)]; W3 := ForwardTable[Byte(T0[3] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[28];
W0 := ForwardTable[Byte(T0[1])]; W1 := ForwardTable[Byte(T0[2] shr 8)];
W2 := ForwardTable[Byte(T0[3] shr 16)]; W3 := ForwardTable[Byte(T0[0] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[29];
W0 := ForwardTable[Byte(T0[2])]; W1 := ForwardTable[Byte(T0[3] shr 8)];
W2 := ForwardTable[Byte(T0[0] shr 16)]; W3 := ForwardTable[Byte(T0[1] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[30];
W0 := ForwardTable[Byte(T0[3])]; W1 := ForwardTable[Byte(T0[0] shr 8)];
W2 := ForwardTable[Byte(T0[1] shr 16)]; W3 := ForwardTable[Byte(T0[2] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[31];
// round 8
W0 := ForwardTable[Byte(T1[0])]; W1 := ForwardTable[Byte(T1[1] shr 8)];
W2 := ForwardTable[Byte(T1[2] shr 16)]; W3 := ForwardTable[Byte(T1[3] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[32];
W0 := ForwardTable[Byte(T1[1])]; W1 := ForwardTable[Byte(T1[2] shr 8)];
W2 := ForwardTable[Byte(T1[3] shr 16)]; W3 := ForwardTable[Byte(T1[0] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[33];
W0 := ForwardTable[Byte(T1[2])]; W1 := ForwardTable[Byte(T1[3] shr 8)];
W2 := ForwardTable[Byte(T1[0] shr 16)]; W3 := ForwardTable[Byte(T1[1] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[34];
W0 := ForwardTable[Byte(T1[3])]; W1 := ForwardTable[Byte(T1[0] shr 8)];
W2 := ForwardTable[Byte(T1[1] shr 16)]; W3 := ForwardTable[Byte(T1[2] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[35];
// round 9
W0 := ForwardTable[Byte(T0[0])]; W1 := ForwardTable[Byte(T0[1] shr 8)];
W2 := ForwardTable[Byte(T0[2] shr 16)]; W3 := ForwardTable[Byte(T0[3] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[36];
W0 := ForwardTable[Byte(T0[1])]; W1 := ForwardTable[Byte(T0[2] shr 8)];
W2 := ForwardTable[Byte(T0[3] shr 16)]; W3 := ForwardTable[Byte(T0[0] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[37];
W0 := ForwardTable[Byte(T0[2])]; W1 := ForwardTable[Byte(T0[3] shr 8)];
W2 := ForwardTable[Byte(T0[0] shr 16)]; W3 := ForwardTable[Byte(T0[1] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[38];
W0 := ForwardTable[Byte(T0[3])]; W1 := ForwardTable[Byte(T0[0] shr 8)];
W2 := ForwardTable[Byte(T0[1] shr 16)]; W3 := ForwardTable[Byte(T0[2] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[39];
// round 10
W0 := ForwardTable[Byte(T1[0])]; W1 := ForwardTable[Byte(T1[1] shr 8)];
W2 := ForwardTable[Byte(T1[2] shr 16)]; W3 := ForwardTable[Byte(T1[3] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[40];
W0 := ForwardTable[Byte(T1[1])]; W1 := ForwardTable[Byte(T1[2] shr 8)];
W2 := ForwardTable[Byte(T1[3] shr 16)]; W3 := ForwardTable[Byte(T1[0] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[41];
W0 := ForwardTable[Byte(T1[2])]; W1 := ForwardTable[Byte(T1[3] shr 8)];
W2 := ForwardTable[Byte(T1[0] shr 16)]; W3 := ForwardTable[Byte(T1[1] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[42];
W0 := ForwardTable[Byte(T1[3])]; W1 := ForwardTable[Byte(T1[0] shr 8)];
W2 := ForwardTable[Byte(T1[1] shr 16)]; W3 := ForwardTable[Byte(T1[2] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[43];
// round 11
W0 := ForwardTable[Byte(T0[0])]; W1 := ForwardTable[Byte(T0[1] shr 8)];
W2 := ForwardTable[Byte(T0[2] shr 16)]; W3 := ForwardTable[Byte(T0[3] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[44];
W0 := ForwardTable[Byte(T0[1])]; W1 := ForwardTable[Byte(T0[2] shr 8)];
W2 := ForwardTable[Byte(T0[3] shr 16)]; W3 := ForwardTable[Byte(T0[0] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[45];
W0 := ForwardTable[Byte(T0[2])]; W1 := ForwardTable[Byte(T0[3] shr 8)];
W2 := ForwardTable[Byte(T0[0] shr 16)]; W3 := ForwardTable[Byte(T0[1] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[46];
W0 := ForwardTable[Byte(T0[3])]; W1 := ForwardTable[Byte(T0[0] shr 8)];
W2 := ForwardTable[Byte(T0[1] shr 16)]; W3 := ForwardTable[Byte(T0[2] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[47];
// last round of transformations
W0 := LastForwardTable[Byte(T1[0])]; W1 := LastForwardTable[Byte(T1[1] shr 8)];
W2 := LastForwardTable[Byte(T1[2] shr 16)]; W3 := LastForwardTable[Byte(T1[3] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[48];
W0 := LastForwardTable[Byte(T1[1])]; W1 := LastForwardTable[Byte(T1[2] shr 8)];
W2 := LastForwardTable[Byte(T1[3] shr 16)]; W3 := LastForwardTable[Byte(T1[0] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[49];
W0 := LastForwardTable[Byte(T1[2])]; W1 := LastForwardTable[Byte(T1[3] shr 8)];
W2 := LastForwardTable[Byte(T1[0] shr 16)]; W3 := LastForwardTable[Byte(T1[1] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[50];
W0 := LastForwardTable[Byte(T1[3])]; W1 := LastForwardTable[Byte(T1[0] shr 8)];
W2 := LastForwardTable[Byte(T1[1] shr 16)]; W3 := LastForwardTable[Byte(T1[2] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[51];
// finalizing
PLongWord(@OutBuf[0])^ := T0[0]; PLongWord(@OutBuf[4])^ := T0[1];
PLongWord(@OutBuf[8])^ := T0[2]; PLongWord(@OutBuf[12])^ := T0[3];
end;
procedure EncryptAES(const InBuf: TAESBuffer; const Key: TAESExpandedKey256;
var OutBuf: TAESBuffer);
var
T0, T1: array [0..3] of longword;
W0, W1, W2, W3: longword;
begin
// initializing
T0[0] := PLongWord(@InBuf[0])^ xor Key[0];
T0[1] := PLongWord(@InBuf[4])^ xor Key[1];
T0[2] := PLongWord(@InBuf[8])^ xor Key[2];
T0[3] := PLongWord(@InBuf[12])^ xor Key[3];
// performing transformation 13 times
// round 1
W0 := ForwardTable[Byte(T0[0])]; W1 := ForwardTable[Byte(T0[1] shr 8)];
W2 := ForwardTable[Byte(T0[2] shr 16)]; W3 := ForwardTable[Byte(T0[3] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[4];
W0 := ForwardTable[Byte(T0[1])]; W1 := ForwardTable[Byte(T0[2] shr 8)];
W2 := ForwardTable[Byte(T0[3] shr 16)]; W3 := ForwardTable[Byte(T0[0] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[5];
W0 := ForwardTable[Byte(T0[2])]; W1 := ForwardTable[Byte(T0[3] shr 8)];
W2 := ForwardTable[Byte(T0[0] shr 16)]; W3 := ForwardTable[Byte(T0[1] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[6];
W0 := ForwardTable[Byte(T0[3])]; W1 := ForwardTable[Byte(T0[0] shr 8)];
W2 := ForwardTable[Byte(T0[1] shr 16)]; W3 := ForwardTable[Byte(T0[2] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[7];
// round 2
W0 := ForwardTable[Byte(T1[0])]; W1 := ForwardTable[Byte(T1[1] shr 8)];
W2 := ForwardTable[Byte(T1[2] shr 16)]; W3 := ForwardTable[Byte(T1[3] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[8];
W0 := ForwardTable[Byte(T1[1])]; W1 := ForwardTable[Byte(T1[2] shr 8)];
W2 := ForwardTable[Byte(T1[3] shr 16)]; W3 := ForwardTable[Byte(T1[0] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[9];
W0 := ForwardTable[Byte(T1[2])]; W1 := ForwardTable[Byte(T1[3] shr 8)];
W2 := ForwardTable[Byte(T1[0] shr 16)]; W3 := ForwardTable[Byte(T1[1] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[10];
W0 := ForwardTable[Byte(T1[3])]; W1 := ForwardTable[Byte(T1[0] shr 8)];
W2 := ForwardTable[Byte(T1[1] shr 16)]; W3 := ForwardTable[Byte(T1[2] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[11];
// round 3
W0 := ForwardTable[Byte(T0[0])]; W1 := ForwardTable[Byte(T0[1] shr 8)];
W2 := ForwardTable[Byte(T0[2] shr 16)]; W3 := ForwardTable[Byte(T0[3] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[12];
W0 := ForwardTable[Byte(T0[1])]; W1 := ForwardTable[Byte(T0[2] shr 8)];
W2 := ForwardTable[Byte(T0[3] shr 16)]; W3 := ForwardTable[Byte(T0[0] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[13];
W0 := ForwardTable[Byte(T0[2])]; W1 := ForwardTable[Byte(T0[3] shr 8)];
W2 := ForwardTable[Byte(T0[0] shr 16)]; W3 := ForwardTable[Byte(T0[1] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[14];
W0 := ForwardTable[Byte(T0[3])]; W1 := ForwardTable[Byte(T0[0] shr 8)];
W2 := ForwardTable[Byte(T0[1] shr 16)]; W3 := ForwardTable[Byte(T0[2] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[15];
// round 4
W0 := ForwardTable[Byte(T1[0])]; W1 := ForwardTable[Byte(T1[1] shr 8)];
W2 := ForwardTable[Byte(T1[2] shr 16)]; W3 := ForwardTable[Byte(T1[3] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[16];
W0 := ForwardTable[Byte(T1[1])]; W1 := ForwardTable[Byte(T1[2] shr 8)];
W2 := ForwardTable[Byte(T1[3] shr 16)]; W3 := ForwardTable[Byte(T1[0] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[17];
W0 := ForwardTable[Byte(T1[2])]; W1 := ForwardTable[Byte(T1[3] shr 8)];
W2 := ForwardTable[Byte(T1[0] shr 16)]; W3 := ForwardTable[Byte(T1[1] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[18];
W0 := ForwardTable[Byte(T1[3])]; W1 := ForwardTable[Byte(T1[0] shr 8)];
W2 := ForwardTable[Byte(T1[1] shr 16)]; W3 := ForwardTable[Byte(T1[2] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[19];
// round 5
W0 := ForwardTable[Byte(T0[0])]; W1 := ForwardTable[Byte(T0[1] shr 8)];
W2 := ForwardTable[Byte(T0[2] shr 16)]; W3 := ForwardTable[Byte(T0[3] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[20];
W0 := ForwardTable[Byte(T0[1])]; W1 := ForwardTable[Byte(T0[2] shr 8)];
W2 := ForwardTable[Byte(T0[3] shr 16)]; W3 := ForwardTable[Byte(T0[0] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[21];
W0 := ForwardTable[Byte(T0[2])]; W1 := ForwardTable[Byte(T0[3] shr 8)];
W2 := ForwardTable[Byte(T0[0] shr 16)]; W3 := ForwardTable[Byte(T0[1] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[22];
W0 := ForwardTable[Byte(T0[3])]; W1 := ForwardTable[Byte(T0[0] shr 8)];
W2 := ForwardTable[Byte(T0[1] shr 16)]; W3 := ForwardTable[Byte(T0[2] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[23];
// round 6
W0 := ForwardTable[Byte(T1[0])]; W1 := ForwardTable[Byte(T1[1] shr 8)];
W2 := ForwardTable[Byte(T1[2] shr 16)]; W3 := ForwardTable[Byte(T1[3] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[24];
W0 := ForwardTable[Byte(T1[1])]; W1 := ForwardTable[Byte(T1[2] shr 8)];
W2 := ForwardTable[Byte(T1[3] shr 16)]; W3 := ForwardTable[Byte(T1[0] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[25];
W0 := ForwardTable[Byte(T1[2])]; W1 := ForwardTable[Byte(T1[3] shr 8)];
W2 := ForwardTable[Byte(T1[0] shr 16)]; W3 := ForwardTable[Byte(T1[1] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[26];
W0 := ForwardTable[Byte(T1[3])]; W1 := ForwardTable[Byte(T1[0] shr 8)];
W2 := ForwardTable[Byte(T1[1] shr 16)]; W3 := ForwardTable[Byte(T1[2] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[27];
// round 7
W0 := ForwardTable[Byte(T0[0])]; W1 := ForwardTable[Byte(T0[1] shr 8)];
W2 := ForwardTable[Byte(T0[2] shr 16)]; W3 := ForwardTable[Byte(T0[3] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[28];
W0 := ForwardTable[Byte(T0[1])]; W1 := ForwardTable[Byte(T0[2] shr 8)];
W2 := ForwardTable[Byte(T0[3] shr 16)]; W3 := ForwardTable[Byte(T0[0] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[29];
W0 := ForwardTable[Byte(T0[2])]; W1 := ForwardTable[Byte(T0[3] shr 8)];
W2 := ForwardTable[Byte(T0[0] shr 16)]; W3 := ForwardTable[Byte(T0[1] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[30];
W0 := ForwardTable[Byte(T0[3])]; W1 := ForwardTable[Byte(T0[0] shr 8)];
W2 := ForwardTable[Byte(T0[1] shr 16)]; W3 := ForwardTable[Byte(T0[2] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[31];
// round 8
W0 := ForwardTable[Byte(T1[0])]; W1 := ForwardTable[Byte(T1[1] shr 8)];
W2 := ForwardTable[Byte(T1[2] shr 16)]; W3 := ForwardTable[Byte(T1[3] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[32];
W0 := ForwardTable[Byte(T1[1])]; W1 := ForwardTable[Byte(T1[2] shr 8)];
W2 := ForwardTable[Byte(T1[3] shr 16)]; W3 := ForwardTable[Byte(T1[0] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[33];
W0 := ForwardTable[Byte(T1[2])]; W1 := ForwardTable[Byte(T1[3] shr 8)];
W2 := ForwardTable[Byte(T1[0] shr 16)]; W3 := ForwardTable[Byte(T1[1] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[34];
W0 := ForwardTable[Byte(T1[3])]; W1 := ForwardTable[Byte(T1[0] shr 8)];
W2 := ForwardTable[Byte(T1[1] shr 16)]; W3 := ForwardTable[Byte(T1[2] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[35];
// round 9
W0 := ForwardTable[Byte(T0[0])]; W1 := ForwardTable[Byte(T0[1] shr 8)];
W2 := ForwardTable[Byte(T0[2] shr 16)]; W3 := ForwardTable[Byte(T0[3] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[36];
W0 := ForwardTable[Byte(T0[1])]; W1 := ForwardTable[Byte(T0[2] shr 8)];
W2 := ForwardTable[Byte(T0[3] shr 16)]; W3 := ForwardTable[Byte(T0[0] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[37];
W0 := ForwardTable[Byte(T0[2])]; W1 := ForwardTable[Byte(T0[3] shr 8)];
W2 := ForwardTable[Byte(T0[0] shr 16)]; W3 := ForwardTable[Byte(T0[1] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[38];
W0 := ForwardTable[Byte(T0[3])]; W1 := ForwardTable[Byte(T0[0] shr 8)];
W2 := ForwardTable[Byte(T0[1] shr 16)]; W3 := ForwardTable[Byte(T0[2] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[39];
// round 10
W0 := ForwardTable[Byte(T1[0])]; W1 := ForwardTable[Byte(T1[1] shr 8)];
W2 := ForwardTable[Byte(T1[2] shr 16)]; W3 := ForwardTable[Byte(T1[3] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[40];
W0 := ForwardTable[Byte(T1[1])]; W1 := ForwardTable[Byte(T1[2] shr 8)];
W2 := ForwardTable[Byte(T1[3] shr 16)]; W3 := ForwardTable[Byte(T1[0] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[41];
W0 := ForwardTable[Byte(T1[2])]; W1 := ForwardTable[Byte(T1[3] shr 8)];
W2 := ForwardTable[Byte(T1[0] shr 16)]; W3 := ForwardTable[Byte(T1[1] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[42];
W0 := ForwardTable[Byte(T1[3])]; W1 := ForwardTable[Byte(T1[0] shr 8)];
W2 := ForwardTable[Byte(T1[1] shr 16)]; W3 := ForwardTable[Byte(T1[2] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[43];
// round 11
W0 := ForwardTable[Byte(T0[0])]; W1 := ForwardTable[Byte(T0[1] shr 8)];
W2 := ForwardTable[Byte(T0[2] shr 16)]; W3 := ForwardTable[Byte(T0[3] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[44];
W0 := ForwardTable[Byte(T0[1])]; W1 := ForwardTable[Byte(T0[2] shr 8)];
W2 := ForwardTable[Byte(T0[3] shr 16)]; W3 := ForwardTable[Byte(T0[0] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[45];
W0 := ForwardTable[Byte(T0[2])]; W1 := ForwardTable[Byte(T0[3] shr 8)];
W2 := ForwardTable[Byte(T0[0] shr 16)]; W3 := ForwardTable[Byte(T0[1] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[46];
W0 := ForwardTable[Byte(T0[3])]; W1 := ForwardTable[Byte(T0[0] shr 8)];
W2 := ForwardTable[Byte(T0[1] shr 16)]; W3 := ForwardTable[Byte(T0[2] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[47];
// round 12
W0 := ForwardTable[Byte(T1[0])]; W1 := ForwardTable[Byte(T1[1] shr 8)];
W2 := ForwardTable[Byte(T1[2] shr 16)]; W3 := ForwardTable[Byte(T1[3] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[48];
W0 := ForwardTable[Byte(T1[1])]; W1 := ForwardTable[Byte(T1[2] shr 8)];
W2 := ForwardTable[Byte(T1[3] shr 16)]; W3 := ForwardTable[Byte(T1[0] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[49];
W0 := ForwardTable[Byte(T1[2])]; W1 := ForwardTable[Byte(T1[3] shr 8)];
W2 := ForwardTable[Byte(T1[0] shr 16)]; W3 := ForwardTable[Byte(T1[1] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[50];
W0 := ForwardTable[Byte(T1[3])]; W1 := ForwardTable[Byte(T1[0] shr 8)];
W2 := ForwardTable[Byte(T1[1] shr 16)]; W3 := ForwardTable[Byte(T1[2] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[51];
// round 13
W0 := ForwardTable[Byte(T0[0])]; W1 := ForwardTable[Byte(T0[1] shr 8)];
W2 := ForwardTable[Byte(T0[2] shr 16)]; W3 := ForwardTable[Byte(T0[3] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[52];
W0 := ForwardTable[Byte(T0[1])]; W1 := ForwardTable[Byte(T0[2] shr 8)];
W2 := ForwardTable[Byte(T0[3] shr 16)]; W3 := ForwardTable[Byte(T0[0] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[53];
W0 := ForwardTable[Byte(T0[2])]; W1 := ForwardTable[Byte(T0[3] shr 8)];
W2 := ForwardTable[Byte(T0[0] shr 16)]; W3 := ForwardTable[Byte(T0[1] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[54];
W0 := ForwardTable[Byte(T0[3])]; W1 := ForwardTable[Byte(T0[0] shr 8)];
W2 := ForwardTable[Byte(T0[1] shr 16)]; W3 := ForwardTable[Byte(T0[2] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[55];
// last round of transformations
W0 := LastForwardTable[Byte(T1[0])]; W1 := LastForwardTable[Byte(T1[1] shr 8)];
W2 := LastForwardTable[Byte(T1[2] shr 16)]; W3 := LastForwardTable[Byte(T1[3] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[56];
W0 := LastForwardTable[Byte(T1[1])]; W1 := LastForwardTable[Byte(T1[2] shr 8)];
W2 := LastForwardTable[Byte(T1[3] shr 16)]; W3 := LastForwardTable[Byte(T1[0] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[57];
W0 := LastForwardTable[Byte(T1[2])]; W1 := LastForwardTable[Byte(T1[3] shr 8)];
W2 := LastForwardTable[Byte(T1[0] shr 16)]; W3 := LastForwardTable[Byte(T1[1] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[58];
W0 := LastForwardTable[Byte(T1[3])]; W1 := LastForwardTable[Byte(T1[0] shr 8)];
W2 := LastForwardTable[Byte(T1[1] shr 16)]; W3 := LastForwardTable[Byte(T1[2] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[59];
// finalizing
PLongWord(@OutBuf[0])^ := T0[0]; PLongWord(@OutBuf[4])^ := T0[1];
PLongWord(@OutBuf[8])^ := T0[2]; PLongWord(@OutBuf[12])^ := T0[3];
end;
procedure ExpandAESKeyForDecryption(var ExpandedKey: TAESExpandedKey128);
var
I: integer;
U, F2, F4, F8, F9: longword;
begin
for I := 1 to 9 do
begin
F9 := ExpandedKey[I * 4];
U := F9 and $80808080;
F2 := ((F9 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F2 and $80808080;
F4 := ((F2 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F4 and $80808080;
F8 := ((F4 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
F9 := F9 xor F8;
ExpandedKey[I * 4] := F2 xor F4 xor F8 xor
(((F2 xor F9) shl 24) or ((F2 xor F9) shr 8)) xor
(((F4 xor F9) shl 16) or ((F4 xor F9) shr 16)) xor ((F9 shl 8) or (F9 shr 24));
F9 := ExpandedKey[I * 4 + 1];
U := F9 and $80808080;
F2 := ((F9 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F2 and $80808080;
F4 := ((F2 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F4 and $80808080;
F8 := ((F4 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
F9 := F9 xor F8;
ExpandedKey[I * 4 + 1] := F2 xor F4 xor F8 xor
(((F2 xor F9) shl 24) or ((F2 xor F9) shr 8)) xor
(((F4 xor F9) shl 16) or ((F4 xor F9) shr 16)) xor ((F9 shl 8) or (F9 shr 24));
F9 := ExpandedKey[I * 4 + 2];
U := F9 and $80808080;
F2 := ((F9 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F2 and $80808080;
F4 := ((F2 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F4 and $80808080;
F8 := ((F4 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
F9 := F9 xor F8;
ExpandedKey[I * 4 + 2] := F2 xor F4 xor F8 xor
(((F2 xor F9) shl 24) or ((F2 xor F9) shr 8)) xor
(((F4 xor F9) shl 16) or ((F4 xor F9) shr 16)) xor ((F9 shl 8) or (F9 shr 24));
F9 := ExpandedKey[I * 4 + 3];
U := F9 and $80808080;
F2 := ((F9 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F2 and $80808080;
F4 := ((F2 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F4 and $80808080;
F8 := ((F4 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
F9 := F9 xor F8;
ExpandedKey[I * 4 + 3] := F2 xor F4 xor F8 xor
(((F2 xor F9) shl 24) or ((F2 xor F9) shr 8)) xor
(((F4 xor F9) shl 16) or ((F4 xor F9) shr 16)) xor ((F9 shl 8) or (F9 shr 24));
end;
end;
procedure ExpandAESKeyForDecryption(const Key: TAESKey128; var ExpandedKey: TAESExpandedKey128);
begin
ExpandAESKeyForEncryption(Key, ExpandedKey);
ExpandAESKeyForDecryption(ExpandedKey);
end;
procedure ExpandAESKeyForDecryption(var ExpandedKey: TAESExpandedKey192);
var
I: integer;
U, F2, F4, F8, F9: longword;
begin
for I := 1 to 11 do
begin
F9 := ExpandedKey[I * 4];
U := F9 and $80808080;
F2 := ((F9 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F2 and $80808080;
F4 := ((F2 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F4 and $80808080;
F8 := ((F4 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
F9 := F9 xor F8;
ExpandedKey[I * 4] := F2 xor F4 xor F8 xor
(((F2 xor F9) shl 24) or ((F2 xor F9) shr 8)) xor
(((F4 xor F9) shl 16) or ((F4 xor F9) shr 16)) xor ((F9 shl 8) or (F9 shr 24));
F9 := ExpandedKey[I * 4 + 1];
U := F9 and $80808080;
F2 := ((F9 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F2 and $80808080;
F4 := ((F2 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F4 and $80808080;
F8 := ((F4 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
F9 := F9 xor F8;
ExpandedKey[I * 4 + 1] := F2 xor F4 xor F8 xor
(((F2 xor F9) shl 24) or ((F2 xor F9) shr 8)) xor
(((F4 xor F9) shl 16) or ((F4 xor F9) shr 16)) xor ((F9 shl 8) or (F9 shr 24));
F9 := ExpandedKey[I * 4 + 2];
U := F9 and $80808080;
F2 := ((F9 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F2 and $80808080;
F4 := ((F2 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F4 and $80808080;
F8 := ((F4 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
F9 := F9 xor F8;
ExpandedKey[I * 4 + 2] := F2 xor F4 xor F8 xor
(((F2 xor F9) shl 24) or ((F2 xor F9) shr 8)) xor
(((F4 xor F9) shl 16) or ((F4 xor F9) shr 16)) xor ((F9 shl 8) or (F9 shr 24));
F9 := ExpandedKey[I * 4 + 3];
U := F9 and $80808080;
F2 := ((F9 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F2 and $80808080;
F4 := ((F2 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F4 and $80808080;
F8 := ((F4 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
F9 := F9 xor F8;
ExpandedKey[I * 4 + 3] := F2 xor F4 xor F8 xor
(((F2 xor F9) shl 24) or ((F2 xor F9) shr 8)) xor
(((F4 xor F9) shl 16) or ((F4 xor F9) shr 16)) xor ((F9 shl 8) or (F9 shr 24));
end;
end;
procedure ExpandAESKeyForDecryption(const Key: TAESKey192; var ExpandedKey: TAESExpandedKey192);
begin
ExpandAESKeyForEncryption(Key, ExpandedKey);
ExpandAESKeyForDecryption(ExpandedKey);
end;
procedure ExpandAESKeyForDecryption(var ExpandedKey: TAESExpandedKey256);
var
I: integer;
U, F2, F4, F8, F9: longword;
begin
for I := 1 to 13 do
begin
F9 := ExpandedKey[I * 4];
U := F9 and $80808080;
F2 := ((F9 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F2 and $80808080;
F4 := ((F2 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F4 and $80808080;
F8 := ((F4 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
F9 := F9 xor F8;
ExpandedKey[I * 4] := F2 xor F4 xor F8 xor
(((F2 xor F9) shl 24) or ((F2 xor F9) shr 8)) xor
(((F4 xor F9) shl 16) or ((F4 xor F9) shr 16)) xor ((F9 shl 8) or (F9 shr 24));
F9 := ExpandedKey[I * 4 + 1];
U := F9 and $80808080;
F2 := ((F9 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F2 and $80808080;
F4 := ((F2 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F4 and $80808080;
F8 := ((F4 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
F9 := F9 xor F8;
ExpandedKey[I * 4 + 1] := F2 xor F4 xor F8 xor
(((F2 xor F9) shl 24) or ((F2 xor F9) shr 8)) xor
(((F4 xor F9) shl 16) or ((F4 xor F9) shr 16)) xor ((F9 shl 8) or (F9 shr 24));
F9 := ExpandedKey[I * 4 + 2];
U := F9 and $80808080;
F2 := ((F9 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F2 and $80808080;
F4 := ((F2 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F4 and $80808080;
F8 := ((F4 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
F9 := F9 xor F8;
ExpandedKey[I * 4 + 2] := F2 xor F4 xor F8 xor
(((F2 xor F9) shl 24) or ((F2 xor F9) shr 8)) xor
(((F4 xor F9) shl 16) or ((F4 xor F9) shr 16)) xor ((F9 shl 8) or (F9 shr 24));
F9 := ExpandedKey[I * 4 + 3];
U := F9 and $80808080;
F2 := ((F9 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F2 and $80808080;
F4 := ((F2 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
U := F4 and $80808080;
F8 := ((F4 and $7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $1B1B1B1B);
F9 := F9 xor F8;
ExpandedKey[I * 4 + 3] := F2 xor F4 xor F8 xor
(((F2 xor F9) shl 24) or ((F2 xor F9) shr 8)) xor
(((F4 xor F9) shl 16) or ((F4 xor F9) shr 16)) xor ((F9 shl 8) or (F9 shr 24));
end;
end;
procedure ExpandAESKeyForDecryption(const Key: TAESKey256; var ExpandedKey: TAESExpandedKey256);
begin
ExpandAESKeyForEncryption(Key, ExpandedKey);
ExpandAESKeyForDecryption(ExpandedKey);
end;
procedure DecryptAES(const InBuf: TAESBuffer; const Key: TAESExpandedKey128;
var OutBuf: TAESBuffer);
var
T0, T1: array [0..3] of longword;
W0, W1, W2, W3: longword;
begin
// initializing
T0[0] := PLongWord(@InBuf[0])^ xor Key[40];
T0[1] := PLongWord(@InBuf[4])^ xor Key[41];
T0[2] := PLongWord(@InBuf[8])^ xor Key[42];
T0[3] := PLongWord(@InBuf[12])^ xor Key[43];
// performing transformations 9 times
// round 1
W0 := InverseTable[Byte(T0[0])]; W1 := InverseTable[Byte(T0[3] shr 8)];
W2 := InverseTable[Byte(T0[2] shr 16)]; W3 := InverseTable[Byte(T0[1] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[36];
W0 := InverseTable[Byte(T0[1])]; W1 := InverseTable[Byte(T0[0] shr 8)];
W2 := InverseTable[Byte(T0[3] shr 16)]; W3 := InverseTable[Byte(T0[2] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[37];
W0 := InverseTable[Byte(T0[2])]; W1 := InverseTable[Byte(T0[1] shr 8)];
W2 := InverseTable[Byte(T0[0] shr 16)]; W3 := InverseTable[Byte(T0[3] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[38];
W0 := InverseTable[Byte(T0[3])]; W1 := InverseTable[Byte(T0[2] shr 8)];
W2 := InverseTable[Byte(T0[1] shr 16)]; W3 := InverseTable[Byte(T0[0] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[39];
// round 2
W0 := InverseTable[Byte(T1[0])]; W1 := InverseTable[Byte(T1[3] shr 8)];
W2 := InverseTable[Byte(T1[2] shr 16)]; W3 := InverseTable[Byte(T1[1] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[32];
W0 := InverseTable[Byte(T1[1])]; W1 := InverseTable[Byte(T1[0] shr 8)];
W2 := InverseTable[Byte(T1[3] shr 16)]; W3 := InverseTable[Byte(T1[2] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[33];
W0 := InverseTable[Byte(T1[2])]; W1 := InverseTable[Byte(T1[1] shr 8)];
W2 := InverseTable[Byte(T1[0] shr 16)]; W3 := InverseTable[Byte(T1[3] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[34];
W0 := InverseTable[Byte(T1[3])]; W1 := InverseTable[Byte(T1[2] shr 8)];
W2 := InverseTable[Byte(T1[1] shr 16)]; W3 := InverseTable[Byte(T1[0] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[35];
// round 3
W0 := InverseTable[Byte(T0[0])]; W1 := InverseTable[Byte(T0[3] shr 8)];
W2 := InverseTable[Byte(T0[2] shr 16)]; W3 := InverseTable[Byte(T0[1] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[28];
W0 := InverseTable[Byte(T0[1])]; W1 := InverseTable[Byte(T0[0] shr 8)];
W2 := InverseTable[Byte(T0[3] shr 16)]; W3 := InverseTable[Byte(T0[2] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[29];
W0 := InverseTable[Byte(T0[2])]; W1 := InverseTable[Byte(T0[1] shr 8)];
W2 := InverseTable[Byte(T0[0] shr 16)]; W3 := InverseTable[Byte(T0[3] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[30];
W0 := InverseTable[Byte(T0[3])]; W1 := InverseTable[Byte(T0[2] shr 8)];
W2 := InverseTable[Byte(T0[1] shr 16)]; W3 := InverseTable[Byte(T0[0] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[31];
// round 4
W0 := InverseTable[Byte(T1[0])]; W1 := InverseTable[Byte(T1[3] shr 8)];
W2 := InverseTable[Byte(T1[2] shr 16)]; W3 := InverseTable[Byte(T1[1] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[24];
W0 := InverseTable[Byte(T1[1])]; W1 := InverseTable[Byte(T1[0] shr 8)];
W2 := InverseTable[Byte(T1[3] shr 16)]; W3 := InverseTable[Byte(T1[2] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[25];
W0 := InverseTable[Byte(T1[2])]; W1 := InverseTable[Byte(T1[1] shr 8)];
W2 := InverseTable[Byte(T1[0] shr 16)]; W3 := InverseTable[Byte(T1[3] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[26];
W0 := InverseTable[Byte(T1[3])]; W1 := InverseTable[Byte(T1[2] shr 8)];
W2 := InverseTable[Byte(T1[1] shr 16)]; W3 := InverseTable[Byte(T1[0] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[27];
// round 5
W0 := InverseTable[Byte(T0[0])]; W1 := InverseTable[Byte(T0[3] shr 8)];
W2 := InverseTable[Byte(T0[2] shr 16)]; W3 := InverseTable[Byte(T0[1] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[20];
W0 := InverseTable[Byte(T0[1])]; W1 := InverseTable[Byte(T0[0] shr 8)];
W2 := InverseTable[Byte(T0[3] shr 16)]; W3 := InverseTable[Byte(T0[2] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[21];
W0 := InverseTable[Byte(T0[2])]; W1 := InverseTable[Byte(T0[1] shr 8)];
W2 := InverseTable[Byte(T0[0] shr 16)]; W3 := InverseTable[Byte(T0[3] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[22];
W0 := InverseTable[Byte(T0[3])]; W1 := InverseTable[Byte(T0[2] shr 8)];
W2 := InverseTable[Byte(T0[1] shr 16)]; W3 := InverseTable[Byte(T0[0] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[23];
// round 6
W0 := InverseTable[Byte(T1[0])]; W1 := InverseTable[Byte(T1[3] shr 8)];
W2 := InverseTable[Byte(T1[2] shr 16)]; W3 := InverseTable[Byte(T1[1] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[16];
W0 := InverseTable[Byte(T1[1])]; W1 := InverseTable[Byte(T1[0] shr 8)];
W2 := InverseTable[Byte(T1[3] shr 16)]; W3 := InverseTable[Byte(T1[2] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[17];
W0 := InverseTable[Byte(T1[2])]; W1 := InverseTable[Byte(T1[1] shr 8)];
W2 := InverseTable[Byte(T1[0] shr 16)]; W3 := InverseTable[Byte(T1[3] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[18];
W0 := InverseTable[Byte(T1[3])]; W1 := InverseTable[Byte(T1[2] shr 8)];
W2 := InverseTable[Byte(T1[1] shr 16)]; W3 := InverseTable[Byte(T1[0] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[19];
// round 7
W0 := InverseTable[Byte(T0[0])]; W1 := InverseTable[Byte(T0[3] shr 8)];
W2 := InverseTable[Byte(T0[2] shr 16)]; W3 := InverseTable[Byte(T0[1] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[12];
W0 := InverseTable[Byte(T0[1])]; W1 := InverseTable[Byte(T0[0] shr 8)];
W2 := InverseTable[Byte(T0[3] shr 16)]; W3 := InverseTable[Byte(T0[2] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[13];
W0 := InverseTable[Byte(T0[2])]; W1 := InverseTable[Byte(T0[1] shr 8)];
W2 := InverseTable[Byte(T0[0] shr 16)]; W3 := InverseTable[Byte(T0[3] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[14];
W0 := InverseTable[Byte(T0[3])]; W1 := InverseTable[Byte(T0[2] shr 8)];
W2 := InverseTable[Byte(T0[1] shr 16)]; W3 := InverseTable[Byte(T0[0] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[15];
// round 8
W0 := InverseTable[Byte(T1[0])]; W1 := InverseTable[Byte(T1[3] shr 8)];
W2 := InverseTable[Byte(T1[2] shr 16)]; W3 := InverseTable[Byte(T1[1] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[8];
W0 := InverseTable[Byte(T1[1])]; W1 := InverseTable[Byte(T1[0] shr 8)];
W2 := InverseTable[Byte(T1[3] shr 16)]; W3 := InverseTable[Byte(T1[2] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[9];
W0 := InverseTable[Byte(T1[2])]; W1 := InverseTable[Byte(T1[1] shr 8)];
W2 := InverseTable[Byte(T1[0] shr 16)]; W3 := InverseTable[Byte(T1[3] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[10];
W0 := InverseTable[Byte(T1[3])]; W1 := InverseTable[Byte(T1[2] shr 8)];
W2 := InverseTable[Byte(T1[1] shr 16)]; W3 := InverseTable[Byte(T1[0] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[11];
// round 9
W0 := InverseTable[Byte(T0[0])]; W1 := InverseTable[Byte(T0[3] shr 8)];
W2 := InverseTable[Byte(T0[2] shr 16)]; W3 := InverseTable[Byte(T0[1] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[4];
W0 := InverseTable[Byte(T0[1])]; W1 := InverseTable[Byte(T0[0] shr 8)];
W2 := InverseTable[Byte(T0[3] shr 16)]; W3 := InverseTable[Byte(T0[2] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[5];
W0 := InverseTable[Byte(T0[2])]; W1 := InverseTable[Byte(T0[1] shr 8)];
W2 := InverseTable[Byte(T0[0] shr 16)]; W3 := InverseTable[Byte(T0[3] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[6];
W0 := InverseTable[Byte(T0[3])]; W1 := InverseTable[Byte(T0[2] shr 8)];
W2 := InverseTable[Byte(T0[1] shr 16)]; W3 := InverseTable[Byte(T0[0] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[7];
// last round of transformations
W0 := LastInverseTable[Byte(T1[0])]; W1 := LastInverseTable[Byte(T1[3] shr 8)];
W2 := LastInverseTable[Byte(T1[2] shr 16)]; W3 := LastInverseTable[Byte(T1[1] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[0];
W0 := LastInverseTable[Byte(T1[1])]; W1 := LastInverseTable[Byte(T1[0] shr 8)];
W2 := LastInverseTable[Byte(T1[3] shr 16)]; W3 := LastInverseTable[Byte(T1[2] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[1];
W0 := LastInverseTable[Byte(T1[2])]; W1 := LastInverseTable[Byte(T1[1] shr 8)];
W2 := LastInverseTable[Byte(T1[0] shr 16)]; W3 := LastInverseTable[Byte(T1[3] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[2];
W0 := LastInverseTable[Byte(T1[3])]; W1 := LastInverseTable[Byte(T1[2] shr 8)];
W2 := LastInverseTable[Byte(T1[1] shr 16)]; W3 := LastInverseTable[Byte(T1[0] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[3];
// finalizing
PLongWord(@OutBuf[0])^ := T0[0]; PLongWord(@OutBuf[4])^ := T0[1];
PLongWord(@OutBuf[8])^ := T0[2]; PLongWord(@OutBuf[12])^ := T0[3];
end;
procedure DecryptAES(const InBuf: TAESBuffer; const Key: TAESExpandedKey192;
var OutBuf: TAESBuffer);
var
T0, T1: array [0..3] of longword;
W0, W1, W2, W3: longword;
begin
// initializing
T0[0] := PLongWord(@InBuf[0])^ xor Key[48];
T0[1] := PLongWord(@InBuf[4])^ xor Key[49];
T0[2] := PLongWord(@InBuf[8])^ xor Key[50];
T0[3] := PLongWord(@InBuf[12])^ xor Key[51];
// performing transformations 11 times
// round 1
W0 := InverseTable[Byte(T0[0])]; W1 := InverseTable[Byte(T0[3] shr 8)];
W2 := InverseTable[Byte(T0[2] shr 16)]; W3 := InverseTable[Byte(T0[1] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[44];
W0 := InverseTable[Byte(T0[1])]; W1 := InverseTable[Byte(T0[0] shr 8)];
W2 := InverseTable[Byte(T0[3] shr 16)]; W3 := InverseTable[Byte(T0[2] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[45];
W0 := InverseTable[Byte(T0[2])]; W1 := InverseTable[Byte(T0[1] shr 8)];
W2 := InverseTable[Byte(T0[0] shr 16)]; W3 := InverseTable[Byte(T0[3] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[46];
W0 := InverseTable[Byte(T0[3])]; W1 := InverseTable[Byte(T0[2] shr 8)];
W2 := InverseTable[Byte(T0[1] shr 16)]; W3 := InverseTable[Byte(T0[0] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[47];
// round 2
W0 := InverseTable[Byte(T1[0])]; W1 := InverseTable[Byte(T1[3] shr 8)];
W2 := InverseTable[Byte(T1[2] shr 16)]; W3 := InverseTable[Byte(T1[1] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[40];
W0 := InverseTable[Byte(T1[1])]; W1 := InverseTable[Byte(T1[0] shr 8)];
W2 := InverseTable[Byte(T1[3] shr 16)]; W3 := InverseTable[Byte(T1[2] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[41];
W0 := InverseTable[Byte(T1[2])]; W1 := InverseTable[Byte(T1[1] shr 8)];
W2 := InverseTable[Byte(T1[0] shr 16)]; W3 := InverseTable[Byte(T1[3] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[42];
W0 := InverseTable[Byte(T1[3])]; W1 := InverseTable[Byte(T1[2] shr 8)];
W2 := InverseTable[Byte(T1[1] shr 16)]; W3 := InverseTable[Byte(T1[0] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[43];
// round 3
W0 := InverseTable[Byte(T0[0])]; W1 := InverseTable[Byte(T0[3] shr 8)];
W2 := InverseTable[Byte(T0[2] shr 16)]; W3 := InverseTable[Byte(T0[1] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[36];
W0 := InverseTable[Byte(T0[1])]; W1 := InverseTable[Byte(T0[0] shr 8)];
W2 := InverseTable[Byte(T0[3] shr 16)]; W3 := InverseTable[Byte(T0[2] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[37];
W0 := InverseTable[Byte(T0[2])]; W1 := InverseTable[Byte(T0[1] shr 8)];
W2 := InverseTable[Byte(T0[0] shr 16)]; W3 := InverseTable[Byte(T0[3] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[38];
W0 := InverseTable[Byte(T0[3])]; W1 := InverseTable[Byte(T0[2] shr 8)];
W2 := InverseTable[Byte(T0[1] shr 16)]; W3 := InverseTable[Byte(T0[0] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[39];
// round 4
W0 := InverseTable[Byte(T1[0])]; W1 := InverseTable[Byte(T1[3] shr 8)];
W2 := InverseTable[Byte(T1[2] shr 16)]; W3 := InverseTable[Byte(T1[1] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[32];
W0 := InverseTable[Byte(T1[1])]; W1 := InverseTable[Byte(T1[0] shr 8)];
W2 := InverseTable[Byte(T1[3] shr 16)]; W3 := InverseTable[Byte(T1[2] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[33];
W0 := InverseTable[Byte(T1[2])]; W1 := InverseTable[Byte(T1[1] shr 8)];
W2 := InverseTable[Byte(T1[0] shr 16)]; W3 := InverseTable[Byte(T1[3] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[34];
W0 := InverseTable[Byte(T1[3])]; W1 := InverseTable[Byte(T1[2] shr 8)];
W2 := InverseTable[Byte(T1[1] shr 16)]; W3 := InverseTable[Byte(T1[0] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[35];
// round 5
W0 := InverseTable[Byte(T0[0])]; W1 := InverseTable[Byte(T0[3] shr 8)];
W2 := InverseTable[Byte(T0[2] shr 16)]; W3 := InverseTable[Byte(T0[1] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[28];
W0 := InverseTable[Byte(T0[1])]; W1 := InverseTable[Byte(T0[0] shr 8)];
W2 := InverseTable[Byte(T0[3] shr 16)]; W3 := InverseTable[Byte(T0[2] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[29];
W0 := InverseTable[Byte(T0[2])]; W1 := InverseTable[Byte(T0[1] shr 8)];
W2 := InverseTable[Byte(T0[0] shr 16)]; W3 := InverseTable[Byte(T0[3] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[30];
W0 := InverseTable[Byte(T0[3])]; W1 := InverseTable[Byte(T0[2] shr 8)];
W2 := InverseTable[Byte(T0[1] shr 16)]; W3 := InverseTable[Byte(T0[0] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[31];
// round 6
W0 := InverseTable[Byte(T1[0])]; W1 := InverseTable[Byte(T1[3] shr 8)];
W2 := InverseTable[Byte(T1[2] shr 16)]; W3 := InverseTable[Byte(T1[1] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[24];
W0 := InverseTable[Byte(T1[1])]; W1 := InverseTable[Byte(T1[0] shr 8)];
W2 := InverseTable[Byte(T1[3] shr 16)]; W3 := InverseTable[Byte(T1[2] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[25];
W0 := InverseTable[Byte(T1[2])]; W1 := InverseTable[Byte(T1[1] shr 8)];
W2 := InverseTable[Byte(T1[0] shr 16)]; W3 := InverseTable[Byte(T1[3] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[26];
W0 := InverseTable[Byte(T1[3])]; W1 := InverseTable[Byte(T1[2] shr 8)];
W2 := InverseTable[Byte(T1[1] shr 16)]; W3 := InverseTable[Byte(T1[0] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[27];
// round 7
W0 := InverseTable[Byte(T0[0])]; W1 := InverseTable[Byte(T0[3] shr 8)];
W2 := InverseTable[Byte(T0[2] shr 16)]; W3 := InverseTable[Byte(T0[1] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[20];
W0 := InverseTable[Byte(T0[1])]; W1 := InverseTable[Byte(T0[0] shr 8)];
W2 := InverseTable[Byte(T0[3] shr 16)]; W3 := InverseTable[Byte(T0[2] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[21];
W0 := InverseTable[Byte(T0[2])]; W1 := InverseTable[Byte(T0[1] shr 8)];
W2 := InverseTable[Byte(T0[0] shr 16)]; W3 := InverseTable[Byte(T0[3] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[22];
W0 := InverseTable[Byte(T0[3])]; W1 := InverseTable[Byte(T0[2] shr 8)];
W2 := InverseTable[Byte(T0[1] shr 16)]; W3 := InverseTable[Byte(T0[0] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[23];
// round 8
W0 := InverseTable[Byte(T1[0])]; W1 := InverseTable[Byte(T1[3] shr 8)];
W2 := InverseTable[Byte(T1[2] shr 16)]; W3 := InverseTable[Byte(T1[1] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[16];
W0 := InverseTable[Byte(T1[1])]; W1 := InverseTable[Byte(T1[0] shr 8)];
W2 := InverseTable[Byte(T1[3] shr 16)]; W3 := InverseTable[Byte(T1[2] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[17];
W0 := InverseTable[Byte(T1[2])]; W1 := InverseTable[Byte(T1[1] shr 8)];
W2 := InverseTable[Byte(T1[0] shr 16)]; W3 := InverseTable[Byte(T1[3] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[18];
W0 := InverseTable[Byte(T1[3])]; W1 := InverseTable[Byte(T1[2] shr 8)];
W2 := InverseTable[Byte(T1[1] shr 16)]; W3 := InverseTable[Byte(T1[0] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[19];
// round 9
W0 := InverseTable[Byte(T0[0])]; W1 := InverseTable[Byte(T0[3] shr 8)];
W2 := InverseTable[Byte(T0[2] shr 16)]; W3 := InverseTable[Byte(T0[1] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[12];
W0 := InverseTable[Byte(T0[1])]; W1 := InverseTable[Byte(T0[0] shr 8)];
W2 := InverseTable[Byte(T0[3] shr 16)]; W3 := InverseTable[Byte(T0[2] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[13];
W0 := InverseTable[Byte(T0[2])]; W1 := InverseTable[Byte(T0[1] shr 8)];
W2 := InverseTable[Byte(T0[0] shr 16)]; W3 := InverseTable[Byte(T0[3] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[14];
W0 := InverseTable[Byte(T0[3])]; W1 := InverseTable[Byte(T0[2] shr 8)];
W2 := InverseTable[Byte(T0[1] shr 16)]; W3 := InverseTable[Byte(T0[0] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[15];
// round 10
W0 := InverseTable[Byte(T1[0])]; W1 := InverseTable[Byte(T1[3] shr 8)];
W2 := InverseTable[Byte(T1[2] shr 16)]; W3 := InverseTable[Byte(T1[1] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[8];
W0 := InverseTable[Byte(T1[1])]; W1 := InverseTable[Byte(T1[0] shr 8)];
W2 := InverseTable[Byte(T1[3] shr 16)]; W3 := InverseTable[Byte(T1[2] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[9];
W0 := InverseTable[Byte(T1[2])]; W1 := InverseTable[Byte(T1[1] shr 8)];
W2 := InverseTable[Byte(T1[0] shr 16)]; W3 := InverseTable[Byte(T1[3] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[10];
W0 := InverseTable[Byte(T1[3])]; W1 := InverseTable[Byte(T1[2] shr 8)];
W2 := InverseTable[Byte(T1[1] shr 16)]; W3 := InverseTable[Byte(T1[0] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[11];
// round 11
W0 := InverseTable[Byte(T0[0])]; W1 := InverseTable[Byte(T0[3] shr 8)];
W2 := InverseTable[Byte(T0[2] shr 16)]; W3 := InverseTable[Byte(T0[1] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[4];
W0 := InverseTable[Byte(T0[1])]; W1 := InverseTable[Byte(T0[0] shr 8)];
W2 := InverseTable[Byte(T0[3] shr 16)]; W3 := InverseTable[Byte(T0[2] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[5];
W0 := InverseTable[Byte(T0[2])]; W1 := InverseTable[Byte(T0[1] shr 8)];
W2 := InverseTable[Byte(T0[0] shr 16)]; W3 := InverseTable[Byte(T0[3] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[6];
W0 := InverseTable[Byte(T0[3])]; W1 := InverseTable[Byte(T0[2] shr 8)];
W2 := InverseTable[Byte(T0[1] shr 16)]; W3 := InverseTable[Byte(T0[0] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[7];
// last round of transformations
W0 := LastInverseTable[Byte(T1[0])]; W1 := LastInverseTable[Byte(T1[3] shr 8)];
W2 := LastInverseTable[Byte(T1[2] shr 16)]; W3 := LastInverseTable[Byte(T1[1] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[0];
W0 := LastInverseTable[Byte(T1[1])]; W1 := LastInverseTable[Byte(T1[0] shr 8)];
W2 := LastInverseTable[Byte(T1[3] shr 16)]; W3 := LastInverseTable[Byte(T1[2] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[1];
W0 := LastInverseTable[Byte(T1[2])]; W1 := LastInverseTable[Byte(T1[1] shr 8)];
W2 := LastInverseTable[Byte(T1[0] shr 16)]; W3 := LastInverseTable[Byte(T1[3] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[2];
W0 := LastInverseTable[Byte(T1[3])]; W1 := LastInverseTable[Byte(T1[2] shr 8)];
W2 := LastInverseTable[Byte(T1[1] shr 16)]; W3 := LastInverseTable[Byte(T1[0] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[3];
// finalizing
PLongWord(@OutBuf[0])^ := T0[0]; PLongWord(@OutBuf[4])^ := T0[1];
PLongWord(@OutBuf[8])^ := T0[2]; PLongWord(@OutBuf[12])^ := T0[3];
end;
procedure DecryptAES(const InBuf: TAESBuffer; const Key: TAESExpandedKey256;
var OutBuf: TAESBuffer);
var
T0, T1: array [0..3] of longword;
W0, W1, W2, W3: longword;
begin
// initializing
T0[0] := PLongWord(@InBuf[0])^ xor Key[56];
T0[1] := PLongWord(@InBuf[4])^ xor Key[57];
T0[2] := PLongWord(@InBuf[8])^ xor Key[58];
T0[3] := PLongWord(@InBuf[12])^ xor Key[59];
// performing transformations 13 times
// round 1
W0 := InverseTable[Byte(T0[0])]; W1 := InverseTable[Byte(T0[3] shr 8)];
W2 := InverseTable[Byte(T0[2] shr 16)]; W3 := InverseTable[Byte(T0[1] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[52];
W0 := InverseTable[Byte(T0[1])]; W1 := InverseTable[Byte(T0[0] shr 8)];
W2 := InverseTable[Byte(T0[3] shr 16)]; W3 := InverseTable[Byte(T0[2] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[53];
W0 := InverseTable[Byte(T0[2])]; W1 := InverseTable[Byte(T0[1] shr 8)];
W2 := InverseTable[Byte(T0[0] shr 16)]; W3 := InverseTable[Byte(T0[3] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[54];
W0 := InverseTable[Byte(T0[3])]; W1 := InverseTable[Byte(T0[2] shr 8)];
W2 := InverseTable[Byte(T0[1] shr 16)]; W3 := InverseTable[Byte(T0[0] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[55];
// round 2
W0 := InverseTable[Byte(T1[0])]; W1 := InverseTable[Byte(T1[3] shr 8)];
W2 := InverseTable[Byte(T1[2] shr 16)]; W3 := InverseTable[Byte(T1[1] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[48];
W0 := InverseTable[Byte(T1[1])]; W1 := InverseTable[Byte(T1[0] shr 8)];
W2 := InverseTable[Byte(T1[3] shr 16)]; W3 := InverseTable[Byte(T1[2] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[49];
W0 := InverseTable[Byte(T1[2])]; W1 := InverseTable[Byte(T1[1] shr 8)];
W2 := InverseTable[Byte(T1[0] shr 16)]; W3 := InverseTable[Byte(T1[3] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[50];
W0 := InverseTable[Byte(T1[3])]; W1 := InverseTable[Byte(T1[2] shr 8)];
W2 := InverseTable[Byte(T1[1] shr 16)]; W3 := InverseTable[Byte(T1[0] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[51];
// round 3
W0 := InverseTable[Byte(T0[0])]; W1 := InverseTable[Byte(T0[3] shr 8)];
W2 := InverseTable[Byte(T0[2] shr 16)]; W3 := InverseTable[Byte(T0[1] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[44];
W0 := InverseTable[Byte(T0[1])]; W1 := InverseTable[Byte(T0[0] shr 8)];
W2 := InverseTable[Byte(T0[3] shr 16)]; W3 := InverseTable[Byte(T0[2] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[45];
W0 := InverseTable[Byte(T0[2])]; W1 := InverseTable[Byte(T0[1] shr 8)];
W2 := InverseTable[Byte(T0[0] shr 16)]; W3 := InverseTable[Byte(T0[3] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[46];
W0 := InverseTable[Byte(T0[3])]; W1 := InverseTable[Byte(T0[2] shr 8)];
W2 := InverseTable[Byte(T0[1] shr 16)]; W3 := InverseTable[Byte(T0[0] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[47];
// round 4
W0 := InverseTable[Byte(T1[0])]; W1 := InverseTable[Byte(T1[3] shr 8)];
W2 := InverseTable[Byte(T1[2] shr 16)]; W3 := InverseTable[Byte(T1[1] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[40];
W0 := InverseTable[Byte(T1[1])]; W1 := InverseTable[Byte(T1[0] shr 8)];
W2 := InverseTable[Byte(T1[3] shr 16)]; W3 := InverseTable[Byte(T1[2] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[41];
W0 := InverseTable[Byte(T1[2])]; W1 := InverseTable[Byte(T1[1] shr 8)];
W2 := InverseTable[Byte(T1[0] shr 16)]; W3 := InverseTable[Byte(T1[3] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[42];
W0 := InverseTable[Byte(T1[3])]; W1 := InverseTable[Byte(T1[2] shr 8)];
W2 := InverseTable[Byte(T1[1] shr 16)]; W3 := InverseTable[Byte(T1[0] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[43];
// round 5
W0 := InverseTable[Byte(T0[0])]; W1 := InverseTable[Byte(T0[3] shr 8)];
W2 := InverseTable[Byte(T0[2] shr 16)]; W3 := InverseTable[Byte(T0[1] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[36];
W0 := InverseTable[Byte(T0[1])]; W1 := InverseTable[Byte(T0[0] shr 8)];
W2 := InverseTable[Byte(T0[3] shr 16)]; W3 := InverseTable[Byte(T0[2] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[37];
W0 := InverseTable[Byte(T0[2])]; W1 := InverseTable[Byte(T0[1] shr 8)];
W2 := InverseTable[Byte(T0[0] shr 16)]; W3 := InverseTable[Byte(T0[3] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[38];
W0 := InverseTable[Byte(T0[3])]; W1 := InverseTable[Byte(T0[2] shr 8)];
W2 := InverseTable[Byte(T0[1] shr 16)]; W3 := InverseTable[Byte(T0[0] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[39];
// round 6
W0 := InverseTable[Byte(T1[0])]; W1 := InverseTable[Byte(T1[3] shr 8)];
W2 := InverseTable[Byte(T1[2] shr 16)]; W3 := InverseTable[Byte(T1[1] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[32];
W0 := InverseTable[Byte(T1[1])]; W1 := InverseTable[Byte(T1[0] shr 8)];
W2 := InverseTable[Byte(T1[3] shr 16)]; W3 := InverseTable[Byte(T1[2] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[33];
W0 := InverseTable[Byte(T1[2])]; W1 := InverseTable[Byte(T1[1] shr 8)];
W2 := InverseTable[Byte(T1[0] shr 16)]; W3 := InverseTable[Byte(T1[3] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[34];
W0 := InverseTable[Byte(T1[3])]; W1 := InverseTable[Byte(T1[2] shr 8)];
W2 := InverseTable[Byte(T1[1] shr 16)]; W3 := InverseTable[Byte(T1[0] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[35];
// round 7
W0 := InverseTable[Byte(T0[0])]; W1 := InverseTable[Byte(T0[3] shr 8)];
W2 := InverseTable[Byte(T0[2] shr 16)]; W3 := InverseTable[Byte(T0[1] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[28];
W0 := InverseTable[Byte(T0[1])]; W1 := InverseTable[Byte(T0[0] shr 8)];
W2 := InverseTable[Byte(T0[3] shr 16)]; W3 := InverseTable[Byte(T0[2] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[29];
W0 := InverseTable[Byte(T0[2])]; W1 := InverseTable[Byte(T0[1] shr 8)];
W2 := InverseTable[Byte(T0[0] shr 16)]; W3 := InverseTable[Byte(T0[3] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[30];
W0 := InverseTable[Byte(T0[3])]; W1 := InverseTable[Byte(T0[2] shr 8)];
W2 := InverseTable[Byte(T0[1] shr 16)]; W3 := InverseTable[Byte(T0[0] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[31];
// round 8
W0 := InverseTable[Byte(T1[0])]; W1 := InverseTable[Byte(T1[3] shr 8)];
W2 := InverseTable[Byte(T1[2] shr 16)]; W3 := InverseTable[Byte(T1[1] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[24];
W0 := InverseTable[Byte(T1[1])]; W1 := InverseTable[Byte(T1[0] shr 8)];
W2 := InverseTable[Byte(T1[3] shr 16)]; W3 := InverseTable[Byte(T1[2] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[25];
W0 := InverseTable[Byte(T1[2])]; W1 := InverseTable[Byte(T1[1] shr 8)];
W2 := InverseTable[Byte(T1[0] shr 16)]; W3 := InverseTable[Byte(T1[3] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[26];
W0 := InverseTable[Byte(T1[3])]; W1 := InverseTable[Byte(T1[2] shr 8)];
W2 := InverseTable[Byte(T1[1] shr 16)]; W3 := InverseTable[Byte(T1[0] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[27];
// round 9
W0 := InverseTable[Byte(T0[0])]; W1 := InverseTable[Byte(T0[3] shr 8)];
W2 := InverseTable[Byte(T0[2] shr 16)]; W3 := InverseTable[Byte(T0[1] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[20];
W0 := InverseTable[Byte(T0[1])]; W1 := InverseTable[Byte(T0[0] shr 8)];
W2 := InverseTable[Byte(T0[3] shr 16)]; W3 := InverseTable[Byte(T0[2] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[21];
W0 := InverseTable[Byte(T0[2])]; W1 := InverseTable[Byte(T0[1] shr 8)];
W2 := InverseTable[Byte(T0[0] shr 16)]; W3 := InverseTable[Byte(T0[3] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[22];
W0 := InverseTable[Byte(T0[3])]; W1 := InverseTable[Byte(T0[2] shr 8)];
W2 := InverseTable[Byte(T0[1] shr 16)]; W3 := InverseTable[Byte(T0[0] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[23];
// round 10
W0 := InverseTable[Byte(T1[0])]; W1 := InverseTable[Byte(T1[3] shr 8)];
W2 := InverseTable[Byte(T1[2] shr 16)]; W3 := InverseTable[Byte(T1[1] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[16];
W0 := InverseTable[Byte(T1[1])]; W1 := InverseTable[Byte(T1[0] shr 8)];
W2 := InverseTable[Byte(T1[3] shr 16)]; W3 := InverseTable[Byte(T1[2] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[17];
W0 := InverseTable[Byte(T1[2])]; W1 := InverseTable[Byte(T1[1] shr 8)];
W2 := InverseTable[Byte(T1[0] shr 16)]; W3 := InverseTable[Byte(T1[3] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[18];
W0 := InverseTable[Byte(T1[3])]; W1 := InverseTable[Byte(T1[2] shr 8)];
W2 := InverseTable[Byte(T1[1] shr 16)]; W3 := InverseTable[Byte(T1[0] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[19];
// round 11
W0 := InverseTable[Byte(T0[0])]; W1 := InverseTable[Byte(T0[3] shr 8)];
W2 := InverseTable[Byte(T0[2] shr 16)]; W3 := InverseTable[Byte(T0[1] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[12];
W0 := InverseTable[Byte(T0[1])]; W1 := InverseTable[Byte(T0[0] shr 8)];
W2 := InverseTable[Byte(T0[3] shr 16)]; W3 := InverseTable[Byte(T0[2] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[13];
W0 := InverseTable[Byte(T0[2])]; W1 := InverseTable[Byte(T0[1] shr 8)];
W2 := InverseTable[Byte(T0[0] shr 16)]; W3 := InverseTable[Byte(T0[3] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[14];
W0 := InverseTable[Byte(T0[3])]; W1 := InverseTable[Byte(T0[2] shr 8)];
W2 := InverseTable[Byte(T0[1] shr 16)]; W3 := InverseTable[Byte(T0[0] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[15];
// round 12
W0 := InverseTable[Byte(T1[0])]; W1 := InverseTable[Byte(T1[3] shr 8)];
W2 := InverseTable[Byte(T1[2] shr 16)]; W3 := InverseTable[Byte(T1[1] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[8];
W0 := InverseTable[Byte(T1[1])]; W1 := InverseTable[Byte(T1[0] shr 8)];
W2 := InverseTable[Byte(T1[3] shr 16)]; W3 := InverseTable[Byte(T1[2] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[9];
W0 := InverseTable[Byte(T1[2])]; W1 := InverseTable[Byte(T1[1] shr 8)];
W2 := InverseTable[Byte(T1[0] shr 16)]; W3 := InverseTable[Byte(T1[3] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[10];
W0 := InverseTable[Byte(T1[3])]; W1 := InverseTable[Byte(T1[2] shr 8)];
W2 := InverseTable[Byte(T1[1] shr 16)]; W3 := InverseTable[Byte(T1[0] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[11];
// round 13
W0 := InverseTable[Byte(T0[0])]; W1 := InverseTable[Byte(T0[3] shr 8)];
W2 := InverseTable[Byte(T0[2] shr 16)]; W3 := InverseTable[Byte(T0[1] shr 24)];
T1[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[4];
W0 := InverseTable[Byte(T0[1])]; W1 := InverseTable[Byte(T0[0] shr 8)];
W2 := InverseTable[Byte(T0[3] shr 16)]; W3 := InverseTable[Byte(T0[2] shr 24)];
T1[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[5];
W0 := InverseTable[Byte(T0[2])]; W1 := InverseTable[Byte(T0[1] shr 8)];
W2 := InverseTable[Byte(T0[0] shr 16)]; W3 := InverseTable[Byte(T0[3] shr 24)];
T1[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[6];
W0 := InverseTable[Byte(T0[3])]; W1 := InverseTable[Byte(T0[2] shr 8)];
W2 := InverseTable[Byte(T0[1] shr 16)]; W3 := InverseTable[Byte(T0[0] shr 24)];
T1[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[7];
// last round of transformations
W0 := LastInverseTable[Byte(T1[0])]; W1 := LastInverseTable[Byte(T1[3] shr 8)];
W2 := LastInverseTable[Byte(T1[2] shr 16)]; W3 := LastInverseTable[Byte(T1[1] shr 24)];
T0[0] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[0];
W0 := LastInverseTable[Byte(T1[1])]; W1 := LastInverseTable[Byte(T1[0] shr 8)];
W2 := LastInverseTable[Byte(T1[3] shr 16)]; W3 := LastInverseTable[Byte(T1[2] shr 24)];
T0[1] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[1];
W0 := LastInverseTable[Byte(T1[2])]; W1 := LastInverseTable[Byte(T1[1] shr 8)];
W2 := LastInverseTable[Byte(T1[0] shr 16)]; W3 := LastInverseTable[Byte(T1[3] shr 24)];
T0[2] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[2];
W0 := LastInverseTable[Byte(T1[3])]; W1 := LastInverseTable[Byte(T1[2] shr 8)];
W2 := LastInverseTable[Byte(T1[1] shr 16)]; W3 := LastInverseTable[Byte(T1[0] shr 24)];
T0[3] := (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16))
xor ((W3 shl 24) or (W3 shr 8))) xor Key[3];
// finalizing
PLongWord(@OutBuf[0])^ := T0[0]; PLongWord(@OutBuf[4])^ := T0[1];
PLongWord(@OutBuf[8])^ := T0[2]; PLongWord(@OutBuf[12])^ := T0[3];
end;
// Stream encryption routines (ECB mode)
procedure EncryptAESStreamECB(Source: TStream; Count: cardinal;
const Key: TAESKey128; Dest: TStream);
var
ExpandedKey: TAESExpandedKey128;
begin
ExpandAESKeyForEncryption(Key, ExpandedKey);
EncryptAESStreamECB(Source, Count, ExpandedKey, Dest);
end;
procedure EncryptAESStreamECB(Source: TStream; Count: cardinal;
const Key: TAESKey192; Dest: TStream);
var
ExpandedKey: TAESExpandedKey192;
begin
ExpandAESKeyForEncryption(Key, ExpandedKey);
EncryptAESStreamECB(Source, Count, ExpandedKey, Dest);
end;
procedure EncryptAESStreamECB(Source: TStream; Count: cardinal;
const Key: TAESKey256; Dest: TStream);
var
ExpandedKey: TAESExpandedKey256;
begin
ExpandAESKeyForEncryption(Key, ExpandedKey);
EncryptAESStreamECB(Source, Count, ExpandedKey, Dest);
end;
procedure EncryptAESStreamECB(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey128; Dest: TStream);
var
TempIn, TempOut: TAESBuffer;
Done: cardinal;
begin
if Count = 0 then
begin
Source.Position := 0;
Count := Source.Size;
end
else Count := Min(Count, Source.Size - Source.Position);
if Count = 0 then exit;
while Count >= SizeOf(TAESBuffer) do
begin
Done := Source.Read(TempIn, SizeOf(TempIn));
if Done < SizeOf(TempIn) then
raise EStreamError.Create(SReadError);
EncryptAES(TempIn, ExpandedKey, TempOut);
Done := Dest.Write(TempOut, SizeOf(TempOut));
if Done < SizeOf(TempOut) then
raise EStreamError.Create(SWriteError);
Dec(Count, SizeOf(TAESBuffer));
end;
if Count > 0 then
begin
Done := Source.Read(TempIn, Count);
if Done < Count then
raise EStreamError.Create(SReadError);
FillChar(TempIn[Count], SizeOf(TempIn) - Count, 0);
EncryptAES(TempIn, ExpandedKey, TempOut);
Done := Dest.Write(TempOut, SizeOf(TempOut));
if Done < SizeOf(TempOut) then
raise EStreamError.Create(SWriteError);
end;
end;
procedure EncryptAESStreamECB(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey192; Dest: TStream);
var
TempIn, TempOut: TAESBuffer;
Done: cardinal;
begin
if Count = 0 then
begin
Source.Position := 0;
Count := Source.Size;
end
else Count := Min(Count, Source.Size - Source.Position);
if Count = 0 then exit;
while Count >= SizeOf(TAESBuffer) do
begin
Done := Source.Read(TempIn, SizeOf(TempIn));
if Done < SizeOf(TempIn) then
raise EStreamError.Create(SReadError);
EncryptAES(TempIn, ExpandedKey, TempOut);
Done := Dest.Write(TempOut, SizeOf(TempOut));
if Done < SizeOf(TempOut) then
raise EStreamError.Create(SWriteError);
Dec(Count, SizeOf(TAESBuffer));
end;
if Count > 0 then
begin
Done := Source.Read(TempIn, Count);
if Done < Count then
raise EStreamError.Create(SReadError);
FillChar(TempIn[Count], SizeOf(TempIn) - Count, 0);
EncryptAES(TempIn, ExpandedKey, TempOut);
Done := Dest.Write(TempOut, SizeOf(TempOut));
if Done < SizeOf(TempOut) then
raise EStreamError.Create(SWriteError);
end;
end;
procedure EncryptAESStreamECB(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey256; Dest: TStream);
var
TempIn, TempOut: TAESBuffer;
Done: cardinal;
begin
if Count = 0 then
begin
Source.Position := 0;
Count := Source.Size;
end
else Count := Min(Count, Source.Size - Source.Position);
if Count = 0 then exit;
while Count >= SizeOf(TAESBuffer) do
begin
Done := Source.Read(TempIn, SizeOf(TempIn));
if Done < SizeOf(TempIn) then
raise EStreamError.Create(SReadError);
EncryptAES(TempIn, ExpandedKey, TempOut);
Done := Dest.Write(TempOut, SizeOf(TempOut));
if Done < SizeOf(TempOut) then
raise EStreamError.Create(SWriteError);
Dec(Count, SizeOf(TAESBuffer));
end;
if Count > 0 then
begin
Done := Source.Read(TempIn, Count);
if Done < Count then
raise EStreamError.Create(SReadError);
FillChar(TempIn[Count], SizeOf(TempIn) - Count, 0);
EncryptAES(TempIn, ExpandedKey, TempOut);
Done := Dest.Write(TempOut, SizeOf(TempOut));
if Done < SizeOf(TempOut) then
raise EStreamError.Create(SWriteError);
end;
end;
// Stream decryption routines (ECB mode)
procedure DecryptAESStreamECB(Source: TStream; Count: cardinal;
const Key: TAESKey128; Dest: TStream);
var
ExpandedKey: TAESExpandedKey128;
begin
ExpandAESKeyForDecryption(Key, ExpandedKey);
DecryptAESStreamECB(Source, Count, ExpandedKey, Dest);
end;
procedure DecryptAESStreamECB(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey128; Dest: TStream);
var
TempIn, TempOut: TAESBuffer;
Done: cardinal;
begin
if Count = 0 then
begin
Source.Position := 0;
Count := Source.Size;
end
else Count := Min(Count, Source.Size - Source.Position);
if Count = 0 then exit;
if (Count mod SizeOf(TAESBuffer)) > 0 then
raise EAESError.Create(SInvalidInBufSize);
while Count >= SizeOf(TAESBuffer) do
begin
Done := Source.Read(TempIn, SizeOf(TempIn));
if Done < SizeOf(TempIn) then
raise EStreamError.Create(SReadError);
DecryptAES(TempIn, ExpandedKey, TempOut);
Done := Dest.Write(TempOut, SizeOf(TempOut));
if Done < SizeOf(TempOut) then
raise EStreamError.Create(SWriteError);
Dec(Count, SizeOf(TAESBuffer));
end;
end;
procedure DecryptAESStreamECB(Source: TStream; Count: cardinal;
const Key: TAESKey192; Dest: TStream);
var
ExpandedKey: TAESExpandedKey192;
begin
ExpandAESKeyForDecryption(Key, ExpandedKey);
DecryptAESStreamECB(Source, Count, ExpandedKey, Dest);
end;
procedure DecryptAESStreamECB(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey192; Dest: TStream);
var
TempIn, TempOut: TAESBuffer;
Done: cardinal;
begin
if Count = 0 then
begin
Source.Position := 0;
Count := Source.Size;
end
else Count := Min(Count, Source.Size - Source.Position);
if Count = 0 then exit;
if (Count mod SizeOf(TAESBuffer)) > 0 then
raise EAESError.Create(SInvalidInBufSize);
while Count >= SizeOf(TAESBuffer) do
begin
Done := Source.Read(TempIn, SizeOf(TempIn));
if Done < SizeOf(TempIn) then
raise EStreamError.Create(SReadError);
DecryptAES(TempIn, ExpandedKey, TempOut);
Done := Dest.Write(TempOut, SizeOf(TempOut));
if Done < SizeOf(TempOut) then
raise EStreamError.Create(SWriteError);
Dec(Count, SizeOf(TAESBuffer));
end;
end;
procedure DecryptAESStreamECB(Source: TStream; Count: cardinal;
const Key: TAESKey256; Dest: TStream);
var
ExpandedKey: TAESExpandedKey256;
begin
ExpandAESKeyForDecryption(Key, ExpandedKey);
DecryptAESStreamECB(Source, Count, ExpandedKey, Dest);
end;
procedure DecryptAESStreamECB(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey256; Dest: TStream);
var
TempIn, TempOut: TAESBuffer;
Done: cardinal;
begin
if Count = 0 then
begin
Source.Position := 0;
Count := Source.Size;
end
else Count := Min(Count, Source.Size - Source.Position);
if Count = 0 then exit;
if (Count mod SizeOf(TAESBuffer)) > 0 then
raise EAESError.Create(SInvalidInBufSize);
while Count >= SizeOf(TAESBuffer) do
begin
Done := Source.Read(TempIn, SizeOf(TempIn));
if Done < SizeOf(TempIn) then
raise EStreamError.Create(SReadError);
DecryptAES(TempIn, ExpandedKey, TempOut);
Done := Dest.Write(TempOut, SizeOf(TempOut));
if Done < SizeOf(TempOut) then
raise EStreamError.Create(SWriteError);
Dec(Count, SizeOf(TAESBuffer));
end;
end;
// Stream encryption routines (CBC mode)
procedure EncryptAESStreamCBC(Source: TStream; Count: cardinal;
const Key: TAESKey128; const InitVector: TAESBuffer; Dest: TStream);
var
ExpandedKey: TAESExpandedKey128;
begin
ExpandAESKeyForEncryption(Key, ExpandedKey);
EncryptAESStreamCBC(Source, Count, ExpandedKey, InitVector, Dest);
end;
procedure EncryptAESStreamCBC(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey128; const InitVector: TAESBuffer;
Dest: TStream);
var
TempIn, TempOut, Vector: TAESBuffer;
Done: cardinal;
begin
if Count = 0 then
begin
Source.Position := 0;
Count := Source.Size;
end
else Count := Min(Count, Source.Size - Source.Position);
if Count = 0 then exit;
Vector := InitVector;
while Count >= SizeOf(TAESBuffer) do
begin
Done := Source.Read(TempIn, SizeOf(TempIn));
if Done < SizeOf(TempIn) then
raise EStreamError.Create(SReadError);
PLongWord(@TempIn[0])^ := PLongWord(@TempIn[0])^ xor PLongWord(@Vector[0])^;
PLongWord(@TempIn[4])^ := PLongWord(@TempIn[4])^ xor PLongWord(@Vector[4])^;
PLongWord(@TempIn[8])^ := PLongWord(@TempIn[8])^ xor PLongWord(@Vector[8])^;
PLongWord(@TempIn[12])^ := PLongWord(@TempIn[12])^ xor PLongWord(@Vector[12])^;
EncryptAES(TempIn, ExpandedKey, TempOut);
Done := Dest.Write(TempOut, SizeOf(TempOut));
if Done < SizeOf(TempOut) then
raise EStreamError.Create(SWriteError);
Vector := TempOut;
Dec(Count, SizeOf(TAESBuffer));
end;
if Count > 0 then
begin
Done := Source.Read(TempIn, Count);
if Done < Count then
raise EStreamError.Create(SReadError);
FillChar(TempIn[Count], SizeOf(TempIn) - Count, 0);
PLongWord(@TempIn[0])^ := PLongWord(@TempIn[0])^ xor PLongWord(@Vector[0])^;
PLongWord(@TempIn[4])^ := PLongWord(@TempIn[4])^ xor PLongWord(@Vector[4])^;
PLongWord(@TempIn[8])^ := PLongWord(@TempIn[8])^ xor PLongWord(@Vector[8])^;
PLongWord(@TempIn[12])^ := PLongWord(@TempIn[12])^ xor PLongWord(@Vector[12])^;
EncryptAES(TempIn, ExpandedKey, TempOut);
Done := Dest.Write(TempOut, SizeOf(TempOut));
if Done < SizeOf(TempOut) then
raise EStreamError.Create(SWriteError);
end;
end;
procedure EncryptAESStreamCBC(Source: TStream; Count: cardinal;
const Key: TAESKey192; const InitVector: TAESBuffer; Dest: TStream);
var
ExpandedKey: TAESExpandedKey192;
begin
ExpandAESKeyForEncryption(Key, ExpandedKey);
EncryptAESStreamCBC(Source, Count, ExpandedKey, InitVector, Dest);
end;
procedure EncryptAESStreamCBC(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey192; const InitVector: TAESBuffer;
Dest: TStream);
var
TempIn, TempOut, Vector: TAESBuffer;
Done: cardinal;
begin
if Count = 0 then
begin
Source.Position := 0;
Count := Source.Size;
end
else Count := Min(Count, Source.Size - Source.Position);
if Count = 0 then exit;
Vector := InitVector;
while Count >= SizeOf(TAESBuffer) do
begin
Done := Source.Read(TempIn, SizeOf(TempIn));
if Done < SizeOf(TempIn) then
raise EStreamError.Create(SReadError);
PLongWord(@TempIn[0])^ := PLongWord(@TempIn[0])^ xor PLongWord(@Vector[0])^;
PLongWord(@TempIn[4])^ := PLongWord(@TempIn[4])^ xor PLongWord(@Vector[4])^;
PLongWord(@TempIn[8])^ := PLongWord(@TempIn[8])^ xor PLongWord(@Vector[8])^;
PLongWord(@TempIn[12])^ := PLongWord(@TempIn[12])^ xor PLongWord(@Vector[12])^;
EncryptAES(TempIn, ExpandedKey, TempOut);
Done := Dest.Write(TempOut, SizeOf(TempOut));
if Done < SizeOf(TempOut) then
raise EStreamError.Create(SWriteError);
Vector := TempOut;
Dec(Count, SizeOf(TAESBuffer));
end;
if Count > 0 then
begin
Done := Source.Read(TempIn, Count);
if Done < Count then
raise EStreamError.Create(SReadError);
FillChar(TempIn[Count], SizeOf(TempIn) - Count, 0);
PLongWord(@TempIn[0])^ := PLongWord(@TempIn[0])^ xor PLongWord(@Vector[0])^;
PLongWord(@TempIn[4])^ := PLongWord(@TempIn[4])^ xor PLongWord(@Vector[4])^;
PLongWord(@TempIn[8])^ := PLongWord(@TempIn[8])^ xor PLongWord(@Vector[8])^;
PLongWord(@TempIn[12])^ := PLongWord(@TempIn[12])^ xor PLongWord(@Vector[12])^;
EncryptAES(TempIn, ExpandedKey, TempOut);
Done := Dest.Write(TempOut, SizeOf(TempOut));
if Done < SizeOf(TempOut) then
raise EStreamError.Create(SWriteError);
end;
end;
procedure EncryptAESStreamCBC(Source: TStream; Count: cardinal;
const Key: TAESKey256; const InitVector: TAESBuffer; Dest: TStream);
var
ExpandedKey: TAESExpandedKey256;
begin
ExpandAESKeyForEncryption(Key, ExpandedKey);
EncryptAESStreamCBC(Source, Count, ExpandedKey, InitVector, Dest);
end;
procedure EncryptAESStreamCBC(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey256; const InitVector: TAESBuffer;
Dest: TStream);
var
TempIn, TempOut, Vector: TAESBuffer;
Done: cardinal;
begin
if Count = 0 then
begin
Source.Position := 0;
Count := Source.Size;
end
else Count := Min(Count, Source.Size - Source.Position);
if Count = 0 then exit;
Vector := InitVector;
while Count >= SizeOf(TAESBuffer) do
begin
Done := Source.Read(TempIn, SizeOf(TempIn));
if Done < SizeOf(TempIn) then
raise EStreamError.Create(SReadError);
PLongWord(@TempIn[0])^ := PLongWord(@TempIn[0])^ xor PLongWord(@Vector[0])^;
PLongWord(@TempIn[4])^ := PLongWord(@TempIn[4])^ xor PLongWord(@Vector[4])^;
PLongWord(@TempIn[8])^ := PLongWord(@TempIn[8])^ xor PLongWord(@Vector[8])^;
PLongWord(@TempIn[12])^ := PLongWord(@TempIn[12])^ xor PLongWord(@Vector[12])^;
EncryptAES(TempIn, ExpandedKey, TempOut);
Done := Dest.Write(TempOut, SizeOf(TempOut));
if Done < SizeOf(TempOut) then
raise EStreamError.Create(SWriteError);
Vector := TempOut;
Dec(Count, SizeOf(TAESBuffer));
end;
if Count > 0 then
begin
Done := Source.Read(TempIn, Count);
if Done < Count then
raise EStreamError.Create(SReadError);
FillChar(TempIn[Count], SizeOf(TempIn) - Count, 0);
PLongWord(@TempIn[0])^ := PLongWord(@TempIn[0])^ xor PLongWord(@Vector[0])^;
PLongWord(@TempIn[4])^ := PLongWord(@TempIn[4])^ xor PLongWord(@Vector[4])^;
PLongWord(@TempIn[8])^ := PLongWord(@TempIn[8])^ xor PLongWord(@Vector[8])^;
PLongWord(@TempIn[12])^ := PLongWord(@TempIn[12])^ xor PLongWord(@Vector[12])^;
EncryptAES(TempIn, ExpandedKey, TempOut);
Done := Dest.Write(TempOut, SizeOf(TempOut));
if Done < SizeOf(TempOut) then
raise EStreamError.Create(SWriteError);
end;
end;
// Stream decryption routines (CBC mode)
procedure DecryptAESStreamCBC(Source: TStream; Count: cardinal;
const Key: TAESKey128; const InitVector: TAESBuffer; Dest: TStream);
var
ExpandedKey: TAESExpandedKey128;
begin
ExpandAESKeyForDecryption(Key, ExpandedKey);
DecryptAESStreamCBC(Source, Count, ExpandedKey, InitVector, Dest);
end;
procedure DecryptAESStreamCBC(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey128; const InitVector: TAESBuffer;
Dest: TStream);
var
TempIn, TempOut: TAESBuffer;
Vector1, Vector2: TAESBuffer;
Done: cardinal;
begin
if Count = 0 then
begin
Source.Position := 0;
Count := Source.Size;
end
else Count := Min(Count, Source.Size - Source.Position);
if Count = 0 then exit;
if (Count mod SizeOf(TAESBuffer)) > 0 then
raise EAESError.Create(SInvalidInBufSize);
Vector1 := InitVector;
while Count >= SizeOf(TAESBuffer) do
begin
Done := Source.Read(TempIn, SizeOf(TempIn));
if Done < SizeOf(TempIn) then
raise EStreamError(SReadError);
Vector2 := TempIn;
DecryptAES(TempIn, ExpandedKey, TempOut);
PLongWord(@TempOut[0])^ := PLongWord(@TempOut[0])^ xor PLongWord(@Vector1[0])^;
PLongWord(@TempOut[4])^ := PLongWord(@TempOut[4])^ xor PLongWord(@Vector1[4])^;
PLongWord(@TempOut[8])^ := PLongWord(@TempOut[8])^ xor PLongWord(@Vector1[8])^;
PLongWord(@TempOut[12])^ := PLongWord(@TempOut[12])^ xor PLongWord(@Vector1[12])^;
Done := Dest.Write(TempOut, SizeOf(TempOut));
if Done < SizeOf(TempOut) then
raise EStreamError(SWriteError);
Vector1 := Vector2;
Dec(Count, SizeOf(TAESBuffer));
end;
end;
procedure DecryptAESStreamCBC(Source: TStream; Count: cardinal;
const Key: TAESKey192; const InitVector: TAESBuffer; Dest: TStream);
var
ExpandedKey: TAESExpandedKey192;
begin
ExpandAESKeyForDecryption(Key, ExpandedKey);
DecryptAESStreamCBC(Source, Count, ExpandedKey, InitVector, Dest);
end;
procedure DecryptAESStreamCBC(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey192; const InitVector: TAESBuffer;
Dest: TStream);
var
TempIn, TempOut: TAESBuffer;
Vector1, Vector2: TAESBuffer;
Done: cardinal;
begin
if Count = 0 then
begin
Source.Position := 0;
Count := Source.Size;
end
else Count := Min(Count, Source.Size - Source.Position);
if Count = 0 then exit;
if (Count mod SizeOf(TAESBuffer)) > 0 then
raise EAESError.Create(SInvalidInBufSize);
Vector1 := InitVector;
while Count >= SizeOf(TAESBuffer) do
begin
Done := Source.Read(TempIn, SizeOf(TempIn));
if Done < SizeOf(TempIn) then
raise EStreamError(SReadError);
Vector2 := TempIn;
DecryptAES(TempIn, ExpandedKey, TempOut);
PLongWord(@TempOut[0])^ := PLongWord(@TempOut[0])^ xor PLongWord(@Vector1[0])^;
PLongWord(@TempOut[4])^ := PLongWord(@TempOut[4])^ xor PLongWord(@Vector1[4])^;
PLongWord(@TempOut[8])^ := PLongWord(@TempOut[8])^ xor PLongWord(@Vector1[8])^;
PLongWord(@TempOut[12])^ := PLongWord(@TempOut[12])^ xor PLongWord(@Vector1[12])^;
Done := Dest.Write(TempOut, SizeOf(TempOut));
if Done < SizeOf(TempOut) then
raise EStreamError(SWriteError);
Vector1 := Vector2;
Dec(Count, SizeOf(TAESBuffer));
end;
end;
procedure DecryptAESStreamCBC(Source: TStream; Count: cardinal;
const Key: TAESKey256; const InitVector: TAESBuffer; Dest: TStream);
var
ExpandedKey: TAESExpandedKey256;
begin
ExpandAESKeyForDecryption(Key, ExpandedKey);
DecryptAESStreamCBC(Source, Count, ExpandedKey, InitVector, Dest);
end;
procedure DecryptAESStreamCBC(Source: TStream; Count: cardinal;
const ExpandedKey: TAESExpandedKey256; const InitVector: TAESBuffer;
Dest: TStream);
var
TempIn, TempOut: TAESBuffer;
Vector1, Vector2: TAESBuffer;
Done: cardinal;
begin
if Count = 0 then
begin
Source.Position := 0;
Count := Source.Size;
end
else Count := Min(Count, Source.Size - Source.Position);
if Count = 0 then exit;
if (Count mod SizeOf(TAESBuffer)) > 0 then
raise EAESError.Create(SInvalidInBufSize);
Vector1 := InitVector;
while Count >= SizeOf(TAESBuffer) do
begin
Done := Source.Read(TempIn, SizeOf(TempIn));
if Done < SizeOf(TempIn) then
raise EStreamError(SReadError);
Vector2 := TempIn;
DecryptAES(TempIn, ExpandedKey, TempOut);
PLongWord(@TempOut[0])^ := PLongWord(@TempOut[0])^ xor PLongWord(@Vector1[0])^;
PLongWord(@TempOut[4])^ := PLongWord(@TempOut[4])^ xor PLongWord(@Vector1[4])^;
PLongWord(@TempOut[8])^ := PLongWord(@TempOut[8])^ xor PLongWord(@Vector1[8])^;
PLongWord(@TempOut[12])^ := PLongWord(@TempOut[12])^ xor PLongWord(@Vector1[12])^;
Done := Dest.Write(TempOut, SizeOf(TempOut));
if Done < SizeOf(TempOut) then
raise EStreamError(SWriteError);
Vector1 := Vector2;
Dec(Count, SizeOf(TAESBuffer));
end;
end;
end.
| 55.069104 | 106 | 0.617267 |
aa86793278a215cb9cb6bfed45e695a491848d2b
| 3,378 |
pas
|
Pascal
|
Model/GrupoProduto/MFichas.Model.GrupoProduto.pas
|
JoseLSB/rodeo-sales-project
|
28699e98d52b83cc8d97dcbe8a66f7358113b17f
|
[
"MIT"
] | null | null | null |
Model/GrupoProduto/MFichas.Model.GrupoProduto.pas
|
JoseLSB/rodeo-sales-project
|
28699e98d52b83cc8d97dcbe8a66f7358113b17f
|
[
"MIT"
] | null | null | null |
Model/GrupoProduto/MFichas.Model.GrupoProduto.pas
|
JoseLSB/rodeo-sales-project
|
28699e98d52b83cc8d97dcbe8a66f7358113b17f
|
[
"MIT"
] | null | null | null |
unit MFichas.Model.GrupoProduto;
interface
uses
System.SysUtils,
MFichas.Model.GrupoProduto.Interfaces,
MFichas.Model.GrupoProduto.Metodos.Buscar,
MFichas.Model.GrupoProduto.Metodos.Cadastrar,
MFichas.Model.Entidade.GRUPOPRODUTO,
MFichas.Model.Conexao.Interfaces,
MFichas.Model.Conexao.Factory,
ORMBR.Container.ObjectSet,
ORMBR.Container.ObjectSet.Interfaces,
ORMBR.Container.FDMemTable,
ORMBR.Container.DataSet.Interfaces,
FireDAC.Comp.Client, MFichas.Model.GrupoProduto.Metodos.Editar;
type
TModelGrupoProduto = class(TInterfacedObject, iModelGrupoProduto, iModelGrupoProdutoMetodos)
private
FEntidade : TGRUPOPRODUTO;
FConn : iModelConexaoSQL;
FDAOObjectSet: iContainerObjectSet<TGRUPOPRODUTO>;
FDAODataSet : iContainerDataSet<TGRUPOPRODUTO>;
FFDMemTable : TFDMemTable;
constructor Create;
public
destructor Destroy; override;
class function New: iModelGrupoProduto;
function Metodos : iModelGrupoProdutoMetodos;
function Entidade : TGRUPOPRODUTO; overload;
function Entidade(AEntidade: TGRUPOPRODUTO): iModelGrupoProduto; overload;
function DAO : iContainerObjectSet<TGRUPOPRODUTO>;
function DAODataSet : iContainerDataSet<TGRUPOPRODUTO>;
//METODOS
function Cadastrar: iModelGrupoProdutoMetodosCadastrar;
function Editar : iModelGrupoProdutoMetodosEditar;
function Buscar : iModelGrupoProdutoMetodosBuscar;
function &End : iModelGrupoProduto;
end;
implementation
{ TModelGrupoProduto }
function TModelGrupoProduto.Buscar: iModelGrupoProdutoMetodosBuscar;
begin
Result := TModelGrupoProdutoMetodosBuscar.New(Self);
end;
function TModelGrupoProduto.Cadastrar: iModelGrupoProdutoMetodosCadastrar;
begin
Result := TModelGrupoProdutoMetodosCadastrar.New(Self);
end;
function TModelGrupoProduto.Editar: iModelGrupoProdutoMetodosEditar;
begin
Result := TModelGrupoProdutoMetodosEditar.New(Self);
end;
function TModelGrupoProduto.&End: iModelGrupoProduto;
begin
Result := Self;
end;
function TModelGrupoProduto.Entidade: TGRUPOPRODUTO;
begin
Result := FEntidade;
end;
function TModelGrupoProduto.Entidade(
AEntidade: TGRUPOPRODUTO): iModelGrupoProduto;
begin
Result := Self;
FEntidade := AEntidade;
end;
constructor TModelGrupoProduto.Create;
begin
FEntidade := TGRUPOPRODUTO.Create;
FConn := TModelConexaoFactory.New.ConexaoSQL;
FDAOObjectSet := TContainerObjectSet<TGRUPOPRODUTO>.Create(FConn.Conn, 10);
FFDMemTable := TFDMemTable.Create(nil);
FDAODataSet := TContainerFDMemTable<TGRUPOPRODUTO>.Create(FConn.Conn, FFDMemTable);
end;
function TModelGrupoProduto.DAO: iContainerObjectSet<TGRUPOPRODUTO>;
begin
Result := FDAOObjectSet;
end;
function TModelGrupoProduto.DAODataSet: iContainerDataSet<TGRUPOPRODUTO>;
begin
Result := FDAODataSet;
end;
destructor TModelGrupoProduto.Destroy;
begin
{$IFDEF MSWINDOWS}
FreeAndNil(FEntidade);
FreeAndNil(FFDMemTable);
{$ELSE}
FEntidade.Free;
FEntidade.DisposeOf;
FFDMemTable.Free;
FFDMemTable.DisposeOf;
{$ENDIF}
inherited;
end;
function TModelGrupoProduto.Metodos: iModelGrupoProdutoMetodos;
begin
Result := Self;
end;
class function TModelGrupoProduto.New: iModelGrupoProduto;
begin
Result := Self.Create;
end;
end.
| 26.809524 | 94 | 0.762285 |
8342e121be9f556245ea85d0572aef1eb1f1eae3
| 37,643 |
pas
|
Pascal
|
source/PraButtonStyle.pas
|
MuminjonGuru/Delphi-PraButtonStyle
|
ae33192ea17f60d1bbcb41f1e9f02bb708937e16
|
[
"MIT"
] | 2 |
2021-01-18T10:05:20.000Z
|
2021-04-25T07:30:29.000Z
|
source/PraButtonStyle.pas
|
MuminjonGuru/Delphi-PraButtonStyle
|
ae33192ea17f60d1bbcb41f1e9f02bb708937e16
|
[
"MIT"
] | null | null | null |
source/PraButtonStyle.pas
|
MuminjonGuru/Delphi-PraButtonStyle
|
ae33192ea17f60d1bbcb41f1e9f02bb708937e16
|
[
"MIT"
] | 1 |
2021-01-18T10:05:21.000Z
|
2021-01-18T10:05:21.000Z
|
// *************************************************************************** }
//
// Delphi PraButtonStyle
//
// Copyright (c) 2020-2020 Paulo Roberto Alves
//
// https://github.com/pauloalvis/Delphi-PraButtonStyle
//
// ***************************************************************************
//
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// ***************************************************************************
unit PraButtonStyle;
interface
uses
Vcl.Graphics,
Vcl.Imaging.pngimage,
Vcl.buttons,
System.SysUtils,
System.Classes,
System.UITypes,
Vcl.Controls,
Winapi.Messages,
Winapi.Windows,
System.Math,
PraInterfaces;
type
TPraAlignment = (paLeftJustify, paCenter);
TPraButtonStyleType = (stRoundRect, stRectangle);
TPraButtonStyleStyle = (bsCustom, bsPrimary, bsSecondary, bsSuccess, bsDanger, bsWarning, bsInfo, bsLight, bsDark);
TTemplateStyle = (tsNone = 0, tsSave = 1, tsCancel = 2, tsEdit = 3, tsDelete = 4, tsPrint = 5, tsGear = 6);
TPraButtonStyle = class;
TFocusControl = class(TWinControl)
private
FGraphicControl: TPraButtonStyle;
protected
procedure WndProc(var Message: TMessage); override;
procedure WMKeyDown(var Message: TWMKeyDown); message WM_KEYDOWN;
procedure WMKeyUp(var Message: TWMKeyDown); message WM_KEYUP;
public
constructor Create(AOwner: TComponent; AGraphicControl: TPraButtonStyle); reintroduce;
property TabStop default false;
property TabOrder;
end;
TPraButtonChangeFont = procedure(const Value: Boolean) of Object;
TPraButtonFont = class(TFont)
private
FCopyOfFont: Boolean;
FonChange: TPraButtonChangeFont;
function IsCopyOfFont: Boolean;
procedure SetCopyOfFont(const Value: Boolean);
published
property CopyOfFont: Boolean read FCopyOfFont write SetCopyOfFont stored IsCopyOfFont default false;
public
property onChange: TPraButtonChangeFont read FonChange write FonChange;
end;
TPraButtonStyle = class(TGraphicControl)
private
FPraButtonStyleTemplate: iPraButtonStyleTemplate;
FPraButtonStyleTemplateType: iPraButtonStyleTemplateType;
FMouseEnter: Boolean;
FState: TButtonState;
FFocusControl: TFocusControl;
FControllerStyleTemplate: Boolean;
FPen: TPen;
FPenDown: TPen;
FPenFocused: TPen;
FPenDisabled: TPen;
FBrush: TBrush;
FBrushDown: TBrush;
FBrushFocused: TBrush;
FBrushDisabled: TBrush;
FPicture: TPicture;
FPictureFocused: TPicture;
FPictureDisabled: TPicture;
FPictureMarginLeft: SmallInt;
FFontDown: TPraButtonFont;
FFontFocused: TPraButtonFont;
FFontDisabled: TPraButtonFont;
FCaption: TCaption;
FShowCaption: Boolean;
FRadius: SmallInt;
FSpacing: SmallInt;
FClickOnEnter: Boolean;
FAlignment: TPraAlignment;
FShape: TPraButtonStyleType;
FPictureCenter: Boolean;
FStyle: TPraButtonStyleStyle;
FStyleOutline: Boolean;
FAboutInfo: String;
FTemplateStyle: TTemplateStyle;
procedure SetPen(Value: TPen);
procedure SetPenDown(const Value: TPen);
procedure SetPenFocused(const Value: TPen);
procedure SetPenDisabled(const Value: TPen);
procedure SetBrush(Value: TBrush);
procedure SetBrushDown(const Value: TBrush);
procedure SetBrushFocused(const Value: TBrush);
procedure SetBrushDisabled(const Value: TBrush);
procedure SetPicture(const Value: TPicture);
procedure SetPictureFocused(const Value: TPicture);
procedure SetPictureDisabled(const Value: TPicture);
procedure SetPictureMarginLeft(const Value: SmallInt);
procedure SetFontDown(const Value: TPraButtonFont);
procedure SetFontFocused(const Value: TPraButtonFont);
procedure SetFontDisabled(const Value: TPraButtonFont);
function IsRadius: Boolean;
function IsSpacing: Boolean;
function IsShowCaption: Boolean;
function IsClickOnEnter: Boolean;
function IsStoredAlignment: Boolean;
function IsPictureMarginLeft: Boolean;
function GetTabOrder: Integer;
procedure SetTabStop(const Value: Boolean);
function GetTabStop: Boolean;
procedure SetTabOrder(const Value: Integer);
function GetFocused: Boolean;
function GetCanFocus: Boolean;
procedure SetRadius(const Value: SmallInt);
procedure SetCaption(const Value: TCaption);
procedure SetSpacing(const Value: SmallInt);
procedure SetShape(Value: TPraButtonStyleType);
procedure SetShowCaption(const Value: Boolean);
procedure SetAlignment(const Value: TPraAlignment);
procedure DestroyFocusControl;
procedure SetClickOnEnter(const Value: Boolean);
procedure CreateFocusControl(AOwner: TComponent; AParent: TWinControl);
procedure WMEraseBkgnd(var Message: TWMEraseBkGnd); message WM_ERASEBKGND;
procedure DoMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure DoMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
function isPictureCenter: Boolean;
procedure SetPictureCenter(const Value: Boolean);
function informedPicture: Boolean;
function GetPictureMarginLeft: SmallInt;
function GetPictureWidth: SmallInt;
function GetPictureHeight: SmallInt;
function GetSpacing: SmallInt;
function IsStoredStyle: Boolean;
procedure SetStyle(const Value: TPraButtonStyleStyle);
function IsStyleOutline: Boolean;
procedure SetStyleOutline(const Value: Boolean);
function IsStoredTemplateStyle: Boolean;
procedure SetTemplateStyle(const Value: TTemplateStyle);
procedure StyleChanged(Sender: TObject);
procedure StyleOutlineConfig;
procedure FontDownCopyOfFont(const AValue: Boolean);
procedure FontFocusedCopyOfFont(const AValue: Boolean);
procedure FontDisabledCopyOfFont(const AValue: Boolean);
procedure LoadingTemplateInfo;
procedure LoadingTemplateDark;
procedure LoadingTemplateLight;
procedure LoadingTemplateDanger;
procedure LoadingTemplateSuccess;
procedure LoadingTemplateWarning;
procedure LoadingTemplatePrimary;
procedure LoadingTemplateSecondary;
procedure ApplyTemplate;
procedure CreateButtonInfo;
procedure CreateButtonDark;
procedure CreateButtonLight;
procedure CreateButtonDanger;
procedure CreateButtonSuccess;
procedure CreateButtonWarning;
procedure CreateButtonPrimary;
procedure CreateButtonSecondary;
procedure CreateButtonPrint;
procedure CreateButtonSave;
procedure CreateButtonEdit;
procedure CreateButtonDelete;
procedure CreateButtonCancel;
procedure CreateButtonGear;
procedure SetPictureTemplate;
procedure CreateButtonDefault;
procedure SetSize(const AHeight, AWidth: Integer);
function isTemplateStyle: Boolean;
protected
procedure DoKeyUp;
procedure Paint; override;
procedure SetParent(AParent: TWinControl); override;
procedure DoKeyDown(var Key: Word; Shift: TShiftState);
procedure CMEnter(var Message: TCMEnter); message CM_ENTER;
procedure ChangeScale(M, D: Integer; isDpiChange: Boolean); override;
procedure CMMouseEnter(var Message: TNotifyEvent); message CM_MOUSEENTER;
procedure CMMouseLeave(var Message: TNotifyEvent); message CM_MOUSELEAVE;
public
property Focused: Boolean read GetFocused;
property CanFocus: Boolean read GetCanFocus;
procedure SetFocus;
procedure Assign(Source: TPersistent); override;
procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
published
property Action;
property Align;
property Anchors;
property Cursor default crHandPoint;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property Constraints;
property ParentShowHint;
property ShowHint;
property Touch;
property Visible;
property OnContextPopup;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnMouseActivate;
property OnMouseDown;
property OnMouseEnter;
property OnMouseLeave;
property OnMouseMove;
property OnMouseUp;
property OnGesture;
property OnStartDock;
property OnStartDrag;
property OnClick;
property Font;
property ParentFont default true;
property Pen: TPen read FPen write SetPen;
property PenDown: TPen read FPenDown write SetPenDown;
property PenFocused: TPen read FPenFocused write SetPenFocused;
property PenDisabled: TPen read FPenDisabled write SetPenDisabled;
property Brush: TBrush read FBrush write SetBrush;
property BrushDown: TBrush read FBrushDown write SetBrushDown;
property BrushFocused: TBrush read FBrushFocused write SetBrushFocused;
property BrushDisabled: TBrush read FBrushDisabled write SetBrushDisabled;
property Picture: TPicture read FPicture write SetPicture;
property PictureFocused: TPicture read FPictureFocused write SetPictureFocused;
property PictureDisabled: TPicture read FPictureDisabled write SetPictureDisabled;
property FontDown: TPraButtonFont read FFontDown Write SetFontDown;
property FontFocused: TPraButtonFont read FFontFocused Write SetFontFocused;
property FontDisabled: TPraButtonFont read FFontDisabled Write SetFontDisabled;
property Caption: TCaption read FCaption write SetCaption;
property TabOrder: Integer read GetTabOrder write SetTabOrder;
property TabStop: Boolean read GetTabStop write SetTabStop default false;
property Radius: SmallInt read FRadius write SetRadius stored IsRadius default 4;
property Shape: TPraButtonStyleType read FShape write SetShape default stRoundRect;
property Spacing: SmallInt read FSpacing write SetSpacing stored IsSpacing default 3;
property ShowCaption: Boolean read FShowCaption write SetShowCaption stored IsShowCaption default true;
property ClickOnEnter: Boolean read FClickOnEnter write SetClickOnEnter stored IsClickOnEnter default true;
property Alignment: TPraAlignment read FAlignment write SetAlignment stored IsStoredAlignment default paCenter;
property PictureCenter: Boolean read FPictureCenter write SetPictureCenter stored isPictureCenter default false;
property PictureMarginLeft: SmallInt read FPictureMarginLeft write SetPictureMarginLeft stored IsPictureMarginLeft default 3;
property Style: TPraButtonStyleStyle read FStyle write SetStyle stored IsStoredStyle default bsCustom;
property StyleOutline: Boolean read FStyleOutline write SetStyleOutline stored IsStyleOutline default false;
property TemplateStyle: TTemplateStyle read FTemplateStyle write SetTemplateStyle stored IsStoredTemplateStyle default tsNone;
property AboutInfo: String Read FAboutInfo Write FAboutInfo Stored false;
end;
implementation
uses
Vcl.Forms,
PraButtonStyleSave,
PraButtonStyleEdit,
PraButtonStyleGear,
PraButtonStylePrint,
PraButtonStyleCancel,
PraButtonStyleDelete,
PraButtonStyleTemplateInfo,
PraButtonStyleTemplateDark,
PraButtonStyleTemplateLight,
PraButtonStyleTemplateDanger,
PraButtonStyleTemplatePrimary,
PraButtonStyleTemplateSuccess,
PraButtonStyleTemplateWarning,
PraButtonStyleTemplateSecondary;
procedure TPraButtonStyle.ApplyTemplate;
begin
Brush.Color := FPraButtonStyleTemplate.GetBrushColor;
BrushFocused.Color := FPraButtonStyleTemplate.GetBrushFocusedColor;
BrushDown.Color := FPraButtonStyleTemplate.GetBrushDownColor;
BrushDisabled.Color := FPraButtonStyleTemplate.GetBrushDisabledColor;
PenDown.Color := FPraButtonStyleTemplate.GetPenDownColor;
Pen.Style := FPraButtonStyleTemplate.GetPenConfigurationCommon.GetPenStyle;
PenFocused.Style := FPraButtonStyleTemplate.GetPenConfigurationCommon.GetPenFocusedStyle;
PenDisabled.Style := FPraButtonStyleTemplate.GetPenConfigurationCommon.GetPenDisabledStyle;
PenDown.Style := FPraButtonStyleTemplate.GetPenConfigurationCommon.GetPenDownStyle;
PenDown.Width := FPraButtonStyleTemplate.GetPenConfigurationCommon.GetPenDownWidth;
Font.Assign(FPraButtonStyleTemplate.GetFontConfigurationCommon.GetFont);
FontDown.Assign(FPraButtonStyleTemplate.GetFontConfigurationCommon.GetFontDown);
FontDisabled.Assign(FPraButtonStyleTemplate.GetFontConfigurationCommon.GetFontDisabled);
FontFocused.Assign(FPraButtonStyleTemplate.GetFontConfigurationCommon.GetFontFocused);
end;
procedure TPraButtonStyle.Assign(Source: TPersistent);
begin
if Source is TPraButtonStyle then
begin
Brush.Assign(TPraButtonStyle(Source).Brush);
BrushFocused.Assign(TPraButtonStyle(Source).BrushFocused);
Pen.Assign(TPraButtonStyle(Source).Pen);
PenFocused.Assign(TPraButtonStyle(Source).PenFocused);
Font.Assign(TPraButtonStyle(Source).Font);
FontFocused.Assign(TPraButtonStyle(Source).FontFocused);
FontDown.Assign(TPraButtonStyle(Source).FontDown);
Radius := TPraButtonStyle(Source).Radius;
end
else
inherited Assign(Source);
end;
procedure TPraButtonStyle.ChangeScale(M, D: Integer; isDpiChange: Boolean);
var
Flags: TScalingFlags;
begin
FPen.Width := MulDiv(FPen.Width, M, D);
// Scaling of other Fonts as current Font
if csLoading in ComponentState then
Flags := ScalingFlags
else
Flags := DefaultScalingFlags;
if not ParentFont and (sfFont in Flags) then
begin
FFontDown.Height := MulDiv(FFontDown.Height, M, D);
FFontFocused.Height := MulDiv(FFontFocused.Height, M, D);
FFontDisabled.Height := MulDiv(FFontDisabled.Height, M, D);
end;
inherited;
end;
procedure TPraButtonStyle.CMEnter(var Message: TCMEnter);
begin
if not(Enabled) or (csDesigning in ComponentState) then
Exit;
FMouseEnter := false;
invalidate;
end;
procedure TPraButtonStyle.CMMouseEnter(var Message: TNotifyEvent);
begin
if not(Enabled) or (csDesigning in ComponentState) then
Exit;
FMouseEnter := true;
invalidate;
end;
procedure TPraButtonStyle.CMMouseLeave(var Message: TNotifyEvent);
begin
if not(Enabled) or (csDesigning in ComponentState) then
Exit;
FMouseEnter := false;
invalidate;
end;
procedure TPraButtonStyle.FontDisabledCopyOfFont(const AValue: Boolean);
begin
if AValue then
FFontDisabled.Assign(Font);
end;
procedure TPraButtonStyle.FontDownCopyOfFont(const AValue: Boolean);
begin
if AValue then
FFontDown.Assign(Font);
end;
procedure TPraButtonStyle.FontFocusedCopyOfFont(const AValue: Boolean);
begin
if AValue then
FFontFocused.Assign(Font);
end;
constructor TPraButtonStyle.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FFocusControl := nil;
CreateFocusControl(nil, TWinControl(AOwner));
Cursor := crHandPoint;
ControlStyle := ControlStyle + [csReplicatable];
ParentFont := true;
Width := 75;
Height := 25;
// Pen
FPen := TPen.Create;
FPen.onChange := StyleChanged;
// PenDown
FPenDown := TPen.Create;
FPenDown.onChange := StyleChanged;
// PenFocused
FPenFocused := TPen.Create;
FPenFocused.onChange := StyleChanged;
// PenDisabled
FPenDisabled := TPen.Create;
FPenDisabled.onChange := StyleChanged;
// Brush
FBrush := TBrush.Create;
FBrush.onChange := StyleChanged;
// BrushDown
FBrushDown := TBrush.Create;
FBrushDown.onChange := StyleChanged;
// BrushFocused
FBrushFocused := TBrush.Create;
FBrushFocused.onChange := StyleChanged;
// BrushDisabled
FBrushDisabled := TBrush.Create;
FBrushDisabled.onChange := StyleChanged;
// Picture
FPicture := TPicture.Create;
FPicture.onChange := StyleChanged;
// PictureFocused
FPictureFocused := TPicture.Create;
FPictureFocused.onChange := StyleChanged;
// PictureDisabled
FPictureDisabled := TPicture.Create;
FPictureDisabled.onChange := StyleChanged;
// FontDown
FFontDown := TPraButtonFont.Create;
FFontDown.onChange := FontDownCopyOfFont;
// FontFocused
FFontFocused := TPraButtonFont.Create;
FFontFocused.onChange := FontFocusedCopyOfFont;
// FontDisabled
FFontDisabled := TPraButtonFont.Create;
FFontDisabled.onChange := FontDisabledCopyOfFont;
FMouseEnter := false;
FShowCaption := true;
FClickOnEnter := true;
TabStop := false;
OnMouseDown := DoMouseDown;
OnMouseUp := DoMouseUp;
FControllerStyleTemplate := false;
FStyleOutline := false;
CreateButtonDefault;
end;
procedure TPraButtonStyle.CreateButtonCancel;
begin
LoadingTemplateSecondary;
FPraButtonStyleTemplateType := TPraButtonStyleCancel.New;
Height := FPraButtonStyleTemplateType.GetSizeHeight;
Width := FPraButtonStyleTemplateType.GetSizeWidth;
end;
procedure TPraButtonStyle.CreateButtonDanger;
begin
LoadingTemplateDanger;
Height := FPraButtonStyleTemplate.GetSizeHeight;
Width := FPraButtonStyleTemplate.GetSizeWidth;
end;
procedure TPraButtonStyle.CreateButtonDark;
begin
LoadingTemplateDark;
Height := FPraButtonStyleTemplate.GetSizeHeight;
Width := FPraButtonStyleTemplate.GetSizeWidth;
end;
procedure TPraButtonStyle.CreateButtonDefault;
begin
Font.Name := 'Tahoma';
FBrush.Color := clWhite;
FBrushDown.Color := $00EBEBEB;
FBrushFocused.Color := $00EBEBEB;
FBrushDisabled.Color := $00EBEBEB;
FFontDown.Assign(Self.Font);
FFontFocused.Assign(Self.Font);
FFontDisabled.Assign(Self.Font);
FRadius := 4;
FSpacing := 3;
FPictureMarginLeft := 3;
FAlignment := paCenter;
FStyle := bsCustom;
FTemplateStyle := tsNone;
if Assigned(FPicture.Graphic) then
FPicture.Graphic := nil;
if Assigned(FPictureFocused.Graphic) then
FPictureFocused.Graphic := nil;
if Assigned(FPictureDisabled.Graphic) then
FPictureDisabled.Graphic := nil;
end;
procedure TPraButtonStyle.CreateButtonDelete;
begin
LoadingTemplateDanger;
FPraButtonStyleTemplateType := TPraButtonStyleDelete.New;
Height := FPraButtonStyleTemplateType.GetSizeHeight;
Width := FPraButtonStyleTemplateType.GetSizeWidth;
end;
procedure TPraButtonStyle.CreateButtonEdit;
begin
LoadingTemplateWarning;
FPraButtonStyleTemplateType := TPraButtonStyleEdit.New;
Height := FPraButtonStyleTemplateType.GetSizeHeight;
Width := FPraButtonStyleTemplateType.GetSizeWidth;
end;
procedure TPraButtonStyle.CreateButtonGear;
begin
LoadingTemplatePrimary;
FPraButtonStyleTemplateType := TPraButtonStyleGear.New;
Height := FPraButtonStyleTemplateType.GetSizeHeight;
Width := FPraButtonStyleTemplateType.GetSizeWidth;
PictureCenter := true;
end;
procedure TPraButtonStyle.CreateButtonInfo;
begin
LoadingTemplateInfo;
Height := FPraButtonStyleTemplate.GetSizeHeight;
Width := FPraButtonStyleTemplate.GetSizeWidth;
end;
procedure TPraButtonStyle.CreateButtonLight;
begin
LoadingTemplateLight;
Height := FPraButtonStyleTemplate.GetSizeHeight;
Width := FPraButtonStyleTemplate.GetSizeWidth;
end;
procedure TPraButtonStyle.CreateButtonPrimary;
begin
LoadingTemplatePrimary;
Height := FPraButtonStyleTemplate.GetSizeHeight;
Width := FPraButtonStyleTemplate.GetSizeWidth;
end;
procedure TPraButtonStyle.CreateButtonPrint;
begin
LoadingTemplateInfo;
FPraButtonStyleTemplateType := TPraButtonStylePrint.New;
Height := FPraButtonStyleTemplateType.GetSizeHeight;
Width := FPraButtonStyleTemplateType.GetSizeWidth;
end;
procedure TPraButtonStyle.CreateButtonSave;
begin
LoadingTemplateSuccess;
FPraButtonStyleTemplateType := TPraButtonStyleSave.New;
Height := FPraButtonStyleTemplateType.GetSizeHeight;
Width := FPraButtonStyleTemplateType.GetSizeWidth;
end;
procedure TPraButtonStyle.CreateButtonSecondary;
begin
LoadingTemplateSecondary;
Height := FPraButtonStyleTemplate.GetSizeHeight;
Width := FPraButtonStyleTemplate.GetSizeWidth;
end;
procedure TPraButtonStyle.CreateButtonSuccess;
begin
LoadingTemplateSuccess;
Height := FPraButtonStyleTemplate.GetSizeHeight;
Width := FPraButtonStyleTemplate.GetSizeWidth;
end;
procedure TPraButtonStyle.CreateButtonWarning;
begin
LoadingTemplateWarning;
Height := FPraButtonStyleTemplate.GetSizeHeight;
Width := FPraButtonStyleTemplate.GetSizeWidth;
end;
procedure TPraButtonStyle.CreateFocusControl(AOwner: TComponent; AParent: TWinControl);
begin
if not Assigned(FFocusControl) then
begin
FFocusControl := TFocusControl.Create(AOwner, Self);
try
FFocusControl.TabStop := true;
FFocusControl.SetBounds(0, 0, 0, 0);
except
raise;
end;
end;
end;
destructor TPraButtonStyle.Destroy;
begin
FPen.Free;
FPenDown.Free;
FPenFocused.Free;
FPenDisabled.Free;
FBrush.Free;
FBrushDown.Free;
FBrushFocused.Free;
FBrushDisabled.Free;
FPicture.Free;
FPictureFocused.Free;
FPictureDisabled.Free;
FFontDown.Free;
FFontFocused.Free;
FFontDisabled.Free;
DestroyFocusControl;
inherited Destroy;
end;
procedure TPraButtonStyle.DestroyFocusControl;
begin
if Assigned(FFocusControl) then
begin
if Assigned(FFocusControl.Parent) then
FreeAndNil(FFocusControl);
end;
end;
procedure TPraButtonStyle.DoKeyDown(var Key: Word; Shift: TShiftState);
begin
if ClickOnEnter and (Key = 13) then
begin
FState := bsDown;
invalidate;
Self.Click;
end;
end;
procedure TPraButtonStyle.DoKeyUp;
begin
FState := bsUp;
invalidate;
end;
procedure TPraButtonStyle.DoMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
FState := bsDown;
invalidate;
end;
procedure TPraButtonStyle.DoMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
FState := bsUp;
invalidate;
end;
function TPraButtonStyle.GetCanFocus: Boolean;
begin
if Assigned(FFocusControl) then
result := FFocusControl.CanFocus
else
result := false;
end;
function TPraButtonStyle.GetFocused: Boolean;
begin
if Assigned(FFocusControl) then
result := FFocusControl.Focused
else
result := false;
end;
function TPraButtonStyle.GetPictureHeight: SmallInt;
begin
result := 0;
if informedPicture then
result := MaxIntValue([FPicture.Height, FPictureFocused.Height, FPictureDisabled.Height]);
end;
function TPraButtonStyle.GetPictureMarginLeft: SmallInt;
begin
result := 0;
if informedPicture then
result := FPictureMarginLeft;
end;
function TPraButtonStyle.GetPictureWidth: SmallInt;
begin
result := 0;
if informedPicture then
result := MaxIntValue([FPicture.Width, FPictureFocused.Width, FPictureDisabled.Width]);
end;
function TPraButtonStyle.GetSpacing: SmallInt;
begin
result := 0;
if informedPicture then
result := FSpacing;
end;
function TPraButtonStyle.GetTabOrder: Integer;
begin
if Assigned(FFocusControl) then
result := FFocusControl.TabOrder
else
result := -1;
end;
function TPraButtonStyle.GetTabStop: Boolean;
begin
if Assigned(FFocusControl) then
result := FFocusControl.TabStop
else
result := false;
end;
function TPraButtonStyle.informedPicture: Boolean;
begin
result := Assigned(FPicture.Graphic) or Assigned(FPictureFocused.Graphic) or Assigned(FPictureDisabled.Graphic);
end;
function TPraButtonStyle.IsClickOnEnter: Boolean;
begin
result := FClickOnEnter <> true;
end;
function TPraButtonStyle.IsStyleOutline: Boolean;
begin
result := StyleOutline <> false;
end;
function TPraButtonStyle.isPictureCenter: Boolean;
begin
result := PictureCenter <> false;
end;
function TPraButtonStyle.IsPictureMarginLeft: Boolean;
begin
result := PictureMarginLeft <> 3;
end;
function TPraButtonStyle.IsRadius: Boolean;
begin
result := Radius <> 3;
end;
function TPraButtonStyle.IsShowCaption: Boolean;
begin
result := ShowCaption <> true;
end;
function TPraButtonStyle.IsSpacing: Boolean;
begin
result := Spacing <> 3;
end;
function TPraButtonStyle.IsStoredAlignment: Boolean;
begin
result := Alignment <> paCenter;
end;
function TPraButtonStyle.IsStoredStyle: Boolean;
begin
result := Style <> bsCustom;
end;
function TPraButtonStyle.IsStoredTemplateStyle: Boolean;
begin
result := TemplateStyle <> tsNone;
end;
procedure TPraButtonStyle.Paint;
var
X, Y, w, h: Integer;
begin
inherited;
with Canvas do
begin
if not(Enabled) then
begin
Pen := FPenDisabled;
Brush := FBrushDisabled;
Font := FFontDisabled;
end
else if FState = bsDown then
begin
Pen := FPenDown;
Brush := FBrushDown;
Font := FFontDown;
end
else if FMouseEnter or Focused then
begin
Pen := FPenFocused;
Brush := FBrushFocused;
Font := FFontFocused;
end
else
begin
Pen := FPen;
Brush := FBrush;
Font := Self.Font;
end;
if (FShape = stRoundRect) and (Pen.Width = 2) then
Pen.Width := 1;
X := Pen.Width div 2;
Y := X;
w := Width - Pen.Width + 1;
h := Height - Pen.Width + 1;
if Pen.Width = 0 then
begin
Dec(w);
Dec(h);
end;
case FShape of
stRectangle:
Rectangle(X, Y, X + w, Y + h);
stRoundRect:
RoundRect(X, Y, X + w, Y + h, Radius, Radius);
end;
X := GetPictureMarginLeft;
if FPictureCenter and (Caption = '') then
X := (ClientWidth - GetPictureWidth) div 2;
h := (ClientHeight - GetPictureHeight) div 2;
if not(Enabled) then
begin
if Assigned(PictureDisabled.Graphic) then
Draw(X, h, PictureDisabled.Graphic)
else
Draw(X, h, Picture.Graphic);
end
else if FMouseEnter or Focused then
begin
if Assigned(PictureFocused.Graphic) then
Draw(X, h, PictureFocused.Graphic)
else
Draw(X, h, Picture.Graphic);
end
else
Draw(X, h, Picture.Graphic);
if FShowCaption and (Trim(Caption) <> '') then
begin
if Alignment = paCenter then
begin
if Assigned(Picture.Graphic) or (Assigned(PictureFocused.Graphic) and (FMouseEnter or Focused)) then
X := (ClientWidth - (GetPictureWidth + PictureMarginLeft)) div 2
else
X := (ClientWidth - Canvas.TextWidth(Caption)) div 2
end
else
X := GetPictureWidth + PictureMarginLeft + GetSpacing;
Y := (ClientHeight - Canvas.TextHeight(Caption)) div 2;
TextOut(X, Y, Caption);
end;
end;
end;
procedure TPraButtonStyle.SetAlignment(const Value: TPraAlignment);
begin
if FAlignment <> Value then
begin
FAlignment := Value;
invalidate;
end;
end;
procedure TPraButtonStyle.SetBounds(ALeft, ATop, AWidth, AHeight: Integer);
begin
inherited;
Repaint;
end;
procedure TPraButtonStyle.SetBrush(Value: TBrush);
begin
FBrush.Assign(Value);
end;
procedure TPraButtonStyle.SetBrushDisabled(const Value: TBrush);
begin
FBrushDisabled.Assign(Value);
end;
procedure TPraButtonStyle.SetBrushDown(const Value: TBrush);
begin
FBrushDown.Assign(Value);
end;
procedure TPraButtonStyle.SetBrushFocused(const Value: TBrush);
begin
FBrushFocused.Assign(Value);
end;
procedure TPraButtonStyle.SetCaption(const Value: TCaption);
begin
FCaption := Value;
invalidate;
end;
procedure TPraButtonStyle.SetClickOnEnter(const Value: Boolean);
begin
if FClickOnEnter <> Value then
begin
FClickOnEnter := Value;
invalidate;
end;
end;
procedure TPraButtonStyle.SetFocus;
begin
if Assigned(FFocusControl) then
if FFocusControl.CanFocus then
FFocusControl.SetFocus;
end;
procedure TPraButtonStyle.SetFontDisabled(const Value: TPraButtonFont);
begin
FFontDisabled.Assign(Value);
end;
procedure TPraButtonStyle.SetFontDown(const Value: TPraButtonFont);
begin
FFontDown.Assign(Value);
end;
procedure TPraButtonStyle.SetFontFocused(const Value: TPraButtonFont);
begin
FFontFocused.Assign(Value);
end;
procedure TPraButtonStyle.SetStyleOutline(const Value: Boolean);
begin
if FStyleOutline <> Value then
begin
FStyleOutline := Value;
if Style <> bsCustom then
SetStyle(FStyle)
else if isTemplateStyle then
SetTemplateStyle(FTemplateStyle);
end;
end;
procedure TPraButtonStyle.SetParent(AParent: TWinControl);
begin
inherited;
if Assigned(Self.Parent) then
begin
FFocusControl.Parent := Self.Parent;
FFocusControl.Show;
end;
end;
procedure TPraButtonStyle.SetPen(Value: TPen);
begin
FPen.Assign(Value);
end;
procedure TPraButtonStyle.SetPenDisabled(const Value: TPen);
begin
FPenDisabled.Assign(Value);
end;
procedure TPraButtonStyle.SetPenDown(const Value: TPen);
begin
FPenDown.Assign(Value);
end;
procedure TPraButtonStyle.SetPenFocused(const Value: TPen);
begin
FPenFocused.Assign(Value);
end;
procedure TPraButtonStyle.SetPicture(const Value: TPicture);
begin
FPicture.Assign(Value);
end;
procedure TPraButtonStyle.SetPictureCenter(const Value: Boolean);
begin
if FPictureCenter <> Value then
begin
FPictureCenter := Value;
invalidate;
end;
end;
procedure TPraButtonStyle.SetPictureDisabled(const Value: TPicture);
begin
FPictureDisabled.Assign(Value);
end;
procedure TPraButtonStyle.SetPictureTemplate;
begin
if StyleOutline then
begin
Picture.Assign(FPraButtonStyleTemplateType.GetPictureStyleOutline);
PictureFocused.Assign(FPraButtonStyleTemplateType.GetPictureFocusedStyleOutline);
end
else
begin
Picture.Assign(FPraButtonStyleTemplateType.GetPicture);
PictureFocused.Assign(FPraButtonStyleTemplateType.GetPictureFocused);
end;
PictureDisabled.Assign(FPraButtonStyleTemplateType.GetPictureDisabled);
end;
procedure TPraButtonStyle.SetPictureMarginLeft(const Value: SmallInt);
begin
if (FPictureMarginLeft >= 0) and (FPictureMarginLeft <> Value) then
begin
FPictureMarginLeft := Value;
invalidate;
end;
end;
procedure TPraButtonStyle.SetPictureFocused(const Value: TPicture);
begin
FPictureFocused.Assign(Value);
end;
procedure TPraButtonStyle.SetRadius(const Value: SmallInt);
begin
if FRadius <> Value then
begin
FRadius := Value;
invalidate;
end;
end;
procedure TPraButtonStyle.SetShape(Value: TPraButtonStyleType);
begin
if FShape <> Value then
begin
FShape := Value;
invalidate;
end;
end;
procedure TPraButtonStyle.SetShowCaption(const Value: Boolean);
begin
if FShowCaption <> Value then
begin
FShowCaption := Value;
invalidate;
end;
end;
procedure TPraButtonStyle.SetSize(const AHeight, AWidth: Integer);
begin
Height := AHeight;
Width := AWidth;
end;
procedure TPraButtonStyle.SetSpacing(const Value: SmallInt);
begin
if FSpacing <> Value then
begin
FSpacing := Value;
invalidate;
end;
end;
procedure TPraButtonStyle.SetStyle(const Value: TPraButtonStyleStyle);
begin
if isTemplateStyle then
begin
FControllerStyleTemplate := true;
TemplateStyle := tsNone;
end;
if FControllerStyleTemplate then
begin
CreateButtonDefault;
FControllerStyleTemplate := false;
Exit;
end;
Self.FStyle := Value;
case Self.FStyle of
bsPrimary:
CreateButtonPrimary;
bsSecondary:
CreateButtonSecondary;
bsSuccess:
CreateButtonSuccess;
bsDanger:
CreateButtonDanger;
bsWarning:
CreateButtonWarning;
bsInfo:
CreateButtonInfo;
bsLight:
CreateButtonLight;
bsDark:
CreateButtonDark;
end;
if Value <> bsCustom then
begin
SetSize(32, 90);
if StyleOutline then
StyleOutlineConfig;
end;
end;
procedure TPraButtonStyle.SetTabOrder(const Value: Integer);
begin
if Assigned(FFocusControl) then
FFocusControl.TabOrder := Value;
end;
procedure TPraButtonStyle.SetTabStop(const Value: Boolean);
begin
if Assigned(FFocusControl) then
FFocusControl.TabStop := Value;
end;
procedure TPraButtonStyle.SetTemplateStyle(const Value: TTemplateStyle);
begin
if FControllerStyleTemplate then
begin
CreateButtonDefault;
FControllerStyleTemplate := false;
Exit;
end;
if Style <> bsCustom then
begin
FControllerStyleTemplate := true;
Style := bsCustom;
end;
Self.FTemplateStyle := Value;
if not(csReading in ComponentState) then
begin
case Value of
tsSave:
CreateButtonSave;
tsEdit:
CreateButtonEdit;
tsCancel:
CreateButtonCancel;
tsDelete:
CreateButtonDelete;
tsPrint:
CreateButtonPrint;
tsGear:
CreateButtonGear;
end;
SetPictureTemplate;
if Value <> tsNone then
begin
if StyleOutline then
StyleOutlineConfig;
end;
end;
end;
procedure TPraButtonStyle.StyleChanged(Sender: TObject);
begin
invalidate;
end;
procedure TPraButtonStyle.StyleOutlineConfig;
var
lBrushColor: TColor;
begin
lBrushColor := Brush.Color;
Brush.Color := Font.Color;
Font.Color := lBrushColor;
Pen.Style := psSolid;
Pen.Color := lBrushColor;
Pen.Width := 1;
end;
function TPraButtonStyle.isTemplateStyle: Boolean;
begin
result := TemplateStyle <> tsNone;
end;
procedure TPraButtonStyle.LoadingTemplateDanger;
begin
FPraButtonStyleTemplate := TPraButtonStyleTemplateDanger.New;
ApplyTemplate;
end;
procedure TPraButtonStyle.LoadingTemplateDark;
begin
FPraButtonStyleTemplate := TPraButtonStyleTemplateDark.New;
ApplyTemplate;
end;
procedure TPraButtonStyle.LoadingTemplateInfo;
begin
FPraButtonStyleTemplate := TPraButtonStyleTemplateInfo.New;
ApplyTemplate;
end;
procedure TPraButtonStyle.LoadingTemplateLight;
begin
FPraButtonStyleTemplate := TPraButtonStyleTemplateLight.New;
ApplyTemplate;
end;
procedure TPraButtonStyle.LoadingTemplatePrimary;
begin
FPraButtonStyleTemplate := TPraButtonStyleTemplatePrimary.New;
ApplyTemplate;
end;
procedure TPraButtonStyle.LoadingTemplateSecondary;
begin
FPraButtonStyleTemplate := TPraButtonStyleTemplateSecondary.New;
ApplyTemplate;
end;
procedure TPraButtonStyle.LoadingTemplateSuccess;
begin
FPraButtonStyleTemplate := TPraButtonStyleTemplateSuccess.New;
ApplyTemplate;
end;
procedure TPraButtonStyle.LoadingTemplateWarning;
begin
FPraButtonStyleTemplate := TPraButtonStyleTemplateWarning.New;
ApplyTemplate;
end;
procedure TPraButtonStyle.WMEraseBkgnd(var Message: TWMEraseBkGnd);
begin
message.result := 1;
end;
constructor TFocusControl.Create(AOwner: TComponent; AGraphicControl: TPraButtonStyle);
begin
inherited Create(AOwner);
Assert(Assigned(AGraphicControl), 'Não é possível criar um FocusControl com GraphicControl não atribuído.');
FGraphicControl := AGraphicControl;
Self.TabStop := false;
end;
procedure TFocusControl.WMKeyDown(var Message: TWMKeyDown);
var
Shift: TShiftState;
begin
if Assigned(FGraphicControl) then
begin
Shift := KeyDataToShiftState(Message.KeyData);
FGraphicControl.DoKeyDown(Message.CharCode, Shift);
end;
inherited;
end;
procedure TFocusControl.WMKeyUp(var Message: TWMKeyDown);
begin
if Assigned(FGraphicControl) then
FGraphicControl.DoKeyUp;
inherited;
end;
procedure TFocusControl.WndProc(var Message: TMessage);
begin
inherited;
case Message.Msg of
WM_SETFOCUS, WM_KILLFOCUS:
begin
if Assigned(FGraphicControl) then
FGraphicControl.Repaint;
end;
end;
end;
function TPraButtonFont.IsCopyOfFont: Boolean;
begin
result := CopyOfFont <> false;
end;
procedure TPraButtonFont.SetCopyOfFont(const Value: Boolean);
begin
if FCopyOfFont <> Value then
begin
FCopyOfFont := Value;
onChange(Value);
end;
end;
end.
| 26.697163 | 131 | 0.726589 |
833f73ae19f203b8479527a074787744f80829ac
| 1,121 |
pas
|
Pascal
|
windows/src/ext/sentry/Sentry.Client.Vcl.pas
|
bravogeorge/keyman
|
c0797e36292de903d7313214d1f765e3d9a2bf4d
|
[
"MIT"
] | 219 |
2017-06-21T03:37:03.000Z
|
2022-03-27T12:09:28.000Z
|
windows/src/ext/sentry/Sentry.Client.Vcl.pas
|
bravogeorge/keyman
|
c0797e36292de903d7313214d1f765e3d9a2bf4d
|
[
"MIT"
] | 4,451 |
2017-05-29T02:52:06.000Z
|
2022-03-31T23:53:23.000Z
|
windows/src/ext/sentry/Sentry.Client.Vcl.pas
|
bravogeorge/keyman
|
c0797e36292de903d7313214d1f765e3d9a2bf4d
|
[
"MIT"
] | 72 |
2017-05-26T04:08:37.000Z
|
2022-03-03T10:26:20.000Z
|
unit Sentry.Client.Vcl;
interface
uses
System.SysUtils,
Sentry.Client;
type
TSentryClientVcl = class(TSentryClient)
private
procedure HandleApplicationException(Sender: TObject; E: Exception);
public
constructor Create(AOptions: TSentryClientOptions; const ALogger: string; AFlags: TSentryClientFlags); override;
destructor Destroy; override;
end;
implementation
uses
Vcl.Forms;
{ TSentryClientVcl }
constructor TSentryClientVcl.Create(AOptions: TSentryClientOptions;
const ALogger: string; AFlags: TSentryClientFlags);
begin
inherited Create(AOptions, ALogger, AFlags);
if scfCaptureExceptions in AFlags then
begin
Application.OnException := HandleApplicationException;
end;
end;
destructor TSentryClientVcl.Destroy;
begin
inherited Destroy;
if (TMethod(Application.OnException).Code = @TSentryClientVcl.HandleApplicationException)
and (TMethod(Application.OnException).Data = Self) then
Application.OnException := nil;
end;
procedure TSentryClientVcl.HandleApplicationException(Sender: TObject; E: Exception);
begin
SentryHandleException(E);
end;
end.
| 22.42 | 116 | 0.784121 |
f19fa51ac4df5838fcf843d52a5a65c3070f320e
| 162,368 |
pas
|
Pascal
|
src/bgrabitmap7.2/bgradefaultbitmap.pas
|
laggyluk/brick_engine
|
1fc63d8186b4eb12cbfdb3a8b48a901089d3994c
|
[
"MIT"
] | 1 |
2019-05-24T19:20:12.000Z
|
2019-05-24T19:20:12.000Z
|
src/bgrabitmap7.2/bgradefaultbitmap.pas
|
laggyluk/brick_engine
|
1fc63d8186b4eb12cbfdb3a8b48a901089d3994c
|
[
"MIT"
] | null | null | null |
src/bgrabitmap7.2/bgradefaultbitmap.pas
|
laggyluk/brick_engine
|
1fc63d8186b4eb12cbfdb3a8b48a901089d3994c
|
[
"MIT"
] | null | null | null |
{
/**************************************************************************\
bgradefaultbitmap.pas
---------------------
This unit defines basic operations on bitmaps.
It should NOT be added to the 'uses' clause.
Some operations may be slow, so there are
accelerated versions for some routines.
****************************************************************************
* *
* This file is part of BGRABitmap library which is distributed under the *
* modified LGPL. *
* *
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
* for details about the copyright. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* *
****************************************************************************
}
unit BGRADefaultBitmap;
{$mode objfpc}{$H+}
interface
{ This unit contains TBGRADefaultBitmap class. This class contains basic drawing routines,
and call functions from other units to perform advanced drawing functions. }
uses
Classes, SysUtils, Types, FPImage, Graphics, BGRABitmapTypes, GraphType, FPImgCanv,
BGRACanvas, BGRACanvas2D, FPWritePng;
type
{ TBGRADefaultBitmap }
TBGRADefaultBitmap = class(TBGRACustomBitmap)
private
{ Bounds checking which are shared by drawing functions. These functions check
if the coordinates are visible and return true if it is the case, swap
coordinates if necessary and make them fit into the clipping rectangle }
function CheckHorizLineBounds(var x, y, x2: int32or64): boolean; inline;
function CheckVertLineBounds(var x, y, y2: int32or64; out delta: int32or64): boolean; inline;
function CheckRectBounds(var x,y,x2,y2: integer; minsize: integer): boolean; inline;
function CheckClippedRectBounds(var x,y,x2,y2: integer): boolean; inline;
function CheckPutImageBounds(x, y, tx, ty: integer; out minxb, minyb, maxxb, maxyb, ignoreleft: integer): boolean; inline;
function CheckAntialiasRectBounds(var x,y,x2,y2: single; w: single): boolean;
function GetCanvasBGRA: TBGRACanvas;
function GetCanvas2D: TBGRACanvas2D;
protected
FRefCount: integer; //reference counter (not related to interface reference counter)
//Pixel data
FData: PBGRAPixel; //pointer to pixels
FWidth, FHeight, FNbPixels: integer; //dimensions
FDataModified: boolean; //if data image has changed so TBitmap should be updated
FLineOrder: TRawImageLineOrder;
FClipRect: TRect; //clipping (can be the whole image if there is no clipping)
//Scan
FScanPtr : PBGRAPixel; //current scan address
FScanCurX,FScanCurY: integer; //current scan coordinates
//LCL bitmap object
FBitmap: TBitmap;
FBitmapModified: boolean; //if TBitmap has changed so pixel data should be updated
FCanvasOpacity: byte; //opacity used with standard canvas functions
FAlphaCorrectionNeeded: boolean; //the alpha channel is not correct because standard functions do not
//take it into account
//FreePascal drawing routines
FCanvasFP: TFPImageCanvas;
FCanvasDrawModeFP: TDrawMode;
FCanvasPixelProcFP: procedure(x, y: int32or64; col: TBGRAPixel) of object;
//canvas-like with antialiasing and texturing
FCanvasBGRA: TBGRACanvas;
FCanvas2D: TBGRACanvas2D;
//drawing options
FEraseMode: boolean; //when polygons are erased instead of drawn
FFontHeight: integer;
FFontRenderer: TBGRACustomFontRenderer;
{ Pen style can be defined by PenStyle property of by CustomPenStyle property.
When PenStyle property is assigned, CustomPenStyle property is assigned the actual
pen pattern. }
FCustomPenStyle: TBGRAPenStyle;
FPenStyle: TPenStyle;
//Pixel data
function GetRefCount: integer; override;
function GetScanLine(y: integer): PBGRAPixel; override; //don't forget to call InvalidateBitmap after modifications
function LoadFromRawImage(ARawImage: TRawImage; DefaultOpacity: byte;
AlwaysReplaceAlpha: boolean = False; RaiseErrorOnInvalidPixelFormat: boolean = True): boolean;
function GetDataPtr: PBGRAPixel; override;
procedure ClearTransparentPixels;
function GetScanlineFast(y: integer): PBGRAPixel; inline;
function GetLineOrder: TRawImageLineOrder; override;
function GetNbPixels: integer; override;
function GetWidth: integer; override;
function GetHeight: integer; override;
//LCL bitmap object
function GetBitmap: TBitmap; override;
function GetCanvas: TCanvas; override;
procedure DiscardBitmapChange; inline;
procedure DoAlphaCorrection;
procedure SetCanvasOpacity(AValue: byte); override;
function GetCanvasOpacity: byte; override;
function GetCanvasAlphaCorrection: boolean; override;
procedure SetCanvasAlphaCorrection(const AValue: boolean); override;
//FreePascal drawing routines
function GetCanvasFP: TFPImageCanvas; override;
procedure SetCanvasDrawModeFP(const AValue: TDrawMode); override;
function GetCanvasDrawModeFP: TDrawMode; override;
{Allocation routines}
procedure ReallocData; virtual;
procedure FreeData; virtual;
procedure RebuildBitmap; virtual;
procedure FreeBitmap; virtual;
procedure Init; virtual;
{TFPCustomImage}
procedure SetInternalColor(x, y: integer; const Value: TFPColor); override;
function GetInternalColor(x, y: integer): TFPColor; override;
procedure SetInternalPixel(x, y: integer; Value: integer); override;
function GetInternalPixel(x, y: integer): integer; override;
{Image functions}
function FineResample(NewWidth, NewHeight: integer): TBGRACustomBitmap;
function SimpleStretch(NewWidth, NewHeight: integer): TBGRACustomBitmap;
function CheckEmpty: boolean; override;
function GetHasTransparentPixels: boolean; override;
function GetAverageColor: TColor; override;
function GetAveragePixel: TBGRAPixel; override;
function CreateAdaptedPngWriter: TFPWriterPNG;
function LoadAsBmp32(Str: TStream): boolean; override;
//drawing
function GetCustomPenStyle: TBGRAPenStyle; override;
procedure SetCustomPenStyle(const AValue: TBGRAPenStyle); override;
procedure SetPenStyle(const AValue: TPenStyle); override;
function GetPenStyle: TPenStyle; override;
function GetFontHeight: integer; override;
procedure SetFontHeight(AHeight: integer); override;
function GetFontFullHeight: integer; override;
procedure SetFontFullHeight(AHeight: integer); override;
function GetFontPixelMetric: TFontPixelMetric; override;
function GetFontRenderer: TBGRACustomFontRenderer; override;
procedure SetFontRenderer(AValue: TBGRACustomFontRenderer); override;
function GetClipRect: TRect; override;
procedure SetClipRect(const AValue: TRect); override;
function GetPixelCycleInline(ix,iy: int32or64; iFactX,iFactY: int32or64): TBGRAPixel; inline;
public
{Reference counter functions}
function NewReference: TBGRACustomBitmap;
procedure FreeReference;
function GetUnique: TBGRACustomBitmap;
{TFPCustomImage override}
constructor Create(AWidth, AHeight: integer); override;
procedure SetSize(AWidth, AHeight: integer); override;
{Constructors}
constructor Create; override;
constructor Create(ABitmap: TBitmap); override;
constructor Create(AWidth, AHeight: integer; Color: TColor); override;
constructor Create(AWidth, AHeight: integer; Color: TBGRAPixel); override;
constructor Create(AFilename: string); override;
constructor Create(AStream: TStream); override;
destructor Destroy; override;
{Loading functions}
function NewBitmap(AWidth, AHeight: integer): TBGRACustomBitmap; override;
function NewBitmap(AWidth, AHeight: integer; Color: TBGRAPixel): TBGRACustomBitmap; override;
function NewBitmap(Filename: string): TBGRACustomBitmap; override;
procedure LoadFromFile(const filename: string); override;
procedure SaveToFile(const filename: string); override;
procedure SaveToStreamAsPng(Str: TStream); override;
procedure Assign(ABitmap: TBitmap); override; overload;
procedure Assign(MemBitmap: TBGRACustomBitmap);override; overload;
procedure Serialize(AStream: TStream); override;
procedure Deserialize(AStream: TStream); override;
class procedure SerializeEmpty(AStream: TStream);
{Pixel functions}
function PtInClipRect(x, y: int32or64): boolean; inline;
procedure SetPixel(x, y: int32or64; c: TColor); override;
procedure SetPixel(x, y: int32or64; c: TBGRAPixel); override;
procedure XorPixel(x, y: int32or64; c: TBGRAPixel); override;
procedure DrawPixel(x, y: int32or64; c: TBGRAPixel); override;
procedure DrawPixel(x, y: int32or64; ec: TExpandedPixel); override;
procedure FastBlendPixel(x, y: int32or64; c: TBGRAPixel); override;
procedure ErasePixel(x, y: int32or64; alpha: byte); override;
procedure AlphaPixel(x, y: int32or64; alpha: byte); override;
function GetPixel(x, y: int32or64): TBGRAPixel; override;
function GetPixel(x, y: single; AResampleFilter: TResampleFilter = rfLinear): TBGRAPixel; override;
function GetPixelCycle(x, y: single; AResampleFilter: TResampleFilter = rfLinear): TBGRAPixel; override;
function GetPixelCycle(x, y: single; AResampleFilter: TResampleFilter;
repeatX: boolean; repeatY: boolean): TBGRAPixel; override; overload;
{Line primitives}
procedure SetHorizLine(x, y, x2: int32or64; c: TBGRAPixel); override;
procedure XorHorizLine(x, y, x2: int32or64; c: TBGRAPixel); override;
procedure DrawHorizLine(x, y, x2: int32or64; c: TBGRAPixel); override;
procedure DrawHorizLine(x, y, x2: int32or64; ec: TExpandedPixel); override;
procedure DrawHorizLine(x, y, x2: int32or64; texture: IBGRAScanner); override;
procedure FastBlendHorizLine(x, y, x2: int32or64; c: TBGRAPixel); override;
procedure AlphaHorizLine(x, y, x2: int32or64; alpha: byte); override;
procedure SetVertLine(x, y, y2: int32or64; c: TBGRAPixel); override;
procedure XorVertLine(x, y, y2: int32or64; c: TBGRAPixel); override;
procedure DrawVertLine(x, y, y2: int32or64; c: TBGRAPixel); override;
procedure AlphaVertLine(x, y, y2: int32or64; alpha: byte); override;
procedure FastBlendVertLine(x, y, y2: int32or64; c: TBGRAPixel); override;
procedure DrawHorizLineDiff(x, y, x2: int32or64; c, compare: TBGRAPixel;
maxDiff: byte); override;
{Shapes}
procedure DrawLine(x1, y1, x2, y2: integer; c: TBGRAPixel; DrawLastPixel: boolean); override;
procedure DrawLineAntialias(x1, y1, x2, y2: integer; c: TBGRAPixel; DrawLastPixel: boolean); override;
procedure DrawLineAntialias(x1, y1, x2, y2: integer; c1, c2: TBGRAPixel; dashLen: integer; DrawLastPixel: boolean); override;
procedure DrawLineAntialias(x1, y1, x2, y2: integer; c1, c2: TBGRAPixel; dashLen: integer; DrawLastPixel: boolean; var DashPos: integer); override;
procedure DrawLineAntialias(x1, y1, x2, y2: single; c: TBGRAPixel; w: single); override;
procedure DrawLineAntialias(x1, y1, x2, y2: single; texture: IBGRAScanner; w: single); override;
procedure DrawLineAntialias(x1, y1, x2, y2: single; c: TBGRAPixel; w: single; Closed: boolean); override;
procedure DrawLineAntialias(x1, y1, x2, y2: single; texture: IBGRAScanner; w: single; Closed: boolean); override;
procedure DrawPolyLineAntialias(const points: array of TPointF; c: TBGRAPixel; w: single); override;
procedure DrawPolyLineAntialias(const points: array of TPointF; texture: IBGRAScanner; w: single); override;
procedure DrawPolyLineAntialias(const points: array of TPointF; c: TBGRAPixel; w: single; Closed: boolean); override;
procedure DrawPolygonAntialias(const points: array of TPointF; c: TBGRAPixel; w: single); override;
procedure DrawPolygonAntialias(const points: array of TPointF; texture: IBGRAScanner; w: single); override;
procedure EraseLine(x1, y1, x2, y2: integer; alpha: byte; DrawLastPixel: boolean); override;
procedure EraseLineAntialias(x1, y1, x2, y2: integer; alpha: byte; DrawLastPixel: boolean); override;
procedure EraseLineAntialias(x1, y1, x2, y2: single; alpha: byte; w: single); override;
procedure EraseLineAntialias(x1, y1, x2, y2: single; alpha: byte; w: single; Closed: boolean); override;
procedure ErasePolyLineAntialias(const points: array of TPointF; alpha: byte; w: single); override;
procedure FillTriangleLinearColor(pt1,pt2,pt3: TPointF; c1,c2,c3: TBGRAPixel); override;
procedure FillTriangleLinearColorAntialias(pt1,pt2,pt3: TPointF; c1,c2,c3: TBGRAPixel); override;
procedure FillTriangleLinearMapping(pt1,pt2,pt3: TPointF; texture: IBGRAScanner; tex1, tex2, tex3: TPointF; TextureInterpolation: Boolean= True); override;
procedure FillTriangleLinearMappingLightness(pt1,pt2,pt3: TPointF; texture: IBGRAScanner; tex1, tex2, tex3: TPointF; light1,light2,light3: word; TextureInterpolation: Boolean= True); override;
procedure FillTriangleLinearMappingAntialias(pt1,pt2,pt3: TPointF; texture: IBGRAScanner; tex1, tex2, tex3: TPointF); override;
procedure FillQuadLinearColor(pt1,pt2,pt3,pt4: TPointF; c1,c2,c3,c4: TBGRAPixel); override;
procedure FillQuadLinearColorAntialias(pt1,pt2,pt3,pt4: TPointF; c1,c2,c3,c4: TBGRAPixel); override;
procedure FillQuadLinearMapping(pt1,pt2,pt3,pt4: TPointF; texture: IBGRAScanner; tex1, tex2, tex3, tex4: TPointF; TextureInterpolation: Boolean= True); override;
procedure FillQuadLinearMappingLightness(pt1,pt2,pt3,pt4: TPointF; texture: IBGRAScanner; tex1, tex2, tex3, tex4: TPointF; light1,light2,light3,light4: word; TextureInterpolation: Boolean= True); override;
procedure FillQuadLinearMappingAntialias(pt1,pt2,pt3,pt4: TPointF; texture: IBGRAScanner; tex1, tex2, tex3, tex4: TPointF); override;
procedure FillQuadPerspectiveMapping(pt1,pt2,pt3,pt4: TPointF; texture: IBGRAScanner; tex1, tex2, tex3, tex4: TPointF); override;
procedure FillQuadPerspectiveMapping(pt1,pt2,pt3,pt4: TPointF; texture: IBGRAScanner; tex1, tex2, tex3, tex4: TPointF; ACleanBorders: TRect); override;
procedure FillQuadPerspectiveMappingAntialias(pt1,pt2,pt3,pt4: TPointF; texture: IBGRAScanner; tex1, tex2, tex3, tex4: TPointF); override;
procedure FillQuadPerspectiveMappingAntialias(pt1,pt2,pt3,pt4: TPointF; texture: IBGRAScanner; tex1, tex2, tex3, tex4: TPointF; ACleanBorders: TRect); override;
procedure FillPolyLinearMapping(const points: array of TPointF; texture: IBGRAScanner; texCoords: array of TPointF; TextureInterpolation: Boolean); override;
procedure FillPolyLinearMappingLightness(const points: array of TPointF; texture: IBGRAScanner; texCoords: array of TPointF; lightnesses: array of word; TextureInterpolation: Boolean); override;
procedure FillPolyLinearColor(const points: array of TPointF; AColors: array of TBGRAPixel); override;
procedure FillPolyPerspectiveMapping(const points: array of TPointF; const pointsZ: array of single; texture: IBGRAScanner; texCoords: array of TPointF; TextureInterpolation: Boolean; zbuffer: psingle = nil); override;
procedure FillPolyPerspectiveMappingLightness(const points: array of TPointF; const pointsZ: array of single; texture: IBGRAScanner; texCoords: array of TPointF; lightnesses: array of word; TextureInterpolation: Boolean; zbuffer: psingle = nil); override;
procedure FillPoly(const points: array of TPointF; c: TBGRAPixel; drawmode: TDrawMode); override;
procedure FillPoly(const points: array of TPointF; texture: IBGRAScanner; drawmode: TDrawMode); override;
procedure FillPolyAntialias(const points: array of TPointF; c: TBGRAPixel); override;
procedure FillPolyAntialias(const points: array of TPointF; texture: IBGRAScanner); override;
procedure ErasePoly(const points: array of TPointF; alpha: byte); override;
procedure ErasePolyAntialias(const points: array of TPointF; alpha: byte); override;
procedure FillShape(shape: TBGRACustomFillInfo; c: TBGRAPixel; drawmode: TDrawMode); override;
procedure FillShape(shape: TBGRACustomFillInfo; texture: IBGRAScanner; drawmode: TDrawMode); override;
procedure FillShapeAntialias(shape: TBGRACustomFillInfo; c: TBGRAPixel); override;
procedure FillShapeAntialias(shape: TBGRACustomFillInfo; texture: IBGRAScanner); override;
procedure EraseShape(shape: TBGRACustomFillInfo; alpha: byte); override;
procedure EraseShapeAntialias(shape: TBGRACustomFillInfo; alpha: byte); override;
procedure EllipseAntialias(x, y, rx, ry: single; c: TBGRAPixel; w: single); override;
procedure EllipseAntialias(x, y, rx, ry: single; texture: IBGRAScanner; w: single); override;
procedure EllipseAntialias(x, y, rx, ry: single; c: TBGRAPixel; w: single; back: TBGRAPixel); override;
procedure FillEllipseAntialias(x, y, rx, ry: single; c: TBGRAPixel); override;
procedure FillEllipseAntialias(x, y, rx, ry: single; texture: IBGRAScanner); override;
procedure FillEllipseLinearColorAntialias(x, y, rx, ry: single; outercolor, innercolor: TBGRAPixel); override;
procedure EraseEllipseAntialias(x, y, rx, ry: single; alpha: byte); override;
procedure Rectangle(x, y, x2, y2: integer; c: TBGRAPixel; mode: TDrawMode); override;
procedure Rectangle(x, y, x2, y2: integer; BorderColor, FillColor: TBGRAPixel; mode: TDrawMode); override;
procedure RectangleAntialias(x, y, x2, y2: single; c: TBGRAPixel; w: single; back: TBGRAPixel); override;
procedure RectangleAntialias(x, y, x2, y2: single; texture: IBGRAScanner; w: single); override;
procedure RoundRectAntialias(x,y,x2,y2,rx,ry: single; c: TBGRAPixel; w: single; options: TRoundRectangleOptions = []); override;
procedure RoundRectAntialias(x,y,x2,y2,rx,ry: single; texture: IBGRAScanner; w: single; options: TRoundRectangleOptions = []); override;
procedure RoundRectAntialias(x,y,x2,y2,rx,ry: single; pencolor: TBGRAPixel; w: single; fillcolor: TBGRAPixel; options: TRoundRectangleOptions = []); override;
procedure RoundRectAntialias(x,y,x2,y2,rx,ry: single; penTexture: IBGRAScanner; w: single; fillTexture: IBGRAScanner; options: TRoundRectangleOptions = []); override;
procedure FillRect(x, y, x2, y2: integer; c: TBGRAPixel; mode: TDrawMode); override;
procedure FillRect(x, y, x2, y2: integer; texture: IBGRAScanner; mode: TDrawMode); override;
procedure FillRectAntialias(x, y, x2, y2: single; c: TBGRAPixel); override;
procedure EraseRectAntialias(x, y, x2, y2: single; alpha: byte); override;
procedure FillRectAntialias(x, y, x2, y2: single; texture: IBGRAScanner); override;
procedure FillRoundRectAntialias(x,y,x2,y2,rx,ry: single; c: TBGRAPixel; options: TRoundRectangleOptions = []); override;
procedure FillRoundRectAntialias(x,y,x2,y2,rx,ry: single; texture: IBGRAScanner; options: TRoundRectangleOptions = []); override;
procedure EraseRoundRectAntialias(x,y,x2,y2,rx,ry: single; alpha: byte; options: TRoundRectangleOptions = []); override;
procedure AlphaFillRect(x, y, x2, y2: integer; alpha: byte); override;
procedure RoundRect(X1, Y1, X2, Y2: integer; DX, DY: integer;
BorderColor, FillColor: TBGRAPixel); override;
procedure TextOutAngle(x, y: single; orientation: integer; s: string; c: TBGRAPixel; align: TAlignment); override; overload;
procedure TextOutAngle(x, y: single; orientation: integer; s: string; texture: IBGRAScanner; align: TAlignment); override; overload;
procedure TextOut(x, y: single; s: string; texture: IBGRAScanner; align: TAlignment); override; overload;
procedure TextOut(x, y: single; s: string; c: TBGRAPixel; align: TAlignment); override; overload;
procedure TextRect(ARect: TRect; x, y: integer; s: string; style: TTextStyle; c: TBGRAPixel); override; overload;
procedure TextRect(ARect: TRect; x, y: integer; s: string; style: TTextStyle; texture: IBGRAScanner); override; overload;
function TextSize(s: string): TSize; override;
{Spline}
function ComputeClosedSpline(const APoints: array of TPointF; AStyle: TSplineStyle): ArrayOfTPointF; override;
function ComputeOpenedSpline(const APoints: array of TPointF; AStyle: TSplineStyle): ArrayOfTPointF; override;
function ComputeBezierCurve(const ACurve: TCubicBezierCurve): ArrayOfTPointF; override;
function ComputeBezierCurve(const ACurve: TQuadraticBezierCurve): ArrayOfTPointF; override;
function ComputeBezierSpline(const ASpline: array of TCubicBezierCurve): ArrayOfTPointF; override;
function ComputeBezierSpline(const ASpline: array of TQuadraticBezierCurve): ArrayOfTPointF; override;
function ComputeWidePolyline(const points: array of TPointF; w: single): ArrayOfTPointF; override;
function ComputeWidePolyline(const points: array of TPointF; w: single; Closed: boolean): ArrayOfTPointF; override;
function ComputeWidePolygon(const points: array of TPointF; w: single): ArrayOfTPointF; override;
function ComputeEllipseContour(x,y,rx,ry: single; quality: single = 1): ArrayOfTPointF; override;
function ComputeEllipseBorder(x,y,rx,ry,w: single; quality: single = 1): ArrayOfTPointF; override;
function ComputeArc65536(x,y,rx,ry: single; start65536,end65536: word; quality: single = 1): ArrayOfTPointF; override;
function ComputeArcRad(x,y,rx,ry: single; startRad,endRad: single; quality: single = 1): ArrayOfTPointF; override;
function ComputeRoundRect(x1,y1,x2,y2,rx,ry: single; quality: single = 1): ArrayOfTPointF; override;
function ComputeRoundRect(x1,y1,x2,y2,rx,ry: single; options: TRoundRectangleOptions; quality: single = 1): ArrayOfTPointF; override;
function ComputePie65536(x,y,rx,ry: single; start65536,end65536: word; quality: single = 1): ArrayOfTPointF; override;
function ComputePieRad(x,y,rx,ry: single; startRad,endRad: single; quality: single = 1): ArrayOfTPointF; override;
{Filling}
procedure NoClip; override;
procedure Fill(texture: IBGRAScanner; mode: TDrawMode); override;
procedure Fill(texture: IBGRAScanner); override;
procedure Fill(c: TBGRAPixel; start, Count: integer); override;
procedure DrawPixels(c: TBGRAPixel; start, Count: integer); override;
procedure AlphaFill(alpha: byte; start, Count: integer); override;
procedure FillMask(x,y: integer; AMask: TBGRACustomBitmap; color: TBGRAPixel); override;
procedure FillMask(x,y: integer; AMask: TBGRACustomBitmap; texture: IBGRAScanner); override;
procedure FillClearTypeMask(x,y: integer; xThird: integer; AMask: TBGRACustomBitmap; color: TBGRAPixel; ARGBOrder: boolean = true); override;
procedure FillClearTypeMask(x,y: integer; xThird: integer; AMask: TBGRACustomBitmap; texture: IBGRAScanner; ARGBOrder: boolean = true); override;
procedure ReplaceColor(before, after: TColor); override;
procedure ReplaceColor(before, after: TBGRAPixel); override;
procedure ReplaceTransparent(after: TBGRAPixel); override;
procedure ParallelFloodFill(X, Y: integer; Dest: TBGRACustomBitmap; Color: TBGRAPixel;
mode: TFloodfillMode; Tolerance: byte = 0); override;
procedure GradientFill(x, y, x2, y2: integer; c1, c2: TBGRAPixel;
gtype: TGradientType; o1, o2: TPointF; mode: TDrawMode;
gammaColorCorrection: boolean = True; Sinus: Boolean=False); override;
procedure GradientFill(x, y, x2, y2: integer; gradient: TBGRACustomGradient;
gtype: TGradientType; o1, o2: TPointF; mode: TDrawMode;
Sinus: Boolean=False); override;
function CreateBrushTexture(ABrushStyle: TBrushStyle; APatternColor, ABackgroundColor: TBGRAPixel;
AWidth: integer = 8; AHeight: integer = 8; APenWidth: single = 1): TBGRACustomBitmap; override;
function ScanAtInteger(X,Y: integer): TBGRAPixel; override;
procedure ScanMoveTo(X,Y: Integer); override;
function ScanNextPixel: TBGRAPixel; override;
function ScanAt(X,Y: Single): TBGRAPixel; override;
function IsScanPutPixelsDefined: boolean; override;
procedure ScanPutPixels(pdest: PBGRAPixel; count: integer; mode: TDrawMode); override;
{Canvas drawing functions}
procedure DataDrawTransparent(ACanvas: TCanvas; Rect: TRect;
AData: Pointer; ALineOrder: TRawImageLineOrder; AWidth, AHeight: integer); override;
procedure DataDrawOpaque(ACanvas: TCanvas; Rect: TRect; AData: Pointer;
ALineOrder: TRawImageLineOrder; AWidth, AHeight: integer); override;
procedure GetImageFromCanvas(CanvasSource: TCanvas; x, y: integer); override;
procedure Draw(ACanvas: TCanvas; x, y: integer; Opaque: boolean = True); override;
procedure Draw(ACanvas: TCanvas; Rect: TRect; Opaque: boolean = True); override;
procedure InvalidateBitmap; override; //call if you modify with Scanline
procedure LoadFromBitmapIfNeeded; override; //call to ensure that bitmap data is up to date
{BGRA bitmap functions}
procedure PutImage(x, y: integer; Source: TBGRACustomBitmap; mode: TDrawMode; AOpacity: byte = 255); override;
procedure PutImageAngle(x,y: single; Source: TBGRACustomBitmap; angle: single; imageCenterX: single = 0; imageCenterY: single = 0; AOpacity: Byte=255; ARestoreOffsetAfterRotation: boolean = false); override;
procedure PutImageAffine(Origin,HAxis,VAxis: TPointF; Source: TBGRACustomBitmap; AOpacity: Byte=255); override;
procedure BlendImage(x, y: integer; Source: TBGRACustomBitmap; operation: TBlendOperation); override;
procedure BlendImageOver(x, y: integer; Source: TBGRACustomBitmap; operation: TBlendOperation; AOpacity: byte = 255;
ALinearBlend: boolean = false); override;
function GetPart(ARect: TRect): TBGRACustomBitmap; override;
function GetPtrBitmap(Top,Bottom: Integer): TBGRACustomBitmap; override;
function Duplicate(DuplicateProperties: Boolean = False) : TBGRACustomBitmap; override;
procedure CopyPropertiesTo(ABitmap: TBGRADefaultBitmap);
function Equals(comp: TBGRACustomBitmap): boolean; override;
function Equals(comp: TBGRAPixel): boolean; override;
function GetImageBounds(Channel: TChannel = cAlpha; ANothingValue: Byte = 0): TRect; override;
function GetImageBounds(Channels: TChannels): TRect; override;
function GetDifferenceBounds(ABitmap: TBGRACustomBitmap): TRect; override;
function MakeBitmapCopy(BackgroundColor: TColor): TBitmap; override;
function Resample(newWidth, newHeight: integer;
mode: TResampleMode = rmFineResample): TBGRACustomBitmap; override;
procedure VerticalFlip; override;
procedure HorizontalFlip; override;
function RotateCW: TBGRACustomBitmap; override;
function RotateCCW: TBGRACustomBitmap; override;
procedure Negative; override;
procedure NegativeRect(ABounds: TRect); override;
procedure LinearNegative; override;
procedure LinearNegativeRect(ABounds: TRect); override;
procedure InplaceGrayscale; override;
procedure InplaceGrayscale(ABounds: TRect); override;
procedure SwapRedBlue; override;
procedure GrayscaleToAlpha; override;
procedure AlphaToGrayscale; override;
procedure ApplyMask(mask: TBGRACustomBitmap); override;
procedure ApplyGlobalOpacity(alpha: byte); override;
procedure ConvertToLinearRGB; override;
procedure ConvertFromLinearRGB; override;
{Filters}
function FilterSmartZoom3(Option: TMedianOption): TBGRACustomBitmap; override;
function FilterMedian(Option: TMedianOption): TBGRACustomBitmap; override;
function FilterSmooth: TBGRACustomBitmap; override;
function FilterSharpen(Amount: single = 1): TBGRACustomBitmap; override;
function FilterSharpen(ABounds: TRect; Amount: single = 1): TBGRACustomBitmap; override;
function FilterContour: TBGRACustomBitmap; override;
function FilterPixelate(pixelSize: integer; useResample: boolean; filter: TResampleFilter = rfLinear): TBGRACustomBitmap; override;
function FilterBlurRadial(radius: integer;
blurType: TRadialBlurType): TBGRACustomBitmap; override;
function FilterBlurRadial(ABounds: TRect; radius: integer;
blurType: TRadialBlurType): TBGRACustomBitmap; override;
function FilterBlurMotion(distance: integer; angle: single;
oriented: boolean): TBGRACustomBitmap; override;
function FilterBlurMotion(ABounds: TRect; distance: integer; angle: single;
oriented: boolean): TBGRACustomBitmap; override;
function FilterCustomBlur(mask: TBGRACustomBitmap): TBGRACustomBitmap; override;
function FilterCustomBlur(ABounds: TRect; mask: TBGRACustomBitmap): TBGRACustomBitmap; override;
function FilterEmboss(angle: single): TBGRACustomBitmap; override;
function FilterEmboss(angle: single; ABounds: TRect): TBGRACustomBitmap; override;
function FilterEmbossHighlight(FillSelection: boolean): TBGRACustomBitmap; override;
function FilterEmbossHighlight(FillSelection: boolean; BorderColor: TBGRAPixel): TBGRACustomBitmap; override;
function FilterEmbossHighlight(FillSelection: boolean; BorderColor: TBGRAPixel; var Offset: TPoint): TBGRACustomBitmap; override;
function FilterGrayscale: TBGRACustomBitmap; override;
function FilterGrayscale(ABounds: TRect): TBGRACustomBitmap; override;
function FilterNormalize(eachChannel: boolean = True): TBGRACustomBitmap; override;
function FilterNormalize(ABounds: TRect; eachChannel: boolean = True): TBGRACustomBitmap; override;
function FilterRotate(origin: TPointF; angle: single): TBGRACustomBitmap; override;
function FilterSphere: TBGRACustomBitmap; override;
function FilterTwirl(ACenter: TPoint; ARadius: Single; ATurn: Single=1; AExponent: Single=3): TBGRACustomBitmap; override;
function FilterTwirl(ABounds: TRect; ACenter: TPoint; ARadius: Single; ATurn: Single=1; AExponent: Single=3): TBGRACustomBitmap; override;
function FilterCylinder: TBGRACustomBitmap; override;
function FilterPlane: TBGRACustomBitmap; override;
property CanvasBGRA: TBGRACanvas read GetCanvasBGRA;
property Canvas2D: TBGRACanvas2D read GetCanvas2D;
end;
{ TBGRAPtrBitmap }
TBGRAPtrBitmap = class(TBGRADefaultBitmap)
protected
procedure ReallocData; override;
procedure FreeData; override;
public
constructor Create(AWidth, AHeight: integer; AData: Pointer); overload;
function Duplicate(DuplicateProperties: Boolean = False): TBGRACustomBitmap; override;
procedure SetDataPtr(AData: Pointer);
property LineOrder: TRawImageLineOrder Read FLineOrder Write FLineOrder;
end;
var
DefaultTextStyle: TTextStyle;
procedure BGRAGradientFill(bmp: TBGRACustomBitmap; x, y, x2, y2: integer;
c1, c2: TBGRAPixel; gtype: TGradientType; o1, o2: TPointF; mode: TDrawMode;
gammaColorCorrection: boolean = True; Sinus: Boolean=False);
implementation
uses Math, LCLIntf, LCLType,
BGRABlend, BGRAFilters, BGRAPen, BGRAText, BGRATextFX, BGRAGradientScanner,
BGRAResample, BGRATransform, BGRAPolygon, BGRAPolygonAliased,
BGRAPath, FPReadPcx, FPWritePcx, FPReadXPM, FPWriteXPM;
type
TBitmapTracker = class(TBitmap)
protected
FUser: TBGRADefaultBitmap;
procedure Changed(Sender: TObject); override;
public
constructor Create(AUser: TBGRADefaultBitmap); overload;
end;
constructor TBitmapTracker.Create(AUser: TBGRADefaultBitmap);
begin
FUser := AUser;
inherited Create;
end;
procedure TBitmapTracker.Changed(Sender: TObject);
begin
FUser.FBitmapModified := True;
inherited Changed(Sender);
end;
{ TBGRADefaultBitmap }
function TBGRADefaultBitmap.CheckEmpty: boolean;
var
i: integer;
p: PBGRAPixel;
begin
p := Data;
for i := NbPixels - 1 downto 0 do
begin
if p^.alpha <> 0 then
begin
Result := False;
exit;
end;
Inc(p);
end;
Result := True;
end;
function TBGRADefaultBitmap.GetCanvasAlphaCorrection: boolean;
begin
Result := (FCanvasOpacity <> 0);
end;
function TBGRADefaultBitmap.GetCustomPenStyle: TBGRAPenStyle;
begin
result := DuplicatePenStyle(FCustomPenStyle);
end;
procedure TBGRADefaultBitmap.SetCanvasAlphaCorrection(const AValue: boolean);
begin
if AValue then
begin
if FCanvasOpacity = 0 then
FCanvasOpacity := 255;
end
else
FCanvasOpacity := 0;
end;
procedure TBGRADefaultBitmap.SetCanvasDrawModeFP(const AValue: TDrawMode);
begin
FCanvasDrawModeFP := AValue;
Case AValue of
dmLinearBlend: FCanvasPixelProcFP := @FastBlendPixel;
dmDrawWithTransparency: FCanvasPixelProcFP := @DrawPixel;
dmXor: FCanvasPixelProcFP:= @XorPixel;
else FCanvasPixelProcFP := @SetPixel;
end;
end;
function TBGRADefaultBitmap.GetCanvasDrawModeFP: TDrawMode;
begin
Result:= FCanvasDrawModeFP;
end;
procedure TBGRADefaultBitmap.SetCustomPenStyle(const AValue: TBGRAPenStyle);
begin
FCustomPenStyle := DuplicatePenStyle(AValue);
end;
procedure TBGRADefaultBitmap.SetPenStyle(const AValue: TPenStyle);
begin
Case AValue of
psSolid: CustomPenStyle := SolidPenStyle;
psDash: CustomPenStyle := DashPenStyle;
psDot: CustomPenStyle := DotPenStyle;
psDashDot: CustomPenStyle := DashDotPenStyle;
psDashDotDot: CustomPenStyle := DashDotDotPenStyle;
else CustomPenStyle := ClearPenStyle;
end;
FPenStyle := AValue;
end;
function TBGRADefaultBitmap.GetPenStyle: TPenStyle;
begin
Result:= FPenStyle;
end;
procedure TBGRADefaultBitmap.SetFontHeight(AHeight: integer);
begin
FFontHeight := AHeight;
end;
function TBGRADefaultBitmap.GetFontFullHeight: integer;
begin
if FontHeight < 0 then
result := -FontHeight
else
result := TextSize('Hg').cy;
end;
procedure TBGRADefaultBitmap.SetFontFullHeight(AHeight: integer);
begin
if AHeight > 0 then
FontHeight := -AHeight
else
FontHeight := 1;
end;
function TBGRADefaultBitmap.GetFontPixelMetric: TFontPixelMetric;
begin
result := FontRenderer.GetFontPixelMetric;
end;
function TBGRADefaultBitmap.GetFontRenderer: TBGRACustomFontRenderer;
begin
if FFontRenderer = nil then FFontRenderer := TLCLFontRenderer.Create;
result := FFontRenderer;
result.FontName := FontName;
result.FontStyle := FontStyle;
result.FontQuality := FontQuality;
result.FontOrientation := FontOrientation;
result.FontEmHeight := FFontHeight;
end;
procedure TBGRADefaultBitmap.SetFontRenderer(AValue: TBGRACustomFontRenderer);
begin
if AValue = FFontRenderer then exit;
FFontRenderer.Free;
FFontRenderer := AValue
end;
{ Get scanline without checking bounds nor updated from TBitmap }
function TBGRADefaultBitmap.GetScanlineFast(y: integer): PBGRAPixel; inline;
begin
Result := FData;
if FLineOrder = riloBottomToTop then
y := FHeight - 1 - y;
Inc(Result, FWidth * y);
end;
function TBGRADefaultBitmap.GetScanLine(y: integer): PBGRAPixel;
begin
if (y < 0) or (y >= Height) then
raise ERangeError.Create('Scanline: out of bounds')
else
begin
LoadFromBitmapIfNeeded;
Result := GetScanLineFast(y);
end;
end;
{------------------------- Reference counter functions ------------------------}
{ These functions are not related to reference counting for interfaces :
a reference must be explicitely freed with FreeReference }
{ Add a new reference and gives a pointer to it }
function TBGRADefaultBitmap.NewReference: TBGRACustomBitmap;
begin
Inc(FRefCount);
Result := self;
end;
{ Free the current reference, and free the bitmap if necessary }
procedure TBGRADefaultBitmap.FreeReference;
begin
if self = nil then
exit;
if FRefCount > 0 then
begin
Dec(FRefCount);
if FRefCount = 0 then
begin
self.Destroy;
end;
end;
end;
{ Make sure there is only one copy of the bitmap and return
the new pointer for it. If the bitmap is already unique,
then it does nothing }
function TBGRADefaultBitmap.GetUnique: TBGRACustomBitmap;
begin
if FRefCount > 1 then
begin
Dec(FRefCount);
Result := self.Duplicate;
end
else
Result := self;
end;
{ Creates a new bitmap. Internally, it uses the same type so that if you
use an optimized version, you get a new bitmap with the same optimizations }
function TBGRADefaultBitmap.NewBitmap(AWidth, AHeight: integer): TBGRACustomBitmap;
var
BGRAClass: TBGRABitmapAny;
begin
BGRAClass := TBGRABitmapAny(self.ClassType);
if BGRAClass = TBGRAPtrBitmap then
BGRAClass := TBGRADefaultBitmap;
Result := BGRAClass.Create(AWidth, AHeight);
end;
function TBGRADefaultBitmap.NewBitmap(AWidth, AHeight: integer;
Color: TBGRAPixel): TBGRACustomBitmap;
var
BGRAClass: TBGRABitmapAny;
begin
BGRAClass := TBGRABitmapAny(self.ClassType);
if BGRAClass = TBGRAPtrBitmap then
BGRAClass := TBGRADefaultBitmap;
Result := BGRAClass.Create(AWidth, AHeight, Color);
end;
{ Creates a new bitmap and loads it contents from a file }
function TBGRADefaultBitmap.NewBitmap(Filename: string): TBGRACustomBitmap;
var
BGRAClass: TBGRABitmapAny;
begin
BGRAClass := TBGRABitmapAny(self.ClassType);
Result := BGRAClass.Create(Filename);
end;
{----------------------- TFPCustomImage override ------------------------------}
{ Creates a new bitmap, initialize properties and bitmap data }
constructor TBGRADefaultBitmap.Create(AWidth, AHeight: integer);
begin
Init;
inherited Create(AWidth, AHeight);
if FData <> nil then
FillTransparent;
end;
{ Set the size of the current bitmap. All data is lost during the process }
procedure TBGRADefaultBitmap.SetSize(AWidth, AHeight: integer);
begin
if (AWidth = Width) and (AHeight = Height) then
exit;
inherited SetSize(AWidth, AHeight);
if AWidth < 0 then
AWidth := 0;
if AHeight < 0 then
AHeight := 0;
FWidth := AWidth;
FHeight := AHeight;
FNbPixels := AWidth * AHeight;
if FNbPixels < 0 then // 2 Go limit
raise EOutOfMemory.Create('Image too big');
FreeBitmap;
ReallocData;
NoClip;
end;
{---------------------- Constructors ---------------------------------}
constructor TBGRADefaultBitmap.Create;
begin
Init;
inherited Create(0, 0);
end;
constructor TBGRADefaultBitmap.Create(ABitmap: TBitmap);
begin
Init;
inherited Create(ABitmap.Width, ABitmap.Height);
Assign(ABitmap);
end;
constructor TBGRADefaultBitmap.Create(AWidth, AHeight: integer; Color: TColor);
begin
Init;
inherited Create(AWidth, AHeight);
Fill(Color);
end;
constructor TBGRADefaultBitmap.Create(AWidth, AHeight: integer; Color: TBGRAPixel);
begin
Init;
inherited Create(AWidth, AHeight);
Fill(Color);
end;
destructor TBGRADefaultBitmap.Destroy;
begin
FreeData;
FFontRenderer.Free;
FBitmap.Free;
FCanvasFP.Free;
FCanvasBGRA.Free;
FCanvas2D.Free;
inherited Destroy;
end;
{------------------------- Loading functions ----------------------------------}
constructor TBGRADefaultBitmap.Create(AFilename: string);
begin
Init;
inherited Create(0, 0);
LoadFromFile(Afilename);
end;
constructor TBGRADefaultBitmap.Create(AStream: TStream);
begin
Init;
inherited Create(0, 0);
LoadFromStream(AStream);
end;
procedure TBGRADefaultBitmap.Assign(ABitmap: TBitmap);
var TempBmp: TBitmap;
ConvertOk: boolean;
begin
DiscardBitmapChange;
SetSize(ABitmap.Width, ABitmap.Height);
if not LoadFromRawImage(ABitmap.RawImage,0,False,False) then
begin //try to convert
TempBmp := TBitmap.Create;
TempBmp.Width := ABitmap.Width;
TempBmp.Height := ABitmap.Height;
TempBmp.Canvas.Draw(0,0,ABitmap);
ConvertOk := LoadFromRawImage(TempBmp.RawImage,0,False,False);
TempBmp.Free;
if not ConvertOk then
raise Exception.Create('Unable to convert image to 24 bit');
end;
If Empty then AlphaFill(255); // if bitmap seems to be empty, assume
// it is an opaque bitmap without alpha channel
end;
procedure TBGRADefaultBitmap.Assign(MemBitmap: TBGRACustomBitmap);
begin
DiscardBitmapChange;
SetSize(MemBitmap.Width, MemBitmap.Height);
PutImage(0, 0, MemBitmap, dmSet);
end;
procedure TBGRADefaultBitmap.Serialize(AStream: TStream);
var lWidth,lHeight,y: integer;
begin
lWidth := NtoLE(Width);
lHeight := NtoLE(Height);
AStream.Write(lWidth,sizeof(lWidth));
AStream.Write(lHeight,sizeof(lHeight));
for y := 0 to Height-1 do
AStream.Write(ScanLine[y]^, Width*sizeof(TBGRAPixel));
end;
{$hints off}
procedure TBGRADefaultBitmap.Deserialize(AStream: TStream);
var lWidth,lHeight,y: integer;
begin
AStream.Read(lWidth,sizeof(lWidth));
AStream.Read(lHeight,sizeof(lHeight));
lWidth := LEtoN(lWidth);
lHeight := LEtoN(lHeight);
SetSize(lWidth,lHeight);
for y := 0 to Height-1 do
AStream.Read(ScanLine[y]^, Width*sizeof(TBGRAPixel));
end;
{$hints on}
class procedure TBGRADefaultBitmap.SerializeEmpty(AStream: TStream);
var zero: integer;
begin
zero := 0;
AStream.Write(zero,sizeof(zero));
AStream.Write(zero,sizeof(zero));
end;
procedure TBGRADefaultBitmap.LoadFromFile(const filename: string);
var
OldDrawMode: TDrawMode;
begin
OldDrawMode := CanvasDrawModeFP;
CanvasDrawModeFP := dmSet;
ClipRect := rect(0,0,Width,Height);
try
inherited LoadFromfile(filename);
finally
CanvasDrawModeFP := OldDrawMode;
ClearTransparentPixels;
end;
end;
procedure TBGRADefaultBitmap.SaveToFile(const filename: string);
var
ext: string;
writer: TFPCustomImageWriter;
begin
ext := AnsiLowerCase(ExtractFileExt(filename));
{ When saving to PNG, define some parameters so that the
image be readable by most programs }
if ext = '.png' then
writer := CreateAdaptedPngWriter
else
if (ext='.xpm') and (Width*Height > 32768) then //xpm is slow so avoid big images
raise exception.Create('Image is too big to be saved as XPM') else
writer := nil;
if writer <> nil then //use custom writer if defined
begin
inherited SaveToFile(Filename, writer);
writer.Free;
end
else
inherited SaveToFile(Filename);
end;
procedure TBGRADefaultBitmap.SaveToStreamAsPng(Str: TStream);
var writer: TFPWriterPNG;
begin
writer := CreateAdaptedPngWriter;
SaveToStream(Str,writer);
writer.Free;
end;
{------------------------- Clipping -------------------------------}
{ Check if a point is in the clipping rectangle }
function TBGRADefaultBitmap.PtInClipRect(x, y: int32or64): boolean;
begin
result := (x >= FClipRect.Left) and (y >= FClipRect.Top) and (x < FClipRect.Right) and (y < FClipRect.Bottom);
end;
procedure TBGRADefaultBitmap.NoClip;
begin
FClipRect := rect(0,0,FWidth,FHeight);
end;
procedure TBGRADefaultBitmap.Fill(texture: IBGRAScanner; mode: TDrawMode);
begin
FillRect(FClipRect.Left,FClipRect.Top,FClipRect.Right,FClipRect.Bottom,texture,mode);
end;
function TBGRADefaultBitmap.GetClipRect: TRect;
begin
Result:= FClipRect;
end;
procedure TBGRADefaultBitmap.SetClipRect(const AValue: TRect);
begin
IntersectRect(FClipRect,AValue,Rect(0,0,FWidth,FHeight));
end;
function TBGRADefaultBitmap.GetPixelCycleInline(ix, iy: int32or64; iFactX,
iFactY: int32or64): TBGRAPixel;
var
ixMod1,ixMod2: int32or64;
w1,w2,w3,w4,alphaW: UInt32or64;
bSum, gSum, rSum: UInt32or64;
aSum: UInt32or64;
c: TBGRAPixel;
scan: PBGRAPixel;
begin
w4 := (iFactX*iFactY+127) shr 8;
w3 := iFactY-w4;
w1 := cardinal(256-iFactX)-w3;
w2 := iFactX-w4;
rSum := 0;
gSum := 0;
bSum := 0;
aSum := 0;
scan := GetScanlineFast(PositiveMod(iy,Height));
ixMod1 := PositiveMod(ix,Width); //apply cycle
c := (scan + ixMod1)^;
alphaW := c.alpha * w1;
aSum += alphaW;
rSum += c.red * alphaW;
gSum += c.green * alphaW;
bSum += c.blue * alphaW;
Inc(ix);
ixMod2 := PositiveMod(ix,Width); //apply cycle
c := (scan + ixMod2)^;
alphaW := c.alpha * w2;
aSum += alphaW;
rSum += c.red * alphaW;
gSum += c.green * alphaW;
bSum += c.blue * alphaW;
Inc(iy);
scan := GetScanlineFast(PositiveMod(iy,Height));
c := (scan + ixMod2)^;
alphaW := c.alpha * w4;
aSum += alphaW;
rSum += c.red * alphaW;
gSum += c.green * alphaW;
bSum += c.blue * alphaW;
c := (scan + ixMod1)^;
alphaW := c.alpha * w3;
aSum += alphaW;
rSum += c.red * alphaW;
gSum += c.green * alphaW;
bSum += c.blue * alphaW;
if (aSum < 128) then
Result := BGRAPixelTransparent
else
begin
Result.red := (rSum + aSum shr 1) div aSum;
Result.green := (gSum + aSum shr 1) div aSum;
Result.blue := (bSum + aSum shr 1) div aSum;
Result.alpha := (aSum + 128) shr 8;
end;
end;
{-------------------------- Pixel functions -----------------------------------}
procedure TBGRADefaultBitmap.SetPixel(x, y: int32or64; c: TBGRAPixel);
begin
if not PtInClipRect(x,y) then exit;
LoadFromBitmapIfNeeded;
(GetScanlineFast(y) +x)^ := c;
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.XorPixel(x, y: int32or64; c: TBGRAPixel);
var
p : PDWord;
begin
if not PtInClipRect(x,y) then exit;
LoadFromBitmapIfNeeded;
p := PDWord(GetScanlineFast(y) +x);
p^ := p^ xor DWord(c);
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.SetPixel(x, y: int32or64; c: TColor);
var
p: PByte;
begin
if not PtInClipRect(x,y) then exit;
LoadFromBitmapIfNeeded;
p := PByte(GetScanlineFast(y) + x);
p^ := c shr 16;
Inc(p);
p^ := c shr 8;
Inc(p);
p^ := c;
Inc(p);
p^ := 255;
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.DrawPixel(x, y: int32or64; c: TBGRAPixel);
begin
if not PtInClipRect(x,y) then exit;
LoadFromBitmapIfNeeded;
DrawPixelInlineWithAlphaCheck(GetScanlineFast(y) + x, c);
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.DrawPixel(x, y: int32or64; ec: TExpandedPixel);
begin
if not PtInClipRect(x,y) then exit;
LoadFromBitmapIfNeeded;
DrawExpandedPixelInlineWithAlphaCheck(GetScanlineFast(y) + x, ec);
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.FastBlendPixel(x, y: int32or64; c: TBGRAPixel);
begin
if not PtInClipRect(x,y) then exit;
LoadFromBitmapIfNeeded;
FastBlendPixelInline(GetScanlineFast(y) + x, c);
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.ErasePixel(x, y: int32or64; alpha: byte);
begin
if not PtInClipRect(x,y) then exit;
LoadFromBitmapIfNeeded;
ErasePixelInline(GetScanlineFast(y) + x, alpha);
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.AlphaPixel(x, y: int32or64; alpha: byte);
begin
if not PtInClipRect(x,y) then exit;
LoadFromBitmapIfNeeded;
if alpha = 0 then
(GetScanlineFast(y) +x)^ := BGRAPixelTransparent
else
(GetScanlineFast(y) +x)^.alpha := alpha;
InvalidateBitmap;
end;
function TBGRADefaultBitmap.GetPixel(x, y: int32or64): TBGRAPixel;
begin
if (x < 0) or (x >= Width) or (y < 0) or (y >= Height) then //it is possible to read pixels outside of the cliprect
Result := BGRAPixelTransparent
else
begin
LoadFromBitmapIfNeeded;
Result := (GetScanlineFast(y) + x)^;
end;
end;
{$hints off}
{ This function compute an interpolated pixel at floating point coordinates }
function TBGRADefaultBitmap.GetPixel(x, y: single; AResampleFilter: TResampleFilter = rfLinear): TBGRAPixel;
var
ix, iy: integer;
w1,w2,w3,w4,alphaW: cardinal;
rSum, gSum, bSum: cardinal; //rgbDiv = aSum
aSum: cardinal;
c: TBGRAPixel;
scan: PBGRAPixel;
factX,factY: single;
iFactX,iFactY: integer;
begin
ix := floor(x);
iy := floor(y);
factX := x-ix; //distance from integer coordinate
factY := y-iy;
//if the coordinate is integer, then call standard GetPixel function
if (factX = 0) and (factY = 0) then
begin
Result := GetPixel(ix, iy);
exit;
end;
LoadFromBitmapIfNeeded;
rSum := 0;
gSum := 0;
bSum := 0;
aSum := 0;
//apply interpolation filter
factX := FineInterpolation( factX, AResampleFilter );
factY := FineInterpolation( factY, AResampleFilter );
iFactX := round(factX*256); //integer values for fractionnal part
iFactY := round(factY*256);
w4 := (iFactX*iFactY+127) shr 8;
w3 := iFactY-w4;
w1 := (256-iFactX)-w3;
w2 := iFactX-w4;
{ For each pixel around the coordinate, compute
the weight for it and multiply values by it before
adding to the sum }
if (iy >= 0) and (iy < Height) then
begin
scan := GetScanlineFast(iy);
if (ix >= 0) and (ix < Width) then
begin
c := (scan + ix)^;
alphaW := c.alpha * w1;
aSum += alphaW;
rSum += c.red * alphaW;
gSum += c.green * alphaW;
bSum += c.blue * alphaW;
end;
Inc(ix);
if (ix >= 0) and (ix < Width) then
begin
c := (scan + ix)^;
alphaW := c.alpha * w2;
aSum += alphaW;
rSum += c.red * alphaW;
gSum += c.green * alphaW;
bSum += c.blue * alphaW;
end;
end
else
begin
Inc(ix);
end;
Inc(iy);
if (iy >= 0) and (iy < Height) then
begin
scan := GetScanlineFast(iy);
if (ix >= 0) and (ix < Width) then
begin
c := (scan + ix)^;
alphaW := c.alpha * w4;
aSum += alphaW;
rSum += c.red * alphaW;
gSum += c.green * alphaW;
bSum += c.blue * alphaW;
end;
Dec(ix);
if (ix >= 0) and (ix < Width) then
begin
c := (scan + ix)^;
alphaW := c.alpha * w3;
aSum += alphaW;
rSum += c.red * alphaW;
gSum += c.green * alphaW;
bSum += c.blue * alphaW;
end;
end;
if aSum < 128 then //if there is no alpha
Result := BGRAPixelTransparent
else
begin
Result.red := (rSum + aSum shr 1) div aSum;
Result.green := (gSum + aSum shr 1) div aSum;
Result.blue := (bSum + aSum shr 1) div aSum;
Result.alpha := (aSum + 128) shr 8;
end;
end;
{ Same as GetPixel(single,single,TResampleFilter) but with coordinate cycle, supposing the image repeats itself in both directions }
function TBGRADefaultBitmap.GetPixelCycle(x, y: single; AResampleFilter: TResampleFilter = rfLinear): TBGRAPixel;
var
ix, iy: integer;
iFactX,iFactY: integer;
begin
LoadFromBitmapIfNeeded;
iFactX := round(x*256);
iFactY := round(y*256);
ix := (iFactX shr 8)+ScanOffset.X;
iy := (iFactY shr 8)+ScanOffset.Y;
iFactX := iFactX and 255;
iFactY := iFactY and 255;
if (iFactX = 0) and (iFactY = 0) then
begin
result := (ScanLine[PositiveMod(iy, FHeight)]+PositiveMod(ix, FWidth))^;
exit;
end;
if ScanInterpolationFilter <> rfLinear then
begin
iFactX := FineInterpolation256( iFactX, ScanInterpolationFilter );
iFactY := FineInterpolation256( iFactY, ScanInterpolationFilter );
end;
result := GetPixelCycleInline(ix,iy, iFactX,iFactY);
end;
function TBGRADefaultBitmap.GetPixelCycle(x, y: single;
AResampleFilter: TResampleFilter; repeatX: boolean; repeatY: boolean
): TBGRAPixel;
var
alpha: byte;
begin
alpha := 255;
if not repeatX then
begin
if (x < -0.5) or (x > Width-0.5) then
begin
result := BGRAPixelTransparent;
exit;
end;
if x < 0 then
begin
alpha := round((0.5+x)*510);
x := 0;
end
else
if x > Width-1 then
begin
alpha := round((Width-0.5-x)*510);
x := Width-1;
end;
end;
if not repeatY then
begin
if (y < -0.5) or (y > Height-0.5) then
begin
result := BGRAPixelTransparent;
exit;
end;
if y < 0 then
begin
alpha := round((0.5+y)*2*alpha);
y := 0;
end
else
if y > Height-1 then
begin
alpha := round((Height-0.5-y)*2*alpha);
y := Height-1;
end;
end;
result := GetPixelCycle(x,y,AResampleFilter);
if alpha<>255 then
result.alpha := ApplyOpacity(result.alpha,alpha);
end;
{$hints on}
procedure TBGRADefaultBitmap.InvalidateBitmap;
begin
FDataModified := True;
end;
function TBGRADefaultBitmap.GetBitmap: TBitmap;
begin
if FAlphaCorrectionNeeded and CanvasAlphaCorrection then
LoadFromBitmapIfNeeded;
if FDataModified or (FBitmap = nil) then
begin
RebuildBitmap;
FDataModified := False;
end;
Result := FBitmap;
end;
function TBGRADefaultBitmap.GetCanvas: TCanvas;
begin
Result := Bitmap.Canvas;
end;
function TBGRADefaultBitmap.GetCanvasFP: TFPImageCanvas;
begin
{$warnings off}
if FCanvasFP = nil then
FCanvasFP := TFPImageCanvas.Create(self);
{$warnings on}
result := FCanvasFP;
end;
{ Load raw image data. It must be 32bit or 24 bits per pixel}
function TBGRADefaultBitmap.LoadFromRawImage(ARawImage: TRawImage;
DefaultOpacity: byte; AlwaysReplaceAlpha: boolean; RaiseErrorOnInvalidPixelFormat: boolean): boolean;
var
psource_byte, pdest_byte,
psource_first, pdest_first: PByte;
psource_delta, pdest_delta: integer;
n: integer;
mustSwapRedBlue, mustReverse32: boolean;
procedure CopyAndSwapIfNecessary(psrc: PBGRAPixel; pdest: PBGRAPixel; count: integer);
begin
if mustReverse32 then
begin
while count > 0 do
begin
pdest^.blue := psrc^.alpha;
pdest^.green := psrc^.red;
pdest^.red := psrc^.green;
pdest^.alpha := psrc^.blue;
dec(count);
inc(pdest);
inc(psrc);
end;
end else
if mustSwapRedBlue then
begin
while count > 0 do
begin
pdest^.red := psrc^.blue;
pdest^.green := psrc^.green;
pdest^.blue := psrc^.red;
pdest^.alpha := psrc^.alpha;
dec(count);
inc(pdest);
inc(psrc);
end;
end else
move(psrc^,pdest^,count*sizeof(TBGRAPixel));
end;
procedure CopyRGBAndSwapIfNecessary(psrc: PByte; pdest: PBGRAPixel; count: integer);
begin
if mustSwapRedBlue then
begin
while count > 0 do
begin
pdest^.blue := (psrc+2)^;
pdest^.green := (psrc+1)^;
pdest^.red := psrc^;
pdest^.alpha := DefaultOpacity;
inc(psrc,3);
inc(pdest);
dec(count);
end;
end else
begin
while count > 0 do
begin
PWord(pdest)^ := PWord(psrc)^;
pdest^.red := (psrc+2)^;
pdest^.alpha := DefaultOpacity;
inc(psrc,3);
inc(pdest);
dec(count);
end;
end;
end;
procedure CopyAndSwapIfNecessaryAndSetAlpha(psrc: PBGRAPixel; pdest: PBGRAPixel; count: integer);
begin
if mustReverse32 then
begin
while count > 0 do
begin
pdest^.blue := psrc^.alpha;
pdest^.green := psrc^.red;
pdest^.red := psrc^.green;
pdest^.alpha := DefaultOpacity; //use default opacity
inc(psrc);
inc(pdest);
dec(count);
end;
end else
if mustSwapRedBlue then
begin
while count > 0 do
begin
pdest^.red := psrc^.blue;
pdest^.green := psrc^.green;
pdest^.blue := psrc^.red;
pdest^.alpha := DefaultOpacity; //use default opacity
inc(psrc);
inc(pdest);
dec(count);
end;
end else
begin
while count > 0 do
begin
PWord(pdest)^ := PWord(psrc)^;
pdest^.red := psrc^.red;
pdest^.alpha := DefaultOpacity; //use default opacity
inc(psrc);
inc(pdest);
dec(count);
end;
end;
end;
procedure CopyAndSwapIfNecessaryAndReplaceAlpha(psrc: PBGRAPixel; pdest: PBGRAPixel; count: integer);
var OpacityOrMask, OpacityAndMask, sourceval: Longword;
begin
OpacityOrMask := NtoLE(longword(DefaultOpacity) shl 24);
OpacityAndMask := NtoLE($FFFFFF);
if mustReverse32 then
begin
OpacityAndMask := NtoBE($FFFFFF);
while count > 0 do
begin
sourceval := plongword(psrc)^ and OpacityAndMask;
if (sourceval <> 0) and (psrc^.blue{=alpha} = 0) then //if not black but transparent
begin
pdest^.blue := psrc^.alpha;
pdest^.green := psrc^.red;
pdest^.red := psrc^.green;
pdest^.alpha := DefaultOpacity; //use default opacity
end
else
begin
pdest^.blue := psrc^.alpha;
pdest^.green := psrc^.red;
pdest^.red := psrc^.green;
pdest^.alpha := psrc^.blue;
end;
dec(count);
inc(pdest);
inc(psrc);
end;
end else
if mustSwapRedBlue then
begin
while count > 0 do
begin
sourceval := plongword(psrc)^ and OpacityAndMask;
if (sourceval <> 0) and (psrc^.alpha = 0) then //if not black but transparent
begin
pdest^.red := psrc^.blue;
pdest^.green := psrc^.green;
pdest^.blue := psrc^.red;
pdest^.alpha := DefaultOpacity; //use default opacity
end
else
begin
pdest^.red := psrc^.blue;
pdest^.green := psrc^.green;
pdest^.blue := psrc^.red;
pdest^.alpha := psrc^.alpha;
end;
dec(count);
inc(pdest);
inc(psrc);
end;
end else
begin
while count > 0 do
begin
sourceval := plongword(psrc)^ and OpacityAndMask;
if (sourceval <> 0) and (psrc^.alpha = 0) then //if not black but transparent
plongword(pdest)^ := sourceval or OpacityOrMask //use default opacity
else
pdest^ := psrc^;
dec(count);
inc(pdest);
inc(psrc);
end;
end;
end;
begin
if (ARawImage.Description.Width <> cardinal(Width)) or
(ARawImage.Description.Height <> cardinal(Height)) then
raise Exception.Create('Bitmap size is inconsistant');
DiscardBitmapChange;
if (Height=0) or (Width=0) then
begin
result := true;
exit;
end;
if ARawImage.Description.LineOrder = riloTopToBottom then
begin
psource_first := ARawImage.Data;
psource_delta := ARawImage.Description.BytesPerLine;
end else
begin
psource_first := ARawImage.Data + (ARawImage.Description.Height-1) * ARawImage.Description.BytesPerLine;
psource_delta := -ARawImage.Description.BytesPerLine;
end;
if ((ARawImage.Description.RedShift = 0) and
(ARawImage.Description.BlueShift = 16) and
(ARawImage.Description.ByteOrder = riboLSBFirst)) or
((ARawImage.Description.RedShift = 24) and
(ARawImage.Description.BlueShift = 8) and
(ARawImage.Description.ByteOrder = riboMSBFirst)) then
begin
mustSwapRedBlue:= true;
mustReverse32 := false;
end
else
begin
mustSwapRedBlue:= false;
if ((ARawImage.Description.RedShift = 8) and
(ARawImage.Description.GreenShift = 16) and
(ARawImage.Description.BlueShift = 24) and
(ARawImage.Description.ByteOrder = riboLSBFirst)) or
((ARawImage.Description.RedShift = 16) and
(ARawImage.Description.GreenShift = 8) and
(ARawImage.Description.BlueShift = 0) and
(ARawImage.Description.ByteOrder = riboMSBFirst)) then
mustReverse32 := true
else
mustReverse32 := false;
end;
if self.LineOrder = riloTopToBottom then
begin
pdest_first := PByte(self.Data);
pdest_delta := self.Width*sizeof(TBGRAPixel);
end else
begin
pdest_first := PByte(self.Data) + (self.Height-1)*self.Width*sizeof(TBGRAPixel);
pdest_delta := -self.Width*sizeof(TBGRAPixel);
end;
{ 32 bits per pixel }
if (ARawImage.Description.BitsPerPixel = 32) and
(ARawImage.DataSize >= longword(NbPixels) * 4) then
begin
{ If there is an alpha channel }
if (ARawImage.Description.AlphaPrec = 8) and not AlwaysReplaceAlpha then
begin
if DefaultOpacity = 0 then
begin
if ARawImage.Description.LineOrder = FLineOrder then
CopyAndSwapIfNecessary(PBGRAPixel(ARawImage.Data), FData, NbPixels) else
begin
psource_byte := psource_first;
pdest_byte := pdest_first;
for n := FHeight-1 downto 0 do
begin
CopyAndSwapIfNecessary(PBGRAPixel(psource_byte), PBGRAPixel(pdest_byte), FWidth);
inc(psource_byte, psource_delta);
inc(pdest_byte, pdest_delta);
end;
end;
end
else
begin
psource_byte := psource_first;
pdest_byte := pdest_first;
for n := FHeight-1 downto 0 do
begin
CopyAndSwapIfNecessaryAndReplaceAlpha(PBGRAPixel(psource_byte), PBGRAPixel(pdest_byte), FWidth);
inc(psource_byte, psource_delta);
inc(pdest_byte, pdest_delta);
end;
end;
end
else
begin { If there isn't any alpha channel }
psource_byte := psource_first;
pdest_byte := pdest_first;
for n := FHeight-1 downto 0 do
begin
CopyAndSwapIfNecessaryAndSetAlpha(PBGRAPixel(psource_byte), PBGRAPixel(pdest_byte), FWidth);
inc(psource_byte, psource_delta);
inc(pdest_byte, pdest_delta);
end;
end;
end
else
{ 24 bit per pixel }
if (ARawImage.Description.BitsPerPixel = 24) then
begin
psource_byte := psource_first;
pdest_byte := pdest_first;
for n := FHeight-1 downto 0 do
begin
CopyRGBAndSwapIfNecessary(psource_byte, PBGRAPixel(pdest_byte), FWidth);
inc(psource_byte, psource_delta);
inc(pdest_byte, pdest_delta);
end;
end
else
begin
if RaiseErrorOnInvalidPixelFormat then
raise Exception.Create('Invalid raw image format (' + IntToStr(
ARawImage.Description.Depth) + ' found)') else
begin
result := false;
exit;
end;
end;
InvalidateBitmap;
result := true;
end;
procedure TBGRADefaultBitmap.LoadFromBitmapIfNeeded;
begin
if FBitmapModified then
begin
if FBitmap <> nil then
LoadFromRawImage(FBitmap.RawImage, FCanvasOpacity);
DiscardBitmapChange;
end;
if FAlphaCorrectionNeeded then
begin
DoAlphaCorrection;
end;
end;
procedure TBGRADefaultBitmap.DiscardBitmapChange; inline;
begin
FBitmapModified := False;
end;
{ Initialize properties }
procedure TBGRADefaultBitmap.Init;
begin
FRefCount := 1;
FBitmap := nil;
FCanvasFP := nil;
FCanvasBGRA := nil;
CanvasDrawModeFP := dmDrawWithTransparency;
FData := nil;
FWidth := 0;
FHeight := 0;
FLineOrder := riloTopToBottom;
FCanvasOpacity := 255;
FAlphaCorrectionNeeded := False;
FEraseMode := False;
FillMode := fmWinding;
FontName := 'Arial';
FontStyle := [];
FontAntialias := False;
FFontHeight := 20;
PenStyle := psSolid;
LineCap := pecRound;
JoinStyle := pjsBevel;
JoinMiterLimit := 2;
ResampleFilter := rfHalfCosine;
ScanInterpolationFilter := rfLinear;
ScanOffset := Point(0,0);
end;
procedure TBGRADefaultBitmap.SetInternalColor(x, y: integer; const Value: TFPColor);
begin
FCanvasPixelProcFP(x,y, FPColorToBGRA(Value));
end;
function TBGRADefaultBitmap.GetInternalColor(x, y: integer): TFPColor;
begin
if (x < 0) or (y < 0) or (x >= Width) or (y >= Height) then exit;
result := BGRAToFPColor((Scanline[y] + x)^);
end;
procedure TBGRADefaultBitmap.SetInternalPixel(x, y: integer; Value: integer);
var
c: TFPColor;
begin
if not PtInClipRect(x,y) then exit;
c := Palette.Color[Value];
(Scanline[y] + x)^ := FPColorToBGRA(c);
InvalidateBitmap;
end;
function TBGRADefaultBitmap.GetInternalPixel(x, y: integer): integer;
var
c: TFPColor;
begin
if (x < 0) or (y < 0) or (x >= Width) or (y >= Height) then exit;
c := BGRAToFPColor((Scanline[y] + x)^);
Result := palette.IndexOf(c);
end;
procedure TBGRADefaultBitmap.Draw(ACanvas: TCanvas; x, y: integer; Opaque: boolean);
begin
if self = nil then
exit;
if Opaque then
DataDrawOpaque(ACanvas, Rect(X, Y, X + Width, Y + Height), Data,
FLineOrder, FWidth, FHeight)
else
begin
LoadFromBitmapIfNeeded;
if Empty then
exit;
ACanvas.Draw(X, Y, Bitmap);
end;
end;
procedure TBGRADefaultBitmap.Draw(ACanvas: TCanvas; Rect: TRect; Opaque: boolean);
begin
if self = nil then
exit;
if Opaque then
DataDrawOpaque(ACanvas, Rect, Data, FLineOrder, FWidth, FHeight)
else
begin
LoadFromBitmapIfNeeded;
if Empty then
exit;
ACanvas.StretchDraw(Rect, Bitmap);
end;
end;
{---------------------------- Line primitives ---------------------------------}
function TBGRADefaultBitmap.CheckHorizLineBounds(var x,y,x2: int32or64): boolean; inline;
var
temp: int32or64;
begin
if (x2 < x) then
begin
temp := x;
x := x2;
x2 := temp;
end;
if (x >= FClipRect.Right) or (x2 < FClipRect.Left) or (y < FClipRect.Top) or (y >= FClipRect.Bottom) then
begin
result := false;
exit;
end;
if x < FClipRect.Left then
x := FClipRect.Left;
if x2 >= FClipRect.Right then
x2 := FClipRect.Right - 1;
result := true;
end;
procedure TBGRADefaultBitmap.SetHorizLine(x, y, x2: int32or64; c: TBGRAPixel);
begin
if not CheckHorizLineBounds(x,y,x2) then exit;
FillInline(scanline[y] + x, c, x2 - x + 1);
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.XorHorizLine(x, y, x2: int32or64; c: TBGRAPixel);
begin
if not CheckHorizLineBounds(x,y,x2) then exit;
XorInline(scanline[y] + x, c, x2 - x + 1);
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.DrawHorizLine(x, y, x2: int32or64; c: TBGRAPixel);
begin
if not CheckHorizLineBounds(x,y,x2) then exit;
DrawPixelsInline(scanline[y] + x, c, x2 - x + 1);
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.DrawHorizLine(x, y, x2: int32or64; ec: TExpandedPixel
);
begin
if not CheckHorizLineBounds(x,y,x2) then exit;
DrawExpandedPixelsInline(scanline[y] + x, ec, x2 - x + 1);
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.DrawHorizLine(x, y, x2: int32or64;
texture: IBGRAScanner);
begin
if not CheckHorizLineBounds(x,y,x2) then exit;
texture.ScanMoveTo(x,y);
ScannerPutPixels(texture,scanline[y] + x, x2 - x + 1,dmDrawWithTransparency);
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.FastBlendHorizLine(x, y, x2: int32or64; c: TBGRAPixel);
begin
if not CheckHorizLineBounds(x,y,x2) then exit;
FastBlendPixelsInline(scanline[y] + x, c, x2 - x + 1);
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.AlphaHorizLine(x, y, x2: int32or64; alpha: byte);
begin
if alpha = 0 then
begin
SetHorizLine(x, y, x2, BGRAPixelTransparent);
exit;
end;
if not CheckHorizLineBounds(x,y,x2) then exit;
AlphaFillInline(scanline[y] + x, alpha, x2 - x + 1);
InvalidateBitmap;
end;
function TBGRADefaultBitmap.CheckVertLineBounds(var x,y,y2: int32or64; out delta: int32or64): boolean; inline;
var
temp: int32or64;
begin
if FLineOrder = riloBottomToTop then
delta := -Width
else
delta := Width;
if (y2 < y) then
begin
temp := y;
y := y2;
y2 := temp;
end;
if y < FClipRect.Top then
y := FClipRect.Top;
if y2 >= FClipRect.Bottom then
y2 := FClipRect.Bottom - 1;
if (y >= FClipRect.Bottom) or (y2 < FClipRect.Top) or (x < FClipRect.Left) or (x >= FClipRect.Right) then
begin
result := false;
exit;
end;
result := true;
end;
procedure TBGRADefaultBitmap.SetVertLine(x, y, y2: int32or64; c: TBGRAPixel);
var
n, delta: int32or64;
p: PBGRAPixel;
begin
if not CheckVertLineBounds(x,y,y2,delta) then exit;
p := scanline[y] + x;
for n := y2 - y downto 0 do
begin
p^ := c;
Inc(p, delta);
end;
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.XorVertLine(x, y, y2: int32or64; c: TBGRAPixel);
var
n, delta: int32or64;
p: PBGRAPixel;
begin
if not CheckVertLineBounds(x,y,y2,delta) then exit;
p := scanline[y] + x;
for n := y2 - y downto 0 do
begin
PDword(p)^ := PDword(p)^ xor DWord(c);
Inc(p, delta);
end;
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.DrawVertLine(x, y, y2: int32or64; c: TBGRAPixel);
var
n, delta: int32or64;
p: PBGRAPixel;
begin
if c.alpha = 255 then
begin
SetVertLine(x,y,y2,c);
exit;
end;
if not CheckVertLineBounds(x,y,y2,delta) or (c.alpha=0) then exit;
p := scanline[y] + x;
for n := y2 - y downto 0 do
begin
DrawPixelInlineNoAlphaCheck(p, c);
Inc(p, delta);
end;
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.AlphaVertLine(x, y, y2: int32or64; alpha: byte);
var
n, delta: int32or64;
p: PBGRAPixel;
begin
if alpha = 0 then
begin
SetVertLine(x, y, y2, BGRAPixelTransparent);
exit;
end;
if not CheckVertLineBounds(x,y,y2,delta) then exit;
p := scanline[y] + x;
for n := y2 - y downto 0 do
begin
p^.alpha := alpha;
Inc(p, delta);
end;
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.FastBlendVertLine(x, y, y2: int32or64; c: TBGRAPixel);
var
n, delta: int32or64;
p: PBGRAPixel;
begin
if not CheckVertLineBounds(x,y,y2,delta) then exit;
p := scanline[y] + x;
for n := y2 - y downto 0 do
begin
FastBlendPixelInline(p, c);
Inc(p, delta);
end;
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.DrawHorizLineDiff(x, y, x2: int32or64;
c, compare: TBGRAPixel; maxDiff: byte);
begin
if not CheckHorizLineBounds(x,y,x2) then exit;
DrawPixelsInlineDiff(scanline[y] + x, c, x2 - x + 1, compare, maxDiff);
InvalidateBitmap;
end;
{---------------------------- Lines ---------------------------------}
{ Call appropriate functions }
procedure TBGRADefaultBitmap.DrawLine(x1, y1, x2, y2: integer;
c: TBGRAPixel; DrawLastPixel: boolean);
begin
BGRADrawLineAliased(self,x1,y1,x2,y2,c,DrawLastPixel);
end;
procedure TBGRADefaultBitmap.DrawLineAntialias(x1, y1, x2, y2: integer;
c: TBGRAPixel; DrawLastPixel: boolean);
begin
BGRADrawLineAntialias(self,x1,y1,x2,y2,c,DrawLastPixel,LinearAntialiasing);
end;
procedure TBGRADefaultBitmap.DrawLineAntialias(x1, y1, x2, y2: integer;
c1, c2: TBGRAPixel; dashLen: integer; DrawLastPixel: boolean);
var DashPos: integer;
begin
DashPos := 0;
BGRADrawLineAntialias(self,x1,y1,x2,y2,c1,c2,dashLen,DrawLastPixel,DashPos,LinearAntialiasing);
end;
procedure TBGRADefaultBitmap.DrawLineAntialias(x1, y1, x2, y2: integer; c1,
c2: TBGRAPixel; dashLen: integer; DrawLastPixel: boolean; var DashPos: integer);
begin
BGRADrawLineAntialias(self,x1,y1,x2,y2,c1,c2,dashLen,DrawLastPixel,DashPos,LinearAntialiasing);
end;
procedure TBGRADefaultBitmap.DrawLineAntialias(x1, y1, x2, y2: single;
c: TBGRAPixel; w: single);
begin
BGRAPolyLine(self,[PointF(x1,y1),PointF(x2,y2)],w,c,LineCap,JoinStyle,FCustomPenStyle,[],nil,JoinMiterLimit);
end;
procedure TBGRADefaultBitmap.DrawLineAntialias(x1, y1, x2, y2: single;
texture: IBGRAScanner; w: single);
begin
BGRAPolyLine(self,[PointF(x1,y1),PointF(x2,y2)],w,BGRAPixelTransparent,LineCap,JoinStyle,FCustomPenStyle,[],texture,JoinMiterLimit);
end;
procedure TBGRADefaultBitmap.DrawLineAntialias(x1, y1, x2, y2: single;
c: TBGRAPixel; w: single; Closed: boolean);
var
options: TBGRAPolyLineOptions;
begin
if not closed then options := [plRoundCapOpen] else options := [];
BGRAPolyLine(self,[PointF(x1,y1),PointF(x2,y2)],w,c,pecRound,pjsRound,FCustomPenStyle,options,nil,JoinMiterLimit);
end;
procedure TBGRADefaultBitmap.DrawLineAntialias(x1, y1, x2, y2: single;
texture: IBGRAScanner; w: single; Closed: boolean);
var
options: TBGRAPolyLineOptions;
c: TBGRAPixel;
begin
if not closed then
begin
options := [plRoundCapOpen];
c := BGRAWhite; //needed for alpha junction
end else
begin
options := [];
c := BGRAPixelTransparent;
end;
BGRAPolyLine(self,[PointF(x1,y1),PointF(x2,y2)],w,c,pecRound,pjsRound,FCustomPenStyle,options,texture,JoinMiterLimit);
end;
procedure TBGRADefaultBitmap.DrawPolyLineAntialias(const points: array of TPointF;
c: TBGRAPixel; w: single);
begin
BGRAPolyLine(self,points,w,c,LineCap,JoinStyle,FCustomPenStyle,[],nil,JoinMiterLimit);
end;
procedure TBGRADefaultBitmap.DrawPolyLineAntialias(
const points: array of TPointF; texture: IBGRAScanner; w: single);
begin
BGRAPolyLine(self,points,w,BGRAPixelTransparent,LineCap,JoinStyle,FCustomPenStyle,[],texture,JoinMiterLimit);
end;
procedure TBGRADefaultBitmap.DrawPolyLineAntialias(const points: array of TPointF;
c: TBGRAPixel; w: single; Closed: boolean);
var
options: TBGRAPolyLineOptions;
begin
if not closed then options := [plRoundCapOpen] else options := [];
BGRAPolyLine(self,points,w,c,pecRound,JoinStyle,FCustomPenStyle,options,nil,JoinMiterLimit);
end;
procedure TBGRADefaultBitmap.DrawPolygonAntialias(const points: array of TPointF;
c: TBGRAPixel; w: single);
begin
BGRAPolyLine(self,points,w,c,LineCap,JoinStyle,FCustomPenStyle,[plCycle],nil,JoinMiterLimit);
end;
procedure TBGRADefaultBitmap.DrawPolygonAntialias(
const points: array of TPointF; texture: IBGRAScanner; w: single);
begin
BGRAPolyLine(self,points,w,BGRAPixelTransparent,LineCap,JoinStyle,FCustomPenStyle,[plCycle],texture,JoinMiterLimit);
end;
procedure TBGRADefaultBitmap.EraseLine(x1, y1, x2, y2: integer; alpha: byte;
DrawLastPixel: boolean);
begin
BGRAEraseLineAliased(self,x1,y1,x2,y2,alpha,DrawLastPixel);
end;
procedure TBGRADefaultBitmap.EraseLineAntialias(x1, y1, x2, y2: integer;
alpha: byte; DrawLastPixel: boolean);
begin
BGRAEraseLineAntialias(self,x1,y1,x2,y2,alpha,DrawLastPixel);
end;
procedure TBGRADefaultBitmap.EraseLineAntialias(x1, y1, x2, y2: single;
alpha: byte; w: single; Closed: boolean);
begin
FEraseMode := True;
DrawLineAntialias(x1, y1, x2, y2, BGRA(0, 0, 0, alpha), w, Closed);
FEraseMode := False;
end;
procedure TBGRADefaultBitmap.ErasePolyLineAntialias(const points: array of TPointF;
alpha: byte; w: single);
begin
FEraseMode := True;
DrawPolyLineAntialias(points, BGRA(0,0,0,alpha),w);
FEraseMode := False;
end;
{------------------------ Shapes ----------------------------------------------}
{ Call appropriate functions }
procedure TBGRADefaultBitmap.FillTriangleLinearColor(pt1, pt2, pt3: TPointF;
c1, c2, c3: TBGRAPixel);
begin
FillPolyLinearColor([pt1,pt2,pt3],[c1,c2,c3]);
end;
procedure TBGRADefaultBitmap.FillTriangleLinearColorAntialias(pt1, pt2,
pt3: TPointF; c1, c2, c3: TBGRAPixel);
var
grad: TBGRAGradientTriangleScanner;
begin
grad := TBGRAGradientTriangleScanner.Create(pt1,pt2,pt3, c1,c2,c3);
FillPolyAntialias([pt1,pt2,pt3],grad);
grad.Free;
end;
procedure TBGRADefaultBitmap.FillTriangleLinearMapping(pt1, pt2, pt3: TPointF;
texture: IBGRAScanner; tex1, tex2, tex3: TPointF; TextureInterpolation: Boolean= True);
begin
FillPolyLinearMapping([pt1,pt2,pt3],texture,[tex1,tex2,tex3],TextureInterpolation);
end;
procedure TBGRADefaultBitmap.FillTriangleLinearMappingLightness(pt1, pt2,
pt3: TPointF; texture: IBGRAScanner; tex1, tex2, tex3: TPointF; light1,
light2, light3: word; TextureInterpolation: Boolean);
begin
FillPolyLinearMappingLightness([pt1,pt2,pt3],texture,[tex1,tex2,tex3],[light1,light2,light3],TextureInterpolation);
end;
procedure TBGRADefaultBitmap.FillTriangleLinearMappingAntialias(pt1, pt2,
pt3: TPointF; texture: IBGRAScanner; tex1, tex2, tex3: TPointF);
var
mapping: TBGRATriangleLinearMapping;
begin
mapping := TBGRATriangleLinearMapping.Create(texture, pt1,pt2,pt3, tex1, tex2, tex3);
FillPolyAntialias([pt1,pt2,pt3],mapping);
mapping.Free;
end;
procedure TBGRADefaultBitmap.FillQuadLinearColor(pt1, pt2, pt3, pt4: TPointF;
c1, c2, c3, c4: TBGRAPixel);
var
center: TPointF;
centerColor: TBGRAPixel;
multi: TBGRAMultishapeFiller;
begin
if not IsConvex([pt1,pt2,pt3,pt4]) then //need to merge colors
begin
multi := TBGRAMultishapeFiller.Create;
multi.AddQuadLinearColor(pt1,pt2,pt3,pt4,c1,c2,c3,c4);
multi.Antialiasing:= false;
multi.Draw(self);
multi.Free;
exit;
end;
center := (pt1+pt2+pt3+pt4)*(1/4);
centerColor := GammaCompression( MergeBGRA(MergeBGRA(GammaExpansion(c1),GammaExpansion(c2)),
MergeBGRA(GammaExpansion(c3),GammaExpansion(c4))) );
FillTriangleLinearColor(pt1,pt2,center, c1,c2,centerColor);
FillTriangleLinearColor(pt2,pt3,center, c2,c3,centerColor);
FillTriangleLinearColor(pt3,pt4,center, c3,c4,centerColor);
FillTriangleLinearColor(pt4,pt1,center, c4,c1,centerColor);
end;
procedure TBGRADefaultBitmap.FillQuadLinearColorAntialias(pt1, pt2, pt3,
pt4: TPointF; c1, c2, c3, c4: TBGRAPixel);
var multi : TBGRAMultishapeFiller;
begin
multi := TBGRAMultishapeFiller.Create;
multi.AddQuadLinearColor(pt1, pt2, pt3, pt4, c1, c2, c3, c4);
multi.Draw(self);
multi.free;
end;
procedure TBGRADefaultBitmap.FillQuadLinearMapping(pt1, pt2, pt3, pt4: TPointF;
texture: IBGRAScanner; tex1, tex2, tex3, tex4: TPointF; TextureInterpolation: Boolean= True);
var
center: TPointF;
centerTex: TPointF;
begin
center := (pt1+pt2+pt3+pt4)*(1/4);
centerTex := (tex1+tex2+tex3+tex4)*(1/4);
FillTriangleLinearMapping(pt1,pt2,center, texture,tex1,tex2,centerTex, TextureInterpolation);
FillTriangleLinearMapping(pt2,pt3,center, texture,tex2,tex3,centerTex, TextureInterpolation);
FillTriangleLinearMapping(pt3,pt4,center, texture,tex3,tex4,centerTex, TextureInterpolation);
FillTriangleLinearMapping(pt4,pt1,center, texture,tex4,tex1,centerTex, TextureInterpolation);
end;
procedure TBGRADefaultBitmap.FillQuadLinearMappingLightness(pt1, pt2, pt3,
pt4: TPointF; texture: IBGRAScanner; tex1, tex2, tex3, tex4: TPointF; light1,
light2, light3, light4: word; TextureInterpolation: Boolean);
var
center: TPointF;
centerTex: TPointF;
centerLight: word;
begin
center := (pt1+pt2+pt3+pt4)*(1/4);
centerTex := (tex1+tex2+tex3+tex4)*(1/4);
centerLight := (light1+light2+light3+light4) div 4;
FillTriangleLinearMappingLightness(pt1,pt2,center, texture,tex1,tex2,centerTex, light1,light2,centerLight, TextureInterpolation);
FillTriangleLinearMappingLightness(pt2,pt3,center, texture,tex2,tex3,centerTex, light2,light3,centerLight, TextureInterpolation);
FillTriangleLinearMappingLightness(pt3,pt4,center, texture,tex3,tex4,centerTex, light3,light4,centerLight, TextureInterpolation);
FillTriangleLinearMappingLightness(pt4,pt1,center, texture,tex4,tex1,centerTex, light4,light1,centerLight, TextureInterpolation);
end;
procedure TBGRADefaultBitmap.FillQuadLinearMappingAntialias(pt1, pt2, pt3,
pt4: TPointF; texture: IBGRAScanner; tex1, tex2, tex3, tex4: TPointF);
var multi : TBGRAMultishapeFiller;
begin
multi := TBGRAMultishapeFiller.Create;
multi.AddQuadLinearMapping(pt1, pt2, pt3, pt4, texture, tex1,tex2,tex3,tex4);
multi.Draw(self);
multi.free;
end;
procedure TBGRADefaultBitmap.FillQuadPerspectiveMapping(pt1, pt2, pt3,
pt4: TPointF; texture: IBGRAScanner; tex1, tex2, tex3, tex4: TPointF);
var
persp: TBGRAPerspectiveScannerTransform;
begin
persp := TBGRAPerspectiveScannerTransform.Create(texture,[tex1,tex2,tex3,tex4],[pt1,pt2,pt3,pt4]);
FillPoly([pt1,pt2,pt3,pt4],persp,dmDrawWithTransparency);
persp.Free;
end;
procedure TBGRADefaultBitmap.FillQuadPerspectiveMapping(pt1, pt2, pt3,
pt4: TPointF; texture: IBGRAScanner; tex1, tex2, tex3, tex4: TPointF;
ACleanBorders: TRect);
var
persp: TBGRAPerspectiveScannerTransform;
clean: TBGRAExtendedBorderScanner;
begin
clean := TBGRAExtendedBorderScanner.Create(texture,ACleanBorders);
persp := TBGRAPerspectiveScannerTransform.Create(clean,[tex1,tex2,tex3,tex4],[pt1,pt2,pt3,pt4]);
FillPoly([pt1,pt2,pt3,pt4],persp,dmDrawWithTransparency);
persp.Free;
clean.Free;
end;
procedure TBGRADefaultBitmap.FillQuadPerspectiveMappingAntialias(pt1, pt2, pt3,
pt4: TPointF; texture: IBGRAScanner; tex1, tex2, tex3, tex4: TPointF);
var
persp: TBGRAPerspectiveScannerTransform;
begin
persp := TBGRAPerspectiveScannerTransform.Create(texture,[tex1,tex2,tex3,tex4],[pt1,pt2,pt3,pt4]);
FillPolyAntialias([pt1,pt2,pt3,pt4],persp);
persp.Free;
end;
procedure TBGRADefaultBitmap.FillQuadPerspectiveMappingAntialias(pt1, pt2, pt3,
pt4: TPointF; texture: IBGRAScanner; tex1, tex2, tex3, tex4: TPointF;
ACleanBorders: TRect);
var
persp: TBGRAPerspectiveScannerTransform;
clean: TBGRAExtendedBorderScanner;
begin
clean := TBGRAExtendedBorderScanner.Create(texture,ACleanBorders);
persp := TBGRAPerspectiveScannerTransform.Create(clean,[tex1,tex2,tex3,tex4],[pt1,pt2,pt3,pt4]);
FillPolyAntialias([pt1,pt2,pt3,pt4],persp);
persp.Free;
clean.Free;
end;
procedure TBGRADefaultBitmap.FillPolyLinearMapping(const points: array of TPointF;
texture: IBGRAScanner; texCoords: array of TPointF;
TextureInterpolation: Boolean);
begin
PolygonLinearTextureMappingAliased(self,points,texture,texCoords,TextureInterpolation, FillMode = fmWinding);
end;
procedure TBGRADefaultBitmap.FillPolyLinearMappingLightness(
const points: array of TPointF; texture: IBGRAScanner;
texCoords: array of TPointF; lightnesses: array of word;
TextureInterpolation: Boolean);
begin
PolygonLinearTextureMappingAliasedWithLightness(self,points,texture,texCoords,TextureInterpolation,lightnesses,FillMode = fmWinding);
end;
procedure TBGRADefaultBitmap.FillPolyLinearColor(
const points: array of TPointF; AColors: array of TBGRAPixel);
begin
PolygonLinearColorGradientAliased(self,points,AColors, FillMode = fmWinding);
end;
procedure TBGRADefaultBitmap.FillPolyPerspectiveMapping(
const points: array of TPointF; const pointsZ: array of single;
texture: IBGRAScanner; texCoords: array of TPointF;
TextureInterpolation: Boolean; zbuffer: psingle);
begin
PolygonPerspectiveTextureMappingAliased(self,points,pointsZ,texture,texCoords,TextureInterpolation, FillMode = fmWinding, zbuffer);
end;
procedure TBGRADefaultBitmap.FillPolyPerspectiveMappingLightness(
const points: array of TPointF; const pointsZ: array of single;
texture: IBGRAScanner; texCoords: array of TPointF;
lightnesses: array of word; TextureInterpolation: Boolean; zbuffer: psingle);
begin
PolygonPerspectiveTextureMappingAliasedWithLightness(self,points,pointsZ,texture,texCoords,TextureInterpolation,lightnesses, FillMode = fmWinding, zbuffer);
end;
procedure TBGRADefaultBitmap.FillPoly(const points: array of TPointF;
c: TBGRAPixel; drawmode: TDrawMode);
begin
BGRAPolygon.FillPolyAliased(self, points, c, FEraseMode, FillMode = fmWinding, drawmode);
end;
procedure TBGRADefaultBitmap.FillPoly(const points: array of TPointF;
texture: IBGRAScanner; drawmode: TDrawMode);
begin
BGRAPolygon.FillPolyAliasedWithTexture(self, points, texture, FillMode = fmWinding, drawmode);
end;
procedure TBGRADefaultBitmap.EraseLineAntialias(x1, y1, x2, y2: single;
alpha: byte; w: single);
begin
FEraseMode := True;
DrawLineAntialias(x1,y1,x2,y2, BGRA(0,0,0,alpha),w);
FEraseMode := False;
end;
procedure TBGRADefaultBitmap.FillPolyAntialias(const points: array of TPointF; c: TBGRAPixel);
begin
BGRAPolygon.FillPolyAntialias(self, points, c, FEraseMode, FillMode = fmWinding, LinearAntialiasing);
end;
procedure TBGRADefaultBitmap.FillPolyAntialias(const points: array of TPointF;
texture: IBGRAScanner);
begin
BGRAPolygon.FillPolyAntialiasWithTexture(self, points, texture, FillMode = fmWinding, LinearAntialiasing);
end;
procedure TBGRADefaultBitmap.ErasePoly(const points: array of TPointF;
alpha: byte);
begin
BGRAPolygon.FillPolyAliased(self, points, BGRA(0, 0, 0, alpha), True, FillMode = fmWinding, dmDrawWithTransparency);
end;
procedure TBGRADefaultBitmap.ErasePolyAntialias(const points: array of TPointF; alpha: byte);
begin
FEraseMode := True;
FillPolyAntialias(points, BGRA(0, 0, 0, alpha));
FEraseMode := False;
end;
procedure TBGRADefaultBitmap.FillShape(shape: TBGRACustomFillInfo; c: TBGRAPixel;
drawmode: TDrawMode);
begin
BGRAPolygon.FillShapeAliased(self, shape, c, FEraseMode, nil, FillMode = fmWinding, drawmode);
end;
procedure TBGRADefaultBitmap.FillShape(shape: TBGRACustomFillInfo;
texture: IBGRAScanner; drawmode: TDrawMode);
begin
BGRAPolygon.FillShapeAliased(self, shape, BGRAPixelTransparent, false, texture, FillMode = fmWinding, drawmode);
end;
procedure TBGRADefaultBitmap.FillShapeAntialias(shape: TBGRACustomFillInfo;
c: TBGRAPixel);
begin
BGRAPolygon.FillShapeAntialias(self, shape, c, FEraseMode, nil, FillMode = fmWinding, LinearAntialiasing);
end;
procedure TBGRADefaultBitmap.FillShapeAntialias(shape: TBGRACustomFillInfo;
texture: IBGRAScanner);
begin
BGRAPolygon.FillShapeAntialiasWithTexture(self, shape, texture, FillMode = fmWinding, LinearAntialiasing);
end;
procedure TBGRADefaultBitmap.EraseShape(shape: TBGRACustomFillInfo; alpha: byte);
begin
BGRAPolygon.FillShapeAliased(self, shape, BGRA(0, 0, 0, alpha), True, nil, FillMode = fmWinding, dmDrawWithTransparency);
end;
procedure TBGRADefaultBitmap.EraseShapeAntialias(shape: TBGRACustomFillInfo;
alpha: byte);
begin
FEraseMode := True;
FillShapeAntialias(shape, BGRA(0, 0, 0, alpha));
FEraseMode := False;
end;
procedure TBGRADefaultBitmap.EllipseAntialias(x, y, rx, ry: single;
c: TBGRAPixel; w: single);
begin
if IsClearPenStyle(FCustomPenStyle) or (c.alpha = 0) then exit;
if IsSolidPenStyle(FCustomPenStyle) then
BGRAPolygon.BorderEllipseAntialias(self, x, y, rx, ry, w, c, FEraseMode, LinearAntialiasing)
else
DrawPolygonAntialias(ComputeEllipseContour(x,y,rx,ry),c,w);
end;
procedure TBGRADefaultBitmap.EllipseAntialias(x, y, rx, ry: single;
texture: IBGRAScanner; w: single);
begin
if IsClearPenStyle(FCustomPenStyle) then exit;
if IsSolidPenStyle(FCustomPenStyle) then
BGRAPolygon.BorderEllipseAntialiasWithTexture(self, x, y, rx, ry, w, texture, LinearAntialiasing)
else
DrawPolygonAntialias(ComputeEllipseContour(x,y,rx,ry),texture,w);
end;
procedure TBGRADefaultBitmap.EllipseAntialias(x, y, rx, ry: single;
c: TBGRAPixel; w: single; back: TBGRAPixel);
var multi: TBGRAMultishapeFiller;
hw: single;
begin
if w=0 then exit;
rx := abs(rx);
ry := abs(ry);
hw := w/2;
if (rx <= hw) or (ry <= hw) then
begin
FillEllipseAntialias(x,y,rx+hw,ry+hw,c);
exit;
end;
{ use multishape filler for fine junction between polygons }
multi := TBGRAMultishapeFiller.Create;
if not IsClearPenStyle(FCustomPenStyle) and (c.alpha <> 0) then
begin
if IsSolidPenStyle(FCustomPenStyle) then
begin
multi.AddEllipse(x,y,rx-hw,ry-hw,back);
multi.AddEllipseBorder(x,y,rx,ry,w,c)
end
else
begin
multi.AddEllipse(x,y,rx,ry,back);
multi.AddPolygon(ComputeWidePolygon(ComputeEllipseContour(x,y,rx,ry),w),c);
multi.PolygonOrder := poLastOnTop;
end;
end;
multi.Draw(self);
multi.Free;
end;
procedure TBGRADefaultBitmap.FillEllipseAntialias(x, y, rx, ry: single; c: TBGRAPixel);
begin
BGRAPolygon.FillEllipseAntialias(self, x, y, rx, ry, c, FEraseMode, LinearAntialiasing);
end;
procedure TBGRADefaultBitmap.FillEllipseAntialias(x, y, rx, ry: single;
texture: IBGRAScanner);
begin
BGRAPolygon.FillEllipseAntialiasWithTexture(self, x, y, rx, ry, texture, LinearAntialiasing);
end;
procedure TBGRADefaultBitmap.FillEllipseLinearColorAntialias(x, y, rx,
ry: single; outercolor, innercolor: TBGRAPixel);
var
grad: TBGRAGradientScanner;
affine: TBGRAAffineScannerTransform;
begin
if (rx=0) or (ry=0) then exit;
if rx=ry then
begin
grad := TBGRAGradientScanner.Create(innercolor,outercolor,gtRadial,PointF(x,y),PointF(x+rx,y),True);
FillEllipseAntialias(x,y,rx,ry,grad);
grad.Free;
end else
begin
grad := TBGRAGradientScanner.Create(innercolor,outercolor,gtRadial,PointF(0,0),PointF(1,0),True);
affine := TBGRAAffineScannerTransform.Create(grad);
affine.Scale(rx,ry);
affine.Translate(x,y);
FillEllipseAntialias(x,y,rx,ry,affine);
affine.Free;
grad.Free;
end;
end;
procedure TBGRADefaultBitmap.EraseEllipseAntialias(x, y, rx, ry: single; alpha: byte);
begin
FEraseMode := True;
FillEllipseAntialias(x, y, rx, ry, BGRA(0, 0, 0, alpha));
FEraseMode := False;
end;
procedure TBGRADefaultBitmap.RectangleAntialias(x, y, x2, y2: single;
c: TBGRAPixel; w: single; back: TBGRAPixel);
var
bevel: single;
multi: TBGRAMultishapeFiller;
hw: single;
begin
if IsClearPenStyle(FCustomPenStyle) or (c.alpha=0) or (w=0) then
begin
if back <> BGRAPixelTransparent then
FillRectAntialias(x,y,x2,y2,back);
exit;
end;
hw := w/2;
if not CheckAntialiasRectBounds(x,y,x2,y2,w) then
begin
if JoinStyle = pjsBevel then
begin
bevel := (2-sqrt(2))*hw;
FillRoundRectAntialias(x - hw, y - hw, x2 + hw, y2 + hw, bevel,bevel, c, [rrTopLeftBevel, rrTopRightBevel, rrBottomLeftBevel, rrBottomRightBevel]);
end else
if JoinStyle = pjsRound then
FillRoundRectAntialias(x - hw, y - hw, x2 + hw, y2 + hw, hw,hw, c)
else
FillRectAntialias(x - hw, y - hw, x2 + hw, y2 + hw, c);
exit;
end;
{ use multishape filler for fine junction between polygons }
multi := TBGRAMultishapeFiller.Create;
multi.FillMode := FillMode;
if (JoinStyle = pjsMiter) and IsSolidPenStyle(FCustomPenStyle) then
multi.AddRectangleBorder(x,y,x2,y2,w,c)
else
multi.AddPolygon(ComputeWidePolygon([Pointf(x,y),Pointf(x2,y),Pointf(x2,y2),Pointf(x,y2)],w),c);
if (frac(x + hw) = 0.5) and (frac(y + hw)=0.5) and (frac(x2 - hw)=0.5) and (frac(y2 - hw)=0.5) then
FillRect(ceil(x + hw), ceil(y + hw), ceil(x2 - hw), ceil(y2 - hw), back, dmDrawWithTransparency)
else
multi.AddRectangle(x + hw, y + hw, x2 - hw, y2 - hw, back);
multi.Draw(self);
multi.Free;
end;
procedure TBGRADefaultBitmap.RectangleAntialias(x, y, x2, y2: single;
texture: IBGRAScanner; w: single);
var
bevel,hw: single;
multi: TBGRAMultishapeFiller;
begin
if IsClearPenStyle(FCustomPenStyle) or (w=0) then exit;
hw := w/2;
if not CheckAntialiasRectBounds(x,y,x2,y2,w) then
begin
if JoinStyle = pjsBevel then
begin
bevel := (2-sqrt(2))*hw;
FillRoundRectAntialias(x - hw, y - hw, x2 + hw, y2 + hw, bevel,bevel, texture, [rrTopLeftBevel, rrTopRightBevel, rrBottomLeftBevel, rrBottomRightBevel]);
end else
if JoinStyle = pjsRound then
FillRoundRectAntialias(x - hw, y - hw, x2 + hw, y2 + hw, hw,hw, texture)
else
FillRectAntialias(x - hw, y - hw, x2 + hw, y2 + hw, texture);
exit;
end;
{ use multishape filler for fine junction between polygons }
multi := TBGRAMultishapeFiller.Create;
multi.FillMode := FillMode;
if (JoinStyle = pjsMiter) and IsSolidPenStyle(FCustomPenStyle) then
multi.AddRectangleBorder(x,y,x2,y2,w, texture)
else
multi.AddPolygon(ComputeWidePolygon([Pointf(x,y),Pointf(x2,y),Pointf(x2,y2),Pointf(x,y2)],w), texture);
multi.Draw(self);
multi.Free;
end;
procedure TBGRADefaultBitmap.RoundRectAntialias(x, y, x2, y2, rx, ry: single;
c: TBGRAPixel; w: single; options: TRoundRectangleOptions);
begin
if IsClearPenStyle(FCustomPenStyle) or (c.alpha = 0) then exit;
if IsSolidPenStyle(FCustomPenStyle) then
BGRAPolygon.BorderRoundRectangleAntialias(self,x,y,x2,y2,rx,ry,w,options,c,False, LinearAntialiasing)
else
DrawPolygonAntialias(BGRAPath.ComputeRoundRect(x,y,x2,y2,rx,ry,options),c,w);
end;
procedure TBGRADefaultBitmap.RoundRectAntialias(x, y, x2, y2, rx, ry: single;
pencolor: TBGRAPixel; w: single; fillcolor: TBGRAPixel;
options: TRoundRectangleOptions);
var
multi: TBGRAMultishapeFiller;
begin
if IsClearPenStyle(FCustomPenStyle) or (pencolor.alpha = 0) then
begin
FillRoundRectAntialias(x,y,x2,y2,rx,ry,fillColor,options);
exit;
end;
if IsSolidPenStyle(FCustomPenStyle) then
BGRAPolygon.BorderAndFillRoundRectangleAntialias(self,x,y,x2,y2,rx,ry,w,options,pencolor,fillcolor,nil,nil,False)
else
begin
multi := TBGRAMultishapeFiller.Create;
multi.PolygonOrder := poLastOnTop;
multi.AddRoundRectangle(x,y,x2,y2,rx,ry,fillColor,options);
multi.AddPolygon(ComputeWidePolygon(BGRAPath.ComputeRoundRect(x,y,x2,y2,rx,ry,options),w),pencolor);
multi.Draw(self);
multi.Free;
end;
end;
procedure TBGRADefaultBitmap.RoundRectAntialias(x, y, x2, y2, rx, ry: single;
penTexture: IBGRAScanner; w: single; fillTexture: IBGRAScanner;
options: TRoundRectangleOptions);
var
multi: TBGRAMultishapeFiller;
begin
if IsClearPenStyle(FCustomPenStyle) then
begin
FillRoundRectAntialias(x,y,x2,y2,rx,ry,fillTexture,options);
exit;
end else
if IsSolidPenStyle(FCustomPenStyle) then
BGRAPolygon.BorderAndFillRoundRectangleAntialias(self,x,y,x2,y2,rx,ry,w,options,BGRAPixelTransparent,BGRAPixelTransparent,pentexture,filltexture,False)
else
begin
multi := TBGRAMultishapeFiller.Create;
multi.PolygonOrder := poLastOnTop;
multi.AddRoundRectangle(x,y,x2,y2,rx,ry,fillTexture,options);
multi.AddPolygon(ComputeWidePolygon(ComputeRoundRect(x,y,x2,y2,rx,ry,options),w),penTexture);
multi.Draw(self);
multi.Free;
end;
end;
procedure TBGRADefaultBitmap.RoundRectAntialias(x, y, x2, y2, rx, ry: single;
texture: IBGRAScanner; w: single; options: TRoundRectangleOptions);
begin
if IsClearPenStyle(FCustomPenStyle) then exit;
if IsSolidPenStyle(FCustomPenStyle) then
BGRAPolygon.BorderRoundRectangleAntialiasWithTexture(self,x,y,x2,y2,rx,ry,w,options,texture, LinearAntialiasing)
else
DrawPolygonAntialias(BGRAPath.ComputeRoundRect(x,y,x2,y2,rx,ry,options),texture,w);
end;
function TBGRADefaultBitmap.CheckRectBounds(var x, y, x2, y2: integer; minsize: integer): boolean; inline;
var
temp: integer;
begin
//swap coordinates if needed
if (x > x2) then
begin
temp := x;
x := x2;
x2 := temp;
end;
if (y > y2) then
begin
temp := y;
y := y2;
y2 := temp;
end;
if (x2 - x <= minsize) or (y2 - y <= minsize) then
begin
result := false;
exit;
end else
result := true;
end;
procedure TBGRADefaultBitmap.Rectangle(x, y, x2, y2: integer;
c: TBGRAPixel; mode: TDrawMode);
begin
if not CheckRectBounds(x,y,x2,y2,1) then exit;
case mode of
dmFastBlend:
begin
FastBlendHorizLine(x, y, x2 - 1, c);
FastBlendHorizLine(x, y2 - 1, x2 - 1, c);
if y2 - y > 2 then
begin
FastBlendVertLine(x, y + 1, y2 - 2, c);
FastBlendVertLine(x2 - 1, y + 1, y2 - 2, c);
end;
end;
dmDrawWithTransparency:
begin
DrawHorizLine(x, y, x2 - 1, c);
DrawHorizLine(x, y2 - 1, x2 - 1, c);
if y2 - y > 2 then
begin
DrawVertLine(x, y + 1, y2 - 2, c);
DrawVertLine(x2 - 1, y + 1, y2 - 2, c);
end;
end;
dmSet:
begin
SetHorizLine(x, y, x2 - 1, c);
SetHorizLine(x, y2 - 1, x2 - 1, c);
if y2 - y > 2 then
begin
SetVertLine(x, y + 1, y2 - 2, c);
SetVertLine(x2 - 1, y + 1, y2 - 2, c);
end;
end;
dmXor:
begin
XorHorizLine(x, y, x2 - 1, c);
XorHorizLine(x, y2 - 1, x2 - 1, c);
if y2 - y > 2 then
begin
XorVertLine(x, y + 1, y2 - 2, c);
XorVertLine(x2 - 1, y + 1, y2 - 2, c);
end;
end;
dmSetExceptTransparent: if (c.alpha = 255) then
Rectangle(x, y, x2, y2, c, dmSet);
end;
end;
procedure TBGRADefaultBitmap.Rectangle(x, y, x2, y2: integer;
BorderColor, FillColor: TBGRAPixel; mode: TDrawMode);
begin
if not CheckRectBounds(x,y,x2,y2,1) then exit;
Rectangle(x, y, x2, y2, BorderColor, mode);
FillRect(x + 1, y + 1, x2 - 1, y2 - 1, FillColor, mode);
end;
function TBGRADefaultBitmap.CheckClippedRectBounds(var x, y, x2, y2: integer): boolean; inline;
var
temp: integer;
begin
if (x > x2) then
begin
temp := x;
x := x2;
x2 := temp;
end;
if (y > y2) then
begin
temp := y;
y := y2;
y2 := temp;
end;
if (x >= FClipRect.Right) or (x2 <= FClipRect.Left) or (y >= FClipRect.Bottom) or (y2 <= FClipRect.Top) then
begin
result := false;
exit;
end;
if x < FClipRect.Left then
x := FClipRect.Left;
if x2 > FClipRect.Right then
x2 := FClipRect.Right;
if y < FClipRect.Top then
y := FClipRect.Top;
if y2 > FClipRect.Bottom then
y2 := FClipRect.Bottom;
if (x2 - x <= 0) or (y2 - y <= 0) then
begin
result := false;
exit;
end else
result := true;
end;
procedure TBGRADefaultBitmap.FillRect(x, y, x2, y2: integer; c: TBGRAPixel;
mode: TDrawMode);
var
yb, tx, delta: integer;
p: PBGRAPixel;
begin
if not CheckClippedRectBounds(x,y,x2,y2) then exit;
tx := x2 - x;
Dec(x2);
Dec(y2);
if mode = dmSetExceptTransparent then
begin
if (c.alpha = 255) then
FillRect(x, y, x2, y2, c, dmSet);
end else
begin
if (mode <> dmSet) and (c.alpha = 0) then exit;
p := Scanline[y] + x;
if FLineOrder = riloBottomToTop then
delta := -Width
else
delta := Width;
case mode of
dmFastBlend:
for yb := y2 - y downto 0 do
begin
FastBlendPixelsInline(p, c, tx);
Inc(p, delta);
end;
dmDrawWithTransparency:
for yb := y2 - y downto 0 do
begin
DrawPixelsInline(p, c, tx);
Inc(p, delta);
end;
dmSet:
for yb := y2 - y downto 0 do
begin
FillInline(p, c, tx);
Inc(p, delta);
end;
dmXor:
for yb := y2 - y downto 0 do
begin
XorInline(p, c, tx);
Inc(p, delta);
end;
end;
InvalidateBitmap;
end;
end;
procedure TBGRADefaultBitmap.FillRect(x, y, x2, y2: integer;
texture: IBGRAScanner; mode: TDrawMode);
var
yb, tx, delta: integer;
p: PBGRAPixel;
begin
if not CheckClippedRectBounds(x,y,x2,y2) then exit;
tx := x2 - x;
Dec(x2);
Dec(y2);
p := Scanline[y] + x;
if FLineOrder = riloBottomToTop then
delta := -Width
else
delta := Width;
for yb := y to y2 do
begin
texture.ScanMoveTo(x,yb);
ScannerPutPixels(texture, p, tx, mode);
Inc(p, delta);
end;
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.AlphaFillRect(x, y, x2, y2: integer; alpha: byte);
var
yb, tx, delta: integer;
p: PBGRAPixel;
begin
if alpha = 0 then
begin
FillRect(x, y, x2, y2, BGRAPixelTransparent, dmSet);
exit;
end;
if not CheckClippedRectBounds(x,y,x2,y2) then exit;
tx := x2 - x;
Dec(x2);
Dec(y2);
p := Scanline[y] + x;
if FLineOrder = riloBottomToTop then
delta := -Width
else
delta := Width;
for yb := y2 - y downto 0 do
begin
AlphaFillInline(p, alpha, tx);
Inc(p, delta);
end;
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.FillRectAntialias(x, y, x2, y2: single; c: TBGRAPixel);
var tx,ty: single;
begin
tx := x2-x;
ty := y2-y;
if (tx=0) or (ty=0) then exit;
if (abs(tx) > 2) and (abs(ty) > 2) then
begin
if (tx < 0) then
begin
tx := -tx;
x := x2;
x2 := x+tx;
end;
if (ty < 0) then
begin
ty := -ty;
y := y2;
y2 := y+ty;
end;
FillRectAntialias(x,y,x2,ceil(y)+0.5,c);
FillRectAntialias(x,ceil(y)+0.5,ceil(x)+0.5,floor(y2)-0.5,c);
FillRectAntialias(floor(x2)-0.5,ceil(y)+0.5,x2,floor(y2)-0.5,c);
FillRectAntialias(x,floor(y2)-0.5,x2,y2,c);
FillRect(ceil(x)+1,ceil(y)+1,floor(x2),floor(y2),c,dmDrawWithTransparency);
end else
FillPolyAntialias([pointf(x, y), pointf(x2, y), pointf(x2, y2), pointf(x, y2)], c);
end;
procedure TBGRADefaultBitmap.EraseRectAntialias(x, y, x2, y2: single;
alpha: byte);
begin
ErasePolyAntialias([pointf(x, y), pointf(x2, y), pointf(x2, y2), pointf(x, y2)], alpha);
end;
procedure TBGRADefaultBitmap.FillRectAntialias(x, y, x2, y2: single;
texture: IBGRAScanner);
begin
FillPolyAntialias([pointf(x, y), pointf(x2, y), pointf(x2, y2), pointf(x, y2)], texture);
end;
procedure TBGRADefaultBitmap.FillRoundRectAntialias(x, y, x2, y2, rx,ry: single;
c: TBGRAPixel; options: TRoundRectangleOptions);
begin
BGRAPolygon.FillRoundRectangleAntialias(self,x,y,x2,y2,rx,ry,options,c,False, LinearAntialiasing);
end;
procedure TBGRADefaultBitmap.FillRoundRectAntialias(x, y, x2, y2, rx,
ry: single; texture: IBGRAScanner; options: TRoundRectangleOptions);
begin
BGRAPolygon.FillRoundRectangleAntialiasWithTexture(self,x,y,x2,y2,rx,ry,options,texture, LinearAntialiasing);
end;
procedure TBGRADefaultBitmap.EraseRoundRectAntialias(x, y, x2, y2, rx,
ry: single; alpha: byte; options: TRoundRectangleOptions);
begin
BGRAPolygon.FillRoundRectangleAntialias(self,x,y,x2,y2,rx,ry,options,BGRA(0,0,0,alpha),True, LinearAntialiasing);
end;
procedure TBGRADefaultBitmap.RoundRect(X1, Y1, X2, Y2: integer;
DX, DY: integer; BorderColor, FillColor: TBGRAPixel);
begin
BGRARoundRectAliased(self,X1,Y1,X2,Y2,DX,DY,BorderColor,FillColor);
end;
{------------------------- Text functions ---------------------------------------}
procedure TBGRADefaultBitmap.TextOutAngle(x, y: single; orientation: integer;
s: string; c: TBGRAPixel; align: TAlignment);
begin
FontRenderer.TextOutAngle(self,x,y,orientation,CleanTextOutString(s),c,align);
end;
procedure TBGRADefaultBitmap.TextOutAngle(x, y: single; orientation: integer;
s: string; texture: IBGRAScanner; align: TAlignment);
begin
FontRenderer.TextOutAngle(self,x,y,orientation,CleanTextOutString(s),texture,align);
end;
procedure TBGRADefaultBitmap.TextOut(x, y: single; s: string;
texture: IBGRAScanner; align: TAlignment);
begin
FontRenderer.TextOut(self,x,y,CleanTextOutString(s),texture,align);
end;
procedure TBGRADefaultBitmap.TextOut(x, y: single; s: string;
c: TBGRAPixel; align: TAlignment);
begin
FontRenderer.TextOut(self,x,y,CleanTextOutString(s),c,align);
end;
procedure TBGRADefaultBitmap.TextRect(ARect: TRect; x, y: integer;
s: string; style: TTextStyle; c: TBGRAPixel);
begin
FontRenderer.TextRect(self,ARect,x,y,s,style,c);
end;
procedure TBGRADefaultBitmap.TextRect(ARect: TRect; x, y: integer; s: string;
style: TTextStyle; texture: IBGRAScanner);
begin
FontRenderer.TextRect(self,ARect,x,y,s,style,texture);
end;
function TBGRADefaultBitmap.TextSize(s: string): TSize;
begin
result := FontRenderer.TextSize(s);
end;
{---------------------------- Curves ----------------------------------------}
function TBGRADefaultBitmap.ComputeClosedSpline(const APoints: array of TPointF; AStyle: TSplineStyle): ArrayOfTPointF;
begin
result := BGRAPath.ComputeClosedSpline(APoints, AStyle);
end;
function TBGRADefaultBitmap.ComputeOpenedSpline(const APoints: array of TPointF; AStyle: TSplineStyle): ArrayOfTPointF;
begin
result := BGRAPath.ComputeOpenedSpline(APoints, AStyle);
end;
function TBGRADefaultBitmap.ComputeBezierCurve(const ACurve: TCubicBezierCurve
): ArrayOfTPointF;
begin
Result:= BGRAPath.ComputeBezierCurve(ACurve);
end;
function TBGRADefaultBitmap.ComputeBezierCurve(
const ACurve: TQuadraticBezierCurve): ArrayOfTPointF;
begin
Result:= BGRAPath.ComputeBezierCurve(ACurve);
end;
function TBGRADefaultBitmap.ComputeBezierSpline(
const ASpline: array of TCubicBezierCurve): ArrayOfTPointF;
begin
Result:= BGRAPath.ComputeBezierSpline(ASpline);
end;
function TBGRADefaultBitmap.ComputeBezierSpline(
const ASpline: array of TQuadraticBezierCurve): ArrayOfTPointF;
begin
Result:= BGRAPath.ComputeBezierSpline(ASpline);
end;
function TBGRADefaultBitmap.ComputeWidePolyline(const points: array of TPointF;
w: single): ArrayOfTPointF;
begin
Result:= BGRAPen.ComputeWidePolylinePoints(points,w,BGRAWhite,LineCap,JoinStyle,FCustomPenStyle,[],JoinMiterLimit);
end;
function TBGRADefaultBitmap.ComputeWidePolyline(const points: array of TPointF;
w: single; Closed: boolean): ArrayOfTPointF;
var
options: TBGRAPolyLineOptions;
begin
if not closed then options := [plRoundCapOpen] else options := [];
Result:= BGRAPen.ComputeWidePolylinePoints(points,w,BGRAWhite,pecRound,pjsRound,FCustomPenStyle,options,JoinMiterLimit);
end;
function TBGRADefaultBitmap.ComputeWidePolygon(const points: array of TPointF;
w: single): ArrayOfTPointF;
begin
Result:= BGRAPen.ComputeWidePolylinePoints(points,w,BGRAWhite,LineCap,JoinStyle,FCustomPenStyle,[plCycle],JoinMiterLimit);
end;
function TBGRADefaultBitmap.ComputeEllipseContour(x, y, rx, ry: single; quality: single): ArrayOfTPointF;
begin
result := BGRAPath.ComputeEllipse(x,y,rx,ry, quality);
end;
function TBGRADefaultBitmap.ComputeEllipseBorder(x, y, rx, ry, w: single; quality: single): ArrayOfTPointF;
begin
result := ComputeWidePolygon(ComputeEllipseContour(x,y,rx,ry, quality),w);
end;
function TBGRADefaultBitmap.ComputeArc65536(x, y, rx, ry: single; start65536,
end65536: word; quality: single): ArrayOfTPointF;
begin
result := BGRAPath.ComputeArc65536(x,y,rx,ry,start65536,end65536,quality);
end;
function TBGRADefaultBitmap.ComputeArcRad(x, y, rx, ry: single; startRad,
endRad: single; quality: single): ArrayOfTPointF;
begin
result := BGRAPath.ComputeArcRad(x,y,rx,ry,startRad,endRad,quality);
end;
function TBGRADefaultBitmap.ComputeRoundRect(x1, y1, x2, y2, rx, ry: single; quality: single): ArrayOfTPointF;
begin
result := BGRAPath.ComputeRoundRect(x1,y1,x2,y2,rx,ry,quality);
end;
function TBGRADefaultBitmap.ComputeRoundRect(x1, y1, x2, y2, rx, ry: single;
options: TRoundRectangleOptions; quality: single): ArrayOfTPointF;
begin
Result:= BGRAPath.ComputeRoundRect(x1,y1,x2,y2,rx,ry,options,quality);
end;
function TBGRADefaultBitmap.ComputePie65536(x, y, rx, ry: single; start65536,
end65536: word; quality: single): ArrayOfTPointF;
begin
result := BGRAPath.ComputeArc65536(x,y,rx,ry,start65536,end65536,quality);
if (start65536 <> end65536) then
begin
setlength(result,length(result)+1);
result[high(result)] := PointF(x,y);
end;
end;
function TBGRADefaultBitmap.ComputePieRad(x, y, rx, ry: single; startRad,
endRad: single; quality: single): ArrayOfTPointF;
begin
result := self.ComputePie65536(x,y,rx,ry,round(startRad*32768/Pi),round(endRad*32768/Pi),quality);
end;
{---------------------------------- Fill ---------------------------------}
procedure TBGRADefaultBitmap.Fill(texture: IBGRAScanner);
begin
FillRect(FClipRect.Left,FClipRect.Top,FClipRect.Right,FClipRect.Bottom,texture,dmSet);
end;
procedure TBGRADefaultBitmap.Fill(c: TBGRAPixel; start, Count: integer);
begin
if start < 0 then
begin
Count += start;
start := 0;
end;
if start >= nbPixels then
exit;
if start + Count > nbPixels then
Count := nbPixels - start;
FillInline(Data + start, c, Count);
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.AlphaFill(alpha: byte; start, Count: integer);
begin
if alpha = 0 then
Fill(BGRAPixelTransparent, start, Count);
if start < 0 then
begin
Count += start;
start := 0;
end;
if start >= nbPixels then
exit;
if start + Count > nbPixels then
Count := nbPixels - start;
AlphaFillInline(Data + start, alpha, Count);
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.FillMask(x, y: integer; AMask: TBGRACustomBitmap;
color: TBGRAPixel);
var
scan: TBGRACustomScanner;
begin
if (AMask = nil) or (color.alpha = 0) then exit;
scan := TBGRASolidColorMaskScanner.Create(AMask,Point(-X,-Y),color);
self.FillRect(X,Y,X+AMask.Width,Y+AMask.Height,scan,dmDrawWithTransparency);
scan.Free;
end;
procedure TBGRADefaultBitmap.FillMask(x, y: integer; AMask: TBGRACustomBitmap;
texture: IBGRAScanner);
var
scan: TBGRACustomScanner;
begin
if AMask = nil then exit;
scan := TBGRATextureMaskScanner.Create(AMask,Point(-X,-Y),texture);
self.FillRect(X,Y,X+AMask.Width,Y+AMask.Height,scan,dmDrawWithTransparency);
scan.Free;
end;
procedure TBGRADefaultBitmap.FillClearTypeMask(x, y: integer; xThird: integer;
AMask: TBGRACustomBitmap; color: TBGRAPixel; ARGBOrder: boolean);
begin
BGRAFillClearTypeMask(self,x, y, xThird, AMask, color, nil, ARGBOrder);
end;
procedure TBGRADefaultBitmap.FillClearTypeMask(x, y: integer; xThird: integer;
AMask: TBGRACustomBitmap; texture: IBGRAScanner; ARGBOrder: boolean);
begin
BGRAFillClearTypeMask(self,x, y, xThird, AMask, BGRAPixelTransparent, texture, ARGBOrder);
end;
{ Replace color without taking alpha channel into account }
procedure TBGRADefaultBitmap.ReplaceColor(before, after: TColor);
var
p: PLongWord;
n: integer;
colorMask,beforeBGR, afterBGR: longword;
begin
colorMask := NtoLE($00FFFFFF);
beforeBGR := NtoLE((before and $FF shl 16) + (before and $FF00) + (before shr 16 and $FF));
afterBGR := NtoLE((after and $FF shl 16) + (after and $FF00) + (after shr 16 and $FF));
p := PLongWord(Data);
for n := NbPixels - 1 downto 0 do
begin
if p^ and colorMask = beforeBGR then
p^ := (p^ and not ColorMask) or afterBGR;
Inc(p);
end;
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.ReplaceColor(before, after: TBGRAPixel);
var
p: PBGRAPixel;
n: integer;
begin
if before.alpha = 0 then
begin
ReplaceTransparent(after);
exit;
end;
p := Data;
for n := NbPixels - 1 downto 0 do
begin
if p^ = before then
p^ := after;
Inc(p);
end;
InvalidateBitmap;
end;
{ Replace transparent pixels by the specified color }
procedure TBGRADefaultBitmap.ReplaceTransparent(after: TBGRAPixel);
var
p: PBGRAPixel;
n: integer;
begin
p := Data;
for n := NbPixels - 1 downto 0 do
begin
if p^.alpha = 0 then
p^ := after;
Inc(p);
end;
InvalidateBitmap;
end;
{ General purpose FloodFill. It can be used to fill inplace or to
fill a destination bitmap according to the content of the current bitmap.
The first pixel encountered is taken as a reference, further pixels
are compared to this pixel. If the distance between next colors and
the first color is lower than the tolerance, then the floodfill continues.
It uses an array of bits to store visited places to avoid filling twice
the same area. It also uses a stack of positions to remember where
to continue after a place is completely filled.
The first direction to be checked is horizontal, then
it checks pixels on the line above and on the line below. }
procedure TBGRADefaultBitmap.ParallelFloodFill(X, Y: integer;
Dest: TBGRACustomBitmap; Color: TBGRAPixel; mode: TFloodfillMode;
Tolerance: byte);
var
S: TBGRAPixel;
SX, EX, I: integer;
Added: boolean;
Visited: array of longword;
VisitedLineSize: integer;
Stack: array of integer;
StackCount: integer;
function CheckPixel(AX, AY: integer): boolean; inline;
var
ComparedColor: TBGRAPixel;
begin
if Visited[AX shr 5 + AY * VisitedLineSize] and (1 shl (AX and 31)) <> 0 then
Result := False
else
begin
ComparedColor := GetPixel(AX, AY);
Result := BGRADiff(ComparedColor, S) <= Tolerance;
end;
end;
procedure SetVisited(X1, AY, X2: integer);
var
StartMask, EndMask: longword;
StartPos, EndPos: integer;
begin
if X2 < X1 then
exit;
StartMask := $FFFFFFFF shl (X1 and 31);
if X2 and 31 = 31 then
EndMask := $FFFFFFFF
else
EndMask := 1 shl ((X2 and 31) + 1) - 1;
StartPos := X1 shr 5 + AY * VisitedLineSize;
EndPos := X2 shr 5 + AY * VisitedLineSize;
if StartPos = EndPos then
Visited[StartPos] := Visited[StartPos] or (StartMask and EndMask)
else
begin
Visited[StartPos] := Visited[StartPos] or StartMask;
Visited[EndPos] := Visited[EndPos] or EndMask;
if EndPos - StartPos > 1 then
FillDWord(Visited[StartPos + 1], EndPos - StartPos - 1, $FFFFFFFF);
end;
end;
procedure Push(AX, AY: integer); inline;
begin
if StackCount + 1 >= High(Stack) then
SetLength(Stack, Length(Stack) shl 1);
Stack[StackCount] := AX;
Inc(StackCount);
Stack[StackCount] := AY;
Inc(StackCount);
end;
procedure Pop(var AX, AY: integer); inline;
begin
Dec(StackCount);
AY := Stack[StackCount];
Dec(StackCount);
AX := Stack[StackCount];
end;
begin
if PtInClipRect(X,Y) then
begin
S := GetPixel(X, Y);
VisitedLineSize := (Width + 31) shr 5;
SetLength(Visited, VisitedLineSize * Height);
FillDWord(Visited[0], Length(Visited), 0);
SetLength(Stack, 2);
StackCount := 0;
Push(X, Y);
repeat
Pop(X, Y);
if not CheckPixel(X, Y) then
Continue;
SX := X;
while (SX > FClipRect.Left) and CheckPixel(Pred(SX), Y) do
Dec(SX);
EX := X;
while (EX < Pred(FClipRect.Right)) and CheckPixel(Succ(EX), Y) do
Inc(EX);
SetVisited(SX, Y, EX);
if mode = fmSet then
dest.SetHorizLine(SX, Y, EX, Color)
else
if mode = fmDrawWithTransparency then
dest.DrawHorizLine(SX, Y, EX, Color)
else
dest.DrawHorizLineDiff(SX, Y, EX, Color, S, Tolerance);
Added := False;
if Y > FClipRect.Top then
for I := SX to EX do
if CheckPixel(I, Pred(Y)) then
begin
if Added then //do not add twice the same segment
Continue;
Push(I, Pred(Y));
Added := True;
end
else
Added := False;
Added := False;
if Y < Pred(FClipRect.Bottom) then
for I := SX to EX do
if CheckPixel(I, Succ(Y)) then
begin
if Added then //do not add twice the same segment
Continue;
Push(I, Succ(Y));
Added := True;
end
else
Added := False;
until StackCount <= 0;
end;
end;
procedure TBGRADefaultBitmap.GradientFill(x, y, x2, y2: integer;
c1, c2: TBGRAPixel; gtype: TGradientType; o1, o2: TPointF; mode: TDrawMode;
gammaColorCorrection: boolean = True; Sinus: Boolean=False);
begin
BGRAGradientFill(self, x, y, x2, y2, c1, c2, gtype, o1, o2, mode, gammaColorCorrection, Sinus);
end;
procedure TBGRADefaultBitmap.GradientFill(x, y, x2, y2: integer;
gradient: TBGRACustomGradient; gtype: TGradientType; o1, o2: TPointF;
mode: TDrawMode; Sinus: Boolean);
var
scanner: TBGRAGradientScanner;
begin
scanner := TBGRAGradientScanner.Create(gradient,gtype,o1,o2,sinus);
FillRect(x,y,x2,y2,scanner,mode);
scanner.Free;
end;
function TBGRADefaultBitmap.CreateBrushTexture(ABrushStyle: TBrushStyle; APatternColor, ABackgroundColor: TBGRAPixel;
AWidth: integer = 8; AHeight: integer = 8; APenWidth: single = 1): TBGRACustomBitmap;
begin
result := BGRAPen.CreateBrushTexture(self,ABrushStyle,APatternColor,ABackgroundColor,AWidth,AHeight,APenWidth);
end;
function TBGRADefaultBitmap.ScanAtInteger(X, Y: integer): TBGRAPixel;
begin
if FData <> nil then
result := (GetScanlineFast(PositiveMod(Y+ScanOffset.Y, FHeight))+PositiveMod(X+ScanOffset.X, FWidth))^
else
result := BGRAPixelTransparent;
end;
{ Scanning procedures for IBGRAScanner interface }
procedure TBGRADefaultBitmap.ScanMoveTo(X, Y: Integer);
begin
if FData = nil then exit;
LoadFromBitmapIfNeeded;
FScanCurX := PositiveMod(X+ScanOffset.X, FWidth);
FScanCurY := PositiveMod(Y+ScanOffset.Y, FHeight);
FScanPtr := ScanLine[FScanCurY];
end;
function TBGRADefaultBitmap.ScanNextPixel: TBGRAPixel;
begin
if FData <> nil then
begin
result := (FScanPtr+FScanCurX)^;
inc(FScanCurX);
if FScanCurX = FWidth then //cycle
FScanCurX := 0;
end
else
result := BGRAPixelTransparent;
end;
function TBGRADefaultBitmap.ScanAt(X, Y: Single): TBGRAPixel;
const
{$IFDEF CPU64}
signComplement = $FF00000000000000;
{$ELSE}
signComplement = $FF000000;
{$ENDIF}
var
ix, iy: int32or64;
iFactX,iFactY: int32or64;
begin
if FData = nil then
begin
result := BGRAPixelTransparent;
exit;
end;
iFactX := round(x*256);
iFactY := round(y*256);
{$IFDEF CPUI386} {$asmmode intel}
asm
mov eax, iFactX
sar eax, 8
mov ix, eax
mov edx, iFactY
sar edx, 8
mov iy, edx
end;
ix += ScanOffset.X;
iy += ScanOffset.Y;
{$ELSE}
{$IFDEF cpux86_64} {$asmmode intel}
asm
mov rax, iFactX
sar rax, 8
mov ix, rax
mov rdx, iFactY
sar rdx, 8
mov iy, rdx
end;
ix += ScanOffset.X;
iy += ScanOffset.Y;
{$ELSE}
if iFactX < 0 then //because not sure it will be SAR instead of SHR
ix := ((iFactX shr 8) or signComplement)+ScanOffset.X
else
ix := (iFactX shr 8)+ScanOffset.X;
if iFactY < 0 then
iy := ((iFactY shr 8) or signComplement)+ScanOffset.Y
else
iy := (iFactY shr 8)+ScanOffset.Y;
{$ENDIF}
{$ENDIF}
iFactX := iFactX and 255;
iFactY := iFactY and 255;
if (iFactX = 0) and (iFactY = 0) then
begin
result := (GetScanlineFast(PositiveMod(iy, FHeight))+PositiveMod(ix, FWidth))^;
exit;
end;
if ScanInterpolationFilter <> rfLinear then
begin
iFactX := FineInterpolation256( iFactX, ScanInterpolationFilter );
iFactY := FineInterpolation256( iFactY, ScanInterpolationFilter );
end;
result := GetPixelCycleInline(ix,iy, iFactX,iFactY);
end;
function TBGRADefaultBitmap.IsScanPutPixelsDefined: boolean;
begin
Result:= true;
end;
procedure TBGRADefaultBitmap.ScanPutPixels(pdest: PBGRAPixel; count: integer;
mode: TDrawMode);
var
i,nbCopy: Integer;
c: TBGRAPixel;
begin
case mode of
dmLinearBlend:
for i := 0 to count-1 do
begin
FastBlendPixelInline(pdest, ScanNextPixel);
inc(pdest);
end;
dmDrawWithTransparency:
for i := 0 to count-1 do
begin
DrawPixelInlineWithAlphaCheck(pdest, ScanNextPixel);
inc(pdest);
end;
dmSet:
while count > 0 do
begin
nbCopy := FWidth-FScanCurX;
if count < nbCopy then nbCopy := count;
move((FScanPtr+FScanCurX)^,pdest^,nbCopy*sizeof(TBGRAPixel));
inc(pdest,nbCopy);
inc(FScanCurX,nbCopy);
if FScanCurX = FWidth then FScanCurX := 0;
dec(count,nbCopy);
end;
dmSetExceptTransparent:
for i := 0 to count-1 do
begin
c := ScanNextPixel;
if c.alpha = 255 then pdest^ := c;
inc(pdest);
end;
dmXor:
for i := 0 to count-1 do
begin
PDWord(pdest)^ := PDWord(pdest)^ xor DWord(ScanNextPixel);
inc(pdest);
end;
end;
end;
{ General purpose pixel drawing function }
procedure TBGRADefaultBitmap.DrawPixels(c: TBGRAPixel; start, Count: integer);
var
p: PBGRAPixel;
begin
if c.alpha = 0 then
exit;
if c.alpha = 255 then
begin
Fill(c,start,Count);
exit;
end;
if start < 0 then
begin
Count += start;
start := 0;
end;
if start >= nbPixels then
exit;
if start + Count > nbPixels then
Count := nbPixels - start;
p := Data + start;
DrawPixelsInline(p,c,Count);
InvalidateBitmap;
end;
{------------------------- End fill ------------------------------}
procedure TBGRADefaultBitmap.DoAlphaCorrection;
var
p: PBGRAPixel;
n: integer;
begin
if CanvasAlphaCorrection then
begin
p := FData;
for n := NbPixels - 1 downto 0 do
begin
if (longword(p^) and $FFFFFF <> 0) and (p^.alpha = 0) then
p^.alpha := FCanvasOpacity;
Inc(p);
end;
end;
FAlphaCorrectionNeeded := False;
InvalidateBitmap;
end;
{ Ensure that transparent pixels have all channels to zero }
procedure TBGRADefaultBitmap.ClearTransparentPixels;
var
p: PBGRAPixel;
n: integer;
begin
p := FData;
for n := NbPixels - 1 downto 0 do
begin
if (p^.alpha = 0) then
p^ := BGRAPixelTransparent;
Inc(p);
end;
InvalidateBitmap;
end;
function TBGRADefaultBitmap.CheckPutImageBounds(x,y,tx,ty: integer; out minxb,minyb,maxxb,maxyb,ignoreleft: integer): boolean inline;
var x2,y2: integer;
begin
if (x >= FClipRect.Right) or (y >= FClipRect.Bottom) or (x <= FClipRect.Left-tx) or
(y <= FClipRect.Top-ty) or (Height = 0) or (ty = 0) or (tx = 0) then
begin
result := false;
exit;
end;
x2 := x + tx - 1;
y2 := y + ty - 1;
if y < FClipRect.Top then
minyb := FClipRect.Top
else
minyb := y;
if y2 >= FClipRect.Bottom then
maxyb := FClipRect.Bottom - 1
else
maxyb := y2;
if x < FClipRect.Left then
begin
ignoreleft := FClipRect.Left-x;
minxb := FClipRect.Left;
end
else
begin
ignoreleft := 0;
minxb := x;
end;
if x2 >= FClipRect.Right then
maxxb := FClipRect.Right - 1
else
maxxb := x2;
result := true;
end;
function TBGRADefaultBitmap.CheckAntialiasRectBounds(var x, y, x2, y2: single;
w: single): boolean;
var
temp: Single;
begin
if (x > x2) then
begin
temp := x;
x := x2;
x2 := temp;
end;
if (y > y2) then
begin
temp := y;
y := y2;
y2 := temp;
end;
result := (x2 - x > w) and (y2 - y > w);
end;
function TBGRADefaultBitmap.GetCanvasBGRA: TBGRACanvas;
begin
if FCanvasBGRA = nil then
FCanvasBGRA := TBGRACanvas.Create(self);
result := FCanvasBGRA;
end;
function TBGRADefaultBitmap.GetCanvas2D: TBGRACanvas2D;
begin
if FCanvas2D = nil then
FCanvas2D := TBGRACanvas2D.Create(self);
result := FCanvas2D;
end;
procedure TBGRADefaultBitmap.PutImage(x, y: integer; Source: TBGRACustomBitmap;
mode: TDrawMode; AOpacity: byte);
var
yb, minxb, minyb, maxxb, maxyb, ignoreleft, copycount, sourcewidth,
i, delta_source, delta_dest: integer;
psource, pdest: PBGRAPixel;
tempPixel: TBGRAPixel;
begin
if (source = nil) or (AOpacity = 0) then exit;
sourcewidth := Source.Width;
if not CheckPutImageBounds(x,y,sourcewidth,source.height,minxb,minyb,maxxb,maxyb,ignoreleft) then exit;
copycount := maxxb - minxb + 1;
psource := Source.ScanLine[minyb - y] + ignoreleft;
if Source.LineOrder = riloBottomToTop then
delta_source := -sourcewidth
else
delta_source := sourcewidth;
pdest := Scanline[minyb] + minxb;
if FLineOrder = riloBottomToTop then
delta_dest := -Width
else
delta_dest := Width;
case mode of
dmSet:
begin
if AOpacity <> 255 then
begin
for yb := minyb to maxyb do
begin
CopyPixelsWithOpacity(pdest, psource, AOpacity, copycount);
Inc(psource, delta_source);
Inc(pdest, delta_dest);
end;
end
else
begin
copycount *= sizeof(TBGRAPixel);
for yb := minyb to maxyb do
begin
move(psource^, pdest^, copycount);
Inc(psource, delta_source);
Inc(pdest, delta_dest);
end;
end;
InvalidateBitmap;
end;
dmSetExceptTransparent:
begin
Dec(delta_source, copycount);
Dec(delta_dest, copycount);
for yb := minyb to maxyb do
begin
if AOpacity <> 255 then
begin
for i := copycount - 1 downto 0 do
begin
if psource^.alpha = 255 then
begin
tempPixel := psource^;
tempPixel.alpha := ApplyOpacity(tempPixel.alpha,AOpacity);
FastBlendPixelInline(pdest,tempPixel);
end;
Inc(pdest);
Inc(psource);
end;
end else
for i := copycount - 1 downto 0 do
begin
if psource^.alpha = 255 then
pdest^ := psource^;
Inc(pdest);
Inc(psource);
end;
Inc(psource, delta_source);
Inc(pdest, delta_dest);
end;
InvalidateBitmap;
end;
dmDrawWithTransparency:
begin
Dec(delta_source, copycount);
Dec(delta_dest, copycount);
for yb := minyb to maxyb do
begin
if AOpacity <> 255 then
begin
for i := copycount - 1 downto 0 do
begin
DrawPixelInlineWithAlphaCheck(pdest, psource^, AOpacity);
Inc(pdest);
Inc(psource);
end;
end
else
for i := copycount - 1 downto 0 do
begin
DrawPixelInlineWithAlphaCheck(pdest, psource^);
Inc(pdest);
Inc(psource);
end;
Inc(psource, delta_source);
Inc(pdest, delta_dest);
end;
InvalidateBitmap;
end;
dmFastBlend:
begin
Dec(delta_source, copycount);
Dec(delta_dest, copycount);
for yb := minyb to maxyb do
begin
if AOpacity <> 255 then
begin
for i := copycount - 1 downto 0 do
begin
FastBlendPixelInline(pdest, psource^, AOpacity);
Inc(pdest);
Inc(psource);
end;
end else
for i := copycount - 1 downto 0 do
begin
FastBlendPixelInline(pdest, psource^);
Inc(pdest);
Inc(psource);
end;
Inc(psource, delta_source);
Inc(pdest, delta_dest);
end;
InvalidateBitmap;
end;
dmXor:
begin
if AOpacity <> 255 then
begin
Dec(delta_source, copycount);
Dec(delta_dest, copycount);
for yb := minyb to maxyb do
begin
for i := copycount - 1 downto 0 do
begin
FastBlendPixelInline(pdest, TBGRAPixel(PDWord(pdest)^ xor PDword(psource)^), AOpacity);
Inc(pdest);
Inc(psource);
end;
Inc(psource, delta_source);
Inc(pdest, delta_dest);
end;
end else
begin
for yb := minyb to maxyb do
begin
XorPixels(pdest, psource, copycount);
Inc(psource, delta_source);
Inc(pdest, delta_dest);
end;
end;
InvalidateBitmap;
end;
end;
end;
procedure TBGRADefaultBitmap.BlendImage(x, y: integer; Source: TBGRACustomBitmap;
operation: TBlendOperation);
var
yb, minxb, minyb, maxxb, maxyb, ignoreleft, copycount, sourcewidth,
delta_source, delta_dest: integer;
psource, pdest: PBGRAPixel;
begin
sourcewidth := Source.Width;
if not CheckPutImageBounds(x,y,sourcewidth,source.height,minxb,minyb,maxxb,maxyb,ignoreleft) then exit;
copycount := maxxb - minxb + 1;
psource := Source.ScanLine[minyb - y] + ignoreleft;
if Source.LineOrder = riloBottomToTop then
delta_source := -sourcewidth
else
delta_source := sourcewidth;
pdest := Scanline[minyb] + minxb;
if FLineOrder = riloBottomToTop then
delta_dest := -Width
else
delta_dest := Width;
for yb := minyb to maxyb do
begin
BlendPixels(pdest, psource, operation, copycount);
Inc(psource, delta_source);
Inc(pdest, delta_dest);
end;
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.BlendImageOver(x, y: integer;
Source: TBGRACustomBitmap; operation: TBlendOperation; AOpacity: byte; ALinearBlend: boolean);
var
yb, minxb, minyb, maxxb, maxyb, ignoreleft, copycount, sourcewidth,
delta_source, delta_dest: integer;
psource, pdest: PBGRAPixel;
begin
sourcewidth := Source.Width;
if not CheckPutImageBounds(x,y,sourcewidth,source.height,minxb,minyb,maxxb,maxyb,ignoreleft) then exit;
copycount := maxxb - minxb + 1;
psource := Source.ScanLine[minyb - y] + ignoreleft;
if Source.LineOrder = riloBottomToTop then
delta_source := -sourcewidth
else
delta_source := sourcewidth;
pdest := Scanline[minyb] + minxb;
if FLineOrder = riloBottomToTop then
delta_dest := -Width
else
delta_dest := Width;
for yb := minyb to maxyb do
begin
BlendPixelsOver(pdest, psource, operation, copycount, AOpacity, ALinearBlend);
Inc(psource, delta_source);
Inc(pdest, delta_dest);
end;
InvalidateBitmap;
end;
{ Draw an image wih an angle. Use an affine transformation to do this. }
procedure TBGRADefaultBitmap.PutImageAngle(x, y: single;
Source: TBGRACustomBitmap; angle: single; imageCenterX: single;
imageCenterY: single; AOpacity: Byte; ARestoreOffsetAfterRotation: boolean);
var
cosa,sina: single;
{ Compute rotated coordinates }
function Coord(relX,relY: single): TPointF;
begin
relX -= imageCenterX;
relY -= imageCenterY;
result.x := relX*cosa-relY*sina+x;
result.y := relY*cosa+relX*sina+y;
if ARestoreOffsetAfterRotation then
begin
result.x += imageCenterX;
result.y += imageCenterY;
end;
end;
begin
cosa := cos(-angle*Pi/180);
sina := -sin(-angle*Pi/180);
PutImageAffine(Coord(0,0),Coord(source.Width,0),Coord(0,source.Height),source,AOpacity);
end;
{ Draw an image with an affine transformation (rotation, scale, translate).
Parameters are the bitmap origin, the end of the horizontal axis and the end of the vertical axis. }
procedure TBGRADefaultBitmap.PutImageAffine(Origin,HAxis,VAxis: TPointF; Source: TBGRACustomBitmap; AOpacity: Byte);
var affine: TBGRAAffineBitmapTransform;
minx,miny,maxx,maxy: integer;
pt4: TPointF;
//include specified point in the bounds
procedure Include(pt: TPointF);
begin
if floor(pt.X) < minx then minx := floor(pt.X);
if floor(pt.Y) < miny then miny := floor(pt.Y);
if ceil(pt.X) > maxx then maxx := ceil(pt.X);
if ceil(pt.Y) > maxy then maxy := ceil(pt.Y);
end;
begin
if (abs(Origin.x-round(Origin.x))<1e-6) and (abs(Origin.y-round(Origin.Y))<1e-6) and
(abs(HAxis.x-(Origin.x+Source.Width))<1e-6) and (abs(HAxis.y-origin.y)<1e-6) and
(abs(VAxis.x-Origin.x)<1e-6) and (abs(VAxis.y-(Origin.y+Source.Height))<1e-6) then
begin
PutImage(round(origin.x),round(origin.y),Source,dmDrawWithTransparency,AOpacity);
exit;
end;
{ Create affine transformation }
affine := TBGRAAffineBitmapTransform.Create(Source);
affine.GlobalOpacity := AOpacity;
affine.Fit(Origin,HAxis,VAxis);
{ Compute bounds }
pt4.x := VAxis.x+HAxis.x-Origin.x;
pt4.y := VAxis.y+HAxis.y-Origin.y;
minx := floor(Origin.X);
miny := floor(Origin.Y);
maxx := ceil(Origin.X);
maxy := ceil(Origin.Y);
Include(HAxis);
Include(VAxis);
Include(pt4);
{ Use the affine transformation as a scanner }
FillRect(minx,miny,maxx+1,maxy+1,affine,dmDrawWithTransparency);
affine.Free;
end;
{ Duplicate bitmap content. Optionally, bitmap properties can be also duplicated }
function TBGRADefaultBitmap.Duplicate(DuplicateProperties: Boolean = False): TBGRACustomBitmap;
var Temp: TBGRADefaultBitmap;
begin
LoadFromBitmapIfNeeded;
Temp := NewBitmap(Width, Height) as TBGRADefaultBitmap;
Temp.PutImage(0, 0, self, dmSet);
Temp.Caption := self.Caption;
if DuplicateProperties then
CopyPropertiesTo(Temp);
Result := Temp;
end;
{ Copy properties only }
procedure TBGRADefaultBitmap.CopyPropertiesTo(ABitmap: TBGRADefaultBitmap);
begin
ABitmap.CanvasOpacity := CanvasOpacity;
ABitmap.CanvasDrawModeFP := CanvasDrawModeFP;
ABitmap.PenStyle := PenStyle;
ABitmap.CustomPenStyle := CustomPenStyle;
ABitmap.FontHeight := FontHeight;
ABitmap.FontName := FontName;
ABitmap.FontStyle := FontStyle;
ABitmap.FontAntialias := FontAntialias;
ABitmap.FontOrientation := FontOrientation;
ABitmap.LineCap := LineCap;
ABitmap.JoinStyle := JoinStyle;
ABitmap.FillMode := FillMode;
ABitmap.ClipRect := ClipRect;
end;
{ Check if two bitmaps have the same content }
function TBGRADefaultBitmap.Equals(comp: TBGRACustomBitmap): boolean;
var
yb, xb: integer;
pself, pcomp: PBGRAPixel;
begin
if comp = nil then
Result := False
else
if (comp.Width <> Width) or (comp.Height <> Height) then
Result := False
else
begin
Result := True;
for yb := 0 to Height - 1 do
begin
pself := ScanLine[yb];
pcomp := comp.Scanline[yb];
for xb := 0 to Width - 1 do
begin
if pself^ <> pcomp^ then
begin
Result := False;
exit;
end;
Inc(pself);
Inc(pcomp);
end;
end;
end;
end;
{ Check if a bitmap is filled wih the specified color }
function TBGRADefaultBitmap.Equals(comp: TBGRAPixel): boolean;
var
i: integer;
p: PBGRAPixel;
begin
p := Data;
for i := NbPixels - 1 downto 0 do
begin
if p^ <> comp then
begin
Result := False;
exit;
end;
Inc(p);
end;
Result := True;
end;
{----------------------------- Filters -----------------------------------------}
{ Call the appropriate function }
function TBGRADefaultBitmap.FilterSmartZoom3(Option: TMedianOption): TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterSmartZoom3(self, Option);
end;
function TBGRADefaultBitmap.FilterMedian(Option: TMedianOption): TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterMedian(self, option);
end;
function TBGRADefaultBitmap.FilterSmooth: TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterBlurRadialPrecise(self, 0.3);
end;
function TBGRADefaultBitmap.FilterSphere: TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterSphere(self);
end;
function TBGRADefaultBitmap.FilterTwirl(ACenter: TPoint; ARadius: Single; ATurn: Single=1; AExponent: Single=3): TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterTwirl(self, ACenter, ARadius, ATurn, AExponent);
end;
function TBGRADefaultBitmap.FilterTwirl(ABounds: TRect; ACenter: TPoint;
ARadius: Single; ATurn: Single; AExponent: Single): TBGRACustomBitmap;
begin
result := BGRAFilters.FilterTwirl(self, ABounds, ACenter, ARadius, ATurn, AExponent);
end;
function TBGRADefaultBitmap.FilterCylinder: TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterCylinder(self);
end;
function TBGRADefaultBitmap.FilterPlane: TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterPlane(self);
end;
function TBGRADefaultBitmap.FilterSharpen(Amount: single = 1): TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterSharpen(self,round(Amount*256));
end;
function TBGRADefaultBitmap.FilterSharpen(ABounds: TRect; Amount: single
): TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterSharpen(self,ABounds,round(Amount*256));
end;
function TBGRADefaultBitmap.FilterContour: TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterContour(self);
end;
function TBGRADefaultBitmap.FilterBlurRadial(radius: integer;
blurType: TRadialBlurType): TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterBlurRadial(self, radius, blurType);
end;
function TBGRADefaultBitmap.FilterBlurRadial(ABounds: TRect; radius: integer;
blurType: TRadialBlurType): TBGRACustomBitmap;
var task: TFilterTask;
begin
task := BGRAFilters.CreateRadialBlurTask(self, ABounds, radius, blurType);
try
result := task.Execute;
finally
task.Free;
end;
end;
function TBGRADefaultBitmap.FilterPixelate(pixelSize: integer;
useResample: boolean; filter: TResampleFilter): TBGRACustomBitmap;
begin
Result:= BGRAFilters.FilterPixelate(self, pixelSize, useResample, filter);
end;
function TBGRADefaultBitmap.FilterBlurMotion(distance: integer;
angle: single; oriented: boolean): TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterBlurMotion(self, distance, angle, oriented);
end;
function TBGRADefaultBitmap.FilterBlurMotion(ABounds: TRect; distance: integer;
angle: single; oriented: boolean): TBGRACustomBitmap;
var task: TFilterTask;
begin
task := BGRAFilters.CreateMotionBlurTask(self,ABounds,distance,angle,oriented);
try
Result := task.Execute;
finally
task.Free;
end;
end;
function TBGRADefaultBitmap.FilterCustomBlur(mask: TBGRACustomBitmap):
TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterBlur(self, mask);
end;
function TBGRADefaultBitmap.FilterCustomBlur(ABounds: TRect;
mask: TBGRACustomBitmap): TBGRACustomBitmap;
var task: TFilterTask;
begin
task := BGRAFilters.CreateBlurTask(self, ABounds, mask);
try
result := task.Execute;
finally
task.Free;
end;
end;
function TBGRADefaultBitmap.FilterEmboss(angle: single): TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterEmboss(self, angle);
end;
function TBGRADefaultBitmap.FilterEmboss(angle: single; ABounds: TRect): TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterEmboss(self, angle, ABounds);
end;
function TBGRADefaultBitmap.FilterEmbossHighlight(FillSelection: boolean):
TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterEmbossHighlight(self, FillSelection, BGRAPixelTransparent);
end;
function TBGRADefaultBitmap.FilterEmbossHighlight(FillSelection: boolean;
BorderColor: TBGRAPixel): TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterEmbossHighlight(self, FillSelection, BorderColor);
end;
function TBGRADefaultBitmap.FilterEmbossHighlight(FillSelection: boolean;
BorderColor: TBGRAPixel; var Offset: TPoint): TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterEmbossHighlightOffset(self, FillSelection, BorderColor, Offset);
end;
function TBGRADefaultBitmap.FilterGrayscale: TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterGrayscale(self);
end;
function TBGRADefaultBitmap.FilterGrayscale(ABounds: TRect): TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterGrayscale(self, ABounds);
end;
function TBGRADefaultBitmap.FilterNormalize(eachChannel: boolean = True):
TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterNormalize(self, eachChannel);
end;
function TBGRADefaultBitmap.FilterNormalize(ABounds: TRect; eachChannel: boolean): TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterNormalize(self, ABounds, eachChannel);
end;
function TBGRADefaultBitmap.FilterRotate(origin: TPointF;
angle: single): TBGRACustomBitmap;
begin
Result := BGRAFilters.FilterRotate(self, origin, angle);
end;
function TBGRADefaultBitmap.GetHasTransparentPixels: boolean;
var
p: PBGRAPixel;
n: integer;
begin
p := Data;
for n := NbPixels - 1 downto 0 do
begin
if p^.alpha <> 255 then
begin
Result := True;
exit;
end;
Inc(p);
end;
Result := False;
end;
function TBGRADefaultBitmap.GetAverageColor: TColor;
var
pix: TBGRAPixel;
begin
pix := GetAveragePixel;
{$hints off}
if pix.alpha = 0 then
result := clNone else
result := pix.red + pix.green shl 8 + pix.blue shl 16;
{$hints on}
end;
function TBGRADefaultBitmap.GetAveragePixel: TBGRAPixel;
var
n: integer;
p: PBGRAPixel;
r, g, b, sum: double;
alpha: double;
begin
sum := 0;
r := 0;
g := 0;
b := 0;
p := Data;
for n := NbPixels - 1 downto 0 do
begin
alpha := p^.alpha / 255;
sum += alpha;
r += p^.red * alpha;
g += p^.green * alpha;
b += p^.blue * alpha;
Inc(p);
end;
if sum = 0 then
Result := BGRAPixelTransparent
else
Result := BGRA(round(r / sum),round(g / sum),round(b / sum),round(sum*255/NbPixels));
end;
function TBGRADefaultBitmap.CreateAdaptedPngWriter: TFPWriterPNG;
begin
result := TFPWriterPNG.Create;
result.Indexed := False;
result.UseAlpha := HasTransparentPixels;
result.WordSized := false;
end;
{$hints off}
function TBGRADefaultBitmap.LoadAsBmp32(Str: TStream): boolean;
var OldPos: int64;
fileHeader: TBitmapFileHeader;
infoHeader: TBitmapInfoHeader;
dataSize: integer;
begin
OldPos := Str.Position;
result := false;
try
if Str.Read(fileHeader,sizeof(fileHeader)) <> sizeof(fileHeader) then
raise exception.Create('Inuable to read file header');
if fileHeader.bfType = $4D42 then
begin
if Str.Read(infoHeader,sizeof(infoHeader)) <> sizeof(infoHeader) then
raise exception.Create('Inuable to read info header');
if (infoHeader.biPlanes = 1) and (infoHeader.biBitCount = 32) and (infoHeader.biCompression = 0) then
begin
SetSize(infoHeader.biWidth,infoHeader.biHeight);
Str.Position := OldPos+fileHeader.bfOffBits;
dataSize := NbPixels*sizeof(TBGRAPixel);
if Str.Read(Data^, dataSize) <> dataSize then
Begin
SetSize(0,0);
raise exception.Create('Unable to read data');
end;
result := true;
end;
end;
except
on ex:exception do
begin
end;
end;
Str.Position := OldPos;
end;
{$hints on}
procedure TBGRADefaultBitmap.SetCanvasOpacity(AValue: byte);
begin
LoadFromBitmapIfNeeded;
FCanvasOpacity := AValue;
end;
function TBGRADefaultBitmap.GetDataPtr: PBGRAPixel;
begin
LoadFromBitmapIfNeeded;
Result := FData;
end;
{----------------------------- Resample ---------------------------------------}
function TBGRADefaultBitmap.FineResample(NewWidth, NewHeight: integer):
TBGRACustomBitmap;
begin
Result := BGRAResample.FineResample(self, NewWidth, NewHeight, ResampleFilter);
end;
function TBGRADefaultBitmap.SimpleStretch(NewWidth, NewHeight: integer):
TBGRACustomBitmap;
begin
Result := BGRAResample.SimpleStretch(self, NewWidth, NewHeight);
end;
function TBGRADefaultBitmap.Resample(newWidth, newHeight: integer;
mode: TResampleMode): TBGRACustomBitmap;
begin
case mode of
rmFineResample: Result := FineResample(newWidth, newHeight);
rmSimpleStretch: Result := SimpleStretch(newWidth, newHeight);
else
Result := nil;
end;
end;
{-------------------------------- Data functions ------------------------}
{ Flip vertically the bitmap. Use a temporary line to store top line,
assign bottom line to top line, then assign temporary line to bottom line.
It is an involution, i.e it does nothing when applied twice }
procedure TBGRADefaultBitmap.VerticalFlip;
var
yb: integer;
line: PBGRAPixel;
linesize: integer;
PStart: PBGRAPixel;
PEnd: PBGRAPixel;
begin
if FData = nil then
exit;
LoadFromBitmapIfNeeded;
linesize := Width * sizeof(TBGRAPixel);
line := nil;
getmem(line, linesize);
PStart := Data;
PEnd := Data + (Height - 1) * Width;
for yb := 0 to (Height div 2) - 1 do
begin
move(PStart^, line^, linesize);
move(PEnd^, PStart^, linesize);
move(line^, PEnd^, linesize);
Inc(PStart, Width);
Dec(PEnd, Width);
end;
freemem(line);
InvalidateBitmap;
end;
{ Flip horizontally. Swap left pixels with right pixels on each line.
It is an involution, i.e it does nothing when applied twice}
procedure TBGRADefaultBitmap.HorizontalFlip;
var
yb, xb: integer;
PStart: PBGRAPixel;
PEnd: PBGRAPixel;
temp: TBGRAPixel;
begin
if FData = nil then
exit;
LoadFromBitmapIfNeeded;
for yb := 0 to Height - 1 do
begin
PStart := Scanline[yb];
PEnd := PStart + Width;
for xb := 0 to (Width div 2) - 1 do
begin
Dec(PEnd);
temp := PStart^;
PStart^ := PEnd^;
PEnd^ := temp;
Inc(PStart);
end;
end;
InvalidateBitmap;
end;
{ Return a new bitmap rotated in a clock wise direction. }
function TBGRADefaultBitmap.RotateCW: TBGRACustomBitmap;
var
psrc, pdest: PBGRAPixel;
yb, xb: integer;
delta: integer;
begin
LoadFromBitmapIfNeeded;
Result := NewBitmap(Height, Width);
if Result.LineOrder = riloTopToBottom then
delta := Result.Width
else
delta := -Result.Width;
for yb := 0 to Height - 1 do
begin
psrc := Scanline[yb];
pdest := Result.Scanline[0] + (Height - 1 - yb);
for xb := 0 to Width - 1 do
begin
pdest^ := psrc^;
Inc(psrc);
Inc(pdest, delta);
end;
end;
end;
{ Return a new bitmap rotated in a counter clock wise direction. }
function TBGRADefaultBitmap.RotateCCW: TBGRACustomBitmap;
var
psrc, pdest: PBGRAPixel;
yb, xb: integer;
delta: integer;
begin
LoadFromBitmapIfNeeded;
Result := NewBitmap(Height, Width);
if Result.LineOrder = riloTopToBottom then
delta := Result.Width
else
delta := -Result.Width;
for yb := 0 to Height - 1 do
begin
psrc := Scanline[yb];
pdest := Result.Scanline[Width - 1] + yb;
for xb := 0 to Width - 1 do
begin
pdest^ := psrc^;
Inc(psrc);
Dec(pdest, delta);
end;
end;
end;
{ Compute negative with gamma correction. A negative contains
complentary colors (black becomes white etc.).
It is NOT EXACTLY an involution, when applied twice, some color information is lost }
procedure TBGRADefaultBitmap.Negative;
var
p: PBGRAPixel;
n: integer;
begin
LoadFromBitmapIfNeeded;
p := Data;
for n := NbPixels - 1 downto 0 do
begin
if p^.alpha <> 0 then
begin
p^.red := GammaCompressionTab[not GammaExpansionTab[p^.red]];
p^.green := GammaCompressionTab[not GammaExpansionTab[p^.green]];
p^.blue := GammaCompressionTab[not GammaExpansionTab[p^.blue]];
end;
Inc(p);
end;
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.NegativeRect(ABounds: TRect);
var p: PBGRAPixel;
xb,yb,xcount: integer;
begin
if not IntersectRect(ABounds,ABounds,ClipRect) then exit;
xcount := ABounds.Right-ABounds.Left;
for yb := ABounds.Top to ABounds.Bottom-1 do
begin
p := ScanLine[yb]+ABounds.Left;
for xb := xcount-1 downto 0 do
begin
if p^.alpha <> 0 then
begin
p^.red := GammaCompressionTab[not GammaExpansionTab[p^.red]];
p^.green := GammaCompressionTab[not GammaExpansionTab[p^.green]];
p^.blue := GammaCompressionTab[not GammaExpansionTab[p^.blue]];
end;
Inc(p);
end;
end;
end;
{ Compute negative without gamma correction.
It is an involution, i.e it does nothing when applied twice }
procedure TBGRADefaultBitmap.LinearNegative;
var
p: PBGRAPixel;
n: integer;
begin
LoadFromBitmapIfNeeded;
p := Data;
for n := NbPixels - 1 downto 0 do
begin
if p^.alpha <> 0 then
begin
p^.red := not p^.red;
p^.green := not p^.green;
p^.blue := not p^.blue;
end;
Inc(p);
end;
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.LinearNegativeRect(ABounds: TRect);
var p: PBGRAPixel;
xb,yb,xcount: integer;
begin
if not IntersectRect(ABounds,ABounds,ClipRect) then exit;
xcount := ABounds.Right-ABounds.Left;
for yb := ABounds.Top to ABounds.Bottom-1 do
begin
p := ScanLine[yb]+ABounds.Left;
for xb := xcount-1 downto 0 do
begin
if p^.alpha <> 0 then
begin
p^.red := not p^.red;
p^.green := not p^.green;
p^.blue := not p^.blue;
end;
Inc(p);
end;
end;
end;
procedure TBGRADefaultBitmap.InplaceGrayscale;
begin
InplaceGrayscale(rect(0,0,Width,Height));
end;
procedure TBGRADefaultBitmap.InplaceGrayscale(ABounds: TRect);
var
task: TFilterTask;
begin
task := CreateGrayscaleTask(self, ABounds);
task.Destination := self;
task.Execute;
task.Free;
end;
{ Swap red and blue channels. Useful when RGB order is swapped.
It is an involution, i.e it does nothing when applied twice }
procedure TBGRADefaultBitmap.SwapRedBlue;
var
n: integer;
temp: longword;
p: PLongword;
begin
LoadFromBitmapIfNeeded;
p := PLongword(Data);
n := NbPixels;
if n = 0 then
exit;
repeat
temp := LEtoN(p^);
p^ := NtoLE(((temp and $FF) shl 16) or ((temp and $FF0000) shr 16) or
temp and $FF00FF00);
Inc(p);
Dec(n);
until n = 0;
InvalidateBitmap;
end;
{ Convert a grayscale image into a black image with alpha value }
procedure TBGRADefaultBitmap.GrayscaleToAlpha;
var
n: integer;
temp: longword;
p: PLongword;
begin
LoadFromBitmapIfNeeded;
p := PLongword(Data);
n := NbPixels;
if n = 0 then
exit;
repeat
temp := LEtoN(p^);
p^ := NtoLE((temp and $FF) shl 24);
Inc(p);
Dec(n);
until n = 0;
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.AlphaToGrayscale;
var
n: integer;
temp: longword;
p: PLongword;
begin
LoadFromBitmapIfNeeded;
p := PLongword(Data);
n := NbPixels;
if n = 0 then
exit;
repeat
temp := LEtoN(p^ shr 24);
p^ := NtoLE(temp or (temp shl 8) or (temp shl 16) or $FF000000);
Inc(p);
Dec(n);
until n = 0;
InvalidateBitmap;
end;
{ Apply a mask to the bitmap. It means that alpha channel is
changed according to grayscale values of the mask.
See : http://wiki.lazarus.freepascal.org/BGRABitmap_tutorial_5 }
procedure TBGRADefaultBitmap.ApplyMask(mask: TBGRACustomBitmap);
var
p, pmask: PBGRAPixel;
yb, xb: integer;
begin
if (Mask.Width <> Width) or (Mask.Height <> Height) then
exit;
LoadFromBitmapIfNeeded;
for yb := 0 to Height - 1 do
begin
p := Scanline[yb];
pmask := Mask.Scanline[yb];
for xb := Width - 1 downto 0 do
begin
p^.alpha := ApplyOpacity(p^.alpha, pmask^.red);
Inc(p);
Inc(pmask);
end;
end;
InvalidateBitmap;
end;
procedure TBGRADefaultBitmap.ApplyGlobalOpacity(alpha: byte);
var
p: PBGRAPixel;
i: integer;
begin
if alpha = 0 then
FillTransparent
else
if alpha <> 255 then
begin
p := Data;
for i := NbPixels - 1 downto 0 do
begin
p^.alpha := ApplyOpacity(p^.alpha, alpha);
Inc(p);
end;
end;
end;
procedure TBGRADefaultBitmap.ConvertToLinearRGB;
var p: PBGRAPixel;
n: integer;
begin
p := Data;
for n := NbPixels-1 downto 0 do
begin
p^.red := GammaExpansionTab[p^.red] shr 8;
p^.green := GammaExpansionTab[p^.green] shr 8;
p^.blue := GammaExpansionTab[p^.blue] shr 8;
inc(p);
end;
end;
procedure TBGRADefaultBitmap.ConvertFromLinearRGB;
var p: PBGRAPixel;
n: integer;
begin
p := Data;
for n := NbPixels-1 downto 0 do
begin
p^.red := GammaCompressionTab[p^.red shl 8 + p^.red];
p^.green := GammaCompressionTab[p^.green shl 8 + p^.green];
p^.blue := GammaCompressionTab[p^.blue shl 8 + p^.blue];
inc(p);
end;
end;
{ Get bounds of non zero values of specified channel }
function TBGRADefaultBitmap.GetImageBounds(Channel: TChannel = cAlpha; ANothingValue: Byte = 0): TRect;
var
minx, miny, maxx, maxy: integer;
xb, yb: integer;
p: pbyte;
offset: integer;
begin
maxx := -1;
maxy := -1;
minx := self.Width;
miny := self.Height;
case Channel of
cBlue: offset := 0;
cGreen: offset := 1;
cRed: offset := 2;
else
offset := 3;
end;
for yb := 0 to self.Height - 1 do
begin
p := PByte(self.ScanLine[yb]) + offset;
for xb := 0 to self.Width - 1 do
begin
if p^ <> ANothingValue then
begin
if xb < minx then
minx := xb;
if yb < miny then
miny := yb;
if xb > maxx then
maxx := xb;
if yb > maxy then
maxy := yb;
end;
Inc(p, sizeof(TBGRAPixel));
end;
end;
if minx > maxx then
begin
Result.left := 0;
Result.top := 0;
Result.right := 0;
Result.bottom := 0;
end
else
begin
Result.left := minx;
Result.top := miny;
Result.right := maxx + 1;
Result.bottom := maxy + 1;
end;
end;
function TBGRADefaultBitmap.GetImageBounds(Channels: TChannels): TRect;
var c: TChannel;
begin
result := rect(0,0,0,0);
for c := low(TChannel) to high(TChannel) do
if c in Channels then
UnionRect(result,result,GetImageBounds(c));
end;
function TBGRADefaultBitmap.GetDifferenceBounds(ABitmap: TBGRACustomBitmap): TRect;
var
minx, miny, maxx, maxy: integer;
xb, yb: integer;
p, p2: PBGRAPixel;
begin
if (ABitmap.Width <> Width) or (ABitmap.Height <> Height) then
begin
result := rect(0,0,Width,Height);
if ABitmap.Width > result.Right then result.Right := ABitmap.Width;
if ABitmap.Height > result.bottom then result.bottom := ABitmap.Height;
exit;
end;
maxx := -1;
maxy := -1;
minx := self.Width;
miny := self.Height;
for yb := 0 to self.Height - 1 do
begin
p := self.ScanLine[yb];
p2 := ABitmap.ScanLine[yb];
for xb := 0 to self.Width - 1 do
begin
if p^ <> p2^ then
begin
if xb < minx then
minx := xb;
if yb < miny then
miny := yb;
if xb > maxx then
maxx := xb;
if yb > maxy then
maxy := yb;
end;
Inc(p);
Inc(p2);
end;
end;
if minx > maxx then
begin
Result.left := 0;
Result.top := 0;
Result.right := 0;
Result.bottom := 0;
end
else
begin
Result.left := minx;
Result.top := miny;
Result.right := maxx + 1;
Result.bottom := maxy + 1;
end;
end;
{ Make a copy of the transparent bitmap to a TBitmap with a background color
instead of transparency }
function TBGRADefaultBitmap.MakeBitmapCopy(BackgroundColor: TColor): TBitmap;
var
opaqueCopy: TBGRACustomBitmap;
begin
Result := TBitmap.Create;
Result.Width := Width;
Result.Height := Height;
opaqueCopy := NewBitmap(Width, Height);
opaqueCopy.Fill(ColorToRGB(BackgroundColor));
opaqueCopy.PutImage(0, 0, self, dmDrawWithTransparency);
opaqueCopy.Draw(Result.canvas, 0, 0, True);
opaqueCopy.Free;
end;
{ Get a part of the image with repetition in both directions. It means
that if the bounds are within the image, the result is just that part
of the image, but if the bounds are bigger than the image, the image
is tiled. }
function TBGRADefaultBitmap.GetPart(ARect: TRect): TBGRACustomBitmap;
var
copywidth, copyheight, widthleft, heightleft, curxin, curyin, xdest,
ydest, tx, ty: integer;
begin
tx := ARect.Right - ARect.Left;
ty := ARect.Bottom - ARect.Top;
if (tx <= 0) or (ty <= 0) then
begin
result := nil;
exit;
end;
LoadFromBitmapIfNeeded;
if ARect.Left >= Width then
ARect.Left := ARect.Left mod Width
else
if ARect.Left < 0 then
ARect.Left := Width - ((-ARect.Left) mod Width);
ARect.Right := ARect.Left + tx;
if ARect.Top >= Height then
ARect.Top := ARect.Top mod Height
else
if ARect.Top < 0 then
ARect.Top := Height - ((-ARect.Top) mod Height);
ARect.Bottom := ARect.Top + ty;
if (ARect.Left = 0) and (ARect.Top = 0) and
(ARect.Right = Width) and
(ARect.Bottom = Height) then
begin
result := Duplicate;
exit;
end;
result := NewBitmap(tx, ty);
heightleft := result.Height;
curyin := ARect.Top;
ydest := -ARect.Top;
while heightleft > 0 do
begin
if curyin + heightleft > Height then
copyheight := Height - curyin
else
copyheight := heightleft;
widthleft := result.Width;
curxin := ARect.Left;
xdest := -ARect.Left;
while widthleft > 0 do
begin
if curxin + widthleft > Width then
copywidth := Width - curxin
else
copywidth := widthleft;
result.PutImage(xdest, ydest, self, dmSet);
curxin := 0;
Dec(widthleft, copywidth);
Inc(xdest, Width);
end;
curyin := 0;
Dec(heightleft, copyheight);
Inc(ydest, Height);
end;
end;
function TBGRADefaultBitmap.GetPtrBitmap(Top, Bottom: Integer
): TBGRACustomBitmap;
var temp: integer;
ptrbmp: TBGRAPtrBitmap;
begin
if Top > Bottom then
begin
temp := Top;
Top := Bottom;
Bottom := Temp;
end;
if Top < 0 then Top := 0;
if Bottom > Height then Bottom := Height;
if Top >= Bottom then
result := nil
else
begin
if LineOrder = riloTopToBottom then
ptrbmp := TBGRAPtrBitmap.Create(Width,Bottom-Top,ScanLine[Top]) else
ptrbmp := TBGRAPtrBitmap.Create(Width,Bottom-Top,ScanLine[Bottom-1]);
ptrbmp.LineOrder := LineOrder;
result := ptrbmp;
end;
end;
{ Draw BGRA data to a canvas with transparency }
procedure TBGRADefaultBitmap.DataDrawTransparent(ACanvas: TCanvas;
Rect: TRect; AData: Pointer; ALineOrder: TRawImageLineOrder; AWidth, AHeight: integer);
var
Temp: TBitmap;
RawImage: TRawImage;
BitmapHandle, MaskHandle: HBitmap;
begin
RawImage.Init;
RawImage.Description.Init_BPP32_B8G8R8A8_BIO_TTB(AWidth, AHeight);
RawImage.Description.LineOrder := ALineOrder;
RawImage.Data := PByte(AData);
RawImage.DataSize := AWidth * AHeight * sizeof(TBGRAPixel);
if not RawImage_CreateBitmaps(RawImage, BitmapHandle, MaskHandle, False) then
raise FPImageException.Create('Failed to create bitmap handle');
Temp := TBitmap.Create;
Temp.Handle := BitmapHandle;
Temp.MaskHandle := MaskHandle;
ACanvas.StretchDraw(Rect, Temp);
Temp.Free;
end;
{ Draw BGRA data to a canvas without transparency }
procedure TBGRADefaultBitmap.DataDrawOpaque(ACanvas: TCanvas;
Rect: TRect; AData: Pointer; ALineOrder: TRawImageLineOrder; AWidth, AHeight: integer);
var
Temp: TBitmap;
RawImage: TRawImage;
BitmapHandle, MaskHandle: HBitmap;
TempData: Pointer;
x, y: integer;
PTempData: PByte;
PSource: PByte;
ADataSize: integer;
ALineEndMargin: integer;
CreateResult: boolean;
{$IFDEF DARWIN}
TempShift: Byte;
{$ENDIF}
begin
if (AHeight = 0) or (AWidth = 0) then
exit;
ALineEndMargin := (4 - ((AWidth * 3) and 3)) and 3;
ADataSize := (AWidth * 3 + ALineEndMargin) * AHeight;
{$HINTS OFF}
GetMem(TempData, ADataSize);
{$HINTS ON}
PTempData := TempData;
PSource := AData;
{$IFDEF DARWIN} //swap red and blue values
for y := 0 to AHeight - 1 do
begin
for x := 0 to AWidth - 1 do
begin
PTempData^ := (PSource+2)^;
(PTempData+1)^ := (PSource+1)^;
(PTempData+2)^ := PSource^;
inc(PTempData,3);
inc(PSource,4);
end;
Inc(PTempData, ALineEndMargin);
end;
{$ELSE}
for y := 0 to AHeight - 1 do
begin
for x := 0 to AWidth - 1 do
begin
PWord(PTempData)^ := PWord(PSource)^;
(PTempData+2)^ := (PSource+2)^;
Inc(PTempData,3);
Inc(PSource, 4);
end;
Inc(PTempData, ALineEndMargin);
end;
{$ENDIF}
RawImage.Init;
RawImage.Description.Init_BPP24_B8G8R8_BIO_TTB(AWidth, AHeight);
{$IFDEF DARWIN}
TempShift := RawImage.Description.RedShift;
RawImage.Description.RedShift := RawImage.Description.BlueShift;
RawImage.Description.BlueShift := TempShift;
{$ENDIF}
RawImage.Description.LineOrder := ALineOrder;
RawImage.Description.LineEnd := rileDWordBoundary;
if integer(RawImage.Description.BytesPerLine) <> AWidth * 3 + ALineEndMargin then
begin
FreeMem(TempData);
raise FPImageException.Create('Line size is inconsistant');
end;
RawImage.Data := PByte(TempData);
RawImage.DataSize := ADataSize;
CreateResult := RawImage_CreateBitmaps(RawImage, BitmapHandle, MaskHandle, False);
FreeMem(TempData);
if not CreateResult then
raise FPImageException.Create('Failed to create bitmap handle');
Temp := TBitmap.Create;
Temp.Handle := BitmapHandle;
Temp.MaskHandle := MaskHandle;
ACanvas.StretchDraw(Rect, Temp);
Temp.Free;
end;
{-------------------------- Allocation routines -------------------------------}
procedure TBGRADefaultBitmap.ReallocData;
begin
FreeBitmap;
ReAllocMem(FData, NbPixels * sizeof(TBGRAPixel));
if (NbPixels > 0) and (FData = nil) then
raise EOutOfMemory.Create('TBGRADefaultBitmap: Not enough memory');
InvalidateBitmap;
FScanPtr := nil;
end;
procedure TBGRADefaultBitmap.FreeData;
begin
freemem(FData);
FData := nil;
end;
procedure TBGRADefaultBitmap.RebuildBitmap;
var
RawImage: TRawImage;
BitmapHandle, MaskHandle: HBitmap;
begin
if FBitmap <> nil then
FBitmap.Free;
FBitmap := TBitmapTracker.Create(self);
if (FWidth > 0) and (FHeight > 0) then
begin
RawImage.Init;
RawImage.Description.Init_BPP32_B8G8R8A8_BIO_TTB(FWidth, FHeight);
RawImage.Description.LineOrder := FLineOrder;
RawImage.Data := PByte(FData);
RawImage.DataSize := FWidth * FHeight * sizeof(TBGRAPixel);
if not RawImage_CreateBitmaps(RawImage, BitmapHandle, MaskHandle, False) then
raise FPImageException.Create('Failed to create bitmap handle');
FBitmap.Handle := BitmapHandle;
FBitmap.MaskHandle := MaskHandle;
end;
FBitmap.Canvas.AntialiasingMode := amOff;
FBitmapModified := False;
end;
procedure TBGRADefaultBitmap.FreeBitmap;
begin
FreeAndNil(FBitmap);
end;
procedure TBGRADefaultBitmap.GetImageFromCanvas(CanvasSource: TCanvas; x, y: integer);
var
bmp: TBitmap;
subBmp: TBGRACustomBitmap;
subRect: TRect;
cw,ch: integer;
begin
DiscardBitmapChange;
cw := CanvasSource.Width;
ch := CanvasSource.Height;
if (x < 0) or (y < 0) or (x+Width > cw) or
(y+Height > ch) then
begin
FillTransparent;
if (x+Width <= 0) or (y+Height <= 0) or
(x >= cw) or (y >= ch) then
exit;
if (x > 0) then subRect.Left := x else subRect.Left := 0;
if (y > 0) then subRect.Top := y else subRect.Top := 0;
if (x+Width > cw) then subRect.Right := cw else
subRect.Right := x+Width;
if (y+Height > ch) then subRect.Bottom := ch else
subRect.Bottom := y+Height;
subBmp := NewBitmap(subRect.Right-subRect.Left,subRect.Bottom-subRect.Top);
subBmp.GetImageFromCanvas(CanvasSource,subRect.Left,subRect.Top);
PutImage(subRect.Left-x,subRect.Top-y,subBmp,dmSet);
subBmp.Free;
exit;
end;
bmp := TBitmap.Create;
bmp.PixelFormat := pf24bit;
bmp.Width := Width;
bmp.Height := Height;
bmp.Canvas.CopyRect(Classes.rect(0, 0, Width, Height), CanvasSource,
Classes.rect(x, y, x + Width, y + Height));
LoadFromRawImage(bmp.RawImage, 255, True);
bmp.Free;
InvalidateBitmap;
end;
function TBGRADefaultBitmap.GetNbPixels: integer;
begin
result := FNbPixels;
end;
function TBGRADefaultBitmap.GetWidth: integer;
begin
Result := FWidth;
end;
function TBGRADefaultBitmap.GetHeight: integer;
begin
Result:= FHeight;
end;
function TBGRADefaultBitmap.GetRefCount: integer;
begin
result := FRefCount;
end;
function TBGRADefaultBitmap.GetLineOrder: TRawImageLineOrder;
begin
result := FLineOrder;
end;
function TBGRADefaultBitmap.GetCanvasOpacity: byte;
begin
result:= FCanvasOpacity;
end;
function TBGRADefaultBitmap.GetFontHeight: integer;
begin
result := FFontHeight;
end;
{ TBGRAPtrBitmap }
procedure TBGRAPtrBitmap.ReallocData;
begin
//nothing
end;
procedure TBGRAPtrBitmap.FreeData;
begin
FData := nil;
end;
constructor TBGRAPtrBitmap.Create(AWidth, AHeight: integer; AData: Pointer);
begin
inherited Create(AWidth, AHeight);
SetDataPtr(AData);
end;
function TBGRAPtrBitmap.Duplicate(DuplicateProperties: Boolean = False): TBGRACustomBitmap;
begin
Result := NewBitmap(Width, Height);
if DuplicateProperties then CopyPropertiesTo(TBGRADefaultBitmap(Result));
end;
procedure TBGRAPtrBitmap.SetDataPtr(AData: Pointer);
begin
FData := AData;
end;
procedure BGRAGradientFill(bmp: TBGRACustomBitmap; x, y, x2, y2: integer;
c1, c2: TBGRAPixel; gtype: TGradientType; o1, o2: TPointF; mode: TDrawMode;
gammaColorCorrection: boolean = True; Sinus: Boolean=False);
var
gradScan : TBGRAGradientScanner;
begin
//handles transparency
if (c1.alpha = 0) and (c2.alpha = 0) then
begin
bmp.FillRect(x, y, x2, y2, BGRAPixelTransparent, mode);
exit;
end;
gradScan := TBGRAGradientScanner.Create(c1,c2,gtype,o1,o2,gammaColorCorrection,Sinus);
bmp.FillRect(x,y,x2,y2,gradScan,mode);
gradScan.Free;
end;
initialization
with DefaultTextStyle do
begin
Alignment := taLeftJustify;
Layout := tlTop;
WordBreak := True;
SingleLine := True;
Clipping := True;
ShowPrefix := False;
Opaque := False;
end;
ImageHandlers.RegisterImageWriter ('Personal Computer eXchange', 'pcx', TFPWriterPcx);
ImageHandlers.RegisterImageReader ('Personal Computer eXchange', 'pcx', TFPReaderPcx);
ImageHandlers.RegisterImageWriter ('X Pixmap', 'xpm', TFPWriterXPM);
ImageHandlers.RegisterImageReader ('X Pixmap', 'xpm', TFPReaderXPM);
end.
| 30.734053 | 259 | 0.694219 |
83e19bf727f26873de388e80775cbdf4a67558f9
| 8,677 |
pas
|
Pascal
|
Lib/superdbg.pas
|
pult/SuperObject.Delphi
|
8607229ef33b5335def1c127e77f97d9527f9a73
|
[
"Unlicense"
] | 2 |
2020-12-29T09:53:38.000Z
|
2021-02-11T14:59:44.000Z
|
Lib/superdbg.pas
|
pult/SuperObject.Delphi
|
8607229ef33b5335def1c127e77f97d9527f9a73
|
[
"Unlicense"
] | 3 |
2020-12-12T10:12:58.000Z
|
2021-01-19T12:53:46.000Z
|
Lib/superdbg.pas
|
pult/SuperObject.Delphi
|
8607229ef33b5335def1c127e77f97d9527f9a73
|
[
"Unlicense"
] | 3 |
2020-09-19T01:00:52.000Z
|
2021-12-17T19:08:34.000Z
|
{ superdbg.pas } // version: 2021.0116.1637
unit superdbg;
interface
{$IFDEF FPC}
//{$mode objfpc}
{$mode delphi}
{$h+} // long AnsiString (not ShortString)
{$ENDIF}
{$IFNDEF FPC}{$IFDEF CONDITIONALEXPRESSIONS}
{$IF CompilerVersion >= 24}
{$LEGACYIFEND ON} // Allow old style mixed $endif $ifend
{$IFEND}
{$ENDIF}{$ENDIF}
{$IFDEF NEXTGEN}
{$ZEROBASEDSTRINGS OFF}
{$ENDIF}
{$IFNDEF FPC}{$IFDEF UNICODE}
{$HIGHCHARUNICODE ON} {make all #nn char constants Wide for better portability}
{$ENDIF}{$ENDIF}
{$IFDEF MSWINDOWS}
{.$define _JCL_} { optional }
{$ELSE}
{$undef _JCL_}
{$ENDIF}
uses
{$IFDEF _JCL_}
JclSysUtils, JclDebug,
{$ENDIF}
{$IFDEF MSWINDOWS}
Windows,
{$ENDIF}
SysUtils, Classes, supertypes;
const
jcl_present: boolean = {$IFDEF _JCL_}true{$ELSE}false{$ENDIF};
var
dbg_prefix: string = 'dbg:> ';
function GetExceptionStackList(AExceptionAddr: Pointer = nil): TStrings;
function GetExceptionStack(AExceptionAddr: Pointer = nil): string;
function GetCallStackList(): TStrings;
function GetCallStack(): string;
//procedure dbg(const S: string); overload;
procedure dbgTraceError(E: Exception = nil);
implementation
uses
superobject;
(*{$IFDEF MSWINDOWS}{$IF (not defined(FPC)) and (CompilerVersion < 23)} // Less then Delphi XE2. TODO: check console output for XE2 (CompilerVersion==23)
function AnsiToOEM(const S: AnsiString): AnsiString; overload; begin
SetLength(Result, Length(S));
if Length(S) > 0 then
Windows.CharToOemA(PAnsiChar(S), PAnsiChar(Result));
end;{$IFDEF UNICODE}
function AnsiToOEM(const S: string): string; overload; inline; begin
Result := string(AnsiToOem(AnsiString(S)));
end;
{$ENDIF}{$IFEND}{$ENDIF}
procedure dbgraw(const s: string);
begin
{$IFDEF MSWINDOWS}
OutputDebugString(PChar(
// for OutputDebugString(...) and "Event Viewer"(or dbgview.exe)
StringReplace(s, #9, #32#32#32#32, [rfReplaceAll])
));
{$ENDIF}
if IsConsole then // TODO: write to stderror
writeln({$IFDEF MSWINDOWS}{$IF (not defined(FPC)) and (CompilerVersion < 23)}AnsiToOEM{$IFEND}{$ENDIF}(s));
end;
procedure dbg(L: TStrings); overload;
var
i: Integer;
S: string;
begin
try
for i := 0 to L.Count - 1 do
begin
S := L[i];
if Length(S) > 0 then
begin
S := dbg_prefix + S;
dbgraw(S)
end
else
dbgraw(dbg_prefix);
end;
except
end;
end;
procedure dbg(const S: string); overload;
var L: TStrings; i: Integer;
begin
//OLD: dbgraw(dbg_prefix+S);
try
if Length(s) > 0 then
begin
L := TStringList.Create;
try
L.Text := S;
for i := 0 to L.Count - 1 do
dbgraw(dbg_prefix + L[i]);
finally
L.Free;
end;
end
else
dbgraw(dbg_prefix);
except
end;
end;//*)
function GetExceptionStackList(AExceptionAddr: Pointer): TStrings;
{$IFNDEF _JCL_}
begin
Result := nil;
end;
{$ELSE IFDEF _JCL_}
var
StackList: TJclStackInfoList;
L: TStringList;
begin
Result := nil;
if not jcl_present then
Exit;
L := nil;
StackList := nil;
try
try
if AExceptionAddr = nil then
AExceptionAddr := ExceptAddr;
if AExceptionAddr = nil then
Exit;
StackList := JclCreateStackList({Raw=}True, {IgnoreLevels=}7, AExceptionAddr{nil});
if Assigned(StackList) and (StackList.Count > 0) then
begin
CorrectExceptStackListTop(StackList, {SkipFirstItem:}True);
if StackList.Count > 0 then
begin
L := TStringList.Create;
StackList.AddToStrings(L, {Module}True, {AOffs}True, {POffs}True, {VAddr}True);
Result := L;
L := nil;
end;
end;
finally
StackList.Free;
L.Free;
end;
except
end;
end;
{$ENDIF _JCL}
function GetExceptionStack(AExceptionAddr: Pointer): string;
var
L: TStrings;
begin
if not jcl_present then
begin
Result := '';
Exit;
end;
L := GetExceptionStackList(AExceptionAddr);
if Assigned(L) then
begin
Result := L.Text;
L.Free;
end
else
Result := '';
end;
procedure _GetCallStackFinit; forward;
function GetCallStackListEx(ACaller: Pointer): TStrings;
{$IFNDEF _JCL_}
begin
Result := nil;
end;
{$ELSE IFDEF _JCL_}
var
StackList: TJclStackInfoList;
L: TStringList;
//
procedure remove_stack_items_created_by_it_call();
var
i, j: Integer;
ptrAppHandleExBegin: PtrUInt;
ptrAppHandleExEnd: PtrUInt;
ptrStackAddr: PtrUInt;
begin
if ACaller = nil then
ACaller := @GetCallStackListEx;
ptrAppHandleExBegin := PtrUInt(ACaller);
ptrAppHandleExEnd := PtrUInt(@_GetCallStackFinit); // GetCallStack _GetCallStackFinit
for i := StackList.Count - 1 downto 1 do
begin
ptrStackAddr := PtrUInt(StackList.Items[i].CallerAddr);
if (ptrStackAddr >= ptrAppHandleExBegin) and (ptrStackAddr < ptrAppHandleExEnd) then
begin
for j := i downto 0 do
StackList.Delete(0);
end;
end;
end;{}
//
begin
Result := nil;
if not jcl_present then
Exit;
L := nil;
StackList := nil;
try
try
StackList := JclCreateThreadStackTraceFromID(True, GetCurrentThreadID());
if Assigned(StackList) and (StackList.Count > 0) then
begin
if StackList.Count > 0 then
begin
//CorrectExceptStackListTop(StackList, {SkipFirstItem:}True);
remove_stack_items_created_by_it_call();
end;
if StackList.Count > 0 then
begin
L := TStringList.Create;
StackList.AddToStrings(L, {Module}True, {AOffs}True, {POffs}True, {VAddr}True);
Result := L;
L := nil;
end;
end;
finally
StackList.Free;
L.Free;
end;
except
end;
end;
{$ENDIF _JCL}
function GetCallStackList(): TStrings;
begin
Result := GetCallStackListEx({caller:}@GetCallStackList);
end;
//
function GetCallStack(): string;
var
L: TStrings;
begin
if not jcl_present then
begin
Result := '';
Exit;
end;
L := GetCallStackList();
if Assigned(L) then
begin
Result := L.Text;
L.Free;
end
else
Result := '';
end;
procedure dbgTraceError(E: Exception);
{$IFDEF _JCL_}
var
L: TStrings;
i: integer;
{$ENDIF}
begin
if (e = nil) then
dbgraw(dbg_prefix+'ERROR: (unknown)')
else if (e.ClassType = nil) then
dbgraw(dbg_prefix+'ERROR: (internal)')
else if (e.ClassType <> EAbort) then
try
//if (e is EAbort) then
// Exit;
try
dbg(Format('EXCEPTION(%s): %s', [e.ClassName, E.Message]));
except
dbgraw(dbg_prefix+'EXCEPTION: (internal)')
end;
//
{$IFDEF _JCL_}
if not jcl_present then
exit;
L := GetCallStackListEx({caller:}@dbgTraceError);
if L.Count = 0 then
Exit;
dbgraw(dbg_prefix);
dbgraw(dbg_prefix + '<TRACE_CALLS>');
for i := 0 to L.Count - 1 do
dbgraw(dbg_prefix + #32#32#32#32 + L[i]);
dbgraw(dbg_prefix + '<\TRACE_CALLS>');
{$ENDIF}
except
end;
end;
procedure _GetCallStackFinit(); begin {empty} end;
{$IFDEF _JCL_}
procedure DoInit();
var
s: string;
begin
s := ChangeFileExt(paramstr(0), '.jdbg');
jcl_present := FileExists(s);
if not jcl_present then
begin
s := ChangeFileExt(s, '.map');
jcl_present := FileExists(s);
end;
//if not jcl_present then dbg('# not exist "$(appname)[.map|.jdbg]" file');
if not jcl_present then
exit;
//
//<JCL>
//
//dbg('# hook: exception by "JCL"');
//
//ExcDialogSystemInfos := [siStackList, siModule{, siModuleList}];
//ExcDialogSystemInfos := ExcDialogSystemInfos + [siOsInfo];
JclStackTrackingOptions := JclStackTrackingOptions + [stRawMode];
JclStackTrackingOptions := JclStackTrackingOptions + [stStaticModuleList];
JclStackTrackingOptions := JclStackTrackingOptions + [stDelayedTrace, stAllModules];{}
//JclDebugThreadList.OnSyncException := TExceptionDialog.ExceptionThreadHandler;
JclHookThreads;
JclStartExceptionTracking;
JclTrackExceptionsFromLibraries;
//Application.OnException := TExceptionDialog.ExceptionHandler;
//
//<\JCL>
//
//- //dbg('# hook: "superobject.dbg"');
//- superobject.dbg := @superdbg.dbg;
//dbg('# hook: "superobject.dbgTraceError"');
superobject.dbgTraceError := @superdbg.dbgTraceError;
end;
initialization
DoInit();
{$ENDIF _JCL_}
end.
| 24.305322 | 154 | 0.623257 |
83f3b53025ca35f5c81b926eedf9dfaa177641d0
| 21,173 |
pas
|
Pascal
|
Apus.Engine.OpenGL.pas
|
Gofrettin/ApusGameEngine
|
b56072b797664cf53a189747b17dbf03f17075a1
|
[
"BSD-3-Clause"
] | null | null | null |
Apus.Engine.OpenGL.pas
|
Gofrettin/ApusGameEngine
|
b56072b797664cf53a189747b17dbf03f17075a1
|
[
"BSD-3-Clause"
] | null | null | null |
Apus.Engine.OpenGL.pas
|
Gofrettin/ApusGameEngine
|
b56072b797664cf53a189747b17dbf03f17075a1
|
[
"BSD-3-Clause"
] | null | null | null |
// OpenGL wrapper for the engine
//
// Copyright (C) 2020 Ivan Polyacov, Apus Software (ivan@apus-software.com)
// This file is licensed under the terms of BSD-3 license (see license.txt)
// This file is a part of the Apus Game Engine (http://apus-software.com/engine/)
{$IF Defined(MSWINDOWS) or Defined(LINUX)} {$DEFINE DGL} {$ENDIF}
unit Apus.Engine.OpenGL;
interface
uses Apus.Crossplatform, Apus.Engine.API, Apus.Images;
type
TOpenGL=class(TInterfacedObject,IGraphicsSystem,IGraphicsSystemConfig)
procedure Init(system:ISystemPlatform);
procedure Done;
function GetVersion:single;
function GetName:string;
// IGraphicsSystemConfig
procedure ChoosePixelFormats(out trueColor,trueColorAlpha,rtTrueColor,rtTrueColorAlpha:TImagePixelFormat;
economyMode:boolean=false);
function ShouldUseTextureAsDefaultRT:boolean;
function SetVSyncDivider(n:integer):boolean; // 0 - unlimited FPS, 1 - use monitor refresh rate
function QueryMaxRTSize:integer;
// Core interfaces
function config:IGraphicsSystemConfig;
function resman:IResourceManager;
function target:IRenderTarget;
function shader:IShader;
function clip:IClipping;
function transform:ITransformation;
function draw:IDrawer; inline;
function txt:ITextDrawer;
// Functions
procedure PresentFrame;
procedure CopyFromBackbuffer(srcX,srcY:integer;image:TRawImage);
procedure BeginPaint(target:TTexture);
procedure EndPaint;
procedure SetCullMode(mode:TCullMode);
procedure Restore;
procedure DrawDebugOverlay(idx:integer);
procedure PostDebugMsg(st:string8;id:integer=0);
procedure Breakpoint;
// For internal use
protected
glVersion,glRenderer:string;
glVersionNum:single;
sysPlatform:ISystemPlatform;
canPaint:integer;
end;
var
debugGL:boolean = {$IFDEF MSWINDOWS} true {$ELSE} true {$ENDIF};
procedure CheckForGLError(lab:integer=0); inline;
implementation
uses Apus.MyServis,
{$IFDEF MSWINDOWS}Windows,{$ENDIF}
{$IFDEF DGL}dglOpenGL,{$ENDIF}
SysUtils,
Types,
Apus.Geom3D,
Apus.Engine.Types,
Apus.Engine.Graphics,
Apus.Engine.Draw,
Apus.Engine.TextDraw,
Apus.Engine.ResManGL,
Apus.Engine.ShadersGL;
type
TRenderDevice=class(TInterfacedObject,IRenderDevice)
constructor Create;
destructor Destroy; override;
procedure Reset;
procedure Draw(primType:TPrimitiveType;primCount:integer;vertices:pointer;
vertexLayout:TVertexLayout);
// Draw indexed primitives using in-memory buffers
procedure DrawIndexed(primType:TPrimitiveType;vertices:pointer;indices:pointer;
vertexLayout:TVertexLayout; primCount:integer); overload;
// Ranged version
procedure DrawIndexed(primType:TPrimitiveType;vertices:pointer;indices:pointer;
vertexLayout:TVertexLayout; vrtStart,vrtCount:integer; indStart,primCount:integer); overload;
procedure DrawInstanced(primType:TPrimitiveType;vertices:pointer;indices:pointer;
vertexLayout:TVertexLayout;primCount,instances:integer);
(* // Draw primitives using built-in buffer
procedure DrawBuffer(primType,primCount,vrtStart:integer;
vertexBuf:TPainterBuffer;stride:integer); overload;
// Draw indexed primitives using built-in buffer
procedure DrawBuffer(primType:integer;vertexBuf,indBuf:TPainterBuffer;
stride:integer;vrtStart,vrtCount:integer; indStart,primCount:integer); overload;
function LockBuffer(buf:TPainterBuffer;offset,size:cardinal):pointer;
procedure UnlockBuffer(buf:TPainterBuffer); *)
protected
actualAttribArrays:shortint; // кол-во включенных аттрибутов (-1 - неизвестно, 2+кол-во текстур)
lastVertices:pointer;
lastLayout:TVertexLayout;
lastStride:integer;
procedure SetupAttributes(vertices:pointer;vertexLayout:TVertexLayout);
end;
TGLRenderTargetAPI=class(TRendertargetAPI)
constructor Create;
procedure Backbuffer; override;
procedure Texture(tex:TTexture); override;
procedure Clear(color:cardinal;zbuf:single=0;stencil:integer=-1); override;
procedure Viewport(oX,oY,VPwidth,VPheight,renderWidth,renderHeight:integer); override;
procedure UseDepthBuffer(test:TDepthBufferTest;writeEnable:boolean=true); override;
procedure BlendMode(blend:TBlendingMode); override;
procedure Clip(x,y,w,h:integer); override;
procedure ApplyMask; override;
procedure Resized(newWidth,newHeight:integer); override;
protected
scissor:boolean;
backBufferWidth,backBufferHeight:integer;
end;
//textureManager:TResource;
procedure CheckForGLError(lab:integer=0); inline;
var
error:cardinal;
begin
if debugGL then begin
error:=glGetError;
if error<>GL_NO_ERROR then begin
raise EError.Create(Format('GL Error %d: code %d (%x) :: %s',[lab,error,error,GetCallStack]));
//ForceLogMessage('GL Error %d: code %d (%x) :: %s',[lab,error,error,GetCallStack]);
end;
end;
end;
{ TOpenGL }
procedure TOpenGL.Init(system:ISystemPlatform);
var
i:integer;
cnt:GLINT;
pName,exList:string;
{$IFDEF SDL}
procedure InitOnSDL(system:ISystemPlatform);
begin
system.CreateOpenGLContext;
ReadImplementationProperties;
ReadExtensions;
end;
{$ENDIF}
{$IFDEF MSWINDOWS}
procedure InitOnWindows(system:ISystemPlatform);
var
DC:HDC;
RC:HGLRC;
begin
DC:=GetDC(system.GetWindowHandle);
RC:=system.CreateOpenGLContext; // Create basic GL context
LogMessage('Activate GL context');
ActivateRenderingContext(DC,RC); // Load all OpenGL functions and extensions
// Now create main context
end;
{$ENDIF}
begin
LogMessage('Init OpenGL');
sysPlatform:=system;
{$IFDEF DGL}
InitOpenGL;
{$ENDIF}
pName:=system.GetPlatformName;
if pName='SDL' then begin
{$IFDEF SDL}
InitOnSDL(system);
{$ENDIF}
end else
if pName='WINDOWS' then begin
{$IFDEF MSWINDOWS}
InitOnWindows(system);
{$ENDIF}
end;
CheckForGLError(011);
glVersion:=glGetString(GL_VERSION);
glRenderer:=glGetString(GL_RENDERER);
ForceLogMessage('OpenGL version: '+glVersion);
ForceLogMessage('OpenGL vendor: '+PAnsiChar(glGetString(GL_VENDOR)));
ForceLogMessage('OpenGL renderer: '+glRenderer);
if not GL_VERSION_3_0 then
raise Exception.Create('OpenGL 3.0 or higher required!'#13#10'Please update your video drivers.');
glGetIntegerv(GL_NUM_EXTENSIONS,@cnt);
for i:=0 to cnt-1 do
exList:=exList+#13#10+PAnsiChar(glGetStringi(GL_EXTENSIONS,i));
ForceLogMessage('OpenGL extensions: '+exList);
CheckForGLError(012);
glVersionNum:=GetVersion;
// Create API objects
renderDevice:=TRenderDevice.Create;
renderTargetAPI:=TGLRenderTargetAPI.Create;
transformationAPI:=TTransformationAPI.Create;
clippingAPI:=TClippingAPI.Create;
shadersAPI:=TGLShadersAPI.Create;
CheckForGLError(013);
TGLResourceManager.Create;
TDrawer.Create;
TTextDrawer.Create;
CheckForGLError(014);
end;
procedure TOpenGL.Done;
begin
//FreeAndNil(textDrawer);
//FreeAndNil(drawer);
// Тут нужно сперва уменьшить счётчик ссылок
//FreeAndNil(resourceManagerGL);
end;
procedure TOpenGL.PostDebugMsg(st:string8;id:integer=0);
begin
if @glDebugMessageInsert<>nil then
glDebugMessageInsert(GL_DEBUG_SOURCE_APPLICATION,GL_DEBUG_TYPE_MARKER, id, GL_DEBUG_SEVERITY_LOW,
length(st),@st[1]);
end;
procedure TOpenGL.PresentFrame;
begin
sysPlatform.OGLSwapBuffers;
end;
function TOpenGL.QueryMaxRTSize:integer;
begin
result:=resourceManagerGL.maxRTsize;
end;
procedure TOpenGL.Restore;
begin
renderDevice.Reset;
shader.Reset;
transform.DefaultView;
SetCullMode(cullNone);
end;
procedure TOpenGL.SetCullMode(mode: TCullMode);
begin
case mode of
cullCCW:begin
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
end;
cullCW:begin
glEnable(GL_CULL_FACE);
glCullFace(GL_FRONT);
end;
cullNone:glDisable(GL_CULL_FACE);
end;
end;
function TOpenGL.SetVSyncDivider(n: integer):boolean;
begin
result:=false;
{$IFDEF MSWINDOWS}
if WGL_EXT_swap_control then begin
wglSwapIntervalEXT(n);
LogMessage('VSync: swap interval=%d',[n]);
exit(true);
end;
{$ENDIF}
end;
procedure TOpenGL.BeginPaint(target: TTexture);
var
rw,rh:integer;
begin
if target=nil then
PostDebugMsg('BeginPaint')
else
PostDebugMsg('BeginPaint: '+target.name);
{if (canPaint>0) and (target=curTarget) then
raise EWarning.Create('BP: target already set');}
if canPaint>0 then
renderTargetAPI.Push;
inc(canPaint);
shadersAPI.Reset;
drawer.Reset;
renderTargetAPI.Texture(target);
renderTargetAPI.Viewport(0,0,-1,-1);
renderTargetAPI.BlendMode(blAlpha);
transformationAPI.DefaultView;
clippingAPI.Nothing;
CheckForGLError;
end;
procedure TOpenGL.EndPaint;
begin
if canPaint=0 then exit;
// LogMessage('EP: '+inttohex(integer(curtarget),8));
/// TODO: flush any draw cashes
ASSERT(canPaint>0);
dec(canPaint);
if canPaint>0 then begin
renderTargetAPI.Pop;
renderTargetAPI.BlendMode(blAlpha);
transformationAPI.DefaultView;
end;
clippingAPI.Restore;
end;
procedure TOpenGL.Breakpoint;
begin
glFlush;
end;
procedure TOpenGL.ChoosePixelFormats(out trueColor, trueColorAlpha, rtTrueColor,
rtTrueColorAlpha: TImagePixelFormat; economyMode: boolean);
begin
trueColor:=ipfXRGB;
trueColorAlpha:=ipfARGB;
rtTrueColor:=ipfXRGB;
rtTrueColorAlpha:=ipfARGB;
end;
procedure TOpenGL.CopyFromBackbuffer(srcX,srcY:integer;image:TRawImage);
begin
ASSERT(image.pixelFormat in [ipfARGB,ipfXRGB]);
glBindBuffer(GL_PIXEL_PACK_BUFFER,0);
glReadBuffer(GL_BACK);
image.Lock;
glReadPixels(srcX,srcY,image.Width,image.Height,GL_BGRA,GL_UNSIGNED_BYTE,image.data);
image.Unlock;
end;
function TOpenGL.ShouldUseTextureAsDefaultRT:boolean;
begin
result:=GL_VERSION_3_0;
end;
function TOpenGL.config: IGraphicsSystemConfig;
begin
result:=self;
end;
function TOpenGL.shader: IShader;
begin
result:=shadersAPI;
end;
function TOpenGL.clip: IClipping;
begin
result:=clippingAPI;
end;
function TOpenGL.target: IRenderTarget;
begin
result:=renderTargetAPI;
end;
function TOpenGL.resman: IResourceManager;
begin
result:=resourceManagerGL;
end;
function TOpenGL.transform: ITransformation;
begin
result:=transformationAPI;
end;
function TOpenGL.txt: ITextDrawer;
begin
result:=textDrawer;
end;
function TOpenGL.draw:IDrawer;
begin
result:=drawer;
end;
procedure TOpenGL.DrawDebugOverlay(idx: integer);
begin
end;
function TOpenGL.GetName: string;
begin
result:=className;
end;
function TOpenGL.GetVersion: single;
begin
result:=1.4;
if GL_VERSION_1_5 then result:=1.5;
if GL_VERSION_2_0 then result:=2.0;
if GL_VERSION_2_1 then result:=2.1;
if GL_VERSION_3_0 then result:=3.0;
if GL_VERSION_3_1 then result:=3.1;
if GL_VERSION_3_2 then result:=3.2;
if GL_VERSION_3_3 then result:=3.3;
if GL_VERSION_4_0 then result:=4.0;
if GL_VERSION_4_1 then result:=4.1;
if GL_VERSION_4_2 then result:=4.2;
if GL_VERSION_4_3 then result:=4.3;
if GL_VERSION_4_4 then result:=4.4;
if GL_VERSION_4_5 then result:=4.5;
if GL_VERSION_4_6 then result:=4.6;
end;
{ TRenderDevice }
constructor TRenderDevice.Create;
begin
end;
destructor TRenderDevice.Destroy;
begin
inherited;
end;
procedure TRenderDevice.Draw(primType:TPrimitiveType; primCount: integer; vertices: pointer;
vertexLayout:TVertexLayout);
begin
shadersAPI.Apply(vertexLayout);
SetupAttributes(vertices,vertexLayout);
case primtype of
LINE_LIST:glDrawArrays(GL_LINES,0,primCount*2);
LINE_STRIP:glDrawArrays(GL_LINE_STRIP,0,primCount+1);
TRG_LIST:glDrawArrays(GL_TRIANGLES,0,primCount*3);
TRG_FAN:glDrawArrays(GL_TRIANGLE_FAN,0,primCount+2);
TRG_STRIP:glDrawArrays(GL_TRIANGLE_STRIP,0,primCount+2);
end;
CheckForGLError(111);
end;
procedure TRenderDevice.DrawIndexed(primType:TPrimitiveType;vertices:pointer;indices:pointer;
vertexLayout:TVertexLayout;primCount:integer);
begin
shader.Apply(vertexLayout);
SetupAttributes(vertices,vertexLayout);
case primtype of
LINE_LIST:glDrawElements(GL_LINES,primCount*2,GL_UNSIGNED_SHORT,indices);
LINE_STRIP:glDrawElements(GL_LINE_STRIP,primCount+1,GL_UNSIGNED_SHORT,indices);
TRG_LIST:glDrawElements(GL_TRIANGLES,primCount*3,GL_UNSIGNED_SHORT,indices);
TRG_FAN:glDrawElements(GL_TRIANGLE_FAN,primCount+2,GL_UNSIGNED_SHORT,indices);
TRG_STRIP:glDrawElements(GL_TRIANGLE_STRIP,primCount+2,GL_UNSIGNED_SHORT,indices);
end;
CheckForGLError(112);
end;
procedure TRenderDevice.DrawIndexed(primType:TPrimitiveType;vertices:pointer;indices:pointer;
vertexLayout:TVertexLayout; vrtStart,vrtCount:integer; indStart,primCount:integer);
begin
shader.Apply(vertexLayout);
SetupAttributes(vertices,vertexLayout);
case primtype of
LINE_LIST:glDrawRangeElements(GL_LINES,vrtStart,vrtStart+vrtCount-1,primCount*2,GL_UNSIGNED_SHORT,indices);
LINE_STRIP:glDrawRangeElements(GL_LINE_STRIP,vrtStart,vrtStart+vrtCount-1,primCount+1,GL_UNSIGNED_SHORT,indices);
TRG_LIST:glDrawRangeElements(GL_TRIANGLES,vrtStart,vrtStart+vrtCount-1,primCount*3,GL_UNSIGNED_SHORT,indices);
TRG_FAN:glDrawRangeElements(GL_TRIANGLE_FAN,vrtStart,vrtStart+vrtCount-1,primCount+2,GL_UNSIGNED_SHORT,indices);
TRG_STRIP:glDrawRangeElements(GL_TRIANGLE_STRIP,vrtStart,vrtStart+vrtCount-1,primCount+2,GL_UNSIGNED_SHORT,indices);
end;
CheckForGLError(112);
end;
procedure TRenderDevice.DrawInstanced(primType:TPrimitiveType;vertices:pointer;indices:pointer;
vertexLayout:TVertexLayout;primCount,instances:integer);
begin
shader.Apply(vertexLayout);
SetupAttributes(vertices,vertexLayout);
case primtype of
LINE_LIST:glDrawElementsInstanced(GL_LINES,primCount*2,GL_UNSIGNED_SHORT,indices,instances);
LINE_STRIP:glDrawElementsInstanced(GL_LINE_STRIP,primCount+1,GL_UNSIGNED_SHORT,indices,instances);
TRG_LIST:glDrawElementsInstanced(GL_TRIANGLES,primCount*3,GL_UNSIGNED_SHORT,indices,instances);
TRG_FAN:glDrawElementsInstanced(GL_TRIANGLE_FAN,primCount+2,GL_UNSIGNED_SHORT,indices,instances);
TRG_STRIP:glDrawElementsInstanced(GL_TRIANGLE_STRIP,primCount+2,GL_UNSIGNED_SHORT,indices,instances);
end;
CheckForGLError(113);
end;
procedure TRenderDevice.Reset;
var
i: Integer;
begin
lastVertices:=nil;
lastLayout.stride:=0;
for i:=0 to 9 do glDisableVertexAttribArray(i);
actualAttribArrays:=0;
end;
procedure TRenderDevice.SetupAttributes(vertices:pointer;vertexLayout:TVertexLayout);
var
i,v,n,dim:integer;
p:pointer;
begin
if (lastVertices=vertices) and (vertexLayout.Equals(lastLayout)) then exit;
lastVertices:=vertices;
lastLayout:=vertexLayout;
n:=0;
with vertexLayout do
for i:=0 to 4 do begin
v:=(layout and $F)*4;
layout:=layout shr 4;
p:=pointer(UIntPtr(vertices)+v);
if (v=0) and (i>0) then continue;
if (i=0) and (v=15*4) then begin // position is 2D
dim:=2; p:=vertices;
end else
dim:=3;
case i of
0:glVertexAttribPointer(n,dim,GL_FLOAT,GL_FALSE,stride,p); // position
1:glVertexAttribPointer(n,3,GL_FLOAT,GL_FALSE,stride,p); // normal
2:glVertexAttribPointer(n,4,GL_UNSIGNED_BYTE,GL_TRUE,stride,p); // color
3:glVertexAttribPointer(n,2,GL_FLOAT,GL_FALSE,stride,p); // uv1
4:glVertexAttribPointer(n,2,GL_FLOAT,GL_FALSE,stride,p); // uv2
end;
inc(n);
if layout=0 then break;
end;
// adjust number of vertex attrib arrays
if actualAttribArrays<0 then begin
for i:=0 to 4 do
if i<n then glEnableVertexAttribArray(i)
else glDisableVertexAttribArray(i);
actualAttribArrays:=n;
end;
while n>actualAttribArrays do begin
glEnableVertexAttribArray(actualAttribArrays);
inc(actualAttribArrays);
end;
while n<actualAttribArrays do begin
dec(actualAttribArrays);
glDisableVertexAttribArray(actualAttribArrays);
end;
end;
{ TGLRenderTargetAPI }
procedure TGLRenderTargetAPI.BlendMode(blend: TBlendingMode);
begin
if blend=curBlend then exit;
case blend of
blNone:begin
glDisable(GL_BLEND);
end;
blAlpha:begin
glEnable(GL_BLEND);
if GL_VERSION_2_0 then
glBlendFuncSeparate(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA)
else
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
end;
blAdd:begin
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE);
end;
blSub:begin
raise EError.Create('blSub not supported');
end;
blModulate:begin
glEnable(GL_BLEND);
glBlendFuncSeparate(GL_ZERO,GL_SRC_COLOR,GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
end;
blModulate2X:begin
glEnable(GL_BLEND);
glBlendFuncSeparate(GL_DST_COLOR,GL_SRC_COLOR,GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
end;
blMove:begin
glEnable(GL_BLEND);
glBlendFunc(GL_ONE,GL_ZERO);
end
else
raise EWarning.Create('Blending mode not supported');
end;
curBlend:=blend;
CheckForGLError(103);
end;
function ColorComponent(color:cardinal;idx:integer):single;
begin
result:=((color shr (idx*8)) and $FF)/255;
end;
procedure TGLRenderTargetAPI.Clear(color:cardinal; zbuf:single; stencil:integer);
var
mask:cardinal;
val:GLboolean;
begin
mask:=GL_COLOR_BUFFER_BIT;
glGetBooleanv(GL_SCISSOR_TEST,@val);
CheckForGLError(101);
if val then glDisable(GL_SCISSOR_TEST);
glClearColor(
ColorComponent(color,2),
ColorComponent(color,1),
ColorComponent(color,0),
ColorComponent(color,3));
if zBuf>=0 then begin
mask:=mask+GL_DEPTH_BUFFER_BIT;
{$IFDEF GLES}
glClearDepthf(zbuf);
{$ELSE}
glClearDepth(zbuf);
{$ENDIF}
end;
if stencil>=0 then begin
mask:=mask+GL_STENCIL_BUFFER_BIT;
glClearStencil(stencil);
end;
glClear(mask);
CheckForGLError(101);
if val then glEnable(GL_SCISSOR_TEST);
end;
procedure TGLRenderTargetAPI.Clip(x,y,w,h: integer);
begin
if (x<=0) and (y<=0) and (x+w>=realWidth) and (y+h>=realHeight) then begin
if scissor then begin
glDisable(GL_SCISSOR_TEST);
scissor:=false;
end;
exit;
end;
if not scissor then begin
glEnable(GL_SCISSOR_TEST);
scissor:=true;
end;
if curTarget=nil then begin // invert Y-axis
y:=realHeight-y-h;
end;
glScissor(x,y,w,h);
end;
constructor TGLRenderTargetAPI.Create;
var
data:array[0..3] of GLInt;
begin
inherited;
glGetIntegerv(GL_VIEWPORT,@data[0]);
backBufferWidth:=data[2];
backBufferHeight:=data[3];
end;
procedure TGLRenderTargetAPI.Resized(newWidth, newHeight: integer);
begin
backbufferWidth:=newWidth;
backbufferHeight:=newHeight;
end;
procedure TGLRenderTargetAPI.ApplyMask;
begin
{$IFDEF GLES}
glColorMask((curmask and 4),
(curmask and 2),
(curmask and 1),
(curmask and 8));
{$ELSE}
glColorMask((curmask and 4)>0,
(curmask and 2)>0,
(curmask and 1)>0,
(curmask and 8)>0);
{$ENDIF}
end;
procedure TGLRenderTargetAPI.Backbuffer;
begin
inherited;
{$IFDEF GLES11}
glBindFramebufferOES(GL_FRAMEBUFFER_OES,0);
{$ENDIF}
{$IFDEF GLES20}
glBindFramebuffer(GL_FRAMEBUFFER,0);
{$ENDIF}
{$IFNDEF GLES}
if GL_ARB_framebuffer_object then
glBindFramebuffer(GL_FRAMEBUFFER,0);
{$ENDIF}
realWidth:=backBufferWidth;
realHeight:=backBufferHeight;
CheckForGLError(100);
glScissor(0,0,realWidth,realHeight);
clippingAPI.AssignActual(Rect(0,0,realWidth,realHeight));
glDisable(GL_SCISSOR_TEST);
scissor:=false;
end;
procedure TGLRenderTargetAPI.Texture(tex:TTexture);
begin
if tex=nil then begin
Backbuffer;
exit;
end;
inherited;
ASSERT(tex is TGLTexture);
TGLTexture(tex).SetAsRenderTarget;
realWidth:=tex.width;
realHeight:=tex.height;
renderWidth:=realWidth;
renderHeight:=realHeight;
clippingAPI.AssignActual(Rect(0,0,realWidth,realHeight));
glDisable(GL_SCISSOR_TEST);
scissor:=false;
end;
procedure TGLRenderTargetAPI.UseDepthBuffer(test:TDepthBufferTest; writeEnable:boolean);
begin
if test=dbDisabled then begin
glDisable(GL_DEPTH_TEST)
end else begin
glEnable(GL_DEPTH_TEST);
case test of
dbPass:glDepthFunc(GL_ALWAYS);
dbPassLess:glDepthFunc(GL_LESS);
dbPassLessEqual:glDepthFunc(GL_LEQUAL);
dbPassGreater:glDepthFunc(GL_GREATER);
dbNever:glDepthFunc(GL_NEVER);
end;
glDepthMask(writeEnable);
end;
end;
procedure TGLRenderTargetAPI.Viewport(oX, oY, VPwidth, VPheight, renderWidth,
renderHeight: integer);
begin
inherited; // adjust viewport here
if curTarget<>nil then
glViewport(vPort.Left,vPort.Top,vPort.Width,vPort.Height)
else
glViewport(vPort.Left,realHeight-vPort.Top-vPort.Height,vPort.Width,vPort.Height);
end;
end.
| 28.612162 | 120 | 0.733245 |
f179d1548855913f8c6c38b424a4fad146272187
| 9,523 |
pas
|
Pascal
|
src/Libs/Protocol/Implementations/FastCGI/FcgiBaseParserImpl.pas
|
atkins126/fano
|
472679437cb42637b0527dda8255ec52a3e1e953
|
[
"MIT"
] | null | null | null |
src/Libs/Protocol/Implementations/FastCGI/FcgiBaseParserImpl.pas
|
atkins126/fano
|
472679437cb42637b0527dda8255ec52a3e1e953
|
[
"MIT"
] | null | null | null |
src/Libs/Protocol/Implementations/FastCGI/FcgiBaseParserImpl.pas
|
atkins126/fano
|
472679437cb42637b0527dda8255ec52a3e1e953
|
[
"MIT"
] | null | null | null |
{*!
* Fano Web Framework (https://fanoframework.github.io)
*
* @link https://github.com/fanoframework/fano
* @copyright Copyright (c) 2018 - 2020 Zamrony P. Juhara
* @license https://github.com/fanoframework/fano/blob/master/LICENSE (MIT)
*}
unit FcgiBaseParserImpl;
interface
{$MODE OBJFPC}
{$H+}
uses
InjectableObjectImpl,
FcgiRecordIntf,
FcgiRecordFactoryIntf,
FcgiFrameParserIntf,
StreamAdapterIntf,
MemoryAllocatorIntf,
MemoryDeallocatorIntf;
type
(*!-----------------------------------------------
* FastCGI Base Parser
*
* @author Zamrony P. Juhara <zamronypj@yahoo.com>
*-----------------------------------------------*)
TFcgiBaseParser = class (TInjectableObject, IFcgiFrameParser, IMemoryAllocator, IMemoryDeallocator)
protected
fRecordFactories : TFcgiRecordFactoryArray;
fMemAlloc : IMemoryAllocator;
fMemDealloc : IMemoryDeallocator;
procedure raiseExceptionIfBufferNil(const buffer : pointer);
procedure raiseExceptionIfInvalidBufferSize(const bufferSize : int64);
procedure raiseExceptionIfInvalidBuffer(const buffer : pointer; const bufferSize : int64);
function isValidRecordType(const reqType : byte) : boolean;
procedure raiseExceptionIfInvalidRecordType(const reqType : byte);
public
constructor create(
const factories : TFcgiRecordFactoryArray;
const memAlloc : IMemoryAllocator;
const memDealloc : IMemoryDeallocator
);
destructor destroy(); override;
(*!------------------------------------------------
* read stream and return found record in memory buffer
*-----------------------------------------------
* @param bufPtr, memory buffer to store FastCGI record
* @param bufSize, memory buffer size
* @return true if stream is exhausted
*-----------------------------------------------*)
function readRecord(
const stream : IStreamAdapter;
out bufPtr : pointer;
out bufSize : ptrUint
) : boolean; virtual; abstract;
(*!------------------------------------------------
* test if buffer contain FastCGI frame package
* i.e FastCGI header + payload
*-----------------------------------------------
* @param buffer, pointer to current buffer
* @return true if buffer contain valid frame
*-----------------------------------------------*)
function hasFrame(const buffer : pointer; const bufferSize : ptrUint) : boolean;
(*!------------------------------------------------
* parse current buffer and create its corresponding
* FastCGI record instance
*-----------------------------------------------
* @param buffer, pointer to current buffer
* @param bufferSize, size of buffer
* @return IFcgiRecord instance
* @throws EInvalidFcgiBuffer exception when buffer is nil
* @throws EInvalidFcgiHeaderLen exception when header size not valid
*-----------------------------------------------*)
function parseFrame(const buffer : pointer; const bufferSize : ptrUint) : IFcgiRecord;
(*!------------------------------------------------
* allocate memory
*-----------------------------------------------
* @param requestedSize, number of bytes to allocate
* @return pointer of allocated memory
*-----------------------------------------------*)
function allocate(const requestedSize : PtrUint) : pointer;
(*!------------------------------------------------
* deallocate memory
*-----------------------------------------------
* @param ptr, pointer of memory to be allocated
* @param requestedSize, number of bytes to deallocate
*-----------------------------------------------*)
procedure deallocate(const ptr : pointer; const requestedSize : PtrUint);
end;
implementation
uses
fastcgi,
EInvalidFcgiBufferImpl,
EInvalidFcgiRecordTypeImpl,
EInvalidFcgiHeaderLenImpl;
constructor TFcgiBaseParser.create(
const factories : TFcgiRecordFactoryArray;
const memAlloc : IMemoryAllocator;
const memDealloc : IMemoryDeallocator
);
begin
inherited create();
fRecordFactories := factories;
fMemAlloc := memAlloc;
fMemDealloc := memDealloc;
end;
destructor TFcgiBaseParser.destroy();
var i : integer;
begin
inherited destroy();
for i:= length(fRecordFactories) -1 downto 0 do
begin
fRecordFactories[i] := nil;
end;
setLength(fRecordFactories, 0);
fRecordFactories := nil;
fMemAlloc := nil;
fMemDealloc := nil;
end;
procedure TFcgiBaseParser.raiseExceptionIfBufferNil(const buffer : pointer);
begin
if (buffer = nil) then
begin
raise EInvalidFcgiBuffer.create('FastCGI buffer nil');
end;
end;
procedure TFcgiBaseParser.raiseExceptionIfInvalidBufferSize(const bufferSize : int64);
begin
if (bufferSize < FCGI_HEADER_LEN) then
begin
raise EInvalidFcgiHeaderLen.create('Not enough data in the buffer to parse');
end;
end;
procedure TFcgiBaseParser.raiseExceptionIfInvalidBuffer(const buffer : pointer; const bufferSize : int64);
begin
raiseExceptionIfBufferNil(buffer);
raiseExceptionIfInvalidBufferSize(bufferSize);
end;
(*!------------------------------------------------
* test if buffer contain FastCGI frame package
* i.e FastCGI header + payload
*-----------------------------------------------
* @param buffer, pointer to current buffer
* @param bufferSize, size of buffer
* @return true if buffer contain valid frame
*-----------------------------------------------*)
function TFcgiBaseParser.hasFrame(const buffer : pointer; const bufferSize : ptrUint) : boolean;
var header : PFCGI_Header;
contentLength :word;
begin
raiseExceptionIfBufferNil(buffer);
header := buffer;
//header^.contentlength is big endian, convert it to native endian
contentLength := BEtoN(header^.contentLength);
result := (bufferSize >= (FCGI_HEADER_LEN + contentLength + header^.paddingLength));
end;
function TFcgiBaseParser.isValidRecordType(const reqType : byte) : boolean;
begin
result := (reqType = FCGI_BEGIN_REQUEST) or
(reqType = FCGI_ABORT_REQUEST) or
(reqType = FCGI_END_REQUEST) or
(reqType = FCGI_PARAMS) or
(reqType = FCGI_STDIN) or
(reqType = FCGI_STDOUT) or
(reqType = FCGI_STDERR) or
(reqType = FCGI_DATA) or
(reqType = FCGI_GET_VALUES) or
(reqType = FCGI_GET_VALUES_RESULT) or
(reqType = FCGI_UNKNOWN_TYPE);
end;
procedure TFcgiBaseParser.raiseExceptionIfInvalidRecordType(const reqType : byte);
begin
if (not isValidRecordType(reqType)) then
begin
raise EInvalidFcgiRecordType.createFmt('Invalid FCGI record type %d received', [reqType]);
end;
end;
(*!------------------------------------------------
* parse current buffer and create its corresponding
* FastCGI record instance
*-----------------------------------------------
* @param buffer, pointer to current buffer
* @param bufferSize, size of buffer
* @return IFcgiRecord instance
* @throws EInvalidFcgiHeaderLen exception when header size not valid
*-----------------------------------------------*)
function TFcgiBaseParser.parseFrame(const buffer : pointer; const bufferSize : ptrUint) : IFcgiRecord;
var header : PFCGI_Header;
factory : IFcgiRecordFactory;
begin
raiseExceptionIfInvalidBuffer(buffer, bufferSize);
header := buffer;
raiseExceptionIfInvalidRecordType(header^.reqtype);
factory := fRecordFactories[header^.reqtype];
factory.setDeallocator(self);
try
result := factory.setBuffer(buffer, bufferSize).build();
finally
//remove reference to ourself, so reference count properly incr/decr
//to avoid memory leak
factory.setDeallocator(nil);
factory := nil;
end;
end;
(*!------------------------------------------------
* allocate memory
*-----------------------------------------------
* @param requestedSize, number of bytes to allocate
* @return pointer of allocated memory
*-----------------------------------------------*)
function TFcgiBaseParser.allocate(const requestedSize : PtrUint) : pointer;
begin
result := fMemAlloc.allocate(requestedSize);
end;
(*!------------------------------------------------
* deallocate memory
*-----------------------------------------------
* @param ptr, pointer of memory to be allocated
* @param requestedSize, number of bytes to deallocate
*-----------------------------------------------*)
procedure TFcgiBaseParser.deallocate(const ptr : pointer; const requestedSize : PtrUint);
begin
fMemDealloc.deallocate(ptr, requestedSize);
end;
end.
| 37.492126 | 111 | 0.545311 |
61fdebe47c9b48d57b62ccea23d7c4182e78d20d
| 299 |
dpr
|
Pascal
|
module/dbImage/imgView.dpr
|
1aq/PBox
|
67ced599ee36ceaff097c6584f8100cf96006dfe
|
[
"MIT"
] | null | null | null |
module/dbImage/imgView.dpr
|
1aq/PBox
|
67ced599ee36ceaff097c6584f8100cf96006dfe
|
[
"MIT"
] | null | null | null |
module/dbImage/imgView.dpr
|
1aq/PBox
|
67ced599ee36ceaff097c6584f8100cf96006dfe
|
[
"MIT"
] | null | null | null |
library imgView;
{$IF CompilerVersion >= 21.0}
{$WEAKLINKRTTI ON}
{$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}
{$IFEND}
uses
System.SysUtils,
System.Classes,
uMainForm in 'uMainForm.pas' {frmImageView};
{$R *.res}
exports
db_ShowDllForm_Plugins;
begin
end.
| 14.95 | 55 | 0.652174 |
f18b17e650bdb7e3aaa484cd25442143370f1d46
| 8,928 |
pas
|
Pascal
|
RBTree/RBTree.pas
|
dsapolska/dccontainers
|
f098cc9491b99cee8cc95758b6acdb1f01cbdba0
|
[
"MIT"
] | 6 |
2019-02-01T02:33:13.000Z
|
2022-02-21T11:29:31.000Z
|
RBTree/RBTree.pas
|
dsapolska/dccontainers
|
f098cc9491b99cee8cc95758b6acdb1f01cbdba0
|
[
"MIT"
] | null | null | null |
RBTree/RBTree.pas
|
dsapolska/dccontainers
|
f098cc9491b99cee8cc95758b6acdb1f01cbdba0
|
[
"MIT"
] | 1 |
2020-09-26T03:04:57.000Z
|
2020-09-26T03:04:57.000Z
|
unit rbtree;
interface
uses
Classes, RBTreeTypes;
type
TRBTree = class
private
FRoot : TRBNodeP;
FLeftMost : TRBNodeP;
FRightMost : TRBNodeP;
FCompareFunc : TListSortCompare;
procedure RotateLeft(var x : TRBNodeP);
procedure RotateRight(var x : TRBNodeP);
function Minimum(var x : TRBNodeP) : TRBNodeP;
function Maximum(var x : TRBNodeP) : TRBNodeP;
procedure FastErase(x : TRBNodeP);
public
property Root : TRBNodeP read FRoot;
property First : TRBNodeP read FLeftMost;
property Last : TRBNodeP read FRightMost;
constructor Create(ACompareFunc : TListSortCompare);
destructor Destroy; override;
procedure Clear;
function Find(key : Pointer) : TRBNodeP;
function Add(key : Pointer) : TRBNodeP;
procedure Delete(z : TRBNodeP);
end;
implementation
constructor TRBTree.Create(ACompareFunc : TListSortCompare);
begin
inherited Create;
FCompareFunc:=ACompareFunc;
FRoot:=nil;
FLeftMost:=nil;
FRightMost:=nil;
end;
destructor TRBTree.Destroy;
begin
Clear();
inherited Destroy;
end;
procedure TRBTree.FastErase(x : TRBNodeP);
begin
if (x^.left <> nil) then FastErase(x^.left);
if (x^.right <> nil) then FastErase(x^.right);
dispose(x);
end;
procedure TRBTree.Clear;
begin
if (FRoot <> nil) then
FastErase(FRoot);
FRoot:=nil;
FLeftMost:=nil;
FRightMost:=nil;
end;
function TRBTree.Find(key : Pointer) : TRBNodeP;
var
cmp : integer;
begin
Result:=FRoot;
while (Result <> nil) do
begin
cmp:=FCompareFunc(Result^.k, key);
if cmp < 0 then
Result:=Result^.right
else if cmp > 0 then
Result:=Result^.left
else
break;
end;
end;
procedure TRBTree.RotateLeft(var x : TRBNodeP);
var
y : TRBNodeP;
begin
y:=x^.right;
x^.right:=y^.left;
if (y^.left <> nil) then
y^.left^.parent:=x;
y^.parent:=x^.parent;
if (x = FRoot) then
FRoot:=y
else if (x = x^.parent^.left) then
x^.parent^.left:=y
else
x^.parent^.right:=y;
y^.left:=x;
x^.parent:=y;
end;
procedure TRBTree.RotateRight(var x : TRBNodeP);
var
y : TRBNodeP;
begin
y:=x^.left;
x^.left:=y^.right;
if (y^.right <> nil) then
y^.right^.parent:=x;
y^.parent:=x^.parent;
if (x = FRoot) then
FRoot:=y
else if (x = x^.parent^.right) then
x^.parent^.right:=y
else
x^.parent^.left:=y;
y^.right:=x;
x^.parent:=y;
end;
function TRBTree.Minimum(var x : TRBNodeP) : TRBNodeP;
begin
Result:=x;
while (Result^.left <> nil) do
Result:=Result^.left;
end;
function TRBTree.Maximum(var x : TRBNodeP) : TRBNodeP;
begin
Result:=x;
while (Result^.right <> nil) do
Result:=Result^.right;
end;
function TRBTree.Add(key : Pointer) : TRBNodeP;
var
x, y, z, zpp : TRBNodeP;
cmp : Integer;
begin
Result:=nil;
if key = nil then exit;
z:=New(TRBNodeP);
{ Initialize fields in new node z }
z^.k:=key;
z^.left:=nil;
z^.right:=nil;
z^.color:=clRed;
Result:=z;
{ Maintain leftmost and rightmost nodes }
if ((FLeftMost = nil) or (FCompareFunc(key, FLeftMost^.k) < 0)) then
FLeftMost:=z;
if ((FRightMost = nil) or (FCompareFunc(FRightMost^.k, key) < 0)) then
FRightMost:=z;
{ Insert node z }
y:=nil;
x:=FRoot;
while (x <> nil) do
begin
y:=x;
cmp:=FCompareFunc(key, x^.k);
if (cmp < 0) then
x:=x^.left
else if (cmp > 0) then
x:=x^.right
else begin
{ Value already exists in tree. }
// Result:=x;
Result:=nil;
dispose(z);
exit;
end;
end;
z^.parent:=y;
if (y = nil) then
FRoot:=z
else if (FCompareFunc(key, y^.k) < 0) then
y^.left:=z
else
y^.right:=z;
{ Rebalance tree }
while ((z <> FRoot) and (z^.parent^.color = clRed)) do
begin
zpp:=z^.parent^.parent;
if (z^.parent = zpp^.left) then
begin
y:=zpp^.right;
if ((y <> nil) and (y^.color = clRed)) then
begin
z^.parent^.color:=clBlack;
y^.color:=clBlack;
zpp^.color:=clRed;
z:=zpp;
end
else begin
if (z = z^.parent^.right) then
begin
z:=z^.parent;
rotateLeft(z);
end;
z^.parent^.color:=clBlack;
zpp^.color:=clRed;
rotateRight(zpp);
end;
end
else begin
y:=zpp^.left;
if ((y <> nil) and (y^.color = clRed)) then
begin
z^.parent^.color:=clBlack;
y^.color:=clBlack;
zpp^.color:=clRed;
z:=zpp;
end
else begin
if (z = z^.parent^.left) then
begin
z:=z^.parent;
rotateRight(z);
end;
z^.parent^.color:=clBlack;
zpp^.color:=clRed;
rotateLeft(zpp);
end;
end;
end;
FRoot^.color:=clBlack;
end;
procedure TRBTree.Delete(z : TRBNodeP);
var
w, x, y, x_parent : TRBNodeP;
tmpcol : TRBColor;
begin
if z = nil then exit;
y:=z;
x:=nil;
x_parent:=nil;
if (y^.left = nil) then { z has at most one non-null child. y = z. }
x:=y^.right { x might be null. }
else begin
if (y^.right = nil) then { z has exactly one non-null child. y = z. }
x:=y^.left { x is not null. }
else begin
{ z has two non-null children. Set y to }
y:=y^.right; { z's successor. x might be null. }
while (y^.left <> nil) do
y:=y^.left;
x:=y^.right;
end;
end;
if (y <> z) then
begin
{ "copy y's sattelite data into z" }
{ relink y in place of z. y is z's successor }
z^.left^.parent:=y;
y^.left:=z^.left;
if (y <> z^.right) then
begin
x_parent:=y^.parent;
if (x <> nil) then
x^.parent:=y^.parent;
y^.parent^.left:=x; { y must be a child of left }
y^.right:=z^.right;
z^.right^.parent:=y;
end
else
x_parent:=y;
if (FRoot = z) then
FRoot:=y
else if (z^.parent^.left = z) then
z^.parent^.left:=y
else
z^.parent^.right:=y;
y^.parent:=z^.parent;
tmpcol:=y^.color;
y^.color:=z^.color;
z^.color:=tmpcol;
y:=z;
{ y now points to node to be actually deleted }
end
else begin { y = z }
x_parent:=y^.parent;
if (x <> nil) then
x^.parent:=y^.parent;
if (FRoot = z) then
FRoot:=x
else begin
if (z^.parent^.left = z) then
z^.parent^.left:=x
else
z^.parent^.right:=x;
end;
if (FLeftMost = z) then
begin
if (z^.right = nil) then
FLeftMost:=z^.parent { z^.left must be null also }
else
FLeftMost:=minimum(x);
end;
if (FRightMost = z) then
begin
if (z^.left = nil) then { z^.right must be null also }
FRightMost:=z^.parent
else { x == z^.left }
FRightMost:=maximum(x);
end;
end;
{ Rebalance tree }
if (y^.color = clBlack) then
begin
while ((x <> FRoot) and ((x = nil) or (x^.color = clBlack))) do
begin
if (x = x_parent^.left) then
begin
w:=x_parent^.right;
if (w^.color = clRed) then
begin
w^.color:=clBlack;
x_parent^.color:=clRed;
rotateLeft(x_parent);
w:=x_parent^.right;
end;
if (((w^.left = nil) or (w^.left^.color = clBlack))
and ((w^.right = nil) or (w^.right^.color = clBlack))) then
begin
w^.color:=clRed;
x:=x_parent;
x_parent:=x_parent^.parent;
end
else begin
if ((w^.right = nil) or (w^.right^.color = clBlack)) then
begin
w^.left^.color:=clBlack;
w^.color:=clRed;
rotateRight(w);
w:=x_parent^.right;
end;
w^.color:=x_parent^.color;
x_parent^.color:=clBlack;
if (w^.right <> nil) then
w^.right^.color:=clBlack;
rotateLeft(x_parent);
x:=FRoot; { break; }
end
end
else begin
{ same as above, with right <^. left. }
w:=x_parent^.left;
if (w^.color = clRed) then
begin
w^.color:=clBlack;
x_parent^.color:=clRed;
rotateRight(x_parent);
w:=x_parent^.left;
end;
if (((w^.right = nil) or (w^.right^.color = clBlack))
and ((w^.left = nil) or (w^.left^.color = clBlack))) then
begin
w^.color:=clRed;
x:=x_parent;
x_parent:=x_parent^.parent;
end
else begin
if ((w^.left = nil) or (w^.left^.color = clBlack)) then
begin
w^.right^.color:=clBlack;
w^.color:=clRed;
rotateLeft(w);
w:=x_parent^.left;
end;
w^.color:=x_parent^.color;
x_parent^.color:=clBlack;
if (w^.left <> nil) then
w^.left^.color:=clBlack;
rotateRight(x_parent);
x:=FRoot; { break; }
end;
end;
end;
if (x <> nil) then
x^.color:=clBlack;
end;
dispose(y);
end;
end.
| 22.264339 | 73 | 0.546819 |
8347b75297ce9e63631aa8a607446be1ae6c62e2
| 17,961 |
pas
|
Pascal
|
contrib/mORMot/SQLite3/mORMotUIOptions.pas
|
Razor12911/xtool
|
4797195ad310e8f6dc2eae8eb86fe14683f77cf0
|
[
"MIT"
] | 11 |
2022-01-17T22:05:37.000Z
|
2022-02-23T19:18:19.000Z
|
contrib/mORMot/SQLite3/mORMotUIOptions.pas
|
Razor12911/xtool
|
4797195ad310e8f6dc2eae8eb86fe14683f77cf0
|
[
"MIT"
] | null | null | null |
contrib/mORMot/SQLite3/mORMotUIOptions.pas
|
Razor12911/xtool
|
4797195ad310e8f6dc2eae8eb86fe14683f77cf0
|
[
"MIT"
] | null | null | null |
/// General Options setting dialog for mORmot
// - this unit is a part of the freeware Synopse mORMot framework,
// licensed under a MPL/GPL/LGPL tri-license; version 1.18
unit mORMotUIOptions;
(*
This file is part of Synopse mORMot framework.
Synopse mORMot framework. Copyright (C) 2022 Arnaud Bouchez
Synopse Informatique - https://synopse.info
*** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the License.
The Original Code is Synopse mORMot framework.
The Initial Developer of the Original Code is Arnaud Bouchez.
Portions created by the Initial Developer are Copyright (C) 2022
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK *****
Version 1.4 - February 8, 2010
- whole Synopse SQLite3 database framework released under the GNU Lesser
General Public License version 3, instead of generic "Public Domain"
Version 1.5 - February 17, 2010
- allow to hide some nodes/pages, depending of User level e.g.
- add toolbar buttons per user customization
Version 1.9
- some code refactoring to share code with the new SQLite3UIEdit unit
- minor fixes and enhancements
Version 1.13
- Delphi 2009/2010/XE compatibility fixes
Version 1.15
- Get rid of TMS components dependency
Version 1.18
- renamed SQLite3UIOptions.pas to mORMotUIOptions.pas
*)
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
SynCommons,
mORMot, mORMotUILogin, mORMotUI, mORMotUIEdit, mORMotToolBar, mORMoti18n,
{$ifdef USETMSPACK}
TaskDialog,
{$endif}
StdCtrls, ExtCtrls, ComCtrls, SynTaskDialog;
type
/// Options setting dialog
// - the settings parameters are taken from the RTTI of supplied objects:
// all the user interface is created from the code definition of classes;
// a visual tree node will reflect the properties recursion, and published
// properties are displayed as editing components
// - published textual properties may be defined as generic RawUTF8 or
// as generic string (with some possible encoding issue prior to Delphi 2009)
// - caller must initialize some events, OnComponentCreate at least,
// in order to supply the objects to be added on the form
// - components creation is fully customizable by some events
TOptionsForm = class(TRTTIForm)
List: TTreeView;
procedure FormShow(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure ListClick(Sender: TObject);
procedure BtnSaveClick(Sender: TObject);
protected
/// every char is a bit index for a tkInt64 TCheckBox
fAddToolbar: RawByteString;
procedure SubButtonClick(Sender: TObject);
// avoid Windows Vista and Seven screen refresh bug (at least with Delphi 7)
procedure WMUser(var Msg: TMessage); message WM_USER;
public
BtnSave: TSynButton;
BtnCancel: TSynButton;
/// creator may define this property to force a particular node to
// be selected at form showing
SelectedNodeObjectOnShow: TObject;
/// create corresponding nodes and components for updating Obj
// - to be used by OnComponentCreate(nil,nil,OptionsForm) in order
// to populate the object tree of this Form
// - properties which name starts by '_' are not added to the UI window
// - published properties of parents of Obj are also added
function AddEditors(Node: TTreeNode; Obj: TObject;
const aCustomCaption: string=''; const aTitle: string=''): TTreeNode;
/// create corresponding checkboxes lists for a given action toolbar
// - aEnum points to the Action RTTI
// - aActionHints is a multi line value containing the Hint captions
// for all available Actions
// - if aActionsBits is not nil, its bits indicates the Buttons to
// appear in the list
procedure AddToolbars(Scroll: TScrollBox; const aToolbarName: string;
aEnum: PTypeInfo; const aActionHints: string; aActionsBits: pointer;
aProp: PPropInfo; Obj: TObject);
end;
implementation
{$R *.dfm}
procedure TOptionsForm.FormShow(Sender: TObject);
var i, n: integer;
Name: string;
begin
Application.ProcessMessages;
Screen.Cursor := crHourGlass;
try
if not Assigned(OnComponentCreate) then begin // nothing to modify
ModalResult := mrCancel; // code implementation error -> cancel
exit;
end;
OnComponentCreate(nil,nil,self); // will call AddEditors()
List.FullCollapse;
List.TopItem.Expand(false); // show main sub nodes
if List.Items.Count<>0 then begin
n := List.Items.Count-1; // select the last entered item by default
if SelectedNodeObjectOnShow<>nil then begin
Name := CaptionName(OnCaptionName,'',SelectedNodeObjectOnShow);
for i := 0 to n do
if SameText(List.Items[i].Text,Name) then begin
n := i;
break;
end;
end;
List.Selected := List.Items[n];
end;
SetStyle(self);
finally
Screen.Cursor := crDefault;
end;
PostMessage(Handle,WM_USER,0,0); // avoid Vista and Seven screen refresh bug
end;
procedure TOptionsForm.FormCreate(Sender: TObject);
begin
BtnSave := TSynButton.CreateKind(Self,cbRetry,312,432,100,41);
BtnSave.SetBitmap(BitmapOK);
BtnSave.Font.Style := [fsBold];
BtnSave.Caption := sSave;
BtnSave.OnClick := BtnSaveClick;
BtnSave.Anchors := [akRight, akBottom];
BtnCancel := TSynButton.CreateKind(Self,cbCancel,424,432,100,41);
BtnCancel.Anchors := [akRight, akBottom];
end;
procedure TOptionsForm.FormClose(Sender: TObject;
var Action: TCloseAction);
var i: integer;
begin
for i := 0 to List.Items.Count-1 do
TScrollBox(List.Items[i].Data).Free;
List.Items.Clear;
end;
const
/// X coordinates of the field content (left side must be used for caption)
AddEditorsX=200;
function TOptionsForm.AddEditors(Node: TTreeNode; Obj: TObject;
const aCustomCaption, aTitle: string): TTreeNode;
var i, j, CW: integer;
P: PPropInfo;
E: PEnumType;
EP: PShortString;
C: TWinControl;
CLE: TLabeledEdit absolute C;
CNE: TSynLabeledEdit absolute C;
CC: TCheckbox absolute C;
CB: TCombobox absolute C;
aCaption, SubCaption, CustomCaption: string;
Scroll: TScrollBox;
O: TObject;
aClassType: TClass;
procedure AddEditor(Obj: TObject; Index: integer);
begin
if OnComponentCreate(Obj,nil,nil)<>nil then
exit; // ignore this Object
with TSynButton.Create(Scroll) do begin
Parent := Scroll;
Scroll.Tag := Scroll.Tag+4;
SetBounds(AddEditorsX,Scroll.Tag,140,20);
Caption := CaptionName(OnCaptionName,'',Obj,Index);
Tag := PtrInt(AddEditors(result,Obj,Caption,SubCaption));
OnClick := SubButtonClick;
Scroll.Tag := Scroll.Tag+24;
end;
end;
begin
if (self=nil) or (Obj=nil) or not Assigned(OnComponentCreate) then
exit;
Scroll := TScrollBox.Create(self);
Scroll.Parent := self;
Scroll.Visible := false;
Scroll.SetBounds(List.Width,0,ClientWidth-List.Width,List.Height);
Scroll.Anchors := [akLeft,akTop,akRight,akBottom];
CW := Scroll.ClientWidth;
if aCustomCaption='' then
CustomCaption := CaptionName(OnCaptionName,'',Obj) else
CustomCaption := aCustomCaption;
if Node=nil then
SubCaption := '' else
if aTitle='' then
SubCaption := CustomCaption else
SubCaption := aTitle+' - '+CustomCaption;
result := List.Items.AddChild(Node,CustomCaption);
result.Data := pointer(Scroll);
with TLabel.Create(Scroll) do begin
Parent := Scroll;
Font.Style := [fsBold];
Font.Size := 12;
Left := 32;
Top := 8;
if SubCaption='' then
Caption := CustomCaption else
Caption := SubCaption;
end;
with TBevel.Create(Scroll) do begin
Parent := Scroll;
SetBounds(8,32,CW-32,4);
Shape := bsTopLine;
end;
Scroll.Tag := 48;
aClassType := PPointer(Obj)^;
while (aClassType<>nil) and
(aClassType<>TComponent) and // TComponent have Name and Tag to be ignored
(aClassType<>TObject) do begin // TObject don't have any published properties
for i := 1 to InternalClassPropInfo(aClassType,P) do
if P^.Name[1]<>'_' then begin // ignore properties which name starts by _
aCaption := CaptionName(OnCaptionName,ShortStringToUTF8(P^.Name));
if not Assigned(OnComponentCreate) then
C := nil else
C := OnComponentCreate(Obj,P,Scroll);
if C=nil then // default creation if not handled by OnComponentCreate()
case P^.PropType^^.Kind of
tkInteger: begin
CNE := TSynLabeledEdit.Create(Scroll);
CNE.Kind := sleInteger;
CNE.Value := P^.GetOrdValue(Obj);
CNE.RaiseExceptionOnError := true; // force show errors on screen
end;
tkEnumeration:
if (P^.PropType^=TypeInfo(boolean)) then begin
CC := TCheckBox.Create(Scroll);
CC.Checked := boolean(P^.GetOrdValue(Obj));
end else begin
E := P^.PropType^^.EnumBaseType;
CB := TComboBox.Create(Scroll);
CB.Parent := Scroll; // need parent now for CB.Items access
CB.Style := csDropDownList;
EP := @E^.NameList;
for j := 0 to E^.MaxValue do begin
CB.Items.Add(CaptionName(OnCaptionName,EP));
inc(PtrInt(EP),ord(EP^[0])+1); // next enumeration item
end;
CB.ItemIndex := P^.GetOrdValue(Obj);
end;
tkLString: begin
CLE := TLabeledEdit.Create(Scroll);
if P^.PropType^=TypeInfo(RawUTF8) then
CLE.Text := U2S(P^.GetLongStrValue(Obj)) else
CLE.Text := P^.GetGenericStringValue(Obj);
end;
{$ifdef HASVARUSTRING}
tkUString: begin
CLE := TLabeledEdit.Create(Scroll);
CLE.Text := P^.GetUnicodeStrValue(Obj);
end;
{$endif}
tkClass: begin
O := P^.GetObjProp(Obj);
if (O<>nil) and (PtrInt(O)<>-1) then
if O.InheritsFrom(TCollection) then
with TCollection(O) do
for j := 0 to Count-1 do
AddEditor(Items[j],j)
else
AddEditor(O,-1);
end;
end;
if (C<>nil) and (C<>self) and (C<>Obj) then begin
C.Parent := Scroll;
C.Tag := PtrInt(P); // for BtnSaveClick() event
if Assigned(OnComponentCreated) then
OnComponentCreated(Obj,P,C);
if C.InheritsFrom(TLabeledEdit) then begin
CLE.EditLabel.Caption := aCaption;
CLE.LabelPosition := lpLeft;
end else
with TLabel.Create(Scroll) do begin
Parent := Scroll;
Caption := aCaption;
SetBounds(8,Scroll.Tag+4,AddEditorsX-12,Height);
Alignment := taRightJustify;
if not C.Enabled then
Enabled := false;
end;
if C.InheritsFrom(TCheckBox) then // trick to avoid black around box
CC.SetBounds(AddEditorsX,Scroll.Tag+5,13,13) else
C.SetBounds(AddEditorsX,Scroll.Tag,160,22);
Scroll.Tag := Scroll.Tag+24;
end;
P := P^.Next;
end;
aClassType := aClassType.ClassParent; // also add parents properties
end;
with TBevel.Create(Scroll) do begin // draw a line at the bottom
Parent := Scroll;
SetBounds(8,Scroll.Tag+8,CW-32,16);
Shape := bsTopLine;
end;
Scroll.Tag := PtrInt(Obj); // for BtnSaveClick()
end;
procedure TOptionsForm.AddToolbars(Scroll: TScrollBox; const aToolbarName: string;
aEnum: PTypeInfo; const aActionHints: string; aActionsBits: pointer;
aProp: PPropInfo; Obj: TObject);
var W: integer;
A: integer;
E: PEnumType;
V: Int64;
begin
if (Self=nil) or (Scroll=nil) or (aEnum=nil) or (aProp=nil) then
exit;
if aProp^.PropType^^.Kind<>tkInt64 then
exit;
W := Scroll.Width-128;
Scroll.Tag := Scroll.Tag+12;
with TLabel.Create(Scroll) do begin
Parent := Scroll;
Font.Style := [fsBold];
Caption := aToolbarName;
SetBounds(32,Scroll.Tag,W,22); // Scroll.Tag = current Y in this scrollbox
end;
Scroll.Tag := Scroll.Tag+24;
E := aEnum^.EnumBaseType;
assert(E^.MaxValue<64); // Value is a Int64 (i.e. max 64 actions)
for A := 0 to E^.MaxValue do
if (aActionsBits=nil) or GetBitPtr(aActionsBits,A) then begin
with TCheckBox.Create(Scroll) do begin
Parent := Scroll;
Hint := GetCSVItemString(pointer(aActionHints),A,#13);
ShowHint := true;
Caption := E^.GetCaption(A);
SetBounds(64,Scroll.Tag,W,16);
V := aProp^.GetInt64Value(Obj);
fAddToolbar := fAddToolbar+AnsiChar(A); // every char is a bit index
Checked := GetBitPtr(@V,A);
Tag := PtrInt(aProp); // for BtnSaveClick() event
end;
Scroll.Tag := Scroll.Tag+16;
end;
end;
procedure TOptionsForm.ListClick(Sender: TObject);
var i: integer;
S,N: TTreeNode;
begin
S := List.Selected;
if S=nil then
exit;
for i := 0 to List.Items.Count-1 do begin
N := List.Items[i];
if N<>S then
TScrollBox(N.Data).Hide;
end;
with TScrollBox(S.Data) do begin
Show;
for i := 0 to ControlCount-1 do
Controls[i].Repaint; // avoid Vista and Seven screen refresh bug
end;
end;
procedure TOptionsForm.SubButtonClick(Sender: TObject);
begin
if TSynButton(Sender).Tag=0 then
exit;
List.Select(TTreeNode(TSynButton(Sender).Tag));
ListClick(nil);
end;
procedure TOptionsForm.BtnSaveClick(Sender: TObject);
var i, j, Index, IndexSorted, ToolbarIndex: integer;
P: PPropInfo;
Scroll: TScrollBox;
Obj: TObject;
C: TControl;
CLE: TLabeledEdit absolute C;
CNE: TSynLabeledEdit absolute C;
CC: TCheckbox absolute C;
CB: TCombobox absolute C;
ToolbarValue: Int64;
begin // update the properties of the settings object from screen
ToolbarIndex := 0;
for i := 0 to List.Items.Count-1 do begin
Scroll := TScrollBox(List.Items[i].Data);
if Scroll=nil then continue;
Obj := pointer(Scroll.Tag); // get corresponding Object to update properties
if Obj=nil then continue;
for j := 0 to Scroll.ControlCount-1 do begin
C := Scroll.Controls[j];
if not C.Enabled then
continue; // disabled components didn't modify their value
P := pointer(C.Tag); // get corresponding PPropInfo
if P=nil then
continue; // not a value component (label or button)
if C.InheritsFrom(TSynLabeledEdit) then
try
P^.SetOrdValue(Obj,CNE.Value); // call CNE.GetValue for range checking
except
on E: ESynLabeledEdit do begin // triggered by CNE.GetValue
List.Selected := List.Items[i]; // focus corresponding scroll
ListClick(nil);
Application.ProcessMessages;
CNE.SetFocus; // focus corresponding field
ShowMessage(CNE.EditLabel.Caption+':'#13+E.Message,true);
exit;
end;
end else
if C.InheritsFrom(TLabeledEdit) then
{$ifdef HASVARUSTRING}
if P^.PropType^^.Kind=tkUString then
P^.SetUnicodeStrValue(Obj,CLE.Text) else
{$endif}
if P^.PropType^=TypeInfo(RawUTF8) then
P^.SetLongStrValue(Obj,S2U(CLE.Text)) else
P^.SetGenericStringValue(Obj,CLE.Text) else
if C.InheritsFrom(TCheckBox) then
if P^.PropType^^.Kind=tkInt64 then begin
// created by AddToolbars() method -> set bit if checked
inc(ToolbarIndex); // follows the same order as in AddToolbars()
if ToolbarIndex<=length(fAddToolbar) then begin
ToolbarValue := P^.GetInt64Value(Obj);
if CC.Checked then
SetBit64(ToolbarValue,ord(fAddToolbar[ToolbarIndex])) else
UnsetBit64(ToolbarValue,ord(fAddToolbar[ToolbarIndex]));
P^.SetInt64Prop(Obj,ToolbarValue);
end;
end else
P^.SetOrdValue(Obj,integer(CC.Checked)) else
if C.InheritsFrom(TComboBox) then
if P^.PropType^^.Kind=tkLString then begin
// don't store index but string value
P^.SetLongStrValue(Obj,S2U(CB.Text));
end else begin
Index := CB.ItemIndex; // store index value
if Index>=0 then begin
IndexSorted := PtrInt(CB.Items.Objects[Index]);
if IndexSorted<>0 then // Objects[] = original index+1 (if sorted)
Index := IndexSorted-1; // store raw index, before sort
P^.SetOrdValue(Obj,Index);
end;
end;
end;
end;
ModalResult := mrOk; // close window if all OK
end;
procedure TOptionsForm.WMUser(var Msg: TMessage);
begin // avoid Vista and Seven screen refresh bug
ListClick(nil);
end;
end.
| 36.138833 | 82 | 0.666388 |
f18124a86cd6a9fccdbbe22d813e1c81e8c0af67
| 1,125 |
dfm
|
Pascal
|
LogViewer.MessageFilter.View.dfm
|
atkins126/LogViewer
|
47b331478b74c89ffffc48bb20bbe62f4362c556
|
[
"Apache-2.0"
] | null | null | null |
LogViewer.MessageFilter.View.dfm
|
atkins126/LogViewer
|
47b331478b74c89ffffc48bb20bbe62f4362c556
|
[
"Apache-2.0"
] | null | null | null |
LogViewer.MessageFilter.View.dfm
|
atkins126/LogViewer
|
47b331478b74c89ffffc48bb20bbe62f4362c556
|
[
"Apache-2.0"
] | null | null | null |
object frmMessageFilter: TfrmMessageFilter
Left = 0
Top = 0
BorderIcons = [biSystemMenu]
BorderStyle = bsSizeToolWin
Caption = 'Message filter'
ClientHeight = 627
ClientWidth = 215
Color = clBtnFace
DoubleBuffered = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Segoe UI'
Font.Style = []
FormStyle = fsStayOnTop
OldCreateOrder = False
PopupMode = pmAuto
ScreenSnap = True
PixelsPerInch = 96
TextHeight = 13
object pnlMessageFilter: TPanel
Left = 0
Top = 0
Width = 215
Height = 627
Align = alClient
BevelOuter = bvNone
Color = clWhite
ParentBackground = False
TabOrder = 0
object pgcMain: TKPageControl
Left = 0
Top = 0
Width = 215
Height = 627
ActivePageIndex = 0
Align = alClient
ParentBackground = False
ParentShowHint = False
ShowHint = True
TabOrder = 0
object tsClientSide: TKTabSheet
Caption = 'Client side'
end
object tsSourceSide: TKTabSheet
Caption = 'Source side'
end
end
end
end
| 21.634615 | 42 | 0.645333 |
831a016ce57a6eb9ff454a2d83093e9a82647466
| 2,431 |
pas
|
Pascal
|
src/MongoDB.pas
|
yunnet/MongoDBDrivers
|
4db85bd3c86d0882700d9829e9bece791cb8cd26
|
[
"Apache-2.0"
] | 1 |
2020-10-05T14:11:07.000Z
|
2020-10-05T14:11:07.000Z
|
src/MongoDB.pas
|
yunnet/MongoDBDrivers
|
4db85bd3c86d0882700d9829e9bece791cb8cd26
|
[
"Apache-2.0"
] | null | null | null |
src/MongoDB.pas
|
yunnet/MongoDBDrivers
|
4db85bd3c86d0882700d9829e9bece791cb8cd26
|
[
"Apache-2.0"
] | null | null | null |
{***************************************************************************}
{ }
{ Mongo Delphi Driver }
{ }
{ Copyright (c) 2012 Fabricio Colombo }
{ }
{ Licensed under the Apache License, Version 2.0 (the "License"); }
{ you may not use this file except in compliance with the License. }
{ You may obtain a copy of the License at }
{ }
{ http://www.apache.org/licenses/LICENSE-2.0 }
{ }
{ Unless required by applicable law or agreed to in writing, software }
{ distributed under the License is distributed on an "AS IS" BASIS, }
{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }
{ See the License for the specific language governing permissions and }
{ limitations under the License. }
{ }
{***************************************************************************}
unit MongoDB;
interface
uses
MongoCollection
, BSONTypes
, CommandResult
;
type
TMongoDB = class
private
protected
function GetDBName: AnsiString; virtual; abstract;
public
function RunCommand(ACommand: IBSONObject): ICommandResult; virtual; abstract;
function GetLastError: ICommandResult; virtual; abstract;
function GetCollection(AName: AnsiString): TMongoCollection; virtual; abstract;
procedure DropCollection(AName: AnsiString); virtual; abstract;
function Authenticate(const AUserName, APassword: AnsiString): Boolean; virtual; abstract;
procedure Logout; virtual; abstract;
function GetCollections: IBSONObject; virtual; abstract;
function GetUserCollections: IBSONObject; virtual; abstract;
function CreateCollection(AName: AnsiString; AOptions: IBSONObject): TMongoCollection; virtual; abstract;
property DBName: AnsiString read GetDBName;
end;
implementation
end.
| 41.913793 | 109 | 0.48951 |
f188a37b38ba70ec77337d0297c0b70a2a273440
| 8,890 |
pas
|
Pascal
|
UACAGMultiForm.pas
|
JR1LQK/zServer
|
68e934b384b812840c1e590e0c7531280935472d
|
[
"MIT"
] | 1 |
2020-07-17T07:21:14.000Z
|
2020-07-17T07:21:14.000Z
|
UACAGMultiForm.pas
|
JR1LQK/zServer
|
68e934b384b812840c1e590e0c7531280935472d
|
[
"MIT"
] | null | null | null |
UACAGMultiForm.pas
|
JR1LQK/zServer
|
68e934b384b812840c1e590e0c7531280935472d
|
[
"MIT"
] | 1 |
2020-07-14T02:47:38.000Z
|
2020-07-14T02:47:38.000Z
|
unit UACAGMultiForm;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
UBasicMultiForm, StdCtrls, Grids, Cologrid, JLLabel, ExtCtrls, zLogGlobal;
type
TCity = class
CityNumber : string[10];
CityName : string[40];
PrefNumber : string[3];
PrefName : string[10];
Worked : array[b19..HiBand] of boolean;
constructor Create;
function Summary : string;
function ACAGSummary : string;
function Summary2 : string;
function FDSummary(LowBand : TBand) : string;
end;
TCityList = class
List : TList;
constructor Create;
destructor Destroy; override;
procedure LoadFromFile(filename : string);
end;
type
TACAGMultiForm = class(TBasicMultiForm)
Panel: TPanel;
Label1R9: TRotateLabel;
Label3r5: TRotateLabel;
Label7: TRotateLabel;
Label14: TRotateLabel;
Label21: TRotateLabel;
Label28: TRotateLabel;
Label50: TRotateLabel;
Label144: TRotateLabel;
Label430: TRotateLabel;
Label1200: TRotateLabel;
Label2400: TRotateLabel;
Label5600: TRotateLabel;
Label10G: TRotateLabel;
Grid: TMgrid;
Panel1: TPanel;
Button3: TButton;
Edit: TEdit;
Button1: TButton;
BandCombo: TComboBox;
cbStayOnTop: TCheckBox;
procedure FormCreate(Sender: TObject);
procedure GridSetting(ARow, Acol: Integer; var Fcolor: Integer;
var Bold, Italic, underline: Boolean);
procedure Button3Click(Sender: TObject);
procedure EditKeyPress(Sender: TObject; var Key: Char);
procedure cbStayOnTopClick(Sender: TObject);
private
{ Private declarations }
public
CityList : TCityList;
function ReturnSummary(C : TCity) : string; virtual; //returns appropriate summary for each contest
procedure ResetBand(B : TBand); override;
procedure Reset; override;
procedure Add(aQSO : TQSO); override;
//procedure RecalcBand(B : TBand); override;
procedure RecalcAll; override;
{ Public declarations }
end;
var
ACAGMultiForm: TACAGMultiForm;
implementation
uses UServerForm;
{$R *.DFM}
function TACAGMultiForm.ReturnSummary(C : TCity) : string;
begin
Result := C.ACAGSummary;
end;
procedure TACAGMultiForm.RecalcAll;
var i : integer;
aQSO : TQSO;
begin
Reset;
for i := 1 to ServerForm.Stats.MasterLog.TotalQSO do
begin
aQSO := TQSO(ServerForm.Stats.MasterLog.List[i]);
Add(aQSO);
end;
{
aQSO := TQSO.Create;
for B := b19 to HiBand do
begin
if NotWARC(B) then
begin
Log := ServerForm.Stats.Logs[B];
for i := 1 to Log.TotalQSO do
begin
aQSO.QSO := TQSO(Log.List[i]).QSO;
Add(aQSO);
TQSO(Log.List[i]).QSO := aQSO.QSO;
end;
end;
end;
aQSO.Free;}
end;
procedure TACAGMultiForm.ResetBand(B : TBand);
var i : integer;
begin
for i := 0 to CityList.List.Count - 1 do
begin
TCity(CityList.List[i]).Worked[B] := False;
Grid.Cells[0,i] := ReturnSummary(TCity(CityList.List[i]));
end;
//UpdateCheckListBox;
//UpdateListBox;
end;
procedure TACAGMultiForm.Reset;
var B : TBand;
i : integer;
begin
for i := 0 to CityList.List.Count - 1 do
begin
for B := b19 to HiBand do
TCity(CityList.List[i]).Worked[B] := False;
Grid.Cells[0,i] := ReturnSummary(TCity(CityList.List[i]));
end;
{
ListBox.Clear;
for K := m101 to m50 do
begin
str := FillRight(KenNames[K], 16)+'. . . . . .';
ListBox.Items.Add(str);
end;
Update;}
end;
procedure TACAGMultiForm.Add(aQSO : TQSO);
var i : integer;
begin
if aQSO.QSO.Dupe then
exit;
if aQSO.QSO.NewMulti1 then
begin
for i := 0 to CityList.List.Count - 1 do
if TCity(CityList.List[i]).CityNumber = aQSO.QSO.Multi1 then
begin
TCity(CityList.List[i]).Worked[aQSO.QSO.Band] := True;
Grid.Cells[0,i] := ReturnSummary(TCity(CityList.List[i]));
exit;
end;
end;
end;
constructor TCity.Create;
var B : TBand;
begin
for B := b19 to HiBand do
Worked[B] := False;
CityNumber := '';
CityName := '';
PrefNumber := '';
PrefName := '';
end;
function TCity.Summary : string;
var temp : string;
B : TBand;
begin
temp := '';
temp := FillRight(CityNumber,7)+FillRight(CityName,20)+' ';
for B := b19 to HiBand do
if NotWARC(B) then
if Worked[B] then
temp := temp + '* '
else
temp := temp + '. ';
Result := ' '+temp;
end;
function TCity.ACAGSummary : string;
var temp : string;
B : TBand;
begin
temp := '';
temp := FillRight(CityNumber,7)+FillRight(CityName,20)+' ';
for B := b35 to HiBand do
if NotWARC(B) then
if Worked[B] then
temp := temp + '* '
else
temp := temp + '. ';
Result := ' '+temp;
end;
function TCity.FDSummary(LowBand : TBand) : string;
var temp : string;
B : TBand;
begin
temp := '';
temp := FillRight(CityNumber,7)+FillRight(CityName,20)+' '+' ';
for B := LowBand to HiBand do
if NotWARC(B) then
if B in [b19..b1200] then
begin
if length(Self.CityNumber) <= 3 then
if Worked[B] then
temp := temp + '* '
else
temp := temp + '. '
else
temp := temp + ' ';
end
else
begin
if length(Self.CityNumber) > 3 then
if Worked[B] then
temp := temp + '* '
else
temp := temp + '. '
else
temp := temp + ' ';
end;
Result := ' '+temp;
end;
function TCity.Summary2 : string;
var temp : string;
B : TBand;
begin
temp := '';
temp := FillRight(CityNumber,7)+FillRight(CityName,20)+' Worked on : ';
for B := b35 to HiBand do
if Worked[B] then
temp := temp + ' '+MHzString[B]
else
temp := temp + '';
Result := temp;
end;
constructor TCityList.Create;
begin
List := TList.Create;
end;
destructor TCityList.Destroy;
var i : integer;
begin
for i := 0 to List.Count - 1 do
begin
if List[i] <> nil then
TCity(List[i]).Free;
end;
List.Free;
end;
procedure TCityList.LoadFromFile(filename : string);
var f : textfile;
str : string;
C : TCity;
begin
assign(f, filename);
{$I-}
reset(f);
{$I+}
if IOResult <> 0 then
begin
MessageDlg('DAT file '+filename+' cannot be opened', mtError,
[mbOK], 0);
exit; {Alert that the file cannot be opened \\}
end;
{
try
reset(f);
except
on EFOpenError do
begin
MessageDlg('DAT file '+filename+' cannot be opened', mtError,
[mbOK], 0);
exit;
end;
end;}
readln(f, str);
while not(eof(f)) do
begin
readln(f, str);
if Pos('end of file', LowerCase(str))>0 then break;
C := TCity.Create;
C.CityName := Copy(str, 12, 40);
C.CityNumber := TrimRight(Copy(str, 1, 11));
List.Add(C);
end;
end;
procedure TACAGMultiForm.FormCreate(Sender: TObject);
begin
inherited;
CityList := TCityList.Create;
CityList.LoadFromFile('ACAG.DAT');
if CityList.List.Count = 0 then exit;
Grid.RowCount := CityList.List.Count - 1;
{
BandCombo.Items.Clear;
for B := b35 to HiBand do
if NotWARC(B) then
BandCombo.Items.Add(MHzString[B]);
BandCombo.ItemIndex := 0;
}
Reset;
end;
procedure TACAGMultiForm.GridSetting(ARow, Acol: Integer;
var Fcolor: Integer; var Bold, Italic, underline: Boolean);
begin
inherited;
FColor := clBlack;
{
B := Main.CurrentQSO.QSO.Band;
if TCity(CityList.List[ARow]).Worked[B] then
FColor := clRed
else
FColor := clBlack;
}
end;
procedure TACAGMultiForm.Button3Click(Sender: TObject);
var i : integer;
begin
for i := 0 to CityList.List.Count - 1 do
begin
if Pos(Edit.Text, TCity(CityList.List[i]).CityNumber) = 1 then
break;
end;
if i < Grid.RowCount - 1 - Grid.VisibleRowCount then
Grid.TopRow := i
else
if CityList.List.Count <= Grid.VisibleRowCount then
Grid.TopRow := 1
else
Grid.TopRow := Grid.RowCount - Grid.VisibleRowCount;
end;
procedure TACAGMultiForm.EditKeyPress(Sender: TObject; var Key: Char);
begin
inherited;
if Key = Chr($0D) then
begin
Button3Click(Self);
Key := #0;
end;
end;
procedure TACAGMultiForm.cbStayOnTopClick(Sender: TObject);
begin
if cbStayOnTop.Checked then
FormStyle := fsStayOnTop
else
FormStyle := fsNormal;
end;
end.
| 23.456464 | 104 | 0.586277 |
f147dc0e98ecebf16d71fdf7b50c6aac8139871d
| 987 |
pas
|
Pascal
|
records/0008.pas
|
nickelsworth/swag
|
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
|
[
"BSD-2-Clause"
] | 11 |
2015-12-12T05:13:15.000Z
|
2020-10-14T13:32:08.000Z
|
records/0008.pas
|
nickelsworth/swag
|
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
|
[
"BSD-2-Clause"
] | null | null | null |
records/0008.pas
|
nickelsworth/swag
|
7c21c0da2291fc249b9dc5cfe121a7672a4ffc08
|
[
"BSD-2-Clause"
] | 8 |
2017-05-05T05:24:01.000Z
|
2021-07-03T20:30:09.000Z
|
BG>JB>A method that I have successfully used to delete records in place is
BG>JB>to...
'Scuse me for butting in, but I have another approach which will
preserve your record order. I will present it for a file of records
the total size of which is less than 64K. The routine may easily be
adapted for large files:
procedure del_rec(fname : string;target : longint;rec_size : longint);
type
t_buf=array[1..65520] of byte;
var
f : file;
buf : t_buf;
n : word;
begin
new(buf);
assign(f,fname); { open your file }
reset(f,1);
blockread(f,buf,sizeof(buf),n);
close(f);
move(buf[succ(target)*rec_size],buf[target*rec_size],n-(target*rec_size));
dec(n,rec_size);
rewrite(f,1);
blockwrite(f,buf,n);
close(f);
dispose(buf);
end;
---
* The Right Place (tm) BBS/Atlanta - 404/476-2607 SuperRegional Hub
* PostLink(tm) v1.05 TRP (#564) : RelayNet(tm)
---
■ OLX 2.1 TD ■ I just steal 'em, I don't explain 'em.
| 26.675676 | 79 | 0.651469 |
f1b3975c77021e53a4fb333d0bd8343d3438cef3
| 22,241 |
pas
|
Pascal
|
Components/JVCL/common/ObjSel.pas
|
sabatex/Delphi
|
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
|
[
"MIT"
] | null | null | null |
Components/JVCL/common/ObjSel.pas
|
sabatex/Delphi
|
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
|
[
"MIT"
] | null | null | null |
Components/JVCL/common/ObjSel.pas
|
sabatex/Delphi
|
0efbe6eb38bf8aa2bf269d1866741266e90b9cbf
|
[
"MIT"
] | 1 |
2019-12-24T08:39:18.000Z
|
2019-12-24T08:39:18.000Z
|
{******************************************************************************
Object Picker API interface Unit for Object Pascal
Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft
Corporation. All Rights Reserved.
The original file is: objsel.h, released June 2000. The original Pascal
code is: ObjSel.pas, released December 2000. The initial developer of the
Pascal code is Marcel van Brakel (brakelm att chello dott nl).
Portions created by Marcel van Brakel are Copyright (C) 1999-2001
Marcel van Brakel. All Rights Reserved.
Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI)
You may retrieve the latest version of this file at the Project JEDI home
page, located at http://delphi-jedi.org or my personal homepage located at
http://members.chello.nl/m.vanbrakel2
The contents of this file are used with permission, subject to the Mozilla
Public License Version 1.1 (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/MPL-1.1.html
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
the specific language governing rights and limitations under the License.
Alternatively, the contents of this file may be used under the terms of the
GNU Lesser General Public License (the "LGPL License"), in which case the
provisions of the LGPL License are applicable instead of those above.
If you wish to allow use of your version of this file only under the terms
of the LGPL License and not to allow others to use your version of this file
under the MPL, indicate your decision by deleting the provisions above and
replace them with the notice and other provisions required by the LGPL
License. If you do not delete the provisions above, a recipient may use
your version of this file under either the MPL or the LGPL License.
For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html
******************************************************************************}
unit ObjSel;
{$I jvcl.inc}
{$I windowsonly.inc}
{$WEAKPACKAGEUNIT}
{$HPPEMIT ''}
{$HPPEMIT '#include "ObjSel.h"'}
{$HPPEMIT ''}
{$HPPEMIT 'typedef IDsObjectPicker* _di_IDsObjectPicker;'}
interface
uses
Windows, ActiveX;
const
//'{17d6ccd8-3b7b-11d2-b9e0-00c04fd8dbf7}'
CLSID_DsObjectPicker: TGUID = (
D1: $17D6CCD8; D2: $3B7B; D3: $11D2; D4: ($B9, $E0, $00, $C0, $4F, $D8, $DB, $F7));
{$EXTERNALSYM CLSID_DsObjectPicker}
IID_IDsObjectPicker: TGUID = (
D1: $0C87E64E; D2: $3B7A; D3: $11D2; D4: ($B9, $E0, $00, $C0, $4F, $D8, $DB, $F7));
{$EXTERNALSYM IID_IDsObjectPicker}
{
CLIPBOARD FORMATS
=================
CFSTR_DSOP_DS_SELECTION_LIST
Returns an HGLOBAL for global memory containing a DS_SELECTION_LIST
variable length structure.
}
const
CFSTR_DSOP_DS_SELECTION_LIST = 'CFSTR_DSOP_DS_SELECTION_LIST';
{$EXTERNALSYM CFSTR_DSOP_DS_SELECTION_LIST}
{
SCOPE TYPES
===========
A scope is an entry in the "Look In" dropdown list of the Object Picker
dialog.
When initializing the DS Object Picker, DSOP_SCOPE_TYPEs are used with
DSOP_SCOPE_INIT_INFO.flType member to specify which types of scopes the
DS Object Picker should put in the "Look In" list.
DSOP_SCOPE_TYPE_TARGET_COMPUTER
Computer specified by DSOP_INIT_INFO.pwzTargetComputer, NULL is
local computer.
DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN
Uplevel domain to which target computer is joined.
DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN
Downlevel domain to which target computer is joined.
DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN
All domains in the enterprise to which the target computer belongs
other than the JOINED_DOMAIN or USER_SPECIFIED_*_SCOPEs.
DSOP_SCOPE_TYPE_GLOBAL_CATALOG
The Entire Directory scope.
DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN
All uplevel domains external to the enterprise but trusted by the
domain to which the target computer is joined.
DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN
All downlevel domains external to the enterprise but trusted by the
domain to which the target computer is joined.
DSOP_SCOPE_TYPE_WORKGROUP
The workgroup of which TARGET_COMPUTER is a member. Applies only if the
TARGET_COMPUTER is not joined to a domain.
DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE
DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE
Any uplevel or downlevel scope generated by processing user input. If
neither of these types is specified, user entries that do not refer to
one of the scopes in the "Look In" control will be rejected.
}
const
DSOP_SCOPE_TYPE_TARGET_COMPUTER = $00000001;
{$EXTERNALSYM DSOP_SCOPE_TYPE_TARGET_COMPUTER}
DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN = $00000002;
{$EXTERNALSYM DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN}
DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN = $00000004;
{$EXTERNALSYM DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN}
DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN = $00000008;
{$EXTERNALSYM DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN}
DSOP_SCOPE_TYPE_GLOBAL_CATALOG = $00000010;
{$EXTERNALSYM DSOP_SCOPE_TYPE_GLOBAL_CATALOG}
DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN = $00000020;
{$EXTERNALSYM DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN}
DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN = $00000040;
{$EXTERNALSYM DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN}
DSOP_SCOPE_TYPE_WORKGROUP = $00000080;
{$EXTERNALSYM DSOP_SCOPE_TYPE_WORKGROUP}
DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE = $00000100;
{$EXTERNALSYM DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE}
DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE = $00000200;
{$EXTERNALSYM DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE}
{
DSOP_SCOPE_INIT_INFO flags
==========================
The flScope member can contain zero or more of the following flags:
DSOP_SCOPE_FLAG_STARTING_SCOPE
The scope should be the first one selected in the Look In control after
dialog initialization. If more than one scope specifies this flag,
the one which is chosen to be the starting scope is implementation
dependant.
DSOP_SCOPE_FLAG_WANT_PROVIDER_WINNT
ADs paths for objects selected from this scope should be converted to use
the WinNT provider.
DSOP_SCOPE_FLAG_WANT_PROVIDER_LDAP
ADs paths for objects selected from this scope should be converted to use
the LDAP provider.
DSOP_SCOPE_FLAG_WANT_PROVIDER_GC
ADs paths for objects selected from this scope should be converted to use
the GC provider.
DSOP_SCOPE_FLAG_WANT_SID_PATH
ADs paths for objects selected from this scope having an objectSid
attribute should be converted to the form LDAP://<SID=x>, where x
represents the hexidecimal digits of the objectSid attribute value.
DSOP_SCOPE_FLAG_WANT_DOWNLEVEL_BUILTIN_PATH
ADs paths for downlevel well-known SID objects (for example,
DSOP_DOWNLEVEL_FILTER_INTERACTIVE) are an empty string unless this flag is
specified. If it is, the paths will be of the form
WinNT://NT AUTHORITY/Interactive or WinNT://Creator owner.
DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS
If the scope filter contains the DSOP_FILTER_USERS or
DSOP_DOWNLEVEL_FILTER_USERS flag, then check the Users checkbox by
default in the Look For dialog.
DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS
DSOP_SCOPE_FLAG_DEFAULT_FILTER_COMPUTERS
DSOP_SCOPE_FLAG_DEFAULT_FILTER_CONTACTS
}
const
DSOP_SCOPE_FLAG_STARTING_SCOPE = $00000001;
{$EXTERNALSYM DSOP_SCOPE_FLAG_STARTING_SCOPE}
DSOP_SCOPE_FLAG_WANT_PROVIDER_WINNT = $00000002;
{$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_PROVIDER_WINNT}
DSOP_SCOPE_FLAG_WANT_PROVIDER_LDAP = $00000004;
{$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_PROVIDER_LDAP}
DSOP_SCOPE_FLAG_WANT_PROVIDER_GC = $00000008;
{$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_PROVIDER_GC}
DSOP_SCOPE_FLAG_WANT_SID_PATH = $00000010;
{$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_SID_PATH}
DSOP_SCOPE_FLAG_WANT_DOWNLEVEL_BUILTIN_PATH = $00000020;
{$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_DOWNLEVEL_BUILTIN_PATH}
DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS = $00000040;
{$EXTERNALSYM DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS}
DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS = $00000080;
{$EXTERNALSYM DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS}
DSOP_SCOPE_FLAG_DEFAULT_FILTER_COMPUTERS = $00000100;
{$EXTERNALSYM DSOP_SCOPE_FLAG_DEFAULT_FILTER_COMPUTERS}
DSOP_SCOPE_FLAG_DEFAULT_FILTER_CONTACTS = $00000200;
{$EXTERNALSYM DSOP_SCOPE_FLAG_DEFAULT_FILTER_CONTACTS}
{
The flMixedModeOnly/flNativeModeOnly member of an uplevel scope can
contain one or more of the following flags (at least one must be specified):
DSOP_FILTER_INCLUDE_ADVANCED_VIEW
Include objects which have the attribute showInAdvancedViewOnly set to
true.
DSOP_FILTER_USERS
Include user objects.
DSOP_FILTER_BUILTIN_GROUPS
Include group objects with a groupType value having the flag
GROUP_TYPE_BUILTIN_LOCAL_GROUP.
DSOP_FILTER_WELL_KNOWN_PRINCIPALS
Include the contents of the WellKnown Security Principals container.
DSOP_FILTER_UNIVERSAL_GROUPS_DL
Include distribution list universal groups.
DSOP_FILTER_UNIVERSAL_GROUPS_SE
Include security enabled universal groups.
DSOP_FILTER_GLOBAL_GROUPS_DL
Include distribution list global groups.
DSOP_FILTER_GLOBAL_GROUPS_SE
Include security enabled global groups.
DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL
Include distribution list domain global groups.
DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE
Include security enabled domain local groups.
DSOP_FILTER_CONTACTS
Include contact objects.
DSOP_FILTER_COMPUTERS
Include computer objects.
}
const
DSOP_FILTER_INCLUDE_ADVANCED_VIEW = $00000001;
{$EXTERNALSYM DSOP_FILTER_INCLUDE_ADVANCED_VIEW}
DSOP_FILTER_USERS = $00000002;
{$EXTERNALSYM DSOP_FILTER_USERS}
DSOP_FILTER_BUILTIN_GROUPS = $00000004;
{$EXTERNALSYM DSOP_FILTER_BUILTIN_GROUPS}
DSOP_FILTER_WELL_KNOWN_PRINCIPALS = $00000008;
{$EXTERNALSYM DSOP_FILTER_WELL_KNOWN_PRINCIPALS}
DSOP_FILTER_UNIVERSAL_GROUPS_DL = $00000010;
{$EXTERNALSYM DSOP_FILTER_UNIVERSAL_GROUPS_DL}
DSOP_FILTER_UNIVERSAL_GROUPS_SE = $00000020;
{$EXTERNALSYM DSOP_FILTER_UNIVERSAL_GROUPS_SE}
DSOP_FILTER_GLOBAL_GROUPS_DL = $00000040;
{$EXTERNALSYM DSOP_FILTER_GLOBAL_GROUPS_DL}
DSOP_FILTER_GLOBAL_GROUPS_SE = $00000080;
{$EXTERNALSYM DSOP_FILTER_GLOBAL_GROUPS_SE}
DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL = $00000100;
{$EXTERNALSYM DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL}
DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE = $00000200;
{$EXTERNALSYM DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE}
DSOP_FILTER_CONTACTS = $00000400;
{$EXTERNALSYM DSOP_FILTER_CONTACTS}
DSOP_FILTER_COMPUTERS = $00000800;
{$EXTERNALSYM DSOP_FILTER_COMPUTERS}
{
The flFilter member of a downlevel scope can contain one or more of the
following flags:
DSOP_DOWNLEVEL_FILTER_USERS
Include user objects.
DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS
Include all local groups.
DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS
Include all global groups.
DSOP_DOWNLEVEL_FILTER_COMPUTERS
Include computer objects
DSOP_DOWNLEVEL_FILTER_WORLD
Include builtin security principal World (Everyone).
DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER
Include builtin security principal Authenticated User.
DSOP_DOWNLEVEL_FILTER_ANONYMOUS
Include builtin security principal Anonymous.
DSOP_DOWNLEVEL_FILTER_BATCH
Include builtin security principal Batch.
DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER
Include builtin security principal Creator Owner.
DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP
Include builtin security principal Creator Group.
DSOP_DOWNLEVEL_FILTER_DIALUP
Include builtin security principal Dialup.
DSOP_DOWNLEVEL_FILTER_INTERACTIVE
Include builtin security principal Interactive.
DSOP_DOWNLEVEL_FILTER_NETWORK
Include builtin security principal Network.
DSOP_DOWNLEVEL_FILTER_SERVICE
Include builtin security principal Service.
DSOP_DOWNLEVEL_FILTER_SYSTEM
Include builtin security principal System.
DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS
Exclude local builtin groups returned by groups enumeration.
DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER
Include builtin security principal Terminal Server.
DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE
Include builtin security principal Local Service
DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE
Include builtin security principal Network Service
DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS
Include all builtin security principals.
}
const
DSOP_DOWNLEVEL_FILTER_USERS = DWORD($80000001);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_USERS}
DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS = DWORD($80000002);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS}
DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS = DWORD($80000004);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS}
DSOP_DOWNLEVEL_FILTER_COMPUTERS = DWORD($80000008);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_COMPUTERS}
DSOP_DOWNLEVEL_FILTER_WORLD = DWORD($80000010);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_WORLD}
DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER = DWORD($80000020);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER}
DSOP_DOWNLEVEL_FILTER_ANONYMOUS = DWORD($80000040);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_ANONYMOUS}
DSOP_DOWNLEVEL_FILTER_BATCH = DWORD($80000080);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_BATCH}
DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER = DWORD($80000100);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER}
DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP = DWORD($80000200);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP}
DSOP_DOWNLEVEL_FILTER_DIALUP = DWORD($80000400);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_DIALUP}
DSOP_DOWNLEVEL_FILTER_INTERACTIVE = DWORD($80000800);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_INTERACTIVE}
DSOP_DOWNLEVEL_FILTER_NETWORK = DWORD($80001000);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_NETWORK}
DSOP_DOWNLEVEL_FILTER_SERVICE = DWORD($80002000);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_SERVICE}
DSOP_DOWNLEVEL_FILTER_SYSTEM = DWORD($80004000);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_SYSTEM}
DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS = DWORD($80008000);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS}
DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER = DWORD($80010000);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER}
DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS = DWORD($80020000);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS}
DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE = DWORD($80040000);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE}
DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE = DWORD($80080000);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE}
DSOP_DOWNLEVEL_FILTER_REMOTE_LOGON = DWORD($80100000);
{$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_REMOTE_LOGON}
{
DSOP_UPLEVEL_FILTER_FLAGS
=========================
Contains the DSOP_FILTER_* flags for use with a DSOP_SCOPE_INIT_INFO
structure when the scope is uplevel (DS-aware).
flBothModes
Flags to use for an uplevel scope, regardless of whether it is a
mixed or native mode domain.
flMixedModeOnly
Flags to use when an uplevel domain is in mixed mode.
flNativeModeOnly
Flags to use when an uplevel domain is in native mode.
DSOP_FILTER_FLAGS
=================
Uplevel
Contains flags to use for an uplevel scope.
flDownlevel
Flags to use for a downlevel scope.
}
type
_DSOP_UPLEVEL_FILTER_FLAGS = record
flBothModes: ULONG;
flMixedModeOnly: ULONG;
flNativeModeOnly: ULONG;
end;
{$EXTERNALSYM _DSOP_UPLEVEL_FILTER_FLAGS}
DSOP_UPLEVEL_FILTER_FLAGS = _DSOP_UPLEVEL_FILTER_FLAGS;
{$EXTERNALSYM DSOP_UPLEVEL_FILTER_FLAGS}
TDsOpUpLevelFilterFlags = DSOP_UPLEVEL_FILTER_FLAGS;
PDsOpUpLevelFilterFlags = ^DSOP_UPLEVEL_FILTER_FLAGS;
_DSOP_FILTER_FLAGS = record
Uplevel: DSOP_UPLEVEL_FILTER_FLAGS;
flDownlevel: ULONG;
end;
{$EXTERNALSYM _DSOP_FILTER_FLAGS}
DSOP_FILTER_FLAGS = _DSOP_FILTER_FLAGS;
{$EXTERNALSYM DSOP_FILTER_FLAGS}
TDsOpFilterFlags = DSOP_FILTER_FLAGS;
PDsOpFilterFlags = ^DSOP_FILTER_FLAGS;
{
DSOP_SCOPE_INIT_INFO
====================
Each DSOP_SCOPE_INIT_INFO structure in the array DSOP_INIT_INFO.aDsScopeInfos
describes a single scope or a group of scopes with the same settings.
cbSize
Size, in bytes, of the entire structure.
flType
DSOP_SCOPE_TYPE_* flags. It is legal to combine multiple values via
bitwise OR if all of the types of scopes combined in this way require
the same settings.
flScope
DSOP_SCOPE_ * flags.
FilterFlags
DSOP_FILTER_* flags that indicate which types of objects should be
presented to the user in this scope.
pwzDcName
Name of the DC of a domain. This member is used only if the flType
member contains the flag DSOP_SCOPE_TYPE_JOINED_DOMAIN. If that flag is
not set, this member must be NULL.
pwzADsPath
Currently not supported, must be NULL.
hr
Filled with S_OK if the scope represented by this structure could be
created, or an error message indicating why it could not. If
IDsObjectPicker::SetScopes returns a success code, this value will
also be a success code.
}
type
PWSTR = PWideChar;
{$EXTERNALSYM PWSTR}
PDSOP_SCOPE_INIT_INFO = ^DSOP_SCOPE_INIT_INFO;
{$EXTERNALSYM PDSOP_SCOPE_INIT_INFO}
_DSOP_SCOPE_INIT_INFO = record
cbSize: ULONG;
flType: ULONG;
flScope: ULONG;
FilterFlags: DSOP_FILTER_FLAGS;
pwzDcName: PWSTR; // OPTIONAL
pwzADsPath: PWSTR; // OPTIONAL
hr: HRESULT;
end;
{$EXTERNALSYM _DSOP_SCOPE_INIT_INFO}
DSOP_SCOPE_INIT_INFO = _DSOP_SCOPE_INIT_INFO;
{$EXTERNALSYM DSOP_SCOPE_INIT_INFO}
PCDSOP_SCOPE_INIT_INFO = PDSOP_SCOPE_INIT_INFO;
{$EXTERNALSYM PCDSOP_SCOPE_INIT_INFO}
TDsOpScopeInitInfo = DSOP_SCOPE_INIT_INFO;
PDsOpScopeInitInfo = PDSOP_SCOPE_INIT_INFO;
{
DSOP_INIT_INFO flags
====================
The following flags may be set in DSOP_INIT_INFO.flOptions:
DSOP_FLAG_MULTISELECT
Allow multiple selections. If this flag is not set, the dialog will
return zero or one objects.
DSOP_FLAG_SKIP_TARGET_COMPUTER_DC_CHECK
If this flag is NOT set, then the DSOP_SCOPE_TYPE_TARGET_COMPUTER flag
will be ignored if the target computer is a DC. This flag has no effect
unless DSOP_SCOPE_TYPE_TARGET_COMPUTER is specified.
}
const
DSOP_FLAG_MULTISELECT = $00000001;
{$EXTERNALSYM DSOP_FLAG_MULTISELECT}
DSOP_FLAG_SKIP_TARGET_COMPUTER_DC_CHECK = $00000002;
{$EXTERNALSYM DSOP_FLAG_SKIP_TARGET_COMPUTER_DC_CHECK}
{
DSOP_INIT_INFO
==============
Used to configure the DS Object Picker dialog.
cbSize
Size, in bytes, of entire structure.
pwzTargetComputer
Sets the computer associated with DSOP_SCOPE_TARGET_COMPUTER, and
which is used to determine the joined domain and enterprise.
If this value is NULL, the target computer is the local machine.
cDsScopeInfos
Count of elements in aDsScopeInfos. Must be at least 1, since
the object picker cannot operate without at least one scope.
aDsScopeInfos
Array of scope initialization structures. Must be present and
contain at least one element.
flOptions
Various DS Object Picker flags (DSOP_FLAG_MULTISELECT).
cAttributesToFetch
Count of elements in apwzAttributeNames. Can be 0.
apwzAttributeNames
Array of names of attributes to fetch for each object. Ignored
if cAttributesToFetch is 0.
}
type
LPLPWSTR = ^LPWSTR;
PDSOP_INIT_INFO = ^DSOP_INIT_INFO;
{$EXTERNALSYM PDSOP_INIT_INFO}
_DSOP_INIT_INFO = record
cbSize: ULONG;
pwzTargetComputer: PWSTR;
cDsScopeInfos: ULONG;
aDsScopeInfos: PDSOP_SCOPE_INIT_INFO;
flOptions: ULONG;
cAttributesToFetch: ULONG;
apwzAttributeNames: LPLPWSTR;
end;
{$EXTERNALSYM _DSOP_INIT_INFO}
DSOP_INIT_INFO = _DSOP_INIT_INFO;
{$EXTERNALSYM DSOP_INIT_INFO}
PCDSOP_INIT_INFO = PDSOP_INIT_INFO;
{$EXTERNALSYM PCDSOP_INIT_INFO}
TDsOpInitInfo = DSOP_INIT_INFO;
PDsOpInitInfo = PDSOP_INIT_INFO;
{
DS_SELECTION
============
Describes an object selected by the user.
pwzName
The object's RDN.
pwzADsPath
The object's ADsPath.
pwzClass
The object's class attribute value.
pwzUPN
The object's userPrincipalName attribute value.
pvarFetchedAttributes
An array of VARIANTs, one for each attribute fetched.
flScopeType
A single DSOP_SCOPE_TYPE_* flag describing the type of the scope
from which this object was selected.
DS_SELECTION_LIST
=================
Available as a clipboard format from the data object returned by
IDsObjectPicker::InvokeDialog. Contains a list of objects that the user
selected.
cItems
Number of elements in the aDsSelection array.
cFetchedAttributes
Number of elements in each DSSELECTION.avarFetchedAttributes member.
aDsSelection
Array of cItems DSSELECTION structures.
}
const
ANYSIZE_ARRAY = 1;
{$EXTERNALSYM ANYSIZE_ARRAY}
type
PDS_SELECTION = ^DS_SELECTION;
{$EXTERNALSYM PDS_SELECTION}
_DS_SELECTION = record
pwzName: PWSTR;
pwzADsPath: PWSTR;
pwzClass: PWSTR;
pwzUPN: PWSTR;
pvarFetchedAttributes: POleVariant;
flScopeType: ULONG;
end;
{$EXTERNALSYM _DS_SELECTION}
DS_SELECTION = _DS_SELECTION;
{$EXTERNALSYM DS_SELECTION}
TDsSelection = DS_SELECTION;
PDsSelection = PDS_SELECTION;
PDS_SELECTION_LIST = ^DS_SELECTION_LIST;
{$EXTERNALSYM PDS_SELECTION_LIST}
_DS_SELECTION_LIST = record
cItems: ULONG;
cFetchedAttributes: ULONG;
aDsSelection: array [0..ANYSIZE_ARRAY - 1] of DS_SELECTION;
end;
{$EXTERNALSYM _DS_SELECTION_LIST}
DS_SELECTION_LIST = _DS_SELECTION_LIST;
{$EXTERNALSYM DS_SELECTION_LIST}
TDsSelectionList = DS_SELECTION_LIST;
PDsSelectionList = PDS_SELECTION_LIST;
//
// Object Picker Interfaces
//
//
// The main interface to the DS Object Picker, used to initialize it,
// invoke the dialog, and return the user's selections.
//
type
IDsObjectPicker = interface(IUnknown)
['{0c87e64e-3b7a-11d2-b9e0-00c04fd8dbf7}']
// Sets scope, filter, etc. for use with next invocation of dialog
function Initialize(const pInitInfo: DSOP_INIT_INFO): HRESULT; stdcall;
// Creates the modal DS Object Picker dialog.
function InvokeDialog(hwndParent: HWND; out ppdoSelections: IDataObject): HRESULT; stdcall;
end;
{$EXTERNALSYM IDsObjectPicker}
implementation
end.
| 32.468613 | 95 | 0.789758 |
83f1e3b5ce90b0a7f7a503c8d171203ebdc13e9d
| 1,636 |
pas
|
Pascal
|
Modelo/Persistencia/UDM.pas
|
andrecoletti23/mostra-de-talentos-aart
|
b86bfb2aea06d01c1d7a55e2343fae7e80574756
|
[
"MIT"
] | null | null | null |
Modelo/Persistencia/UDM.pas
|
andrecoletti23/mostra-de-talentos-aart
|
b86bfb2aea06d01c1d7a55e2343fae7e80574756
|
[
"MIT"
] | 15 |
2017-08-01T22:41:04.000Z
|
2017-08-31T23:24:54.000Z
|
Modelo/Persistencia/UDM.pas
|
andrecoletti23/mostra-de-talentos-aart
|
b86bfb2aea06d01c1d7a55e2343fae7e80574756
|
[
"MIT"
] | null | null | null |
unit UDM;
interface
uses
SysUtils, Classes, DB, SqlExpr, FMTBcd
, UMensagens, DBXFirebird, DBXInterBase
, DBXCommon, DBClient, Provider
;
type
TdmEntra21 = class(TDataModule)
SQLConnection: TSQLConnection;
SQLSelect: TSQLDataSet;
procedure DataModuleCreate(Sender: TObject);
private
FTransaction: TDBXTransaction;
public
procedure AbortaTransacao;
procedure FinalizaTransacao;
procedure IniciaTransacao;
procedure ValidaTransacaoAtiva;
function TemTransacaoAtiva: Boolean;
end;
var
dmEntra21: TdmEntra21;
const
CNT_DATA_BASE = 'Database';
implementation
{$R *.dfm}
uses
Math
;
procedure TdmEntra21.AbortaTransacao;
begin
if not TemTransacaoAtiva then
raise Exception.CreateFmt(STR_NAO_EXISTE_TRANSACAO_ATIVA, [STR_ABORTAR]);
SQLConnection.RollbackFreeAndNil(FTransaction);
end;
procedure TdmEntra21.FinalizaTransacao;
begin
if not TemTransacaoAtiva then
raise Exception.CreateFmt(STR_NAO_EXISTE_TRANSACAO_ATIVA, [STR_FINALIZAR]);
SQLConnection.CommitFreeAndNil(FTransaction);
end;
procedure TdmEntra21.IniciaTransacao;
begin
if TemTransacaoAtiva then
raise Exception.Create(STR_JA_EXISTE_TRANSACAO_ATIVA);
FTransaction := SQLConnection.BeginTransaction;
end;
function TdmEntra21.TemTransacaoAtiva: Boolean;
begin
Result := SQLConnection.InTransaction;
end;
procedure TdmEntra21.DataModuleCreate(Sender: TObject);
begin
SQLConnection.Connected := True;
SQLConnection.Open;
end;
procedure TdmEntra21.ValidaTransacaoAtiva;
begin
if not TemTransacaoAtiva then
raise Exception.Create(STR_VALIDA_TRANSACAO_ATIVA);
end;
end.
| 19.47619 | 79 | 0.785452 |
f12d75ff6e95f6b7f0c63810450b807f83c031d2
| 8,978 |
pas
|
Pascal
|
source/Db/Fido.Db.TypeConverter.pas
|
sonjli/FidoLib
|
d86c5bdf97e13cd2317ace207a6494da6cfe92f3
|
[
"MIT"
] | 27 |
2021-09-26T18:14:51.000Z
|
2022-01-04T09:26:42.000Z
|
source/Db/Fido.Db.TypeConverter.pas
|
sonjli/FidoLib
|
d86c5bdf97e13cd2317ace207a6494da6cfe92f3
|
[
"MIT"
] | 5 |
2021-11-08T19:20:29.000Z
|
2022-01-29T18:50:23.000Z
|
source/Db/Fido.Db.TypeConverter.pas
|
sonjli/FidoLib
|
d86c5bdf97e13cd2317ace207a6494da6cfe92f3
|
[
"MIT"
] | 7 |
2021-09-26T17:30:40.000Z
|
2022-02-14T02:19:05.000Z
|
(*
* Copyright 2021 Mirko Bianco (email: writetomirko@gmail.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*)
unit Fido.Db.TypeConverter;
interface
uses
System.TypInfo,
System.Rtti,
System.Types,
System.Variants,
Data.DB,
Spring,
Spring.Collections,
Fido.Exceptions,
Fido.Types.TGuid.Variant;
type
TBaseType = (btVariant, btInteger, btString, btDouble, btDate, btDateTime, btInt64, btBoolean, btCurrency, btExtended, btGuid, btSmallint);
EFidoUnsupportedTypeError = class (EFidoException);
TDataTypeDescriptor = class
private
TypeName: string;
IsNullable: boolean;
FBaseType: TBaseType;
FFieldType: TFieldType;
public
function GetAsVariant(const V: TValue): Variant;
function GetFromVariant(const V: Variant): TValue;
property BaseType: TBaseType read FBaseType;
property FieldType: TFieldType read FFieldType;
end;
DataTypeConverter = class
strict private const
SpringNullableTemplate = 'SPRING.NULLABLE<%s>';
BaseTypeNames : array[TBaseType] of string = (
'SYSTEM.VARIANT', 'SYSTEM.INTEGER', 'SYSTEM.STRING', 'SYSTEM.DOUBLE',
'SYSTEM.TDATE', 'SYSTEM.TDATETIME', 'SYSTEM.INT64', 'SYSTEM.BOOLEAN',
'SYSTEM.CURRENCY', 'SYSTEM.EXTENDED', 'SYSTEM.TGUID', 'SYSTEM.SMALLINT');
strict private class var
FTypeCache: IDictionary<string, TDataTypeDescriptor>;
strict private
class procedure AddTypeDescriptor(const BaseType: TBaseType; const IsNullable: boolean; const TypeKind: TTypeKind; const FieldType: TFieldType; const TypeName: string = '');
public
class constructor Create;
class function GotDescriptor(const RttiType: TRttiType; out Descriptor: TDataTypeDescriptor): boolean; overload;
class function GotDescriptor(const QualifiedTypeName: string; out Descriptor: TDataTypeDescriptor): boolean; overload;
class function GetDescriptor(const RttiType: TRttiType): TDataTypeDescriptor;
end;
implementation
uses
System.SysUtils;
{ DataTypesConverter }
class procedure DataTypeConverter.AddTypeDescriptor(
const BaseType: TBaseType;
const IsNullable: boolean;
const TypeKind: TTypeKind;
const FieldType: TFieldType;
const TypeName: string = '');
var
D: TDataTypeDescriptor;
begin
D := TDataTypeDescriptor.Create;
try
if not TypeName.IsEmpty then
D.TypeName := TypeName.ToUpper
else if IsNullable then
D.TypeName := Format(SpringNullableTemplate, [BaseTypeNames[BaseType]]).ToUpper
else
D.TypeName := BaseTypeNames[BaseType].ToUpper;
// D.TypeKind := TypeKind;
D.FBaseType := BaseType;
D.FFieldType := FieldType;
D.IsNullable := IsNullable;
FTypeCache.Add(D.TypeName, D);
except
D.Free;
raise;
end;
end;
class constructor DataTypeConverter.Create;
begin
FTypeCache := TCollections.CreateDictionary<string, TDataTypeDescriptor>([doOwnsValues]);
// RTTI integers (ignore ShortInt, Smallint etc.)
AddTypeDescriptor(btInteger, false, tkInteger, ftInteger);
AddTypeDescriptor(btInt64, false, tkInt64, ftLargeInt);
// RTTI strings (ignore: tkChar, tkString, tkWChar, tkLString, tkWString, tkUString)
AddTypeDescriptor(btString, false, tkString, ftString);
// RTTI floats (ignore TTime, we don't really use it)
AddTypeDescriptor(btDouble, false, tkFloat, ftFloat);
AddTypeDescriptor(btDate, false, tkFloat, ftDate);
AddTypeDescriptor(btDateTime, false, tkFloat, ftDateTime);
AddTypeDescriptor(btCurrency, false, tkFloat, ftCurrency);
AddTypeDescriptor(btExtended, false, tkFloat, ftExtended);
// RTTI Boolean (ignore rest of enumerables)
AddTypeDescriptor(btBoolean, false, tkEnumeration, ftBoolean);
// plain variant
AddTypeDescriptor(btVariant, false, tkVariant, ftVariant);
// Guid
AddTypeDescriptor(btGuid, false, tkRecord, ftGuid);
AddTypeDescriptor(btSmallint, false, tkInteger, ftSmallint);
// Spring Nullables for all supported primitives
// TypeKind = tkRecord
AddTypeDescriptor(btInteger, true, tkRecord, ftInteger);
AddTypeDescriptor(btInt64, true, tkRecord, ftLargeInt);
AddTypeDescriptor(btString, true, tkRecord, ftString);
AddTypeDescriptor(btDouble, true, tkRecord, ftFloat);
AddTypeDescriptor(btDate, true, tkRecord, ftDate);
AddTypeDescriptor(btDateTime, true, tkRecord, ftDateTime);
AddTypeDescriptor(btCurrency, true, tkRecord, ftCurrency);
AddTypeDescriptor(btExtended, true, tkRecord, ftExtended);
AddTypeDescriptor(btBoolean, true, tkRecord, ftBoolean);
AddTypeDescriptor(btGuid, true, tkRecord, ftGuid);
AddTypeDescriptor(btSmallint, true, tkRecord, ftSmallint);
end;
class function DataTypeConverter.GetDescriptor(const RttiType: TRttiType): TDataTypeDescriptor;
begin
if not GotDescriptor(RttiType, Result) then
raise EFidoUnsupportedTypeError.CreateFmt('Type %s is not supported by Fido Framework', [RttiType.QualifiedName]);
end;
class function DataTypeConverter.GotDescriptor(
const QualifiedTypeName: string;
out Descriptor: TDataTypeDescriptor): boolean;
begin
Result := FTypeCache.TryGetValue(QualifiedTypeName.ToUpper, Descriptor);
end;
class function DataTypeConverter.GotDescriptor(
const RttiType: TRttiType;
out Descriptor: TDataTypeDescriptor): boolean;
begin
Result := GotDescriptor(RttiType.QualifiedName, Descriptor);
end;
{ TDataTypeDescriptor }
function TDataTypeDescriptor.GetAsVariant(const V: TValue): Variant;
begin
if not IsNullable then
begin
case BaseType of
btGuid:
if V.AsType<TGuid> = GUID_NULL then
Exit(Null)
else
Exit(VarGuidCreate(V.AsType<TGuid>));
else
Exit(V.AsVariant)
end;
end
else
case BaseType of
btInteger: Exit(V.AsType<Nullable<integer>>.ToVariant);
btString: Exit(V.AsType<Nullable<string>>.ToVariant);
btDouble: Exit(V.AsType<Nullable<double>>.ToVariant);
btDate: Exit(V.AsType<Nullable<TDate>>.ToVariant);
btDateTime: Exit(V.AsType<Nullable<TDateTime>>.ToVariant);
btCurrency: Exit(V.AsType<Nullable<Currency>>.ToVariant);
btExtended: Exit(V.AsType<Nullable<Extended>>.ToVariant);
btInt64: Exit(V.AsType<Nullable<Int64>>.ToVariant);
btBoolean: Exit(V.AsType<Nullable<Boolean>>.ToVariant);
btGuid: Exit(V.AsType<Nullable<TGuid>>.ToVariant);
btSmallint: Exit(V.AsType<Nullable<Smallint>>.ToVariant);
else
Assert(false, 'Unsupported nullable type');
end;
Result := null;
end;
function TDataTypeDescriptor.GetFromVariant(const V: Variant): TValue;
begin
if not IsNullable then
begin
case BaseType of
btGuid:
if V = Null then
Exit(TValue.From<TGuid>(TGuid.Empty))
else
Exit(TValue.From<TGuid>(StringToGuid(V)));
else
Exit(TValue.FromVariant(V));
end;
end
else
case BaseType of
btInteger: Exit(TValue.From<Nullable<Integer>>(Nullable<Integer>.Create(V)));
btString: Exit(TValue.From<Nullable<string>>(Nullable<string>.Create(V)));
btDouble: Exit(TValue.From<Nullable<double>>(Nullable<double>.Create(V)));
btDate: Exit(TValue.From<Nullable<TDate>>(Nullable<TDate>.Create(V)));
btDateTime: Exit(TValue.From<Nullable<TDateTime>>(Nullable<TDateTime>.Create(V)));
btCurrency: Exit(TValue.From<Nullable<Currency>>(Nullable<Currency>.Create(V)));
btExtended: Exit(TValue.From<Nullable<Extended>>(Nullable<Extended>.Create(V)));
btInt64: Exit(TValue.From<Nullable<Int64>>(Nullable<Int64>.Create(V)));
btBoolean: Exit(TValue.From<Nullable<Boolean>>(Nullable<Boolean>.Create(V)));
btSmallint: Exit(TValue.From<Nullable<Smallint>>(Nullable<Smallint>.Create(V)));
btGuid:
if V = null then
Exit(TValue.From<Nullable<TGuid>>(Nullable<TGuid>.Create(V)))
else
Exit(TValue.From<Nullable<TGuid>>(Nullable<TGuid>.Create(StringToGuid(V))));
else
Assert(false, 'Unsupported nullable type');
end;
Result := TValue.Empty;
end;
end.
| 35.346457 | 177 | 0.732903 |
f10182b940ff01d4ddbb035ee631aa26b8454fc4
| 2,471 |
pas
|
Pascal
|
Scroll.pas
|
iso4free/Tile-Studio
|
93756106fd9f83ab3a959e6d7a5dd338ebf04998
|
[
"MIT"
] | 1 |
2020-04-30T05:47:57.000Z
|
2020-04-30T05:47:57.000Z
|
Scroll.pas
|
iso4free/Tile-Studio
|
93756106fd9f83ab3a959e6d7a5dd338ebf04998
|
[
"MIT"
] | null | null | null |
Scroll.pas
|
iso4free/Tile-Studio
|
93756106fd9f83ab3a959e6d7a5dd338ebf04998
|
[
"MIT"
] | 1 |
2021-04-10T14:05:16.000Z
|
2021-04-10T14:05:16.000Z
|
unit Scroll;
{
Tile Studio
Copyright (c) 2000-2017, Mike Wiering, Wiering Software
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
}
{$I settings.inc}
interface
uses
LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TMapScroll = class(TForm)
OkButton: TButton;
CancelButton: TButton;
X: TEdit;
L1: TLabel;
Y: TEdit;
L2: TLabel;
Label1: TLabel;
procedure YKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure FormShow(Sender: TObject);
procedure OkButtonClick(Sender: TObject);
procedure CancelButtonClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
Result: Boolean;
end;
var
MapScroll: TMapScroll;
implementation
{$R *.frm}
procedure TMapScroll.YKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if key = VK_ESCAPE then
CancelButtonClick (Sender);
if key = VK_RETURN then
OKButtonClick (Sender);
end;
procedure TMapScroll.FormShow(Sender: TObject);
begin
Result := FALSE;
X.SetFocus;
end;
procedure TMapScroll.OkButtonClick(Sender: TObject);
begin
Result := TRUE;
Close;
end;
procedure TMapScroll.CancelButtonClick(Sender: TObject);
begin
Close;
end;
end.
| 27.764045 | 98 | 0.693646 |
f193e6e566df429a37271052f45fe34b531b45c6
| 2,812 |
dfm
|
Pascal
|
Procesos/FacturasPropiedadesEdit.dfm
|
alexismzt/SOFOM
|
57ca73e9f7fbb51521149ea7c0fdc409c22cc6f7
|
[
"Apache-2.0"
] | null | null | null |
Procesos/FacturasPropiedadesEdit.dfm
|
alexismzt/SOFOM
|
57ca73e9f7fbb51521149ea7c0fdc409c22cc6f7
|
[
"Apache-2.0"
] | 51 |
2018-07-25T15:39:25.000Z
|
2021-04-21T17:40:57.000Z
|
Procesos/FacturasPropiedadesEdit.dfm
|
alexismzt/SOFOM
|
57ca73e9f7fbb51521149ea7c0fdc409c22cc6f7
|
[
"Apache-2.0"
] | 1 |
2021-02-23T17:27:06.000Z
|
2021-02-23T17:27:06.000Z
|
inherited frmFacturasPropiedadesEdit: TfrmFacturasPropiedadesEdit
Caption = 'Factura '
ClientHeight = 267
ClientWidth = 390
ExplicitWidth = 396
ExplicitHeight = 296
PixelsPerInch = 96
TextHeight = 13
inherited pcMain: TcxPageControl
Width = 390
Height = 226
ExplicitWidth = 380
ExplicitHeight = 267
ClientRectBottom = 224
ClientRectRight = 388
inherited tsGeneral: TcxTabSheet
ExplicitLeft = 1
ExplicitTop = 28
ExplicitWidth = 407
ExplicitHeight = 239
object Label15: TLabel
Left = 25
Top = 43
Width = 57
Height = 13
Caption = 'Forma pago'
FocusControl = dblcbFormaPago
end
object Label16: TLabel
Left = 25
Top = 2
Width = 63
Height = 13
Caption = 'Metodo pago'
FocusControl = dblcbMetodPago
end
object Label17: TLabel
Left = 25
Top = 132
Width = 60
Height = 13
Caption = 'Tipo relaci'#243'n'
FocusControl = dblcbTipoRelacion
end
object Label18: TLabel
Left = 25
Top = 86
Width = 18
Height = 13
Caption = 'Uso'
FocusControl = dblcbUso
end
object dblcbFormaPago: TDBLookupComboBox
Left = 25
Top = 59
Width = 300
Height = 21
DataField = 'FormaPago33'
DataSource = DataSource
TabOrder = 1
end
object dblcbMetodPago: TDBLookupComboBox
Left = 25
Top = 18
Width = 300
Height = 21
DataField = 'MetodoPago33'
DataSource = DataSource
TabOrder = 0
end
object dblcbTipoRelacion: TDBLookupComboBox
Left = 25
Top = 151
Width = 300
Height = 21
DataField = 'TipoRelacion'
DataSource = DataSource
TabOrder = 3
end
object dblcbUso: TDBLookupComboBox
Left = 25
Top = 105
Width = 300
Height = 21
DataField = 'UsoCFDI'
DataSource = DataSource
TabOrder = 2
end
object btnRelacionarCFDI: TButton
Left = 331
Top = 151
Width = 42
Height = 21
Hint = 'Relacionar los CFDi anteriores'
Caption = '...'
TabOrder = 4
end
end
end
inherited pmlMain: TPanel
Top = 226
Width = 390
ExplicitTop = 267
ExplicitWidth = 380
inherited btnCancel: TButton
Left = 308
ExplicitLeft = 298
end
inherited btnOk: TButton
Left = 227
ExplicitLeft = 217
end
end
inherited cxImageList: TcxImageList
FormatVersion = 1
end
end
| 23.830508 | 66 | 0.539829 |
f1860ada7da9b900eb999c2608a78d7f936412ab
| 1,539 |
lpr
|
Pascal
|
autopointer_test.lpr
|
soerensen3/autopointer
|
7a539d44875ab02a22be382605db0f0269e9eb6e
|
[
"MIT",
"Unlicense"
] | null | null | null |
autopointer_test.lpr
|
soerensen3/autopointer
|
7a539d44875ab02a22be382605db0f0269e9eb6e
|
[
"MIT",
"Unlicense"
] | null | null | null |
autopointer_test.lpr
|
soerensen3/autopointer
|
7a539d44875ab02a22be382605db0f0269e9eb6e
|
[
"MIT",
"Unlicense"
] | null | null | null |
program autopointer_test;
{$MODE delphi}
uses
fgl, autopointer, autoobj, sysutils;
type
{ TTestClass }
TTestClass = class( TAutoClassContained )
i: Integer;
constructor Create( Index: Integer );
destructor Destroy; override;
end;
{ TTestClass2 }
TTestClass2 = class ( TAutoClass )
i: Integer;
constructor Create(Index: Integer);
destructor Destroy; override;
end;
TTestClass3 = class
objAuto: TAuto < TTestClass2 >;
property obj: TTestClass2 read objAuto.FInstance;
end;
{ TTestClass2 }
constructor TTestClass2.Create(Index: Integer);
begin
inherited Create;
WriteLn( 'Create ', Index );
i:= Index;
end;
destructor TTestClass2.Destroy;
begin
WriteLn( 'Destroy ', i );
inherited Destroy;
end;
{ TTestClass }
constructor TTestClass.Create(Index: Integer);
begin
WriteLn( 'Create ', Index );
i:= Index;
end;
destructor TTestClass.Destroy;
begin
WriteLn( 'Destroy ', i );
inherited Destroy;
end;
var
C: TAutoContainer < TTestClass >;
P: TAutoPointer < TTestClass >;
S1, S2: TAuto < TTestClass2 >;
cl: TTestClass3;
begin
WriteLn( '> ', IntToHex( Integer( C.Instance ), 8 ));
C:= TTestClass.Create( 0 );
P:= C;
S1:= TTestClass2.Create( 1 );
S2:= S1;
WriteLn( '> ', IntToHex( Integer( C.Instance ), 8 ));
WriteLn( '> ', IntToHex( Integer( P.Instance ), 8 ));
C.Instance.Free;
C.Instance:= nil;
WriteLn( '> ', IntToHex( Integer( P.Instance ), 8 ));
cl:= TTestClass3.Create;
cl.objAuto:= TTestClass2.Create( 999 );
cl.Free;
end.
| 18.768293 | 55 | 0.662768 |
83a3d7055e4379a21466678a7a7804e9602ac6a4
| 905 |
dfm
|
Pascal
|
windows/src/ext/jedi/jcl/jcl/examples/windows/clr/ClrDemoGuidForm.dfm
|
bravogeorge/keyman
|
c0797e36292de903d7313214d1f765e3d9a2bf4d
|
[
"MIT"
] | 219 |
2017-06-21T03:37:03.000Z
|
2022-03-27T12:09:28.000Z
|
windows/src/ext/jedi/jcl/jcl/examples/windows/clr/ClrDemoGuidForm.dfm
|
bravogeorge/keyman
|
c0797e36292de903d7313214d1f765e3d9a2bf4d
|
[
"MIT"
] | 4,451 |
2017-05-29T02:52:06.000Z
|
2022-03-31T23:53:23.000Z
|
windows/src/ext/jedi/jcl/jcl/examples/windows/clr/ClrDemoGuidForm.dfm
|
bravogeorge/keyman
|
c0797e36292de903d7313214d1f765e3d9a2bf4d
|
[
"MIT"
] | 72 |
2017-05-26T04:08:37.000Z
|
2022-03-03T10:26:20.000Z
|
object frmGuid: TfrmGuid
Left = 339
Top = 225
BorderStyle = bsDialog
Caption = 'Guid Stream'
ClientHeight = 273
ClientWidth = 392
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
PixelsPerInch = 96
TextHeight = 13
object btnOK: TBitBtn
Left = 159
Top = 240
Width = 75
Height = 25
TabOrder = 0
Kind = bkOK
end
object lstGuids: TListView
Left = 8
Top = 8
Width = 377
Height = 225
Columns = <
item
Caption = 'Index'
Width = 40
end
item
Caption = 'GUID'
Width = 320
end>
GridLines = True
OwnerData = True
ReadOnly = True
RowSelect = True
TabOrder = 1
ViewStyle = vsReport
OnData = lstGuidsData
end
end
| 18.469388 | 32 | 0.60221 |
83d08f7148a81b453e111be59b64f1235e79ba74
| 5,476 |
pas
|
Pascal
|
CryptoLib.Tests/src/Asn1/EnumeratedTests.pas
|
stlcours/CryptoLib4Pascal
|
82344d4a4b74422559fa693466ca04652e42cf8b
|
[
"MIT"
] | 2 |
2019-07-09T10:06:53.000Z
|
2021-08-15T18:19:31.000Z
|
CryptoLib.Tests/src/Asn1/EnumeratedTests.pas
|
stlcours/CryptoLib4Pascal
|
82344d4a4b74422559fa693466ca04652e42cf8b
|
[
"MIT"
] | null | null | null |
CryptoLib.Tests/src/Asn1/EnumeratedTests.pas
|
stlcours/CryptoLib4Pascal
|
82344d4a4b74422559fa693466ca04652e42cf8b
|
[
"MIT"
] | null | null | null |
{ *********************************************************************************** }
{ * CryptoLib Library * }
{ * Copyright (c) 2018 - 20XX Ugochukwu Mmaduekwe * }
{ * Github Repository <https://github.com/Xor-el> * }
{ * Distributed under the MIT software license, see the accompanying file LICENSE * }
{ * or visit http://www.opensource.org/licenses/mit-license.php. * }
{ * Acknowledgements: * }
{ * * }
{ * Thanks to Sphere 10 Software (http://www.sphere10.com/) for sponsoring * }
{ * development of this library * }
{ * ******************************************************************************* * }
(* &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& *)
unit EnumeratedTests;
interface
{$IFDEF FPC}
{$MODE DELPHI}
{$ENDIF FPC}
uses
SysUtils,
{$IFDEF FPC}
fpcunit,
testregistry,
{$ELSE}
TestFramework,
{$ENDIF FPC}
ClpAsn1Objects,
ClpIAsn1Objects,
ClpEncoders;
type
TCryptoLibTestCase = class abstract(TTestCase)
end;
type
/// <summary>
/// Tests used to verify correct decoding of the ENUMERATED type.
/// </summary>
TTestEnumerated = class(TCryptoLibTestCase)
var
private
FMultipleSingleByteItems, FMultipleDoubleByteItems,
FMultipleTripleByteItems: TBytes;
protected
procedure SetUp; override;
procedure TearDown; override;
published
/// <summary>
/// Makes sure multiple identically sized values are parsed correctly.
/// </summary>
procedure TestReadingMultipleSingleByteItems;
/// <summary>
/// Makes sure multiple identically sized values are parsed correctly.
/// </summary>
procedure TestReadingMultipleDoubleByteItems;
/// <summary>
/// Makes sure multiple identically sized values are parsed correctly.
/// </summary>
procedure TestReadingMultipleTripleByteItems;
end;
implementation
{ TTestEnumerated }
procedure TTestEnumerated.SetUp;
begin
inherited;
/// <summary>
/// Test vector used to test decoding of multiple items.
/// </summary>
/// <remarks>This sample uses an ENUMERATED and a BOOLEAN.</remarks>
FMultipleSingleByteItems := THex.Decode('30060a01010101ff');
/// <summary>
/// Test vector used to test decoding of multiple items.
/// </summary>
/// <remarks>This sample uses two ENUMERATEDs.</remarks>
FMultipleDoubleByteItems := THex.Decode('30080a0201010a020202');
/// <summary>
/// Test vector used to test decoding of multiple items.
/// </summary>
/// <remarks>This sample uses an ENUMERATED and an OBJECT IDENTIFIER.</remarks>
FMultipleTripleByteItems := THex.Decode('300a0a0301010106032b0601');
end;
procedure TTestEnumerated.TearDown;
begin
inherited;
end;
procedure TTestEnumerated.TestReadingMultipleSingleByteItems;
var
obj: IAsn1Object;
sequence: IDerSequence;
enumerated: IDerEnumerated;
boolean: IDerBoolean;
begin
obj := TAsn1Object.FromByteArray(FMultipleSingleByteItems);
CheckTrue(Supports(obj, IDerSequence), 'Null ASN.1 SEQUENCE');
sequence := obj as IDerSequence;
CheckEquals(2, sequence.Count, '2 items expected');
enumerated := sequence[0] as IDerEnumerated;
CheckNotNull(enumerated, 'ENUMERATED expected');
CheckEquals(1, enumerated.Value.Int32Value, 'Unexpected ENUMERATED value');
boolean := sequence[1] as IDerBoolean;
CheckNotNull(boolean, 'BOOLEAN expected');
CheckTrue(boolean.IsTrue, 'Unexpected BOOLEAN value');
end;
procedure TTestEnumerated.TestReadingMultipleDoubleByteItems;
var
obj: IAsn1Object;
sequence: IDerSequence;
enumerated, enumerated2: IDerEnumerated;
begin
obj := TAsn1Object.FromByteArray(FMultipleDoubleByteItems);
CheckTrue(Supports(obj, IDerSequence), 'Null ASN.1 SEQUENCE');
sequence := obj as IDerSequence;
CheckEquals(2, sequence.Count, '2 items expected');
enumerated := sequence[0] as IDerEnumerated;
CheckNotNull(enumerated, 'ENUMERATED expected');
CheckEquals(257, enumerated.Value.Int32Value, 'Unexpected ENUMERATED value');
enumerated2 := sequence[1] as IDerEnumerated;
CheckNotNull(enumerated2, 'ENUMERATED expected');
CheckEquals(514, enumerated2.Value.Int32Value, 'Unexpected ENUMERATED value');
end;
procedure TTestEnumerated.TestReadingMultipleTripleByteItems;
var
obj: IAsn1Object;
sequence: IDerSequence;
enumerated: IDerEnumerated;
objectId: IDerObjectIdentifier;
begin
obj := TAsn1Object.FromByteArray(FMultipleTripleByteItems);
CheckTrue(Supports(obj, IDerSequence), 'Null ASN.1 SEQUENCE');
sequence := obj as IDerSequence;
CheckEquals(2, sequence.Count, '2 items expected');
enumerated := sequence[0] as IDerEnumerated;
CheckNotNull(enumerated, 'ENUMERATED expected');
CheckEquals(65793, enumerated.Value.Int32Value,
'Unexpected ENUMERATED value');
objectId := sequence[1] as IDerObjectIdentifier;
CheckNotNull(objectId, 'OBJECT IDENTIFIER expected');
CheckEquals('1.3.6.1', objectId.Id, 'Unexpected OBJECT IDENTIFIER value');
end;
initialization
// Register any test cases with the test runner
{$IFDEF FPC}
RegisterTest(TTestEnumerated);
{$ELSE}
RegisterTest(TTestEnumerated.Suite);
{$ENDIF FPC}
end.
| 27.517588 | 87 | 0.654127 |
8521ffd447a79ce9a6ace6043a9650483a692b7c
| 11,671 |
dfm
|
Pascal
|
2003/installer/makeparser/setup/algus.dfm
|
rla/old-code
|
06aa69c3adef8434992410687d466dc42779e57b
|
[
"Ruby",
"MIT"
] | 2 |
2015-11-08T10:01:47.000Z
|
2020-03-10T00:00:58.000Z
|
2003/installer/makeparser/setup/algus.dfm
|
rla/old-code
|
06aa69c3adef8434992410687d466dc42779e57b
|
[
"Ruby",
"MIT"
] | null | null | null |
2003/installer/makeparser/setup/algus.dfm
|
rla/old-code
|
06aa69c3adef8434992410687d466dc42779e57b
|
[
"Ruby",
"MIT"
] | null | null | null |
object Form1: TForm1
Left = 33
Top = 100
Width = 728
Height = 535
Caption = 'Jc Installer Maker'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object PageControl1: TPageControl
Left = 208
Top = 16
Width = 505
Height = 449
ActivePage = TabSheet3
TabIndex = 0
TabOrder = 0
object TabSheet3: TTabSheet
Caption = 'Project'
ImageIndex = 2
object GroupBox2: TGroupBox
Left = 0
Top = 16
Width = 497
Height = 185
Caption = 'Project'
TabOrder = 0
object Label5: TLabel
Left = 8
Top = 24
Width = 28
Height = 13
Caption = 'Name'
end
object Label6: TLabel
Left = 8
Top = 112
Width = 101
Height = 13
Caption = 'Bitmap ( .bmp ) Name'
end
object Edit4: TEdit
Left = 8
Top = 40
Width = 265
Height = 21
TabOrder = 0
Text = 'New Project'
end
object CheckBox1: TCheckBox
Left = 8
Top = 88
Width = 169
Height = 17
Caption = 'Display Splash Screen At Start'
TabOrder = 1
OnClick = SplashClick
end
object Edit5: TEdit
Left = 8
Top = 128
Width = 265
Height = 21
Enabled = False
TabOrder = 2
end
object Button1: TButton
Left = 288
Top = 128
Width = 65
Height = 25
Caption = 'Browse'
TabOrder = 3
OnClick = OtsiPilt
end
end
object GroupBox3: TGroupBox
Left = 0
Top = 216
Width = 497
Height = 177
Caption = 'Where To Create New Project'
TabOrder = 1
object Label7: TLabel
Left = 280
Top = 128
Width = 87
Height = 13
Caption = 'Selected Directory'
end
object Label8: TLabel
Left = 280
Top = 24
Width = 67
Height = 13
Caption = 'New Directory'
end
object ShellTreeView1: TShellTreeView
Left = 8
Top = 24
Width = 265
Height = 145
ObjectTypes = [otFolders]
Root = 'rfMyComputer'
UseShellImages = True
AutoRefresh = False
Indent = 19
ParentColor = False
RightClickSelect = True
ShowRoot = False
TabOrder = 0
OnChange = ChangeProDir
end
object Edit6: TEdit
Left = 280
Top = 144
Width = 209
Height = 21
TabOrder = 1
Text = 'C:\New Project'
end
object Edit7: TEdit
Left = 280
Top = 40
Width = 209
Height = 21
TabOrder = 2
Text = 'New Project'
end
object Button2: TButton
Left = 280
Top = 72
Width = 65
Height = 25
Caption = 'Create New'
TabOrder = 3
OnClick = CreateNewDir
end
end
end
object TabSheet1: TTabSheet
Caption = 'Copyright'
object Label2: TLabel
Left = 8
Top = 344
Width = 86
Height = 13
Caption = 'Agree Button Text'
end
object Label1: TLabel
Left = 8
Top = 56
Width = 73
Height = 13
Caption = 'Copyright notes'
end
object Label3: TLabel
Left = 168
Top = 344
Width = 100
Height = 13
Caption = 'Disagree Button Test'
end
object Label4: TLabel
Left = 8
Top = 8
Width = 93
Height = 13
Caption = 'Copyrigth Form Title'
end
object Memo1: TMemo
Left = 8
Top = 72
Width = 481
Height = 265
TabOrder = 0
end
object Edit2: TEdit
Left = 8
Top = 360
Width = 137
Height = 21
TabOrder = 1
Text = 'Agree'
end
object Edit1: TEdit
Left = 168
Top = 360
Width = 137
Height = 21
TabOrder = 2
Text = 'Disagree'
end
object Edit3: TEdit
Left = 8
Top = 24
Width = 265
Height = 21
TabOrder = 3
Text = 'Copyright'
end
end
object TabSheet4: TTabSheet
Caption = 'WhereTo'
ImageIndex = 3
object Label9: TLabel
Left = 8
Top = 88
Width = 79
Height = 13
Caption = 'Default Directory'
end
object Label10: TLabel
Left = 8
Top = 144
Width = 65
Height = 13
Caption = 'Label Caption'
end
object Label13: TLabel
Left = 8
Top = 32
Width = 94
Height = 13
Caption = 'WhereTo Form Title'
end
object Edit8: TEdit
Left = 8
Top = 104
Width = 265
Height = 21
TabOrder = 0
Text = 'C:\Program Files\New Project'
end
object Edit9: TEdit
Left = 8
Top = 160
Width = 265
Height = 21
TabOrder = 1
Text = 'Needed 1Mb'
end
object Edit12: TEdit
Left = 8
Top = 48
Width = 265
Height = 21
TabOrder = 2
Text = 'Where do you want to install?'
end
end
object TabSheet2: TTabSheet
Caption = 'Settings'
ImageIndex = 1
object Label11: TLabel
Left = 8
Top = 104
Width = 86
Height = 13
Caption = 'Installation Setting'
end
object Label12: TLabel
Left = 8
Top = 48
Width = 87
Height = 13
Caption = 'Settings Form Title'
end
object Label14: TLabel
Left = 8
Top = 328
Width = 70
Height = 13
Caption = 'Settings Memo'
end
object CheckListBox1: TCheckListBox
Left = 8
Top = 120
Width = 481
Height = 161
ItemHeight = 13
PopupMenu = PopupMenu2
TabOrder = 0
end
object Edit10: TEdit
Left = 8
Top = 288
Width = 265
Height = 21
TabOrder = 1
Text = 'Add To Registry'
end
object CheckBox2: TCheckBox
Left = 8
Top = 8
Width = 153
Height = 25
Caption = 'Use Installation Settings'
TabOrder = 2
end
object Button3: TButton
Left = 288
Top = 288
Width = 65
Height = 25
Caption = 'Add'
TabOrder = 3
OnClick = LisaSetting
end
object Edit11: TEdit
Left = 8
Top = 64
Width = 265
Height = 21
TabOrder = 4
Text = 'What to install?'
end
object Memo2: TMemo
Left = 8
Top = 344
Width = 481
Height = 65
TabOrder = 5
end
object StaticText1: TStaticText
Left = 368
Top = 288
Width = 109
Height = 17
Caption = 'Right Click To Specify'
TabOrder = 6
end
object StaticText2: TStaticText
Left = 368
Top = 304
Width = 61
Height = 17
Caption = 'The File List'
TabOrder = 7
end
end
object TabSheet5: TTabSheet
Caption = 'Special'
ImageIndex = 4
object Label15: TLabel
Left = 8
Top = 136
Width = 21
Height = 13
Caption = 'Text'
end
object Label16: TLabel
Left = 8
Top = 208
Width = 21
Height = 13
Caption = 'Text'
end
object Label17: TLabel
Left = 8
Top = 256
Width = 70
Height = 13
Caption = 'Run Command'
end
object Label18: TLabel
Left = 8
Top = 296
Width = 264
Height = 13
Caption = '%path is the directory where the program will be installed'
end
object Label19: TLabel
Left = 8
Top = 344
Width = 21
Height = 13
Caption = 'Text'
end
object Label20: TLabel
Left = 8
Top = 56
Width = 125
Height = 13
Caption = 'Special Settings Form Title'
end
object CheckBox3: TCheckBox
Left = 8
Top = 112
Width = 137
Height = 17
Caption = 'Restart After Installation'
TabOrder = 0
end
object Edit13: TEdit
Left = 8
Top = 152
Width = 265
Height = 21
TabOrder = 1
Text = 'Restart after installation?'
end
object CheckBox4: TCheckBox
Left = 8
Top = 184
Width = 121
Height = 17
Caption = 'Start After Installation'
TabOrder = 2
end
object Edit14: TEdit
Left = 8
Top = 224
Width = 265
Height = 21
TabOrder = 3
Text = 'Start program when installer finish'
end
object Edit15: TEdit
Left = 8
Top = 272
Width = 273
Height = 21
TabOrder = 4
Text = '%path\Program.exe'
end
object CheckBox5: TCheckBox
Left = 8
Top = 320
Width = 257
Height = 17
Caption = 'Add ShortCut To Desktop And QuickLaunch Bar'
TabOrder = 5
end
object Edit16: TEdit
Left = 8
Top = 360
Width = 273
Height = 21
TabOrder = 6
Text = 'Add Shortcut icon to desktop?'
end
object CheckBox6: TCheckBox
Left = 8
Top = 24
Width = 137
Height = 17
Caption = 'Use Special Settings'
TabOrder = 7
end
object Edit17: TEdit
Left = 8
Top = 72
Width = 265
Height = 21
TabOrder = 8
Text = 'Final settings'
end
end
end
object GroupBox1: TGroupBox
Left = 8
Top = 16
Width = 193
Height = 417
Caption = 'Summary'
TabOrder = 1
end
object Button4: TButton
Left = 8
Top = 456
Width = 81
Height = 25
Caption = 'Make Install'
TabOrder = 2
OnClick = MakeInstall
end
object Button5: TButton
Left = 104
Top = 456
Width = 81
Height = 25
Caption = 'Close'
TabOrder = 3
OnClick = CloseForm
end
object OpenPictureDialog1: TOpenPictureDialog
Left = 152
Top = 128
end
object PopupMenu1: TPopupMenu
Left = 152
Top = 16
object Kustuta1: TMenuItem
Caption = 'Remove'
OnClick = RemSetting
end
end
object PopupMenu2: TPopupMenu
Left = 152
Top = 48
object FileList1: TMenuItem
Caption = 'Files List'
OnClick = TeeFileList
end
end
end
| 22.706226 | 79 | 0.460372 |
f19de4c80107cc49d8c29213171ffd3d50e00d73
| 1,726 |
pas
|
Pascal
|
tests/altium_crap/Scripts/Delphiscript Scripts/Processes/PublishToPDFScript.pas
|
hanun2999/Altium-Schematic-Parser
|
a9bd5b1a865f92f2e3f749433fb29107af528498
|
[
"MIT"
] | 1 |
2020-06-08T11:17:46.000Z
|
2020-06-08T11:17:46.000Z
|
tests/altium_crap/Scripts/Delphiscript Scripts/Processes/PublishToPDFScript.pas
|
hanun2999/Altium-Schematic-Parser
|
a9bd5b1a865f92f2e3f749433fb29107af528498
|
[
"MIT"
] | null | null | null |
tests/altium_crap/Scripts/Delphiscript Scripts/Processes/PublishToPDFScript.pas
|
hanun2999/Altium-Schematic-Parser
|
a9bd5b1a865f92f2e3f749433fb29107af528498
|
[
"MIT"
] | null | null | null |
{..............................................................................}
{ Summary Generate a PDF from a OutJob File with }
{ Assembly Drawings and Schematic Prints }
{ Copyright (c) 2006 by Altium Limited }
{..............................................................................}
{..............................................................................}
Procedure PublishToPDF_AssemblyDrawingsAndSchematicPrints;
Begin
ResetParameters;
AddStringParameter ('Action' ,'PublishToPDF');
AddStringParameter ('ObjectKind' ,'OutputSingle');
AddStringParameter ('SelectedName1' ,'Assembly Drawings');
AddStringParameter ('SelectedName2' ,'Schematic Prints');
AddStringParameter ('DisableDialog' ,'True');
AddStringParameter ('OutputFilePath' ,'c:\AssemblyAndSchematic.pdf');
AddStringParameter ('OpenOutput' ,'True');
AddIntegerParameter('ZoomLevel' ,50);
AddStringParameter ('FitSCHPrintSizeToDoc' ,'True');
AddStringParameter ('FitPCBPrintSizeToDoc' ,'True');
AddStringParameter ('GenerateNetsInfo' ,'True');
AddStringParameter ('MarkPins' ,'True');
AddStringParameter ('MarkNetLabels' ,'True');
AddStringParameter ('MarkPorts' ,'True');
RunProcess('WorkspaceManager:Print');
End;
{..............................................................................}
{..............................................................................}
| 53.9375 | 87 | 0.43511 |
Subsets and Splits
HTML Code Excluding Scripts
The query retrieves a limited set of HTML content entries that are longer than 8 characters and do not contain script tags, offering only basic filtering with minimal analytical value.