BaseFormat

com.phasmidsoftware.xmldoc.render.BaseFormat
abstract class BaseFormat(indents: Int) extends Format

The BaseFormat abstract class provides a foundational implementation of common formatting operations, extending the Format trait. It includes methods and definitions for handling indentation, newline formatting, and rendering class names within a specific rendering state.

Value parameters

indents

The number of indent levels to be used in formatting, affecting the structure of the formatted output.

Attributes

Graph
Supertypes
trait Format
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Concrete methods

Returns this Format unaffected..

Returns this Format unaffected..

Attributes

Returns

The current Format instance, representing the flat version of the format.

def newline: String

Generates a newline character followed by a string of spaces based on the current indent level. The indentation is determined by the number of indents multiplied by a predefined tab unit.

Generates a newline character followed by a string of spaces based on the current indent level. The indentation is determined by the number of indents multiplied by a predefined tab unit.

Attributes

Returns

A formatted string consisting of a newline character followed by the appropriate level of indentation.

Inherited methods

def delimiter: String

Retrieves the default delimiter used for separating elements in formatted content.

Retrieves the default delimiter used for separating elements in formatted content.

Attributes

Returns

A String representing the default delimiter, typically a comma followed by a space (", ").

Inherited from:
Format

Inherited and Abstract methods

def formatName[T : ClassTag](open: Option[Boolean], stateR: StateR): String

Formats the name based on the given options and state of rendering.

Formats the name based on the given options and state of rendering.

Type parameters

T

The type parameter with an implicit ClassTag, typically used to provide runtime type information.

Value parameters

open

An optional Boolean value that specifies whether the formatting should consider an open state. A Some(true) might indicate open, Some(false) a closed state, and None an undefined state.

stateR

The current rendering state, represented as a StateR instance, containing details such as the name, attributes, and level of rendering invocation.

Attributes

Returns

A String representing the formatted name based on the input parameters.

Inherited from:
Format
def indent: Format

Adjusts the formatting of the content by applying an additional level of indentation. This method increases the hierarchical structure or nesting level used during output formatting.

Adjusts the formatting of the content by applying an additional level of indentation. This method increases the hierarchical structure or nesting level used during output formatting.

Attributes

Returns

A new Format instance with the updated indentation level applied.

Inherited from:
Format
def sequencer(open: Option[Boolean]): String

Determines the sequence format based on the provided open state.

Determines the sequence format based on the provided open state.

Value parameters

open

An optional Boolean value that specifies whether the sequence should consider an open state. Some(true) might indicate open, Some(false) a closed state, and None an undefined state.

Attributes

Returns

A String representing the sequence format based on the input state.

Inherited from:
Format

Abstract fields

val name: String

Represents the name associated with the BaseFormat class or its subclasses. It is expected to provide an identity or label that can be utilized in formatting operations or for rendering purposes within the implementation.

Represents the name associated with the BaseFormat class or its subclasses. It is expected to provide an identity or label that can be utilized in formatting operations or for rendering purposes within the implementation.

Attributes