I'm currently working on a templating system for ArgoPrint.  I've been
able to get some basic things working, but in the process I've had to
create some utility classes to help fetch data out of the model.
Before I create more utility methods for each diagram type I thought I
would check first to see if this has been done already.

The following is some pseudo-templating code that demonstrates what
I'm after.  If anyone has some suggestions for making it easier to
extract from the model, please let me know.


// loop through each use case diagram
foreach($diagram in $project.getDiagramByType($DiagramTypes.UseCaseDiagram)){
  <h2>$diagram.getName()</h2>

   foreach($usecase in $diagram.getUseCases()){
        <h3>$usecase.getName()</h4>
        <p>$usecase.getDescription()</p>

         foreach($ep in $usecase.getExtensionPoints()){
            <h4>$ep.getName()</h4
            <p> $ep.getDescription()</p>
         }

         // repeat previous loops with usecase generalizations,
extensions and inclusions

   }

}

// loop through each class diagram


-- 
Mark Fortner

blog: http://feeds.feedburner.com/jroller/ideafactory

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to