2016-05-24 16:03:08 +02:00
|
|
|
#ifndef __PLASP__SAS__ASSIGNED_VARIABLE_H
|
|
|
|
#define __PLASP__SAS__ASSIGNED_VARIABLE_H
|
2016-05-21 17:09:55 +02:00
|
|
|
|
|
|
|
#include <iosfwd>
|
2016-05-22 14:24:38 +02:00
|
|
|
#include <vector>
|
2016-05-21 17:09:55 +02:00
|
|
|
|
2017-06-22 20:58:31 +02:00
|
|
|
#include <tokenize/Tokenizer.h>
|
|
|
|
|
2016-05-21 17:09:55 +02:00
|
|
|
#include <plasp/sas/Value.h>
|
|
|
|
#include <plasp/sas/Variable.h>
|
|
|
|
|
|
|
|
namespace plasp
|
|
|
|
{
|
|
|
|
namespace sas
|
|
|
|
{
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// AssignedVariable
|
|
|
|
//
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2016-05-22 14:24:38 +02:00
|
|
|
class AssignedVariable;
|
|
|
|
using AssignedVariables = std::vector<AssignedVariable>;
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2016-05-21 17:09:55 +02:00
|
|
|
class AssignedVariable
|
|
|
|
{
|
|
|
|
public:
|
2017-05-12 14:17:57 +02:00
|
|
|
static AssignedVariable fromSAS(tokenize::Tokenizer<> &tokenizer, const Variables &variables);
|
|
|
|
static AssignedVariable fromSAS(tokenize::Tokenizer<> &tokenizer, const Variable &variable);
|
2016-05-21 17:09:55 +02:00
|
|
|
|
|
|
|
public:
|
2016-05-22 15:46:41 +02:00
|
|
|
explicit AssignedVariable(const Variable &variable, const Value &value);
|
2016-05-21 17:09:55 +02:00
|
|
|
|
|
|
|
const Variable &variable() const;
|
|
|
|
const Value &value() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
AssignedVariable();
|
|
|
|
|
|
|
|
const Variable *m_variable;
|
|
|
|
const Value *m_value;
|
|
|
|
};
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|