Generated on Tue Apr 18 10:23:33 2017 for Gecode by doxygen 1.6.3

Gecode::Gist::VisualNode Class Reference

Node class that supports visual layout More...

#include <visualnode.hh>

List of all members.

Public Member Functions

 VisualNode (int p)
 Construct with parent p.
 VisualNode (Space *root)
 Constructor for root node from root and b.
bool isHidden (void)
 Return if node is hidden.
void setHidden (bool h)
 Set hidden state to h.
void setStop (bool h)
 Set stop state to h.
void dirtyUp (const NodeAllocator &na)
 Mark all nodes up the path to the parent as dirty.
void layout (const NodeAllocator &na)
 Compute layout for the subtree of this node.
int getOffset (void)
 Return offset off this node from its parent.
void setOffset (int n)
 Set offset of this node, relative to its parent.
bool isDirty (void)
 Return whether node is marked as dirty.
void setDirty (bool d)
 Mark node as dirty.
bool childrenLayoutIsDone (void)
 Return whether the layout of the node's children has been completed.
void setChildrenLayoutDone (bool d)
 Mark node whether the layout of the node's children has been completed.
bool isMarked (void)
 Return whether node is marked.
void setMarked (bool m)
 Set mark of this node.
bool isBookmarked (void)
 Return whether node is bookmarked.
void setBookmarked (bool m)
 Set bookmark of this node.
void pathUp (const NodeAllocator &na)
 Set all nodes from the node to the root to be on the path.
void unPathUp (const NodeAllocator &na)
 Set all nodes from the node to the root not to be on the path.
bool isOnPath (void)
 Return whether node is on the path.
int getPathAlternative (const NodeAllocator &na)
 Return the alternative of the child that is on the path (-1 if none).
void setOnPath (bool onPath0)
 Set whether node is on the path.
void toggleHidden (const NodeAllocator &na)
 Toggle whether this node is hidden.
void hideFailed (const NodeAllocator &na, bool onlyDirty=false)
 Hide all failed subtrees of this node.
void unhideAll (const NodeAllocator &na)
 Unhide all nodes in the subtree of this node.
void toggleStop (const NodeAllocator &na)
 Do not stop at this node.
void unstopAll (const NodeAllocator &na)
 Do not stop at any stop node in the subtree of this node.
ShapegetShape (void)
 Return the shape of this node.
void setShape (Shape *s)
 Set the shape of this node.
void computeShape (const NodeAllocator &na, VisualNode *root)
 Compute the shape according to the shapes of the children.
BoundingBox getBoundingBox (void)
 Return the bounding box.
void changedStatus (const NodeAllocator &na)
 Signal that the status has changed.
VisualNodefindNode (const NodeAllocator &na, int x, int y)
 Find a node in this subtree at coordinates x, y.
void labelBranches (NodeAllocator &na, BestNode *curBest, int c_d, int a_d)
 Create or clear branch labels in subtree.
void labelPath (NodeAllocator &na, BestNode *curBest, int c_d, int a_d)
 Create or clear branch labels on path to root.
std::string getBranchLabel (NodeAllocator &na, VisualNode *p, const Choice *c, BestNode *curBest, int c_d, int a_d, int alt)
 Return string that describes the branch.
std::string toolTip (NodeAllocator &na, BestNode *curBest, int c_d, int a_d)
 Return string that is used as a tool tip.
void dispose (void)
 Free allocated memory.

Protected Types

enum  VisualNodeFlags {
  DIRTY = SpaceNode::LASTBIT+1, CHILDRENLAYOUTDONE, HIDDEN, MARKED,
  ONPATH, BOOKMARKED
}
 

Flags for VisualNodes.

More...

Protected Member Functions

bool containsCoordinateAtDepth (int x, int depth)
 Check if the x at depth depth lies in this subtree.

Protected Attributes

int offset
 Relative offset from the parent node.
Shapeshape
 Shape of this node.

