public override bool addInput(Vid_Object obj, int argumentIndex) { // Note: don't change, Table=0,COL=1,Where=2 need to be these value. switch (argumentIndex) { case 0: if (obj.output_dataType == VidData_Type.DATABASE_TABLE) { bool b = base.addInput(obj, 0); return(b); } else { return(false); } case 1: if (obj.output_dataType == VidData_Type.DATABASE_CLAUSE) { bool b = base.addInput(obj, 1); return(b); } else { return(false); } } return(false); }
public override string ToString() { StringBuilder sb = new StringBuilder(); Vid_Object table = inputs.getInput_atIndex(0); switch (colMode) { case ColState.NAME: if (asFlag) { if (table != null) { return(table.ToString() + "." + colName + " As" + asName); } else { return(colName + " As " + asName); } } else { if (table != null) { return(table.ToString() + "." + colName); } else { return(colName); } } } return(""); }
public override bool addInput(Vid_Object obj, int argumentIndex) { Debug.Log("Here:2"); switch (argumentIndex) { case 0: if (obj.output_dataType == VidData_Type.WHERE_STATMENT) { bool b = base.addInput(obj, 0); return(b); } else { return(false); } case 1: if (obj.output_dataType == VidData_Type.DATABASE_CLAUSE) { bool b = base.addInput(obj, 1); return(b); } else { return(false); } } return(false); }
private void transferData() { output = ct.getOutputButton(); Vid_Object outputObj = output.vid_obj; ct.setInputButton(this); output.setIsUse(false); bool b = vidObj.addInput(outputObj, argumentIndex); if (b) { used = true; drawline = true; } ct.resetTool(); //foreach (VidData_Type d in acceptable_dataTypes) //{ // if (d == outputObj.output_dataType) // { // ct.setInputButton(this); // output.setIsUse(false); // bool b = vidObj.addInput(outputObj, argumentIndex); // if (b) { // used = true; // drawline = true; // } // ct.resetTool(); // break; // } //} }
/*Helper functions*/ private string writeInputs() { StringBuilder sb = new StringBuilder(); for (int i = 0; i < inputs.getSize(); i++) { Vid_Object obj = inputs.getInput_atIndex(i); if (obj != null) { if (i == 0) { sb.Append(obj.ToString()); if (0 < inputs.getSize()) { sb.AppendLine(","); } } else { sb.Append(TabTool.TabCount() + obj.ToString()); if (i < inputs.getSize() - 1) { sb.AppendLine(","); } } } } return(sb.ToString()); }
public override bool addInput(Vid_Object obj, int argumentIndex) { // Note: don't change, Table=0,COL=1,Where=2 need to be these value. switch (argumentIndex) { case 0: if (obj.output_dataType == VidData_Type.DATABASE_TABLE) { bool b = base.addInput(obj, 0); return b; } else { return false; } case 1: if(obj.output_dataType == VidData_Type.DATABASE_COL) { bool b = base.addInput(obj, 1); return b; } else { return false; } case 2: if (obj.output_dataType == VidData_Type.DATABASE_CLAUSE) { bool b = base.addInput(obj, 2); return b; } else { return false; } } return false; }
/*Builder functions*/ public override bool addInput(Vid_Object obj, int index) { if (obj.output_dataType == VidData_Type.DATABASE_COL) { return(base.addInput(obj, index)); } else { if (obj.output_dataType == VidData_Type.DATABASE_TABLE || obj.output_dataType == VidData_Type.NUM || obj.output_dataType == VidData_Type.STRING || obj.output_dataType == VidData_Type.BOOL) { if (index == 1) { return(base.addInput(obj, index)); } else { return(false); } } return(false); } }
private void DeselectGroup(GameObject go) { if (go == null) { return; } Vid_Object vidObj = go.GetComponent <Vid_Object>(); Vid_ObjectInputs inputs = vidObj.GetInputs(); VidContainer container = go.GetComponent <VidContainer>(); container.Deselect(); if (inputs == null) { return; } for (int i = 0; i < inputs.inputs.Length; i++) { if (inputs.inputs[i] == null) { } else { DeselectGroup(inputs.inputs[i].gameObject); } } }
private void SelectGroup(GameObject go) { if (go == null) { return; } Vid_Object vidObj = go.GetComponent <Vid_Object>(); Vid_ObjectInputs inputs = vidObj.GetInputs(); VidContainer container = go.GetComponent <VidContainer>(); container.Select(); if (inputs == null) { return; } for (int i = 0; i < inputs.inputs.Length; i++) { if (inputs.inputs[i] == null) { } else { Debug.Log("Check2:" + inputs.inputs[i].gameObject.ToString()); SelectGroup(inputs.inputs[i].gameObject); } } }
/*Builder functions*/ public override bool addInput(Vid_Object obj, int index) { if (obj.output_dataType == VidData_Type.BOOL) { return(inputs.setInput_atIndex(obj, index)); } return(false); }
public override bool addInput(Vid_Object obj) { if (obj.output_dataType == VidData_Type.DATABASE_TABLE) { return(base.addInput(obj, 0)); } return(false); }
/*Builder functions*/ public override bool addInput(Vid_Object obj,int index) { if (obj.output_dataType == VidData_Type.BOOL) { return base.addInput(obj,index); } return false; }
public override bool addInput(Vid_Object obj, int argumentIndex) { if (obj.output_dataType == VidData_Type.IDENT) { base.addInput(obj, 0); } return(false); }
public override bool addInput(Vid_Object obj, int index) { if (obj.output_dataType == VidData_Type.DATABASE_COL) { Vid_DB_Col colnode = (Vid_DB_Col)obj; bool b = inputs.setInput_atIndex(obj, index); return b; } return false; }
public override bool addInput(Vid_Object obj, int index) { if (obj.output_dataType == VidData_Type.DATABASE_COL) { return(base.addInput(obj, index)); } return(false); }
/*Builder functions*/ public override bool addInput(Vid_Object obj, int index) { if (obj.output_dataType == VidData_Type.WHERE_STATMENT) { return(base.addInput(obj, index)); } return(false); }
/*Builder functions*/ public override bool addInput(Vid_Object obj, int index) { if (obj.output_dataType == VidData_Type.BOOL || obj.output_dataType == VidData_Type.NUM) { base.addInput(obj, index); } return(false); }
public override bool addInput(Vid_Object obj, int argumentIndex) { if (obj.output_dataType == VidData_Type.DATABASE_TABLE) { return base.addInput(obj, 0); } else if (obj.output_dataType == VidData_Type.DATABASE_COL) { return base.addInput(obj, 1); } return false; }
public override bool addInput(Vid_Object obj, int argumentIndex) { if (obj.output_dataType == VidData_Type.IDENT) { base.addInput(obj, 0); } if (obj.output_dataType == VidData_Type.EXPRESSION) { base.addInput(obj, 1); } return false; }
/* Abilities */ public void RemakeConnetion() { if (output == null) { return; } Vid_Object outputObj = output.vid_obj; bool b = vidObj.addInput(outputObj, argumentIndex); }
/*Builder functions*/ public override bool addInput(Vid_Object obj, int index) { if (conditionType == WhereStatment_Type.EXISTS || conditionType == WhereStatment_Type.NOT_EXISTS) { if (index == 0) { return false; } if (index == 1 && obj.output_dataType != VidData_Type.Q_SELECT) { return false; } return base.addInput(obj, index); } else if (conditionType == WhereStatment_Type.IN) { if (index == 0 && obj.output_dataType != VidData_Type.DATABASE_COL) { return false; } if (index == 1 && obj.output_dataType != VidData_Type.Q_SELECT) { return false; } return base.addInput(obj, index); } else if (conditionType == WhereStatment_Type.LIKE) { if (index == 0 && obj.output_dataType != VidData_Type.DATABASE_COL) { return false; } if (index == 1 && obj.output_dataType != VidData_Type.STRING) { return false; } return base.addInput(obj, index); } else if (conditionType == WhereStatment_Type.LESS || conditionType == WhereStatment_Type.LESS_EQU || conditionType == WhereStatment_Type.GREATER || conditionType == WhereStatment_Type.GREATER_EQU ) { if (index == 0 && obj.output_dataType != VidData_Type.DATABASE_COL) { return false; } if (index == 1 && obj.output_dataType != VidData_Type.NUM) { return false; } return base.addInput(obj, index); } else if (obj.output_dataType == VidData_Type.DATABASE_COL || obj.output_dataType == VidData_Type.NUM || obj.output_dataType == VidData_Type.STRING || obj.output_dataType == VidData_Type.BOOL) { return base.addInput(obj, index); } return false; }
public override bool addInput(Vid_Object obj, int index) { if (obj.output_dataType == VidData_Type.DATABASE_COL) { Vid_DB_Col colnode = (Vid_DB_Col)obj; bool b = inputs.setInput_atIndex(obj, index); return(b); } return(false); }
/*Setters*/ public bool setInput_atIndex(Vid_Object obj, int index) { if (inputs == null) { return false; } if ((index > -1) && (index < maxsize)) { inputs[index] = obj; return true; } return false; }
/*Builder functions*/ public override bool addInput(Vid_Object obj, int index) { //if output_dataType == VidData_Type.LIST i don't cair what type of input it holds if (output_dataType == VidData_Type.LIST) { return base.addInput(obj, index); } // output_dataType != VidData_Type.LIST I do cair about it's inputs. else if (obj.output_dataType == output_dataType) { return base.addInput(obj, index); } return false; }
public void updateText(GameObject go) { vidObj = go.GetComponentInChildren <Vid_Object>(); if (vidObj == null) { Debug.Log("this is a test"); } else { terminalText.text = vidObj.ToString(); } }
public override bool addInput(Vid_Object obj, int argumentIndex) { if (obj.output_dataType == VidData_Type.DECLAR_CON) { base.addInput(obj, 0); } if (obj.output_dataType == VidData_Type.DECLAR_VAR) { base.addInput(obj, 1); } if(obj.output_dataType == VidData_Type.STATMENT) { base.addInput(obj, 2); } return false; }
public override bool addInput(Vid_Object obj, int argumentIndex) { if (obj.output_dataType == VidData_Type.DATABASE_TABLE) { return(base.addInput(obj, 0)); } else if (obj.output_dataType == VidData_Type.DATABASE_COL) { return(base.addInput(obj, 1)); } return(false); }
/*Builder functions*/ public override bool addInput(Vid_Object obj, int index) { if (output_dataType == VidData_Type.LIST) { return(base.addInput(obj, index)); } else if (obj.output_dataType == output_dataType) { return(base.addInput(obj, index)); } return(false); }
public override bool addInput(Vid_Object obj) { bool b; Debug.Log("Here:2"); switch (obj.output_dataType) { case VidData_Type.WHERE_STATMENT: b = base.addInput(obj, 0); return b; case VidData_Type.DATABASE_CLAUSE: b = base.addInput(obj, 1); return b; } return false; }
public override string ToString() { StringBuilder sb = new StringBuilder(); Vid_Object condirion = inputs.getInput_atIndex(0); Vid_Object statment = inputs.getInput_atIndex(0); if (condirion != null && statment != null) { sb.Append("if( " + condirion.ToString() + " { " + statment.ToString() + " }"); } return(sb.ToString()); }
public void DeactivateUI() { for (int i = 0; i < holdingV2.Count; i++) { Vid_Object vidObj = holdingV2[i].GetComponent <Vid_Object>(); Vid_ObjectInputs inputs = vidObj.GetInputs(); VidContainer container = holdingV2[i].GetComponent <VidContainer>(); if (container.UIControlls != null) { container.UIControlls.SetActive(false); } } }
public override bool addInput(Vid_Object obj) { // Note: don't change, Table=0,COL=1,Where=2 need to be these value. bool b = false; switch (obj.output_dataType) { case VidData_Type.DATABASE_TABLE: b = base.addInput(obj, 0); return b; case VidData_Type.LIST: b = base.addInput(obj, 1); return b; } return false; }
/*Setters*/ public bool setInput_atIndex(Vid_Object obj, int index) { if (inputs == null) { return(false); } if ((index > -1) && (index < maxsize)) { inputs[index] = obj; return(true); } return(false); }
/*Builder functions*/ public override bool addInput(Vid_Object obj, int index) { //if output_dataType == VidData_Type.LIST i don't cair what type of input it holds if (output_dataType == VidData_Type.LIST) { return(base.addInput(obj, index)); } // output_dataType != VidData_Type.LIST I do cair about it's inputs. else if (obj.output_dataType == output_dataType) { return(base.addInput(obj, index)); } return(false); }
public override bool addInput(Vid_Object obj, int argumentIndex) { switch (argumentIndex) { case 0: if (obj.output_dataType == VidData_Type.BOOL || obj.output_dataType == VidData_Type.DATABASE_COL) { if (obj.output_dataType == VidData_Type.DATABASE_COL) { inFlag = true; } bool b = base.addInput(obj, 0); return(b); } else { return(false); } case 1: if (obj.output_dataType == VidData_Type.LIST) { inFlag = true; likeFlag = false; bool b = base.addInput(obj, 1); return(b); } if (obj.output_dataType == VidData_Type.DATABASE_CALUSE) { inFlag = false; likeFlag = false; bool b = base.addInput(obj, 1); return(b); } if (obj.output_dataType == VidData_Type.STRING) { inFlag = false; likeFlag = true; bool b = base.addInput(obj, 1); return(b); } else { return(false); } } return(false); }
public override bool addInput(Vid_Object obj) { bool b; switch (obj.output_dataType) { case VidData_Type.DATABASE_TABLE: b = base.addInput(obj, 0); return b; case VidData_Type.ASSINMENT: b = base.addInput(obj, 1); return b; case VidData_Type.DATABASE_CLAUSE: b = base.addInput(obj, 2); return b; } return false; }
public override string ToString() { StringBuilder sb = new StringBuilder(); Vid_Object statment = inputs.getInput_atIndex(0); if (statment != null) { sb.Append(statment.ToString() + ";"); } else { sb.Append(""); } return(sb.ToString()); }
public override bool addInput(Vid_Object obj, int argumentIndex) { if (obj.output_dataType == VidData_Type.DECLAR_CON) { base.addInput(obj, 0); } if (obj.output_dataType == VidData_Type.DECLAR_VAR) { base.addInput(obj, 1); } if (obj.output_dataType == VidData_Type.STATMENT) { base.addInput(obj, 2); } return(false); }
/* Internal Helpers */ private void transferData() { output = ct.getOutputButton(); Vid_Object outputObj = output.vid_obj; ct.setInputButton(this); output.setIsUse(false); bool b = vidObj.addInput(outputObj, argumentIndex); if (b) { used = true; drawline = true; } output.inButton = this; ct.resetTool(); }
public override bool addInput(Vid_Object obj) { bool b; Debug.Log("Here:2"); switch (obj.output_dataType) { case VidData_Type.WHERE_STATMENT: b = base.addInput(obj, 0); return(b); case VidData_Type.DATABASE_CLAUSE: b = base.addInput(obj, 1); return(b); } return(false); }
public override string ToString() { StringBuilder sb = new StringBuilder(); Vid_Object ident = inputs.getInput_atIndex(0); Vid_Object expression = inputs.getInput_atIndex(1); if (ident != null && expression != null) { sb.Append(ident.ToString() + "= " + expression.ToString()); } else { sb.Append(""); } return(sb.ToString()); }
public override bool addInput(Vid_Object obj) { // Note: don't change, Table=0,COL=1,Where=2 need to be these value. bool b = false; switch (obj.output_dataType) { case VidData_Type.DATABASE_TABLE: b = base.addInput(obj, 0); return(b); case VidData_Type.DATABASE_CLAUSE: b = base.addInput(obj, 1); return(b); } return(false); }
public override bool addInput(Vid_Object obj, int argumentIndex) { Debug.Log("Here:2"); switch (argumentIndex) { case 0: if (obj.output_dataType == VidData_Type.WHERE_STATMENT) { bool b = base.addInput(obj, 0); return b; } else { return false; } case 1: if (obj.output_dataType == VidData_Type.DATABASE_CLAUSE) { bool b = base.addInput(obj, 1); return b; } else { return false; } } return false; }
public Vid_Data(VidData_Type type, Vid_Object vid_object) { this.vidData_Type = type; this.vid_object = vid_object; }
public override bool addInput(Vid_Object obj) { if (obj.output_dataType == VidData_Type.DATABASE_COL) { return base.addInput(obj, 0); } if (obj.output_dataType == VidData_Type.NUM) { return base.addInput(obj, 1); } return false; }
public void setVid_object(Vid_Object obj) { this.vid_object = obj; }
public override bool addInput(Vid_Object obj, int argumentIndex) { switch (argumentIndex) { case 0: if (obj.output_dataType == VidData_Type.DATABASE_TABLE) { bool b = base.addInput(obj, 0); return b; } else { return false; } case 1: if (obj.output_dataType == VidData_Type.ASSINMENT) { bool b = base.addInput(obj, 1); return b; } else { return false; } case 2: if (obj.output_dataType == VidData_Type.DATABASE_CLAUSE) { bool b = base.addInput(obj, 2); return b; } else { return false; } } return false; }
public override bool addInput(Vid_Object obj, int index) { bool b = base.addInput(obj, index); return b; }
public override bool addInput(Vid_Object obj, int argumentIndex) { return base.addInput(obj, argumentIndex); }