Browse Source

Added two extra functions that should probably be provided

Yentl Van Tendeloo 8 years ago
parent
commit
20f332ef5c
1 changed files with 19 additions and 0 deletions
  1. 19 0
      wrappers/modelverse.py

+ 19 - 0
wrappers/modelverse.py

@@ -89,6 +89,9 @@ class UnknownIdentifier(ModelverseException):
 class UnknownType(ModelverseException):
     pass
 
+class NotAnAssociation(ModelverseException):
+    pass
+
 class UnsupportedValue(ModelverseException):
     pass
 
@@ -512,6 +515,22 @@ def read_incoming(ID, typename):
         lst.append(_last_output())
     return lst
 
+def read_association_source(ID):
+    """Returns the source of an association."""
+    pass
+    # returns name
+    # raises UnknownError
+    # raises UnknownIdentifier
+    # raises NotAnAssociation
+
+def read_association_destination(ID):
+    """Returns the destination of an association."""
+    pass
+    # returns name
+    # raises UnknownError
+    # raises UnknownIdentifier
+    # raises NotAnAssociation
+
 def model_exit():
     """Leave model modify mode."""
     # return None