Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
senf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wiback
senf
Commits
13fcd5f8
Commit
13fcd5f8
authored
16 years ago
by
g0dil
Browse files
Options
Downloads
Patches
Plain Diff
Utils/Logger: Extend Target routing API
parent
863db753
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Utils/Logger/Target.cc
+13
-0
13 additions, 0 deletions
Utils/Logger/Target.cc
Utils/Logger/Target.cci
+18
-0
18 additions, 0 deletions
Utils/Logger/Target.cci
Utils/Logger/Target.hh
+8
-0
8 additions, 0 deletions
Utils/Logger/Target.hh
with
39 additions
and
0 deletions
Utils/Logger/Target.cc
+
13
−
0
View file @
13fcd5f8
...
...
@@ -85,6 +85,8 @@ prefix_ void senf::log::Target::unroute(std::string const & stream, std::string
prefix_
void
senf
::
log
::
Target
::
unroute
(
int
index
)
{
if
(
rib_
.
empty
())
return
;
RIB
::
iterator
i
;
if
(
index
<
0
)
{
if
(
RIB
::
size_type
(
-
index
)
>=
rib_
.
size
())
...
...
@@ -110,6 +112,17 @@ prefix_ void senf::log::Target::unroute(int index)
updateRoutingCache
(
entry
.
stream_
,
entry
.
area_
);
}
prefix_
void
senf
::
log
::
Target
::
clear
()
{
RIB
old
;
rib_
.
swap
(
old
);
RIB
::
const_iterator
i
(
old
.
begin
());
RIB
::
const_iterator
const
i_end
(
old
.
end
());
for
(;
i
!=
i_end
;
++
i
)
if
(
i
->
action_
==
ACCEPT
)
updateRoutingCache
(
i
->
stream_
,
i
->
area_
)
}
////////////////////////////////////////
// private members
...
...
This diff is collapsed.
Click to expand it.
Utils/Logger/Target.cci
+
18
−
0
View file @
13fcd5f8
...
...
@@ -56,6 +56,24 @@ prefix_ senf::log::Target::iterator senf::log::Target::end()
return rib_.end();
}
prefix_ RoutingEntry const & senf::log::Target::operator[](size_type i)
size_type size() const
{
return rib_[i];
}
prefix_ RoutingEntry const & senf::log::Target::operator[](size_type i)
size_type size() const
{
return rib_.size();
}
prefix_ bool senf::log::Target::empty()
const
{
return rib_.empty();
}
///////////////////////////////////////////////////////////////////////////
// senf::log::Target::RoutingEntry
...
...
This diff is collapsed.
Click to expand it.
Utils/Logger/Target.hh
+
8
−
0
View file @
13fcd5f8
...
...
@@ -179,6 +179,7 @@ namespace log {
public
:
typedef
RIB
::
const_iterator
iterator
;
///< Routing table iterator
typedef
RIB
::
size_type
size_type
;
///////////////////////////////////////////////////////////////////////////
///\name Structors and default members
...
...
@@ -332,6 +333,13 @@ namespace log {
iterator
begin
()
const
;
///< Iterator to beginning of routing table
iterator
end
()
const
;
///< Iterator past the end of routing table
RoutingEntry
const
&
operator
[](
size_type
i
)
///< Access routing entry
size_type
size
()
const
;
///< Number of routing table entries
bool
empty
()
const
;
///< \c true, if routing table empty, \c false otherwise
void
clear
();
///< Clear routing table
private
:
void
route
(
detail
::
StreamBase
const
*
stream
,
detail
::
AreaBase
const
*
area
,
unsigned
level
,
action_t
action
,
int
index
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment