Ejemplo n.º 1
0
bool ActionRegister::printTemplate( const std::string& action, bool include_optional ){
  if( check(action) ){
     Keywords keys; mk[action](keys);
     keys.print_template(action, include_optional); keys.destroyData(); 
     return true;
  } else {
     return false;
  }
}
Ejemplo n.º 2
0
bool ActionRegister::printManual( const std::string& action ){
  if ( check(action) ){
     Keywords keys; mk[action](keys); 
     keys.print_html(true); keys.destroyData();
     return true;
  } else {
     return false;
  } 
}
Ejemplo n.º 3
0
Vessel* VesselRegister::create(std::string keyword, const VesselOptions&da){
  Vessel* df;
  if(check(keyword)){
      Keywords keys; mk[keyword](keys);
      VesselOptions nda( da,keys );
      df=m[keyword](nda);
      keys.destroyData();
  }
  else df=NULL;
  return df;
}
Ejemplo n.º 4
0
bool ActionRegister::printManual( const std::string& action, const bool& vimout ) {
  if ( check(action) ) {
    Keywords keys; mk[action](keys);
    if( vimout ) {
      printf("%s",action.c_str()); keys.print_vim(); printf("\n");
    } else {
      keys.print_html();
    }
    keys.destroyData();
    return true;
  } else {
    return false;
  }
}
Ejemplo n.º 5
0
Action* ActionRegister::create(const ActionOptions&ao){
  if(ao.line.size()<1)return NULL;
  // Create a copy of the manual locally. The manual is 
  // then added to the ActionOptions. This allows us to 
  // ensure during construction that all the keywords for
  // the action have been documented. In addition, we can
  // generate the documentation when the user makes an error
  // in the input.
  Action* action;
  if( check(ao.line[0]) ){
      Keywords keys; mk[ao.line[0]](keys);
      ActionOptions nao( ao,keys );
      action=m[ao.line[0]](nao);
      keys.destroyData();
  } else action=NULL;
  return action;
}