Home > Back-end >  CPP underscore the method
CPP underscore the method

Time:09-16

I the JVM source classFileParser. CPP can see the following code
 
ClassFileParser: : ClassFileParser (ClassFileStream * stream,
The Symbol * name,
ClassLoaderData * loader_data,
Const ClassLoadInfo * cl_info,
Publicity pub_level,
TRAPS) :
_stream (stream),
_class_name (NULL),
_loader_data (loader_data),
_unsafe_anonymous_host (cl_info - & gt; Unsafe_anonymous_host ()),
_cp_patches (cl_info - & gt; Cp_patches ()),
_is_hidden (cl_info - & gt; Is_hidden ()),
_can_access_vm_annotations (cl_info - & gt; Can_access_vm_annotations ()),
_num_patched_klasses (0),
...

Seems to be under the stream to initialize _stream, but I can't find _stream (ClassFileStream * stream) this function, what is this grammar?
As a Java said at least _stream this method, and method body need is like=stream} {_stream words to complete the assignment (or use lombok automatically generated code), is for each private properties of CPP is a method to assign the same name by default?

CodePudding user response:

This represents the initialization, with an underscore do not have what relation, _stream just a class member

CodePudding user response:

reference 1/f, the truth is right or wrong response:
this on behalf of the initialization, with an underscore do not have what relation, _stream just a class member

What I mean is that as long as there is a class member (in this case are various underscore), CPP in default there will be a method to modify the same name

CodePudding user response:

The method is not

CodePudding user response:

This is to initialize list
Take a look at this link: https://blog.csdn.net/hailong0715/article/details/54018002? Utm_medium=distribute. Pc_relevant_t0. None - task - blog - BlogCommendFromMachineLearnPai2-1. Nonecase& Depth_1 - utm_source=distribute. Pc_relevant_t0. None - task - blog - BlogCommendFromMachineLearnPai2-1. Nonecase

CodePudding user response:

The initialization list, baidu
  • Related