| … | … | @@ -57,6 +57,9 @@ class AtomSpace : public Frame |
| 57 | 57 | static const bool CHECK_VALUES = true; |
| 58 | 58 | static const bool DONT_CHECK_VALUES = false; |
| 59 | 59 | |
| 60 | bool _read_only; |
| 61 | bool _copy_on_write; |
| 62 | |
| 60 | 63 | /** |
| 61 | 64 | * Drop copy constructor and equals operator to |
| 62 | 65 | * prevent accidental copying of large objects. |
| … | … | @@ -64,9 +67,17 @@ class AtomSpace : public Frame |
| 64 | 67 | AtomSpace& operator=(const AtomSpace&) = delete; |
| 65 | 68 | AtomSpace(const AtomSpace&) = delete; |
| 66 | 69 | |
| 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(); |
| 70 | 81 | |
| 71 | 82 | #if USE_INCOME_INDEX |
| 72 | 83 | // This is never used, and remains here for historical reference. |
| … | … | @@ -83,26 +94,15 @@ public: |
| 83 | 94 | private: |
| 84 | 95 | #endif |
| 85 | 96 | |
| 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; |
| 97 | 100 | |
| 98 | 101 | /** Find out about atom type additions in the NameServer. */ |
| 99 | 102 | NameServer& _nameserver; |
| 100 | 103 | int addedTypeConnection; |
| 101 | 104 | void typeAdded(Type); |
| 102 | 105 | |
| 103 | | void init(); |
| 104 | | void clear_all_atoms(); |
| 105 | | |
| 106 | 106 | /** |
| 107 | 107 | * Private: add an atom to the table. This skips the read-only |
| 108 | 108 | * check. |