OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
HandleSeqIndex.cc
Go to the documentation of this file.
1
/*
2
* opencog/atomspace/HandleSeqIndex.cc
3
*
4
* Copyright (C) 2008,2009 Linas Vepstas <linasvepstas@gmail.com>
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU Affero General Public License v3 as
8
* published by the Free Software Foundation and including the exceptions
9
* at http://opencog.org/wiki/Licenses
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU Affero General Public License
17
* along with this program; if not, write to:
18
* Free Software Foundation, Inc.,
19
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
*/
21
22
#include <
opencog/atomspace/HandleSeqIndex.h
>
23
24
using namespace
opencog;
25
26
void
HandleSeqIndex::remove
(
bool
(*filter)(
const
Handle
&))
27
{
28
std::map<const HandleSeq,Handle>::iterator i, j;
29
30
i =
idx
.begin();
31
while
(i !=
idx
.end())
32
{
33
j = i;
34
++i;
35
if
(filter(j->second))
36
idx
.erase(j->first);
37
}
38
}
opencog::HandleSeqIndex::idx
std::map< const HandleSeq, Handle, handle_seq_less > idx
Definition:
HandleSeqIndex.h:53
HandleSeqIndex.h
opencog::Handle
Definition:
Handle.h:53
opencog::HandleSeqIndex::remove
void remove(const HandleSeq &seq)
Definition:
HandleSeqIndex.h:67
opencog
atomspace
HandleSeqIndex.cc
Generated on Sat Aug 22 2015 21:00:13 for OpenCog Framework by
1.8.6