-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
#ifndef MSP_GL_TAG_H_
#define MSP_GL_TAG_H_
namespace Msp {
namespace GL {
+/**
+Provides transparent string-to-hash conversion for faster comparison. An empty
+string is guaranteed to have an id of 0.
+*/
struct Tag
{
unsigned id;
Tag(): id(0) { }
Tag(const char *);
Tag(const std::string &s);
+
+ bool operator<(const Tag &t) const { return id<t.id; }
+ bool operator==(const Tag &t) const { return id==t.id; }
};
} // namespace GL