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

#include <drive_.h>

Inheritance diagram for PostponedDriveCaller:
Collaboration diagram for PostponedDriveCaller:

Public Member Functions

 PostponedDriveCaller (MBDynParser &HP, unsigned uLabel)
 
virtual ~PostponedDriveCaller (void)
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual DriveCallerpCopy (void) const
 
doublereal dGet (void) const
 
doublereal dGet (const doublereal &dVar) const
 
virtual bool bIsDifferentiable (void) const
 
virtual doublereal dGetP (const doublereal &dVar) const
 
- Public Member Functions inherited from DriveCaller
 DriveCaller (const DriveHandler *pDH)
 
virtual ~DriveCaller (void)
 
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)
 

Protected Member Functions

void Check (void) const
 

Protected Attributes

MBDynParserHP
 
unsigned uDriveLabel
 
DriveOwner DO
 
- Protected Attributes inherited from DriveCaller
DriveHandlerpDrvHdl
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 

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 }
 

Detailed Description

Definition at line 1647 of file drive_.h.

Constructor & Destructor Documentation

PostponedDriveCaller::PostponedDriveCaller ( MBDynParser HP,
unsigned  uLabel 
)

Definition at line 1223 of file drive_.cc.

References NO_OP.

Referenced by pCopy().

1224 : DriveCaller(0),
1225 HP(HP), uDriveLabel(uLabel), DO(0)
1226 {
1227  NO_OP;
1228 }
#define NO_OP
Definition: myassert.h:74
DriveCaller(const DriveHandler *pDH)
Definition: drive.cc:475
DriveOwner DO
Definition: drive_.h:1651
unsigned int uLabel
Definition: withlab.h:44
unsigned uDriveLabel
Definition: drive_.h:1650
MBDynParser & HP
Definition: drive_.h:1649
PostponedDriveCaller::~PostponedDriveCaller ( void  )
virtual

Definition at line 1230 of file drive_.cc.

References NO_OP.

