Changeset 10632 for trunk


Ignore:
Timestamp:
05/09/11 20:15:04 (13 years ago)
Author:
tbretz
Message:
Replaced old with new constructors.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/DimDescriptionService.h

    r10570 r10632  
    2727public:
    2828    template<typename T>
    29         DimDescribedService(const char *name, T &val, const char *desc)
    30         : DimDescriptionService(name, desc), DimService(name, val)
     29    DimDescribedService(const std::string &name, const T &val, const char *desc)
     30        : DimDescriptionService(name.c_str(), desc), DimService(name.c_str(), const_cast<T&>(val))
    3131    {
    3232    }
    3333
    34     DimDescribedService(const char *name, const char *val, const char *desc)
    35         : DimDescriptionService(name, desc), DimService(name, const_cast<char*>(val)) { }
     34    template<typename T>
     35    DimDescribedService(const std::string &name, const char *format, const T &val, const char *desc)
     36        : DimDescriptionService(name.c_str(), desc), DimService(name.c_str(), format, const_cast<T*>(&val), sizeof(T))
     37    {
     38    }
    3639
    37     DimDescribedService(const char *name, const char *format, void *structure, int size, const char *desc)
    38         : DimDescriptionService(name, desc), DimService(name, format, structure, size)
     40    DimDescribedService(const std::string &name, const char *format, const char *desc)
     41       : DimDescriptionService(name.c_str(), desc), DimService(name.c_str(), format, (void*)NULL, 0)
    3942    {
    4043        // FIXME: compare number of ; with number of |
Note: See TracChangeset for help on using the changeset viewer.