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

Public Member Functions

bool Read (HighParser &HP)
 
- Public Member Functions inherited from DescRead
virtual ~DescRead (void)
 

Detailed Description

Definition at line 66 of file parsinc.cc.

Member Function Documentation

bool ChDirDR::Read ( HighParser HP)
virtual

Implements DescRead.

Definition at line 71 of file parsinc.cc.

References ASSERT, IncludeParser::GetFileName(), HighParser::GetLineData(), HighParser::IsArg(), and MBDYN_EXCEPT_ARGS.

72 {
73  if (!HP.IsArg()) {
74  silent_cerr("Parser error "
75  "in ChDir::Read(), "
76  "colon expected at line " << HP.GetLineData()
77  << std::endl);
79  }
80 
81  IncludeParser *pIP = dynamic_cast<IncludeParser *>(&HP);
82  ASSERT(pIP != 0);
83 
84  const char* sfname = pIP->GetFileName();
85 
86  if (chdir(sfname)) {
87  silent_cerr("Error in chdir, path=\"" << sfname << "\" at line "
88  << HP.GetLineData() << std::endl);
90  }
91 
92  return true;
93 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
virtual HighParser::ErrOut GetLineData(void) const
Definition: parser.cc:681
virtual const char * GetFileName(enum Delims Del=DEFAULTDELIM)
Definition: parsinc.cc:673
#define ASSERT(expression)
Definition: colamd.c:977
virtual bool IsArg(void)
Definition: parser.cc:807

Here is the call graph for this function:


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