plugin
0.1.0
src
common
models
include
models
internal_model_data.h
1
/*
2
// Copyright (C) 2020-2024 Intel Corporation
3
//
4
// Licensed under the Apache License, Version 2.0 (the "License");
5
// you may not use this file except in compliance with the License.
6
// You may obtain a copy of the License at
7
//
8
// http://www.apache.org/licenses/LICENSE-2.0
9
//
10
// Unless required by applicable law or agreed to in writing, software
11
// distributed under the License is distributed on an "AS IS" BASIS,
12
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
// See the License for the specific language governing permissions and
14
// limitations under the License.
15
*/
16
17
#pragma once
18
19
struct
InternalModelData
{
20
virtual
~
InternalModelData
() {}
21
22
template
<
class
T>
23
T& asRef() {
24
return
dynamic_cast<
T&
>
(*this);
25
}
26
27
template
<
class
T>
28
const
T& asRef()
const
{
29
return
dynamic_cast<
const
T&
>
(*this);
30
}
31
};
32
33
struct
InternalImageModelData
:
public
InternalModelData
{
34
InternalImageModelData
(
int
width,
int
height) : inputImgWidth(width), inputImgHeight(height) {}
35
36
int
inputImgWidth;
37
int
inputImgHeight;
38
};
39
40
struct
InternalScaleData
:
public
InternalImageModelData
{
41
InternalScaleData
(
int
width,
int
height,
float
scaleX,
float
scaleY)
42
:
InternalImageModelData
(width, height),
43
scaleX(scaleX),
44
scaleY(scaleY) {}
45
46
float
scaleX;
47
float
scaleY;
48
};
InternalImageModelData
Definition:
internal_model_data.h:33
InternalModelData
Definition:
internal_model_data.h:19
InternalScaleData
Definition:
internal_model_data.h:40
Generated by
1.9.1