FormatText

com.phasmidsoftware.xmldoc.render.FormatText
case class FormatText(indents: Int) extends BaseFormat

FormatText is a case class that extends the functionality of BaseFormat for text-based formatting purposes. It provides mechanisms for handling hierarchical indentation, formatting class names within a rendering state, and generating sequences or enclosed structures based on an open/close state.

Value parameters

indents

The number of initial indentation levels to apply.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class BaseFormat
trait Format
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

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

Formats the name of a class or type based on the provided StateR instance and an optional open/close state.

Formats the name of a class or type based on the provided StateR instance and an optional open/close state.

Type parameters

T

The type whose class name is being formatted, used in conjunction with StateR.

Value parameters

open

An optional boolean indicating whether to open (true), close (false), or perform no action (None).

stateR

The current rendering state (StateR), which may include the name or other attributes used for formatting.

Attributes

Returns

A formatted string representing the class name, including any open or close indicators based on the open parameter.

def indent: Format

Increases the indentation level by one.

Increases the indentation level by one.

Attributes

Returns

A new Format instance with the updated indentation level.

def sequencer(open: Option[Boolean]): String

Generates a sequence delimiter based on the provided optional boolean value.

Generates a sequence delimiter based on the provided optional boolean value.

Value parameters

open

An optional boolean indicating the type of delimiter: Some(true) returns an opening bracket "[", Some(false) returns a closing bracket "]", and None returns a newline character.

Attributes

Returns

A string representing the appropriate delimiter based on the input.

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

Returns this Format unaffected..

Returns this Format unaffected..

Attributes

Returns

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

Inherited from:
BaseFormat
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 from:
BaseFormat
def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product

Concrete fields

val name: String

The name of the format, specifically associated with this formatter. name represents the type of the formatter and is initialized as "FormatText".

The name of the format, specifically associated with this formatter. name represents the type of the formatter and is initialized as "FormatText".

Attributes