Add get_dependency to all Schema classes
This commit is contained in:
@@ -1469,6 +1469,9 @@ cdef class _StructSchema:
|
|||||||
def __get__(self):
|
def __get__(self):
|
||||||
return _DynamicStructReader()._init(self.thisptr.getProto(), None)
|
return _DynamicStructReader()._init(self.thisptr.getProto(), None)
|
||||||
|
|
||||||
|
cpdef get_dependency(self, id):
|
||||||
|
return _Schema()._init(self.thisptr.getDependency(id))
|
||||||
|
|
||||||
def __richcmp__(_StructSchema self, _StructSchema other, mode):
|
def __richcmp__(_StructSchema self, _StructSchema other, mode):
|
||||||
if mode == 2:
|
if mode == 2:
|
||||||
return self.thisptr == other.thisptr
|
return self.thisptr == other.thisptr
|
||||||
@@ -1504,6 +1507,9 @@ cdef class _InterfaceSchema:
|
|||||||
def __get__(self):
|
def __get__(self):
|
||||||
return _DynamicStructReader()._init(self.thisptr.getProto(), None)
|
return _DynamicStructReader()._init(self.thisptr.getProto(), None)
|
||||||
|
|
||||||
|
cpdef get_dependency(self, id):
|
||||||
|
return _Schema()._init(self.thisptr.getDependency(id))
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '<schema for %s>' % self.node.displayName
|
return '<schema for %s>' % self.node.displayName
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user