2020-09-16 01:28:32 -05:00
|
|
|
#ifndef STORM_LIST_TS_GET_LINK_HPP
|
|
|
|
|
#define STORM_LIST_TS_GET_LINK_HPP
|
|
|
|
|
|
2020-11-01 17:45:45 -06:00
|
|
|
#include "storm/list/TSLink.hpp"
|
|
|
|
|
#include "storm/list/TSLinkedNode.hpp"
|
2020-09-16 01:28:32 -05:00
|
|
|
#include <cstddef>
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
|
class TSGetLink {
|
|
|
|
|
public:
|
|
|
|
|
// Static functions
|
|
|
|
|
static TSLink<T>* Link(const TSLinkedNode<T>* nodeptr, ptrdiff_t linkoffset);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
|
TSLink<T>* TSGetLink<T>::Link(const TSLinkedNode<T>* nodeptr, ptrdiff_t linkoffset) {
|
|
|
|
|
return reinterpret_cast<TSLink<T>*>(reinterpret_cast<uintptr_t>(nodeptr));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|