new model for links
This commit is contained in:
		
							
								
								
									
										47
									
								
								docs/UML/diag_class_links.puml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								docs/UML/diag_class_links.puml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,47 @@
 | 
			
		||||
@startuml class_links
 | 
			
		||||
 | 
			
		||||
class LinkGraph {
 | 
			
		||||
 | 
			
		||||
    + []Link links
 | 
			
		||||
 | 
			
		||||
    + void AddLinkToGraph(Link link)
 | 
			
		||||
    + boolean,str HasPrevious(Link)
 | 
			
		||||
    + boolean,str HasNext(Link) 
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
class Link {
 | 
			
		||||
    + str source
 | 
			
		||||
    + str destination
 | 
			
		||||
    + boolean DCLink
 | 
			
		||||
 | 
			
		||||
    + *Link NewLink(interface{} src, interface{} dst)  
 | 
			
		||||
    + void AddLinkToDataCenter()
 | 
			
		||||
} 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
note left of LinkGraph::HasPrevious
 | 
			
		||||
    checks if the component whose ID is in src is the dst of 
 | 
			
		||||
    any other Link of the list on Link 
 | 
			
		||||
end note 
 | 
			
		||||
 | 
			
		||||
note top of Link 
 | 
			
		||||
    Links need to be redefined in the sense that they are currently used
 | 
			
		||||
    both : 
 | 
			
		||||
    - to connect a component to a DC
 | 
			
		||||
    - to represent the interractions between components 
 | 
			
		||||
end note
 | 
			
		||||
 | 
			
		||||
note right of Link::DCLink
 | 
			
		||||
    set at construction of the object and used to order the links
 | 
			
		||||
end note
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
note left of Link::NewLink 
 | 
			
		||||
    Must test if the parameters check the type constraints
 | 
			
		||||
    and raise errors for the GUI if necessary 
 | 
			
		||||
end note 
 | 
			
		||||
 | 
			
		||||
LinkGraph*--"links"Link
 | 
			
		||||
 | 
			
		||||
@enduml
 | 
			
		||||
		Reference in New Issue
	
	Block a user