27 #ifndef SCRIBO_CORE_TAG_LINE_HH
28 # define SCRIBO_CORE_TAG_LINE_HH
50 Needs_Precise_Stats_Update,
92 operator<<(std::ostream& ostr,
const Tag& tag);
95 operator<<(std::ostream& ostr,
const ReadingDirection& direction);
98 operator<<(std::ostream& ostr,
const Type& type);
99 Type
str2type(
const std::string& str);
102 # ifndef MLN_INCLUDE_ONLY
106 operator<<(std::ostream& ostr,
const Tag& tag)
118 case Needs_Precise_Stats_Update:
119 str =
"Needs_Precise_Stats_Update";
125 str =
"Pathological";
136 operator<<(std::ostream& ostr,
const ReadingDirection& direction)
142 str =
"bottom-to-top";
146 str =
"left-to-right";
149 str =
"right-to-left";
152 str =
"top-to-bottom";
161 std::string type2str(
const Type& type)
173 str =
"drop-capital";
212 operator<<(std::ostream& ostr,
const Type& type)
214 return ostr << type2str(type);
219 Type
str2type(
const std::string& str)
221 if (str ==
"caption")
223 else if (str ==
"credit")
225 else if (str ==
"drop-capital")
227 else if (str ==
"floating")
229 else if (str ==
"footer")
231 else if (str ==
"header")
233 else if (str ==
"heading")
235 else if (str ==
"page-number")
237 else if (str ==
"paragraph")
241 else if(str ==
"punctuation")
243 else if (str ==
"text")
250 # endif // ! MLN_INCLUDE_ONLY
258 #endif // ! SCRIBO_CORE_TAG_LINE_HH