[#BloombergLP-balxml-Encoder_SequenceFirstPass]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::Encoder&lowbar;SequenceFirstPass
:relfileprefix: ../../
:mrdocs:

Component private class&period; Do not use&period;

== Synopsis

Declared in `&lt;balxml&lowbar;encoder&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class Encoder&lowbar;SequenceFirstPass;
----

== Description

This class is used as the first pass when encoding elements of a sequence&period; It basically does two things&colon; o encode elements with the `bdlat&lowbar;FormattingMode&colon;&colon;e&lowbar;IS&lowbar;ATTRIBUTE` flag using the `Formatter&colon;&colon;addAttribute` method&period; o looks for an element with the `bdlat&lowbar;FormattingMode&colon;&colon;e&lowbar;IS&lowbar;SIMPLE&lowbar;CONTENT` flag and, if found, provides accessors to obtain the `id` of the element&period; Note that the behavior is undefined unless there is only one element with `IS&lowbar;SIMPLE&lowbar;CONTENT` flag and, if this element exist, all other elements must have `IS&lowbar;ATTRIBUTE` flag&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balxml/Encoder_SequenceFirstPass/2constructor.adoc[`Encoder&lowbar;SequenceFirstPass`]         [.small]#[constructor]#
| Create a visitor for first pass for sequences&period;
| xref:BloombergLP/balxml/Encoder_SequenceFirstPass/addAttribute.adoc[`addAttribute`] 
| Add an attribute with the specified `name`, the value of the specified `object`, using the specified `formattingMode`&period;
| xref:BloombergLP/balxml/Encoder_SequenceFirstPass/addAttributeImp-01.adoc[`addAttributeImp`] 
| `addAttributeImp` overloads
| xref:BloombergLP/balxml/Encoder_SequenceFirstPass/hasSubElements.adoc[`hasSubElements`] 
| Return true if a sub&hyphen;element is found, and false otherwise&period;
| xref:BloombergLP/balxml/Encoder_SequenceFirstPass/operator_call.adoc[`operator()`] 
| Called back when an element is visited&period;
| xref:BloombergLP/balxml/Encoder_SequenceFirstPass/simpleContentId.adoc[`simpleContentId`] 
| Return a null value if there is no element with `IS&lowbar;SIMPLE&lowbar;CONTENT` flag, or a non&hyphen;null value with the integer `id` of the element otherwise&period;
|===



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