00001 /* -*- Mode: C++ -*- 00002 * SsBaseCoord.h 00003 * Copyright © 2003 Laboratoire de Biologie Informatique et Théorique 00004 * Université de Montréal. 00005 * Author : Patrick Charbonneau 00006 * Created On : Wed Sep 12 16:48:15 2003 00007 * $Revision: 1.2 $ 00008 * $Id: SsBaseCoord.h,v 1.2 2003/10/18 00:25:28 larosem Exp $ 00009 * 00010 * This file is part of xmlcpg. 00011 * 00012 * xmlcpg is free software; you can redistribute it and/or modify it under 00013 * the terms of the GNU Lesser General Public License as published by the Free 00014 * Software Foundation; either version 2 of the License, or (at your option) 00015 * any later version. 00016 * 00017 * xmlcpg is distributed in the hope that it will be useful, but WITHOUT ANY 00018 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00019 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 00020 * more details. 00021 * 00022 * You should have received a copy of the GNU Lesser General Public License 00023 * along with xmlcpg; if not, write to the Free Software Foundation, Inc., 00024 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00025 */ 00026 00027 #ifndef _rnaml_SsBaseCoord_h_ 00028 #define _rnaml_SsBaseCoord_h_ 00029 00030 extern "C" { 00031 #include "object.h" 00032 #include "ssbasecoord.h" 00033 } 00034 00035 #include "Object.h" 00036 00037 00038 00039 namespace rnaml 00040 { 00041 class BaseId; 00042 00043 00044 00045 class SsBaseCoord : public Object 00046 { 00047 00048 public: 00049 00050 // LIFECYCLE ------------------------------------------------------------ 00051 00055 SsBaseCoord () : Object ((rnamlObject*) rnamlnewSsBaseCoord ()) { } 00056 00061 SsBaseCoord (const SsBaseCoord &right) : Object (right) { } 00062 00067 SsBaseCoord* clone () const { return new SsBaseCoord (*this); } 00068 00072 virtual ~SsBaseCoord () { } 00073 00074 // OPERATORS ------------------------------------------------------------ 00075 00081 SsBaseCoord& operator= (const SsBaseCoord &right); 00082 00083 // ACCESS --------------------------------------------------------------- 00084 00089 BaseId* getBaseId () const; 00090 00095 void setBaseId (BaseId *baseId); 00096 00101 float getX () const { return rnamlgetSsBaseCoordX ((const rnamlSsBaseCoord*) getCStructure ()); } 00102 00107 void setX (float x) { rnamlsetSsBaseCoordX ((rnamlSsBaseCoord*) getCStructure (), x); } 00108 00113 float getY () const { return rnamlgetSsBaseCoordY ((const rnamlSsBaseCoord*) getCStructure ()); } 00114 00119 void setY (float y) { rnamlsetSsBaseCoordY ((rnamlSsBaseCoord*) getCStructure (), y); } 00120 00121 // METHODS -------------------------------------------------------------- 00122 00123 // I/O ----------------------------------------------------------------- 00124 00125 }; 00126 } 00127 00128 #endif