WIP for memoryManager
This commit is contained in:
parent
8b29f366a7
commit
dec4974fb0
@ -11,8 +11,8 @@ generalData = {
|
||||
'tutorialMode': False,
|
||||
'currUser':'',
|
||||
'prevUser':'',
|
||||
'managerList':['processManager','punctuationManager','cursorManager','applicationManager','commandManager'
|
||||
,'screenManager','inputManager','outputManager','helpManager','eventManager','debug'],
|
||||
'managerList':['processManager', 'punctuationManager', 'cursorManager', 'applicationManager', 'commandManager'
|
||||
, 'screenManager', 'inputManager','outputManager', 'helpManager', 'memoryManager', 'eventManager', 'debug'],
|
||||
'commandFolderList':['commands','onInput', 'onCursorChange', 'onScreenUpdate','onScreenChanged','onHeartBeat', 'onPlugInputDevice'
|
||||
,'onApplicationChange','onSwitchApplicationProfile','help',],
|
||||
}
|
||||
|
@ -7,15 +7,21 @@
|
||||
import time
|
||||
from core import debug
|
||||
|
||||
class inputManager():
|
||||
class memoryManager():
|
||||
def __init__(self):
|
||||
self.listStorage = {}
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def addValueToFirstIndex(self, name, value):
|
||||
pass
|
||||
def addIndexList(self, name, maxLength = None, currList = [], currIndex = 0):
|
||||
self.listStorage[name] = {'list': currList, 'index': currIndex, 'maxLength': maxLength}
|
||||
def isLastIndex(self, name):
|
||||
return self.listStorage[name]['index'] == len(self.listStorage[name]['list']):
|
||||
def isFirstIndex(self, name):
|
||||
return self.listStorage[name]['index'] == 0:
|
||||
def getNextIndex(self, name):
|
||||
if self.isIndexListEmpty(name):
|
||||
self.listStorage[name]['index'] = -1
|
||||
|
@ -10,6 +10,7 @@ fenrirPath = os.path.dirname(currentdir)
|
||||
|
||||
from configparser import ConfigParser
|
||||
from core import debugManager
|
||||
from core import memoryManager
|
||||
from core import processManager
|
||||
from core import eventManager
|
||||
from core import inputManager
|
||||
@ -323,6 +324,8 @@ class settingsManager():
|
||||
|
||||
if fenrirManager:
|
||||
environment['runtime']['fenrirManager'] = fenrirManager
|
||||
environment['runtime']['memoryManager'] = memoryManager.memoryManager()
|
||||
environment['runtime']['memoryManager'].initialize(environment)
|
||||
environment['runtime']['eventManager'] = eventManager.eventManager()
|
||||
environment['runtime']['eventManager'].initialize(environment)
|
||||
environment['runtime']['processManager'] = processManager.processManager()
|
||||
|
Loading…
Reference in New Issue
Block a user