00001 /* 00002 * This file is part of Micole Architecture 00003 * 00004 * Copyright (C) 2007 Micole partners 00005 * 00006 * Micole Architecture is free software: you can redistribute it 00007 * and/or modify it under the terms of the GNU Lesser General 00008 * Public License as published by the Free Software Foundation, 00009 * either version 3 of the License, or (at your option) any 00010 * later version. 00011 * 00012 * Micole Architecture is distributed in the hope that it will be 00013 * useful, * but WITHOUT ANY WARRANTY; without even the implied 00014 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00015 * PURPOSE. See the GNU Lesser General Public License for more 00016 * details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with Micole Architecture. If not, see 00020 * <http://www.gnu.org/licenses/>. 00021 */ 00022 00023 #ifndef BINDING_H 00024 #define BINDING_H 00025 #include "micolelib.h" 00026 00027 #include <string> 00028 using namespace std; 00029 #include "MicoleBus.h" 00030 00031 00042 class MICOLELIB_API MicoleBinding 00043 { 00044 public: 00048 MicoleBinding(const char *regexp, MicoleBus *bus, MicoleCallback *); 00052 MicoleBinding(const MicoleBinding &b); 00053 00057 ~MicoleBinding(); 00058 00064 void setRegexp(const char * pRegexp); 00065 00070 const char * getRegexp() { return _regexp; } 00071 00075 void unbindMsg(); 00076 00077 private: 00081 MicoleBinding(); 00082 00083 char * _regexp; 00084 MicoleCallback * _cb; 00085 MicoleBus * _bus; 00086 }; 00087 00088 #endif