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

#include <shdrive.h>

Inheritance diagram for SHDriveCaller:
Collaboration diagram for SHDriveCaller:

Public Member Functions

 SHDriveCaller (const DriveHandler *pDH, const DriveCaller *pFunc, const DriveCaller *pTrigger, const doublereal dVal0)
 
 SHDriveCaller (const DriveHandler *pDH, integer iSHDriveNumber)
 
virtual ~SHDriveCaller (void)
 
virtual DriveCallerpCopy (void) const
 
virtual std::ostream & Restart (std::ostream &out) const
 
doublereal dGet (const doublereal &dVar) const
 
doublereal dGet (void) const
 
- Public Member Functions inherited from DriveCaller
 DriveCaller (const DriveHandler *pDH)
 
virtual ~DriveCaller (void)
 
virtual bool bIsDifferentiable (void) const
 
virtual doublereal dGetP (const doublereal &dVar) const
 
virtual doublereal dGetP (void) const
 
virtual void SetDrvHdl (const DriveHandler *pDH)
 
virtual const DriveHandlerpGetDrvHdl (void) const
 
virtual void Output (OutputHandler &OH) const
 
virtual void Trace (OutputHandler &OH) const
 
- 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
 
- Public Member Functions inherited from ToBeOutput
 ToBeOutput (flag fOut=fDefaultOut)
 
virtual ~ToBeOutput (void)
 
virtual void OutputPrepare (OutputHandler &OH)
 
virtual void Output (OutputHandler &OH, const VectorHandler &X, const VectorHandler &XP) const
 
virtual flag fToBeOutput (void) const
 
virtual bool bToBeOutput (void) const
 
virtual void SetOutputFlag (flag f=flag(1))
 
- Public Member Functions inherited from Traceable
 Traceable (flag fTrace=0)
 
virtual ~Traceable (void)
 
virtual flag fToBeTraced (void) const
 
virtual void SetTraceFlag (flag f=TRACE)
 

Private Attributes

integer iSHDriveNumber
 
doublereal dVal0
 

Additional Inherited Members

- Public Types inherited from DriveCaller
enum  OutputFlags { OUTPUT_VALUE = OUTPUT_PRIVATE << 0, OUTPUT_DERIVATIVE = OUTPUT_PRIVATE << 1 }
 
enum  TraceFlags { TRACE_VALUE = TRACE_PRIVATE << 0, TRACE_DERIVATIVE = TRACE_PRIVATE << 1 }
 
- Public Types inherited from ToBeOutput
enum  { OUTPUT = 0x1U, OUTPUT_MASK = 0xFU, OUTPUT_PRIVATE = 0x10U, OUTPUT_PRIVATE_MASK = ~OUTPUT_MASK }
 
- Public Types inherited from Traceable
enum  { TRACE = 0x01U, TRACE_PUBLIC_MASK = 0x0FU, TRACE_PRIVATE = 0x10U, TRACE_PRIVATE_MASK = ~TRACE_PUBLIC_MASK }
 
- Protected Attributes inherited from DriveCaller
DriveHandlerpDrvHdl
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 

Detailed Description

Definition at line 47 of file shdrive.h.

Constructor & Destructor Documentation

SHDriveCaller::SHDriveCaller ( const DriveHandler pDH,
const DriveCaller pFunc,
const DriveCaller pTrigger,
const doublereal  dVal0 
)

Definition at line 38 of file shdrive.cc.

References iSHDriveNumber, DriveHandler::iSHInit(), and DriveCaller::pDrvHdl.

Referenced by pCopy().

41 : DriveCaller(pDH), dVal0(dVal0)
42 {
43  iSHDriveNumber = pDrvHdl->iSHInit(pFunc, pTrigger, dVal0);
44 }
doublereal dVal0
Definition: shdrive.h:50
integer iSHDriveNumber
Definition: shdrive.h:49
integer iSHInit(const DriveCaller *pFunc, const DriveCaller *pTrigger, const doublereal dVal0)
Definition: drive.cc:310
DriveCaller(const DriveHandler *pDH)
Definition: drive.cc:475
DriveHandler * pDrvHdl
Definition: drive.h:444

Here is the call graph for this function:

