Skip to content

Commit

Permalink
Refactoring Constants
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsiegl committed Feb 6, 2023
1 parent 7a7988a commit 7a911da
Show file tree
Hide file tree
Showing 11 changed files with 447 additions and 617 deletions.
85 changes: 26 additions & 59 deletions MTIP/Constants/ActivityConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,67 +7,34 @@
*
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MTIP.Constants
{
public class ActivityConstants
public static class ActivityConstants
{
public string acceptEventAction;
public string action;
public string actionPin;
public string activity;
public string activityParameter;
public string activityPartion;
public string callBehaviorAction;
public string callOperationAction;
public string centralBufferNode;
public string change;
public string conditionalNode;
public string createObjectAction;
public string decision;
public string destroyObjectAction;
public string eventType;
public string forkNode;
public string informationItem;
public string interruptibleActivityRegion;
public string mergeNode;
public string objectNode;
public string property;
public string sendSignalAction;
public string stateNode;
public string synchronization;


public ActivityConstants(){
acceptEventAction = "AcceptEventAction";
action = "Action";
actionPin = "ActionPin";
activity = "Activity";
activityParameter = "ActivityParameter";
activityPartion = "ActivityPartition";
callBehaviorAction = "CallBehaviorAction";
callOperationAction = "CallOperationAction";
centralBufferNode = "CentralBufferNode";
change = "Change";
conditionalNode = "ConditionalNode";
createObjectAction = "CreateObjectAction";
decision = "Decision";
destroyObjectAction = "DestroyObjectAction";
eventType = "Event";
forkNode = "ForkNode";
informationItem = "InformationItem";
interruptibleActivityRegion = "InterruptibleActivityRegion";
mergeNode = "MergeNode";
objectNode = "ObjectNode";
property = "Property";
sendSignalAction = "SendSignalAction";
stateNode = "StateNode";
synchronization = "Synchronization";
}
public const string ACCEPTEVENTACTION = "AcceptEventAction";
public const string ACTION = "Action";
public const string ACTIONPIN = "ActionPin";
public const string ACTIVITY = "Activity";
public const string ACTIVITYPARAMETER = "ActivityParameter";
public const string ACTIVITYPARTION = "ActivityPartition";
public const string CALLBEHAVIORACTION = "CallBehaviorAction";
public const string CALLOPERATIONACTION = "CallOperationAction";
public const string CENTRALBUFFERNODE = "CentralBufferNode";
public const string CHANGE = "Change";
public const string CONDITIONALNODE = "ConditionalNode";
public const string CREATEOBJECTACTION = "CreateObjectAction";
public const string DECISION = "Decision";
public const string DESTROYOBJECTACTION = "DestroyObjectAction";
public const string EVENTTYPE = "Event";
public const string FORKNODE = "ForkNode";
public const string INFORMATIONITEM = "InformationItem";
public const string INTERRUPTIBLEACTIVITYREGION = "InterruptibleActivityRegion";
public const string MERGENODE = "MergeNode";
public const string OBJECTNODE = "ObjectNode";
public const string PROPERTY = "Property";
public const string SENDSIGNALACTION = "SendSignalAction";
public const string STATENODE = "StateNode";
public const string SYNCHRONIZATION = "Synchronization";
}
}

66 changes: 20 additions & 46 deletions MTIP/Constants/BlockConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,54 +7,28 @@
*
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MTIP.Constants
{
public class BlockConstants
public static class BlockConstants
{
public string association;
public string block;
public string constraintBlock;
public string dataType;
public string enumeration;
public string external;
public string flowPort;
public string fullPort;
public string interfaceBlock;
public string interfaceType;
public string operation;
public string port;
public string property;
public string proxyPort;
public string quantityKind;
public string signal;
public string unit;
public string valueType;
public BlockConstants()
{
association = "Association";
block = "Block";
constraintBlock = "ConstraintBlock";
dataType = "DataType";
enumeration = "Enumeration";
external = "External";
flowPort = "FlowPort";
fullPort = "FullPort";
interfaceBlock = "InterfaceBlock";
interfaceType = "Interface";
operation = "Operation";
port = "Port";
property = "Property";
proxyPort = "ProxyPort";
quantityKind = "QuantityKind";
signal = "Signal";
unit = "Unit";
valueType = "ValueType";
}
public const string ASSOCIATION = "Association";
public const string BLOCK = "Block";
public const string CONSTRAINTBLOCK = "ConstraintBlock";
public const string DATATYPE = "DataType";
public const string ENUMERATION = "Enumeration";
public const string EXTERNAL = "External";
public const string FLOWPORT = "FlowPort";
public const string FULLPORT = "FullPort";
public const string INTERFACEBLOCK = "InterfaceBlock";
public const string INTERFACETYPE = "Interface";
public const string OPERATION = "Operation";
public const string PORT = "Port";
public const string PROPERTY = "Property";
public const string PROXYPORT = "ProxyPort";
public const string QUANTITYKIND = "QuantityKind";
public const string SIGNAL = "Signal";
public const string UNIT = "Unit";
public const string VALUETYPE = "ValueType";
}
}

36 changes: 12 additions & 24 deletions MTIP/Constants/DiagramConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,18 @@

