summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ff95fe2)
raw | patch | inline | side by side (parent: ff95fe2)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Wed, 6 Feb 2008 22:41:42 +0000 (22:41 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Wed, 6 Feb 2008 22:41:42 +0000 (22:41 +0000) |
src/util/enums.h | patch | blob | history |
diff --git a/src/util/enums.h b/src/util/enums.h
index 909765216c374bf2741d20b266ffbca5d9bc7c99..69514b202922f516bb930307c0c934f31085d485 100644 (file)
--- a/src/util/enums.h
+++ b/src/util/enums.h
/* IMPORTANT
* When initializing the EnumData struct, you cannot use _(...) to translate strings.
- * Instead, one must use N_(...) and do the translation every time the string is retreived.
+ * Instead, one must use N_(...) and do the translation every time the string is retreived.
+ *
+ * Note that get_id_from_key and get_id_from_label return 0 if it cannot find an entry for that key string
*/
return false;
}
+ bool is_valid_id(const E e) const
+ {
+ return ( (int)e < end );
+ }
+
const Glib::ustring& get_label(const E e) const
{
return _data[e].label;