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.


Topics - Si Perry

Pages: [1]
1
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.

2
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

3
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

4
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

5
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

};

6
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?

Pages: [1]