+/*!
+@defgroup api-tir-ev-cls Event class
+@ingroup api-tir
+
+@brief
+ Class of \bt_p_ev.
+
+An <strong><em>event class</em></strong> is the class of \bt_p_ev,
+which \bt_p_ev_msg contain:
+
+@image html trace-structure.png
+
+In the illustration above, notice that:
+
+- A \bt_stream is a conceptual \ref api-msg-seq "sequence of messages",
+ some of which are \bt_p_ev_msg.
+- An event message contains an \bt_ev.
+- An event is an instance of an event class.
+- The \ref api-tir-ev-prop-payload "payload field" of an event is an
+ instance of the \ref api-tir-ev-cls-prop-p-fc "payload field class"
+ which an event class contains.
+
+An event class is a \ref api-tir "trace IR" metadata object.
+
+An event class is a \ref api-fund-shared-object "shared object": get a
+new reference with bt_event_class_get_ref() and put an existing
+reference with bt_event_class_put_ref().
+
+Some library functions \ref api-fund-freezing "freeze" event classes on
+success. The documentation of those functions indicate this
+postcondition.
+
+The type of an event class is #bt_event_class.
+
+A \bt_stream_cls contains event classes. All the event classes of a
+given stream class have unique
+\ref api-tir-ev-cls-prop-id "numeric IDs". Borrow the stream class
+which contains an event class with bt_event_class_borrow_stream_class()
+or bt_event_class_borrow_stream_class_const().
+
+To create a default event class:
+
+<dl>
+ <dt>
+ If bt_stream_class_assigns_automatic_event_class_id() returns
+ #BT_TRUE (the default) for the stream class to use
+ </dt>
+ <dd>Use bt_event_class_create().</dd>
+
+ <dt>
+ If bt_stream_class_assigns_automatic_event_class_id() returns
+ #BT_FALSE for the stream class to use
+ </dt>
+ <dd>Use bt_event_class_create_with_id().</dd>
+</dl>
+
+<h1>Properties</h1>
+
+An event class has the following properties:
+
+<dl>
+ <dt>\anchor api-tir-ev-cls-prop-id Numeric ID</dt>
+ <dd>
+ Numeric ID, unique amongst the numeric IDs of the event class's
+ \bt_stream_cls's event classes.
+
+ Depending on whether or not the event class's stream class
+ automatically assigns event class IDs
+ (see bt_stream_class_assigns_automatic_event_class_id()),
+ set the event class's numeric ID on creation with
+ bt_event_class_create() or
+ bt_event_class_create_with_id().
+
+ You cannot change the numeric ID once the event class is created.
+
+ Get an event class's numeric ID with bt_event_class_get_id().
+ </dd>
+
+ <dt>\anchor api-tir-ev-cls-prop-name \bt_dt_opt Name</dt>
+ <dd>
+ Name of the event class.
+
+ Use bt_event_class_set_name() and bt_event_class_get_name().
+ </dd>
+
+ <dt>\anchor api-tir-ev-cls-prop-log-lvl \bt_dt_opt Log level</dt>
+ <dd>
+ Log level of the event class.
+
+ The event class's log level corresponds to the log level of the
+ tracer's original instrumentation point.
+
+ Use bt_event_class_set_log_level() and
+ bt_event_class_get_log_level().
+ </dd>
+
+ <dt>
+ \anchor api-tir-ev-cls-prop-emf-uri
+ \bt_dt_opt Eclipse Modeling Framework (EMF) URI
+ </dt>
+ <dd>
+ EMF URI of the event class.
+
+ Use bt_event_class_set_emf_uri() and
+ bt_event_class_get_emf_uri().
+ </dd>
+
+ <dt>
+ \anchor api-tir-ev-cls-prop-p-fc
+ \bt_dt_opt Payload field class
+ </dt>
+ <dd>
+ Payload \bt_fc of the event class.
+
+ The payload of an event class instance (\bt_ev) contains the
+ event's main data.
+
+ Use bt_event_class_set_payload_field_class()
+ bt_event_class_borrow_payload_field_class(),
+ and bt_event_class_borrow_payload_field_class_const().
+ </dd>
+
+ <dt>
+ \anchor api-tir-ev-cls-prop-sc-fc
+ \bt_dt_opt Specific context field class
+ </dt>
+ <dd>
+ Specific context \bt_fc of the event class.
+
+ The specific context of an event class instance (\bt_ev) contains
+ any contextual data of which the layout is specific to the
+ event's class and which does not belong to the payload.
+
+ Use bt_event_class_set_specific_context_field_class()
+ bt_event_class_borrow_specific_context_field_class(),
+ and bt_event_class_borrow_specific_context_field_class_const().
+ </dd>
+
+ <dt>
+ \anchor api-tir-ev-cls-prop-user-attrs
+ \bt_dt_opt User attributes
+ </dt>
+ <dd>
+ User attributes of the event class.
+
+ User attributes are custom attributes attached to an event class.
+
+ Use bt_event_class_set_user_attributes(),
+ bt_event_class_borrow_user_attributes(), and
+ bt_event_class_borrow_user_attributes_const().
+ </dd>
+</dl>
+*/
+
+/*! @{ */
+
+/*!
+@name Type
+@{
+
+@typedef struct bt_event_class bt_event_class;
+
+@brief
+ Event class.
+
+@}
+*/
+
+/*!
+@name Creation
+@{
+*/
+
+/*!
+@brief
+ Creates a default event class and adds it to the \bt_stream_cls
+ \bt_p{stream_class}.
+
+@attention
+ @parblock
+ Only use this function if
+
+ @code
+ bt_stream_class_assigns_automatic_event_class_id(stream_class)
+ @endcode
+
+ returns #BT_TRUE.
+
+ Otherwise, use bt_event_class_create_with_id().
+ @endparblock
+
+On success, the returned event class has the following property values:
+
+<table>
+ <tr>
+ <th>Property
+ <th>Value
+ <tr>
+ <td>\ref api-tir-ev-cls-prop-id "Numeric ID"
+ <td>Automatically assigned by \bt_p{stream_class}
+ <tr>
+ <td>\ref api-tir-ev-cls-prop-name "Name"
+ <td>\em None
+ <tr>
+ <td>\ref api-tir-ev-cls-prop-log-lvl "Log level"
+ <td>\em None
+ <tr>
+ <td>\ref api-tir-ev-cls-prop-emf-uri "EMF URI"
+ <td>\em None
+ <tr>
+ <td>\ref api-tir-ev-cls-prop-p-fc "Payload field class"
+ <td>\em None
+ <tr>
+ <td>\ref api-tir-ev-cls-prop-sc-fc "Specific context field class"
+ <td>\em None
+ <tr>
+ <td>\ref api-tir-ev-cls-prop-user-attrs "User attributes"
+ <td>Empty \bt_map_val
+</table>
+
+@param[in] stream_class
+ Stream class to add the created event class to.
+
+@returns
+ New event class reference, or \c NULL on memory error.
+
+@bt_pre_not_null{stream_class}
+@pre
+ <code>bt_stream_class_assigns_automatic_event_class_id(stream_class)</code>
+ returns #BT_TRUE.
+
+@bt_post_success_frozen{stream_class}
+
+@sa bt_event_class_create_with_id() —
+ Creates an event class with a specific numeric ID and adds it to a
+ stream class.
+*/