EHS
ImgCodec.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
ehs/EHS.h
"
4
#include "
ehs/Str.h
"
5
#include "
ehs/io/File.h
"
6
7
namespace
ehs
8
{
9
class
Img;
10
class
ImgCodec;
11
12
typedef
bool (*
EncodeImgCb
)(
const
ImgCodec
*
const
,
Serializer<UInt_64>
&,
const
Img
*);
13
typedef
bool (*
DecodeImgCb
)(
const
ImgCodec
*
const
,
Serializer<UInt_64>
&,
Img
*);
14
15
class
EHS_LIB_IO
ImgCodec
16
{
17
private
:
18
Str_8
id;
19
UInt_64 hashExt;
20
Str_8
ext;
21
Endianness
endianness;
22
EncodeImgCb
encoder;
23
DecodeImgCb
decoder;
24
25
public
:
26
ImgCodec
();
27
28
ImgCodec
(
Str_8
id
,
Str_8
ext,
Endianness
end,
EncodeImgCb
encoder,
DecodeImgCb
decoder);
29
30
ImgCodec
(
ImgCodec
&& codec)
noexcept
;
31
32
ImgCodec
(
const
ImgCodec
& codec);
33
34
ImgCodec
& operator=(
ImgCodec
&& codec)
noexcept
;
35
36
ImgCodec
& operator=(
const
ImgCodec
& codec);
37
38
Str_8
GetId()
const
;
39
40
UInt_64 GetHashExt()
const
;
41
42
Str_8
GetExt()
const
;
43
44
Endianness
GetEndianness()
const
;
45
46
bool
Encode(
Serializer<UInt_64>
& out,
const
Img
* in)
const
;
47
48
bool
Decode(
Serializer<UInt_64>
& in,
Img
* out)
const
;
49
};
50
}
EHS.h
File.h
Str.h
ehs::ImgCodec
Definition:
ImgCodec.h:16
ehs::Img
Definition:
Img.h:17
ehs::Serializer< UInt_64 >
ehs::Str< Char_8, UInt_64 >
ehs
Definition:
Anchor.h:6
ehs::Endianness
Endianness
Definition:
CPU.h:21
ehs::EncodeImgCb
bool(* EncodeImgCb)(const ImgCodec *const, Serializer< UInt_64 > &, const Img *)
Definition:
ImgCodec.h:12
ehs::DecodeImgCb
bool(* DecodeImgCb)(const ImgCodec *const, Serializer< UInt_64 > &, Img *)
Definition:
ImgCodec.h:13
include
ehs
io
img
ImgCodec.h
Generated by
1.9.4