Example #1
0
    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);
    }
Example #2
0
    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("");
    }
Example #3
0
    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);
    }
Example #4
0
    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;
        //    }
        //}
    }
Example #5
0
    /*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());
    }
Example #6
0
 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;
 }
Example #7
0
 /*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);
     }
 }
Example #8
0
    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);
            }
        }
    }
Example #9
0
    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);
            }
        }
    }
Example #10
0
 /*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);
 }
Example #11
0
 public override bool addInput(Vid_Object obj)
 {
     if (obj.output_dataType == VidData_Type.DATABASE_TABLE)
     {
         return(base.addInput(obj, 0));
     }
     return(false);
 }
Example #12
0
 /*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;
 }
Example #13
0
 public override bool addInput(Vid_Object obj, int argumentIndex)
 {
     if (obj.output_dataType == VidData_Type.IDENT)
     {
         base.addInput(obj, 0);
     }
     return(false);
 }
Example #14
0
 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;
 }
Example #15
0
 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);
 }
Example #17
0
 /*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);
 }
Example #18
0
 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;
 }
Example #20
0
 /* 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;
    }
Example #22
0
 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);
 }
Example #23
0
    /*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;
    }
Example #24
0
 /*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;
 }
Example #25
0
 public void updateText(GameObject go)
 {
     vidObj = go.GetComponentInChildren <Vid_Object>();
     if (vidObj == null)
     {
         Debug.Log("this is a test");
     }
     else
     {
         terminalText.text = vidObj.ToString();
     }
 }
Example #26
0
 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;
 }
Example #27
0
 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);
 }
Example #28
0
 /*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);
 }
Example #29
0
 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;
 }
Example #30
0
    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());
    }
Example #31
0
 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);
         }
     }
 }
Example #32
0
 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;
 }
Example #33
0
 /*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);
 }
Example #34
0
 /*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);
 }
Example #35
0
    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);
    }
Example #36
0
 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());
    }
Example #38
0
 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);
 }
Example #39
0
    /* 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();
    }
Example #40
0
    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);
    }
Example #41
0
    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());
    }
Example #42
0
    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);
    }
Example #43
0
 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;
 }
Example #44
0
 public Vid_Data(VidData_Type type, Vid_Object vid_object)
 {
     this.vidData_Type = type;
     this.vid_object = vid_object;
 }
Example #45
0
 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;
 }
Example #46
0
 public void setVid_object(Vid_Object obj) { this.vid_object = obj; }
Example #47
0
 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;
 }
Example #48
0
 public override bool addInput(Vid_Object obj, int index) {
     bool b = base.addInput(obj, index);
     return b; 
 }
Example #49
0
 public override bool addInput(Vid_Object obj, int argumentIndex) {
     return base.addInput(obj, argumentIndex);
 }