Book a Demo

Author Topic: BEGIN_INTERFACE_PART language macro definition  (Read 4153 times)

miztadave

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
BEGIN_INTERFACE_PART language macro definition
« on: October 30, 2006, 07:29:12 pm »
Could someone please explain how to use the BEGIN_INTERFACE_PART END_INTERFACE_PART language macro definition? The documentation about this feature is not at all clear. Perhaps an example would be a useful inclusion?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: BEGIN_INTERFACE_PART language macro definition
« Reply #1 on: October 30, 2006, 08:20:48 pm »
You're talking about the example at the bottom of http://sparxsystems.com.au/EAUserGuide/index.html?languagemacros.htm right?

Well, I'm afraid it's a very bad example and I'll make sure it gets updated.

EA supports skipping over two sorts of structured macros.  Function macros and block macros.  A function macro is specified in EA by adding parenthesis after the macro name.

eg.
Code: [Select]
DISP_FUNCTION()
IMPLEMENT_SERIAL()

A block macro is specified as shown with the ^ symbol between the start of the block and the end of the block.

However, here's where the documentation is bad.  BEGIN_INTERFACE_PART and END_INTERFACE_PART are themselves function macros.  To properly skip over those macros you need to add the following
Code: [Select]
BEGIN_INTERFACE_PART() ^ END_INTERFACE_PART()
This macro is already skipped by default, and adding what the help file says will actually take priority over the default and will cause the parse to fail.

Does that help?
« Last Edit: October 30, 2006, 08:26:30 pm by simonm »

miztadave

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: BEGIN_INTERFACE_PART language macro definition
« Reply #2 on: October 30, 2006, 08:24:39 pm »
No I'm sorry Simon it really doesn't help much at all   :-/ I'm at a loss as to what this functionality provides.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: BEGIN_INTERFACE_PART language macro definition
« Reply #3 on: October 30, 2006, 08:31:05 pm »
It allows C++ parsing to ignore an entire block of text.  You may need to do that if the contents of the block can't really be parsed by EA, or if you don't want EA to import anything from inside the block.

miztadave

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: BEGIN_INTERFACE_PART language macro definition
« Reply #4 on: October 30, 2006, 08:40:31 pm »
Ahhh right that's what I was expecting  ;D But I still can't figure out how to use it  :-[ In the file I am trying to analyse, there is an '@' symbol (compiler-specific functionality) that confuses EA. Therefore, I want the EA parser to ignore it. How do I use these functions to achieve this?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: BEGIN_INTERFACE_PART language macro definition
« Reply #5 on: October 31, 2006, 01:11:48 pm »
Well, that's where you're stuck... The macro language only handles identifiers.