Dev-Object

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Dev-Object

Post by StarBootics »

Hello everyone,

A few bugs correction release. What new with version 1.8.2 ?
  • "Chain - OOP.pb" little update
  • Minor correction about the Compare method generation
What new with version 2.0.0 Beta 7 ?
  • "Chain - OOP.pb" little update
  • Minor correction about the source code checker file selection.
  • Minor correction about the Compare method generation
See first and second post for download links.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Dev-Object

Post by StarBootics »

Hello everyone,

A bug correction release. What new with version 1.8.3 ?
  • Minor correction about the Compare method generation for Static Array
What new with version 2.0.0 Beta 8 ?
  • Minor correction about the Compare method generation for Static Array
See first and second post for download links.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Dev-Object

Post by StarBootics »

Hello everyone,

No change for the Version 1.8.3

End of the beta phase for the version 2.0.0

See first and second post for download links.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Dev-Object

Post by StarBootics »

Hello everyone,

I have found many problems with the code generator for both branch of the program (1.8.3 and 2.0.0), it's scary ! I will have the version 1.9.0 ready for download by the end of this week, it will be a complete overhaul of the program in order to make my life easier to maintain both branch of the program.

That being said the version 2.1.0 is available for download (see the 2nd post in this topic), the list of corrections and changes I made :
  • MemberNameAnalyzer removed
  • FoolProofer reviewed and modified
  • The possibility to define a pointer member by adding Ptr.i or Pointer.i at the end of the name is no longer possible (Use a real pointer instead)
  • The possibility to define a raw data pointer member of type .i is no longer possible (Use a real pointer instead)
  • Multiple errors correction of string members defined with $
  • Multiple errors correction of pointers members
  • The library to be used by the Encoded / Encrypted file was not working properly, corrected now
Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Dev-Object

Post by StarBootics »

Hello everyone,

I finally completed the source code overhaul for the branch 1.x.x of the program. It incorporate all the changes from the 2.x.x branch :
  • MemberNameAnalyzer removed
  • FoolProofer reviewed and modified
  • The possibility to define a pointer member by adding Ptr.i or Pointer.i at the end of the name is no longer possible (Use a real pointer instead)
  • The possibility to define a raw data pointer member of type .i is no longer possible (Use a real pointer instead)
  • Multiple errors correction of string members defined with $
  • Multiple errors correction of pointers members
  • The library to be used by the Encoded / Encrypted file was not working properly, corrected now
Plus the changes who are specific to the Graphic User Interface :
  • Modification of the preferences management (Language System, Window, Sticky, Options, SyntaxHighlighting, Rules, Comments, CustomFileLibs and Stats.)
  • Replacement of AdvancedDateFormating by DateFormating
  • Removal of the FormatColor Module
  • Replacement of the FormatDouble Module by the FormatReal object
  • Replacement of the FormatMilliseconds Module by the FormatMilliseconds object
As always see the first post in this topic for download link.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
Denis
Enthusiast
Enthusiast
Posts: 703
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Re: Dev-Object

Post by Denis »

Hi Guillaume,

i've downloaded version 2, i tried a compilation (Win 11 PB 6.00 x64 C backend) and I get this error :

File compiled DevObject - Main.pb
Error file WindowInfo - OOP.pb line 21

[11 :45 :41] [COMPILER] Ligne 21: Structure deja declaree: WindowInfo (in a resident file).

PB install 6.00 x64 C backend is clean, no personal residents, no personal libraries

The same with PB 6.00 x86 C backend
The same with PB 6.00 x64 asm backend
The same with PB 6.00 x86 asm backend

No problem when compiling version 1
A+
Denis
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Dev-Object

Post by StarBootics »

Denis wrote: Wed Nov 02, 2022 11:51 am Hi Guillaume,

i've downloaded version 2, i tried a compilation (Win 11 PB 6.00 x64 C backend) and I get this error :

File compiled DevObject - Main.pb
Error file WindowInfo - OOP.pb line 21

[11 :45 :41] [COMPILER] Ligne 21: Structure deja declaree: WindowInfo (in a resident file).

PB install 6.00 x64 C backend is clean, no personal residents, no personal libraries

The same with PB 6.00 x86 C backend
The same with PB 6.00 x64 asm backend
The same with PB 6.00 x86 asm backend

No problem when compiling version 1
The version 2.x.x is for Linux only since the GUI is using GTK 3 API directly, it's the only difference between the two branch of Dev-Object. So if you are on Windows you don't miss any functionality with the version 1.x.x.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
Denis
Enthusiast
Enthusiast
Posts: 703
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Re: Dev-Object

