# -*- coding: GBK -*-
|
# tagRoleItem.txt¶ÔÓ¦µÄÿÐÐÅäÖÃÏîÄÚÈÝ
|
# author: ifo
|
# Date: 2011.10.26
|
# history: 2011.10.26 Created
|
|
import AccountInfo
|
|
class tagRoleItemParam:
|
def __init__(self, params,comment):
|
self.comment = comment.replace( "\n", "\t" ).split( "\t" )
|
self.params = params
|
self.Sex = int(params[0])
|
self.Job = int(params[1])
|
accountInfo = AccountInfo.tagRoleItem()
|
for i in range(2,len(self.params)-1):
|
setattr(self,self.comment[i],type(getattr(accountInfo,self.comment[i]))(self.params[i]))
|
|
|
def __str__(self):
|
tagDSAccountStr = ""
|
for i in range(len(self.params)-1):
|
tagDSAccountStr += " %s : %s %s \n"%(self.comment[i],getattr(self,self.comment[i]),type(getattr(self,self.comment[i])))
|
return tagDSAccountStr
|