Salome HOME
Merge branch 'V9_2_2_BR' into V9_2_BR
[modules/kernel.git] / doc / salome / kernel_services_cpphelpers.dox
1 /*!
2   \page KERNEL_Services_CppHelpers KERNEL Services helper functions for C++ programmers
3
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.
7
8 -# \ref S1_KSH
9 -# \ref S2_KSH
10 -# \ref S3_KSH
11
12 \section S1_KSH Quick Overview
13
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.
18
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.
25
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):
30
31 \code
32 #include "SALOME_KernelServices.hxx"
33 #include "Basics_Utils.hxx"
34
35 #include <SALOMEconfig.h>
36 #include CORBA_CLIENT_HEADER(SALOME_TestComponent)
37
38 void main (int argc, char * argv[]) {
39   Engines::EngineComponent_var component =
40     KERNEL::getLifeCycleCORBA()->FindOrLoad_Component( "FactoryServer","SalomeTestComponent" );
41   
42   Engines::TestComponent_var engine = Engines::TestComponent::_narrow(component);
43   STDLOG(engine->Coucou(123.));
44 }
45 \endcode
46
47 \section S2_KSH Usage of the SALOME_KernelServices
48
49 TO WRITE
50
51 \section S3_KSH Usage of the SALOME_StudyEditor
52
53 TO WRITE
54
55 */