No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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