2 \page KERNEL_Services_CppHelpers KERNEL Services helper functions for C++ programmers
4 You'l find here a documentation for using the KernelHelper package of
5 the KERNEL module. This package provides the programmer with helper
6 functions to deal with the KERNEL services and the study.
12 \section S1_KSH Quick Overview
14 When developing a SALOME application, programmers often have to deal
15 with fundamentals objects as the %NamingService, the %LifeCycleCorba,
16 the %ResourcesManager and the %SalomeLauncher and have to manage the
17 data in a %Study object.
19 This documentation illustrates how to use these objects in standard
20 C++ use cases and with the helper functions of the KernelHelper
21 package of the KERNEL module. The KernelHelper package should be used
22 by end user programmers, i.e. programmers that don't need the
23 complexity of the complete KERNEL API, typically when developing a
24 SALOME module for a domain specific application.
26 For illustration of this short introduction, the code below creates an
27 executable binary program that calls the SalomeTestComponent using the
28 LifeCycleCorba and requests the Coucou service of this component (the
29 test component is included in the KERNEL module):
32 #include "SALOME_KernelServices.hxx"
33 #include "Basics_Utils.hxx"
35 #include <SALOMEconfig.h>
36 #include CORBA_CLIENT_HEADER(SALOME_TestComponent)
38 void main (int argc, char * argv[]) {
39 Engines::EngineComponent_var component =
40 KERNEL::getLifeCycleCORBA()->FindOrLoad_Component( "FactoryServer","SalomeTestComponent" );
42 Engines::TestComponent_var engine = Engines::TestComponent::_narrow(component);
43 STDLOG(engine->Coucou(123.));
47 \section S2_KSH Usage of the SALOME_KernelServices
51 \section S3_KSH Usage of the SALOME_StudyEditor