Resource.hpp
Go to the documentation of this file.
1 // @formatter:off
2 //
3 // Balau core C++ library
4 //
5 // Copyright (C) 2008 Bora Software (contact@borasoftware.com)
6 //
7 // Licensed under the Boost Software License - Version 1.0 - August 17th, 2003.
8 // See the LICENSE file for the full license text.
9 //
10 
16 
17 #ifndef COM_BORA_SOFTWARE__BALAU_RESOURCE__RESOURCE
18 #define COM_BORA_SOFTWARE__BALAU_RESOURCE__RESOURCE
19 
20 namespace Balau::Resource {
21 
22 class Uri;
23 
30 class Resource {
34  public: virtual const Uri & uri() const = 0;
35 
39  public: virtual void close() = 0;
40 
44  public: virtual ~Resource() = default;
45 };
46 
47 } // namespace Balau::Resource
48 
49 #endif // COM_BORA_SOFTWARE__BALAU_RESOURCE__RESOURCE
Abstract base class of resource classes.
Definition: Resource.hpp:30
An abstract universal resource identifier.
Definition: Uri.hpp:131
The unified resource class hierarchy.
Definition: ByteReadResource.hpp:24
virtual ~Resource()=default
Destroy the resource instance.
virtual const Uri & uri() const =0
Get the URI associated with this resource.
virtual void close()=0
Close the stream(s) in the resource.