template class rgpot::registry

Overview

Static registry for instance tracking and statistics. More…

#include <PotHelpers.hpp>
 
template <typename T>
class registry {
public:
    // fields
 
    static size_t count;
    static size_t forceCalls;
    static T* head;
    T* prev;
    T* next;
 
    // methods
 
    static void incrementForceCalls();
 
protected:
    // construction
 
    ~registry();
};

Detailed Documentation

Static registry for instance tracking and statistics.

The registry uses a linked list to track all active instances of a derived potential class.

Fields

static size_t count

Total number of active instances.

static size_t forceCalls

Global counter for force evaluations.

static T* head

Pointer to the head of the linked list.

T* prev

Pointer to the previous instance in the list.

T* next

Pointer to the next instance in the list.

Construction

~registry()

Destructor.

Methods

static void incrementForceCalls()

Increments the force call counter.

Returns:

Void.