00001 // Copyright (C) 1999-2003 Paul O. Lewis 00002 // 00003 // This file is part of NCL (Nexus Class Library) version 2.0. 00004 // 00005 // NCL is free software; you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License as published by 00007 // the Free Software Foundation; either version 2 of the License, or 00008 // (at your option) any later version. 00009 // 00010 // NCL is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with NCL; if not, write to the Free Software Foundation, Inc., 00017 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 // 00019 00020 #ifndef NCL_NXSDISCRETEDATUM_H 00021 #define NCL_NXSDISCRETEDATUM_H 00022 00031 class NxsDiscreteDatum 00032 { 00033 friend class NxsDiscreteMatrix; 00034 friend class NxsUnalignedBlock; 00035 00036 public: 00037 NxsDiscreteDatum(): taxInd(0), charInd(0){} 00038 NxsDiscreteDatum(unsigned row, unsigned col): taxInd(row), charInd(col){} 00039 void CopyFrom(const NxsDiscreteDatum & other); 00040 00041 unsigned taxInd; /*row of the matrix */ 00042 unsigned charInd; /*col of the matrix */ 00043 00044 }; 00045 00046 typedef NxsDiscreteDatum DiscreteDatum; 00047 00051 inline void NxsDiscreteDatum::CopyFrom( 00052 const NxsDiscreteDatum & other) /* is the object to be copied */ 00053 { 00054 taxInd = other.taxInd; 00055 charInd = other.charInd; 00056 } 00057 00058 #endif