Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

NTIntFun.C

Go to the documentation of this file.
00001 
00014 #include "jbltools/sfh/NTIntFun.h"
00015 #include <iostream>
00016 
00017 static const char *ident="@(#)$Id: NTIntFun.C,v 1.4 2005/07/08 15:01:35 blist Exp $";
00018 
00019 NTIntFun::NTIntFun (const std::string& name_) 
00020 : IntFun (name_),
00021   iter (0), 
00022   offset (0)
00023 {        
00024 #if (DEBUG>0) 
00025   std::cout << "NTIntFun: created '" << getName() << "'\n";
00026 #endif
00027 }
00028 
00029 NTIntFun::NTIntFun (const std::string& name_, const IntFun *iter_) 
00030 : IntFun (name_ + (iter_ ? str('[')+iter_->getName()+']' : "")),
00031   iter (iter_), 
00032   offset (0)
00033 {        
00034 #if (DEBUG>0) 
00035   std::cout << "NTIntFun: created '" << getName() << "'\n";
00036 #endif
00037 }
00038 
00039 NTIntFun::NTIntFun (const std::string& name_, int offset_) 
00040 : IntFun (name_ + (offset_>=0 ? str('[')+str(offset_)+']' : "")),
00041   iter (0), 
00042   offset (offset_>=0 ? offset_ : 0)
00043 {        
00044 #if (DEBUG>0) 
00045   std::cout << "NTIntFun: created '" << getName() << "'\n";
00046 #endif
00047 }
00048                                
00049 std::string NTIntFun::getBaseName() const {
00050   std::string result = getName();
00051   // find first occurence of "[", and erase everything from there on
00052   std::string::size_type pos = result.find('[');
00053   if (pos != std::string::npos) result.erase(pos);
00054   return result;
00055 }

Generated on Thu Oct 26 12:52:58 2006 for SFH by doxygen 1.3.2