acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
stdio_file.h
1
#pragma once
2
3
4
#include "acme/filesystem/file/text_file.h"
5
6
7
#include <stdio.h>
8
9
10
class
CLASS_DECL_ACME stdio_file:
11
virtual
public
::file::text_file
12
{
13
public
:
14
15
16
// enum enum_flag
17
// {
18
//
19
// e_flag_none = 0,
20
// e_flag_no_exception_if_not_found = 1,
21
// e_flag_file_not_found = 2,
22
//
23
// };
24
25
//using e_flag = enumeration < enum_flag >;
26
27
28
FILE * m_pfile;
29
//e_flag m_eflag;
30
31
32
stdio_file();
33
explicit
stdio_file(FILE * pfile);
34
~stdio_file()
override
;
35
36
37
filesize get_position()
const override
;
38
::file::file_status
get_status()
const override
;
39
::file::path
get_file_path()
const override
;
40
41
42
void
open
(const ::file::path & path, ::file::e_open eopen, ::pointer < ::file::exception > * pfileexception =
nullptr
)
override
;
43
virtual
void
open
(const ::file::path & path, const ::scoped_string & scopedstrAttributes, ::i32 iShare);
44
45
46
void
translate(filesize offset, ::enum_seek eseek)
override
;
47
void
set_size(filesize dwNewLen)
override
;
48
filesize size()
const override
;
49
50
51
void
lock(filesize dwPos,filesize dwCount)
override
;
52
void
unlock(filesize dwPos,filesize dwCount)
override
;
53
54
void
flush
()
override
;
55
void
close()
override
;
56
57
58
using
::file::text_file::read;
59
memsize read(
void
* p, ::memsize s)
override
;
60
61
62
::i32 get_unsigned_char()
override
;
63
::i32 peek_byte()
override
;
64
void
put_byte_back(::u8 b)
override
;
65
66
using
::file::file::write;
67
void
write(
const
void
* p, ::memsize s)
override
;
68
69
string
get_location()
const override
;
70
71
bool
is_opened()
const override
;
72
73
class
c_errno c_errno() const;
74
75
[[noreturn]]
void
throw_exception(const ::scoped_string & scopedstr);
76
77
};
78
79
80
81
CLASS_DECL_ACME ::pointer<stdio_file> stdio_open(
::particle
* pparticle, const ::file::path & path,
const
scoped_string & attrs, ::i32 iShare);
82
83
84
::e_status
fgets_string(
string
& str, FILE * pfile, memsize iBufferSize = 1024);
85
86
87
CLASS_DECL_ACME
void
__cdecl __clearerr_s(FILE *
stream
);
88
89
90
#include "acme/prototype/prototype/holder.h"
91
92
93
CLASS_DECL_ACME
void
destroy_pointer(FILE * p);
94
95
96
using
FILE_holder = holder < FILE >;
e_status
Definition
e_status.h:30
file::file::flush
void flush() override
Definition
file.cpp:192
file::file::open
virtual void open(const ::file::path &path, ::file::e_open eopen, ::pointer< ::file::exception > *pfileexception=nullptr)
Definition
file.cpp:109
file::path
Definition
path.h:52
file::text_file
Definition
text_file.h:13
particle
Definition
particle.h:95
stream
Definition
___serialization_draft.h:42
file::file_status
Definition
status.h:12
operating_system
shared_posix
stdio_file.h
Generated by
1.17.0