Changeset 16777 for trunk/FACT++


Ignore:
Timestamp:
06/08/13 12:55:39 (11 years ago)
Author:
tbretz
Message:
Added the long awaited customized template for vector<T>
File:
1 edited

Legend:

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

    r13896 r16777  
    55
    66#include <string>
     7#include <vector>
    78
    89#include "dic.hxx"
     
    6667    }
    6768
     69    template<typename T>
     70        inline bool SendCommand(const std::string &command, const std::vector<T> &v)
     71    {
     72        return DimClient::sendCommand(command.c_str(), const_cast<char*>(v.data()), v.size()*sizeof(T));
     73    }
     74
    6875    inline bool SendCommand(const std::string &command, const void *d, size_t s)
    6976    {
     
    8592    }
    8693
     94    template<typename T>
     95        inline void SendCommandNB(const std::string &command, const std::vector<T> &v)
     96    {
     97        DimClient::sendCommandNB(command.c_str(), const_cast<T*>(v.data()), v.size()*sizeof(T));
     98    }
     99
    87100    inline void SendCommandNB(const std::string &command, const void *d, size_t s)
    88101    {
Note: See TracChangeset for help on using the changeset viewer.