Detailed Description

Node class that supports visual layout

Definition at line 129 of file visualnode.hh.


Member Enumeration Documentation

Flags for VisualNodes.

Enumerator:
DIRTY 
CHILDRENLAYOUTDONE 
HIDDEN 
MARKED 
ONPATH 
BOOKMARKED 

Definition at line 132 of file visualnode.hh.


Constructor & Destructor Documentation

Gecode::Gist::VisualNode::VisualNode ( int  p  ) 

Construct with parent p.

Definition at line 73 of file visualnode.cpp.

Gecode::Gist::VisualNode::VisualNode ( Space root  ) 

Constructor for root node from root and b.

Definition at line 86 of file visualnode.cpp.


Member Function Documentation

bool Gecode::Gist::VisualNode::containsCoordinateAtDepth ( int  x,
int  depth 
) [protected]

Check if the x at depth depth lies in this subtree.

Definition at line 237 of file visualnode.cpp.

bool Gecode::Gist::VisualNode::isHidden ( void   )  [inline]

Return if node is hidden.

Definition at line 133 of file visualnode.hpp.

void Gecode::Gist::VisualNode::setHidden ( bool  h  )  [inline]

Set hidden state to h.

Definition at line 138 of file visualnode.hpp.

void Gecode::Gist::VisualNode::setStop ( bool  h  )  [inline]

Set stop state to h.

Definition at line 143 of file visualnode.hpp.

void Gecode::Gist::VisualNode::dirtyUp ( const NodeAllocator na  ) 

Mark all nodes up the path to the parent as dirty.

Definition at line 106 of file visualnode.cpp.

void Gecode::Gist::VisualNode::layout ( const NodeAllocator na  ) 

Compute layout for the subtree of this node.

Definition at line 117 of file visualnode.cpp.

int Gecode::Gist::VisualNode::getOffset ( void   )  [inline]

Return offset off this node from its parent.

Definition at line 151 of file visualnode.hpp.

void Gecode::Gist::VisualNode::setOffset ( int  n  )  [inline]

Set offset of this node, relative to its parent.

Definition at line 154 of file visualnode.hpp.

bool Gecode::Gist::VisualNode::isDirty ( void   )  [inline]

Return whether node is marked as dirty.

Definition at line 157 of file visualnode.hpp.

void Gecode::Gist::VisualNode::setDirty ( bool  d  )  [inline]

Mark node as dirty.

Definition at line 162 of file visualnode.hpp.

bool Gecode::Gist::VisualNode::childrenLayoutIsDone ( void   )  [inline]

Return whether the layout of the node's children has been completed.

Definition at line 167 of file visualnode.hpp.

void Gecode::Gist::VisualNode::setChildrenLayoutDone ( bool  d  )  [inline]

Mark node whether the layout of the node's children has been completed.

Definition at line 172 of file visualnode.hpp.

bool Gecode::Gist::VisualNode::isMarked ( void   )  [inline]

Return whether node is marked.

Definition at line 177 of file visualnode.hpp.

void Gecode::Gist::VisualNode::setMarked ( bool  m  )  [inline]

Set mark of this node.

Definition at line 182 of file visualnode.hpp.

bool Gecode::Gist::VisualNode::isBookmarked ( void   )  [inline]

Return whether node is bookmarked.

Definition at line 187 of file visualnode.hpp.

void Gecode::Gist::VisualNode::setBookmarked ( bool  m  )  [inline]

Set bookmark of this node.

Definition at line 192 of file visualnode.hpp.

void Gecode::Gist::VisualNode::pathUp ( const NodeAllocator na  ) 

Set all nodes from the node to the root to be on the path.

Definition at line 131 of file visualnode.cpp.

void Gecode::Gist::VisualNode::unPathUp ( const NodeAllocator na  ) 

Set all nodes from the node to the root not to be on the path.

Definition at line 139 of file visualnode.cpp.

