Guest User

Untitled

a guest
Apr 24th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. 27 OdlObject*
  2. 28 OdlObject::createOdlObject(const std::string& word)
  3. 29 {
  4. 30 // Create static mapping
  5. 31 static std::map<std::string, OdlObject::Type> m;
  6. 32 if (m.size() == 0) {
  7. 33 m[std::string("dtd")] = OdlObject::DTD;
  8. 34 m[std::string("line")] = OdlObject::DTD;
  9. 35 m[std::string("field")] = OdlObject::DTD;
  10. 36 m[std::string("flag")] = OdlObject::DTD;
  11. 37 m[std::string("help")] = OdlObject::DTD;
  12. 38 m[std::string("type")] = OdlObject::DTD;
  13. 39 m[std::string("formal-name")] = OdlObject::DTD;
  14. 40 m[std::string("header")] = OdlObject::DTD;
  15. 41 m[std::string("indent")] = OdlObject::DTD;
  16. 42 m[std::string("picture")] = OdlObject::DTD;
  17. 43 m[std::string("format")] = OdlObject::DTD;
  18. 44 m[std::string("fmtflag")] = OdlObject::DTD;
  19. 45 }
  20. 46 return new OdlObject( m[word] );
  21. 47 }
Add Comment
Please, Sign In to add comment