X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvalue.h;h=c5cd89b2f17b4dbd4b21525ee07ae7c32ce3d711;hb=7c70b39267a02a92da8293b4ff5759b3f4f738d9;hp=6c9ab9cb620877268396c0a898c68fe594ad8409;hpb=e3acc0b267b14fda5db3c7bbb2f218b993ef84b3;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/value.h b/synfig-core/trunk/src/synfig/value.h index 6c9ab9c..c5cd89b 100644 --- a/synfig-core/trunk/src/synfig/value.h +++ b/synfig-core/trunk/src/synfig/value.h @@ -1,28 +1,29 @@ -/* === S I N F G =========================================================== */ +/* === S Y N F I G ========================================================= */ /*! \file value.h ** \brief Template Header ** ** $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 */ /* ========================================================================= */ /* === S T A R T =========================================================== */ -#ifndef __SINFG_VALUE_H -#define __SINFG_VALUE_H +#ifndef __SYNFIG_VALUE_H +#define __SYNFIG_VALUE_H /* === H E A D E R S ======================================================= */ @@ -40,7 +41,7 @@ #include "blinepoint.h" #include "exception.h" -#ifndef SINFG_NO_ANGLE +#ifndef SYNFIG_NO_ANGLE #include "angle.h" #endif @@ -52,7 +53,7 @@ /* === C L A S S E S & S T R U C T S ======================================= */ -namespace sinfg { +namespace synfig { class Canvas; class Vector; @@ -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 ----------------------------------------------------------- */ @@ -337,11 +325,26 @@ public: operator half()const { return get(Real()); } #endif -#ifndef SINFG_NO_ANGLE +#ifndef SYNFIG_NO_ANGLE operator const Angle&()const { return get(Angle()); } 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: @@ -447,7 +450,7 @@ public: }; // END of class Value */ -}; // END of namespace sinfg +}; // END of namespace synfig /* === E N D =============================================================== */