rapidyaml  0.16.0
parseandemitYAML,anddoitfast
c4::yml::NodeType Struct Reference

Wraps a type_bits mask of NodeTypeBits flags with some syntactic sugar and predicates. More...

#include <node_type.hpp>

Public Member Functions

auto convert to type_bits
 operator type_bits & () noexcept
 
 operator type_bits const & () const noexcept
 
ctor
 NodeType () noexcept
 
 NodeType (type_bits t) noexcept
 
query / set
bool has_any (type_bits t) const noexcept
 
bool has_all (type_bits t) const noexcept
 
bool has_none (type_bits t) const noexcept
 
void set (type_bits t) noexcept
 
void add (type_bits t) noexcept
 
void rem (type_bits t) noexcept
 
void addrem (type_bits bits_to_add, type_bits bits_to_remove) noexcept
 
void clear () noexcept
 
node type predicates
bool is_notype () const noexcept
 
bool is_stream () const noexcept
 
bool is_doc () const noexcept
 
bool is_container () const noexcept
 
bool is_map () const noexcept
 
bool is_seq () const noexcept
 
bool has_key () const noexcept
 
bool has_val () const noexcept
 
bool is_val () const noexcept
 
bool is_keyval () const noexcept
 
bool key_is_null () const noexcept
 
bool val_is_null () const noexcept
 
bool has_key_tag () const noexcept
 
bool has_val_tag () const noexcept
 
bool has_key_anchor () const noexcept
 
bool has_val_anchor () const noexcept
 
bool has_anchor () const noexcept
 
bool is_key_ref () const noexcept
 
bool is_val_ref () const noexcept
 
bool is_ref () const noexcept
 
bool is_key_unfiltered () const noexcept
 
bool is_val_unfiltered () const noexcept
 
node style predicates
bool is_container_styled () const noexcept
 
bool is_block () const noexcept
 
bool is_flow_sl () const noexcept
 
bool is_flow_ml1 () const noexcept
 
bool is_flow_mln () const noexcept
 
bool is_flow_mlx () const noexcept
 
bool is_flow () const noexcept
 
bool has_flow_space () const noexcept
 
bool is_key_styled () const noexcept
 
bool is_val_styled () const noexcept
 
bool is_key_literal () const noexcept
 
bool is_val_literal () const noexcept
 
bool is_key_folded () const noexcept
 
bool is_val_folded () const noexcept
 
bool is_key_squo () const noexcept
 
bool is_val_squo () const noexcept
 
bool is_key_dquo () const noexcept
 
bool is_val_dquo () const noexcept
 
bool is_key_plain () const noexcept
 
bool is_val_plain () const noexcept
 
bool is_key_quoted () const noexcept
 
bool is_val_quoted () const noexcept
 
bool is_quoted () const noexcept
 
NodeType key_style () const noexcept
 
NodeType val_style () const noexcept
 
void set_container_style (type_bits style) noexcept
 
void set_key_style (type_bits style) noexcept
 
void set_val_style (type_bits style) noexcept
 
void clear_style () noexcept
 

Public Attributes

type_bits m_bits
 

convert to string

const char * type_str () const noexcept
 return a preset string based on the node type More...
 
size_t type_str (substr buf) const noexcept
 fill a string with the node type flags. More...
 
csubstr type_str_sub (substr buf) const noexcept
 fill a string with the node type flags. More...
 
static const char * type_str (type_bits t) noexcept
 return a preset string based on the node type More...
 
static size_t type_str (substr buf, type_bits t) noexcept
 fill a string with the node type flags. More...
 
static csubstr type_str_sub (substr buf, type_bits t) noexcept
 fill a string with the node type flags. More...
 

Detailed Description

Wraps a type_bits mask of NodeTypeBits flags with some syntactic sugar and predicates.

Definition at line 213 of file node_type.hpp.

Constructor & Destructor Documentation

c4::yml::NodeType::NodeType ( )
inlinenoexcept

Definition at line 234 of file node_type.hpp.

234 : m_bits(NOTYPE) {}
no node type or style is set
Definition: node_type.hpp:32
type_bits m_bits
Definition: node_type.hpp:217
c4::yml::NodeType::NodeType ( type_bits  t)
inlinenoexcept

Definition at line 235 of file node_type.hpp.

235 : m_bits(t) {}
type_bits m_bits
Definition: node_type.hpp:217

Member Function Documentation

c4::yml::NodeType::operator type_bits & ( )
inlinenoexcept

Definition at line 224 of file node_type.hpp.

224 { return m_bits; }
type_bits m_bits
Definition: node_type.hpp:217
c4::yml::NodeType::operator type_bits const & ( ) const
inlinenoexcept

Definition at line 225 of file node_type.hpp.

225 { return m_bits; }
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::has_any ( type_bits  t) const
inlinenoexcept

Definition at line 244 of file node_type.hpp.

244 { return (m_bits & t) != 0u; }
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::has_all ( type_bits  t) const
inlinenoexcept

Definition at line 245 of file node_type.hpp.

245 { return (m_bits & t) == t; }
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::has_none ( type_bits  t) const
inlinenoexcept

Definition at line 246 of file node_type.hpp.

246 { return (m_bits & t) == 0; }
type_bits m_bits
Definition: node_type.hpp:217
void c4::yml::NodeType::set ( type_bits  t)
inlinenoexcept

Definition at line 248 of file node_type.hpp.

248 { m_bits = t; }
type_bits m_bits
Definition: node_type.hpp:217
void c4::yml::NodeType::add ( type_bits  t)
inlinenoexcept

Definition at line 249 of file node_type.hpp.

Referenced by c4::yml::Tree::set_root_as_stream().

249 { m_bits |= t; }
type_bits m_bits
Definition: node_type.hpp:217
void c4::yml::NodeType::rem ( type_bits  t)
inlinenoexcept

Definition at line 250 of file node_type.hpp.

Referenced by c4::yml::Tree::set_root_as_stream().

250 { m_bits &= ~t; }
type_bits m_bits
Definition: node_type.hpp:217
void c4::yml::NodeType::addrem ( type_bits  bits_to_add,
type_bits  bits_to_remove 
)
inlinenoexcept

Definition at line 251 of file node_type.hpp.

251 { m_bits |= bits_to_add; m_bits &= ~bits_to_remove; }
type_bits m_bits
Definition: node_type.hpp:217
void c4::yml::NodeType::clear ( )
inlinenoexcept

Definition at line 253 of file node_type.hpp.

253 { m_bits = NOTYPE; }
no node type or style is set
Definition: node_type.hpp:32
type_bits m_bits
Definition: node_type.hpp:217
const char* c4::yml::NodeType::type_str ( ) const
inlinenoexcept

return a preset string based on the node type

Definition at line 263 of file node_type.hpp.

Referenced by type_str().

263 { return type_str(m_bits); }
const char * type_str() const noexcept
return a preset string based on the node type
Definition: node_type.hpp:263
type_bits m_bits
Definition: node_type.hpp:217
const char * c4::yml::NodeType::type_str ( type_bits  t)
staticnoexcept

return a preset string based on the node type

Definition at line 12 of file node_type.cpp.

13 {
14  switch(ty & TYMASK_)
15  {
16  case KEYVAL:
17  return "KEYVAL";
18  case KEY:
19  return "KEY";
20  case VAL:
21  return "VAL";
22  case MAP:
23  return "MAP";
24  case SEQ:
25  return "SEQ";
26  case KEYMAP:
27  return "KEYMAP";
28  case KEYSEQ:
29  return "KEYSEQ";
30  case DOCSEQ:
31  return "DOCSEQ";
32  case DOCMAP:
33  return "DOCMAP";
34  case DOCVAL:
35  return "DOCVAL";
36  case DOC:
37  return "DOC";
38  case STREAM:
39  return "STREAM";
40  case NOTYPE:
41  return "NOTYPE";
42  default:
43  if((ty & KEYVAL) == KEYVAL)
44  return "KEYVAL***";
45  if((ty & KEYMAP) == KEYMAP)
46  return "KEYMAP***";
47  if((ty & KEYSEQ) == KEYSEQ)
48  return "KEYSEQ***";
49  if((ty & DOCSEQ) == DOCSEQ)
50  return "DOCSEQ***";
51  if((ty & DOCMAP) == DOCMAP)
52  return "DOCMAP***";
53  if((ty & DOCVAL) == DOCVAL)
54  return "DOCVAL***";
55  if(ty & KEY)
56  return "KEY***";
57  if(ty & VAL)
58  return "VAL***";
59  if(ty & MAP)
60  return "MAP***";
61  if(ty & SEQ)
62  return "SEQ***";
63  if(ty & DOC)
64  return "DOC***";
65  return "(unk)";
66  }
67 }
a document
Definition: node_type.hpp:37
mask of DOC|VAL
Definition: node_type.hpp:165
mask of KEY|VAL
Definition: node_type.hpp:160
a scalar: has a scalar (ie string) value, possibly empty. must be a leaf node, and cannot be MAP or S...
Definition: node_type.hpp:34
mask of KEY|SEQ
Definition: node_type.hpp:161
all the bits up to here
Definition: node_type.hpp:47
mask of DOC|MAP
Definition: node_type.hpp:163
mask of DOC|SEQ
Definition: node_type.hpp:164
the scalar to the left of : in a map's member
Definition: node_type.hpp:33
no node type or style is set
Definition: node_type.hpp:32
a stream: a seq of docs
Definition: node_type.hpp:38
a map: a parent of KEYVAL/KEYSEQ/KEYMAP nodes
Definition: node_type.hpp:35
mask of KEY|MAP
Definition: node_type.hpp:162
a seq: a parent of VAL/SEQ/MAP nodes
Definition: node_type.hpp:36
size_t c4::yml::NodeType::type_str ( substr  buf) const
inlinenoexcept

fill a string with the node type flags.

Definition at line 268 of file node_type.hpp.

Referenced by type_str().

268 { return type_str(buf, m_bits); }
const char * type_str() const noexcept
return a preset string based on the node type
Definition: node_type.hpp:263
type_bits m_bits
Definition: node_type.hpp:217
size_t c4::yml::NodeType::type_str ( substr  buf,
type_bits  t 
)
staticnoexcept

fill a string with the node type flags.

Definition at line 108 of file node_type.cpp.

109 {
110  detail::SubstrWriter_ writer(buf);
111  for(type_and_name const tn : type_names)
112  {
113  if((flags & tn.bits) == tn.bits)
114  {
115  if(writer.pos)
116  writer.append('|');
117  writer.append(tn.str);
118  flags = flags & ~tn.bits; // remove the flag
119  }
120  }
121  if(!writer.pos)
122  writer.append("NOTYPE");
123  if(writer.pos < buf.len)
124  buf[writer.pos] = '\0';
125  return writer.pos;
126 }
EventBits flags
Definition: ints_utils.cpp:27
csubstr c4::yml::NodeType::type_str_sub ( substr  buf) const
inlinenoexcept

fill a string with the node type flags.

If the string is small, returns {null, len}

Definition at line 273 of file node_type.hpp.

Referenced by type_str_sub().

273 { return type_str_sub(buf, m_bits); }
csubstr type_str_sub(substr buf) const noexcept
fill a string with the node type flags.
Definition: node_type.hpp:273
type_bits m_bits
Definition: node_type.hpp:217
static csubstr c4::yml::NodeType::type_str_sub ( substr  buf,
type_bits  t 
)
inlinestaticnoexcept

fill a string with the node type flags.

If the string is small, returns {null, len}

Definition at line 275 of file node_type.hpp.

276  {
277  csubstr ret;
278  ret.len = type_str(buf, t);
279  ret.str = ret.len < buf.len ? buf.str : nullptr;
280  return ret;
281  }
const char * type_str() const noexcept
return a preset string based on the node type
Definition: node_type.hpp:263
basic_substring< const char > csubstr
an immutable string view
Definition: substr.hpp:2356
size_t len
the length of the substring
Definition: substr.hpp:218
bool c4::yml::NodeType::is_notype ( ) const
inlinenoexcept

Definition at line 290 of file node_type.hpp.

290 { return m_bits == NOTYPE; }
no node type or style is set
Definition: node_type.hpp:32
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_stream ( ) const
inlinenoexcept

