MCPcopy Create free account
hub / github.com/CelestiaProject/Celestia / parseLabelFlags

Function parseLabelFlags

src/celengine/cmdparser.cpp:815–841  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

813
814
815int parseLabelFlags(string s)
816{
817 istringstream in(s);
818
819 Tokenizer tokenizer(&in);
820 int flags = 0;
821
822 Tokenizer::TokenType ttype = tokenizer.nextToken();
823 while (ttype != Tokenizer::TokenEnd)
824 {
825 if (ttype == Tokenizer::TokenName)
826 {
827 string name = tokenizer.getNameValue();
828
829 if (CelxLua::LabelFlagMap.count(name) == 0)
830 cerr << "Unknown label flag: " << name << "\n";
831 else
832 flags |= CelxLua::LabelFlagMap[name];
833
834 ttype = tokenizer.nextToken();
835 if (ttype == Tokenizer::TokenBar)
836 ttype = tokenizer.nextToken();
837 }
838 }
839
840 return flags;
841}
842
843
844int parseOrbitFlags(string s)

Callers 1

parseCommandMethod · 0.85

Calls 2

nextTokenMethod · 0.80
getNameValueMethod · 0.80

Tested by

no test coverage detected