ALElement.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2004 CSIRO ICT Centre
00003  *
00004  * $Id: ALElement.h 587 2004-12-03 15:06:33Z nch $
00005  */
00006 
00007 /*
00008  * ALElement is a container for an entity to be stored on an
00009  * IndexedActiveList.  I had intended to use templates
00010  * to make it a generic container, but right now it is specific
00011  * to ActiveObjects.
00012  *
00013  * ALElement is intended to sit in two double linked lists, one
00014  * sorted by right ascension, and the other sorted by declination.
00015  */
00016 
00017 #ifndef ALELEMENT_DEFINED
00018 #define ALELEMENT_DEFINED
00019 
00020 #include "ActiveObject.h"
00021 
00022 
00023 class ALElement
00024 {
00025   public:
00026     ALElement(ActiveObject * object,
00027               ALElement * pRa,
00028               ALElement * nRa,
00029               ALElement * pDec,
00030               ALElement * nDec)
00031         : content(object), prevRa(pRa), nextRa(nRa), prevDec(pDec), nextDec(nDec) {}
00032     ~ALElement() {};
00033     ActiveObject * getContent() const { return content; }
00034     ALElement *    getPrevRa() const  { return prevRa; }
00035     ALElement *    getNextRa() const  { return nextRa; }
00036     ALElement *    getPrevDec() const { return prevDec; }
00037     ALElement *    getNextDec() const { return nextDec; }
00038 
00039     void setPrevRa(ALElement * prev)  { prevRa = prev; }
00040     void setNextRa(ALElement * next)  { nextRa = next; }
00041     void setPrevDec(ALElement * prev) { prevDec = prev; }
00042     void setNextDec(ALElement * next) { nextDec = next; }
00043 
00044   private:
00045     ActiveObject * content;
00046     ALElement *    prevRa;
00047     ALElement *    nextRa;
00048     ALElement *    prevDec;
00049     ALElement *    nextDec;
00050 
00051     ALElement();
00052     ALElement(ALElement const &);
00053     ALElement & operator=(ALElement const &);
00054 };
00055 
00056 #endif // ifndef ALELEMENT_DEFINED
Generated on Mon Oct 4 10:39:55 2010 for Matching.kdevelop by  doxygen 1.6.3