00001 /* 00002 * WOscLib, an object oriented OSC library. 00003 * Copyright (C) 2005 Uli Clemens Franke, Weiss Engineering LTD, Switzerland. 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00018 * 00019 * For details see lgpl.txt 00020 * 00021 * Weiss Engineering LTD. 00022 * Florastrass 42 00023 * 8610 Uster 00024 * Switzerland 00025 * 00026 * uli.franke@weiss.ch 00027 */ 00028 00029 /** WOscPatternMatch header file. 00030 * \file 00031 * 00032 * $Author: cls-nebadje $ ( \ref _UcfWOscLib ) 00033 * $Date: 2009-01-13 17:23:19 $ 00034 * $Revision: 1.4 $ 00035 * 00036 * Copyright (c) Weiss Engineering Ltd 00037 * 00038 */ 00039 #ifndef __WOSCPATTERNMATCH_H__ 00040 #define __WOSCPATTERNMATCH_H__ 00041 00042 #include "WOscLib.h" 00043 #include "WOscConfig.h" 00044 00045 /** Pattern matching algorithms. 00046 * All code stolen from Matt Wright's OSC-Kit. 00047 * Handles all tasks related to checking OSC-addresses against certain patterns. 00048 * 00049 * \see 00050 * For information about the OSC address syntax see the \ref WOscLibOsc_spec_page "OSC specifications". 00051 */ 00052 class WOSC_EXPORT WOscPatternMatch{ 00053 00054 public: 00055 static bool PatternMatch(const char * pattern, const char * test); 00056 static const char* NextSlashOrNull(const char *p); 00057 protected: 00058 static bool MatchBrackets (const char *pattern, const char *test); 00059 static bool MatchList (const char *pattern, const char *test); 00060 }; 00061 00062 #endif // #ifndef __WOSCPATTERNMATCH_H__