|
| file (FILE *const handle) |
| Use the given FILE object. More...
|
|
| file () |
| Default construct.
|
|
template<ownership Ownership, feature ... Superset, class = is_superset_of_t<set<Superset ...>, set<Features ...>>> |
| file (file< Ownership, Superset ... > const ©) |
| Copy construct from another file type instance. More...
|
|
template<feature ... Superset, class = is_superset_of_t<set<Superset ...>, set<Features ...>>> |
| file (file< own, Superset ... > &&)=delete |
| Must not move construct from files with ownership of their handle. More...
|
|
template<ownership Ownership, feature ... Superset, class = is_superset_of_t<set<Superset ...>, set<Features ...>>> |
file & | operator= (file< Ownership, Superset ... > const ©) |
| Copy assign from another file type instance. More...
|
|
template<feature ... Superset, class = is_superset_of_t<set<Superset ...>, set<Features ...>>> |
file & | operator= (file< own, Superset ... > &&)=delete |
| Must not move assign from files with ownership of their handle. More...
|
|
FILE * | get () const |
| Provide the internal FILE object pointer. More...
|
|
| operator bool () const |
| Cast to boolean. More...
|
|
bool | eof () const |
| Return whether the file instance is in EOF state. More...
|
|
bool | error () const |
| Return whether the file instance is in an error state. More...
|
|
template<feature ... Features>
class sys::io::file< link, Features ... >
Specialise for FILE object linking file instances.
Lack of ownership implies some semantics:
- Cannot be used to open files
- Can be copy constructed/assigned from other owning and non-owning file instances
- Cannot be move constructed/assigned from owning file instances
- Cannot close()
- Template Parameters
-
Features | The set of file access features to support |
template<feature ... Features>
template<ownership Ownership, feature ... Superset, class = is_superset_of_t<set<Superset ...>, set<Features ...>>>
Copy construct from another file type instance.
The origin file type instance must support all features supported by this file type.
- Template Parameters
-
Ownership | The ownership status of the other file type |
Superset | The feature set of another file type |
Cond | Whether Superset is an actual superset of Features |
- Parameters
-
copy | The lvalue file to acquire the FILE object from |
template<feature ... Features>
template<ownership Ownership, feature ... Superset, class = is_superset_of_t<set<Superset ...>, set<Features ...>>>
Copy assign from another file type instance.
The origin file type instance must support all features supported by this file type.
- Template Parameters
-
Ownership | The ownership status of the other file type |
Superset | The feature set of another file type |
Cond | Whether Superset is an actual superset of Features |
- Parameters
-
copy | The lvalue file to acquire the FILE object from |
- Returns
- A self reference