namespace MTIP.Constants
{
public class DiagramConstants
public static class DiagramConstants
{
public string activity;
public string classType;
public string component;
public string compositeStructure;
public string custom;
public string logical;
public string package;
public string sequence;
public string statechart;
public string useCase;
public DiagramConstants()
{
activity = "Activity";
classType = "Class";
component = "Component";
compositeStructure = "CompositeStructure";
custom = "Custom";
logical = "Logical";
package = "Package";
sequence = "Sequence";
statechart = "Statechart";
useCase = "Use Case";
}
public const string activity = "Activity";
public const string classType = "Class";
public const string component = "Component";
public const string compositeStructure = "CompositeStructure";
public const string custom = "Custom";
public const string logical = "Logical";
public const string package = "Package";
public const string sequence = "Sequence";
public const string statechart = "Statechart";
public const string useCase = "Use Case";
}

}
72 changes: 22 additions & 50 deletions MTIP/Constants/HUDSConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,58 +7,30 @@
*
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MTIP.Constants
{
public class HUDSConstants
public static class HUDSConstants
{
public string attributes;
public string data;
public string dict;
public string dtype;
public string ea;
public string unified;
public string element;
public string id;
public string intType;
public string isComposite;
public string key;
public string list;
public string name;
public string relationshipMetadata;
public string relationships;
public string status;
public string str;
public string type;
public string typedBy;
public string value;
public HUDSConstants()
{
attributes = "attributes";
data = "data";
dict = "dict";
dtype = "_dtype";
ea = "ea";
unified = "unified";
element = "element";
id = "id";
intType = "int";
isComposite = "isComposite";
key = "key";
list = "list";
name = "name";
relationshipMetadata = "relationship_metadata";
relationships = "relationships";
status = "status";
str = "str";
type = "type";
typedBy = "typedBy";
value = "value";
}
public const string ATTRIBUTES = "attributes";
public const string DATA = "data";
public const string DICT = "dict";
public const string DTYPE = "_dtype";
public const string EA = "ea";
public const string UNIFIED = "unified";
public const string ELEMENT = "element";
public const string ID = "id";
public const string INTTYPE = "int";
public const string ISCOMPOSITE = "isComposite";
public const string KEY = "key";
public const string LIST = "list";
public const string NAME = "name";
public const string RELATIONSHIPMETADATA = "relationship_metadata";
public const string RELATIONSHIPS = "relationships";
public const string STATUS = "status";
public const string STR = "str";
public const string TYPE = "type";
public const string TYPEDBY = "typedBy";
public const string VALUE = "value";
}
}

34 changes: 9 additions & 25 deletions MTIP/Constants/InternalBlockConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,17 @@
*
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MTIP.Constants
{
public class InternalBlockConstants
public static class InternalBlockConstants
{
public string boundary;
public string boundReference;
public string constraintProperty;
public string flowProperty;
public string participantProperty;
public string property;
public string referenceProperty;

public InternalBlockConstants()
{
boundary = "Boundary";
boundReference = "BoundReference";
constraintProperty = "ConstraintProperty";
flowProperty = "FlowProperty";
participantProperty = "ParticipantProperty";
property = "Property";
referenceProperty = "ReferenceProperty";
}
public const string BOUNDARY = "Boundary";
public const string BOUNDREFERENCE = "BoundReference";
public const string CONSTRAINTPROPERTY = "ConstraintProperty";
public const string FLOWPROPERTY = "FlowProperty";
public const string PARTICIPANTPROPERTY = "ParticipantProperty";
public const string PROPERTY = "Property";
public const string REFERENCEPROPERTY = "ReferenceProperty";
}
}

43 changes: 14 additions & 29 deletions MTIP/Constants/MetatypeConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,23 @@
*
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace MTIP.Constants
{
public class MetatypeConstants

public static class MetatypeConstants
{
public string acceptEventAction;
public string callBehaviorAction;
public string callOperationAction;
public string createObjectAction;
public string destroyObjectAction;
public string inputPin;
public string opaqueAction;
public string outputPin;
public string pseudostate;
public string sendSignalAction;
public MetatypeConstants()
{
acceptEventAction = "AcceptEventAction";
callBehaviorAction = "CallBehaviorAction";
callOperationAction = "CallOperationAction";
createObjectAction = "CreateObjectAction";
destroyObjectAction = "DestroyObjectAction";
inputPin = "InputPin";
opaqueAction = "OpaqueAction";
outputPin = "OutputPin";
pseudostate = "Pseudostate";
sendSignalAction = "SendSignalAction";
}
public const string acceptEventAction = "AcceptEventAction";
public const string callBehaviorAction = "CallBehaviorAction";
public const string callOperationAction = "CallOperationAction";
public const string createObjectAction = "CreateObjectAction";
public const string destroyObjectAction = "DestroyObjectAction";
public const string inputPin = "InputPin";
public const string opaqueAction = "OpaqueAction";
public const string outputPin = "OutputPin";
public const string pseudostate = "Pseudostate";
public const string sendSignalAction = "SendSignalAction";
}

}
Loading

0 comments on commit 7a911da

Please sign in to comment.