forked from Abc-Arbitrage/Disruptor-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSequenceGroups.h
More file actions
33 lines (24 loc) · 1.2 KB
/
SequenceGroups.h
File metadata and controls
33 lines (24 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include <cstdint>
namespace Disruptor
{
class ICursored;
class ISequence;
/**
* Provides static methods for managing a SequenceGroup object
*/
class SequenceGroups
{
public:
static void addSequences(std::shared_ptr< std::vector< std::shared_ptr< ISequence > > >& sequences,
const ICursored& cursor,
const std::vector< std::shared_ptr< ISequence > >& sequencesToAdd);
static void addSequences(std::vector< std::shared_ptr< ISequence > >& sequences,
const ICursored& cursor,
const std::vector< std::shared_ptr< ISequence > >& sequencesToAdd);
static bool removeSequence(std::shared_ptr< std::vector< std::shared_ptr< ISequence > > >& sequences, const std::shared_ptr< ISequence >& sequence);
static bool removeSequence(std::vector< std::shared_ptr< ISequence > >& sequences, const std::shared_ptr< ISequence >& sequence);
private:
static std::int32_t countMatching(const std::vector< std::shared_ptr< ISequence > >& values, const std::shared_ptr< ISequence >& toMatch);
};
} // namespace Disruptor