コード例 #1
0
        private void inheritance(CSsemi.CSemiExp semi, string filename)
        {
            ElemRelation elem = new ElemRelation();

            elem.definedType  = semi[0];
            elem.relationType = semi[1];
            elem.fromName     = semi[2];
            elem.toName       = semi[3];
            elem.filename     = filename;
            RepositoryForRelation.storageForRelationship_.Add(elem);
        }
コード例 #2
0
        //----------------< Test Stub data for repository >----------------
        private static void repositoryForTestUP(string filename)
        {
            Elem e = new Elem();

            e.type     = "namespace";
            e.name     = "karan";
            e.begin    = 10;
            e.end      = 70;
            e.filename = filename;
            RepositoryForOutput.storageForOutput_.Add(e);
            Elem e1 = new Elem();

            e1.type     = "class";
            e1.name     = "Display";
            e1.begin    = 12;
            e1.end      = 68;
            e1.filename = filename;
            RepositoryForOutput.storageForOutput_.Add(e1);
            Elem e2 = new Elem();

            e2.type       = "function";
            e2.name       = "test";
            e2.begin      = 30;
            e2.end        = 65;
            e2.filename   = filename;
            e2.complexity = 5;
            RepositoryForOutput.storageForOutput_.Add(e2);
            ElemRelation er = new ElemRelation();

            er.relationType = "Aggregation";
            er.fromName     = "Display";
            er.toName       = "Xyz";
            er.filename     = filename;
            RepositoryForRelation.storageForRelationship_.Add(er);
            ElemRelation er1 = new ElemRelation();

            er1.relationType = "Inheritance";
            er1.fromName     = "Display";
            er1.toName       = "Test";
            er1.filename     = filename;
            RepositoryForRelation.storageForRelationship_.Add(er1);
            ElemRelation er2 = new ElemRelation();

            er2.relationType = "Composition";
            er2.fromName     = "Display";
            er2.toName       = "ValueType";
            er2.filename     = filename;
            RepositoryForRelation.storageForRelationship_.Add(er2);
        }
コード例 #3
0
        private void usingRelation(CSsemi.CSemiExp semi, string filename)
        {
            ElemRelation elem = new ElemRelation();

            elem.relationType = semi[0] + "      ";
            elem.toName       = semi[1];
            elem.filename     = filename;

            int  x    = repo_.locations.Count;
            Elem temp = repo_.locations[x - 1];

            elem.fromName    = temp.name;
            elem.definedType = temp.type;

            if (!elem.fromName.Equals(elem.toName))
            {
                RepositoryForRelation.storageForRelationship_.Add(elem);
            }
        }
コード例 #4
0
        private void usingRelation(CSsemi.CSemiExp semi, string filename)
        {
            ElemRelation elem = new ElemRelation();
            elem.relationType = semi[0] + "      ";
            elem.toName = semi[1];
            elem.filename = filename;

            int x = repo_.locations.Count;
            Elem temp = repo_.locations[x - 1];
            elem.fromName = temp.name;
            elem.definedType = temp.type;

            if (!elem.fromName.Equals(elem.toName))
                RepositoryForRelation.storageForRelationship_.Add(elem);
        }
コード例 #5
0
 private void inheritance(CSsemi.CSemiExp semi, string filename)
 {
     ElemRelation elem = new ElemRelation();
     elem.definedType = semi[0];
     elem.relationType = semi[1];
     elem.fromName = semi[2];
     elem.toName = semi[3];
     elem.filename = filename;
     RepositoryForRelation.storageForRelationship_.Add(elem);
 }
コード例 #6
0
 private static void repositoryForTestUP()
 {
     Elem e = new Elem();
     e.type = "namespace";
     e.name = "karan";
     e.begin = 10;
     e.end = 70;
     RepositoryForOutput.storageForOutput_.Add(e);
     Elem e1 = new Elem();
     e1.type = "class";
     e1.name = "Display";
     e1.begin = 12;
     e1.end = 68;
     RepositoryForOutput.storageForOutput_.Add(e1);
     Elem e2 = new Elem();
     e2.type = "function";
     e2.name = "test";
     e2.begin = 30;
     e2.end = 65;
     e2.complexity = 5;
     RepositoryForOutput.storageForOutput_.Add(e2);
     ElemRelation er = new ElemRelation();
     er.relationType = "Aggregation";
     er.fromName = "Display";
     er.toName = "Xyz";
     RepositoryForRelation.storageForRelationship_.Add(er);
     ElemRelation er1 = new ElemRelation();
     er1.relationType = "Inheritance";
     er1.fromName = "Display";
     er1.toName = "Test";
     RepositoryForRelation.storageForRelationship_.Add(er1);
     ElemRelation er2 = new ElemRelation();
     er2.relationType = "Composition";
     er2.fromName = "Display";
     er2.toName = "ValueType";
     RepositoryForRelation.storageForRelationship_.Add(er2);
 }