//=========================================================================== // @(#) $Name: arts++-1-1-a12 $ // @(#) $Id: ArtsPackageVersion.hh,v 1.2 2004/04/21 23:51:28 kkeys Exp $ //=========================================================================== // Copyright Notice // // By accessing this software, arts++, you are duly informed // of and agree to be bound by the conditions described below in this // notice: // // This software product, arts++, is developed by Daniel W. McRobb, and // copyrighted(C) 1998 by the University of California, San Diego // (UCSD), with all rights reserved. UCSD administers the CAIDA grant, // NCR-9711092, under which part of this code was developed. // // There is no charge for arts++ software. You can redistribute it // and/or modify it under the terms of the GNU Lesser General Public // License, Version 2.1, February 1999, which is incorporated by // reference herein. // // arts++ is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS, OF // MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that the use // of it will not infringe on any third party's intellectual // property rights. // // You should have received a copy of the GNU Lesser General Public // License along with arts++. Copies can also be obtained from: // // http://www.gnu.org/copyleft/lesser.html // // or by writing to: // // Free Software Foundation, Inc. // 59 Temple Place, Suite 330 // Boston, MA 02111-1307 // USA // // Or contact: // // info@caida.org //=========================================================================== #ifndef _ARTSPACKAGEVERSION_HH_ #define _ARTSPACKAGEVERSION_HH_ #include //--------------------------------------------------------------------------- // class ArtsPackageVersion //--------------------------------------------------------------------------- //! Simple class for keeping CVS Name and Id tags so they can be //! retrieved from applications. The use of this class is trivial, and //! it's not a very smart (robust) class. To use it properly, you must //! pass a string of the form: //! //! "@(#) $Name: arts++-1-1-a12 $ $Id: ArtsPackageVersion.hh,v 1.2 2004/04/21 23:51:28 kkeys Exp $" //! //! in the constructor, and then you may access the value of the Name tag //! via the Name() member and the Id tag via the Id() member. //! //! In typical use, I keep a static const string named 'rcsid' in .cc //! files. If the .cc file is the main application, I instantiate an //! ArtsPackageVersion by passing rcsid in the ArtsPackageVersion //! constructor. //--------------------------------------------------------------------------- class ArtsPackageVersion { public: //------------------------------------------------------------------------- // ArtsPackageVersion(const std::string & nameAndId) //......................................................................... //! constructor. Takes a string of the form: //! //! "@(#) $Name: arts++-1-1-a12 $ $Id: ArtsPackageVersion.hh,v 1.2 2004/04/21 23:51:28 kkeys Exp $" //------------------------------------------------------------------------- ArtsPackageVersion(const std::string & nameAndId); //------------------------------------------------------------------------- // const std::string & Name() const //......................................................................... //! Returns the value of the Name tag. //------------------------------------------------------------------------- const std::string & Name() const; //------------------------------------------------------------------------- // const std::string & Id() const //......................................................................... //! Returns the value of the Id tag. //------------------------------------------------------------------------- const std::string & Id() const; private: std::string _name; std::string _id; }; #endif // _ARTSPACKAGEVERSION_HH_