winIDEA SDK
isys::CProjectController Class Reference

Description

This class provides access to winIDEA project manager.

Python example for method getStatus().
Python example.

#include <CProjectController.h>

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

Public Member Functions

 CProjectController (std::shared_ptr< ConnectionMgr > connectionMgr)
 Constructs the object. More...
 
::IConnectProjectgetIConnectProject ()
 Returns the isystem.connect Project interface. More...
 
void compile (const std::string &fileName)
 Compiles the specified file. More...
 
void link (bool suppressPostLinkActions=false)
 Links the active project. More...
 
void make (bool suppressPostLinkActions=false)
 Makes the active project. More...
 
void build (bool suppressPostLinkActions=false)
 Builds the active project. More...
 
bool isUpToDate ()
 Returns true if project is up to date, or false if sources are newer than executable. More...
 
void setTarget (const std::string &makeTargetName)
 Sets make target in winIDEA. More...
 
void dependencies ()
 Updates dependencies. More...
 
void stop ()
 Stops the current operation. More...
 
void customOperation (const std::string &operation, const std::string &parameters)
 Runs custom operation. More...
 
CBuildStatus getStatus ()
 Returns the object with information about the current build manager status. More...
 
CBuildOptionsoptions ()
 Returns reference to build options associated with this build manager. More...
 
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. More...
 
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. More...
 
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. More...
 

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.

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.

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.

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

◆ make()

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

Makes the active project.

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 in winIDEA.

See winIDEA menu option Project | Targets. Python example.

◆ stop()

void isys::CProjectController::stop ( )

Stops the current operation.

Python example.