SHDriveCaller::SHDriveCaller ( const DriveHandler pDH,
integer  iSHDriveNumber 
)

Definition at line 46 of file shdrive.cc.

References DriveHandler::dGetSHVal0(), dVal0, and DriveCaller::pDrvHdl.

49 {
51 }
doublereal dVal0
Definition: shdrive.h:50
integer iSHDriveNumber
Definition: shdrive.h:49
DriveCaller(const DriveHandler *pDH)
Definition: drive.cc:475
DriveHandler * pDrvHdl
Definition: drive.h:444
const doublereal dGetSHVal0(integer iNumber) const
Definition: drive.cc:336

Here is the call graph for this function:

SHDriveCaller::~SHDriveCaller ( void  )
virtual

Definition at line 53 of file shdrive.cc.

References NO_OP.

54 {
55  NO_OP;
56 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

doublereal SHDriveCaller::dGet ( const doublereal dVar) const
inlinevirtual

Implements DriveCaller.

Definition at line 75 of file shdrive.h.

References DriveHandler::dGetSH(), iSHDriveNumber, and DriveCaller::pDrvHdl.

76 {
77  return pDrvHdl->dGetSH(iSHDriveNumber);
78 }
integer iSHDriveNumber
Definition: shdrive.h:49
DriveHandler * pDrvHdl
Definition: drive.h:444
doublereal dGetSH(integer iNumber) const
Definition: drive.h:427

Here is the call graph for this function:

doublereal SHDriveCaller::dGet ( void  ) const
inlinevirtual

Reimplemented from DriveCaller.

Definition at line 69 of file shdrive.h.

References DriveHandler::dGetSH(), iSHDriveNumber, and DriveCaller::pDrvHdl.

70 {
71  return pDrvHdl->dGetSH(iSHDriveNumber);
72 }
integer iSHDriveNumber
Definition: shdrive.h:49
DriveHandler * pDrvHdl
Definition: drive.h:444
doublereal dGetSH(integer iNumber) const
Definition: drive.h:427

Here is the call graph for this function:

DriveCaller * SHDriveCaller::pCopy ( void  ) const
virtual

Implements DriveCaller.

Definition at line 60 of file shdrive.cc.

References iSHDriveNumber, DriveCaller::pDrvHdl, SAFENEWWITHCONSTRUCTOR, and SHDriveCaller().

61 {
62  DriveCaller* pDC = 0;
66  return pDC;
67 }
integer iSHDriveNumber
Definition: shdrive.h:49
SHDriveCaller(const DriveHandler *pDH, const DriveCaller *pFunc, const DriveCaller *pTrigger, const doublereal dVal0)
Definition: shdrive.cc:38
DriveHandler * pDrvHdl
Definition: drive.h:444
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698

Here is the call graph for this function:

std::ostream & SHDriveCaller::Restart ( std::ostream &  out) const
virtual

Implements DriveCaller.

Definition at line 71 of file shdrive.cc.

References dVal0, iSHDriveNumber, DriveCaller::pDrvHdl, DriveHandler::pGetSHFunc(), DriveHandler::pGetSHTrigger(), and DriveCaller::Restart().

72 {
73  out
74  << " sample and hold, ",
76  << ", ",
78  if (dVal0) {
79  out << ", initial value, " << dVal0;
80  }
81 
82  return out;
83 }
doublereal dVal0
Definition: shdrive.h:50
integer iSHDriveNumber
Definition: shdrive.h:49
const DriveCaller * pGetSHTrigger(integer iNumber) const
Definition: drive.cc:330
virtual std::ostream & Restart(std::ostream &out) const =0
const DriveCaller * pGetSHFunc(integer iNumber) const
Definition: drive.cc:324
DriveHandler * pDrvHdl
Definition: drive.h:444

Here is the call graph for this function:

Member Data Documentation

doublereal SHDriveCaller::dVal0
private

Definition at line 50 of file shdrive.h.

Referenced by Restart(), and SHDriveCaller().

integer SHDriveCaller::iSHDriveNumber
private

Definition at line 49 of file shdrive.h.

Referenced by dGet(), pCopy(), Restart(), and SHDriveCaller().


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