当前位置: 首页>>代码示例>>Python>>正文


Python Block._create_data方法代码示例

本文整理汇总了Python中Block.Block._create_data方法的典型用法代码示例。如果您正苦于以下问题:Python Block._create_data方法的具体用法?Python Block._create_data怎么用?Python Block._create_data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Block.Block的用法示例。


在下文中一共展示了Block._create_data方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: write

# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import _create_data [as 别名]
 def write(self):
   Block._create_data(self)
   self._put_long(1, self.hdr_key)
   self._put_long(2, self.seq_num)
   self._put_long(3, self.data_size)
   self._put_long(4, self.next_data)
   if self.contents != None:
     self.data[24:24+self.data_size] = self.contents
   Block.write(self)
开发者ID:alpine9000,项目名称:amiga_examples,代码行数:11,代码来源:FileDataBlock.py

示例2: write

# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import _create_data [as 别名]
 def write(self):
   Block._create_data(self)
   self._put_long(1, self.own_key)
   self._put_long(-48, self.protect)
   self._write_nac_modts()
   self._put_long(-4, self.hash_chain)
   self._put_long(-3, self.parent)
   self._put_long(-2, self.extension)
   # hash table
   for i in xrange(self.hash_size):
     self._put_long(6+i, self.hash_table[i])
   Block.write(self)
开发者ID:,项目名称:,代码行数:14,代码来源:

示例3: write

# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import _create_data [as 别名]
 def write(self):
   Block._create_data(self)
   self._put_long(1, self.own_key)
   self._put_long(2, self.block_count)
   
   # data blocks
   for i in xrange(len(self.data_blocks)):
     self._put_long(-51-i, self.data_blocks[i])
   
   self._put_long(-3, self.parent)
   self._put_long(-2, self.extension)
   Block.write(self)
开发者ID:Belxjander,项目名称:amitools,代码行数:14,代码来源:FileListBlock.py

示例4: write

# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import _create_data [as 别名]
 def write(self):
   Block._create_data(self)
   self._put_long(1, self.own_key)
   self._put_long(2, self.parent)
   self._put_long(3, self.num_records)
   self._put_long(4, self.next_cache)
   
   # put records
   off = 24
   for r in self.records:
     off = r.put(self.data, off)
   
   Block.write(self)
开发者ID:alpine9000,项目名称:amiga_examples,代码行数:15,代码来源:DirCacheBlock.py

示例5: write

# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import _create_data [as 别名]
 def write(self):
   Block._create_data(self)
   self._put_long(1, self.own_key)
   self._put_long(-48, self.protect)
   self._put_bstr(-46, 79, self.comment)
   self._put_timestamp(-23, self.mod_ts)
   self._put_bstr(-20, 30, self.name)
   self._put_long(-4, self.hash_chain)
   self._put_long(-3, self.parent)
   # hash table
   for i in xrange(self.hash_size):
     self._put_long(6+i, self.hash_table[i])
   Block.write(self)
开发者ID:moggen,项目名称:amitools,代码行数:15,代码来源:UserDirBlock.py

示例6: create

# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import _create_data [as 别名]
 def create(self, dos_type=DosType.DOS0, root_blk=None, boot_code=None):
   Block.create(self)
   self._create_data()
   self.dos_type = dos_type    
   self.valid_dos_type = True
   # root blk
   self.calc_root_blk = int(self.blkdev.num_blocks / 2)
   if root_blk != None:
     self.got_root_blk = root_blk
   else:
     self.got_root_blk = self.calc_root_blk      
   # create extra blks
   self.extra_blks = []
   for i in xrange(self.num_extra):
     b = Block(self.blkdev, self.blk_num + 1 + i)
     b._create_data()
     self.extra_blks.append(b)
   # setup boot code
   return self.set_boot_code(boot_code)
开发者ID:alpine9000,项目名称:amiga_examples,代码行数:21,代码来源:BootBlock.py

示例7: write

# 需要导入模块: from Block import Block [as 别名]
# 或者: from Block.Block import _create_data [as 别名]
 def write(self):
   Block._create_data(self)
   self._put_long(1, self.own_key)
   self._put_long(2, self.block_count)
   self._put_long(4, self.first_data)
   
   # data blocks
   for i in xrange(len(self.data_blocks)):
     self._put_long(-51-i, self.data_blocks[i])
   
   self._put_long(-48, self.protect)
   self._put_long(-47, self.byte_size)
   self._put_bstr(-46, 79, self.comment)
   self._put_timestamp(-23, self.mod_ts)
   self._put_bstr(-20, 30, self.name)
   self._put_long(-4, self.hash_chain)
   self._put_long(-3, self.parent)
   self._put_long(-2, self.extension)
   Block.write(self)
开发者ID:alpine9000,项目名称:amiga_examples,代码行数:21,代码来源:FileHeaderBlock.py


注:本文中的Block.Block._create_data方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。