/builddir/build/BUILD/raul-0.4.0/raul/LashProject.hpp

00001 /* This file is part of Raul.
00002  * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
00003  * 
00004  * Raul is free software; you can redistribute it and/or modify it under the
00005  * terms of the GNU General Public License as published by the Free Software
00006  * Foundation; either version 2 of the License, or (at your option) any later
00007  * version.
00008  * 
00009  * Raul is distributed in the hope that it will be useful, but WITHOUT ANY
00010  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00011  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for details.
00012  * 
00013  * You should have received a copy of the GNU General Public License along
00014  * with this program; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00016  */
00017 
00018 #ifndef RAUL_LASH_PROJECT_HPP
00019 #define RAUL_LASH_PROJECT_HPP
00020 
00021 #include <string>
00022 #include <sigc++/sigc++.h>
00023 #include <raul/SharedPtr.hpp>
00024 #include <raul/WeakPtr.hpp>
00025 #include <raul/LashClient.hpp>
00026 
00027 namespace Raul {
00028 
00029 
00030 class LashProject : public sigc::trackable {
00031 public:
00032     LashProject(SharedPtr<LashClient> client, const std::string& name);
00033 
00034     void save();
00035     void close();
00036 
00037     const std::string& name()      { return _name; }
00038     const std::string& directory() { return _directory; }
00039 
00040     void set_directory(const std::string& filename);
00041     void set_name(const std::string& name);
00042     
00043     sigc::signal<void, const std::string&> signal_name;
00044     sigc::signal<void, const std::string&> signal_directory;
00045     sigc::signal<void, const std::string&> signal_save_file;
00046     sigc::signal<void, const std::string&> signal_restore_file;
00047 
00048     bool operator==(const std::string& name) { return _name == name; }
00049 
00050 private:
00051     WeakPtr<LashClient> _client;
00052     std::string         _name;
00053     std::string         _directory;
00054 };
00055 
00056 
00057 } // namespace Raul
00058 
00059 #endif // RAUL_LASH_PROJECT_HPP
00060 

Generated on Wed Apr 9 08:14:41 2008 for RAUL by  doxygen 1.5.1