#
# MethodUsages.yaml - ZQ definition for `Method Usages` element
#
# Author:
#      Michael Becker <alcexhim@gmail.com>
#
# Copyright (c) 2024 Mike Becker's Software
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# 
# For Method Usage, we should start by getting `Method@get Method Bindings`
# and from there determine whether the method bindings are in use for all
# of their known relationships.
# 
# 1. Start with finding the relationship `Method.executed by Method Binding`.
# 2. For each method binding in the list,
# ... populate an Instance Set with references such as:
#    a. Executable returning Work Data.used by Parameter Assignment
#    b. Executable returning Instance Set. reference used by GRS - Get Referenced Instance Set Method
#    c. Executable returning Attribute.answer used by GRA - Get Referenced Attribute Method
# ... and so on, and so forth.
# 
# Obviously, this is TEDIOUS and a hassle in every way. But it might not need to be.
# 
# 1. Create a method `Method @ get Method Usage Relationships (GSI)*S`.
# 2. Manually specify each and every relationship to be returned by this GSI.
# 3. Create a method `Method Binding @ find method usages across all known Method Usage Relationships (GRS)`
# 4. This GRS should loop on Method Usage Relationships, for each relationship check EBE if 
#    our Method Binding is `in the selection list`, and if so, yield return it.

# here's a free GUID : {743cff51-6f81-4fb9-b5ca-9d9995358ea5} ; you're welcome

---
- entityDefinitions:
  - IDE_MethodUsages: '{60801aa9-e55c-47aa-a713-4a2c3fa93ff3}'
- library: '&IDL_MochaBaseSystem;'
  instances:
  - element: '&IDE_MethodUsages;'
    # module: '&IDI_Module_MochaBaseSystem_Method;'
    label: 'Method Usage'