Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
cb1b6bc9
Commit
cb1b6bc9
authored
Mar 08, 2016
by
Claudio Scordino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better comments for understanding the classes array_t<> and array_item_t<>
parent
8a0a18a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
array.hpp
src/array.hpp
+8
-4
pipe.hpp
src/pipe.hpp
+1
-1
No files found.
src/array.hpp
View file @
cb1b6bc9
...
...
@@ -35,9 +35,16 @@
namespace
zmq
{
// Implementation of fast arrays with O(1) access, insertion and
// removal. The array stores pointers rather than objects.
// O(1) is achieved by making items inheriting from
// array_item_t<ID> class which internally stores the position
// in the array.
// The ID template argument is used to differentiate among arrays
// and thus let an object be stored in different arrays.
// Base class for objects stored in the array. If you want to store
// same object in mu
tl
iple arrays, each of those arrays has to have
// same object in mu
lt
iple arrays, each of those arrays has to have
// different ID. The item itself has to be derived from instantiations of
// array_item_t template for all relevant IDs.
...
...
@@ -74,9 +81,6 @@ namespace zmq
const
array_item_t
&
operator
=
(
const
array_item_t
&
);
};
// Fast array implementation with O(1) access to item, insertion and
// removal. Array stores pointers rather than objects. The objects have
// to be derived from array_item_t<ID> class.
template
<
typename
T
,
int
ID
=
0
>
class
array_t
{
...
...
src/pipe.hpp
View file @
cb1b6bc9
...
...
@@ -67,7 +67,7 @@ namespace zmq
// Note that pipe can be stored in three different arrays.
// The array of inbound pipes (1), the array of outbound pipes (2) and
// the generic array of pipes to
deallocate
(3).
// the generic array of pipes to
be deallocated
(3).
class
pipe_t
:
public
object_t
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment