什么应该进入。h文件?

时间:2021-04-29 15:04:23

When dividing your code up into multiple files just what exactly should go into an .h file and what should go into a .cpp file?

当把你的代码分割成多个文件时,究竟应该进入一个.h文件,什么应该进入。cpp文件呢?

12 个解决方案

#1


77  

Header files (.h) are designed to provide the information that will be needed in multiple files. Things like class declarations, function prototypes, and enumerations typically go in header files. In a word, "definitions".

头文件(.h)旨在提供在多个文件中需要的信息。类声明、函数原型和枚举之类的东西通常会进入头文件。总之,“定义”。

Code files (.cpp) are designed to provide the implementation information that only needs to be known in one file. In general, function bodies, and internal variables that should/will never be accessed by other modules, are what belong in .cpp files. In a word, "implementations".

代码文件(.cpp)旨在提供只需要在一个文件中知道的实现信息。一般来说,函数体和应该/永远不会被其他模块访问的内部变量,都属于.cpp文件。总之,“实现”。

The simplest question to ask yourself to determine what belongs where is "if I change this, will I have to change code in other files to make things compile again?" If the answer is "yes" it probably belongs in the header file; if the answer is "no" it probably belongs in the code file.

最简单的问题是:“如果我更改了这个,我是否需要更改其他文件中的代码,使之重新编译?”如果答案是“是”,它可能属于头文件;如果答案是“不”,它可能属于代码文件。

#2


40  

Fact is, in C++, this is somewhat more complicated that the C header/source organization.

事实上,在c++中,这比C头/源组织要复杂得多。

What does the compiler see?

The compiler sees one big source (.cpp) file with its headers properly included. The source file is the compilation unit that will be compiled into an object file.

编译器看到一个大的源代码(.cpp)文件,其中包含了正确的标题。源文件是将被编译成对象文件的编译单元。

So, why are headers necessary?

Because one compilation unit could need information about an implementation in another compilation unit. So one can write for example the implementation of a function in one source, and write the declaration of this function in another source needing to use it.

因为一个编译单元可能需要有关另一个编译单元中的实现的信息。因此,可以在一个源中编写一个函数的实现,并在另一个需要使用它的源中编写这个函数的声明。

In this case, there are two copies of the same information. Which is evil...

在这种情况下,同一信息有两份副本。这是邪恶的…

The solution is to share some details. While the implementation should remain in the Source, the declaration of shared symbols, like functions, or definition of structures, classes, enums, etc., could need to be shared.

解决方案是分享一些细节。虽然实现应该保留在源代码中,但是共享符号的声明,如函数,或结构、类、枚举等的定义,都需要共享。

Headers are used to put those shared details.

标头用于放置那些共享的细节。

Move to the header the declarations of what need to be shared between multiple sources

向报头移动需要在多个源之间共享的声明。

Nothing more?

In C++, there are some other things that could be put in the header because, they need, too, be shared:

在c++中,还有一些其他的东西可以放到header中,因为它们也需要被共享:

  • inline code
  • 内联代码
  • templates
  • 模板
  • constants (usually those you want to use inside switches...)
  • 常量(通常是那些你想在开关中使用的…)

Move to the header EVERYTHING what need to be shared, including shared implementations

移动到header中所有需要共享的内容,包括共享实现。

Does it then mean that there could be sources inside the headers?

Yes. In fact, there are a lot of different things that could be inside a "header" (i.e. shared between sources).

是的。事实上,有很多不同的东西可以在“header”中(即在源之间共享)。

  • Forward declarations
  • 提出声明
  • declarations/definition of functions/structs/classes/templates
  • 函数的声明/定义/结构/类/模板
  • implementation of inline and templated code
  • 实现内联和模板代码。

It becomes complicated, and in some cases (circular dependencies between symbols), impossible to keep it in one header.

它变得复杂,在某些情况下(符号之间的循环依赖关系),不可能将其保存在一个标题中。

Headers can be broken down into three parts

This means that, in an extreme case, you could have:

这意味着,在极端情况下,你可以:

  • a forward declaration header
  • 一个前置声明头
  • a declaration/definition header
  • 声明/定义标题
  • an implementation header
  • 一个实现头
  • an implementation source
  • 一个实现源

Let's imagine we have a templated MyObject. We could have:

假设有一个模板化的MyObject。我们可以:

// - - - - MyObject_forward.hpp - - - - 
// This header is included by the code which need to know MyObject
// does exist, but nothing more.
template<typename T>
class MyObject ;

.

// - - - - MyObject_declaration.hpp - - - - 
// This header is included by the code which need to know how
// MyObject is defined, but nothing more.
#include <MyObject_forward.hpp>

template<typename T>
class MyObject
{
   public :
      MyObject() ;
   // Etc.
} ;

void doSomething() ;

.

// - - - - MyObject_implementation.hpp - - - - 
// This header is included by the code which need to see
// the implementation of the methods/functions of MyObject,
// but nothing more.
#include <MyObject_declaration.hpp>

template<typename T>
MyObject<T>::MyObject()
{
   doSomething() ;
}

// etc.

.

// - - - - MyObject_source.cpp - - - - 
// This source will have implementation that does not need to
// be shared, which, for templated code, usually means nothing...
#include <MyObject_implementation.hpp>

void doSomething()
{
   // etc.
} ;

// etc.

Wow!

In the "real life", it is usually less complicated. Most code will have only a simple header/source organisation, with some inlined code in the source.

在“现实生活”中,它通常不那么复杂。大多数代码只有一个简单的头/源组织,源代码中有一些内联代码。

But in other cases (templated objects knowing each others), I had to have for each object separate declaration and implementation headers, with an empty source including those headers just to help me see some compilation errors.

但是,在其他情况下(模板对象相互了解),我必须为每个对象独立的声明和实现头,以及一个空的源,包括那些头,以帮助我看到一些编译错误。

Another reason to break down headers into separate headers could be to speed up the compilation, limiting the quantity of symbols parsed to the strict necessary, and avoiding unecessary recompilation of a source who cares only for the forward declaration when an inline method implementation changed.

另一个将消息头分解成独立标题的原因可能是加速编译,将符号的数量限制在严格的必要条件下,并且避免不必要的重新编译源代码,当内联方法实现更改时,该源只关心前面的声明。

Conclusion

You should make your code organization both as simple as possible, and as modular as possible. Put as much as possible in the source file. Only expose in headers what needs to be shared.

您应该使您的代码组织尽可能简单,并且尽可能模块化。在源文件中尽可能多地放置。只在头文件中公开需要共享的内容。

But the day you'll have circular dependancies between templated objects, don't be surprised if your code organization becomes somewhat more "interesting" that the plain header/source organization...

但是,如果您的代码组织变得更加“有趣”,即普通的头/源组织,那么您将会在模板化对象之间建立循环依赖关系。

^_^

^ _ ^

#3


14  

in addition to all other answers, i will tell you what you DON'T place in a header file:
using declaration (the most common being using namespace std;) should not appear in a header file because they pollute the namespace of the source file in which it is included.

除了所有其他的答案之外,我还将告诉您在头文件中没有放置的内容:使用声明(使用名称空间std的最常用的方法)不应该出现在头文件中,因为它们污染了包含它的源文件的名称空间。

#4


5  

What compiles into nothing (zero binary footprint) goes into header file.

什么编译成什么都没有(零二进制占用)进入头文件。

Variables do not compile into nothing, but type declarations do (coz they only describe how variables behave).

变量不能编译成任何东西,但是类型声明可以(因为它们只描述变量的行为)。

functions do not, but inline functions do (or macros), because they produce code only where called.

函数不会,但是内联函数会(或宏),因为它们只在调用的地方生成代码。

templates are not code, they are only a recipe for creating code. so they also go in h files.

模板不是代码,它们只是创建代码的一种方法。所以他们也使用h文件。

#5


3  

In general, you put declarations in the header file and definitions in the implementation (.cpp) file. The exception to this is templates, where the definition must also go in the header.

一般情况下,您将声明放入实现(.cpp)文件中的头文件和定义中。这里的例外是模板,它的定义也必须在header中进行。

This question and ones similar to it has been asked frequently on SO - see Why have header files and .cpp files in C++? and C++ Header Files, Code Separation for example.

这个问题和类似的问题经常被问到,为什么在c++中有头文件和。cpp文件?还有c++头文件,比如代码分离。

#6


1  

Your class and function declarations plus the documentation, and the definitions for inline functions/methods (although some prefer to put them in separate .inl files).

