Erick / Mbed 2 deprecated ICE-F412

Dependencies:   mbed-rtos mbed

ICE-Application/src/ConfigurationHandler/Algorithms/CompositeAlgorithm.h

Committer:
jmarkel44
Date:
2017-01-24
Revision:
0:61364762ee0e

File content as of revision 0:61364762ee0e:

/******************************************************************************
 * 
 * File:                CompositeAlgorithm.h
 * Desciption:          interface file for the ICE Composite Algorithm
 *
 *****************************************************************************/
#ifndef COMPOSITEALGORITHM_H
#define COMPOSITEALGORITHM_H

#include <stdio.h>
#include <string>

class CompositeAlgorithm
{
private:
    std::string     controlFile;        // the control file
    std::string     id;                 // algorithm id
    std::string     tag;                // input (real or virtual)
    std::string     opr;                // right operand
    std::string     op;                 // operation to perform (+, -, ==, etc.)
    std::string     resultTrue;         // what to do when true
    std::string     resultFalse;        // what to do when false 
    
    bool        validateControlData(const char *buf);
    void        copyControlData(const char *buf);
public:
    CompositeAlgorithm() {}
    ~CompositeAlgorithm() {
        printf("%s invoked", __func__);
    }

    bool load(const std::string);

    void display(void);

    std::string getId(void) const {
        return id;
    }
    std::string getTag(void) const { 
    return tag;
    }
    std::string getOpr(void) const { return opr; }
    std::string getOp(void) const { return op; }
    std::string getResultTrue(void) const { return resultTrue; }
    std::string getResultFalse(void) const { return resultFalse; }
};

#endif