A container class to hold clips (sequences of events).
More...
#include <reels.h>
|
char | time_format [128] = "%Y-%m-%d %H:%M:%S" |
| Date and time format for insert_row() and define_event() More...
|
|
A container class to hold clips (sequences of events).
To simplify the Python interface, the object has a set_time_format() method.
◆ Clips() [1/4]
Default construct a Clips object as an abstract method. This is required for declaring a Clips object that will later be copy constructed based on conditional statements.
◆ Clips() [2/4]
Construct a Clips object from a Clients and an Events objects.
- Parameters
-
clients | The list of all the clients to be processed. If empty, all the clients will be considered. |
events | An initialized Events object created either by auto-detection (insert_row) or definition (define_event). |
◆ Clips() [3/4]
reels::Clips::Clips |
( |
const ClipMap & |
clip_map | ) |
|
|
inline |
Construct a Clips object from a ClipMap to be copied.
- Parameters
-
clip_map | The Clips object to be copied. |
◆ Clips() [4/4]
reels::Clips::Clips |
( |
Clips & |
o_clips | ) |
|
|
inline |
Copy-construct a Clips object.
- Parameters
-
o_clips | The Clips object to be copied. |
◆ clip_map()
The address of the internal ClipMap to be accessed from a Targets object.
- Returns
- The address.
◆ collapse_to_states()
void reels::Clips::collapse_to_states |
( |
| ) |
|
|
inline |
Collapse the ClipMap to states.
This removes identical consecutive codes from all the clips in the ClipMap keeping the time of the first instance.
◆ insert_event()
The kernel of a scan_event() made inline, when all checks and conversion to binary are successful.
- Parameters
-
client_hash | The "client". Already verified for insertion and converted into hash. |
code | The code number identifying the event already found in events. |
time_pt | The "time" already verified and converted into a TimePoint. |
◆ load()
Load the state of an object from a base64 mercury-dynamics serialization using image_get()
- Parameters
-
p_bi | The address of a BinaryImage stream containing a previously save()-ed image at the cursor position. |
- Returns
- True on success (Most likely error is a wrong stream).
◆ num_events()
uint64_t reels::Clips::num_events |
( |
| ) |
|
|
inline |
Return the number of events stored in the internal ClipMap.
- Returns
- The total count of events aggregating all the clips in the internal ClipMap.
◆ save()
Save the state of an object into a base64 mercury-dynamics serialization using image_put()
- Parameters
-
p_bi | The address of a BinaryImage stream that is either empty or has been used only for writing. |
- Returns
- True on success (Most likely error is allocation).
◆ scan_event()
Process a row from a transaction file, to add the event to the client's timeline (clip).
- Parameters
-
p_e | The "emitter". A C/Python string representing "owner of event". |
p_d | The "description". A C/Python string representing "the event". |
w | The "weight". A double representing a weight of the event. |
p_c | The "client". A C/Python string representing "the actor". |
p_t | The "time". A timestamp of the event as a C/Python string. (The format is given via set_time_format().) |
- Returns
- True on insertion. False usually just means, the event is not in events or the client is not in clients. Occasionally, it may be a time parsing error.
The documentation for this class was generated from the following files: