add CN - Calculate Numeric Method

This commit is contained in:
Michael Becker 2025-09-26 00:05:55 -04:00
parent a99dd737a9
commit 2425bf81ca
12 changed files with 284 additions and 2 deletions

View File

@ -72,6 +72,10 @@
- IDA_UserIsLoggedIn: '{8e93d9f3-a897-4c97-935c-b3427f90633b}'
- IDA_ModuleHasParentModule: '{dd439c24-fb12-48b0-8b11-1b8d473cadef}'
- IDA_Derived: '{66991ca1-ef08-4f30-846c-4984c2a3139d}'
- IDA_Index: '{0f31b9ca-e3e2-4c62-8c9e-b55f16eafbf9}'
- IDA_ValueNumeric: '{4d60b06a-0aa3-4530-af67-805feeeaced6}'
- IDA_PrimaryOperandValue: '{2e6b3528-f68d-40f8-80f3-4e0c463c00a5}'
- IDA_SecondaryOperandValue: '{253a04bb-feb7-474d-b608-43219a753ef8}'
- IDA_IncludeMIs: '{c97c2410-30d8-41eb-9b71-2aecc63abf46}'
- IDA_IncludeSuperclassMethods: '{3828a3f7-57ff-409b-b814-338d5ff51e19}'

View File

@ -41,7 +41,7 @@
- workSet: '&IDI_WorkSet_RelatedInstance;'
name: 'Related Instance'
- workSet: '&IDI_WorkSet_NewlyCreatedInstance;'
name: 'Newly Creatd Instance'
name: 'Newly Created Instance'
singular: yes
- workSet: '&IDI_WorkSet_Person;'
name: 'Person'

View File

@ -42,6 +42,24 @@
- numericAttribute: '&IDA_MaximumValueNumeric;'
name: 'Maximum Value'
index: 12
- numericAttribute: '&IDA_MinimumValueNumeric;'
name: 'Minimum Value'
index: 13
- numericAttribute: '&IDA_Index;'
name: 'Index'
index: 18
- numericAttribute: '&IDA_ValueNumeric;'
name: 'Value'
index: 27
- numericAttribute: '&IDA_PrimaryOperandValue;'
name: 'Primary Operand Value'
index: 63
- numericAttribute: '&IDA_SecondaryOperandValue;'
name: 'Secondary Operand Value'
index: 64

View File

@ -0,0 +1,76 @@
---
- entityDefinitions:
- IDR_Calculate_Numeric_Method__returns__Numeric_Attribute: '{9f9a9341-f2d6-4152-8879-e91f574ca309}'
- IDR_Numeric_Attribute__returned_by__Calculate_Numeric_Method: '{03275ef5-c9cf-4816-a4f5-4f3aaf0f9479}'
- library: '&IDL_MochaBaseSystem;'
instances:
- class: '&IDC_CalculateNumericMethod;'
inherits: '&IDC_Method;'
name: CN - Calculate Numeric Method
index: 35
customTagName: calculateNumericMethod
instancesLabeledByRAMB: '&IDMB_Method__get__Fully_Qualified_Name_CN;'
superclasses:
- instance: '&IDC_Method;'
- instance: '&IDC_ExecutableReturningAttribute;'
- instance: '&IDC_ArithmeticCalculation;'
# relatedTasks:
# - instance: '&IDI_Task_ViewCalculateDateMethod;'
# - instance: '&IDI_Task_EditCalculateDateMethod;'
attributes:
- instance: '&IDA_Verb;'
customTagName: 'verb'
- instance: '&IDA_Name;'
customTagName: 'name'
- instance: '&IDA_Static;'
customTagName: 'static'
- instance: '&IDA_Final;'
customTagName: 'final'
relationships:
- instance: '&IDR_Method__for__Class;'
customTagName: 'forClassId'
- instance: '&IDR_Metadata_With_Access_Modifier__has__Access_Modifier;'
customTagName: 'accessModifierId'
- instance: '&IDR_Instance__for__Module;'
customTagName: 'moduleId'
# - instance: '&IDR_Assign_Attribute_Method__uses__Executable_returning_Attribute;'
# customTagName: 'usesExecutableReturningAttribute'
# - instance: '&IDR_Assign_Attribute_Method__assigns__Attribute;'
# customTagName: 'assignsAttribute'
# hmm... what's this?
# 3$9824 Assignment Method.assigns attribute or relationship from Executable returning Instance Set
# 3$9825 Executable returning Instance Set.returns assign attribute or relationship for Assignment Method
- relationship: '&IDR_Calculate_Numeric_Method__returns__Numeric_Attribute;'
index: 66
sourceClassId: '&IDC_CalculateNumericMethod;'
type: 'returns'
destinationClassId: '&IDC_NumericAttribute;'
siblingRelationshipId: '&IDR_Numeric_Attribute__returned_by__Calculate_Numeric_Method;'
singular: yes
- relationship: '&IDR_Numeric_Attribute__returned_by__Calculate_Numeric_Method;'
index: 67
sourceClassId: '&IDC_NumericAttribute;'
type: 'returned by'
destinationClassId: '&IDC_CalculateNumericMethod;'
siblingRelationshipId: '&IDR_Calculate_Numeric_Method__returns__Numeric_Attribute;'
singular: no
# - relationship: '&IDR_Assign_Attribute_Method__assigns__Attribute;'
# index: 141
# sourceClassId: '&IDC_AssignAttributeMethod;'
# type: 'assigns'
# destinationClassId: '&IDC_Attribute;'
# siblingRelationshipId: '&IDR_Attribute__assigned_by__Assign_Attribute_Method;'
# singular: no
# - relationship: '&IDR_Attribute__assigned_by__Assign_Attribute_Method;'
# index: 142
# sourceClassId: '&IDC_Attribute;'
# type: 'assigned by'
# destinationClassId: '&IDC_AssignAttributeMethod;'
# siblingRelationshipId: '&IDR_Assign_Attribute_Method__assigns__Attribute;'
# singular: no

View File

@ -0,0 +1,12 @@
- entityDefinitions:
- IDC_Calculation: '{ab4fdf54-b8b7-4b07-bdaf-2548bdb4c290}'
- library: '&IDL_MochaBaseSystem;'
instances:
- class: '&IDC_Calculation;'
name: 'Calculation'
index: 1261
# inherits: '&IDC_Calculation;'
# superclasses:
# - instance: '&IDC_Calculation;'

View File

@ -0,0 +1,69 @@
- entityDefinitions:
- IDC_ArithmeticCalculation: '{faf59b68-47bf-44aa-afe8-0fdd9b1af5c3}'
- IDR_Arithmetic_Calculation__has__Arithmetic_Operator: '{f286edc6-0875-41bf-8fe9-127b8c0664ae}'
- IDR_Arithmetic_Operator__for__Arithmetic_Calculation: '{f6fac31c-6b6d-4d9e-8432-150b8ff1b2cd}'
- IDR_Arithmetic_Calculation__has_first_operand__Calculation: '{4f002495-dee4-4eca-8a15-beb8f928648d}'
- IDR_Calculation__first_operand_for__Arithmetic_Calculation: '{345ff3d2-1ec2-4b4f-92c4-676f99ae2b27}'
- IDR_Arithmetic_Calculation__has_second_operand__Calculation: '{0d74918d-5e7b-4492-9fa4-e35558f40ef3}'
- IDR_Calculation__second_operand_for__Arithmetic_Calculation: '{faeea4f0-a58c-4796-9a9d-052161c987ed}'
- library: '&IDL_MochaBaseSystem;'
instances:
- class: '&IDC_ArithmeticCalculation;'
name: 'Arithmetic Calculation (All)'
index: 1262
inherits: '&IDC_Calculation;'
superclasses:
- instance: '&IDC_Calculation;'
- relationship: '&IDR_Arithmetic_Calculation__has__Arithmetic_Operator;'
index: 3142
sourceClassId: '&IDC_ArithmeticCalculation;'
type: 'has'
destinationClassId: '&IDC_ArithmeticOperator;'
siblingRelationshipId: '&IDR_Arithmetic_Operator__for__Arithmetic_Calculation;'
singular: yes
- relationship: '&IDR_Arithmetic_Operator__for__Arithmetic_Calculation;'
index: 3143
sourceClassId: '&IDC_ArithmeticOperator;'
type: 'for'
destinationClassId: '&IDC_ArithmeticCalculation;'
siblingRelationshipId: '&IDR_Arithmetic_Calculation__has__Arithmetic_Operator;'
singular: no
- relationship: '&IDR_Arithmetic_Calculation__has_first_operand__Calculation;'
index: 3144
sourceClassId: '&IDC_ArithmeticCalculation;'
type: 'has first operand'
destinationClassId: '&IDC_Calculation;'
siblingRelationshipId: '&IDR_Calculation__first_operand_for__Arithmetic_Calculation;'
singular: yes
- relationship: '&IDR_Calculation__first_operand_for__Arithmetic_Calculation;'
index: 3145
sourceClassId: '&IDC_Calculation;'
type: 'first operand for'
destinationClassId: '&IDC_ArithmeticCalculation;'
siblingRelationshipId: '&IDR_Arithmetic_Calculation__has_first_operand__Calculation;'
singular: no
- relationship: '&IDR_Arithmetic_Calculation__has_second_operand__Calculation;'
index: 3146
sourceClassId: '&IDC_ArithmeticCalculation;'
type: 'has second operand'
destinationClassId: '&IDC_Calculation;'
siblingRelationshipId: '&IDR_Calculation__second_operand_for__Arithmetic_Calculation;'
singular: yes
- relationship: '&IDR_Calculation__second_operand_for__Arithmetic_Calculation;'
index: 3147
sourceClassId: '&IDC_Calculation;'
type: 'second operand for'
destinationClassId: '&IDC_ArithmeticCalculation;'
siblingRelationshipId: '&IDR_Arithmetic_Calculation__has_second_operand__Calculation;'
singular: no

View File

@ -0,0 +1,53 @@
- entityDefinitions:
- IDC_ArithmeticOperator: '{b31f5d08-5c3e-4da8-b6db-7bf65a0faf1e}'
- IDI_ArithmeticOperator_Add: '{04a1cf5e-a38f-46ef-9e34-c619a41866fa}'
- IDI_ArithmeticOperator_Subtract: '{64ea1785-3a4d-4e20-b0f6-d90d189f9861}'
- IDI_ArithmeticOperator_Multiply: '{246dfaf3-4caf-409e-8f74-99cd730f6ae3}'
- IDI_ArithmeticOperator_Divide: '{abf2ce5e-c6c9-4789-8ebe-dab7d4973c55}'
- IDI_ArithmeticOperator_Power: '{ed47da30-c066-4230-8aff-2efd2e0176df}'
- IDI_ArithmeticOperator_Root: '{1773e5ff-29e5-445a-88cc-1ad9e56b4e29}'
- IDI_ArithmeticOperator_LShift: '{1f3e720a-53a9-4251-a412-484f6441e57b}'
- IDI_ArithmeticOperator_RShift: '{df716fc2-9d84-41fb-a853-7ac6e6f9d548}'
- IDI_ArithmeticOperator_Logarithm: '{f8c9ef0a-c7ce-4442-8b83-ee6bd545992e}'
- library: '&IDL_MochaBaseSystem;'
instances:
- class: '&IDC_ArithmeticOperator;'
name: 'Arithmetic Operator'
index: 1265
# inherits: '&IDC_BooleanOperator;'
# superclasses:
# - instance: '&IDC_BooleanOperator;'
description: operator that is the target of an Arithmetic Calculation
customTagName: 'arithmeticOperator'
attributes:
- instance: '&IDA_Name;'
customTagName: 'name'
- arithmeticOperator: '&IDI_ArithmeticOperator_Add;'
name: 'add'
- arithmeticOperator: '&IDI_ArithmeticOperator_Subtract;'
name: 'subtract'
- arithmeticOperator: '&IDI_ArithmeticOperator_Multiply;'
name: 'multiply'
- arithmeticOperator: '&IDI_ArithmeticOperator_Divide;'
name: 'divide'
- arithmeticOperator: '&IDI_ArithmeticOperator_Power;'
name: 'power'
- arithmeticOperator: '&IDI_ArithmeticOperator_Root;'
name: 'root'
- arithmeticOperator: '&IDI_ArithmeticOperator_LShift;'
name: 'left shift'
- arithmeticOperator: '&IDI_ArithmeticOperator_RShift;'
name: 'right shift'
- arithmeticOperator: '&IDI_ArithmeticOperator_Logarithm;'
name: 'logarithm'

