Commit a17015d2 authored by Claes Sjöfors's avatar Claes Sjöfors

wb_print_wbl temporarily reverted due to problems with the classcache

parent 85c8328f
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
......@@ -15,24 +15,24 @@
* 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/>
* 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
* 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
* 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,10 +56,11 @@ class wb_cdef;
class wb_object;
class wb_volume;
class wb_print_wbl {
class wb_print_wbl
{
protected:
int m_errCnt;
int m_lineCnt;
bool m_idxFlag;
bool m_noFoCodeFlag;
bool m_timeFlag;
......@@ -67,56 +69,66 @@ protected:
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