Commit 067a4a63 authored by claes's avatar claes

wb_wblnode.cpp

parent 0467913d
/*
* Proview $Id: wb_db.cpp,v 1.27 2005-12-13 15:15:53 claes Exp $
* Proview $Id: wb_db.cpp,v 1.28 2005-12-14 11:20:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -25,7 +25,7 @@
#include "pwr.h"
#include "pwr_class.h"
#include "co_dcli.h"
#include "db40/db_cxx.h"
#include "db_cxx.h"
#include "wb_ldh.h"
#include "wb_ldh_msg.h"
#include "wb_destination.h"
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
#define INC_wb_wbllexer_hpp_
#include <antlr/config.hpp>
/* $ANTLR 2.7.4: "wb_wbllexer.g" -> "wb_wbllexer.hpp"$ */
/* $ANTLR 2.7.5 (20050128): "wb_wbllexer.g" -> "wb_wbllexer.hpp"$ */
#include <antlr/CommonToken.hpp>
#include <antlr/InputBuffer.hpp>
#include <antlr/BitSet.hpp>
......
/* $ANTLR 2.7.4: "wb_wblparser.g" -> "wb_wblparser.cpp"$ */
/* $ANTLR 2.7.5 (20050128): "wb_wblparser.g" -> "wb_wblparser.cpp"$ */
#include "wb_wblparser.hpp"
#include <antlr/NoViableAltException.hpp>
#include <antlr/SemanticException.hpp>
......@@ -84,8 +84,7 @@ void wb_wblparser::unit() {
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
reportError(ex);
consume();
consumeUntil(_tokenSet_0);
recover(ex,_tokenSet_0);
}
returnAST = unit_AST;
}
......@@ -160,8 +159,7 @@ void wb_wblparser::volume() {
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
reportError(ex);
consume();
consumeUntil(_tokenSet_1);
recover(ex,_tokenSet_1);
}
returnAST = volume_AST;
}
......@@ -217,8 +215,7 @@ void wb_wblparser::sobject() {
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
reportError(ex);
consume();
consumeUntil(_tokenSet_1);
recover(ex,_tokenSet_1);
}
returnAST = sobject_AST;
}
......@@ -335,8 +332,7 @@ void wb_wblparser::object() {
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
reportError(ex);
consume();
consumeUntil(_tokenSet_2);
recover(ex,_tokenSet_2);
}
returnAST = object_AST;
}
......@@ -374,8 +370,7 @@ void wb_wblparser::cid() {
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
reportError(ex);
consume();
consumeUntil(_tokenSet_3);
recover(ex,_tokenSet_3);
}
returnAST = cid_AST;
}
......@@ -433,8 +428,7 @@ void wb_wblparser::body() {
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
reportError(ex);
consume();
consumeUntil(_tokenSet_4);
recover(ex,_tokenSet_4);
}
returnAST = body_AST;
}
......@@ -472,8 +466,7 @@ void wb_wblparser::oix() {
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
reportError(ex);
consume();
consumeUntil(_tokenSet_5);
recover(ex,_tokenSet_5);
}
returnAST = oix_AST;
}
......@@ -576,8 +569,7 @@ void wb_wblparser::attribute() {
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
reportError(ex);
consume();
consumeUntil(_tokenSet_6);
recover(ex,_tokenSet_6);
}
returnAST = attribute_AST;
}
......@@ -633,8 +625,7 @@ void wb_wblparser::value() {
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
reportError(ex);
consume();
consumeUntil(_tokenSet_6);
recover(ex,_tokenSet_6);
}
returnAST = value_AST;
}
......@@ -653,8 +644,7 @@ void wb_wblparser::oname() {
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
reportError(ex);
consume();
consumeUntil(_tokenSet_0);
recover(ex,_tokenSet_0);
}
returnAST = oname_AST;
}
......
......@@ -2,7 +2,7 @@
#define INC_wb_wblparser_hpp_
#include <antlr/config.hpp>
/* $ANTLR 2.7.4: "wb_wblparser.g" -> "wb_wblparser.hpp"$ */
/* $ANTLR 2.7.5 (20050128): "wb_wblparser.g" -> "wb_wblparser.hpp"$ */
#include <antlr/TokenStream.hpp>
#include <antlr/TokenBuffer.hpp>
#include "wb_wblparserTokenTypes.hpp"
......@@ -21,11 +21,10 @@ extern int wblparser_error_cnt;
#line 24 "wb_wblparser.hpp"
class CUSTOM_API wb_wblparser : public ANTLR_USE_NAMESPACE(antlr)LLkParser, public wb_wblparserTokenTypes
{
// This_declarations_should_be_moved_inside_parser_class_in_wb_wblparser_hpp_!!
void reportError(const RecognitionException& ex);
#line 1 "wb_wblparser.g"
#line 28 "wb_wblparser.hpp"
public:
void reportError(const RecognitionException& ex);
void initializeASTFactory( ANTLR_USE_NAMESPACE(antlr)ASTFactory& factory );
protected:
wb_wblparser(ANTLR_USE_NAMESPACE(antlr)TokenBuffer& tokenBuf, int k);
......
#ifndef INC_wb_wblparserTokenTypes_hpp_
#define INC_wb_wblparserTokenTypes_hpp_
/* $ANTLR 2.7.4: "wb_wblparser.g" -> "wb_wblparserTokenTypes.hpp"$ */
/* $ANTLR 2.7.5 (20050128): "wb_wblparser.g" -> "wb_wblparserTokenTypes.hpp"$ */
#ifndef CUSTOM_API
# define CUSTOM_API
......
// $ANTLR 2.7.4: wb_wblparser.g -> wb_wblparserTokenTypes.txt$
// $ANTLR 2.7.5 (20050128): wb_wblparser.g -> wb_wblparserTokenTypes.txt$
wb_wblparser // output token vocab name
OBJECT=4
ENDOBJECT=5
......
#ifndef INC_wb_wblvocabTokenTypes_hpp_
#define INC_wb_wblvocabTokenTypes_hpp_
/* $ANTLR 2.7.4: "wb_wbllexer.g" -> "wb_wblvocabTokenTypes.hpp"$ */
/* $ANTLR 2.7.5 (20050128): "wb_wbllexer.g" -> "wb_wblvocabTokenTypes.hpp"$ */
#ifndef CUSTOM_API
# define CUSTOM_API
......
// $ANTLR 2.7.4: wb_wbllexer.g -> wb_wblvocabTokenTypes.txt$
// $ANTLR 2.7.5 (20050128): wb_wbllexer.g -> wb_wblvocabTokenTypes.txt$
wb_wblvocab // output token vocab name
OBJECT=4
ENDOBJECT=5
......
/*
* Proview $Id: wb_wnav_item.cpp,v 1.17 2005-10-25 15:28:11 claes Exp $
* Proview $Id: wb_wnav_item.cpp,v 1.18 2005-12-14 11:20:50 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -2278,6 +2278,23 @@ int WItemAttrObject::open_attributes( double x, double y)
int attr_exist = 0;
int input_cnt = 0;
int output_cnt = 0;
int is_casted = 0;
// Check if attrobject is casted
if ( flags & PWR_MASK_CASTATTR) {
pwr_sAttrRef ar = cdh_ObjidToAref( objid);
pwr_sAttrRef aar;
pwr_tTid tid;
sts = ldh_ArefANameToAref( ldhses, &ar, name, &aar);
if ( EVEN(sts)) return sts;
sts = ldh_GetAttrRefOrigTid( ldhses, &aar, &tid);
if ( EVEN(sts)) return sts;
if ( tid != classid)
is_casted = 1;
}
// Create some attributes
brow_SetNodraw( brow->ctx);
......@@ -2300,9 +2317,20 @@ int WItemAttrObject::open_attributes( double x, double y)
if ( EVEN(sts))
continue;
for ( j = 0; j < rows; j++) {
strcpy( parname, name);
strcat( parname, ".");
strcat( parname, bodydef[j].ParName);
if ( is_casted) {
// Remove any leading 'super.' in parname
strcpy( parname, name);
strcat( parname, ".");
if ( strncmp( bodydef[j].ParName, "Super.", 6) == 0)
strcat( parname, &bodydef[j].ParName[6]);
else
strcat( parname, bodydef[j].ParName);
}
else {
strcpy( parname, name);
strcat( parname, ".");
strcat( parname, bodydef[j].ParName);
}
if ( bodydef[j].Flags & ldh_mParDef_Shadowed)
continue;
......
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