casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
casacore::Copy_global_functions_copy Struct Reference

Copy methods. More...

#include <Copy.h>

Public Member Functions

template<class T >
void objmove (T *to, const T *from, size_t n)
 The general function to copy n objects from one place to another if overlap between to and from fields is possible. More...
 
template<class T >
void objmove (T *to, const T *from, size_t n, size_t toStride, size_t fromStride)
 
template<class T >
void objcopy (T *to, const T *from, size_t n)
 
 The non-general function to copy <tt>n</tt> objects from one place

to another. More...

 
template<class T >
void objcopy (T *to, const T *from, size_t n, size_t toStride, size_t fromStride)
 
template<class T >
void objcopyctor (T *to, const T *from, size_t n)
 
template<class T >
void objcopyctor (T *to, const T *from, size_t n, size_t toStride, size_t fromStride)
 
template<class T >
void objset (T *to, const T fillValue, size_t n)
 
Fill <tt>n</tt> elements of an array of objects with the given

value, optionally with a stride. More...

 
template<class T >
void objset (T *to, const T fillValue, size_t n, size_t toStride)
 

Detailed Description

Copy methods.

Definition at line 131 of file Copy.h.

Member Function Documentation

template<class T >
void casacore::Copy_global_functions_copy::objcopy ( T *  to,
const T *  from,
size_t  n 
)
inline

 The non-general function to copy <tt>n</tt> objects from one place

to another.

Strides may be specified, i.e. you may copy from every fromStride-th position into every toStride-th one.

Objcopy/objcopyctor does not take an overlap of source and destination into account. Objmove should be used if that is an issue.

Objcopyctor copy objects from from by calling copy constructor on each element in to.

An exception will be thrown if the source or the destination does not exist or if the strides are non-positive.

Thrown Exceptions

Definition at line 198 of file Copy.h.

References casacore::copy().

template<class T >
void casacore::Copy_global_functions_copy::objcopy ( T *  to,
const T *  from,
size_t  n,
size_t  toStride,
size_t  fromStride 
)
inline

Definition at line 200 of file Copy.h.

template<class T >
void casacore::Copy_global_functions_copy::objcopyctor ( T *  to,
const T *  from,
size_t  n 
)
inline

Definition at line 205 of file Copy.h.

template<class T >
void casacore::Copy_global_functions_copy::objcopyctor ( T *  to,
const T *  from,
size_t  n,
size_t  toStride,
size_t  fromStride 
)
inline

Definition at line 219 of file Copy.h.

template<class T >
void casacore::Copy_global_functions_copy::objmove ( T *  to,
const T *  from,
size_t  n 
)
inline

The general function to copy n objects from one place to another if overlap between to and from fields is possible.

Strides may be specified, i.e. you may copy from every fromStride-th position into every toStride-th one. The function will call std::copy() when possible. Objmove works correctly if the source and destination overlap in any way. An exception will be thrown if the source or the destination does not exist (and n is non-zero) or if the strides are non-positive.

Thrown Exceptions

Definition at line 145 of file Copy.h.

References casacore::copy().

template<class T >
void casacore::Copy_global_functions_copy::objmove ( T *  to,
const T *  from,
size_t  n,
size_t  toStride,
size_t  fromStride 
)
inline

Do the moves from the right.

Definition at line 149 of file Copy.h.

template<class T >
void casacore::Copy_global_functions_copy::objset ( T *  to,
const T  fillValue,
size_t  n 
)
inline

Fill <tt>n</tt> elements of an array of objects with the given

value, optionally with a stride.

Note that the fillValue is passed by value.

An exception will be thrown if the destination array does not exist or if the stride is non-positive.

Thrown Exceptions

Definition at line 252 of file Copy.h.

template<class T >
void casacore::Copy_global_functions_copy::objset ( T *  to,
const T  fillValue,
size_t  n,
size_t  toStride 
)
inline

Definition at line 255 of file Copy.h.


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