Problem translatin set of into CPP :-)

2002-08-17
2002-08-22
  • Toader Mihai Claudiu

    Hi,
    I've just checked your pas2dox .. i've found a problem ..

    If i declare something like:

    TMyEnum = ( meEnum1, meEnum2 );
    TEnumSet = set of TMyEnum;

    and after that i declare a class ..

    TMainClass = class(TObjecT);
    end;

    it is interpreted badly in the output ..
    i think that it should be semthing like this:

    enum TMyEnum {meEnum1, meEnum2 };
    class TEnumSet : set<TMyEnum>;

    class TMainClass : public TObject
    end;

    and instead is something like this:

    enum TMyEnum{ meEnum1, meEnum1 };

    class TEnumSet: set TMyEnum;

    TGraficDefinition class of : public TObject

    The last 2 lines are broken .. and doxygen get's very confused.

    Sincerely,
    ToMiC

     
    • Darren Bowles

      Darren Bowles - 2002-08-19

      How should we handle set of, as there is no equivilent in c++.  I haven't used set of myself, but from a quick look at the help, you could have :

      a = set of 1..20
      b = set of y
      c = set of (this, that)

      The patch I sent you earlier on, will effectively ignore the set of line so that following code is interpreted correctly.  But this means that you won't be able to document the set of instructions.

      Thoughts appreciated.

      Ta,
      Darren.

       
    • Toader Mihai Claudiu

      Here is the sample of a constant in form:
      Name : array[0..10] of TSomething;

      Before:
      unit Test;

      interface

      const
        ColumnsName  : array[1..9] of String = (
          'C1', 'C2', 'C3',
          'C4', 'C5', 'C6',
          'C7', 'C8', 'C9'
        );

        ColumnsWidth : array[1..9] of Single = (
          0.9, 1.0, 0.8,
          4.1, 0.7, 1.0,
          1.4, 0.8, 1.4
        );

      implementation

      end.

      and after:

        ColumnsName  : array[1..9] of String = (
          'C1', 'C2', 'C3',
          'C4', 'C5', 'C6',
          'C7', 'C8', 'C9'
        );

        ColumnsWidth : array[1..9] of Single = (
          0.9, 1.0, 0.8,
          4.1, 0.7, 1.0,
          1.4, 0.8, 1.4
        );

      :-)

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks