.. _program_listing_file_include_flamegpu_simulation_detail_GenericMemoryVector.h: Program Listing for File GenericMemoryVector.h ============================================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/flamegpu/simulation/detail/GenericMemoryVector.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef INCLUDE_FLAMEGPU_SIMULATION_DETAIL_GENERICMEMORYVECTOR_H_ #define INCLUDE_FLAMEGPU_SIMULATION_DETAIL_GENERICMEMORYVECTOR_H_ #include #include #include #include #include #include #include "flamegpu/exception/FLAMEGPUException.h" namespace flamegpu { namespace detail { class GenericMemoryVector{ public: virtual ~GenericMemoryVector() { } virtual const std::type_index& getType() const = 0; virtual unsigned int getElements() const = 0; virtual size_t getTypeSize() const = 0; virtual size_t getVariableSize() const = 0; virtual void* getDataPtr() = 0; virtual const void* getReadOnlyDataPtr() const = 0; virtual GenericMemoryVector* clone() const = 0; virtual void resize(unsigned int t) = 0; }; // use this to store default values for a population, must be here to register the correct types at compile time typedef std::map> StateMemoryMap; typedef std::pair> StateMemoryMapPair; } // namespace detail } // namespace flamegpu #endif // INCLUDE_FLAMEGPU_SIMULATION_DETAIL_GENERICMEMORYVECTOR_H_