LibMusicXML  3.18
smartlist.h
1 /*
2  MusicXML Library
3  Copyright (C) Grame 2006-2013
4 
5  This Source Code Form is subject to the terms of the Mozilla Public
6  License, v. 2.0. If a copy of the MPL was not distributed with this
7  file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9  Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
10  research@grame.fr
11 */
12 
13 #ifndef __smartlist__
14 #define __smartlist__
15 
16 #include <vector>
17 #include "smartpointer.h"
18 
19 namespace MusicXML2
20 {
21 
22 /*
23  smartlist are provided only to exchange container (vector, list,...) with clients
24  while avoiding the runtime library issue with windows visual c++
25 */
26 template <typename T, typename L=std::vector<T> >
27 class smartlist : public smartable, public L {
28  protected:
29  smartlist() {}
30  virtual ~smartlist() {}
31  public:
32  typedef SMARTP<smartlist<T> > ptr;
33  static ptr create() { smartlist<T> * o = new smartlist<T>; assert(o!=0); return o; }
34 };
35 
36 }
37 
38 #endif
the smart pointer implementation
Definition: smartpointer.h:58
the base class for smart pointers implementation
Definition: smartpointer.h:29
Definition: smartlist.h:27