| 1 |
/****************************************************************************** |
| 2 |
This source file is part of the Avogadro project. |
| 3 |
This source code is released under the 3-Clause BSD License, (see "LICENSE"). |
| 4 |
******************************************************************************/ |
| 5 |
|
| 6 |
#ifndef AVOGADRO_CORE_RINGPERCEIVER_H |
| 7 |
#define AVOGADRO_CORE_RINGPERCEIVER_H |
| 8 |
|
| 9 |
#include "avogadrocoreexport.h" |
| 10 |
|
| 11 |
#include <cstddef> |
| 12 |
#include <vector> |
| 13 |
|
| 14 |
namespace Avogadro::Core { |
| 15 |
|
| 16 |
class Molecule; |
| 17 |
|
| 18 |
class AVOGADROCORE_EXPORT RingPerceiver |
| 19 |
{ |
| 20 |
public: |
| 21 |
// construction and destruction |
| 22 |
explicit RingPerceiver(const Molecule* m = nullptr); |
| 23 |
~RingPerceiver() = default; |
| 24 |
|
| 25 |
// properties |
| 26 |
void setMolecule(const Molecule* m); |
| 27 |
const Molecule* molecule() const; |
| 28 |
|
| 29 |
// ring perception |
| 30 |
std::vector<std::vector<size_t>>& rings(); |
| 31 |
|
| 32 |
private: |
| 33 |
bool m_ringsPerceived; |
| 34 |
const Molecule* m_molecule; |
| 35 |
std::vector<std::vector<size_t>> m_rings; |
| 36 |
}; |
| 37 |
|
| 38 |
} // namespace Avogadro::Core |
| 39 |
|
| 40 |
#endif // AVOGADRO_CORE_RINGPERCEIVER_H |