Aucune description
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

leclass.py 1.1KB

1234567891011121314151617181920212223242526272829303132333435
  1. #-*- coding: utf-8 -*-
  2. #import leobject
  3. ## @brief Represent an EmClass data instance
  4. # @note Is not a derivated class of LeObject because the concrete class will be a derivated class from LeObject
  5. class LeClass(object):
  6. ## @brief Stores fieldtypes by field name
  7. _fieldtypes = dict()
  8. ## @brief Stores relation with some LeType using rel2type fields. Key = rel2type fieldname value = LeType class
  9. _linked_types = dict()
  10. ## @brief Stores fieldgroups and the fields they contains
  11. _fieldgroups = dict()
  12. ## @brief Stores the EM uid
  13. _class_id = None
  14. ## @brief Instanciate a new LeClass
  15. # @note Abstract method
  16. # @param **kwargs
  17. def __init__(self, **kwargs):
  18. raise NotImplementedError("Abstract class")
  19. ## @brief Get the linked objects
  20. # @return an array of LeType derivated class instance
  21. def linked(self):
  22. pass
  23. ## @brief Link this class with an LeObject
  24. # @param leo LeObject : The object to be linked with
  25. # @return True if success False allready done
  26. # @throw A Leo exception if the link is not allowed
  27. def link_to(self, leo):
  28. pass