de.grogra.graph
public interface ContextDependent
GraphState. It is used as part of
a caching mechanism (see Cache) in order to
determine if the context has changed or not.
As an example, consider a shape attribute of a node in a graph: It could be a polyline starting at this node (which constitutes the object context) and connecting all node positions downwards to the root. Thus, the semantics (a polyline connecting node positions) depends on the context (the node to start with and its ancestors in the graph).
| Modifier and Type | Method and Description |
|---|---|
boolean |
dependsOnContext()
Determines whether this object actually depends on context.
|
void |
writeStamp(Cache.Entry cache,
GraphState gs)
Writes a stamp of the context into
cache. |
boolean dependsOnContext()
true iff this object depends on contextvoid writeStamp(Cache.Entry cache, GraphState gs)
cache. Based on
this stamp, a cache detects whether the context of this
object has changed or not.cache - a cache entry to write the stampgs - the current graph state