33 #ifndef DART_COMMON_RESOURCE_HPP_
34 #define DART_COMMON_RESOURCE_HPP_
66 virtual std::size_t
tell() = 0;
80 virtual std::size_t
read(
void* _buffer, std::size_t _size, std::size_t _count)
Resource provides file-like access to a resource loaded from URI.
Definition: Resource.hpp:49
virtual std::size_t tell()=0
Return the current value of the position indicator.
virtual std::string readAll()
Reads all data from this resource, and returns it as a string.
Definition: Resource.cpp:43
virtual std::size_t read(void *_buffer, std::size_t _size, std::size_t _count)=0
Read _count element, each of size _size, into _buffer.
SeekType
Position to seek relative to.
Definition: Resource.hpp:53
@ SEEKTYPE_END
End of file.
Definition: Resource.hpp:55
@ SEEKTYPE_SET
Begining of file.
Definition: Resource.hpp:56
@ SEEKTYPE_CUR
Current position.
Definition: Resource.hpp:54
virtual std::size_t getSize()=0
Return the size of the resource, in bytes.
virtual bool seek(ptrdiff_t _offset, SeekType _origin)=0
Set the position indicator to a new position.
virtual ~Resource()=default
std::shared_ptr< Resource > ResourcePtr
Definition: Resource.hpp:90
Definition: BulletCollisionDetector.cpp:65