Post by Denis »

Ok

nice work
A+
Denis
Denis
Enthusiast
Enthusiast
Posts: 703
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Re: Dev-Object

Post by Denis »

about interface version 1 Windows
some French texts are truncated

Image
A+
Denis
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Dev-Object

Post by StarBootics »

Hello everyone,

It's kind of a bummer but my old Windows XP laptop just expire, it doesn't boot anymore. So I don't have a Windows computer to do testing.

@Denis : As far as I remember I didn't have this problem on Windows XP. That being said it's probably related to the CheckBox width, I will try to increase the checkbox width value and re-upload the source code. Thanks for reporting the problem.

EDIT : I have increased the Checkbox Width from 150 to 215 for all OS. So you have to download the source code again.

@Denis : What about the Options Editing window ? (When you click on the button with 2 screw drivers and a wrench)
Thanks for your time.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
Denis
Enthusiast
Enthusiast
Posts: 703
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Re: Dev-Object

Post by Denis »

Guillaume,
interface is Ok now.

here is Options windows (Font CQ mono doesn't exist so may be an another default Font under windows, Nom ans Alias content could be put in French ?)
I just discover your tool, really interesting (i have not lot of time to see coder tools :oops: )

About ''Regles pour le generateur de code', 'Donnees dynamiques Type grandeur et Index' by default it''s Long '.l) but PB standart is Integer (.i), may be by default Integer (.i) could be the rule (am I wrong?).

Image
A+
Denis
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Dev-Object

Post by StarBootics »

Denis wrote: Thu Nov 03, 2022 6:57 am Guillaume,
interface is Ok now.

here is Options windows (Font CQ mono doesn't exist so may be an another default Font under windows, Nom ans Alias content could be put in French ?)
I just discover your tool, really interesting (i have not lot of time to see coder tools :oops: )

About ''Regles pour le generateur de code', 'Donnees dynamiques Type grandeur et Index' by default it''s Long '.l) but PB standart is Integer (.i), may be by default Integer (.i) could be the rule (am I wrong?).
About the font, it's probably possible to set the default to something else according to the OS.
About the rules for the code generator, I gave the choice to the user instead of simply hard coding the type directly inside the code generator. That being said you probably right the Integer should be the default.
About the user information, it's probably possible to translate the default text in French or simply leave them blank I'm not sure. But I will see...

Thanks for your feedback, you are almost the only one who take time to do it. This topic has more than 40 000 views and most of the post are made by me.

For the time being I'm studying the JSON library and when I will have all prototype working I will add the JSON Files support to Dev-Object. So your precious suggestions will be part of the next release, maybe next week.

Again big thanks.

StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
HeX0R
Addict
Addict
Posts: 973
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: Dev-Object

Post by HeX0R »

StarBootics wrote: Thu Nov 03, 2022 7:28 am[...]
Thanks for your feedback, you are almost the only one who take time to do it. This topic has more than 40 000 views and most of the post are made by me.
I can only speak for myself, but I never found out what a "Dev-Object" might be, not even when looking at that parent case you are talking about in the first post.
And since I'm not willing to simply test it, only to understand what it is doing, that attitude will not change.

You probably should try to advertise its advantages a little better, otherwise people are jumping in and out quite quickly.
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Dev-Object

Post by StarBootics »

HeX0R wrote: Sat Nov 05, 2022 12:37 am I can only speak for myself, but I never found out what a "Dev-Object" might be, not even when looking at that parent case you are talking about in the first post.
And since I'm not willing to simply test it, only to understand what it is doing, that attitude will not change.

You probably should try to advertise its advantages a little better, otherwise people are jumping in and out quite quickly.
See, this is the kind of feedback I'm waiting for. I will see what I can do. That being said and to answer the questions about what Dev-Object is and what it can do for you. But first and foremost, YOU NEED TO HAVE THE WILL TO WRITE CODE WITH OOP STYLE IN PureBasic which is difficult, error prone and require a lot of work.

Dev-Object is a kind of Computer Aided Programming or CAP tool. The equivalent I have seen in C++ is a Class Wizard tool integrated into Code::Blocks IDE that can be used to generate a header file (*.h) and an implementation file (*.cpp). As you know in PureBasic a single source code can do the job and this is what Dev-Object do for you. This answer the question about what Dev-Object is.

Now let's talk what it can do for you with an example. For a specific project you need a 3D vector of float values library. And it has to be coded OOP style and I tell you what methods are needed :
  • Getters
  • Setters
  • A method that Update or Set all components at once
  • A method to set all components of a vector to 0.0
  • A method to make a vector Equal to another (Style A = B)
  • A method that will return a new Vector3f by adding the component together (Style R = A+B)
  • A method that will return a new Vector3f by subtracting the component together (Style R = A-B)
  • A method that will simply add the component to an existing Vector3f (Style : A + B)
  • A method that will add and Scale the component to an existing Vector3f (Style : A + B * Scale)
  • A method that will simply subtract the component to an existing Vector3f (Style : A - B)
  • A method that will multiply the components of a vector3f by a scalar value (Style : A * Scalar)
  • A methods that will perform a Lerp calculation between two vectors and return the result as a new Vector3f
  • A copy method
  • A compare method
  • A destructor method
  • And finally the Constructor
I'm kind of a good guy and I give you this head start and please don't forget to start a chronometer when you begin coding and stop it when it's done.

Code: Select all

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; Project name : Vector3f library
; File Name : Vector3f - OOP.pb
; File version: 0.0.0
; Programming : To be done
; Programmed by : HeX0R
; Date : November 5th, 2022
; Last Update : November 5th, 2022
; PureBasic code : V6.00 LTS
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

DeclareModule Vector3f
  
  Interface Vector3f
    
  EndInterface
  
EndDeclareModule

Module Vector3f
  
  Structure Private_Members
    
    *VirtualTable
    i.f
    j.f
    k.f
    
  EndStructure
  
EndModule

; <<<<<<<<<<<<<<<<<<<<<<<
; <<<<< END OF FILE <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<
And let's see if you can beat Dev-Object fair and square in terms of time required to write the code with the given inputs. Because with the given inputs Dev-Object write the code in 1 millisecond and look like that :

Code: Select all

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; AUTOMATICALLY GENERATED CODE, DO NOT MODIFY
; UNLESS YOU REALLY, REALLY, REALLY MEAN IT !!
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; Code generated by : Dev-Object - V2.1.0
; Project name : the project name here
; File name : File name here
; File Version : 0.0.0
; Programming : In progress
; Programmed by : StarBootics
; Creation Date : November 5th, 2022
; Last update : November 5th, 2022
; Coded for PureBasic : V6.00 LTS
; Platform : Windows, Linux, MacOS X
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

DeclareModule Vector3f
  
  Interface Vector3f
    
    Geti.f()
    Getj.f()
    Getk.f()
    Seti(i.f)
    Setj(j.f)
    Setk(k.f)
    Update(i.f, j.f, k.f)
    Clear()
    Equal(*Other)
    Plus.i(*Other)
    Minus.i(*Other)
    Add(*Other)
    AddScaled(*Other, Scale.f)
    Subtract(*Other)
    ProductByScalar(Scalar.f)
    Lerp.i(*Other, Proportion.f)
    Copy.i()
    Compare.i(*Other)
    Free()
    
  EndInterface
  
  ; Declare Free(*This)
  Declare.i New(i.f = 0.0, j.f = 0.0, k.f = 0.0)
  
EndDeclareModule

Module Vector3f
  
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< Structure declaration <<<<<

  Structure Private_Members
    
    VirtualTable.i
    i.f
    j.f
    k.f
    
  EndStructure
  
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The observators <<<<<

  Procedure.f Geti(*This.Private_Members)
    
    ProcedureReturn *This\i
  EndProcedure
  
  Procedure.f Getj(*This.Private_Members)
    
    ProcedureReturn *This\j
  EndProcedure
  
  Procedure.f Getk(*This.Private_Members)
    
    ProcedureReturn *This\k
  EndProcedure
  
  ; <<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The mutators <<<<<

  Procedure Seti(*This.Private_Members, i.f)
    
    *This\i = i
    
  EndProcedure
  
  Procedure Setj(*This.Private_Members, j.f)
    
    *This\j = j
    
  EndProcedure
  
  Procedure Setk(*This.Private_Members, k.f)
    
    *This\k = k
    
  EndProcedure
  
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Update operator <<<<<

  Procedure Update(*This.Private_Members, i.f, j.f, k.f)
    
    *This\i = i
    *This\j = j
    *This\k = k
    
  EndProcedure
  
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Clear operator <<<<<

  Procedure Clear(*This.Private_Members)
    
    *This\i = 0.0
    *This\j = 0.0
    *This\k = 0.0
    
  EndProcedure
  
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Equal operator : A = B <<<<<

  Procedure Equal(*This.Private_Members, *Other.Private_Members)
    
    *This\i = *Other\i
    *This\j = *Other\j
    *This\k = *Other\k
    
  EndProcedure
  
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Plus operator : R = A + B <<<<<

  Procedure.i Plus(*This.Private_Members, *Other.Private_Members)
    
    *Result.Private_Members = AllocateStructure(Private_Members)
    *Result\VirtualTable = ?START_METHODS
    
    *Result\i = *This\i + *Other\i
    *Result\j = *This\j + *Other\j
    *Result\k = *This\k + *Other\k
    
    ProcedureReturn *Result
  EndProcedure
  
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Minus operator : R = A - B <<<<<

  Procedure.i Minus(*This.Private_Members, *Other.Private_Members)
    
    *Result.Private_Members = AllocateStructure(Private_Members)
    *Result\VirtualTable = ?START_METHODS
    
    *Result\i = *This\i - *Other\i
    *Result\j = *This\j - *Other\j
    *Result\k = *This\k - *Other\k
    
    ProcedureReturn *Result
  EndProcedure
  
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Add operator : A = A + B <<<<<

  Procedure Add(*This.Private_Members, *Other.Private_Members)
    
    *This\i + *Other\i
    *This\j + *Other\j
    *This\k + *Other\k
    
  EndProcedure
  
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The AddScaled operator : A = A + B * S <<<<<

  Procedure AddScaled(*This.Private_Members, *Other.Private_Members, Scale.f)
    
    *This\i + *Other\i * Scale
    *This\j + *Other\j * Scale
    *This\k + *Other\k * Scale
    
  EndProcedure
  
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Subtract operator : A = A - B <<<<<

  Procedure Subtract(*This.Private_Members, *Other.Private_Members)
    
    *This\i - *Other\i
    *This\j - *Other\j
    *This\k - *Other\k
    
  EndProcedure
  
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The ProductByScalar operator : A = A * Scalar <<<<<

  Procedure ProductByScalar(*This.Private_Members, Scalar.f)
    
    *This\i * Scalar
    *This\j * Scalar
    *This\k * Scalar
    
  EndProcedure
  
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Linear Interpolation operator <<<<<

  Procedure.i Lerp(*This.Private_Members, *Other.Private_Members, Proportion.f)
    
    *Result.Private_Members = AllocateStructure(Private_Members)
    *Result\VirtualTable = ?START_METHODS
    
    *Result\i = *This\i + Proportion * (*Other\i - *This\i)
    *Result\j = *This\j + Proportion * (*Other\j - *This\j)
    *Result\k = *This\k + Proportion * (*Other\k - *This\k)
    
    ProcedureReturn *Result
  EndProcedure
  
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Copy operator <<<<<

  Procedure.i Copy(*This.Private_Members)
    
    *Copy.Private_Members = AllocateStructure(Private_Members)
    
    CopyStructure(*This, *Copy, Private_Members)
    
    ProcedureReturn *Copy
  EndProcedure
  
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Compare operator <<<<<

  Procedure.i Compare(*This.Private_Members, *Other.Private_Members)
    
    ProcedureReturn CompareMemory(*This, *Other, SizeOf(Private_Members))
  EndProcedure
  
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Destructor <<<<<

  Procedure Free(*This.Private_Members)
    
    FreeStructure(*This)
    
  EndProcedure
  
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Constructor <<<<<

  Procedure.i New(i.f = 0.0, j.f = 0.0, k.f = 0.0)
    
    *This.Private_Members = AllocateStructure(Private_Members)
    *This\VirtualTable = ?START_METHODS
    
    *This\i = i
    *This\j = j
    *This\k = k
    
    ProcedureReturn *This
  EndProcedure
  
  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Virtual Table Entries <<<<<

  DataSection
    START_METHODS:
    Data.i @Geti()
    Data.i @Getj()
    Data.i @Getk()
    Data.i @Seti()
    Data.i @Setj()
    Data.i @Setk()
    Data.i @Update()
    Data.i @Clear()
    Data.i @Equal()
    Data.i @Plus()
    Data.i @Minus()
    Data.i @Add()
    Data.i @AddScaled()
    Data.i @Subtract()
    Data.i @ProductByScalar()
    Data.i @Lerp()
    Data.i @Copy()
    Data.i @Compare()
    Data.i @Free()
    END_METHODS:
  EndDataSection
  
EndModule

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Code generated in : 00.001 seconds (297000.00 lines/second) <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

; <<<<<<<<<<<<<<<<<<<<<<<
; <<<<< END OF FILE <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<
So to make a long story short, Dev-Object can reduce your workload by a huge factor, giving you a good head start and let you focus on very specific code that might be needed to add. In the case of a Vector3f, the Cross product method, the Dot product method, the Length or Modulus of the vector method and so on.

I hope it is more clear for all of you now.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
Denis
Enthusiast
Enthusiast
Posts: 703
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Re: Dev-Object

Post by Denis »

But first and foremost, YOU NEED TO HAVE THE WILL TO WRITE CODE WITH OOP STYLE IN PureBasic which is difficult, error prone and require a lot of work.
Guillaume, You're right. :!:


I've written few tools in OOP (handwritten, for fun?) and here are my thoughts:
I wrote a module in OOP from the excellent code of Danilo (viewtopic.php?f=12&t=53701).

I finally have in this code a set of public functions, functions usable by the coder.
I also wanted a set of functions in OOP with this time private functions, that is to say unusable outside, because why code in OOP functions usable outside the module and not use private OOP functions for internal and private procedures of the module ?

Here is what it gives :

Code: Select all

; public fonctions
      ;// Defined a structure used by a GetPBInfo "object" (it's properties)
      Structure sPublic_GetPBInfo
            ;// Pointeur de la table de fonctions des méthodes/Pointer to the function table of the methods
            *vTable_GetPBInfo.IGetPBInfo
      EndStructure
      
            ;- '    -------------------------
      ;- '        Private Structure
      ;// Defined a structure used by a private GetPBInfo "object" (it's properties)
      Structure sPrivate_GetPBInfo
            ;// Pointeur de la table de fonctions des méthodes/Pointer to the function table of the methods
            *vTablePrivate_GetPBInfo.IPrivate_GetPBInfo
      EndStructure
      ;- '    -------------------------
      ;- '        Private Interface
      Interface IPrivate_GetPBInfo
            FillList(compiler, List out.s(), *itemNumber.integer = 0, space = 0, returnItemsNumber = 0)
            GetCompilerOutput(compiler)
            SendCompilerCommand(compiler, command$)
            WaitCompilerReady(compiler, *Version.string)
      EndInterface
      ;- '    -------------------------
      ;- '        Private global vars
      Global *Private_PBInfo.IPrivate_GetPBInfo

      ;- '    -------------------------
      ;- '        Public Interface ('OOP')
      ;// list of methods
      Interface IGetPBInfo
            GetStructureInfo(compiler, struct$, List out.s())
            GetStructureList(compiler, List out.s(), *itemNumber.integer)
            GetFunctionsList(compiler, List out.s(), *itemNumber.integer)
            GetImportList(compiler, List out.s(), *itemNumber.integer)
            GetInterfaceList(compiler, List out.s(), *itemNumber.integer)
            GetInterfaceInfo(compiler,Interface_$, List out.s())
            Release()
            StartCompiler(*Version.string= 0)
            StopCompiler(compiler)
      EndInterface



      ;- '    -------------------------
      ;- .    ...  DataSection
      ;- '        ('OOP') Virtual Public functions table of methods
      ; Same order as the Interface IGetPBInfo
      DataSection
            vPublic_IGetPBInfo:
            Data.i @GetStructureInfo()
            Data.i @GetStructureList()
            Data.i @GetFunctionsList()
            Data.i @GetImportList()
            Data.i @GetInterfaceList()
            Data.i @GetInterfaceInfo()
            Data.i @Release()
            Data.i @StartCompiler()
            Data.i @StopCompiler()
            EndOf_vPublic_IGetPBInfo:
            
            ;- '        ('OOP') Virtual Private functions table of methods
            ; Same order as the Interface IPrivate_GetPBInfo
            vPrivate_IGetPBInfo:
            Data.i @FillList()
            Data.i @GetCompilerOutput()
            Data.i @SendCompilerCommand()
            Data.i @WaitCompilerReady()
            EndOf_vPrivate_IGetPBInfo:
      EndDataSection
EndModule
My question is the following

Can we create several interfaces and define them as private/public?
If no, may it's a suggestion.

another suggestion:
For the Get/Set functions, it would be nice to define them individually for each member of the interface, which means that all the members could be either Get, or Set, or Get and Set or with no Get/Set, name only without prefix.

Another question
What is the difference between the Clear and Reset functions for you (it's not clear in my head)?
Last edited by Denis on Sat Nov 05, 2022 10:32 am, edited 1 time in total.
A+
Denis
Post Reply