[#BloombergLP-bdld-DatumUtil]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdld.adoc[bdld]::DatumUtil
:relfileprefix: ../../
:mrdocs:

This struct serves as a namespace for utility functions that operate on `bdld&colon;&colon;Datum` objects&period;

== Synopsis

Declared in `&lt;bdld&lowbar;datumutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct DatumUtil;
----

== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdld/DatumUtil/safeTypedPrint.adoc[`safeTypedPrint`] 
| Write the value of the specified `object` to the specified `outputStream` in a human&hyphen;readable format that is non&hyphen;ambiguous regarding the type of the `bdld&colon;&colon;Datum` value printed, and return a reference to the modifiable `outputStream`&period; Optionally specify an initial indentation `level`, whose absolute value is incremented recursively for nested objects&period; If `level` is specified, optionally specify `spacesPerLevel`, whose absolute value indicates the number of spaces per indentation level for this and all of its nested objects&period; If `level` is negative, suppress indentation of the first line&period; If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`)&period; If `stream` is not valid on entry, this operation has no effect&period; Note that `safeTypedPrint` explicitly allows self&hyphen; referential data structures, or in other words data structures with cycles, to be printed&period; When a cycle is detected, that subgraph is not printed again&period; Also note that the human&hyphen;readable format is not fully specified, and can change without notice&period;
| xref:BloombergLP/bdld/DatumUtil/typedPrint.adoc[`typedPrint`] 
| Write the value of the specified `object` to the specified `outputStream` in a human&hyphen;readable format that is non&hyphen;ambiguous regarding the type of the `bdld&colon;&colon;Datum` value printed, and return a reference to the modifiable `outputStream`&period; Optionally specify an initial indentation `level`, whose absolute value is incremented recursively for nested objects&period; If `level` is specified, optionally specify `spacesPerLevel`, whose absolute value indicates the number of spaces per indentation level for this and all of its nested objects&period; If `level` is negative, suppress indentation of the first line&period; If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`)&period; If `stream` is not valid on entry, this operation has no effect&period; The behavior is undefined unless the data structure represented by `object` is a graph without any cycles&period; In case of an untrusted data structure, use `safeTypedPrint`&period; Note that the human&hyphen;readable format is not fully specified, and can change without notice&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