Definition at line 291 of file node_type.hpp.

Referenced by c4::yml::Tree::set_root_as_stream().

291 { return ((m_bits & STREAM) == STREAM) != 0; }
a stream: a seq of docs
Definition: node_type.hpp:38
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_doc ( ) const
inlinenoexcept

Definition at line 292 of file node_type.hpp.

Referenced by c4::yml::Tree::ancestor_doc().

292 { return (m_bits & DOC) != 0; }
a document
Definition: node_type.hpp:37
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_container ( ) const
inlinenoexcept

Definition at line 293 of file node_type.hpp.

Referenced by c4::yml::Tree::set_root_as_stream().

293 { return (m_bits & (MAP|SEQ|STREAM)) != 0; }
a stream: a seq of docs
Definition: node_type.hpp:38
a map: a parent of KEYVAL/KEYSEQ/KEYMAP nodes
Definition: node_type.hpp:35
type_bits m_bits
Definition: node_type.hpp:217
a seq: a parent of VAL/SEQ/MAP nodes
Definition: node_type.hpp:36
bool c4::yml::NodeType::is_map ( ) const
inlinenoexcept

Definition at line 294 of file node_type.hpp.

Referenced by c4::yml::Tree::change_type(), c4::yml::Tree::duplicate_children_no_rep(), and c4::yml::Tree::merge_with().

294 { return (m_bits & MAP) != 0; }
a map: a parent of KEYVAL/KEYSEQ/KEYMAP nodes
Definition: node_type.hpp:35
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_seq ( ) const
inlinenoexcept

Definition at line 295 of file node_type.hpp.

Referenced by c4::yml::Tree::change_type(), c4::yml::Tree::duplicate_children_no_rep(), and c4::yml::Tree::merge_with().

295 { return (m_bits & SEQ) != 0; }
type_bits m_bits
Definition: node_type.hpp:217
a seq: a parent of VAL/SEQ/MAP nodes
Definition: node_type.hpp:36
bool c4::yml::NodeType::has_key ( ) const
inlinenoexcept

Definition at line 296 of file node_type.hpp.

Referenced by c4::yml::Tree::change_type(), and c4::yml::Tree::set_root_as_stream().

296 { return (m_bits & KEY) != 0; }
the scalar to the left of : in a map's member
Definition: node_type.hpp:33
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::has_val ( ) const
inlinenoexcept

Definition at line 297 of file node_type.hpp.

Referenced by c4::yml::Tree::merge_with().

297 { return (m_bits & VAL) != 0; }
a scalar: has a scalar (ie string) value, possibly empty. must be a leaf node, and cannot be MAP or S...
Definition: node_type.hpp:34
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_val ( ) const
inlinenoexcept

Definition at line 298 of file node_type.hpp.

Referenced by c4::yml::Tree::change_type(), and c4::yml::Tree::merge_with().

298 { return (m_bits & KEYVAL) == VAL; }
mask of KEY|VAL
Definition: node_type.hpp:160
a scalar: has a scalar (ie string) value, possibly empty. must be a leaf node, and cannot be MAP or S...
Definition: node_type.hpp:34
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_keyval ( ) const
inlinenoexcept

Definition at line 299 of file node_type.hpp.

Referenced by c4::yml::Tree::merge_with().

299 { return (m_bits & KEYVAL) == KEYVAL; }
mask of KEY|VAL
Definition: node_type.hpp:160
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::key_is_null ( ) const
inlinenoexcept

Definition at line 300 of file node_type.hpp.

300 { return (m_bits & KEYNIL) != 0; }
the key is null (eg { : b} results in a null key)
Definition: node_type.hpp:45
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::val_is_null ( ) const
inlinenoexcept

Definition at line 301 of file node_type.hpp.

301 { return (m_bits & VALNIL) != 0; }
the val is null (eg {a : } results in a null val)
Definition: node_type.hpp:46
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::has_key_tag ( ) const
inlinenoexcept

Definition at line 302 of file node_type.hpp.

302 { return (m_bits & KEYTAG) != 0; }
the key has a tag
Definition: node_type.hpp:43
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::has_val_tag ( ) const
inlinenoexcept

