• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef _PANDA_TYPE_PARAM_HPP__
17 #define _PANDA_TYPE_PARAM_HPP__
18 
19 #include "type_index.h"
20 #include "type_systems.h"
21 #include "type_type.h"
22 
23 namespace panda::verifier {
24 class TypeParams;
25 
26 class TypeParam : public TypeParamIdx {
27 public:
28     TypeParam() = delete;
29     TypeParam(TypeParam &&) = default;
30     TypeParam(const TypeParam &) = default;
31     TypeParam &operator=(TypeParam &&) = default;
32     TypeParam &operator=(const TypeParam &) = default;
33     ~TypeParam() = default;
34 
35     TypeParams operator>>(const TypeParam &p) const;
36     operator TypeParams() const;
37     operator Type() const;
38 
39 private:
40     TypeSystemKind kind_;
41     ThreadNum threadnum_;
42     TypeParam(TypeVariance v, const Type &t);
43     TypeParam(TypeSystemKind kind, ThreadNum threadnum, const TypeParamIdx &p);
44     friend class Type;
45     friend class TypeParams;
46 };
47 }  // namespace panda::verifier
48 
49 #endif  // !_PANDA_TYPE_PARAM_HPP__
50