-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTool.hpp
57 lines (43 loc) · 1.35 KB
/
Tool.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
////////////////////////////////////////////////////////////////////////////////
//! \file Tool.hpp
//! \brief The Tool class declaration.
//! \author Chris Oldwood
// Check for previous inclusion
#ifndef APP_TOOL_HPP
#define APP_TOOL_HPP
#if _MSC_VER > 1000
#pragma once
#endif
#include <Core/SharedPtr.hpp>
////////////////////////////////////////////////////////////////////////////////
//! The defintion of an external tool that can be launched for a host.
class Tool
{
public:
//! Default constructor.
Tool();
//! Constructor.
Tool(const tstring& name, const tstring& commandLine);
//
// Members.
//
tstring m_name; //! The unique name for the tool.
tstring m_commandLine; //! The command line to invoke.
};
//! The default Tool smart pointer type.
typedef Core::SharedPtr<Tool> ToolPtr;
//! The default Tool const smart pointer type.
typedef Core::SharedPtr<const Tool> ConstToolPtr;
////////////////////////////////////////////////////////////////////////////////
//! Create a new tool.
inline ConstToolPtr makeTool(const tstring& name, const tstring& commandLine)
{
return ConstToolPtr(new Tool(name, commandLine));
}
////////////////////////////////////////////////////////////////////////////////
//! Create a tool by copying another.
inline ConstToolPtr makeTool(const Tool& rhs)
{
return ConstToolPtr(new Tool(rhs));
}
#endif // APP_TOOL_HPP