Definition at line 303 of file node_type.hpp.

303 { return (m_bits & VALTAG) != 0; }
the val has a tag
Definition: node_type.hpp:44
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::has_key_anchor ( ) const
inlinenoexcept

Definition at line 304 of file node_type.hpp.

304 { return (m_bits & KEYANCH) != 0; }
the key has an &anchor
Definition: node_type.hpp:41
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::has_val_anchor ( ) const
inlinenoexcept

Definition at line 305 of file node_type.hpp.

305 { return (m_bits & VALANCH) != 0; }
the val has an &anchor
Definition: node_type.hpp:42
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::has_anchor ( ) const
inlinenoexcept

Definition at line 306 of file node_type.hpp.

306 { return (m_bits & (KEYANCH|VALANCH)) != 0; }
the val has an &anchor
Definition: node_type.hpp:42
the key has an &anchor
Definition: node_type.hpp:41
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_key_ref ( ) const
inlinenoexcept

Definition at line 307 of file node_type.hpp.

307 { return (m_bits & KEYREF) != 0; }
a *reference: the key references an &anchor
Definition: node_type.hpp:39
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_val_ref ( ) const
inlinenoexcept

Definition at line 308 of file node_type.hpp.

308 { return (m_bits & VALREF) != 0; }
a *reference: the val references an &anchor
Definition: node_type.hpp:40
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_ref ( ) const
inlinenoexcept

Definition at line 309 of file node_type.hpp.

309 { return (m_bits & (KEYREF|VALREF)) != 0; }
a *reference: the val references an &anchor
Definition: node_type.hpp:40
a *reference: the key references an &anchor
Definition: node_type.hpp:39
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_key_unfiltered ( ) const
inlinenoexcept

Definition at line 311 of file node_type.hpp.

311 { return (m_bits & (KEY_UNFILT)) != 0; }
the key scalar was left unfiltered; the parser was set not to filter.
Definition: node_type.hpp:51
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_val_unfiltered ( ) const
inlinenoexcept

Definition at line 312 of file node_type.hpp.

312 { return (m_bits & (VAL_UNFILT)) != 0; }
the val scalar was left unfiltered; the parser was set not to filter.
Definition: node_type.hpp:52
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_container_styled ( ) const
inlinenoexcept

Definition at line 321 of file node_type.hpp.

321 { return (m_bits & (CONTAINER_STYLE)) != 0; }
mask of CONTAINER_STYLE_FLOW|CONTAINER_STYLE_BLOCK : all container style flags
Definition: node_type.hpp:182
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_block ( ) const
inlinenoexcept

Definition at line 322 of file node_type.hpp.

322 { return (m_bits & (BLOCK)) != 0; }
mark container with block style < - seqs as <
Definition: node_type.hpp:136
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_flow_sl ( ) const
inlinenoexcept

Definition at line 323 of file node_type.hpp.

323 { return (m_bits & (FLOW_SL)) != 0; }
type_bits m_bits
Definition: node_type.hpp:217
mark container with single-line flow style < - seqs as <
Definition: node_type.hpp:56
bool c4::yml::NodeType::is_flow_ml1 ( ) const
inlinenoexcept

Definition at line 324 of file node_type.hpp.

324 { return (m_bits & (FLOW_ML1)) != 0; }
type_bits m_bits
Definition: node_type.hpp:217
mark container with multi-line flow style, 1 element per line < - seqs as <
Definition: node_type.hpp:75
bool c4::yml::NodeType::is_flow_mln ( ) const
inlinenoexcept

Definition at line 325 of file node_type.hpp.

Referenced by sample_style_flow_formatting().

