OSDN Git Service

Add WinMergePluginBase.h (2)
[winmerge-jp/winmerge-jp.git] / Src / FileLocation.h
1 /** 
2  * @file FileLocation.h
3  *
4  * @brief Declaration for FileLocation class.
5  *
6  */
7 #pragma once
8
9 #include "FileTextEncoding.h"
10
11 /**
12  * @brief A structure containing file's path and encoding information.
13  */
14 struct FileLocation
15 {
16         String filepath; /**< Full path for the file. */
17         FileTextEncoding encoding; /**< Encoding info for the file. */
18
19         /**
20          * The default constructor.
21          */
22         FileLocation()
23         {
24         }
25
26         /**
27          * The constructor taking a path as a parameter.
28          * @param [in] path Full path for the file.
29          */
30         explicit FileLocation(const String& path) : filepath(path)
31         {
32         }
33
34 // Methods
35
36         /**
37          * Set the file path.
38          * @param [in] sFilePath Full path for the file.
39          */
40         void setPath(const String & sFilePath) { this->filepath = sFilePath; }
41
42 // Copy constructor & copy operator should do the obvious correct things
43 };