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

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 2703 of file drive_.cc.

Member Function Documentation

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

Implements DriveCallerRead.

Definition at line 2709 of file drive_.cc.

References HighParser::GetInt(), IncludeParser::GetLineData(), HighParser::GetString(), HighParser::IsKeyWord(), MBDYN_EXCEPT_ARGS, DriveCallerRead::NeedDM(), DataManager::pFindNode(), psNodeNames, psReadNodesNodes, and SimulationEntityDCR::Read().

2710 {
2711  NeedDM(pDM, HP, bDeferred, "node");
2712 
2713  /* driver legato ai dati privati di un nodo */
2714  if (pDM == 0) {
2715  silent_cerr("since the driver is not owned by a DataManager" << std::endl
2716  << "no node dependent drivers are allowed;" << std::endl
2717  << "aborting..." << std::endl);
2719  }
2720 
2721  unsigned uLabel = HP.GetInt();
2722  KeyTable Kel(HP, psReadNodesNodes);
2723  int k = HP.IsKeyWord();
2724  if (k == -1) {
2725  const char *s = HP.GetString();
2726  silent_cerr("unknown node type \"" << s
2727  << "\" at line " << HP.GetLineData()
2728  << std::endl);
2730  }
2731 
2732  /* Type(Label) */
2733  std::ostringstream os;
2734  os << psNodeNames[Elem::Type(k)] << "(" << uLabel << ")";
2735 
2736  const Node *pNode = pDM->pFindNode(Node::Type(k), uLabel);
2737  if (pNode == 0) {
2738  silent_cerr("unable to find " << os.str() << " at line "
2739  << HP.GetLineData() << std::endl);
2741  }
2742 
2743  return SimulationEntityDCR::Read(pDM, HP, pNode, os.str());
2744 }
const char * psReadNodesNodes[]
Definition: enums.cc:398
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
Definition: node.h:67
virtual integer GetInt(integer iDefval=0)
Definition: parser.cc:1050
virtual bool IsKeyWord(const char *sKeyWord)
Definition: parser.cc:910
Type
Definition: node.h:71
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
const char * psNodeNames[]
Definition: enums.cc:372
Type
Definition: elem.h:91
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
Node * pFindNode(Node::Type Typ, unsigned int uNode) const
Definition: nodeman.cc:179

Here is the call graph for this function:


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