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

#include <streamoutelem.h>

Inheritance diagram for MotionContentTypeReader:
Collaboration diagram for MotionContentTypeReader:

Public Member Functions

virtual StreamContentRead (DataManager *pDM, MBDynParser &HP)
 
- Public Member Functions inherited from StreamOutputContentTypeReader
virtual ~StreamOutputContentTypeReader (void)
 

Detailed Description

Definition at line 226 of file streamoutelem.h.

Member Function Documentation

StreamContent * MotionContentTypeReader::Read ( DataManager pDM,
MBDynParser HP 
)
virtual

Implements StreamOutputContentTypeReader.

Definition at line 629 of file streamoutelem.cc.

References IncludeParser::GetLineData(), HighParser::IsArg(), HighParser::IsKeyWord(), MBDYN_EXCEPT_ARGS, nodes, GeometryData::R, DataManager::ReadNode(), GeometryData::RT, SAFENEWWITHCONSTRUCTOR, Node::STRUCTURAL, GeometryData::V, GeometryData::W, and GeometryData::X.

629  {
630  // instructions executed for 'motion' case content type
631 
632  StreamContent* pSC;
633 
634  unsigned uFlags = GeometryData::X;
635  if (HP.IsKeyWord("output" "flags")) {
636  uFlags = 0;
637  while (true) {
638  if (HP.IsKeyWord("position")) {
639  if (uFlags & GeometryData::X) {
640  silent_cerr("StreamContent: "
641  "position flag already defined "
642  "at line " << HP.GetLineData()
643  << std::endl);
645  }
646  uFlags |= GeometryData::X;
647 
648  } else if (HP.IsKeyWord("orientation" "matrix")) {
649  if (uFlags & GeometryData::ORIENTATION_MASK) {
650  silent_cerr("StreamContent: "
651  "orientation flag already defined "
652  "at line " << HP.GetLineData()
653  << std::endl);
655  }
656  uFlags |= GeometryData::R;
657 
658  } else if (HP.IsKeyWord("orientation" "matrix" "transpose")) {
659  if (uFlags & GeometryData::ORIENTATION_MASK) {
660  silent_cerr("StreamContent: "
661  "orientation flag already defined "
662  "at line " << HP.GetLineData()
663  << std::endl);
665  }
666  uFlags |= GeometryData::RT;
667 
668  } else if (HP.IsKeyWord("velocity")) {
669  if (uFlags & GeometryData::V) {
670  silent_cerr("StreamContent: "
671  "velocity flag already defined "
672  "at line " << HP.GetLineData()
673  << std::endl);
675  }
676  uFlags |= GeometryData::V;
677 
678  } else if (HP.IsKeyWord("angular" "velocity")) {
679  if (uFlags & GeometryData::W) {
680  silent_cerr("StreamContent: "
681  "angular velocity flag already defined "
682  "at line " << HP.GetLineData()
683  << std::endl);
685  }
686  uFlags |= GeometryData::W;
687 
688  } else {
689  break;
690  }
691  }
692  }
693 
694  std::vector<const StructNode *> nodes;
695  if (HP.IsKeyWord("all")) {
696  /* FIXME: todo */
697 
698  } else {
699  while (HP.IsArg()) {
700  nodes.insert(nodes.end(), pDM->ReadNode<const StructNode, Node::STRUCTURAL>(HP));
701  }
702  }
703 
704  // FIXME: right now, we don't modify stream motion stuff
705  StreamContent::Modifier *pMod(0);
706 
708 
709  return pSC;
710  }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
virtual bool IsKeyWord(const char *sKeyWord)
Definition: parser.cc:910
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
static int nodes
virtual bool IsArg(void)
Definition: parser.cc:807
virtual HighParser::ErrOut GetLineData(void) const
Definition: parsinc.cc:697
Node * ReadNode(MBDynParser &HP, Node::Type type) const
Definition: dataman3.cc:2309

Here is the call graph for this function:


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