OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-atomspace commits / 41fe303

Rearrange AtomSpace header. Movement only, no change.
Trying to shuffle for maintainability by functional grouping
41fe303f89c129779bf064ba7ad63d1a014f4d06
by Linas Vepštas <linasvepstas@gmail.com> · 2026-01-21T01:01:22.000Z

Changed files (1) +17 -17

opencog/atomspace/AtomSpace.h +17 -17
……@@ -57,6 +57,9 @@ class AtomSpace : public Frame
5757 static const bool CHECK_VALUES = true;
5858 static const bool DONT_CHECK_VALUES = false;
5959
60 bool _read_only;
61 bool _copy_on_write;
62
6063 /**
6164 * Drop copy constructor and equals operator to
6265 * prevent accidental copying of large objects.
……@@ -64,9 +67,17 @@ class AtomSpace : public Frame
6467 AtomSpace& operator=(const AtomSpace&) = delete;
6568 AtomSpace(const AtomSpace&) = delete;
6669
67 // --------------------------------------------------
68 //! Index of atoms.
69 TypeIndex typeIndex;
70 /// Base AtomSpaces wrapped by this space. Empty if top-level.
71 /// This AtomSpace will behave like the set-union of the base
72 /// atomspaces in the `_environ`: it exposes all Atoms in those
73 /// bases, plus also anything in this AtomSpace.
74 // Both _environ and _outgoing contain exactly the same pointers;
75 // we keep two distinct lists to avoid the CPU overhead of casting
76 // between the two different pointer types (its significant).
77 std::vector<AtomSpacePtr> _environ;
78
79 void init();
80 void clear_all_atoms();
7081
7182#if USE_INCOME_INDEX
7283 // This is never used, and remains here for historical reference.
……@@ -83,26 +94,15 @@ public:
8394private:
8495#endif
8596
86 bool _read_only;
87 bool _copy_on_write;
88
89 /// Base AtomSpaces wrapped by this space. Empty if top-level.
90 /// This AtomSpace will behave like the set-union of the base
91 /// atomspaces in the `_environ`: it exposes all Atoms in those
92 /// bases, plus also anything in this AtomSpace.
93 // Both _environ and _outgoing contain exactly the same pointers;
94 // we keep two distinct lists to avoid the CPU overhead of casting
95 // between the two different pointer types (its significant).
96 std::vector<AtomSpacePtr> _environ;
97 // --------------------------------------------------
98 //! Index of atoms.
99 TypeIndex typeIndex;
97100
98101 /** Find out about atom type additions in the NameServer. */
99102 NameServer& _nameserver;
100103 int addedTypeConnection;
101104 void typeAdded(Type);
102105
103 void init();
104 void clear_all_atoms();
105
106106 /**
107107 * Private: add an atom to the table. This skips the read-only
108108 * check.