/* Clave para agregar a un arbol B */
#include "common.h"
+#include <string>
class Clave {
public:
virtual uint Size () const = 0;
virtual uchar *ToArray () const = 0;
virtual Clave *Clone () const = 0;
+
+ virtual bool operator < (const Clave &k) const = 0;
+ virtual operator std::string () const = 0;
};
#endif
#define _CLAVE_FIJA_H_
#include "clave.h"
+#include <string>
+#include <sstream>
class ClaveFija : public Clave {
public :
uchar *ToArray () const;
Clave *Clone () const;
+ virtual bool operator < (const Clave &c) const;
+ virtual operator std::string () const {
+ std::string out;
+ std::stringstream ss;
+ ss << data;
+ ss >> out;
+ return out;
+ }
private:
int data;
};