#include "Manager.hh"#include "FormString.hh"#include <iostream>#include <fstream>#include <cassert>#include <sys/types.h>#include <sys/stat.h>#include <unistd.h>Include dependency graph for Manager.cc:
Go to the source code of this file.
Functions | |
| ClassImp (Manager) Logging | |
| bool | PatternMatches (const std::string &pattern, const std::string &target) |
| ClassImp | ( | Manager | ) |
Definition at line 13 of file Manager.cc.
00016 { 00017 // At first creation, start up a default stream with a default rule that everything goes there. 00018 AttachStream("*","stdout"); 00019 }
| bool PatternMatches | ( | const std::string & | pattern, | |
| const std::string & | target | |||
| ) |
Definition at line 127 of file Manager.cc.
00128 { 00129 // Poor man's pattern matcher. 00130 // Match thing to thing 00131 if(pattern==target) return true; 00132 // Match blah* to blahanything 00133 std::string::size_type starpos = pattern.find_first_of('*',0); 00134 if(starpos != std::string::npos) { 00135 // There was a wildcard. See if the substring before matches. 00136 if(pattern.compare(0,starpos, target,0,starpos) ==0) return true; 00137 } 00138 return false; 00139 }
1.4.7