1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
9 static const char kPathSeparator =
10 #if defined _WIN32 || defined __CYGWIN__
17 std::stringstream _rel_path;
18 mutable std::string _abs_path;
22 ModelsPath() = default;
24 ModelsPath(const ModelsPath & that) {
25 _rel_path << that._rel_path.str();
29 ModelsPath operator + (const T & relative_path) const {
30 ModelsPath newPath(*this);
31 newPath += relative_path;
36 ModelsPath & operator += (const T & relative_path) {
37 _rel_path << relative_path;
42 ModelsPath & operator << (const T & serializable) {
43 _rel_path << serializable;
47 std::string str() const {
48 return this->operator std::string();
51 const char * c_str() const {
52 _abs_path = this->operator std::string ();
53 return _abs_path.c_str();
56 operator std::string() const;
59 inline std::ostream & operator << (std::ostream &os, const ModelsPath & path) {