MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
StreamDriveCopyCast Class Reference

#include <streamdrive.h>

Inheritance diagram for StreamDriveCopyCast:
Collaboration diagram for StreamDriveCopyCast:

Public Member Functions

 StreamDriveCopyCast (size_t size, const std::vector< BufCast * > &data)
 
 ~StreamDriveCopyCast (void)
 
size_t GetSize (void) const
 
void Modify (doublereal *out, const void *in) const
 
- Public Member Functions inherited from StreamDrive::Modifier
 Modifier (void)
 
virtual ~Modifier (void)
 

Protected Attributes

size_t m_size
 
std::vector< BufCast * > m_data
 

Detailed Description

Definition at line 113 of file streamdrive.h.

Constructor & Destructor Documentation

StreamDriveCopyCast::StreamDriveCopyCast ( size_t  size,
const std::vector< BufCast * > &  data 
)

Definition at line 136 of file streamdrive.cc.

References ASSERT, and m_data.

137 : m_size(size), m_data(data)
138 {
139 #ifdef DEBUG
140  size_t minsize = m_data[m_data.size() - 1]->offset() + m_data[m_data.size() - 1]->size();
141  ASSERT(size >= minsize);
142 #endif
143 }
std::vector< BufCast * > m_data
Definition: streamdrive.h:117
#define ASSERT(expression)
Definition: colamd.c:977
StreamDriveCopyCast::~StreamDriveCopyCast ( void  )

Definition at line 145 of file streamdrive.cc.

References m_data.

146 {
147  for (std::vector<BufCast *>::iterator i = m_data.begin(); i != m_data.end(); ++i) {
148  delete *i;
149  }
150 }
std::vector< BufCast * > m_data
Definition: streamdrive.h:117

Member Function Documentation

size_t StreamDriveCopyCast::GetSize ( void  ) const
virtual

Implements StreamDrive::Modifier.

Definition at line 153 of file streamdrive.cc.

References m_size.

154 {
155  return m_size;
156 }
void StreamDriveCopyCast::Modify ( doublereal out,
const void *  in 
) const
virtual

Implements StreamDrive::Modifier.

Definition at line 159 of file streamdrive.cc.

References m_data.

160 {
161  for (size_t i = 0; i != m_data.size(); ++i) {
162  out[i] = m_data[i]->cast(in);
163  }
164 }
std::vector< BufCast * > m_data
Definition: streamdrive.h:117

Member Data Documentation

std::vector<BufCast *> StreamDriveCopyCast::m_data
protected

Definition at line 117 of file streamdrive.h.

Referenced by Modify(), StreamDriveCopyCast(), and ~StreamDriveCopyCast().

size_t StreamDriveCopyCast::m_size
protected

Definition at line 116 of file streamdrive.h.

Referenced by GetSize().


The documentation for this class was generated from the following files: