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 - Si Perry

Pages: [1]
1
Hi Mike

Haven't used Poseidon, but agree with your sentiment about systematically looking at the UI strengths of other tools.

As for your point 2), there is a slightly quicker way. For your first class, click on the class button and add as usual. To add subsequent classes, hold the Ctrl key down and left click mouse button over the diagram. This will add another class without you having to keep clicking on the class icon. However, if you select something else to add to the diagram, you will have to select the class button again before the Ctrl+LMB will work again.

2
General Board / CVS & Igloo - getting previous versions
« on: February 09, 2004, 04:45:35 am »
I have successfully checked a number of packages into cvs using the igloo bridge. Made some changes which I can view in the file history diagram.

Now, I can get the latest version, but how on earth do I get a previous version? Any suggestions gratefully received.

3
General Board / Representing association classes on object diagram
« on: August 14, 2003, 03:34:27 am »
I have an association classC linking two other classes A & B. The association class has an attribute.

I want to draw an object diagram with instances of classes B & C and the association class C.

The UML Reference Manual states that instances of an association class are links, and that "A link that is an instance of an association class may have a list of attribute values in addition to the tuple of object references."

I have taken this to mean that the association class is represented on an object diagram by a normal association link between them, and that I should then add attributes (corresponding to those in the association class) to the association.

Is this correct?

Is it possible to do this in EA, as I can find no way of adding attributes to an association.

Cheers
Si

4
General Board / Reverse Engineering - Problems with Friends
« on: February 12, 2002, 09:01:27 pm »
Hi

I have a file of the form:

Code: [Select]
class NovaDate  
{
   // FRIENDS
   // @friend NovaTime | Time (and date) class
   friend class NovaTime;
   friend class NovaDSTBoundary;

// @access Public Members & Methods
public:
     NovaDate();

// etc other methods and members here

};


When I reverse engineer this class I get a dialog saying "Error Reading File".

When I hit okay, the file seems to import. However, on viewing the class, a number of problems exist:
1. ALL the methods AND members have been marked as friend and hence do not appear in the class diagram.
2. Some members, of the form
Code: [Select]

   static const unsigned ms_DaysInMonth[12];          
   static const unsigned ms_FirstDayOfEachMonth[12];


are incorrectly imported. They have no name, and the name is used as the type.
3. Some methods, for example
Code: [Select]

unsigned dayOfMonth() const;


are incorrectly imported. They have no type, and name unsigned dayOfMonth.

Can anyone advise?

Thanks,

Si

5
General Board / Re: Aggregation relationship
« on: December 17, 2001, 02:59:37 am »
Hmmm....

Still doesn't seem to be working.

1. No notice seems to be made of the default Reference setting (i.e. for C++ & or *). Always seems to use *. This seems to apply to ALL code generation, and NOT just associations.

2. include of "part" class header still not appearing in "whole" class header

3. Get/Sets seem a bit "fuzzy" in their operation...by this I mean that I expected them to be automatically created, since the box is ticked in the code generation properties. In fact I can't work out what this option does.

It was only by playing around that I found by ticking the "Property" box for an attribute, giving the attribute a property name, pressing save and THEN pressing the "Create" button that appears that I get some Get/Set methods created - hardly an automatic operation! Also, I couldn't find anything in the help file about this.

I was also surprised that these generated methods have NO default behaviour generated for them - I expected them to Get/Set the attribute as appropriate. At the very least, putting the Property name as a comment after the attribute would allow easy matching of Get/Set to the attribute. Even better would be to use the attribute name by default and allow a property name to be entered if required.

I am currently working on a system that has many classes with many attributes that need Get/Set methods. Having to give each a property name, press the button and then enter some default behaviour seems rather time consuming for something that could be completely automated.

4. The "part" class still seems to have a member referencing the "whole" class, irrespective of what setting I apply to the relation direction.

Hope these comments help. If the problems are due to me not using EA correctly, please let me know!

6
General Board / Aggregation relationship
« on: December 06, 2001, 04:09:11 am »
Version 3.0 looks excellent - keep up the good work.

I was surprised to see that the aggregation relationship still seems somewhat quirky!

Drag the relationship from class A to class B, I would expect A to be the source, B the destination, with the diamond at the A end. What happens seems to be the reverse.

If I then reverse the direction (diamond now at A) and generate C++ source code, it sort of works...

I correctly get

B* m_B;

generated in class A. However:

1) Class A does not have the include of B.h (infact, B.h gets A.h incorrectly included)

2) Get/Set methods do not appear to be generated

3) Changing the containment at either end of the aggregation does not change how the link to B is represented (pointer, reference or value).

Are there any plans to address these issues?

Many thanks
Si

7
General Board / Re: C++ enum and typedef in EA
« on: December 19, 2001, 06:44:12 am »
Hi

Both things can be done, sort of, but the code generation will NOT generate the correct code from them.

Enums

Represent as a class with stereotype <<enumeration>> (which is available in the drop-down stereotype list). The name of the class is set to the name of the enumeration. Add an attribute for each enum value.

typdefs

