winss
pipe_name.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2016-2017 Morgan Stanley
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 #ifndef LIB_WINSS_PIPE_NAME_HPP_
18 #define LIB_WINSS_PIPE_NAME_HPP_
19 
20 #include <filesystem>
21 #include <string>
22 
23 namespace fs = std::experimental::filesystem;
24 
25 namespace winss {
32 class PipeName {
33  protected:
34  std::string name;
37  PipeName() {}
38 
39  public:
45  explicit PipeName(fs::path path);
46 
53  PipeName(fs::path path, std::string name);
54 
60  PipeName(const PipeName& p);
61 
67  PipeName(PipeName&& p);
68 
75  PipeName Append(const std::string& name) const;
76 
82  const std::string& Get() const;
83 
90  PipeName& operator=(const PipeName& p);
91 
99 };
100 } // namespace winss
101 
102 #endif // LIB_WINSS_PIPE_NAME_HPP_
PipeName()
The final pipe name.
Definition: pipe_name.hpp:37
PipeName Append(const std::string &name) const
Append an additional name to the current pipe.
Definition: pipe_name.cpp:41
std::string name
Definition: pipe_name.hpp:34
Pipe names are based on file system paths.
Definition: pipe_name.hpp:32
Definition: case_ignore.hpp:23
const std::string & Get() const
Gets the pipe name as a string.
Definition: pipe_name.cpp:52
PipeName & operator=(const PipeName &p)
Copy another pipe name to this pipe name.
Definition: pipe_name.cpp:57