00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
#ifndef OMF_PRIMITIVE_HPP
00026 
#define OMF_PRIMITIVE_HPP
00027 
00028 
00029 
#include <string>
00030 
#include <iostream>
00031 
#include <sstream>
00032 
00033 
00034 
#include <boost/lexical_cast.hpp>
00035 
00036 
00037 
#include <OMF/Object.hpp>
00038 
00039 
namespace OMF
00040 {
00051   class Primitive : 
public Object
00052   {
00053   
protected:
00054     
Primitive(
const std::string &mc);
00055     
Primitive(
const std::string &mc, 
const Primitive &value);
00056     
Primitive(
const std::string &mc, 
const std::string &value);
00057 
00058   
public:
00059     
virtual ~Primitive();
00060 
00061     
const Primitive &
operator =(
const Primitive &value);
00062     
const Primitive &
operator =(
const std::string &value);
00063 
00064     
operator const std::string &() 
const;
00065     
operator const char *() 
const;
00066 
00067     
bool empty() 
const;
00068 
00069     
void clear();
00070 
00074     
const std::string &
str() 
const;
00075 
00087     
virtual unsigned hashCode() 
const;
00088 
00089   
protected:
00090     bool    _empty; 
00091     std::string   
_value; 
00092   };
00093 };
00094 
00095 
#endif