Class

org.apache.daffodil.processors

ParseOrUnparseState

Related Doc: package processors

Permalink

abstract class ParseOrUnparseState extends State with StateForDebugger with ThrowsSDE with SavesErrorsAndWarnings with LocalBufferMixin with EncoderDecoderMixin with Logging with FormatInfo with SetProcessorMixin

A parser takes a state, and returns an updated state

The fact that there are side-effects/mutations on parts of the state enables us to reuse low-level java primitives that mutate streams.

The goal however, is to hide that fact so that the only places that have to know are the places doing the mutation, and the places rolling them back which should be isolated to the alternative parser, and repParsers, i.e., places where points-of-uncertainty are handled.

Linear Supertypes
SetProcessorMixin, FormatInfo, Logging, Identity, EncoderDecoderMixin, LocalBufferMixin, SavesErrorsAndWarnings, ThrowsSDE, StateForDebugger, State, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ParseOrUnparseState
  2. SetProcessorMixin
  3. FormatInfo
  4. Logging
  5. Identity
  6. EncoderDecoderMixin
  7. LocalBufferMixin
  8. SavesErrorsAndWarnings
  9. ThrowsSDE
  10. StateForDebugger
  11. State
  12. AnyRef
  13. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ParseOrUnparseState(vmap: VariableMap, diags: List[Diagnostic], dataProc: Maybe[DataProcessor], tunable: DaffodilTunables)

    Permalink
  2. new ParseOrUnparseState(variableBox: VariableBox, diagnostics: List[Diagnostic], dataProc: Maybe[DataProcessor], tunable: DaffodilTunables)

    Permalink
    Attributes
    protected

Type Members

  1. final class LocalByteBuffer extends LocalBuffer[ByteBuffer]

    Permalink
    Definition Classes
    LocalBufferMixin
  2. final class LocalCharBuffer extends LocalBuffer[CharBuffer]

    Permalink
    Definition Classes
    LocalBufferMixin

Abstract Value Members

  1. abstract def arrayPos: Long

    Permalink
    Definition Classes
    ParseOrUnparseStateStateForDebugger
  2. abstract def bitLimit0b: MaybeULong

    Permalink
    Definition Classes
    ParseOrUnparseStateStateForDebugger
  3. abstract def bitPos0b: Long

    Permalink
  4. abstract def checkBitOrder(): Unit

    Permalink

    Checks if the bit order change is legal.

    Checks if the bit order change is legal.

    For parsing we know the bitPos, so we can determine if we're at a byte boundary.

    For unparsing we may not know the absolute bitPos, so we cannot necessarily determine if the boundary is legal or not.

    If we know the absoluteBitPos we do the check (as for parsing).

    If we do not know the absoluteBitPos, then in that case, we split the DataOutputStream into original and buffered. The "check" then occurs when these DataOutputStreams are collapsed back together.

    So this "check" call, can have an important side effect when unparsing that queues up the check to be done in the future.

    Attributes
    protected
  5. abstract def childPos: Long

    Permalink
    Definition Classes
    ParseOrUnparseStateStateForDebugger
  6. abstract def currentLocation: DataLocation

    Permalink
    Definition Classes
    StateForDebugger
  7. abstract def currentNode: Maybe[DINode]

    Permalink
  8. abstract def dataStream: Maybe[DataStreamCommon]

    Permalink
  9. abstract def groupPos: Long

    Permalink
    Definition Classes
    ParseOrUnparseStateStateForDebugger
  10. abstract def hasInfoset: Boolean

    Permalink
  11. abstract def infoset: DIElement

    Permalink
  12. abstract def notifyDebugging(flag: Boolean): Unit

    Permalink

    The User API sets the debugger and debug on/off flag on the DataProcessor object.

    The User API sets the debugger and debug on/off flag on the DataProcessor object. When a PState or UState is created by the DataProcessor, the DataProcessor sets notifies the state object so that it can setup any debug-specific behaviors.

  13. abstract def occursBoundsStack: MStackOfLong

    Permalink
  14. abstract def thisElement: InfosetElement

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def SDE(str: String, args: Any*): Nothing

    Permalink
    Definition Classes
    ParseOrUnparseState → SavesErrorsAndWarnings → ThrowsSDE
  5. final def SDE(th: Throwable): Nothing

    Permalink
    Definition Classes
    ThrowsSDE
  6. def SDEButContinue(str: String, args: Any*): Unit

    Permalink
    Definition Classes
    ParseOrUnparseState → SavesErrorsAndWarnings
  7. def SDW(warnID: WarnID, str: String, args: Any*): Unit

    Permalink
    Definition Classes
    ParseOrUnparseState → SavesErrorsAndWarnings
  8. def SDW(str: String, args: Any*): Unit

    Permalink
  9. def ThrowSDE: PartialFunction[Throwable, Nothing]

    Permalink
    Definition Classes
    ThrowsSDE
  10. var _processorStatus: ProcessorResult

    Permalink
    Attributes
    protected
  11. var _validationStatus: Boolean

    Permalink
    Attributes
    protected
  12. final def areLogging(lvl: Type): Boolean

    Permalink
    Definition Classes
    Logging
  13. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  14. final def binaryFloatRep: BinaryFloatRep

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  15. final def bitLimit1b: MaybeULong

    Permalink
  16. final def bitOrder: BitOrder

    Permalink

    Returns bit order.

    Returns bit order. If text, this is the bit order for the character set encoding. If binary, this is the bitOrder property value.

    Definition Classes
    ParseOrUnparseState → FormatInfo
  17. final def bitPos: Long

    Permalink
  18. final def bitPos1b: Long

    Permalink
  19. final def byteOrder: ByteOrder

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  20. final def bytePos: Long

    Permalink
    Definition Classes
    ParseOrUnparseStateStateForDebugger
  21. final def bytePos0b: Long

    Permalink
  22. final def bytePos1b: Long

    Permalink
  23. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. def copyStateForDebugger: TupleForDebugger

    Permalink
  25. def dState: DState

    Permalink

    Used when evaluating expressions.

    Used when evaluating expressions. Holds state of expression during evaluation.

    Doesn't hold every bit of state - that is to say there's still the regular execution call stack, which keeps track of exactly where in the expression evaluation we are.

  26. var dataProc: Maybe[DataProcessor]

    Permalink
  27. final def decoder: BitsCharsetDecoder

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  28. var diagnostics: List[Diagnostic]

    Permalink
    Definition Classes
    ParseOrUnparseStateState
  29. def discriminator: Boolean

    Permalink
    Definition Classes
    StateForDebugger
  30. def doLogging(lvl: Type, msg: String, args: Seq[Any]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  31. final def encoder: BitsCharsetEncoder

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  32. final def encodingErrorPolicy: EncodingErrorPolicy

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  33. final def encodingMandatoryAlignmentInBits: Int

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  34. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  35. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  36. final def fillByte: Byte

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  37. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  38. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  39. def getContext(): ElementRuntimeData

    Permalink
  40. def getDecoder(charset: BitsCharset): BitsCharsetDecoder

    Permalink
    Definition Classes
    EncoderDecoderMixin
  41. def getDecoderInfo(charset: BitsCharset): DecoderInfo

    Permalink
    Definition Classes
    EncoderDecoderMixin
  42. def getEncoder(charset: BitsCharset): BitsCharsetEncoder

    Permalink
    Definition Classes
    EncoderDecoderMixin
  43. def getEncoderInfo(charset: BitsCharset): EncoderInfo

    Permalink
    Definition Classes
    EncoderDecoderMixin
  44. def getLogWriter(): LogWriter

    Permalink
    Definition Classes
    Logging
  45. final def getLoggingLevel(): Type

    Permalink
    Definition Classes
    Logging
  46. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  47. final def isFixedWidthEncoding: Boolean

    Permalink
    Definition Classes
    FormatInfo
  48. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  49. final def jByteOrder: ByteOrder

    Permalink
    Definition Classes
    FormatInfo
  50. final def lengthInBits(str: String, bitsCharset: BitsCharset): Long

    Permalink
    Definition Classes
    EncoderDecoderMixin
  51. final macro def log(lvl: Type, msg: String, args: Any*): Unit

    Permalink
    Definition Classes
    Logging
  52. lazy val logID: String

    Permalink
    Definition Classes
    Logging → Identity
  53. var logLevel: Maybe[Type]

    Permalink
    Definition Classes
    Logging
  54. var logWriter: Maybe[LogWriter]

    Permalink
    Definition Classes
    Logging
  55. final def maybeCharWidthInBits: MaybeInt

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  56. def maybeERD: Maybe[ElementRuntimeData]

    Permalink
  57. final def maybeProcessor: Maybe[Processor]

    Permalink
    Definition Classes
    SetProcessorMixin
  58. final def maybeUTF16Width: Maybe[UTF16Width]

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  59. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  60. final def notYetImplemented(msg: String, args: Any*): Nothing

    Permalink
    Definition Classes
    ThrowsSDE
  61. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  62. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  63. final def processor: Processor

    Permalink
    Definition Classes
    SetProcessorMixin
  64. def processorStatus: ProcessorResult

    Permalink
    Definition Classes
    ParseOrUnparseStateState
  65. final def replacingDecoder: BitsCharsetDecoder

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  66. final def reportingDecoder: BitsCharsetDecoder

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  67. final def resetFormatInfoCaches(): Unit

    Permalink

    Must call after all processors so as to recompute the formatInfo slots for the next parser - since the values could change.

  68. final def schemaDefinitionError(str: String, args: Any*): Nothing

    Permalink
    Definition Classes
    ThrowsSDE
  69. def schemaDefinitionErrorButContinue(str: String, args: Any*): Unit

    Permalink
    Definition Classes
    SavesErrorsAndWarnings
  70. def schemaDefinitionErrorDueToPropertyValue(propertyName: String, propertyValue: String, propertyLocation: LookupLocation, otherPropertyLocation: LookupLocation, str: String, args: Any*): Nothing

    Permalink
    Definition Classes
    SavesErrorsAndWarnings
  71. final macro def schemaDefinitionUnless(testThatWillThrowIfFalse: Boolean, str: String, args: Any*): Unit

    Permalink
    Definition Classes
    ThrowsSDE
  72. macro def schemaDefinitionWarningUnless(warnID: WarnID, testThatWillWarnIfFalse: Boolean, str: String, args: Any*): Unit

    Permalink
    Definition Classes
    SavesErrorsAndWarnings
  73. macro def schemaDefinitionWarningWhen(warnID: WarnID, testThatWillWarnIfTrue: Boolean, str: String, args: Any*): Unit

    Permalink
    Definition Classes
    SavesErrorsAndWarnings
  74. final macro def schemaDefinitionWhen(testThatWillThrowIfTrue: Boolean, str: String, args: Any*): Unit

    Permalink
    Definition Classes
    ThrowsSDE
  75. def schemaFileLocation: SchemaFileLocation

    Permalink
    Definition Classes
    ParseOrUnparseState → ThrowsSDE
  76. final def setFailed(failureDiagnostic: Diagnostic): Unit

    Permalink
  77. def setLogWriter(lw: LogWriter): Unit

    Permalink
    Definition Classes
    Logging
  78. def setLoggingLevel(level: Type): Unit

    Permalink
    Definition Classes
    Logging
  79. final def setMaybeProcessor(mp: Maybe[Processor]): Unit

    Permalink
    Definition Classes
    SetProcessorMixin
  80. final def setProcessor(p: Processor): Unit

    Permalink

    Must be called on the state before any call to the I/O layer, as that will call back to get property-related information and that has to be obtained via the runtime data for the term - whether element or model group.

    Must be called on the state before any call to the I/O layer, as that will call back to get property-related information and that has to be obtained via the runtime data for the term - whether element or model group. The

    Definition Classes
    SetProcessorMixin
  81. def setSuccess(): Unit

    Permalink

    Important: If an error is being suppressed, you must call this to reset the state back so that the prior failure doesn't "last forever" past the point where it is being suppressed.

    Important: If an error is being suppressed, you must call this to reset the state back so that the prior failure doesn't "last forever" past the point where it is being suppressed.

    This happens, for example, in the debugger when it is evaluating expressions.

  82. def setVariableMap(newMap: VariableMap): Unit

    Permalink
  83. final def suppressDiagnosticAndSucceed(d: Diagnostic): Unit

    Permalink

    Used when errors are caught by interactive debugger expression evaluation.

    Used when errors are caught by interactive debugger expression evaluation. We don't want to accumulate the diagnostics that we're suppressing.

  84. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  85. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  86. final def toss(th: Throwable): Nothing

    Permalink
    Definition Classes
    ThrowsSDE
  87. final def truncateToBits(str: String, bitsCharset: BitsCharset, nBits: Long): String

    Permalink
    Definition Classes
    EncoderDecoderMixin
  88. val tunable: DaffodilTunables

    Permalink
  89. def validationError(msg: String, args: Any*): Unit

    Permalink
  90. def validationErrorNoContext(cause: Throwable): Unit

    Permalink
  91. def validationStatus: Boolean

    Permalink
    Definition Classes
    ParseOrUnparseStateState
  92. var variableBox: VariableBox

    Permalink
    Attributes
    protected
  93. def variableMap: VariableMap

    Permalink

    Variable map provides access to variable bindings.

  94. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  95. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  96. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  97. final def whichBit0b: Long

    Permalink
  98. final lazy val withLocalByteBuffer: LocalStack[LocalByteBuffer]

    Permalink
    Definition Classes
    LocalBufferMixin
  99. final lazy val withLocalCharBuffer: LocalStack[LocalCharBuffer]

    Permalink
    Definition Classes
    LocalBufferMixin
  100. macro def withLoggingLevel[S](newLevel: Type)(body: ⇒ S): Unit

    Permalink
    Definition Classes
    Logging

Inherited from SetProcessorMixin

Inherited from FormatInfo

Inherited from Logging

Inherited from Identity

Inherited from EncoderDecoderMixin

Inherited from LocalBufferMixin

Inherited from SavesErrorsAndWarnings

Inherited from ThrowsSDE

Inherited from StateForDebugger

Inherited from State

Inherited from AnyRef

Inherited from Any

Ungrouped