winIDEA SDK
Loading...
Searching...
No Matches
isys::CProjectController Class Reference

Description

This class provides access to winIDEA project manager.

Do not use it to build projects with CMake. For this use case run CMake directly from Python or other SDK language.

Python example for method getStatus().
Python example.

#include <CProjectController.h>

Inheritance diagram for isys::CProjectController:
isys::WrapperBase

Public Member Functions

void build (bool suppressPostLinkActions=false)
 Builds the active project with winIDEA build manager.
 
void compile (const std::string &fileName)
 Compiles the specified file with winIDEA build manager.
 
 CProjectController (std::shared_ptr< ConnectionMgr > connectionMgr)
 Constructs the object.
 
void customOperation (const std::string &operation, const std::string &parameters)
 Runs custom operation.
 
void dependencies ()
 Updates dependencies.
 
std::string enumerateProjectOption (const std::string &scope, const std::string &option, int index, bool isReturnRelativePath)
 This method can enumerate build targets, groups, and files in project.
 
::IConnectProjectgetIConnectProject ()
 Returns the isystem.connect Project interface.
 
CBuildStatus getStatus ()
 Returns the object with information about the current build manager status.
 
std::string getWarningMessage ()
 Returns warning message for methods in this class, which have returned warning error code, for example when importProject() or exportProject() return -1.
 
bool isUpToDate ()
 Returns true if project is up to date, or false if sources are newer than executable.
 
void link (bool suppressPostLinkActions=false)
 Links the active project with winIDEA build manager.
 
void make (bool suppressPostLinkActions=false)
 Makes the active project with winIDEA build manager.
 
std::string modifyProjectOption (IConnectProject::EOptionFlags cmd, DWORD cmdFlags, const std::string &scope, const std::string &option, const std::string &value)
 This is a general method for configuration of project manager in winIDEA.
 
CBuildOptionsoptions ()
 Returns reference to build options associated with this build manager.
 
void setTarget (const std::string &makeTargetName)
 Sets make target for winIDEA build manager.
 
void stop ()
 Stops the current operation of winIDEA build manager.
 

Constructor & Destructor Documentation

◆ CProjectController()

isys::CProjectController::CProjectController ( std::shared_ptr< ConnectionMgr > connectionMgr)

Constructs the object.

Python example.

Member Function Documentation

◆ build()

void isys::CProjectController::build ( bool suppressPostLinkActions = false)

Builds the active project with winIDEA build manager.

If you are using CMake for build, run CMake directly, do not use this class.

Parameters
suppressPostLinkActionsif true, automatic post-link actions are not performed

Python example.

◆ compile()

void isys::CProjectController::compile ( const std::string & fileName)

Compiles the specified file with winIDEA build manager.

If you are using CMake for build, run CMake directly, do not use this class.

Parameters
fileNamethe file to compile. The file must be included in the active project. Python example.

◆ customOperation()

void isys::CProjectController::customOperation ( const std::string & operation,
const std::string & parameters )

Runs custom operation.

Parameters
operationoperation to run
parametersparameters of the operation Python example.

◆ dependencies()

void isys::CProjectController::dependencies ( )

Updates dependencies.

Python example.

◆ enumerateProjectOption()

std::string isys::CProjectController::enumerateProjectOption ( const std::string & scope,
const std::string & option,
int index,
bool isReturnRelativePath )

This method can enumerate build targets, groups, and files in project.

Parameters
scopescope should be of format: ">project>group>file name|translator|target" If project or target are blank, the current project/active target is assumed. Examples:
Scope Format Option Returns
">" "Group" project group
">" "File" project file
optionname of the option to get
indexindex of item to retrieve. When end of list is reached, empty string is returned.
isReturnRelativePathif true, relative paths are returned
See also
CBuildOptions for list of scopes and options.

Python example.

◆ getIConnectProject()

::IConnectProject * isys::CProjectController::getIConnectProject ( )

Returns the isystem.connect Project interface.

Use this method only when some functionality of the IConnectProject interface regarding project handling is not accessible from this wrapper.

◆ getStatus()

CBuildStatus isys::CProjectController::getStatus ( )

Returns the object with information about the current build manager status.

Python example.

◆ getWarningMessage()

std::string isys::CProjectController::getWarningMessage ( )

Returns warning message for methods in this class, which have returned warning error code, for example when importProject() or exportProject() return -1.

Python example.

◆ isUpToDate()

bool isys::CProjectController::isUpToDate ( )

Returns true if project is up to date, or false if sources are newer than executable.

Python example.

◆ link()

void isys::CProjectController::link ( bool suppressPostLinkActions = false)

Links the active project with winIDEA build manager.

If you are using CMake for build, run CMake directly, do not use this class.

Parameters
suppressPostLinkActionsif true, automatic post-link actions are not performed Python example.

◆ make()

void isys::CProjectController::make ( bool suppressPostLinkActions = false)

Makes the active project with winIDEA build manager.

If you are using CMake for build, run CMake directly, do not use this class.

Parameters
suppressPostLinkActionsif true, automatic post-link actions are not performed Python example.

◆ modifyProjectOption()

std::string isys::CProjectController::modifyProjectOption ( IConnectProject::EOptionFlags cmd,
DWORD cmdFlags,
const std::string & scope,
const std::string & option,
const std::string & value )

This is a general method for configuration of project manager in winIDEA.

Parameters
cmdcommand. If you need command ofaEnum, use more convenient method enumerateProjectOption().
cmdFlagsthis parameter may contain the second part of cmd, for example ofaRelativePaths, or-ed with index when needed
scopescope should be of format: ">project>group>file name|translator|target" If project or target are blank, the current project/active target is assumed. Examples:
Scope Format Location Scope example Option Value
"" Global "" "BeepWhenDone" "1"
">project>" Project ">Files>" "ToolsetDir" "$(EXEDIR)\gcc"
">project>group>" Group ">Files>Source Files>" "Name" "Sources"
">project>group>file name"File ">Files>Source Files>main.c""ExcludeFromMake""0"
">project>file path" File ">Files>c:\test\main.c" "ExcludeFromMake""0"
optionname of the option to get or set.
valuenew option value when set or add is used. Should be empty string on get.
See also
CBuildOptions for list of scopes and options.

Python example.

◆ options()

CBuildOptions & isys::CProjectController::options ( )

Returns reference to build options associated with this build manager.

Use this reference to get/set build options.

◆ setTarget()

void isys::CProjectController::setTarget ( const std::string & makeTargetName)

Sets make target for winIDEA build manager.

If you are using CMake for build, run CMake directly, do not use this class.

See also winIDEA menu option Project | Targets. Python example.

◆ stop()

void isys::CProjectController::stop ( )

Stops the current operation of winIDEA build manager.

Python example.