00001 /***************************************************************************** 00002 * var_string.hpp 00003 ***************************************************************************** 00004 * Copyright (C) 2010 the VideoLAN team 00005 * $Id: ef84af5e3bed9955753dcdda113dcdfa4ecc112f $ 00006 * 00007 * Author: Erwan Tulou <erwan10 aT videolan DoT org> 00008 * 00009 * This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License along 00020 * with this program; if not, write to the Free Software Foundation, Inc., 00021 * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 00022 *****************************************************************************/ 00023 00024 #ifndef VAR_STRING 00025 #define VAR_STRING 00026 00027 #include "variable.hpp" 00028 #include "observer.hpp" 00029 00030 class VarString; 00031 00032 00033 /// String variable 00034 class VarString: public Variable, public Subject<VarString> 00035 { 00036 public: 00037 VarString( intf_thread_t *pIntf ): Variable( pIntf ), m_value( string("tit") ) { } 00038 virtual ~VarString() { } 00039 00040 /// Get the variable type 00041 virtual const string &getType() const { return m_type; } 00042 00043 /// Set the internal value 00044 virtual void set( string str ); 00045 virtual string get() const { return m_value; } 00046 00047 private: 00048 /// Variable type 00049 static const string m_type; 00050 /// string value 00051 string m_value; 00052 }; 00053 00054 #endif
1.5.6