#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 | |
| DEFINE_LOG (log_manager) Logging | |
| bool | PatternMatches (const std::string &pattern, const std::string &target) |
| DEFINE_LOG | ( | log_manager | ) |
Definition at line 15 of file Manager.cc.
00018 { 00019 // At first creation, start up a default stream with a default rule that everything goes there. 00020 AttachStream("*","stdout"); 00021 }
| bool PatternMatches | ( | const std::string & | pattern, | |
| const std::string & | target | |||
| ) |
Definition at line 141 of file Manager.cc.
00142 { 00143 // Poor man's pattern matcher. 00144 // Match thing to thing 00145 if(pattern==target) return true; 00146 // Match blah* to blahanything 00147 std::string::size_type starpos = pattern.find_first_of('*',0); 00148 if(starpos != std::string::npos) { 00149 // There was a wildcard. See if the substring before matches. 00150 if(pattern.compare(0,starpos, target,0,starpos) ==0) return true; 00151 } 00152 return false; 00153 }
1.4.7