1 /*
2 
3   Copyright (C) 2011 Grame
4 
5   This library is free software; you can redistribute it and/or
6   modify it under the terms of the GNU Lesser General Public
7   License as published by the Free Software Foundation; either
8   version 2.1 of the License, or (at your option) any later version.
9 
10   This library is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13   Lesser General Public License for more details.
14 
15   You should have received a copy of the GNU Lesser General Public
16   License along with this library; if not, write to the Free Software
17   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18 
19   Grame Research Laboratory, 9 rue du Garet, 69001 Lyon - France
20   research@grame.fr
21 
22 */
23 
24 #ifndef __jsongroup__
25 #define __jsongroup__
26 
27 #include <ostream>
28 #include <string>
29 #include <vector>
30 
31 #include "jsonnode.h"
32 
33 namespace httpdfaust
34 {
35 
36 //--------------------------------------------------------------------------
37 /*!
38 	\brief a faust group is a terminal node and represents a faust parameter controler
39 */
40 class jsongroup : public jsonnode
41 {
42 	std::string fName;
43 	std::string fType;
44     TMetas fMeta;
45 	std::vector<Sjsonnode> fContent;
46 
47 	protected:
jsongroup(const char * name,const char * type,const TMetas & m)48 				 jsongroup(const char *name, const char* type, const TMetas& m)  : fName(name), fType(type), fMeta(m) {}
~jsongroup()49 		virtual ~jsongroup() {}
50 
51 	public:
create(const char * name,const char * type,const TMetas & m)52 	static Sjsonnode create(const char *name, const char* type, const TMetas& m) { return new jsongroup (name, type, m); }
53 
add(const Sjsonnode & node)54 		virtual void	add(const Sjsonnode& node)		{ fContent.push_back(node); }
55 		virtual void	print(std::ostream& out, jsonendl& eol) const;
56 };
57 
58 } // end namespoace
59 
60 #endif
61