From 1bb7ede29ac49536f1093bfb455a08de90c97222 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 21 Apr 2018 00:03:18 +0200 Subject: [PATCH] [lib.context] shared context between 'client' and 'server' ; only contains the timeid window size --- .../schastsp/lib/context/context.go | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/git.xdrm.io/schastsp/lib/context/context.go diff --git a/src/git.xdrm.io/schastsp/lib/context/context.go b/src/git.xdrm.io/schastsp/lib/context/context.go new file mode 100644 index 0000000..d458af8 --- /dev/null +++ b/src/git.xdrm.io/schastsp/lib/context/context.go @@ -0,0 +1,20 @@ +package context + +/* (1) Context class +---------------------------------------------------------*/ +/* (1) Attributes */ +type Context struct { + windowSize float64; // 'timeid' window size +} + +/* (2) Constructor */ +func Create(winSize float64) *Context{ + var instance = new(Context); + + instance.windowSize = winSize; + + return instance +} + +/* (3) Getters */ +func (c Context) GetWindowSize() float64 { return c.windowSize } \ No newline at end of file