GLIMSView Source Code Documentation

GlacierLineHistoryElement Class Reference

#include <GlacierLineHistory.h>

List of all members.


Detailed Description

A single user action on a GlacierLine.

The modified Shape (GlacierLine or a Node it contains), location indices in the original data structures, and type of action taken are stored so a deleted or otherwise modified Shape can be restored to its previous state.

Author:
deborah lee soltesz
Date:
2005-07-06

Definition at line 42 of file GlacierLineHistory.h.


Public Member Functions

 GlacierLineHistoryElement ()
 Default constructor for an empty history element.
 GlacierLineHistoryElement (GlacierLine &shp, int iline, int inode, HistoryAction action)
 Constructor a new history element with information to be stored for a GlacierLine.
 GlacierLineHistoryElement (Node &shp, int iline, int inode, HistoryAction action)
 Constructor a new history element with information to be stored for a Node in a line.
virtual ~GlacierLineHistoryElement ()
HistoryAction getAction ()
 Get/Set the action information from the history element.
void setAction (HistoryAction newAction)
ShapegetShape ()
 Get/Set the shape (GlacierLine or Node) from the history element.
void setShape (GlacierLine *newShape)
void setShape (Node *newShape)
int getLineIndex ()
 Get/Set the index to the line where the shape was stored from the history element.
void setLineIndex (int li)
int getNodeIndex ()
 Get/Set the index of the Node in the line where the shape was stored from the history element.
void setNodeIndex (int ni)

Private Attributes

ShapemGlacierLineComponent
 Pointer to a GlacierLine or Node.
int mLineIndex
 Location in the GLIMSLineData stack of the line/node that was changed.
int mNodeIndex
 Location in the GlacierLine stack where the changed node was located.
HistoryAction mAction
 Action taken by user on this shape.

Constructor & Destructor Documentation

GlacierLineHistoryElement::GlacierLineHistoryElement (  )  [inline]

Default constructor for an empty history element.

Definition at line 57 of file GlacierLineHistory.h.

References mAction, mGlacierLineComponent, mLineIndex, mNodeIndex, and noAction.

GlacierLineHistoryElement::GlacierLineHistoryElement ( GlacierLine shp,
int  iline,
int  inode,
HistoryAction  action 
) [inline]

Constructor a new history element with information to be stored for a GlacierLine.

Parameters:
shp The shape (GlacierLine) modified by user action for which the class will store history information
iline The line's original position in the line set before modificaiton
inode The position of a node in the line (-1 for "not applicable)
action The action taken on this line by the user to cause a history element to be stored

Definition at line 74 of file GlacierLineHistory.h.

References mAction, mGlacierLineComponent, mLineIndex, and mNodeIndex.

GlacierLineHistoryElement::GlacierLineHistoryElement ( Node shp,
int  iline,
int  inode,
HistoryAction  action 
) [inline]

Constructor a new history element with information to be stored for a Node in a line.

Parameters:
shp The shape (Node) modified by user action for which the class will store history information
iline The line (referenced by index) the node belonged to before modificaiton
inode The position of the node in the line
action The action taken on this node by the user to cause a history element to be stored

Definition at line 96 of file GlacierLineHistory.h.

References mAction, mGlacierLineComponent, mLineIndex, and mNodeIndex.

virtual GlacierLineHistoryElement::~GlacierLineHistoryElement (  )  [inline, virtual]

Definition at line 105 of file GlacierLineHistory.h.


Member Function Documentation

HistoryAction GlacierLineHistoryElement::getAction (  )  [inline]

Get/Set the action information from the history element.

Definition at line 110 of file GlacierLineHistory.h.

References mAction.

Referenced by GLIMSLineData::pop(), and GLIMSLineData::startMoveLineNode().

void GlacierLineHistoryElement::setAction ( HistoryAction  newAction  )  [inline]

Definition at line 111 of file GlacierLineHistory.h.

References mAction.

Referenced by GLIMSLineData::pop().

Shape* GlacierLineHistoryElement::getShape (  )  [inline]

Get/Set the shape (GlacierLine or Node) from the history element.

Definition at line 116 of file GlacierLineHistory.h.

References mGlacierLineComponent.

Referenced by GLIMSLineData::pop().

void GlacierLineHistoryElement::setShape ( GlacierLine newShape  )  [inline]

void GlacierLineHistoryElement::setShape ( Node newShape  )  [inline]

Definition at line 124 of file GlacierLineHistory.h.

References mGlacierLineComponent.

int GlacierLineHistoryElement::getLineIndex (  )  [inline]

Get/Set the index to the line where the shape was stored from the history element.

Definition at line 133 of file GlacierLineHistory.h.

References mLineIndex.

Referenced by GLIMSLineData::pop(), and GLIMSLineData::startMoveLineNode().

void GlacierLineHistoryElement::setLineIndex ( int  li  )  [inline]

Definition at line 134 of file GlacierLineHistory.h.

References mLineIndex.

int GlacierLineHistoryElement::getNodeIndex (  )  [inline]

Get/Set the index of the Node in the line where the shape was stored from the history element.

If the shape is a line or the action was a selection, this will return -1.

Definition at line 140 of file GlacierLineHistory.h.

References mNodeIndex.

Referenced by GLIMSLineData::pop(), and GLIMSLineData::startMoveLineNode().

void GlacierLineHistoryElement::setNodeIndex ( int  ni  )  [inline]

Definition at line 141 of file GlacierLineHistory.h.

References mNodeIndex.


Member Data Documentation

Pointer to a GlacierLine or Node.

Used to hold a copy of a Shape object so it can be restored later.

Definition at line 45 of file GlacierLineHistory.h.

Referenced by getShape(), GlacierLineHistoryElement(), and setShape().

Location in the GLIMSLineData stack of the line/node that was changed.

Definition at line 47 of file GlacierLineHistory.h.

Referenced by getLineIndex(), GlacierLineHistoryElement(), and setLineIndex().

Location in the GlacierLine stack where the changed node was located.

If the shape is a line or the action was a selection, the value should be -1.

Definition at line 48 of file GlacierLineHistory.h.

Referenced by getNodeIndex(), GlacierLineHistoryElement(), and setNodeIndex().

Action taken by user on this shape.

Definition at line 50 of file GlacierLineHistory.h.

Referenced by getAction(), GlacierLineHistoryElement(), and setAction().


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

Home | Search | Disclaimers & Privacy | Contact Us
GLIMSView Maintainer: dsoltesz@usgs.gov