ALox  V. 2402 R. 0
Home ALox for C++ ALox for C# ALox for Java Download
Public Static Methods | Private Static Fields | List of all members
Spaces Class Reference
Collaboration diagram for Spaces:
[legend]

Class Description


This is a simple class that provides a string full of spaces. This may be used to avoid memory allocations/initializations.

Public Static Methods

static AString Get (int minSize=128)
 
static void Write (StreamWriter os, int qty)
 
static void Write (TextWriter os, int qty)
 

Private Static Fields

static AString theSpaces =new AString()
 

Member Function Documentation

◆ Get()

static AString Get ( int  minSize = 128)
inlinestatic

Receives an AString full of spaces. The AString returned must not be altered.

Attention
Parameter minSize should be omitted and the size of the object returned accepted. Requesting a higher size, might result in slightly more efficiency. In multithreaded processes, changing the size must be performed during bootstrap, e.g. directly after invoking ALIB.Init by calling this method with the appropriate size.
Parameters
minSizeThe minimum number of spaces that should be available in the returned AString. Defaults to 128. See notes in method description!
Returns
A const AString filled with spaces.

◆ Write() [1/2]

static void Write ( StreamWriter  os,
int  qty 
)
inlinestatic

Write the given number of spaces to a StreamWriter.

Parameters
osThe output stream to write to
qtyThe quantity of spaces to write

◆ Write() [2/2]

static void Write ( TextWriter  os,
int  qty 
)
inlinestatic

Write the given number of spaces to a TextWriter.

Parameters
osThe output stream to write to
qtyThe quantity of spaces to write

Member Data Documentation

◆ theSpaces

AString theSpaces =new AString()
staticprivate

The internal string of spaces returned by Get and used by Write.


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