1231 {
1232  NO_OP;
1233 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

bool PostponedDriveCaller::bIsDifferentiable ( void  ) const
inlinevirtual

Reimplemented from DriveCaller.

Definition at line 1688 of file drive_.h.

References DriveOwner::bIsDifferentiable(), Check(), and DO.

1689 {
1690  Check();
1691  return DO.bIsDifferentiable();
1692 }
bool bIsDifferentiable(void) const
Definition: drive.cc:677
DriveOwner DO
Definition: drive_.h:1651
void Check(void) const
Definition: drive_.cc:1210

Here is the call graph for this function:

void PostponedDriveCaller::Check ( void  ) const
protected

Definition at line 1210 of file drive_.cc.

References DO, MBDynParser::GetDrive(), HP, MBDYN_EXCEPT_ARGS, DriveCaller::pCopy(), DriveOwner::pGetDriveCaller(), DriveCaller::pGetDrvHdl(), DriveOwner::Set(), DriveCaller::SetDrvHdl(), and uDriveLabel.

Referenced by bIsDifferentiable(), dGet(), dGetP(), and Restart().

1211 {
1212  if (!DO.pGetDriveCaller()) {
1213  const DriveCaller *pDC = HP.GetDrive(uDriveLabel);
1214  if (pDC == 0) {
1215  silent_cerr("PostponedDriveCaller: unable to resolve postponed drive caller \"" << uDriveLabel << "\"" << std::endl);
1217  }
1218  DO.Set(pDC->pCopy());
1219  const_cast<PostponedDriveCaller *>(this)->SetDrvHdl(DO.pGetDriveCaller()->pGetDrvHdl());
1220  }
1221 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
const DriveCaller * GetDrive(unsigned uLabel) const
Definition: mbpar.cc:2022
virtual const DriveHandler * pGetDrvHdl(void) const
Definition: drive.cc:493
virtual void SetDrvHdl(const DriveHandler *pDH)
Definition: drive.cc:487
DriveOwner DO
Definition: drive_.h:1651
DriveCaller * pGetDriveCaller(void) const
Definition: drive.cc:658
virtual DriveCaller * pCopy(void) const =0
unsigned uDriveLabel
Definition: drive_.h:1650
MBDynParser & HP
Definition: drive_.h:1649
void Set(const DriveCaller *pDC)
Definition: drive.cc:647

Here is the call graph for this function:

doublereal PostponedDriveCaller::dGet ( void  ) const
inlinevirtual

Reimplemented from DriveCaller.

Definition at line 1674 of file drive_.h.

References Check(), DriveOwner::dGet(), and DO.

1675 {
1676  Check();
1677  return DO.dGet();
1678 }
DriveOwner DO
Definition: drive_.h:1651
void Check(void) const
Definition: drive_.cc:1210
doublereal dGet(const doublereal &dVar) const
Definition: drive.cc:664

Here is the call graph for this function:

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

Implements DriveCaller.

Definition at line 1681 of file drive_.h.

References Check(), DriveOwner::dGet(), and DO.

1682 {
1683  Check();
1684  return DO.dGet(dVar);
1685 }
DriveOwner DO
Definition: drive_.h:1651
void Check(void) const
Definition: drive_.cc:1210
doublereal dGet(const doublereal &dVar) const
Definition: drive.cc:664

Here is the call graph for this function:

doublereal PostponedDriveCaller::dGetP ( const doublereal dVar) const
inlinevirtual

Reimplemented from DriveCaller.

Definition at line 1695 of file drive_.h.

References Check(), DriveOwner::dGetP(), and DO.

1696 {
1697  Check();
1698  return DO.dGetP(dVar);
1699 }
doublereal dGetP(const doublereal &dVar) const
Definition: drive.cc:683
DriveOwner DO
Definition: drive_.h:1651
void Check(void) const
Definition: drive_.cc:1210

Here is the call graph for this function:

DriveCaller * PostponedDriveCaller::pCopy ( void  ) const
virtual

Implements DriveCaller.

Definition at line 1249 of file drive_.cc.

References HP, PostponedDriveCaller(), SAFENEWWITHCONSTRUCTOR, and uDriveLabel.

1250 {
1251  DriveCaller *pDC = 0;
1254  return pDC;
1255 }
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
unsigned uDriveLabel
Definition: drive_.h:1650
PostponedDriveCaller(MBDynParser &HP, unsigned uLabel)
Definition: drive_.cc:1223
MBDynParser & HP
Definition: drive_.h:1649

Here is the call graph for this function:

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

Implements DriveCaller.

Definition at line 1237 of file drive_.cc.

References Check(), DO, DriveOwner::pGetDriveCaller(), DriveCaller::Restart(), and uDriveLabel.

1238 {
1239  Check();
1240 
1241  out << ", deferred, " << uDriveLabel << " /* actual drive: ",
1242  DO.pGetDriveCaller()->Restart(out) << " */";
1243 
1244  return out;
1245 }
virtual std::ostream & Restart(std::ostream &out) const =0
DriveOwner DO
Definition: drive_.h:1651
void Check(void) const
Definition: drive_.cc:1210
DriveCaller * pGetDriveCaller(void) const
Definition: drive.cc:658
unsigned uDriveLabel
Definition: drive_.h:1650

Here is the call graph for this function:

Member Data Documentation

DriveOwner PostponedDriveCaller::DO
mutableprotected

Definition at line 1651 of file drive_.h.

Referenced by bIsDifferentiable(), Check(), dGet(), dGetP(), and Restart().

MBDynParser& PostponedDriveCaller::HP
protected

Definition at line 1649 of file drive_.h.

Referenced by Check(), and pCopy().

unsigned PostponedDriveCaller::uDriveLabel
protected

Definition at line 1650 of file drive_.h.

Referenced by Check(), pCopy(), and Restart().


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