Added copyright lines for files I've edited this year.
[synfig.git] / synfig-core / trunk / src / synfig / valuenode.h
index 4f91873..bf58504 100644 (file)
@@ -6,6 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     Copyright (c) 2008 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -30,6 +31,7 @@
 #include "vector.h"
 #include "value.h"
 #include "string.h"
+#include "releases.h"
 #include <ETL/handle>
 #include <ETL/stringf>
 #include "exception.h"
        if (get_type() != ValueBase::TYPE_NIL &&                                                        \
                !(ValueBase::same_type_as(value->get_type(), type)) &&                  \
                !PlaceholderValueNode::Handle::cast_dynamic(value)) {                   \
-               error("%s:%d wrong type for %s: need %s but got %s",                    \
+               error(_("%s:%d wrong type for %s: need %s but got %s"),                 \
                          __FILE__, __LINE__,                                                                           \
                          link_local_name(i).c_str(),                                                           \
-                         ValueBase::type_name(type).c_str(),                                           \
-                         ValueBase::type_name(value->get_type()).c_str());             \
+                         ValueBase::type_local_name(type).c_str(),                                     \
+                         ValueBase::type_local_name(value->get_type()).c_str());       \
                return false;                                                                                                   \
        }                                                                                                                                       \
        variable = value;                                                                                                       \
@@ -212,6 +214,9 @@ public:
        //! Returns the localized name of the ValueNode type
        virtual String get_local_name()const=0;
 
+       //! Return a full description of the ValueNode and its parentage
+       virtual String get_description(bool show_exported_name = true)const;
+
 
        //! \writeme
        virtual ValueNode* clone(const GUID& deriv_guid=GUID())const=0;
@@ -309,6 +314,7 @@ public:
                String local_name;
                Factory factory;
                CheckType check_type;
+               ReleaseVersion release_version; // which version of synfig introduced this valuenode type
        };
 
        typedef std::map<String,BookEntry> Book;
@@ -346,6 +352,9 @@ public:
        ValueNode::LooseHandle get_link(int i)const;
        ValueNode::LooseHandle get_link(const String &name)const { return get_link(get_link_index_from_name(name)); }
 
+       String
+       get_description(int index, bool show_exported_name = true)const;
+
 protected:
        //! Sets the type of the ValueNode
        void set_type(ValueBase::Type t) { ValueNode::set_type(t); }