Skip to content

Instantly share code, notes, and snippets.

Created January 7, 2015 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/ac7792ac4da7f5e2dc71 to your computer and use it in GitHub Desktop.
Save anonymous/ac7792ac4da7f5e2dc71 to your computer and use it in GitHub Desktop.
template<class TWrapperType, typename THandleType>
class handle_vector
{
public:
void push_back(TWrapperType const &wrapper_obj) { m_handles.push_back(wrapper_obj.get_handle());}
uint32_t count() const { return m_handles.size(); }
const THandleType *data() const { return &m_handles[0]; }
private:
std::vector<THandleType> m_handles;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment