33 #ifndef DART_COMMON_RESOURCE_HPP_
34 #define DART_COMMON_RESOURCE_HPP_
65 virtual std::size_t
tell() = 0;
79 virtual std::size_t
read(
void *_buffer, std::size_t _size, std::size_t _count) = 0;
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:52
@ SEEKTYPE_END
End of file.
Definition: Resource.hpp:54
@ SEEKTYPE_SET
Begining of file.
Definition: Resource.hpp:55
@ SEEKTYPE_CUR
Current position.
Definition: Resource.hpp:53
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:88
Definition: BulletCollisionDetector.cpp:63