1 // $Id: front_end_warnings.cpp,v 1.3 2011/03/08 19:22:01 bobgian Exp $ 2 3 /* 4 Copyright 2002 Mary Kuhner, Jon Yamato, and Joseph Felsenstein 5 6 This software is distributed free of charge for non-commercial use 7 and is copyrighted. Of course, we do not guarantee that the software 8 works, and are not responsible for any damage you may cause or have. 9 */ 10 11 #include "front_end_warnings.h" 12 #include "vectorx.h" 13 FrontEndWarnings()14FrontEndWarnings::FrontEndWarnings() 15 { 16 } 17 ~FrontEndWarnings()18FrontEndWarnings::~FrontEndWarnings() 19 { 20 } 21 22 StringVec1d GetAndClearWarnings()23FrontEndWarnings::GetAndClearWarnings() 24 { 25 StringVec1d warnings = m_warnings; 26 m_warnings.clear(); 27 return warnings; 28 } 29 30 void AddWarning(std::string warnmsg)31FrontEndWarnings::AddWarning(std::string warnmsg) 32 { 33 for (unsigned long wnum=0; wnum<m_warnings.size(); wnum++) 34 { 35 if (m_warnings[wnum]==warnmsg) return; 36 } 37 m_warnings.push_back(warnmsg); 38 } 39 40 //____________________________________________________________________________________ 41