Back to index

salome-kernel  6.5.0
Static Public Member Functions
Copy2CorbaSpace< zerocopy, 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<bool zerocopy, typename DataManipulator>
struct Copy2CorbaSpace< zerocopy, DataManipulator >

Definition at line 41 of file Copy2CorbaSpace.hxx.


Member Function Documentation

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

Definition at line 44 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;

#ifdef MYDEBUG
    std::cerr << "-------- Copy2CorbaSpace<true> MARK 1 ------------------" << std::endl;
#endif
    // Crée le type corba à partir du data sans lui en donner la propriété.
    // Le const_cast supprime le caractère const du type T2 const & de data car 
    // DataManipulator::create n'a pas le caractère const sur son paramètre data pour le
    // cas de figure où  la propriété de la donnée lui est donnée.
    corbaData = DataManipulator::create(nRead,const_cast<T2 * > (&data),false);
#ifdef MYDEBUG
    std::cerr << "-------- Copy2CorbaSpace<true> MARK 2 --(dataPtr : " 
              << DataManipulator::getPointer(corbaData,false)<<")----------------" << std::endl;
#endif

  }

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