Commit 72e4b138 authored by Claes Sjöfors's avatar Claes Sjöfors

wb_print_wbl temporarily reverted due to problems with the classcache

parent 1a0294fc
This diff is collapsed.
/*
* ProviewR Open Source Process Control.
* Copyright (C) 2005-2019 SSAB EMEA AB.
/*
* Proview Open Source Process Control.
* Copyright (C) 2005-2017 SSAB EMEA AB.
*
* This file is part of ProviewR.
* This file is part of Proview.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProviewR. If not, see <http://www.gnu.org/licenses/>
* You should have received a copy of the GNU General Public License
* along with Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking ProviewR statically or dynamically with other modules is
* making a combined work based on ProviewR. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* ProviewR give you permission to, from the build function in the
* ProviewR Configurator, combine ProviewR with modules generated by the
* ProviewR PLC Editor to a PLC program, regardless of the license
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of ProviewR (the version used to produce the
* combined work), being distributed under the terms of the GNU
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
*/
**/
/**
* @file wb_print_wbl.h
......@@ -44,10 +44,11 @@
#ifndef wb_print_wbl_h
#define wb_print_wbl_h
#include <ostream>
#include <iostream>
#include "pwr_class.h"
#include "wb_ldh.h"
#include "co_tree.h"
using namespace std;
class wb_adef;
class wb_attribute;
......@@ -55,68 +56,79 @@ class wb_cdef;
class wb_object;
class wb_volume;
class wb_print_wbl {
class wb_print_wbl
{
protected:
int m_errCnt;
int m_lineCnt;
int m_errCnt;
bool m_idxFlag;
bool m_noFoCodeFlag;
bool m_timeFlag;
int m_level;
int m_levelInd;
int m_level;
int m_levelInd;
char m_indBuf[256];
bool m_keepName;
bool m_isTemplateObject;
std::ostream& m_os;
tree_sTable* m_body_cache;
std::ostream& indent(int levelIncr = 0);
void printBody(
wb_volume& vol, pwr_tOid oid, pwr_tOid toid, pwr_tCid cid, pwr_eBix bix);
bool printValue(wb_volume& v, pwr_eType type, unsigned int flags, void* val,
int varSize, char** svalp);
void printBuffer(wb_volume& vol, ldh_sParDef* par_bd, char* body);
void printClass(wb_volume& vol, ldh_sParDef* par_bd, char* body, char* tbody,
char* par_path);
void printText(
wb_volume& v, const char* aname, const char* text, int varSize);
pwr_tStatus getBody(wb_volume& vol, pwr_tCid cid, const char* bname,
int tsize, ldh_sParDef** bdef, int* rows, char** tbody);
void bodyCacheFree();
int attrCmp(char* a1, char* a2, int size, pwr_eType type);
bool isFoCodeObject(wb_volume& v, wb_object& o);
ostream& m_os;
ostream& indent(int levelIncr = 0);
void printAttribute(wb_volume& v,
wb_attribute& attr,
wb_attribute& tattr, ///< template attribute
wb_adef& adef,
int force);
void printBody(wb_volume& v,
wb_object& o,
wb_object& templ,
wb_cdef& cdef,
pwr_eBix bix);
void printBuffer(wb_volume& v,
wb_attribute& attr,
wb_attribute& tattr, ///< template attribute
wb_adef& adef);
void printClass(wb_volume& v,
wb_attribute& attr,
wb_attribute& tattr, ///< template attribute
wb_adef& adef);
void printParameter(wb_volume& v,
wb_attribute& attr,
wb_attribute& tattr, ///< template attribute
wb_adef& adef);
void printText(wb_volume& v,
wb_adef& adef,
const char* text,
int varSize);
bool printValue(wb_volume& v,
wb_adef& adef,
void *val,
int varSize,
char **svalp);
bool isFoCodeObject( wb_volume& v,
wb_object& o);
public:
wb_print_wbl(std::ostream& os, int levelIndentation = 2);
wb_print_wbl(ostream& os, int levelIndentation = 2);
~wb_print_wbl();
int getErrCnt() const
{
return m_errCnt;
}
void resetErrCnt()
{
m_errCnt = 0;
}
void keepName()
{
m_keepName = true;
}
void noIndex()
{
m_idxFlag = false;
m_timeFlag = false;
}
void noFoCode()
{
m_noFoCodeFlag = true;
}
void printHierarchy(wb_volume& v, wb_object& o); ///< Prints a hierarchy
void printObject(
wb_volume& v, wb_object& o, bool recursive = true); ///< Prints an object
void printVolume(wb_volume& v, bool recursive = true); ///< Prints the volume
int getErrCnt() const { return m_errCnt;}
void resetErrCnt() {m_errCnt = 0; }
void keepName() { m_keepName = true;}
void noIndex() { m_idxFlag = false; m_timeFlag = false;}
void noFoCode() { m_noFoCodeFlag = true;}
void printHierarchy(wb_volume& v, wb_object& o); //< Prints a hierarchy
void printObject(wb_volume& v, wb_object& o, bool recursive = true); //< Prints an object
void printVolume(wb_volume& v, bool recursive = true); //< Prints the volume
};
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment