ProfileReader.py 704 B

1234567891011121314151617
  1. # Copyright (c) 2016 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from UM.PluginObject import PluginObject
  4. ## A type of plug-ins that reads profiles from a file.
  5. #
  6. # The profile is then stored as instance container of the type user profile.
  7. class ProfileReader(PluginObject):
  8. def __init__(self):
  9. super().__init__()
  10. ## Read profile data from a file and return a filled profile.
  11. #
  12. # \return \type{Profile|Profile[]} The profile that was obtained from the file or a list of Profiles.
  13. def read(self, file_name):
  14. raise NotImplementedError("Profile reader plug-in was not correctly implemented. The read function was not implemented.")