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

#include <bufferstreamdrive.h>

Inheritance diagram for BufferStreamDrive:
Collaboration diagram for BufferStreamDrive:

Public Member Functions

 BufferStreamDrive (unsigned int uL, const DriveHandler *pDH, integer nd, const std::vector< doublereal > &v0, StreamDrive::Modifier *pMod, unsigned int ie, StreamDriveEcho *pSDE)
 
virtual ~BufferStreamDrive (void)
 
const doublerealGetBufRaw (void)
 
std::vector< doublereal > & GetBuf (void)
 
virtual std::ostream & Restart (std::ostream &out) const
 
- Public Member Functions inherited from BufferStreamDrive_base
 BufferStreamDrive_base (unsigned int uL, const DriveHandler *pDH, integer nd, const std::vector< doublereal > &v0, StreamDrive::Modifier *pMod, unsigned int ie, StreamDriveEcho *pSDE)
 
virtual ~BufferStreamDrive_base (void)
 
const integer GetBufSize (void) const
 
virtual void ServePending (const doublereal &t)
 
- Public Member Functions inherited from StreamDrive
 StreamDrive (unsigned int uL, const DriveHandler *pDH, const std::string &sFileName, integer nd, const std::vector< doublereal > &v0, bool c, StreamDrive::Modifier *pmod)
 
virtual ~StreamDrive (void)
 
void SetModifier (const Modifier *p)
 
const StreamDrive::ModifierpGetModifier (void) const
 
- Public Member Functions inherited from FileDrive
 FileDrive (unsigned int uL, const DriveHandler *pDH, const std::string &s, integer nd, const std::vector< doublereal > &v0)
 
virtual ~FileDrive (void)
 
virtual Drive::Type GetDriveType (void) const
 
virtual integer iGetNumDrives (void) const
 
virtual doublereal dGet (const doublereal &t, int i=1) const
 
- Public Member Functions inherited from Drive
 Drive (unsigned int uL, const DriveHandler *pDH)
 
virtual ~Drive (void)
 
- Public Member Functions inherited from WithLabel
 WithLabel (unsigned int uL=0, const std::string &sN="")
 
virtual ~WithLabel (void)
 
void PutLabel (unsigned int uL)
 
void PutName (const std::string &sN)
 
unsigned int GetLabel (void) const
 
const std::string & GetName (void) const
 

Protected Attributes

std::vector< doublerealbuffer
 
- Protected Attributes inherited from BufferStreamDrive_base
unsigned int InputEvery
 
unsigned int InputCounter
 
StreamDriveEchopSDE
 
- Protected Attributes inherited from StreamDrive
int size
 
std::vector< char > buf
 
bool create
 
const ModifierpMod
 
- Protected Attributes inherited from FileDrive
std::string sFileName
 
integer iNumDrives
 
doublerealpdVal
 
- Protected Attributes inherited from Drive
const DriveHandlerpDrvHdl
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 

Additional Inherited Members

- Public Types inherited from Drive
enum  Type { UNKNOWN = -1, FILEDRIVE = 0, LASTDRIVETYPE }
 
enum  Bailout { BO_NONE = 0x0, BO_UPPER = 0x1, BO_LOWER = 0x2, BO_ANY = (BO_UPPER | BO_LOWER) }
 
- Static Protected Attributes inherited from Drive
static doublereal dReturnValue = 0.
 

Detailed Description

Definition at line 68 of file bufferstreamdrive.h.

Constructor & Destructor Documentation

BufferStreamDrive::BufferStreamDrive ( unsigned int  uL,
const DriveHandler pDH,
integer  nd,
const std::vector< doublereal > &  v0,
StreamDrive::Modifier pMod,
unsigned int  ie,
StreamDriveEcho pSDE 
)

Definition at line 103 of file bufferstreamdrive.cc.

References NO_OP.

109 : BufferStreamDrive_base(uL, pDH, nd, v0, pMod, ie, pSDE),
110 buffer(nd)
111 {
112  NO_OP;
113 }
#define NO_OP
Definition: myassert.h:74
std::vector< doublereal > buffer
static const std::vector< doublereal > v0
Definition: fixedstep.cc:45
BufferStreamDrive_base(unsigned int uL, const DriveHandler *pDH, integer nd, const std::vector< doublereal > &v0, StreamDrive::Modifier *pMod, unsigned int ie, StreamDriveEcho *pSDE)
BufferStreamDrive::~BufferStreamDrive ( void  )
virtual

Definition at line 115 of file bufferstreamdrive.cc.

References NO_OP.

116 {
117  NO_OP;
118 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

std::vector< doublereal > & BufferStreamDrive::GetBuf ( void  )

Definition at line 130 of file bufferstreamdrive.cc.

References ASSERT, buffer, and FileDrive::iNumDrives.

Referenced by DataManager::GetBufIn().

131 {
132  // paranoid sanity check: callers of GetBuf() could have altered the size of the buffer...
133  ASSERT(buffer.size() == iNumDrives);
134 
135  return buffer;
136 }
std::vector< doublereal > buffer
integer iNumDrives
Definition: filedrv.h:47
#define ASSERT(expression)
Definition: colamd.c:977
const doublereal * BufferStreamDrive::GetBufRaw ( void  )
virtual

Implements BufferStreamDrive_base.

Definition at line 121 of file bufferstreamdrive.cc.

References ASSERT, buffer, and FileDrive::iNumDrives.

122 {
123  // paranoid sanity check: callers of GetBuf() could have altered the size of the buffer...
124  ASSERT(buffer.size() == iNumDrives);
125 
126  return &buffer[0];
127 }
std::vector< doublereal > buffer
integer iNumDrives
Definition: filedrv.h:47
#define ASSERT(expression)
Definition: colamd.c:977
std::ostream & BufferStreamDrive::Restart ( std::ostream &  out) const
virtual

Implements FileDrive.

Definition at line 140 of file bufferstreamdrive.cc.

References FileDrive::iNumDrives, and WithLabel::uLabel.

141 {
142  // input every, echo, ...
143  out << " file: " << uLabel << ", buffer stream, type, stl, " << iNumDrives << ";" << std::endl;
144  return out;
145 }
integer iNumDrives
Definition: filedrv.h:47
unsigned int uLabel
Definition: withlab.h:44

Member Data Documentation

std::vector<doublereal> BufferStreamDrive::buffer
protected

Definition at line 70 of file bufferstreamdrive.h.

Referenced by GetBuf(), and GetBufRaw().


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