Represent as a class with stereotype <<datatype>> (which you will have to type into the Stereotype control). The name of the class is set to the name of the datatype

Any range information etc for the type should be added as a constraint on the class.

To get the constraint info displayed on a class diagram, I add a note and link it to the constraint. (The help documentation covers linking notes to element items).

Hope this helps.
Regards
Si

8
General Board / Reverse Engineering C++
« on: December 18, 2001, 06:42:31 am »
I'm trying to reverse engineer the following code. (Appologies for the length  :-/)

This presents a couple of problems:
  • typedefs - these appear in the generated class as attributes with no name, but type "typedef"
  • virtual XMLDataSource::XMLOPEN_MODE getCurrentOpenMode() = 0;  // returns the open mode type

    This line gets converted to an attribute named XMLOPEN_MODE with a type of XMLDataSource


Does anyone have any suggestions on how I can resolve these issues?

The typedefs are also refered to in sub-classes of this class, and so I would like to resolve the issue in such a way that subclasses will also work correctly.

Code: [Select]
class XMLPROCESSOR_EXPORT XMLDataSource
{
public:
   // the mode in which the stream can be opened
     typedef enum { XML_CLOSED, XML_READ, XML_READBINARY, XML_WRITE, XML_WRITEBINARY, XML_APPEND } XMLOPEN_MODE;
   // The stream type
   typedef enum { XML_SOURCE, XML_SINK, XML_UNSPECIFIED } XMLSTREAM_TYPE;

   // The Mode
   // pegg_m 03-Jan-2001 Added UTF8 mode (For JASDEC/Meridian interface)
   typedef enum {MODE_ASCII, MODE_WCHAR, MODE_UTF8} XMLCHARMODE;

 
   XMLDataSource(XMLCHARMODE mode = MODE_ASCII) : m_Mode(mode) {};
   virtual ~XMLDataSource() {};

   //Data source specific interfaces - All derived data source/sink classes must override these

     virtual bool CanReadData(void)=0;      //New method to allow EOF checking on different data sources
     virtual bool CanWriteData(void)=0;      //New method to allow io checking on different data sinks
     virtual size_t ReadFromDataSource(char *P_Destination, size_t P_NumRequested )=0;
     virtual size_t WriteToDataSink(const char *P_SourceBuffer, size_t P_NumToSend )=0;
     virtual const NovaString GetDataSourceIdentifier(void)=0; //Gets the name of file, or IP/PORT of client etc
   virtual XMLDataSource::XMLOPEN_MODE getCurrentOpenMode() = 0;  // returns the open mode type
     virtual bool open() = 0;
     virtual bool close() = 0;

   // NovaString version of the popular ascii method
   virtual size_t WriteToDataSink(const NovaString &) = 0;


   // legacy code - reference all these to the System Id
   // which could be a path/file name, URI (http:/ftp: etc) or Host Name:Port name string
   // in fact anything which the derrived class can use to identify the data source
   const NovaString getDocName() { return m_strDocName;}
   void setDocName(const NovaString &strName) { m_strDocName = strName; };
   void setSystemId(const NovaString& strSystemId) { m_SystemId = strSystemId; if(m_strDocName == "") m_strDocName = strSystemId; };
   NovaString & getSystemId() { return m_SystemId; }
     
protected:
   NovaString m_SystemId;      // System Identifier - could be filename, TCP host - URI anything
     XMLSTREAM_TYPE m_StreamType; //Input Stream/ output stream
   NovaString m_strDocName;    // name of the document (SystemId OR Root Element Name)

   XMLCHARMODE m_Mode;         // the character mode - ascii or wchar_t

};

9
General Board / Sequence Diagrams
« on: December 12, 2001, 06:31:17 am »
Where to start?   ???

I am very new to the UML and I have a few questions regarding sequence diagrams, some of them conceptual, others relating to the use of EA.

Hope someone out there can help (with any of the points).

Here goes.

CONCEPTUAL QUESTIONS
1. Class B is subclassed from class A.

  Object Z creates object of class B. Do I show it creating B directly, or an object of class A that itself creates an object of class B?

2. Class B is subclassed from class A.

 Object Z sends message bob() to class B. But bob() is a virtual method, only present in the base class A. How can I show on the diagram that although bob() is invoked on B, it is an invokation of a base class method? Should I even be trying?


EA USAGE
1. Is it possible to show object deletion without sending a message from another object (i.e. to show self-deletion)?
2. The activation box seems to be present for the entire lifetime of an object. Is it possible to only show the activation box for the lifetime of a method?
3. A class makes a self call. The called method makes further calls both to its parent class and to other objects. Is there any way to add messages from inside a self call?

10
Uml Process / Re: Mission/Vision statement
« on: December 12, 2002, 07:10:41 am »
Thanks for setting up what I am sure will be an invaluable forum.

My department has just started using UML (we have just bought 15 EA licences and are all going on a UML course next week),and we are starting to think how we can use UML in existing company engineering processes. FYI we make trains, but the group that I am in is writing software and developing hardware to handle such things as train diagnostics.

I hope that we will be able to contribute to this forum, and look forward to working with everyone.

TTFN
Si Perry

Pages: [1]