您的类和函数声明加上文档,以及内联函数/方法的定义(尽管有些人喜欢将它们放在独立的.inl文件中)。

#7


1  

Mainly header file contain class skeleton or declaration (does not change frequently)

主要的头文件包含类骨架或声明(不经常更改)

and cpp file contains class implementation (changes frequently).

cpp文件包含类实现(经常更改)。

#8


0  

the header file (.h) should be for declarations of classes, structs and its methods, prototypes, etc. The implementation of those objects are made in cpp.

头文件(.h)应该用于声明类、结构及其方法、原型等。这些对象的实现是在cpp中完成的。

in .h

. h中

    class Foo {
    int j;

    Foo();
    Foo(int)
    void DoSomething();
}

#9


0  

I'd expect to see:

我希望看到:

  • declarations
  • 声明
  • comments
  • 评论
  • definitions marked inline
  • 定义为内联
  • templates
  • 模板

the really answer though is what not to put in:

真正的答案是:

  • definitons (can lead to things being multiply defined)
  • 定义(可以导致事物的乘法定义)
  • using declarations/directives (forces them on anyone including your header, can cause name*es)
  • 使用声明/指令(将它们强加于任何人,包括您的头,可以导致name*es)

#10


0  

The header Defines something but doesn't tell anything about the implementation. ( Excluding Templates in this "metafore".

header定义了一些东西,但是没有说明任何关于实现的内容。(不包括在这个“metafore”中的模板。

With that said, you need to divide "definitions" into sub-groups, there are, in this case, two types of definitions.

这样说,您需要将“定义”划分为子组,在本例中,有两种定义。

  • You define the "layout" of your strucutre, telling only as much as is needed by the surrounding usage groups.
  • 您定义了您的结构的“布局”,只告诉您周围的使用组所需要的内容。
  • The definitions of a variable, function and a class.
  • 变量、函数和类的定义。

Now, I am of course talking about the first subgroup.

现在,我当然是在讨论第一个子群。

The header is there to define the layout of your structure in order to help the rest of the software use the implementation. You might want to see it as an "abstraction" of your implementation, which is vaughly said but, I think it suits quite well in this case.

标题是用来定义您的结构的布局,以帮助其他的软件使用实现。您可能希望将其视为实现的“抽象”,这是vaughly说的,但是,我认为在这种情况下它很适合。

As previous posters have said and shown you declare private and public usage areas and their headers, this also includes private and public variables. Now, I don't want to go into design of the code here but, you might want to consider what you put in your headers, since that is the Layer between the end user and the implementation.

正如前面的海报所述,并显示您声明私有和公共使用区域及其头,这也包括私有和公共变量。现在,我不想在这里设计代码,但是,你可能需要考虑你在header中放入了什么,因为这是最终用户和实现之间的层。

#11


0  

Header (.h)

头文件(. h)

  • Macros and includes needed for the interfaces (as few as possible)
  • 宏,包括接口的需要(尽可能少)
  • The declaration of the functions and classes
  • 函数和类的声明。
  • Documentation of the interface
  • 接口的文档
  • Declaration of inline functions/methods, if any
  • 声明内联函数/方法,如果有的话。
  • extern to global variables (if any)
  • 从外部到全局变量(如果有的话)

Body (.cpp)

身体(. cpp)

  • Rest of macros and includes
  • 宏的其余部分,包括。
  • Include the header of the module
  • 包括模块的头部。
  • Definition of functions and methods
  • 函数和方法的定义。
  • Global variables (if any)
  • 全局变量(如果有的话)

As a rule of thumb, you put the "shared" part of the module on the .h (the part that other modules needs to be able to see) and the "not shared" part on the .cpp

根据经验,您将模块的“共享”部分放在.h(其他模块需要能够看到的部分)和.cpp上的“未共享”部分。

PD: Yes, I've included global variables. I've used them some times and it's important not to define them on the headers, or you'll get a lot of modules, each defining its own variable.

PD:是的,我包含了全局变量。我已经使用了一些时间,重要的是不要在标题上定义它们,或者你会得到很多模块,每个模块都定义了自己的变量。

EDIT: Modified after the comment of David

编辑:在大卫评论后修改。

#12


-1  

  • Header files - shouldn't change during development too often -> you should think, and write them at once (in ideal case)
  • 头文件——在开发过程中不应该经常更改——应该考虑一下>,并立即编写它们(在理想情况下)
  • Source files - changes during implementation
  • 源文件-实现过程中的更改。

#1


77  

Header files (.h) are designed to provide the information that will be needed in multiple files. Things like class declarations, function prototypes, and enumerations typically go in header files. In a word, "definitions".

头文件(.h)旨在提供在多个文件中需要的信息。类声明、函数原型和枚举之类的东西通常会进入头文件。总之,“定义”。

Code files (.cpp) are designed to provide the implementation information that only needs to be known in one file. In general, function bodies, and internal variables that should/will never be accessed by other modules, are what belong in .cpp files. In a word, "implementations".

代码文件(.cpp)旨在提供只需要在一个文件中知道的实现信息。一般来说,函数体和应该/永远不会被其他模块访问的内部变量,都属于.cpp文件。总之,“实现”。

The simplest question to ask yourself to determine what belongs where is "if I change this, will I have to change code in other files to make things compile again?" If the answer is "yes" it probably belongs in the header file; if the answer is "no" it probably belongs in the code file.

最简单的问题是:“如果我更改了这个,我是否需要更改其他文件中的代码,使之重新编译?”如果答案是“是”,它可能属于头文件;如果答案是“不”,它可能属于代码文件。

#2


40  

Fact is, in C++, this is somewhat more complicated that the C header/source organization.

事实上,在c++中,这比C头/源组织要复杂得多。

What does the compiler see?

The compiler sees one big source (.cpp) file with its headers properly included. The source file is the compilation unit that will be compiled into an object file.

编译器看到一个大的源代码(.cpp)文件,其中包含了正确的标题。源文件是将被编译成对象文件的编译单元。

So, why are headers necessary?

Because one compilation unit could need information about an implementation in another compilation unit. So one can write for example the implementation of a function in one source, and write the declaration of this function in another source needing to use it.

因为一个编译单元可能需要有关另一个编译单元中的实现的信息。因此,可以在一个源中编写一个函数的实现,并在另一个需要使用它的源中编写这个函数的声明。

In this case, there are two copies of the same information. Which is evil...

在这种情况下,同一信息有两份副本。这是邪恶的…

The solution is to share some details. While the implementation should remain in the Source, the declaration of shared symbols, like functions, or definition of structures, classes, enums, etc., could need to be shared.

解决方案是分享一些细节。虽然实现应该保留在源代码中,但是共享符号的声明,如函数,或结构、类、枚举等的定义,都需要共享。

Headers are used to put those shared details.

标头用于放置那些共享的细节。

Move to the header the declarations of what need to be shared between multiple sources

向报头移动需要在多个源之间共享的声明。

Nothing more?

In C++, there are some other things that could be put in the header because, they need, too, be shared:

在c++中,还有一些其他的东西可以放到header中,因为它们也需要被共享:

  • inline code
  • 内联代码
  • templates
  • 模板
  • constants (usually those you want to use inside switches...)
  • 常量(通常是那些你想在开关中使用的…)

Move to the header EVERYTHING what need to be shared, including shared implementations

移动到header中所有需要共享的内容,包括共享实现。

Does it then mean that there could be sources inside the headers?

Yes. In fact, there are a lot of different things that could be inside a "header" (i.e. shared between sources).

是的。事实上,有很多不同的东西可以在“header”中(即在源之间共享)。

  • Forward declarations
  • 提出声明
  • declarations/definition of functions/structs/classes/templates
  • 函数的声明/定义/结构/类/模板
  • implementation of inline and templated code
  • 实现内联和模板代码。

It becomes complicated, and in some cases (circular dependencies between symbols), impossible to keep it in one header.

它变得复杂,在某些情况下(符号之间的循环依赖关系),不可能将其保存在一个标题中。

Headers can be broken down into three parts

This means that, in an extreme case, you could have:

这意味着,在极端情况下,你可以:

  • a forward declaration header
  • 一个前置声明头
  • a declaration/definition header
  • 声明/定义标题
  • an implementation header
  • 一个实现头
  • an implementation source
  • 一个实现源

Let's imagine we have a templated MyObject. We could have:

假设有一个模板化的MyObject。我们可以:

// - - - - MyObject_forward.hpp - - - - 
// This header is included by the code which need to know MyObject
// does exist, but nothing more.
template<typename T>
class MyObject ;

.

// - - - - MyObject_declaration.hpp - - - - 
// This header is included by the code which need to know how
// MyObject is defined, but nothing more.
#include <MyObject_forward.hpp>

template<typename T>
class MyObject
{
   public :
      MyObject() ;
   // Etc.
} ;

void doSomething() ;

.

// - - - - MyObject_implementation.hpp - - - - 
// This header is included by the code which need to see
// the implementation of the methods/functions of MyObject,
// but nothing more.
#include <MyObject_declaration.hpp>

template<typename T>
MyObject<T>::MyObject()
{
   doSomething() ;
}

// etc.

.

// - - - - MyObject_source.cpp - - - - 
// This source will have implementation that does not need to
// be shared, which, for templated code, usually means nothing...
#include <MyObject_implementation.hpp>

void doSomething()
{
   // etc.
} ;

// etc.

Wow!

In the "real life", it is usually less complicated. Most code will have only a simple header/source organisation, with some inlined code in the source.

在“现实生活”中,它通常不那么复杂。大多数代码只有一个简单的头/源组织,源代码中有一些内联代码。

But in other cases (templated objects knowing each others), I had to have for each object separate declaration and implementation headers, with an empty source including those headers just to help me see some compilation errors.

但是,在其他情况下(模板对象相互了解),我必须为每个对象独立的声明和实现头,以及一个空的源,包括那些头,以帮助我看到一些编译错误。

Another reason to break down headers into separate headers could be to speed up the compilation, limiting the quantity of symbols parsed to the strict necessary, and avoiding unecessary recompilation of a source who cares only for the forward declaration when an inline method implementation changed.

另一个将消息头分解成独立标题的原因可能是加速编译,将符号的数量限制在严格的必要条件下,并且避免不必要的重新编译源代码,当内联方法实现更改时,该源只关心前面的声明。

Conclusion

You should make your code organization both as simple as possible, and as modular as possible. Put as much as possible in the source file. Only expose in headers what needs to be shared.

您应该使您的代码组织尽可能简单,并且尽可能模块化。在源文件中尽可能多地放置。只在头文件中公开需要共享的内容。

But the day you'll have circular dependancies between templated objects, don't be surprised if your code organization becomes somewhat more "interesting" that the plain header/source organization...

但是,如果您的代码组织变得更加“有趣”,即普通的头/源组织,那么您将会在模板化对象之间建立循环依赖关系。

^_^

^ _ ^

#3


14  

in addition to all other answers, i will tell you what you DON'T place in a header file:
using declaration (the most common being using namespace std;) should not appear in a header file because they pollute the namespace of the source file in which it is included.

除了所有其他的答案之外,我还将告诉您在头文件中没有放置的内容:使用声明(使用名称空间std的最常用的方法)不应该出现在头文件中,因为它们污染了包含它的源文件的名称空间。

#4


5  

What compiles into nothing (zero binary footprint) goes into header file.

什么编译成什么都没有(零二进制占用)进入头文件。

Variables do not compile into nothing, but type declarations do (coz they only describe how variables behave).

变量不能编译成任何东西,但是类型声明可以(因为它们只描述变量的行为)。

functions do not, but inline functions do (or macros), because they produce code only where called.

函数不会,但是内联函数会(或宏),因为它们只在调用的地方生成代码。

templates are not code, they are only a recipe for creating code. so they also go in h files.

模板不是代码,它们只是创建代码的一种方法。所以他们也使用h文件。

#5


3  

In general, you put declarations in the header file and definitions in the implementation (.cpp) file. The exception to this is templates, where the definition must also go in the header.

一般情况下,您将声明放入实现(.cpp)文件中的头文件和定义中。这里的例外是模板,它的定义也必须在header中进行。

This question and ones similar to it has been asked frequently on SO - see Why have header files and .cpp files in C++? and C++ Header Files, Code Separation for example.

这个问题和类似的问题经常被问到,为什么在c++中有头文件和。cpp文件?还有c++头文件,比如代码分离。

#6


1  

Your class and function declarations plus the documentation, and the definitions for inline functions/methods (although some prefer to put them in separate .inl files).

您的类和函数声明加上文档,以及内联函数/方法的定义(尽管有些人喜欢将它们放在独立的.inl文件中)。

#7


1  

Mainly header file contain class skeleton or declaration (does not change frequently)

主要的头文件包含类骨架或声明(不经常更改)

and cpp file contains class implementation (changes frequently).

cpp文件包含类实现(经常更改)。

#8


0  

the header file (.h) should be for declarations of classes, structs and its methods, prototypes, etc. The implementation of those objects are made in cpp.

头文件(.h)应该用于声明类、结构及其方法、原型等。这些对象的实现是在cpp中完成的。

in .h

. h中

    class Foo {
    int j;

    Foo();
    Foo(int)
    void DoSomething();
}

#9


0  

I'd expect to see:

我希望看到:

  • declarations
  • 声明
  • comments
  • 评论
  • definitions marked inline
  • 定义为内联
  • templates
  • 模板

the really answer though is what not to put in:

真正的答案是:

  • definitons (can lead to things being multiply defined)
  • 定义(可以导致事物的乘法定义)
  • using declarations/directives (forces them on anyone including your header, can cause name*es)
  • 使用声明/指令(将它们强加于任何人,包括您的头,可以导致name*es)

#10


0  

The header Defines something but doesn't tell anything about the implementation. ( Excluding Templates in this "metafore".

header定义了一些东西,但是没有说明任何关于实现的内容。(不包括在这个“metafore”中的模板。

With that said, you need to divide "definitions" into sub-groups, there are, in this case, two types of definitions.

这样说,您需要将“定义”划分为子组,在本例中,有两种定义。

  • You define the "layout" of your strucutre, telling only as much as is needed by the surrounding usage groups.
  • 您定义了您的结构的“布局”,只告诉您周围的使用组所需要的内容。
  • The definitions of a variable, function and a class.
  • 变量、函数和类的定义。

Now, I am of course talking about the first subgroup.

现在,我当然是在讨论第一个子群。

The header is there to define the layout of your structure in order to help the rest of the software use the implementation. You might want to see it as an "abstraction" of your implementation, which is vaughly said but, I think it suits quite well in this case.

标题是用来定义您的结构的布局,以帮助其他的软件使用实现。您可能希望将其视为实现的“抽象”,这是vaughly说的,但是,我认为在这种情况下它很适合。

As previous posters have said and shown you declare private and public usage areas and their headers, this also includes private and public variables. Now, I don't want to go into design of the code here but, you might want to consider what you put in your headers, since that is the Layer between the end user and the implementation.

正如前面的海报所述,并显示您声明私有和公共使用区域及其头,这也包括私有和公共变量。现在,我不想在这里设计代码,但是,你可能需要考虑你在header中放入了什么,因为这是最终用户和实现之间的层。

#11


0  

Header (.h)

头文件(. h)

  • Macros and includes needed for the interfaces (as few as possible)
  • 宏,包括接口的需要(尽可能少)
  • The declaration of the functions and classes
  • 函数和类的声明。
  • Documentation of the interface
  • 接口的文档
  • Declaration of inline functions/methods, if any
  • 声明内联函数/方法,如果有的话。
  • extern to global variables (if any)
  • 从外部到全局变量(如果有的话)

Body (.cpp)

身体(. cpp)

  • Rest of macros and includes
  • 宏的其余部分,包括。
  • Include the header of the module
  • 包括模块的头部。
  • Definition of functions and methods
  • 函数和方法的定义。
  • Global variables (if any)
  • 全局变量(如果有的话)

As a rule of thumb, you put the "shared" part of the module on the .h (the part that other modules needs to be able to see) and the "not shared" part on the .cpp

根据经验,您将模块的“共享”部分放在.h(其他模块需要能够看到的部分)和.cpp上的“未共享”部分。

PD: Yes, I've included global variables. I've used them some times and it's important not to define them on the headers, or you'll get a lot of modules, each defining its own variable.

PD:是的,我包含了全局变量。我已经使用了一些时间,重要的是不要在标题上定义它们,或者你会得到很多模块,每个模块都定义了自己的变量。

EDIT: Modified after the comment of David

编辑:在大卫评论后修改。

#12


-1  

  • Header files - shouldn't change during development too often -> you should think, and write them at once (in ideal case)
  • 头文件——在开发过程中不应该经常更改——应该考虑一下>,并立即编写它们(在理想情况下)
  • Source files - changes during implementation
  • 源文件-实现过程中的更改。