return 0
#-----------------------------------------------------------#
- def get_text_JDC(self,format,pourRun=0,formatLigne="beautifie",appli=None):
+ def get_text_JDC(self,format,pourRun=0,formatLigne="beautifie"):
#-----------------------------------------------------------#
if self.code == "MAP" and not(generator.plugins.has_key(format)): format = "MAP"
if generator.plugins.has_key(format):
extensions=('.comm',)
#----------------------------------------------------------------------------------------
- def gener(self,obj,format='brut',config=None):
+ def gener(self,obj,format='brut',config=None, appli=None):
- print "je passe dans gener"
try :
self.MachineDico = obj.MachineDico
self.LoadDico = obj.LoadDico
self.LineDico = obj.LineDico
self.TransfoDico = obj.TransfoDico
+ self.MotorDico = obj.MotorDico
except :
self.MachineDico = None
self.LoadDico = None
self.LineDico = None
self.TransfoDico = None
+ self.MotorDico = None
self.initDico()
# Cette instruction genere le contenu du fichier de commandes (persistance)
self.Entete += 'LoadDico = ' + str(self.LoadDico) +'\n'
self.Entete += 'LineDico = ' + str(self.LineDico) +'\n'
self.Entete += 'TransfoDico = ' + str(self.TransfoDico) +'\n'
+ self.Entete += 'MotorDico = ' + str(self.MotorDico) + '\n'
self.Entete +='\n'
fp.write(self.text)
fp.close()
- def gener(self,obj,format='brut',config=None):
+ def gener(self,obj,format='brut',config=None,appli=None):
"""
Retourne une représentation du JDC obj sous une forme qui est paramétrée par format.
Si format vaut 'brut', 'standard' ou 'beautifie', retourne le texte issu de generator
extensions=('.comm',)
#----------------------------------------------------------------------------------------
- def gener(self,obj,format='brut',config=None):
+ def gener(self,obj,format='brut',config=None,appli=None):
self.initDico()
extensions=('.comm',)
#----------------------------------------------------------------------------------------
- def gener(self,obj,format='brut',config=None):
+ def gener(self,obj,format='brut',config=None, appli=None):
self.initDico()
"""
- def gener(self,obj,format='brut',config=None):
+ def gener(self,obj,format='brut',config=None,appli=None):
self.initDico()
self.text=PythonGenerator.gener(self,obj,format)
if obj.isvalid() :self.genereExeMap()
for val in obj.valeur :
s =s +self.format_item(val,obj.etape,obj) + ','
obj.valeurFormatee.append(self.format_item(val,obj.etape,obj))
- if len(obj.valeur) > 1:
+ if len(obj.valeur) >= 1:
s = '(' + s + '),'
- if obj.valeur==[] : s="(),"
+ if obj.valeur==[] or obj.valeur==() : s="(),"
if obj.nbrColonnes() :
s=self.formatColonnes(obj.nbrColonnes(),obj.valeur,obj)
else :
obj.valeurFormatee=obj.valeur
s=self.format_item(obj.valeur,obj.etape,obj) + ','
+ print s
return s
self.commande = ""
self.dict_attributs = {}
- def gener(self,node,config=None):
+ def gener(self,node,config=None,appli=None):
"""
"""
self.node=node