Home > Back-end >  C header file defined in the class A and announcement APrivate. Then in the corresponding source fil
C header file defined in the class A and announcement APrivate. Then in the corresponding source fil

Time:09-16

Good predecessors:
I've been study on an open source code, the following problems:
C + + header file defined in the class A and announcement APrivate. Then in the corresponding source file to define APrivate, excuse me, what's the point?

Code specific as follows:
QSlicerUGSllshMarkupsModule. H file:
# # ifndef __qSlicerUGSllshMarkupsModule_h
# define __qSlicerUGSllshMarkupsModule_h

class qSlicerUGSllshMarkupsModulePrivate;

The class Q_SLICER_QTMODULES_MARKUPS_EXPORT qSlicerUGSllshMarkupsModule :
Public qSlicerLoadableModule
{

QScopedPointer qSlicerUGSllshMarkupsModulePrivate & gt; D_ptr;
};

# endif
===================================================================================
QSlicerUGSllshMarkupsModule. CPP file code:
Class qSlicerUGSllshMarkupsModulePrivate
{
Public:
QSlicerUGSllshMarkupsModulePrivate ();
};

Why do you do that? Feel is redundant ~
Also please teach predecessors, the specific meaning, we should be grateful,

CodePudding user response:

The class qSlicerUGSllshMarkupsModulePrivate;
The statement is the forward references,

CodePudding user response:

The class qSlicerUGSllshMarkupsModulePrivate;
Is the forward references statement, or
QScopedPointer D_ptr;
The compiler will not know qSlicerUGSllshMarkupsModulePrivate

CodePudding user response:

Thank you very much, to quote before this point can be determined, is there any other function, such as the scope of the pointer? For example this way forward references can improve code (pointer) security?

CodePudding user response:

Daniel: hello, can you tell about now that tracking algorithm c language version of the tracking effect is good, tracking box 128 * 128 frame frequency above 200 hz

CodePudding user response:

The elder brothers want to know the your contact information, communication

CodePudding user response:

reference Shen Ziheng reply: 3/f
thank you very much, to quote before this point can be determined, is there any other role, such as the scope of the pointer? For example this way forward references can improve code (pointer) security?

Forward the statement on the negative effects for pointer reference of safety,,,

Forward declarations in general from the perspective of the coupling of the code to use, with bad words, prone to null pointer,
  • Related