1 /* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
2 
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 TENSORFLOW_CC_SAVED_MODEL_EXPERIMENTAL_PUBLIC_SIGNATURE_DEF_FUNCTION_METADATA_H_
17 #define TENSORFLOW_CC_SAVED_MODEL_EXPERIMENTAL_PUBLIC_SIGNATURE_DEF_FUNCTION_METADATA_H_
18 
19 #include <memory>
20 
21 #include "tensorflow/c/experimental/saved_model/public/signature_def_function_metadata.h"
22 
23 namespace tensorflow {
24 namespace experimental {
25 namespace cc {
26 
27 // SignatureDefFunctionMetadata stores additional information on each input
28 // and output's names, dtypes, and shape.
29 class SignatureDefFunctionMetadata final {
30   // TODO(bmzhao): Add getters here as necessary.
31  private:
32   friend class SignatureDefFunction;
wrap(TF_SignatureDefFunctionMetadata * p)33   static SignatureDefFunctionMetadata* wrap(
34       TF_SignatureDefFunctionMetadata* p) {
35     return reinterpret_cast<SignatureDefFunctionMetadata*>(p);
36   }
unwrap(SignatureDefFunctionMetadata * p)37   static TF_SignatureDefFunctionMetadata* unwrap(
38       SignatureDefFunctionMetadata* p) {
39     return reinterpret_cast<TF_SignatureDefFunctionMetadata*>(p);
40   }
41 };
42 
43 }  // namespace cc
44 }  // namespace experimental
45 }  // namespace tensorflow
46 
47 #endif  // TENSORFLOW_CC_SAVED_MODEL_EXPERIMENTAL_PUBLIC_SIGNATURE_DEF_FUNCTION_METADATA_H_
48