X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvalue.h;fp=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvalue.h;h=c5cd89b2f17b4dbd4b21525ee07ae7c32ce3d711;hb=e8a065f2385c219c511b57dac52786120bfa097d;hp=6370826f5240b849c371c92a7b8f6dbad6020621;hpb=d02b4a81e261e313ff3a8723b8579d48b113cbfb;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/value.h b/synfig-core/trunk/src/synfig/value.h index 6370826..c5cd89b 100644 --- a/synfig-core/trunk/src/synfig/value.h +++ b/synfig-core/trunk/src/synfig/value.h @@ -5,16 +5,17 @@ ** $Id: value.h,v 1.1.1.1 2005/01/04 01:23:15 darco Exp $ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. ** \endlegal */ /* ========================================================================= */ @@ -297,20 +298,6 @@ public: public: - template - operator std::list()const - { - assert(type==TYPE_LIST); - std::list ret(get_list().begin(),get_list().end()); - return ret; - } - template - operator std::vector()const - { - assert(type==TYPE_LIST); - std::vector ret(get_list().begin(),get_list().end()); - return ret; - } operator const list_type&()const { return get_list(); } //operator const Color&()const { return get(Color()); } //operator const Real&()const { return get(Real()); } @@ -323,6 +310,7 @@ public: //operator const char *()const { return get(String()).c_str(); } operator const Segment&()const { return get(Segment()); } + /* -- ** -- O T H E R ----------------------------------------------------------- */ @@ -342,6 +330,21 @@ public: static const Type get_type(const Angle&) { return TYPE_ANGLE; } #endif + template + operator std::list()const + { + assert(type==TYPE_LIST); + std::list ret(get_list().begin(),get_list().end()); + return ret; + } + template + operator std::vector()const + { + assert(type==TYPE_LIST); + std::vector ret(get_list().begin(),get_list().end()); + return ret; + } + private: