structure, library: remove class elements
This commit is contained in:
parent
97de4a5f78
commit
79550303fe
@ -3,17 +3,18 @@ from .elements import SRef
|
|||||||
from .reader import ProgressGetter
|
from .reader import ProgressGetter
|
||||||
|
|
||||||
class Library(object):
|
class Library(object):
|
||||||
version = 0
|
def __init__(self):
|
||||||
name = "NONAME"
|
self.version = 0
|
||||||
|
self.name = "NONAME"
|
||||||
|
|
||||||
last_access = datetime.now()
|
self.last_access = datetime.now()
|
||||||
last_mod = datetime.now()
|
self.last_mod = datetime.now()
|
||||||
|
|
||||||
# unit setup
|
# unit setup
|
||||||
units_per_dbunit = 1
|
self.units_per_dbunit = 1
|
||||||
meters_per_unit = 1
|
self.meters_per_unit = 1
|
||||||
|
|
||||||
structures = {}
|
self.structures = {}
|
||||||
|
|
||||||
class LinkError(Exception):
|
class LinkError(Exception):
|
||||||
element = None
|
element = None
|
||||||
|
@ -16,8 +16,6 @@ class ProgressGetter(object, metaclass=abc.ABCMeta):
|
|||||||
raise NotImplementedError("getting the progess is not implemented")
|
raise NotImplementedError("getting the progess is not implemented")
|
||||||
|
|
||||||
class Reader(ProgressGetter):
|
class Reader(ProgressGetter):
|
||||||
# statistics
|
|
||||||
total = 0
|
|
||||||
@property
|
@property
|
||||||
def current(self):
|
def current(self):
|
||||||
return float(self.stream.tell())
|
return float(self.stream.tell())
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
class Structure(object):
|
class Structure(object):
|
||||||
|
def __init__(self):
|
||||||
# metainfo
|
# metainfo
|
||||||
creation_date = datetime.now()
|
self.creation_date = datetime.now()
|
||||||
last_mod = datetime.now()
|
self.last_mod = datetime.now()
|
||||||
name = "NONAME"
|
self.name = "NONAME"
|
||||||
|
|
||||||
# contains all the low level elements
|
# contains all the low level elements
|
||||||
elements = []
|
self.elements = []
|
||||||
|
|
||||||
# contains all sref and aref elements
|
# contains all sref and aref elements
|
||||||
references = []
|
self.references = []
|
Loading…
Reference in New Issue
Block a user