[#BloombergLP-ball-Rule-2constructor-0e36]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/Rule.adoc[Rule]::Rule
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;ball&lowbar;rule&period;h&gt;`

Create a `Rule` object whose pattern is an empty string and whose thresholds levels are all 0&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator will be used&period; Note that a newly created `Rule` object does not have any attributes&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/ball/Rule/2constructor-01.adoc[Rule](xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/ball/Rule/2constructor-01.adoc[_» more&period;&period;&period;_]#

Create a `Rule` object that has the same value as that of the specified `original` object&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator will be used&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/ball/Rule/2constructor-0e39.adoc[Rule](
    xref:BloombergLP/ball/Rule.adoc[Rule] const& original,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/ball/Rule/2constructor-0e39.adoc[_» more&period;&period;&period;_]#

Create a `Rule` object whose pattern is the specified `pattern` and whose thresholds levels are the specified `recordLevel`, `passLevel`, `triggerLevel`, and `triggerAllLevel` respectively&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator will be used&period; The behavior is undefined unless each of the four threshold level values is not in the range &lsqb;0 &period;&period; 255&rsqb;&period; Note that a newly created `Rule` object does not have any attributes&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/ball/Rule/2constructor-0b.adoc[Rule](
    std::string&lowbar;view const& pattern,
    int recordLevel,
    int passLevel,
    int triggerLevel,
    int triggerAllLevel,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/ball/Rule/2constructor-0b.adoc[_» more&period;&period;&period;_]#


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