h o m e | d o c u m e n t a t i o n | c l a s s h i e r a r c h y |
00001 // 00002 // Filename : Chain.h 00003 // Author(s) : Stephane Grabli 00004 // Purpose : Class to define a chain of viewedges. 00005 // Date of creation : 09/01/2003 00006 // 00008 00009 00010 // 00011 // Copyright (C) : Please refer to the COPYRIGHT file distributed 00012 // with this source distribution. 00013 // 00014 // This program is free software; you can redistribute it and/or 00015 // modify it under the terms of the GNU General Public License 00016 // as published by the Free Software Foundation; either version 2 00017 // of the License, or (at your option) any later version. 00018 // 00019 // This program is distributed in the hope that it will be useful, 00020 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00022 // GNU General Public License for more details. 00023 // 00024 // You should have received a copy of the GNU General Public License 00025 // along with this program; if not, write to the Free Software 00026 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00027 // 00029 00030 #ifndef CHAIN_H 00031 # define CHAIN_H 00032 00033 # include "../view_map/ViewMap.h" 00034 # include "Curve.h" 00040 class Chain : public Curve 00041 { 00042 protected: 00043 // tmp 00044 Id * _splittingId; 00045 public: 00047 Chain() : Curve() {_splittingId=0;} 00049 Chain(const Id& id) : Curve(id) {_splittingId=0;} 00051 Chain(const Chain& iBrother) : Curve(iBrother) {_splittingId=iBrother._splittingId;} 00053 virtual ~Chain() { 00054 // only the last splitted deletes this id 00055 if(_splittingId){ 00056 if(*_splittingId == _Id) 00057 delete _splittingId; 00058 } 00059 } 00060 00068 void push_viewedge_back(ViewEdge *iViewEdge, bool orientation) ; 00076 void push_viewedge_front(ViewEdge *iViewEdge, bool orientation) ; 00077 00078 inline void setSplittingId(Id * sid){_splittingId = sid;} 00079 inline Id* getSplittingId() {return _splittingId;} 00080 }; 00081 00082 #endif // CHAIN_H