ONE - On-device Neural Engine
Loading...
Searching...
No Matches
flatbuffers::ParserState Struct Reference

#include <idl.h>

Public Member Functions

 ParserState ()
 

Protected Member Functions

void ResetState (const char *source)
 
void MarkNewLine ()
 
int64_t CursorPosition () const
 

Protected Attributes

const char * cursor_
 
const char * line_start_
 
int line_
 
int token_
 
bool attr_is_trivial_ascii_string_
 
std::string attribute_
 
std::vector< std::string > doc_comment_
 

Detailed Description

Definition at line 660 of file idl.h.

Constructor & Destructor Documentation

◆ ParserState()

flatbuffers::ParserState::ParserState ( )
inline

Definition at line 662 of file idl.h.

663 : cursor_(nullptr), line_start_(nullptr), line_(0), token_(-1),
665 {
666 }
const char * cursor_
Definition idl.h:688
const char * line_start_
Definition idl.h:689
bool attr_is_trivial_ascii_string_
Definition idl.h:696

Member Function Documentation

◆ CursorPosition()

int64_t flatbuffers::ParserState::CursorPosition ( ) const
inlineprotected

Definition at line 682 of file idl.h.

683 {
685 return static_cast<int64_t>(cursor_ - line_start_);
686 }
#define FLATBUFFERS_ASSERT
Definition base.h:37

References cursor_, FLATBUFFERS_ASSERT, and line_start_.

◆ MarkNewLine()

void flatbuffers::ParserState::MarkNewLine ( )
inlineprotected

Definition at line 676 of file idl.h.

677 {
679 line_ += 1;
680 }

References cursor_, line_, and line_start_.

Referenced by ResetState().

◆ ResetState()

void flatbuffers::ParserState::ResetState ( const char *  source)
inlineprotected

Definition at line 669 of file idl.h.

670 {
671 cursor_ = source;
672 line_ = 0;
673 MarkNewLine();
674 }

References cursor_, line_, and MarkNewLine().

Field Documentation

◆ attr_is_trivial_ascii_string_

bool flatbuffers::ParserState::attr_is_trivial_ascii_string_
protected

Definition at line 696 of file idl.h.

◆ attribute_

std::string flatbuffers::ParserState::attribute_
protected

Definition at line 697 of file idl.h.

◆ cursor_

const char* flatbuffers::ParserState::cursor_
protected

Definition at line 688 of file idl.h.

Referenced by CursorPosition(), MarkNewLine(), and ResetState().

◆ doc_comment_

std::vector<std::string> flatbuffers::ParserState::doc_comment_
protected

Definition at line 698 of file idl.h.

◆ line_

int flatbuffers::ParserState::line_
protected

Definition at line 690 of file idl.h.

Referenced by MarkNewLine(), and ResetState().

◆ line_start_

const char* flatbuffers::ParserState::line_start_
protected

Definition at line 689 of file idl.h.

Referenced by CursorPosition(), and MarkNewLine().

◆ token_

int flatbuffers::ParserState::token_
protected

Definition at line 691 of file idl.h.


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