325 { return (m_bits & (FLOW_MLN)) != 0; }
mark container with multi-line flow style, n elements per line, < wrapped (as set by EmitOptions::max...
Definition: node_type.hpp:90
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_flow_mlx ( ) const
inlinenoexcept

Definition at line 326 of file node_type.hpp.

326 { return (m_bits & (FLOW_ML1|FLOW_MLN)) != 0; }
mark container with multi-line flow style, n elements per line, < wrapped (as set by EmitOptions::max...
Definition: node_type.hpp:90
type_bits m_bits
Definition: node_type.hpp:217
mark container with multi-line flow style, 1 element per line < - seqs as <
Definition: node_type.hpp:75
bool c4::yml::NodeType::is_flow ( ) const
inlinenoexcept

Definition at line 327 of file node_type.hpp.

327 { return (m_bits & (FLOW_ML1|FLOW_MLN|FLOW_SL)) != 0; }
mark container with multi-line flow style, n elements per line, < wrapped (as set by EmitOptions::max...
Definition: node_type.hpp:90
type_bits m_bits
Definition: node_type.hpp:217
mark container with multi-line flow style, 1 element per line < - seqs as <
Definition: node_type.hpp:75
mark container with single-line flow style < - seqs as <
Definition: node_type.hpp:56
bool c4::yml::NodeType::has_flow_space ( ) const
inlinenoexcept

Definition at line 328 of file node_type.hpp.

328 { return (m_bits & (FLOW_SPC)) != 0; }
mark container with spaces after comma when in flow mode. < Applies to both FLOW_SL and FLOW_MLN (but...
Definition: node_type.hpp:132
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_key_styled ( ) const
inlinenoexcept

Definition at line 330 of file node_type.hpp.

330 { return (m_bits & (KEY_STYLE)) != 0; }
mask of KEYQUO|KEY_PLAIN : all the key scalar styles for key (not container styles!) ...
Definition: node_type.hpp:176
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_val_styled ( ) const
inlinenoexcept

Definition at line 331 of file node_type.hpp.

331 { return (m_bits & (VAL_STYLE)) != 0; }
type_bits m_bits
Definition: node_type.hpp:217
mask of VALQUO|VAL_PLAIN : all the val scalar styles for val (not container styles!) ...
Definition: node_type.hpp:177
bool c4::yml::NodeType::is_key_literal ( ) const
inlinenoexcept

Definition at line 332 of file node_type.hpp.

332 { return (m_bits & (KEY_LITERAL)) != 0; }
mark key scalar as multiline, block literal |
Definition: node_type.hpp:147
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_val_literal ( ) const
inlinenoexcept

Definition at line 333 of file node_type.hpp.

333 { return (m_bits & (VAL_LITERAL)) != 0; }
mark val scalar as multiline, block literal |
Definition: node_type.hpp:148
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_key_folded ( ) const
inlinenoexcept

Definition at line 334 of file node_type.hpp.

334 { return (m_bits & (KEY_FOLDED)) != 0; }
mark key scalar as multiline, block folded >
Definition: node_type.hpp:149
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_val_folded ( ) const
inlinenoexcept

Definition at line 335 of file node_type.hpp.

335 { return (m_bits & (VAL_FOLDED)) != 0; }
mark val scalar as multiline, block folded >
Definition: node_type.hpp:150
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_key_squo ( ) const
inlinenoexcept

Definition at line 336 of file node_type.hpp.

336 { return (m_bits & (KEY_SQUO)) != 0; }
type_bits m_bits
Definition: node_type.hpp:217
mark key scalar as single quoted '
Definition: node_type.hpp:151
bool c4::yml::NodeType::is_val_squo ( ) const
inlinenoexcept

Definition at line 337 of file node_type.hpp.

337 { return (m_bits & (VAL_SQUO)) != 0; }
mark val scalar as single quoted '
Definition: node_type.hpp:152
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_key_dquo ( ) const
inlinenoexcept

Definition at line 338 of file node_type.hpp.

338 { return (m_bits & (KEY_DQUO)) != 0; }
mark key scalar as double quoted "
Definition: node_type.hpp:153
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_val_dquo ( ) const
inlinenoexcept

Definition at line 339 of file node_type.hpp.

339 { return (m_bits & (VAL_DQUO)) != 0; }
mark val scalar as double quoted "
Definition: node_type.hpp:154
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_key_plain ( ) const
inlinenoexcept

Definition at line 340 of file node_type.hpp.

340 { return (m_bits & (KEY_PLAIN)) != 0; }
mark key scalar as plain scalar (unquoted, even when multiline)
Definition: node_type.hpp:155
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_val_plain ( ) const
inlinenoexcept

Definition at line 341 of file node_type.hpp.

341 { return (m_bits & (VAL_PLAIN)) != 0; }
mark val scalar as plain scalar (unquoted, even when multiline)
Definition: node_type.hpp:156
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_key_quoted ( ) const
inlinenoexcept

Definition at line 342 of file node_type.hpp.

342 { return (m_bits & KEYQUO) != 0; }
key style is one of `'">|`. mask of KEY_SQUO|KEY_DQUO|KEY_FOLDED|KEY_LITERAL
Definition: node_type.hpp:174
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_val_quoted ( ) const
inlinenoexcept

Definition at line 343 of file node_type.hpp.

343 { return (m_bits & VALQUO) != 0; }
val style is one of `'">|`. mask of VAL_SQUO|VAL_DQUO|VAL_FOLDED|VAL_LITERAL
Definition: node_type.hpp:175
type_bits m_bits
Definition: node_type.hpp:217
bool c4::yml::NodeType::is_quoted ( ) const
inlinenoexcept

Definition at line 344 of file node_type.hpp.

344 { return (m_bits & (KEYQUO|VALQUO)) != 0; }
val style is one of `'">|`. mask of VAL_SQUO|VAL_DQUO|VAL_FOLDED|VAL_LITERAL
Definition: node_type.hpp:175
key style is one of `'">|`. mask of KEY_SQUO|KEY_DQUO|KEY_FOLDED|KEY_LITERAL
Definition: node_type.hpp:174
type_bits m_bits
Definition: node_type.hpp:217
NodeType c4::yml::NodeType::key_style ( ) const
inlinenoexcept

Definition at line 346 of file node_type.hpp.

346 { return (m_bits & (KEY_STYLE)); }
mask of KEYQUO|KEY_PLAIN : all the key scalar styles for key (not container styles!) ...
Definition: node_type.hpp:176
type_bits m_bits
Definition: node_type.hpp:217
NodeType c4::yml::NodeType::val_style ( ) const
inlinenoexcept

Definition at line 347 of file node_type.hpp.

347 { return (m_bits & (VAL_STYLE)); }
type_bits m_bits
Definition: node_type.hpp:217
mask of VALQUO|VAL_PLAIN : all the val scalar styles for val (not container styles!) ...
Definition: node_type.hpp:177
void c4::yml::NodeType::set_container_style ( type_bits  style)
inlinenoexcept

Definition at line 349 of file node_type.hpp.

349 { m_bits = ((style & CONTAINER_STYLE) | (m_bits & ~CONTAINER_STYLE)); }
mask of CONTAINER_STYLE_FLOW|CONTAINER_STYLE_BLOCK : all container style flags
Definition: node_type.hpp:182
type_bits m_bits
Definition: node_type.hpp:217
void c4::yml::NodeType::set_key_style ( type_bits  style)
inlinenoexcept

Definition at line 350 of file node_type.hpp.

350 { m_bits = ((style & KEY_STYLE) | (m_bits & ~KEY_STYLE)); }
mask of KEYQUO|KEY_PLAIN : all the key scalar styles for key (not container styles!) ...
Definition: node_type.hpp:176
type_bits m_bits
Definition: node_type.hpp:217
void c4::yml::NodeType::set_val_style ( type_bits  style)
inlinenoexcept

Definition at line 351 of file node_type.hpp.

351 { m_bits = ((style & VAL_STYLE) | (m_bits & ~VAL_STYLE)); }
type_bits m_bits
Definition: node_type.hpp:217
mask of VALQUO|VAL_PLAIN : all the val scalar styles for val (not container styles!) ...
Definition: node_type.hpp:177
void c4::yml::NodeType::clear_style ( )
inlinenoexcept

Definition at line 352 of file node_type.hpp.

352 { m_bits &= ~STYLE; }
type_bits m_bits
Definition: node_type.hpp:217
mask of SCALAR_STYLE | CONTAINER_STYLE : all style flags
Definition: node_type.hpp:183

Member Data Documentation

type_bits c4::yml::NodeType::m_bits

Definition at line 217 of file node_type.hpp.

Referenced by c4::yml::Tree::change_type().


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