Back to index

salome-kernel  6.5.0
Static Public Member Functions
Copy2CorbaSpace< false, DataManipulator > Struct Template Reference

#include <Copy2CorbaSpace.hxx>

List of all members.

Static Public Member Functions

template<class T1 , class T2 >
static void apply (T1 *&corbaData, T2 const &data, size_t nRead)

Detailed Description

template<typename DataManipulator>
struct Copy2CorbaSpace< false, DataManipulator >

Definition at line 68 of file Copy2CorbaSpace.hxx.


Member Function Documentation

template<typename DataManipulator >
template<class T1 , class T2 >
static void Copy2CorbaSpace< false, DataManipulator >::apply ( T1 *&  corbaData,
T2 const &  data,
size_t  nRead 
) [inline, static]

Definition at line 72 of file Copy2CorbaSpace.hxx.

                                                                      {

    typedef typename ProvidesPortTraits<T2>::PortType  PortType;
    // typedef typename UsesPortTraits<T2>::PortType     PortType;
//ESSAI:    typedef typename PortType::DataManipulator        DataManipulator;
    typedef typename DataManipulator::InnerType       InnerType;

    corbaData = DataManipulator::create(nRead);
    InnerType * dataPtr  = DataManipulator::getPointer(corbaData,false);

#ifdef MYDEBUG
    std::cerr << "-------- Copy2CorbaSpace<false> MARK 1 --(dataPtr : " <<
      dataPtr<<")----------------" << std::endl;
#endif
    // Attention : Pour les chaines ou tout autre object complexe il faut utiliser une recopie profonde !   
    std::copy(&data,&data+nRead,dataPtr);
 
#ifdef MYDEBUG
    std::cerr << "-------- Copy2CorbaSpace<false> MARK 2 --(nRead: "<<nRead<<")-------------" << std::endl;
 
    std::cerr << "-------- Copy2CorbaSpace<false> MARK 3 : " ;
    std::copy(dataPtr,dataPtr+nRead,std::ostream_iterator<InnerType>(std::cout," "));
    std::cout << std::endl;
    std::cerr << "-------- Copy2CorbaSpace<false> MARK 4 --(data : " <<data<<") :" ;
    for (int i=0; i<nRead; ++i)
      std::cerr << (*corbaData)[i] << " ";
    std::cout << std::endl;
#endif
    
  }

The documentation for this struct was generated from the following file: