Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions src/atom_space/AtomSpace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,25 +150,6 @@ void AtomSpace::commit_changes(Scope scope) {
}

// -------------------------------------------------------------------------------------------------
shared_ptr<Context> AtomSpace::create_context(const string& context_name, Atom& atom_key) {
Context* context = new Context(context_name, atom_key);
return shared_ptr<Context>(context);
}

shared_ptr<Context> AtomSpace::create_context(const string& context_name) {
UntypedVariable v1("v1");
Context* context = new Context(context_name, v1);
return shared_ptr<Context>(context);
}

shared_ptr<Context> AtomSpace::create_context(
const string& context_name,
const vector<string>& query,
const vector<pair<QueryAnswerElement, QueryAnswerElement>> determiner_schema,
vector<QueryAnswerElement> stimulus_schema) {
Context* context = new Context(context_name, query, determiner_schema, stimulus_schema);
return shared_ptr<Context>(context);
}

// PRIVATE METHODS /////////////////////////////////////////////////////////////////////////////////

Expand Down
28 changes: 0 additions & 28 deletions src/atom_space/AtomSpace.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "AtomDBAPITypes.h"
#include "AtomDBSingleton.h"
#include "Context.h"
#include "Link.h"
#include "Node.h"
#include "PatternMatchingQueryProxy.h"
Expand Down Expand Up @@ -176,33 +175,6 @@ class AtomSpace {
*/
void commit_changes(Scope scope = LOCAL_AND_REMOTE);

/**
* Create and return a context object.
*
* Context objects are used to make queries in the atom space.
*
* @param name Context name.
* @param atom_key Key used to match toplevel atoms; only matching toplevel atoms will be considered.
* @return A newly created Context object.
*/
shared_ptr<Context> create_context(const string& context_name, Atom& atom_key);

shared_ptr<Context> create_context(
const string& context_name,
const vector<string>& query,
const vector<pair<QueryAnswerElement, QueryAnswerElement>> determiner_schema,
vector<QueryAnswerElement> stimulus_schema);

/**
* Create and return a context object passing UntypedVariable (which matches everything) as atom key.
*
* Context objects are used to make queries in the atom space.
*
* @param name Context name.
* @return A newly created Context object.
*/
shared_ptr<Context> create_context(const string& context_name);

protected:
shared_ptr<AtomDB> db; // to allow mocking in tests

Expand Down
16 changes: 0 additions & 16 deletions src/atom_space/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ cc_library(
hdrs = ["AtomSpace.h"],
includes = ["."],
deps = [
":context",
"//agents/query_engine:query_engine_lib",
"//atomdb:atomdb_api_types",
"//atomdb:atomdb_singleton",
Expand All @@ -19,18 +18,3 @@ cc_library(
"//service_bus:service_bus_lib",
],
)

cc_library(
name = "context",
srcs = ["Context.cc"],
hdrs = ["Context.h"],
includes = ["."],
deps = [
"//agents/query_engine:pattern_matching_query_proxy",
"//atomdb:atomdb_singleton",
"//attention_broker:attention_broker_client",
"//commons/atoms:atoms_lib",
"//hasher:hasher_lib",
"//service_bus:service_bus_lib",
],
)
203 changes: 0 additions & 203 deletions src/atom_space/Context.cc

This file was deleted.

51 changes: 0 additions & 51 deletions src/atom_space/Context.h

This file was deleted.

1 change: 0 additions & 1 deletion src/tests/cpp/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,6 @@ cc_test(
linkstatic = 1,
deps = [
"//agents/context_broker:context_broker_lib",
"//atom_space:context",
"//atomdb",
"//attention_broker:attention_broker_lib",
"//tests/cpp/test_commons",
Expand Down
Loading