Source code for ccpnmodel.ccpncore.memops.scripts.core.TypeInterface
"""Module Documentation here
"""
#=========================================================================================
# Licence, Reference and Credits
#=========================================================================================
__copyright__ = "Copyright (C) CCPN project (http://www.ccpn.ac.uk) 2014 - 2017"
__credits__ = ("Wayne Boucher, Ed Brooksbank, Rasmus H Fogh, Luca Mureddu, Timothy J Ragan & Geerten W Vuister")
__licence__ = ("CCPN licence. See http://www.ccpn.ac.uk/v3-software/downloads/license",
"or ccpnmodel.ccpncore.memops.Credits.CcpnLicense for licence text")
__reference__ = ("For publications, please use reference from http://www.ccpn.ac.uk/v3-software/downloads/license",
"or ccpnmodel.ccpncore.memops.Credits.CcpNmrReference")
#=========================================================================================
# Last code modification
#=========================================================================================
__modifiedBy__ = "$modifiedBy: CCPN $"
__dateModified__ = "$dateModified: 2017-07-07 16:33:24 +0100 (Fri, July 07, 2017) $"
__version__ = "$Revision: 3.0.0 $"
#=========================================================================================
# Created
#=========================================================================================
__author__ = "$Author: CCPN $"
__date__ = "$Date: 2017-04-07 10:28:48 +0000 (Fri, April 07, 2017) $"
#=========================================================================================
# Start of code
#=========================================================================================
# interface for language types
[docs]class TypeInterface(object):
###########################################################################
###########################################################################
#
# Functions which must be implemented in subclasses
#
###########################################################################
###########################################################################
# Functions return real language-specific types
[docs] def elementVarType(self, element):
raise NotImplementedError("Should be overwritten")
###########################################################################
###########################################################################
[docs] def collectionType(self, elementOrString=None, isUnique=None, isOrdered=None,
useCollection=False):
raise NotImplementedError("Should be overwritten")
###########################################################################
###########################################################################
[docs] def implementationType(self, element):
raise NotImplementedError("Should be overwritten")
###########################################################################
###########################################################################
[docs] def interfaceType(self, element):
raise NotImplementedError("Should be overwritten")
###########################################################################
###########################################################################
# implements TypeInterface
[docs] def dictInterfaceType(self, keyType = None, valueType = None):
raise NotImplementedError("Should be overwritten")
###########################################################################
###########################################################################
# implements TypeInterface
[docs] def listInterfaceType(self, listType = None):
raise NotImplementedError("Should be overwritten")
###########################################################################
###########################################################################
# implements TypeInterface
[docs] def collectionInterfaceType(self, collectionType = None):
raise NotImplementedError("Should be overwritten")
###########################################################################
###########################################################################
# implements TypeInterface
[docs] def stackInterfaceType(self, stackType = None):
raise NotImplementedError("Should be overwritten")
###########################################################################
###########################################################################
# implements TypeInterface
[docs] def fileInterfaceType(self, mode = 'r'):
raise NotImplementedError("Should be overwritten")