-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
195 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,7 @@ | |
padding-left: 13px; | ||
padding-right: 0; | ||
} | ||
|
||
#eventDisplay { | ||
height: auto; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
import {Entry} from "./entry"; | ||
|
||
export class DataExchange { | ||
|
||
version: string = "0.01" | ||
origin: any = {} | ||
entries: Entry[] = [] | ||
|
||
|
||
toObj() { | ||
let objEntries:any[] = []; | ||
for(const entry of this.entries) { | ||
objEntries.push(entry.toObj()); | ||
} | ||
return { | ||
version: this.version, | ||
origin: this.origin, | ||
entries: objEntries | ||
} | ||
} | ||
|
||
static fromFirebirdEventObj(obj: any): DataExchange { | ||
let result = new DataExchange(); | ||
result.version = obj["version"]; | ||
result.origin = obj["origin"]; | ||
for(const objEntry of obj["entries"]) { | ||
result.entries.push(Entry.fromFirebirdEventObj(objEntry)); | ||
} | ||
return result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export abstract class EntryComponent { | ||
|
||
name: string; | ||
type: string; | ||
originType?: string; | ||
|
||
constructor(name: string, type: string, originType?: string) { | ||
this.name = name; | ||
this.type = type; | ||
this.originType = originType; | ||
} | ||
|
||
// Instance method to serialize the object | ||
abstract toSpecialObject(): any; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export class Entry | ||
{ | ||
id: string = ""; | ||
components: Component = []; | ||
|
||
toObj() { | ||
return {} | ||
} | ||
|
||
static fromFirebirdEventObj(obj: any): void { | ||
throw new Error("Method not implemented."); | ||
} | ||
} |
Empty file.
14 changes: 14 additions & 0 deletions
14
firebird-ng/src/app/model/object-serializable.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
export interface ToFirebirdObject { | ||
/** Serialize to Firebird event object */ | ||
toObj():any; | ||
} | ||
|
||
export interface | ||
|
||
export function from( | ||
ctor: IObjectSerializable, | ||
data: any | ||
): ClockInterface { | ||
return new ctor(hour, minute); | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters