Callback func

Hi,

I have done a class with some tasks that I call FunctionalTasks class.
Another one which aims to point to the first one and got funct pointers.

This is pde main code

//
//  SETUP
//

FunctionalTasks FuncTask;
void setup()  { 

      // Bind the wrapper to FunctionalTasks p and call procedure
      FunctionalWrapper::setObj(&FuncTask);

      // SERIAL

This is FunctionalTasks class :

/*
  FunctionalTasks.h - Functional methods
*/

#ifndef _FunctionalTasks_h
#define _FunctionalTasks_h

#include <inttypes.h>
#include "WProgram.h"
#include <Traces.h>

class FunctionalTasks
{

  private:

      Traces *_Tracer;

  public:

      static int heure;
      static int dateLiterale;
      static int temperature;

      void setTracer(Traces *TracerPtr);

//=============================================================================
/* Constructor & Destructor {{{1 */
    FunctionalTasks();
/* }}}1 */
//=============================================================================
/* {{{1 TIME MANAGMENT */

      void setRealTimeClock();
      void getRealTimeClock();
      void displayRealTimeClock();
/* }}}1 */
//=============================================================================
/* {{{1 AFFICHAGE INFOS HORODATAGE */
//
      void AfficheInfo(const int p_Info);
      void AfficheTemperature();

And this is Wrapper Class

/*
  FunctionalWrapper.h - Wrapper to bind functional methods
  2010 nov. 24
*/

#ifndef _FunctionalWrapper_h
#define _FunctionalWrapper_h

#include <inttypes.h>
#include "WProgram.h"
#include <Traces.h>
#include <FunctionalTasks.h>


class FunctionalWrapper
{
  public:

      // passing obj to wrapper
      static void setObj(FunctionalTasks & obj) { fObj = &obj; }
      //
      static void AfficheDateGlue()                  { return fObj->AfficheDate()            ; }
      static void AfficheTemperatureGlue()      { return fObj->AfficheTemperature()     ; }

      static void setRealTimeClockGlue()            { return fObj->setRealTimeClock()       ; }
      static void getRealTimeClockGlue()            { return fObj->getRealTimeClock()       ; }
      static void displayRealTimeClockGlue()      { return fObj->displayRealTimeClock()   ; }
                                                                                                                   
      static void CouperLampadaireGlue()            { return fObj->CouperLampadaire()       ; }
      static void AlimenterLampadaireGlue()      { return fObj->AlimenterLampadaire()    ; }
      static void CouperProjoAlleeGlue()            { return fObj->CouperProjoAllee()       ; }
      static void AlimenterProjoAlleeGlue()      { return fObj->AlimenterProjoAllee()    ; }
      static void CouperAppentiGlue()                  { return fObj->CouperAppenti()          ; }
      static void AlimenterAppentiGlue()            { return fObj->AlimenterAppenti()       ; }
      static void CouperPuitGlue()                  { return fObj->CouperPuit()             ; }
      static void AlimenterPuitGlue()                  { return fObj->AlimenterPuit()          ; }


  private:

      static FunctionalTasks *fObj;


//=============================================================================
/* Constructor & Destructor {{{1 */
    FunctionalWrapper();
/* }}}1 */
};

#endif /* _FunctionalWrapper_h */

// vim:fdm=marker:nowrap:ts=4:expandtab:

I got this error :

CoreSystem.cpp: In function ‘void setup()’:
CoreSystem:73: error: no matching function for call to ‘FunctionalWrapper::setObj(FunctionalTasks*)’
C:\arduino\arduino-0021\libraries\FunctionalWrapper/FunctionalWrapper.h:21: note: candidates are: static void FunctionalWrapper::setObj(FunctionalTasks&)

Pointer: FunctionalWrapper::setObj(&FuncTask); vs: Reference: static void setObj(FunctionalTasks & obj) { fObj = &obj; }

not the same thing

I have just applied this tutorial :

The ad hoc wrapper approach
This solution uses a static member function to bind the callee to the caller.
An invocation of a static member function does not require a ”this” pointer to
provide a calling context. Pointers to such static member functions are therefore
convertible to C-style function pointers that host the same method signature.
class ParticleWrapper {
public:
static double velocityGlue(double time)
{ return fObj->velocity(time); }
static void setObj(Particle& obj) { fObj = &obj; }
private:
static Particle* fObj;
};
// Bind the wrapper to particle p and call procedure
ParticleWrapper::setObj(p);
double res = derivative(0.001,2.0,&ParticleWrapper::velocityGlue);
A static data member holds the reference to the callee object that will receive
the adapted call. Static functions need to be defined in the wrapper for every
member function that is to be adapted.

?

The error message is telling you a lot.

no matching function for call to ‘FunctionalWrapper::setObj(FunctionalTasks*)’

It says "
I’ve found a call to an overloaded function called “setObj” with the parameter type “pointer to FunctionalTasks”, but the best I can find that you’ve declared is a “setObj” with a parameter type “reference to FunctionalTasks”."

Sorry, I know difference between pointers and reference but I have just applied the ad hoc method of this serious tutorial http://www.comp.ua.ac.be/publications/files/Adapter-Para04.pdf.

I have choosed ad hoc method 'cause it is the fastest one.

And if you write

FunctionalWrapper::setObj(FuncTask);

..?

Hum ok I see why I was missed.

I am editing code into another texteditor and I forgot each time to click Fix and encode before running compilation.

It seems to works. But what do you think about this method. What is interesting me is the cycle duration. very fast comparing others methods.

So ?

very fast comparing others methods

Like what other methods? If this is "very fast", what is merely "fast", and what then is "slow"?

It's a function pointer.

Finally it does not work.

//
//  SETUP
//

FunctionalTasks FuncTask;
void setup()  { 

      // Bind the wrapper to FunctionalTasks p and call procedure
      FunctionalWrapper::setObj(FuncTask);

CoreSystem.cpp.o: In function FunctionalWrapper::setObj(FunctionalTasks&)': C:\arduino\arduino-0021\libraries\FunctionalWrapper/FunctionalWrapper.h:21: undefined reference toFunctionalWrapper::fObj' C:\arduino\arduino-0021\libraries\FunctionalWrapper/FunctionalWrapper.h:21: undefined reference to `FunctionalWrapper::fObj'

Probably an Arduino forward reference "feature".

If you're not going to post whole code, don't expect results.

Sorry. this is the whole code of pde:

/*
   CoreSystem

   Manage Main Loop to control some electrical feature
   */

#include <inttypes.h>

#include <Time.h>
#include <TimeAlarms.h>

// niva add features
#include <Utils.h>
#include <Traces.h>
// #include <PushButton.h>
// #include <PinManager.h>
#include <FunctionalTasks.h>
#include <FunctionalWrapper.h>

#include <Wire.h>
#include <LiquidCrystal.h>
#include <DS1307.h> // written by  mattt on the Arduino forum and modified by D. Sjunnesson

Traces Tracer = Traces(); 


LiquidCrystal lcd(7, 8, 9, 10, 11, 12);


//
//  SETUP
//

FunctionalTasks FuncTask;
void setup()  { 

      // Bind the wrapper to FunctionalTasks p and call procedure
      FunctionalWrapper::setObj(FuncTask);

      // SERIAL
      Serial.begin(9600); 

} 

//
//  LOOP
//
void loop()  {

      Alarm.delay(10); // wait one second between clock display

}

FunctionalTasks.h and cpp

/*
  FunctionalTasks.h - Functional methods
*/

#ifndef _FunctionalTasks_h
#define _FunctionalTasks_h

#include <inttypes.h>
#include "WProgram.h"
#include <Traces.h>

class FunctionalTasks
{

  private:

      Traces *_Tracer;

  public:

      static int heure;
      static int dateLiterale;
      static int temperature;

      void setTracer(Traces *TracerPtr);

//=============================================================================
/* Constructor & Destructor {{{1 */
    FunctionalTasks();
/* }}}1 */
//=============================================================================
/* {{{1 TIME MANAGMENT */

      void setRealTimeClock();
      void getRealTimeClock();
      void displayRealTimeClock();
/* }}}1 */
//=============================================================================
/* {{{1 AFFICHAGE INFOS HORODATAGE */
//
      void AfficheInfo(const int p_Info);
      void AfficheTemperature();
      void AfficheDate();
/* }}}1 */
//=============================================================================
/* {{{1 GESTION DES LIGNES ELECTRIQUES */
//
//      SHUTDOWN / START POWER
//

      //      SHUTDOWN / START POWE
      //      LAMPADAIRE
      void CouperLampadaire();
      void AlimenterLampadaire();
      //      PROJECTEUR_ALLEE
      void CouperProjoAllee();
      void AlimenterProjoAllee();
      //      APPENTI
      void CouperAppenti();
      void AlimenterAppenti();
      //      PUIT
      void CouperPuit();
      void AlimenterPuit();
/* }}}1 */
//=============================================================================
};

#endif /* _FunctionalTasks_h */
/*
   FunctionalTasks.cpp manage some utility own tasks to provide 
   in my domotik managment

   12 Oct 2010 - First Version
   */

#include "WProgram.h"
#include <Wire.h>
#include <Traces.h>
#include <FunctionalTasks.h>
// #include <PinManager.h>
#include <DS1307.h> // written by  mattt on the Arduino forum and modified by D. Sjunnesson
#include <Utils.h>

// MANAGER
//static PinManager PinMng;
//=============================================================================
/* Constructor & Destructor {{{1 */
FunctionalTasks::FunctionalTasks()
{
}
/* }}}1 */
//=============================================================================
/* Accessors {{{1 */
void FunctionalTasks::setTracer(Traces *TracerPtr) {

      if (  TracerPtr != NULL )
      {
            _Tracer = TracerPtr;
      }
}
/* }}}1 */
//=============================================================================
/* {{{1 TIME MANAGMENT */
void FunctionalTasks::setRealTimeClock() {

      //setTime(22,15,00,01,18,2010);
      
      _Tracer->Print("Heures du systeme embarque mise a jour.");
      // MODULE HORLOGE TEMPS REEL EMBARQUEE
      RTC.stop();
      // REGLAGE HEURE
      RTC.set(DS1307_HR   , horodatage::getHours());     // set the hours
      RTC.set(DS1307_MIN  , horodatage::getMinutes());     // set the minutes
      RTC.set(DS1307_SEC  , horodatage::getSeconds());     // set the seconds
      // REGLAGE DATE     
      RTC.set(DS1307_DATE , 12);     // set the date
      RTC.set(DS1307_MTH  , 11);     // set the month
      RTC.set(DS1307_YR   , 10);     // set the year
      RTC.set(DS1307_DOW  , 4 );     // set the day of the week
      RTC.start();
}

void FunctionalTasks::getRealTimeClock() {

    _Tracer->BeginPrint(RTC.get(DS1307_HR  , true )); //read the hour and also update all the values by pushing in true
    Serial.print(":");        
    Serial.print(RTC.get(DS1307_MIN , false)); //read  minutes without update (false)
    Serial.print(":");        
    Serial.print(RTC.get(DS1307_SEC , false)); //read  seconds
    Serial.print("      ");              // some space for a more happy life
    Serial.print(RTC.get(DS1307_DATE, false)); //read  date
    Serial.print("/");        
    Serial.print(RTC.get(DS1307_MTH , false)); //read  month
    Serial.print("/");        
    Serial.print(RTC.get(DS1307_YR  , false)); //rea d year
        Serial.println();
}

void FunctionalTasks::displayRealTimeClock() {

    _Tracer->BeginPrint(RTC.get(DS1307_HR  , true )); //read the hour and also update all the values by pushing in true
    _Tracer->BeginPrint(":");        
    _Tracer->BeginPrint(RTC.get(DS1307_MIN , false)); //read  minutes without update (false)
    _Tracer->BeginPrint(":");        
    _Tracer->EndPrint(RTC.get(DS1307_SEC , false)); //read  seconds
}
/* }}}1 */
//=============================================================================
/* {{{1 AFFICHAGE INFOS HORODATAGE */
//

void FunctionalTasks::AfficheInfo(const int p_Info) {
      
    _Tracer->LcdPrintTopLineFromLeft(horodatage::currentTime());

      switch ( p_Info )
      {
            // time
            case 1 :
                  _Tracer->LcdPrintTopLineFromLeft(horodatage::currentTime());
                  break;
            // temperature
            case 2 :
                  _Tracer->LcdPrintTopLineFromRight("18.9 C");
                  break;
            // date
            case 3 :
                  _Tracer->LcdPrintBottomLineFromRight(horodatage::currentDate());
                  break;
            default:
            _Tracer->Print(horodatage::currentTime());
                  _Tracer->LcdPrintTopLineFromLeft(horodatage::currentTime());
                  _Tracer->LcdPrintTopLineFromRight("18.9 C");
                  _Tracer->LcdPrintBottomLineFromRight(horodatage::currentDate());
                  break;
                  break;
      }
}

void FunctionalTasks::AfficheTemperature() {
      _Tracer->LcdPrintTopLineFromRight("18.9 C");
}

void FunctionalTasks::AfficheDate() {
    _Tracer->Print("Date");
      _Tracer->LcdPrintBottomLineFromRight(horodatage::currentDate());
}
      
/* }}}1 */
//=============================================================================
/* {{{1 GESTION DES LIGNES ELECTRIQUES */
//
//      SHUTDOWN / START POWER
//

/* {{{2 LAMPADAIRE */
void FunctionalTasks::CouperLampadaire() {

      //_Tracer->Print("ALARM: - coupure alimentation ligne lampadaire");   
      // PinManager::Off("LAMPADAIRE");
}
void FunctionalTasks::AlimenterLampadaire() {

      //_Tracer->Print("ALARM: - demarre alimentation ligne lampadaire");   
      // PinManager::On("LAMPADAIRE");
}
/* }}}2 */

/* {{{2 PROJECTEUR_ALLEE */
void FunctionalTasks::CouperProjoAllee() {

      // PinManager::Off("PROJECTEUR_ALLEE");
}
void FunctionalTasks::AlimenterProjoAllee() {

      // PinManager::On("PROJECTEUR_ALLEE");
}
/* }}}2 */

/* {{{2 APPENTI*/
void FunctionalTasks::CouperAppenti() {

      // PinManager::Off("APPENTI");
}
void FunctionalTasks::AlimenterAppenti() {

      // PinManager::On("APPENTI");
}
/* }}}2 */

/* {{{2 PUIT*/
void FunctionalTasks::CouperPuit() {

      // PinManager::Off("PUIT");
}
void FunctionalTasks::AlimenterPuit() {

      // PinManager::On("PUIT");
}
/* }}}2 */
/* }}}1 */

// vim:fdm=marker:nowrap:ts=4:expandtab:

FunctionalWrapper

/*
  FunctionalWrapper.h - Wrapper to bind functional methods
  2010 nov. 24
*/

#ifndef _FunctionalWrapper_h
#define _FunctionalWrapper_h

#include <inttypes.h>
#include "WProgram.h"
#include <Traces.h>
#include <FunctionalTasks.h>


class FunctionalWrapper
{
  public:

      // passing obj to wrapper
      static void setObj(FunctionalTasks & obj) { fObj = &obj; }
      //
      static void AfficheDateGlue()                  { return fObj->AfficheDate()            ; }
      static void AfficheTemperatureGlue()      { return fObj->AfficheTemperature()     ; }

      static void setRealTimeClockGlue()            { return fObj->setRealTimeClock()       ; }
      static void getRealTimeClockGlue()            { return fObj->getRealTimeClock()       ; }
      static void displayRealTimeClockGlue()      { return fObj->displayRealTimeClock()   ; }
                                                                                                                   
      static void CouperLampadaireGlue()            { return fObj->CouperLampadaire()       ; }
      static void AlimenterLampadaireGlue()      { return fObj->AlimenterLampadaire()    ; }
      static void CouperProjoAlleeGlue()            { return fObj->CouperProjoAllee()       ; }
      static void AlimenterProjoAlleeGlue()      { return fObj->AlimenterProjoAllee()    ; }
      static void CouperAppentiGlue()                  { return fObj->CouperAppenti()          ; }
      static void AlimenterAppentiGlue()            { return fObj->AlimenterAppenti()       ; }
      static void CouperPuitGlue()                  { return fObj->CouperPuit()             ; }
      static void AlimenterPuitGlue()                  { return fObj->AlimenterPuit()          ; }


  private:

      static FunctionalTasks *fObj;


//=============================================================================
/* Constructor & Destructor {{{1 */
    FunctionalWrapper();
/* }}}1 */
};

#endif /* _FunctionalWrapper_h */

// vim:fdm=marker:nowrap:ts=4:expandtab:
/*
   FunctionalWrapper.cpp to provide member function pointer

   12 Oct 2010 - First Version
   */

#include "WProgram.h"
#include <FunctionalWrapper.h>


FunctionalWrapper::FunctionalWrapper()
{
}

Put this...

static FunctionalTasks* FunctionalWrapper::fObj;

...in the CPP file.

it’is ok out off static member has to be initialized like that:

FunctionalTasks* FunctionalWrapper::fObj=NULL;

I have another last problem I hope. My setup is doing its lines’code continuously.

18:07:57_INIT SCREEN DONE
18:07:57_Tracer contains LCD object’s pointer now !
18:07:58_Date
18:08:00_INIT SCREEN DONE
18:08:00_Tracer contains LCD object’s pointer now !
18:08:00_Date
18:08:02_INIT SCREEN DONE
18:08:03_Tracer contains LCD object’s pointer now !
18:08:03_Date
18:08:05_INIT SCREEN DONE
18:08:05_Tracer contains LCD object’s pointer now !
18:08:06_Date
18:08:08_INIT SCREEN DONE
18:08:08_Tracer contains LCD object’s pointer now !
18:08:08_Date
18:08:10_INIT SCREEN DONE
18:08:10_Tracer contains LCD object’s pointer now !
18:08:11_Date

Sketch

/*
   CoreSystem

   Manage Main Loop to control some electrical feature
   */

#include <inttypes.h>

#include <Time.h>
#include <TimeAlarms.h>

// niva add features
#include <Utils.h>
#include <Traces.h>
// #include <PushButton.h>
// #include <PinManager.h>
#include <FunctionalTasks.h>
#include <FunctionalWrapper.h>

#include <Wire.h>
#include <LiquidCrystal.h>
#include <DS1307.h> // written by  mattt on the Arduino forum and modified by D. Sjunnesson

Traces Tracer; 
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
FunctionalTasks FuncTask;



//
//  SETUP
//

void setup()  { 

      // SERIAL
      Serial.begin(9600); 

      // LCD
        lcd.begin(16, 2);
        lcd.setCursor(0, 0);
        lcd.clear();
        delay(2000);
      Tracer.Print("INIT SCREEN DONE");

      // pass lcd to tracer
      Tracer.setLcd(&lcd);

      // Bind the wrapper to FunctionalTasks p and call procedure
      FunctionalWrapper::setObj(FuncTask);



      // Alarm.timerRepeat(4, p);
      FunctionalWrapper::AfficheDateGlue();
} 

//
//  LOOP
//
void loop()  {


}

Traces class

/*
  Traces.cpp for traces output.

  Copyright (c) Nicolas VALENTIN 2010
  12 Oct 2010  - First Version
  2010 nov. 20 Adding Special Features Writing Direction
*/

#include "WProgram.h"
#include "Traces.h"
#include "Time.h"
#include <Wire.h>
#include <Utils.h>
#include <DS1307.h>
#include <LiquidCrystal.h>

//=============================================================================
/* Constructor & Destructor {{{1 */
Traces::Traces()
{

      b_clearEntireLine=true; 
      l_lastIndexPositionWritten=0;
      l_selectedLine=0;
}

Traces::~Traces()
{
}

Traces::Traces( const Traces &cpy )
{
}
/* }}}1 */
//=============================================================================
/* Accessors {{{1 */
void Traces::setLcd(LiquidCrystal *lcdPtr) {

      if (  lcdPtr != NULL )
      {
            _lcdPtr = lcdPtr;
            Traces::Print("Tracer contains LCD object's pointer now !");
            delay(500);
      }
      else
      {
            Traces::Print("Erreur pointeur nul sur le module de trace");
      }
}
/* }}}1 */
//=============================================================================
/* Serial Print Feature {{{1 */
void Traces::Print(String pstr) {
   Serial.println(Date()+pstr);
}

void Traces::BeginPrint(String pstr) {
   Serial.print(Date()+pstr);
}

void Traces::EndPrint(String pstr) {
   Serial.println(pstr);
}
/* }}}1 */
//=============================================================================
/* LCD Print Methods {{{1 */
//=============================================================================
// Print methods on LCD Top Line {{{2
void Traces::LcdPrintTopLine(String pstr) {
      l_selectedLine=0;
      _lcdPtr->home();
      _lcdPtr->print(strutils::CompleteString(pstr));
}

void Traces::LcdPrintTopLineFromLeft(String pstr) {
      l_selectedLine=0;
      Traces::LcdPrintFromLeft(pstr);
}

void Traces::LcdPrintTopLineFromRight(String pstr) {
      l_selectedLine=0;
      Traces::LcdPrintFromRight(pstr);
}
// }}}2
//=============================================================================
// Print methods on LCD Bottom Line {{{2
void Traces::LcdPrintBottomLine(String pstr) {
      l_selectedLine=1;
      _lcdPtr->home();
      _lcdPtr->print(strutils::CompleteString(pstr));
}

void Traces::LcdPrintBottomLineFromLeft(String pstr) {
      l_selectedLine=1;
      Traces::LcdPrintFromLeft(pstr);
}

void Traces::LcdPrintBottomLineFromRight(String pstr) {
      l_selectedLine=1;
      Traces::LcdPrintFromRight(pstr);
}
// }}}2
//=============================================================================
// Print methods to write from left or right direction {{{2
void Traces::LcdPrintFromLeft(String pstr) {

      // _lcdPtr->home();
      _lcdPtr->setCursor(0,0);
      // write message
      for (int i=0; i<pstr.length(); ++i)
      {
            _lcdPtr->setCursor(i,0);
            _lcdPtr->print(pstr.charAt(i));
            // delay(150);
      }
}

void Traces::LcdPrintFromRight(String pstr) {

      //
      _lcdPtr->setCursor(16,l_selectedLine);
      // write message
      int pos = 16;
      for (int i=pstr.length(); i>=0; --i)
      {
            _lcdPtr->setCursor(pos,l_selectedLine);
            _lcdPtr->print(pstr.charAt(i));
            pos--;
            // delay(150);
      }
}
// }}}2
// }}}1
//=============================================================================
// LCD Clear Methods {{{1
void Traces::LcdClearLine(int noLine) {

      _lcdPtr->home();
      for (int i=0; i<16; ++i)
      {
            _lcdPtr->setCursor(i,noLine);
            _lcdPtr->print(" ");
            delay(10);
      }
}
void Traces::LcdClearTopLine() { 
      Traces::LcdClearLine(0);
}
void Traces::LcdClearBottomLine() { 
      Traces::LcdClearLine(1);
}
void Traces::LcdClearScreen() { 
      Traces::LcdClearTopLine();
      Traces::LcdClearBottomLine();
}
// }}}1
//=============================================================================
/* Utils Private Methods {{{1 */
String Traces::Date(){

  String str ;
  str+=convert::ToTwoDigits(RTC.get(DS1307_HR, true))+":"+convert::ToTwoDigits(RTC.get(DS1307_MIN, false))+":"+convert::ToTwoDigits(RTC.get(DS1307_SEC , false))+"_";
  return str;
}
/* }}}1 */
//=============================================================================

// Traces Tracer = Traces() ;
/* set fdm=marker */
/*
  traces.h - low level traces functions
*/

#ifndef _Traces_h
#define _Traces_h

#include "WProgram.h"
#include <inttypes.h>
#include <LiquidCrystal.h>
#include "Time.h"


class Traces
{
  public:
//=============================================================================
/* Constructor & Destructor {{{1 */
      Traces();
      ~Traces();
      Traces( const Traces &cpy );
/* }}}1 */
//=============================================================================
/* Accessors {{{1 */
      void setLcd(LiquidCrystal *lcdPtr);
/* }}}1 */
//=============================================================================
/* Serial Print Feature {{{1 */
      void Print(String pstr);
      void BeginPrint(String pstr);
      void EndPrint(String pstr);
/* }}}1 */
//=============================================================================
      /* LCD Print Methods {{{1 */
//=============================================================================
      // Print methods on LCD Top Line {{{2
      void LcdPrintTopLine             (String pstr);
      void LcdPrintTopLineFromLeft (String pstr);
      void LcdPrintTopLineFromRight(String pstr);
      // }}}2
      // Print methods on LCD Bottom Line {{{2
      void LcdPrintBottomLine                   (String pstr);
      void LcdPrintBottomLineFromLeft (String pstr);
      void LcdPrintBottomLineFromRight(String pstr);
      // }}}2
//=============================================================================
      // Print methods to write from left or right direction {{{2
      void LcdPrintFromLeft (String pstr);
      void LcdPrintFromRight(String pstr);
      // }}}2
      /* }}}1 */
//=============================================================================
// LCD Clear methods {{{1
      void LcdClearLine(int noLine) ; 
      void LcdClearTopLine()        ; 
      void LcdClearBottomLine()     ; 
      void LcdClearScreen()         ; 
// }}}1
  private:
//=============================================================================
/* Private Members {{{1 */
/* Accessors members {{{2 */
      LiquidCrystal * _lcdPtr;
/* }}}2 */
//=============================================================================
      /* LCD Print private members {{{2 */
      bool b_clearEntireLine;

      // on 16x2 LCD line, 
      //
      int l_selectedLine;
      
      // this save the position index of last character written
      // from left or from right
      int l_lastIndexPositionWritten;
      /* }}}2 */
/* }}}1 */
//=============================================================================
/* Utils Private Methods {{{1 */
      String Date();
/* }}}1 */
//=============================================================================
};
/* set fdm=marker */

#endif /* _Traces_h */

Ok this is done.

Just Forgot to pass my Tracer object to my FunctionalMethods object by pointer.

void setup()  { 

      // SERIAL
      Serial.begin(9600); 

      // LCD
        lcd.begin(16, 2);
        lcd.setCursor(0, 0);
        lcd.clear();
        delay(2000);
      Tracer.Print("INIT SCREEN DONE");

      // pass lcd to tracer
      Tracer.setLcd(&lcd);
      FuncTask.setTracer(&Tracer);      <<< This line was missing

FuncTask had dereference pointer of Tracer.