1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-18 14:27:39 +03:00

Coding - Apply .clang-format formatting #286

Update empty method guards to new style with regex (see PR).
Used clang-format 18.1.8.
New actions to validate code formatting is added.
Update .clang-format with disabling of include sorting.
  It is temporary changes, then include will be sorted.
Apply formatting for /src and /tools folder.
The files with .hxx,.cxx,.lxx,.h,.pxx,.hpp,*.cpp extensions.
This commit is contained in:
dpasukhi
2025-01-25 20:15:22 +00:00
parent dbba6f1289
commit a5a7b3185b
14005 changed files with 1273539 additions and 1195567 deletions

View File

@@ -11,7 +11,7 @@
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
// commercial license or contractual agreement.
#ifndef TInspector_Communicator_H
#define TInspector_Communicator_H
@@ -33,7 +33,6 @@ class QPushButton;
class TInspector_Communicator
{
public:
//! Constructor
Standard_EXPORT TInspector_Communicator();
@@ -41,77 +40,108 @@ public:
virtual ~TInspector_Communicator() {}
//! Returns directory of Qt plugins. Firstly it founds it in QTDIR, else if not defined in PATH
Standard_EXPORT static Standard_Boolean PluginsDir (TCollection_AsciiString& thePlugindsDirName);
Standard_EXPORT static Standard_Boolean PluginsDir(TCollection_AsciiString& thePlugindsDirName);
//! Registers plugin into TInspector window
//! \param thePluginName a name of the plugin
void RegisterPlugin (const TCollection_AsciiString& thePluginName) { myWindow->RegisterPlugin (thePluginName); }
void RegisterPlugin(const TCollection_AsciiString& thePluginName)
{
myWindow->RegisterPlugin(thePluginName);
}
//! Returns list of registered plugins
//! \return container of plugin names
NCollection_List<TCollection_AsciiString> RegisteredPlugins() const { return myWindow->RegisteredPlugins(); }
NCollection_List<TCollection_AsciiString> RegisteredPlugins() const
{
return myWindow->RegisteredPlugins();
}
//! Stores parameters for the plugin
//! \param theParameters container of parameters(e.g. AIS_InteractiveContext, TDocStd_Application)
//! \param theAppend boolean state whether the parameters should be added to existing
void Init (const NCollection_List<Handle(Standard_Transient)>& theParameters,
const Standard_Boolean theAppend = Standard_False)
{ myWindow->Init ("", theParameters, theAppend); }
void Init(const NCollection_List<Handle(Standard_Transient)>& theParameters,
const Standard_Boolean theAppend = Standard_False)
{
myWindow->Init("", theParameters, theAppend);
}
//! Stores parameters for the plugin
//! \param thePluginName a name of the plugin
//! \param theParameters container of parameters(e.g. AIS_InteractiveContext, TDocStd_Application)
//! \param theAppend boolean state whether the parameters should be added to existing
void Init (const TCollection_AsciiString& thePluginName,
const NCollection_List<Handle(Standard_Transient)>& theParameters,
const Standard_Boolean theAppend = Standard_False)
{ myWindow->Init (thePluginName, theParameters, theAppend); }
void Init(const TCollection_AsciiString& thePluginName,
const NCollection_List<Handle(Standard_Transient)>& theParameters,
const Standard_Boolean theAppend = Standard_False)
{
myWindow->Init(thePluginName, theParameters, theAppend);
}
//! Updates content for the TInspector window
void UpdateContent() { myWindow->UpdateContent(); }
//! Sets open button for the TInspector window
void SetOpenButton (QPushButton* theButton) { myWindow->SetOpenButton (theButton); }
void SetOpenButton(QPushButton* theButton) { myWindow->SetOpenButton(theButton); }
//! Opens file in TInspector window
void OpenFile (const TCollection_AsciiString& thePluginName, const TCollection_AsciiString& theFileName)
{ myWindow->OpenFile (thePluginName, theFileName); }
void OpenFile(const TCollection_AsciiString& thePluginName,
const TCollection_AsciiString& theFileName)
{
myWindow->OpenFile(thePluginName, theFileName);
}
//! Activates plugin
//! \param thePluginName a name of the plugin
void Activate (const TCollection_AsciiString& thePluginName) { myWindow->ActivateTool (thePluginName); }
void Activate(const TCollection_AsciiString& thePluginName)
{
myWindow->ActivateTool(thePluginName);
}
//! Sets item selected in the active plugin
//! \param theItemName a container of name of items in plugin that should become selected
void SetSelected (const NCollection_List<TCollection_AsciiString>& theItemNames) { myWindow->SetSelected (theItemNames); }
void SetSelected(const NCollection_List<TCollection_AsciiString>& theItemNames)
{
myWindow->SetSelected(theItemNames);
}
//! Sets objects to be selected in the plugin
//! \param theObjects an objects
void SetSelected (const NCollection_List<Handle(Standard_Transient)>& theObjects) { myWindow->SetSelected (theObjects); }
void SetSelected(const NCollection_List<Handle(Standard_Transient)>& theObjects)
{
myWindow->SetSelected(theObjects);
}
//! Sets path to a directory for temporary plugin files
//! \param thePath a path
void SetTemporaryDirectory (const TCollection_AsciiString& thePath) { myWindow->SetTemporaryDirectory (thePath); }
void SetTemporaryDirectory(const TCollection_AsciiString& thePath)
{
myWindow->SetTemporaryDirectory(thePath);
}
//! Returns path to a directory for temporary plugin files
//! \return path
TCollection_AsciiString GetTemporaryDirectory() const { return myWindow->GetTemporaryDirectory(); }
TCollection_AsciiString GetTemporaryDirectory() const
{
return myWindow->GetTemporaryDirectory();
}
//! Changes window visibility
//! \param theVisible boolean state
Standard_EXPORT virtual void SetVisible (const bool theVisible);
Standard_EXPORT virtual void SetVisible(const bool theVisible);
//! Changes window position
//! \param theX X pixel position of top left corner of the window
//! \param theY Y pixel position
Standard_EXPORT virtual void Move (const int theXPosition, const int theYPosition);
Standard_EXPORT virtual void Move(const int theXPosition, const int theYPosition);
//! Puts in the stream information about communicator
//! \param theStream stream for output
void Dump (Standard_OStream& theStream) const { return myWindow->Dump (theStream); }
void Dump(Standard_OStream& theStream) const { return myWindow->Dump(theStream); }
//! Returns plugins parameters container
Handle(TInspectorAPI_PluginParameters) const GetPluginParameters() { return myWindow->GetPluginParameters(); }
Handle(TInspectorAPI_PluginParameters) const GetPluginParameters()
{
return myWindow->GetPluginParameters();
}
private:
TInspector_Window* myWindow; //!< current window