Documentation for Class Dictionary in 3rd Use Case


Class Dictionary Graph for CD

text

Class Dictionary Graph for CDG

text

I. Textual Class Dictionary with Grammars and Input Files.


II. Modification to UseCase2


I.  Added some default edges that connect Graph to Vertex or Edge;
II. Added new classes for constructing and printing a CDG.

III. Design Patterns Used in 2nd Use Case

   Adapter       -- Convert the interface of a class into anther
		    interface clients expect, lets classes work together
		    that couldn't otherwise because of incompatible
		    interfaces.

	Example:  Edge :   AltEdge | ConstEdge
        		*common*
          		"from"     < from > Vertex
               		[ "Bendpoints" < middlepoints > Coordinates ] 
          		"to"    < to > Vertex .



		     		  // ConstEdge is the subclass of Edge
		  ConstEdge = "ConstEdge"
            		< edgename > EdgeName .
				  // Adapt the Edge's interface to EdgeName
				     by some PPs, such as cppDrawEdges


   Facade        -- Provide a unified interface to aa set of interfaces
		    in a subsystem, defines a higher level interface that
		    makes the subsystem easier to use. 

	Example: 	 // 6 different subsystems

			(1)Graph = <edges>   Edge_List
				   <vertices> Vertex_List.
				   [<defaultConstVertex> ConstVertex]
	   			   [< defaultAltVertex> AltVertex]
	                           [<defaultConstEdge> ConstEdge]
	                           [<defaultAltEdge> AltEdge].

				   
			(2)ConstEdge = <edgename> EdgeName.				       

			(3)EdgeName = <name> DemIdent
				      <e_position> Coordinates.
			(4)Coordinates = <coords> DemString.

			(5)VertexName = <name> DemIdent
					[<vn_position> Coordinates]

			(6)Cd_Graph = <adjacencies> Cd_Adj_List.


   Interpreter    -- Given a language, define a represention for 
		     its grammar along with an interpreter that uses the 
		     representation to interpret sentences in the language.

	Example:      the  cd.cd provided by pp group


   Iterator      -- Provide a way to access the elements of an 
		    aggregate object sequentially without exposing its 
		    underlying representation.
	
	Example:      
		      //list of edges
		   Edge_List ~ Edge { Edge }.
		    
		      //list of vertices
		   Vertex_List ~ Vertex { Vertex }.
		
		      // List of Cd_Adjacency
		   Cd_Adj_List ~ { Cd_Adjacency }. 

		      //List of Cd_LVertex
		   Cd_LV_List ~ { Cd_LVertex }. 
		
		      //List of Cd_Vertex
		   Cd_V_BarList ~ Cd_Vertex { Cd_Vertex }.