Book a Demo

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - johnw@wessex

Pages: [1]
1
General Board / Import from source doesn't understand  'typen
« on: October 26, 2006, 08:24:46 am »
EA will not reverse engineer any of my template classes when they include lines with typename


There was an error parsing H:\Work\WCL\WCL\wsx_image_grey_template.h on line 29.  Unexpected symbol: Get_Image_Start

Here's a fragment of the template below.

namespace wsx
{
  namespace image
  {
          template<class TSample>
          class wsx_image_grey_template : public wsx_image_template<TSample>
           {
                   public:
                   // Defined functions.
                   typename virtual iterator Get_Image_Start();
                   typename virtual iterator Get_Image_Start(int x, int y);
                   typename virtual iterator Get_Image_Start(const wsx::data::wsx_point &point);


Any ideas for a fix?

2
Automation Interface, Add-Ins and Tools / Re: C++ code generation
« on: February 09, 2005, 05:20:48 am »
Appearently it is a known issue and you must import this XML for it to work.

Code: [Select]


 <?xml version="1.0" encoding="windows-1252" ?>
- <RefData version="1.0" exporter="EA.25">
- <DataSet name="C++_Code_Template" table="t_template" filter="TemplateType='#TemplateType#' and TemplateName='#TemplateName#' and Style='#Style#'">
- <DataRow>
 <Column name="TemplateID" value="{A67D5899-C97E-4286-93AC-716A45218004}" />
 <Column name="TemplateType" value="C++_Code_Template" />
 <Column name="TemplateName" value="Attribute__StaticImpl" />
 <Column name="Template" value="%attType% %className%::%attName%%attInitial ? " = " value%;" />
 </DataRow>
- <DataRow>
 <Column name="TemplateID" value="{FD32BDFD-B7DD-4e8d-9D6B-E42831FF392C}" />
 <Column name="TemplateType" value="C++_Code_Template" />
 <Column name="TemplateName" value="Class Body Impl" />
 <Column name="Template" value="$templateArgs=%list="ClassParameter" @separator=", "% %if $templateArgs != ""% $templateArgs="<" + $templateArgs + ">" $templ="template" + $templateArgs %endIf% $consPrefix=$templ + "\n" + %classQualName% + "::" %PI="\n\n\n"% %list="Attribute__StaticImpl" @separator="\n\n" attStatic=="T"% %if genOptGenConstructor == "T" and genOptGenConstructorInline != "T" and classHasConstructor != "T"% $consPrefix%className%(){\n\n} %endIf% %if genOptGenDestructor == "T" and genOptGenDestructorInline != "T" and classHasDestructor != "T"% $destructor=$consPrefix+"~"+%className%+"(){\n\n}" $destructor %endIf% %if genOptGenCopyConstructor == "T" and genOptGenCopyConstructorInline != "T" and classHasCopyConstructor != "T"% $consPrefix%className%(const %className%& the%className%){\n\n} %endIf% %list="OperationImpl" @separator="\n\n\n"% %list="InnerClassImpl" @separator=""%" />
 </DataRow>
 </DataSet>
 </RefData>

3
Automation Interface, Add-Ins and Tools / Re: C++ code generation
« on: February 08, 2005, 07:14:55 am »
Quote
What do you mean by un-compilable?


A static variable declared in a class must be defined.

class MyClass
{
public:
   static int var;
};

int MyClass::var;

Quote
Did you include this attribute in Class1 and it's not generated?


Correct

4
Automation Interface, Add-Ins and Tools / C++ code generation
« on: February 08, 2005, 06:26:40 am »
I'm trying out the demo of Enterprise Architect.
I created a class diagram containing a private static integer variable and then generated the C++ source code.



///////////////////////////////////////////////////////////
//  Class1.h
//  Implementation of the Class Class1
//  Created on:      08-Feb-2005 09:39:27
///////////////////////////////////////////////////////////

#if !defined(EA_CF70D464_4571_408e_AD98_FC90F6E31E1F__INCLUDED_)
#define EA_CF70D464_4571_408e_AD98_FC90F6E31E1F__INCLUDED_

class Class1
{
public:
Class1();
virtual ~Class1();

private:
static int some_variable;
};

#endif // !defined(EA_CF70D464_4571_408e_AD98_FC90F6E31E1F__INCLUDED_)

///////////////////////////////////////////////////////////
//  Class1.cpp
//  Implementation of the Class Class1
//  Created on:      08-Feb-2005 09:39:27
///////////////////////////////////////////////////////////

#include "Class1.h"

//**** THIS LINE IS MISSING FROM THE GENERATED SOURCE ****
int Class1::some_variable;
//*************************************************

Class1::Class1(){

}

Class1::~Class1(){

}

Without the missing line the code is un-compileable!

Any thoughts?

Pages: [1]