summaryrefslogtreecommitdiff
path: root/project2/common/variableConvert.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'project2/common/variableConvert.cpp')
-rw-r--r--project2/common/variableConvert.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/project2/common/variableConvert.cpp b/project2/common/variableConvert.cpp
index fb90c95..0681ed0 100644
--- a/project2/common/variableConvert.cpp
+++ b/project2/common/variableConvert.cpp
@@ -70,30 +70,6 @@ class ConvertVisitorStdString : public boost::static_visitor<const std::string &
private:
const VariableType * var;
};
-// Convert to char * (with std::string storage)
-class ConvertVisitorCharStar : public boost::static_visitor<const char *> {
- public:
- ConvertVisitorCharStar(const VariableType * v) : var(v) {
- }
- const char * operator()(const Glib::ustring & r) const {
- return r.c_str();
- }
- const char * operator()(const boost::posix_time::time_duration & r) const {
- CONVERTF(const Glib::ustring, boost::posix_time::to_simple_string, c_str);
- }
- const char * operator()(const boost::posix_time::ptime & r) const {
- CONVERTF(const Glib::ustring, boost::posix_time::to_iso_extended_string, c_str);
- }
- const char * operator()(const Null &) const {
- return NULL;
- }
- template <typename T>
- const char * operator()(const T & r) const {
- CONVERTF(const Glib::ustring, boost::lexical_cast<Glib::ustring>, c_str);
- }
- private:
- const VariableType * var;
-};
// Convert to numeric type
template <typename DestType>
class ConvertVisitor : public boost::static_visitor<DestType> {
@@ -203,14 +179,6 @@ VariableType::operator const std::string &() const
{
return boost::apply_visitor(ConvertVisitorStdString(this), *this);
}
-VariableType::operator const char *() const
-{
- return boost::apply_visitor(ConvertVisitorCharStar(this), *this);
-}
-VariableType::operator const unsigned char *() const
-{
- return reinterpret_cast<const unsigned char *>(boost::apply_visitor(ConvertVisitorCharStar(this), *this));
-}
VariableType::operator int() const
{
return boost::apply_visitor(ConvertVisitor<int>(this), *this);