View File

@ -1,6 +1,5 @@
- entityDefinitions:
- IDC_ConditionalSelectInstanceSetMethod: '{ffea8e52-06e5-4e95-8c40-da3ba54ce95f}'
# {03275ef5-c9cf-4816-a4f5-4f3aaf0f9479}
- IDR_Conditional_Select_Instance_Set_Method__returns__Attribute: '{b2b9d9cc-c4dd-491b-853e-e3669ea4e66a}'
- IDR_Instance_Set__returned_by__Conditional_Select_Instance_Set_Method: '{e3e734ce-953b-49b8-b50d-b1826b519053}'

View File

@ -0,0 +1,15 @@
- entityDefinitions:
- IDM_Method__get__CN_Method_Suffix: '{d10cc421-6345-401f-a93a-4cf80d442fc9}'
- IDMB_Method__get__CN_Method_Suffix: '{3af6ad45-8e91-4058-9e9c-1fd64e409f99}'
- library: '&IDL_MochaBaseSystem;'
instances:
- buildAttributeMethod: '&IDM_Method__get__CN_Method_Suffix;'
forClassId: '&IDC_Method;'
returnsAttributeId: '&IDA_MethodType;'
verb: 'get'
name: 'CN Method Suffix'
accessModifierId: '&IDI_AccessModifier_Public;'
initialValue: 'CN'
static: yes
- returnAttributeMethodBinding: '&IDMB_Method__get__CN_Method_Suffix;'
executesMethod: '&IDM_Method__get__CN_Method_Suffix;'

View File

@ -0,0 +1,12 @@
---
- entityDefinitions:
- IDMB_Method__get__Fully_Qualified_Name_CN: '{cd2c3056-1092-48c4-b4b0-6432053603af}'
- library: '&IDL_MochaBaseSystem;'
instances:
- returnAttributeMethodBinding: '&IDMB_Method__get__Fully_Qualified_Name_CN;'
executesMethod: '&IDM_Method__get__Fully_Qualified_Name;'
parameterAssignments:
- globalIdentifier: '{91fadce7-f438-48ba-8520-b84fbce5c19d}'
assignsToParameter: '&IDC_Method;'
assignsFromWorkData: '&IDC_CalculateNumericMethod;'

View File

@ -114,6 +114,12 @@
returnsAttributeId: '&IDMB_Method__get__US_Method_Suffix;'
comment: 'If Method is US, return the "US" suffix'
- globalIdentifier: '{641fba3a-41fb-427b-bdc3-4e876b6f72ab}'
trueConditions:
- instance: '&IDMB_Method__is__CN;'
returnsAttributeId: '&IDMB_Method__get__CN_Method_Suffix;'
comment: 'If Method is CN, return the "CN" suffix'
- globalIdentifier: '{570dd2ff-38d6-4615-b033-880b8dda9f5b}'
returnsAttributeId: '&IDMB_Common_Text__get__Empty_String;'
comment: 'If nothing else matches, just return empty string'

View File

@ -0,0 +1,18 @@
- entityDefinitions:
- IDM_Method__is__CN: '{c73aebba-7dda-4fdd-963a-0bb746b7ec7c}'
- IDMB_Method__is__CN: '{6e60e6f2-46a3-4e3b-952d-df6be11d3102}'
- library: '&IDL_MochaBaseSystem;'
instances:
- evaluateBooleanExpressionMethod: '&IDM_Method__is__CN;'
forClassId: '&IDC_Method;'
verb: 'is'
name: 'CN'
accessModifierId: '&IDI_AccessModifier_RootA2;'
returnsAttributeId: '&IDA_MethodIsOfTypeSpecified;'
source: '&IDMB_Method__get__Parent_Class;'
operator: '&IDI_RelationalOperator_ExactMatch;'
target: '&IDC_CalculateNumericMethod;'
- returnAttributeMethodBinding: '&IDMB_Method__is__CN;'
executesMethod: '&IDM_Method__is__CN;'