-
Adam Knapp authored
Change-Id: Iacba53d8499439eba82045c30a1e0f2e0edf16fe Signed-off-by:
Adam Knapp <adam.knapp@sigmatechnology.se>
Adam Knapp authoredChange-Id: Iacba53d8499439eba82045c30a1e0f2e0edf16fe Signed-off-by:
Adam Knapp <adam.knapp@sigmatechnology.se>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Ttcnstuff.hh 30.87 KiB
/******************************************************************************
* Copyright (c) 2000-2021 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
*
* Contributors:
* Balasko, Jeno
* Baranyi, Botond
* Delic, Adam
* Raduly, Csaba
* Szabados, Kristof
* Szabo, Bence Janos
* Zalanyi, Balazs Andor
*
******************************************************************************/
#ifndef TTCNSTUFF_H_
#define TTCNSTUFF_H_
#include "../Setting.hh"
#include "../Type.hh" // for Common::Common::Type::MessageEncodingType_t
#include "AST_ttcn3.hh" // For Def_Function_Base::prototype_t
#include "port.h"
#include "../vector.hh"
namespace Ttcn {
class Reference;
/**
* Class to represent an error behavior setting in the codec API of the
* run-time environment. The setting contains a pair of strings:
* the error type identifier and the way of error handling.
*/
class ErrorBehaviorSetting : public Common::Node, public Common::Location {
private:
string error_type, error_handling;
public:
ErrorBehaviorSetting(const string& p_error_type,
const string& p_error_handling)
: Common::Node(), Common::Location(), error_type(p_error_type),
error_handling(p_error_handling) { }
virtual ErrorBehaviorSetting *clone() const;
const string& get_error_type() const { return error_type; }
void set_error_type(const string& p_error_type)
{ error_type = p_error_type; }
const string& get_error_handling() const { return error_handling; }
void set_error_handling(const string& p_error_handling)
{ error_handling = p_error_handling; }
virtual void dump(unsigned level) const;
};
/**
* Class to represent a list of error behavior settings in the codec API
* of the run-time environment.
*/
class ErrorBehaviorList : public Common::Node, public Common::Location {
private:
vector<ErrorBehaviorSetting> ebs_v;
map<string, ErrorBehaviorSetting> ebs_m;
ErrorBehaviorSetting *ebs_all;
bool checked;
/** Copy constructor not implemented */
ErrorBehaviorList(const ErrorBehaviorList& p);
/** Assignment disabled */
ErrorBehaviorList& operator=(const ErrorBehaviorList& p);
public:
ErrorBehaviorList() : Common::Node(), Common::Location(), ebs_all(0), checked(false) { }
virtual ~ErrorBehaviorList();