From 94338796bc2147d0175ec411ba23b88959cfafed Mon Sep 17 00:00:00 2001 From: Chrys Date: Sun, 29 Oct 2017 01:16:45 +0200 Subject: [PATCH] add corpus for memoryManager --- src/fenrir/core/memoryManager.py | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/fenrir/core/memoryManager.py diff --git a/src/fenrir/core/memoryManager.py b/src/fenrir/core/memoryManager.py new file mode 100644 index 00000000..15bee58b --- /dev/null +++ b/src/fenrir/core/memoryManager.py @@ -0,0 +1,37 @@ +#!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +import time +from core import debug + +class inputManager(): + def __init__(self): + self.listStorage = {} + def initialize(self, environment): + self.env = environment + def addValueList(self, name, value): + pass + def addIndexList(self, name, maxLength = None, currList = [], currIndex = 0): + self.listStorage[name] = {'list': currList, 'index': currIndex, 'maxLength': maxLength} + def getNextIndexListElement(self, name): + pass + def getPrefIndexListElement(self, name): + pass + def getFirstIndexListElement(self, name): + pass + def getLastIndexListElement(self, name): + pass + def getCurrentIndex(self,name): + try: + return self.listStorage[name]['list']['index'] + except: + retrun 0 + def getIndexListElement(self, name): + currIndex = self.getCurrentIndex(name) + try: + return self.listStorage[name]['list'][currIndex] + except: + return []