Hostname.h

Go to the documentation of this file.
00001 /* ex: set tabstop=4 expandtab: */
00002 /*                                                                                                                      */
00003 /*  (c) 2004-2006 Iowa State University                                         */
00004 /*      see the LICENSE file in the top level directory         */
00005 /*                                                                                                                      */
00006 /* $Header: /afs/scl/project/cvsroot/fountain/source/common/Hostname.h,v 1.12 2006/02/19 21:59:38 samm Exp $ */
00010 
00011 #ifndef HOSTNAME_H__
00012 #define HOSTNAME_H__
00013 
00014 #include "define.h"
00015 #include "FountainErrors.h"
00016 #include <string>
00017 #include <sstream>
00018 
00024 class Hostname {
00025         private:
00027                 std::string hostname_; 
00028         
00030                 int statusValue_;
00031                 
00032         public: 
00035                 Hostname();
00036                 
00039                 Hostname(std::string name);
00040                 
00042                 Hostname(const Hostname& rhs);
00043                 
00045                 Hostname& operator=(const Hostname& rhs);
00046         
00049                 const std::string& getName() const { return hostname_; } 
00050                 
00053                 int status() const { return statusValue_; } 
00054                 
00056         friend std::ostream& operator<<(std::ostream& output, const Hostname& rhs);
00057 
00058         private:
00059                 void truncate();
00060 }; 
00061 
00062 #endif

Generated on Wed Mar 8 14:43:31 2006 for Fountain by  doxygen 1.4.6