コード例 #1
0
ファイル: multidata.py プロジェクト: philloidin/wok
    def __init__(self,
                 sources=None,
                 start=0,
                 size=-1,
                 conf=None,
                 port_desc=None,
                 factory=None):

        PortData.__init__(self, None, conf, factory)

        if conf is not None:
            self._sources = []
            for sconf in conf["sources"]:
                self._sources += [self.factory(sconf)]
            self._start = conf.get("start", start, dtype=int)
            self._size = conf.get("size", size, dtype=int)
        else:
            self._sources = sources
            self._start = start
            self._size = size

        if self._sources:
            i = 0
            serializer = None
            while i < len(self._sources) and serializer is None:
                self._serializer = self._sources[i].serializer
                i += 1
コード例 #2
0
ファイル: pathdata.py プロジェクト: chris-zen/wok
	def fill_element(self, e):
		PortData.fill_element(self, e)
		e["type"] = self.TYPE_NAME
		e["path"] = self._path
		e["partition"] = self._partition
		e["start"] = self._start
		e["size"] = self._size
		return e
コード例 #3
0
 def fill_element(self, e):
     PortData.fill_element(self, e)
     e["type"] = self.TYPE_NAME
     e["path"] = self._path
     e["partition"] = self._partition
     e["start"] = self._start
     e["size"] = self._size
     return e
コード例 #4
0
    def fill_element(self, e):
        PortData.fill_element(self, e)

        e["type"] = self.TYPE_NAME
        e["path"] = self._path
        e["start"] = self._start
        e["size"] = self._size
        if self._seek_pos >= 0:
            e["seek_pos"] = self._seek_pos
        return e
コード例 #5
0
ファイル: filedata.py プロジェクト: chris-zen/wok
	def fill_element(self, e):
		PortData.fill_element(self, e)

		e["type"] = self.TYPE_NAME
		e["path"] = self._path
		e["start"] = self._start
		e["size"] = self._size
		if self._seek_pos >= 0:
			e["seek_pos"] = self._seek_pos
		return e
コード例 #6
0
ファイル: multidata.py プロジェクト: chris-zen/wok
	def fill_element(self, e):
		PortData.fill_element(self, e)
		e["type"] = self.TYPE_NAME
		e["start"] = self._start
		e["size"] = self._size
		l = e.create_list()
		for src in self._sources:
			pe = e.create_element()
			l += [src.fill_element(pe)]
		e["sources"] = l
		return e
コード例 #7
0
ファイル: multidata.py プロジェクト: philloidin/wok
 def fill_element(self, e):
     PortData.fill_element(self, e)
     e["type"] = self.TYPE_NAME
     e["start"] = self._start
     e["size"] = self._size
     l = e.list()
     for src in self._sources:
         pe = e.element()
         l += [src.fill_element(pe)]
     e["sources"] = l
     return e
コード例 #8
0
ファイル: filedata.py プロジェクト: chris-zen/wok
	def __init__(self, serializer = None, path = None, start = 0, size = -1,
					conf = None, port_desc = None, factory = None):

		PortData.__init__(self, serializer, conf, port_desc, factory)

		if conf is not None:
			self._path = conf.get("path", path)
			self._start = conf.get("start", start, dtype=int)
			self._size = conf.get("size", size, dtype=int)
			self._seek_pos = conf.get("seek_pos", -1, dtype=long)
		else:
			self._path = path
			self._start = start
			self._size = size
			self._seek_pos = -1
コード例 #9
0
ファイル: pathdata.py プロジェクト: bbglab/wok
	def __init__(self, serializer = None, path = None, partition = -1,
					start = 0, size = -1, conf = None, factory = None):

		PortData.__init__(self, serializer, conf, factory)

		if conf is not None:
			self._path = conf.get("path", path)
			self._partition = conf.get("partition", partition, dtype=int)
			self._start = conf.get("start", start, dtype=int)
			self._size = conf.get("size", size, dtype=int)
		else:
			self._path = path
			self._partition = partition
			self._start = start
			self._size = size

		self._last_partition = 0
コード例 #10
0
    def __init__(self,
                 serializer=None,
                 path=None,
                 start=0,
                 size=-1,
                 conf=None,
                 factory=None):

        PortData.__init__(self, serializer, conf, factory)

        if conf is not None:
            self._path = conf.get("path", path)
            self._start = conf.get("start", start, dtype=int)
            self._size = conf.get("size", size, dtype=int)
            self._seek_pos = conf.get("seek_pos", -1, dtype=long)
        else:
            self._path = path
            self._start = start
            self._size = size
            self._seek_pos = -1
コード例 #11
0
ファイル: multidata.py プロジェクト: chris-zen/wok
	def __init__(self, sources = None, start = 0, size = -1, conf = None,
					port_desc = None, factory = None):
						
		PortData.__init__(self, None, conf, port_desc, factory)

		if conf is not None:
			self._sources = []
			for sconf in conf["sources"]:
				self._sources += [self.factory(sconf)]
			self._start = conf.get("start", start, dtype=int)
			self._size = conf.get("size", size, dtype=int)
		else:
			self._sources = sources
			self._start = start
			self._size = size

		if self._sources:
			i = 0
			serializer = None
			while i < len(self._sources) and serializer is None:
				self._serializer = self._sources[i].serializer
				i += 1
コード例 #12
0
    def __init__(self,
                 serializer=None,
                 path=None,
                 partition=-1,
                 start=0,
                 size=-1,
                 conf=None,
                 factory=None):

        PortData.__init__(self, serializer, conf, factory)

        if conf is not None:
            self._path = conf.get("path", path)
            self._partition = conf.get("partition", partition, dtype=int)
            self._start = conf.get("start", start, dtype=int)
            self._size = conf.get("size", size, dtype=int)
        else:
            self._path = path
            self._partition = partition
            self._start = start
            self._size = size

        self._last_partition = 0