MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
ElementDCR Struct Reference
Inheritance diagram for ElementDCR:
Collaboration diagram for ElementDCR:

Public Member Functions

DriveCallerRead (const DataManager *pDM, MBDynParser &HP, bool bDeferred)
 
- Public Member Functions inherited from DriveCallerRead
virtual ~DriveCallerRead (void)
 

Additional Inherited Members

- Static Public Member Functions inherited from DriveCallerRead
static void ReadOutput (DriveCaller *pDC, const DataManager *pDM, MBDynParser &HP)
 
- Protected Member Functions inherited from SimulationEntityDCR
DriveCallerRead (const DataManager *pDM, MBDynParser &HP, const SimulationEntity *pSE, const std::string &msg)
 
- Protected Member Functions inherited from DriveCallerRead
void NeedDM (const DataManager *pDM, MBDynParser &HP, bool bDeferred, const char *const name)
 

Detailed Description

Definition at line 2660 of file drive_.cc.

Member Function Documentation

DriveCaller * ElementDCR::Read ( const DataManager pDM,
MBDynParser HP,
bool  bDeferred 
)
virtual

Implements DriveCallerRead.

Definition at line 2666 of file drive_.cc.

References HighParser::GetInt(), IncludeParser::GetLineData(), HighParser::GetString(), HighParser::IsKeyWord(), MBDYN_EXCEPT_ARGS, DriveCallerRead::NeedDM(), DataManager::pFindElem(), psElemNames, psReadElemsElems, and SimulationEntityDCR::Read().

2667 {
2668  NeedDM(pDM, HP, bDeferred, "element");
2669 
2670  /* driver legato ai dati privati di un elemento */
2671  if (pDM == 0) {
2672  silent_cerr("since the driver is not owned by a DataManager" << std::endl
2673  << "no element dependent drivers are allowed;" << std::endl
2674  << "aborting..." << std::endl);
2676  }
2677 
2678  unsigned uLabel = HP.GetInt();
2679  KeyTable Kel(HP, psReadElemsElems);
2680  int k = HP.IsKeyWord();
2681  if (k == -1) {
2682  const char *s = HP.GetString();
2683  silent_cerr("unknown element type \"" << s
2684  << "\" at line " << HP.GetLineData()
2685  << std::endl);
2687  }
2688 
2689  /* Type(Label) */
2690  std::ostringstream os;
2691  os << psElemNames[Elem::Type(k)] << "(" << uLabel << ")";
2692 
2693  const Elem *pElem = pDM->pFindElem(Elem::Type(k), uLabel);
2694  if (pElem == 0) {
2695  silent_cerr("unable to find " << os.str() << " at line "
2696  << HP.GetLineData() << std::endl);
2698  }
2699 
2700  return SimulationEntityDCR::Read(pDM, HP, pElem, os.str());
2701 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
virtual integer GetInt(integer iDefval=0)
Definition: parser.cc:1050
Elem * pFindElem(Elem::Type Typ, unsigned int uElem, unsigned int iDeriv) const
Definition: elman.cc:650
virtual bool IsKeyWord(const char *sKeyWord)
Definition: parser.cc:910
DriveCaller * Read(const DataManager *pDM, MBDynParser &HP, const SimulationEntity *pSE, const std::string &msg)
Definition: drive_.cc:2594
virtual std::string GetString(const std::string &sDefVal)
Definition: parser.cc:1074
Definition: elem.h:75
Type
Definition: elem.h:91
const char * psElemNames[]
Definition: enums.cc:39
const char * psReadElemsElems[]
Definition: enums.cc:79
void NeedDM(const DataManager *pDM, MBDynParser &HP, bool bDeferred, const char *const name)
Definition: drive_.cc:1354
virtual HighParser::ErrOut GetLineData(void) const
Definition: parsinc.cc:697

Here is the call graph for this function:


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