bool Gecode::Gist::VisualNode::isOnPath ( void   )  [inline]

Return whether node is on the path.

Definition at line 197 of file visualnode.hpp.

int Gecode::Gist::VisualNode::getPathAlternative ( const NodeAllocator na  ) 

Return the alternative of the child that is on the path (-1 if none).

Definition at line 148 of file visualnode.cpp.

void Gecode::Gist::VisualNode::setOnPath ( bool  onPath0  )  [inline]

Set whether node is on the path.

Definition at line 202 of file visualnode.hpp.

void Gecode::Gist::VisualNode::toggleHidden ( const NodeAllocator na  ) 

Toggle whether this node is hidden.

Definition at line 157 of file visualnode.cpp.

void Gecode::Gist::VisualNode::hideFailed ( const NodeAllocator na,
bool  onlyDirty = false 
)

Hide all failed subtrees of this node.

Definition at line 163 of file visualnode.cpp.

void Gecode::Gist::VisualNode::unhideAll ( const NodeAllocator na  ) 

Unhide all nodes in the subtree of this node.

Definition at line 211 of file visualnode.cpp.

void Gecode::Gist::VisualNode::toggleStop ( const NodeAllocator na  ) 

Do not stop at this node.

Definition at line 218 of file visualnode.cpp.

void Gecode::Gist::VisualNode::unstopAll ( const NodeAllocator na  ) 

Do not stop at any stop node in the subtree of this node.

Definition at line 227 of file visualnode.cpp.

Shape * Gecode::Gist::VisualNode::getShape ( void   )  [inline]

Return the shape of this node.

Definition at line 207 of file visualnode.hpp.

void Gecode::Gist::VisualNode::setShape ( Shape s  ) 

Set the shape of this node.

Definition at line 395 of file visualnode.cpp.

void Gecode::Gist::VisualNode::computeShape ( const NodeAllocator na,
VisualNode root 
)

Compute the shape according to the shapes of the children.

Definition at line 403 of file visualnode.cpp.

BoundingBox Gecode::Gist::VisualNode::getBoundingBox ( void   )  [inline]

Return the bounding box.

Definition at line 212 of file visualnode.hpp.

void Gecode::Gist::VisualNode::changedStatus ( const NodeAllocator na  ) 

Signal that the status has changed.

Definition at line 234 of file visualnode.cpp.

VisualNode * Gecode::Gist::VisualNode::findNode ( const NodeAllocator na,
int  x,
int  y 
)

Find a node in this subtree at coordinates x, y.

Definition at line 253 of file visualnode.cpp.

void Gecode::Gist::VisualNode::labelBranches ( NodeAllocator na,
BestNode curBest,
int  c_d,
int  a_d 
)

Create or clear branch labels in subtree.

Definition at line 170 of file visualnode.cpp.

void Gecode::Gist::VisualNode::labelPath ( NodeAllocator na,
BestNode curBest,
int  c_d,
int  a_d 
)

Create or clear branch labels on path to root.

Definition at line 179 of file visualnode.cpp.

std::string Gecode::Gist::VisualNode::getBranchLabel ( NodeAllocator na,
VisualNode p,
const Choice c,
BestNode curBest,
int  c_d,
int  a_d,
int  alt 
)

Return string that describes the branch.

Definition at line 288 of file visualnode.cpp.

std::string Gecode::Gist::VisualNode::toolTip ( NodeAllocator na,
BestNode curBest,
int  c_d,
int  a_d 
)

Return string that is used as a tool tip.

Definition at line 283 of file visualnode.cpp.

void Gecode::Gist::VisualNode::dispose ( void   ) 

Free allocated memory.

Reimplemented from Gecode::Gist::SpaceNode.

Definition at line 100 of file visualnode.cpp.


Member Data Documentation

Relative offset from the parent node.

Definition at line 142 of file visualnode.hh.

Shape of this node.

Definition at line 144 of file visualnode.hh.


The documentation for this class was generated from the following files: