macro class template

Share your advanced PureBasic knowledge/code with the community.
User avatar
idle
Always Here
Always Here
Posts: 5915
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

macro class template

Post by idle »

Code: Select all

;Macro class template pbi 
;
;An easy way to define classes to visually isolate classes from regular code
;==========================================================================================================
; General useage 
;==========================================================================================================
; Macro AClassTemplate(n)
;
; ClassStructure(n)
;   ;Structures here 
; ClassPrototypes(n)
;   ;Prototypes of the methods
; ClassMethods(n)
;   ;PublicMethod(n,GetY,.f,*null)
;   ;  PublicReturn (*this\y)  
;   ;EndMethod()
; PrivateData(n) 
;   ;Function pointers 
; EndClass()
;
; EndMacro 
;==========================================================================================================

#PB440 =0
CompilerIf #PB440
Macro e(e=o):EndMacr#e:EndMacro:Macro m():Macro :e()
m()ss(n):Structure n:e():m()es():EndStructure:e():m()param(p):,p:e():m()ClassPointer(n,pointer):pointer.m_#n :e()
m()ClassStructure(Class):ss(m_#class):*vt :e():m()ClassPrototypes(Class):es():Interface Class#_obj:Destroy(*obj):e()
m()ClassMethods(Class):EndInterface:Procedure new_#class(*obj.m_#class):*obj = AllocateMemory(SizeOf(m_#class))
If *obj: *obj\vt=?class#_vt: EndIf :ProcedureReturn *obj : EndProcedure:Procedure Destroy_#class(*obj):If *obj:
ClearStructure(*obj, m_#class): FreeMemory(*obj)
*obj=0:EndIf:EndProcedure:EndMacro:m()AddressTable(Class):DataSection:Class#_vt::Data.i @Destroy_#Class():e()
m()pFunc(Class,function):Data.i @function#_#class#():e():m()EndClass():EndDataSection:e()
m()PublicMethod(Class,name,type,params):Procedure type name#_#class#(*this.m_#class, params):e()
m()EndMethod():EndProcedure:e():m()PublicReturn:ProcedureReturn:e():m()Private:Protected:e()
CompilerElse 
Macro e(e=o):EndMacr#e:EndMacro:Macro m():Macro :e()
m()ss(n):Structure n:e():m()es():EndStructure:e():m()param(p):,p:e():m()ClassPointer(n,pointer):pointer.m_#n :e()
m()ClassStructure(Class):ss(m_#class):*vt :e():m()ClassPrototypes(Class):es():Interface Class#_obj:Destroy(*obj):e()
m()ClassMethods(Class):EndInterface:Procedure New_#class(*obj.m_#class):*obj = AllocateMemory(SizeOf(m_#class))
If *obj: *obj\vt=?class#_vt: EndIf :ProcedureReturn *obj : EndProcedure:Procedure Destroy_#class(*obj):If *obj:
FreeMemory(*obj):*obj=0:EndIf:EndProcedure:EndMacro:m()AddressTable(Class):DataSection:Class#_vt::Data.i @Destroy_#Class():e()
m()pFunc(Class,function):Data.i @function#_#class#():e():m()EndClass():EndDataSection:e()
m()PublicMethod(Class,name,type,params):Procedure type name#_#class#(*this.m_#class, params):e()
m()EndMethod():EndProcedure:e():m()PublicReturn:ProcedureReturn:e():m()Private:Protected:e()
CompilerEndIf

;============================================================================================================ 
;Notes 
;============================================================================================================
; When you have to pass more than one param in a PublicMethod use the param() macro    
;
;   PublicMethod(n,Set,.f,x.f param(y.f) param(z.f))
;
; If you have not params to pass use *null 

;   PublicMethod(n,GetX,.f,*null)
;
; If you need to Pass a Class references use the ClassPointer(n,*p2) Macro  
;
;   PublicMethod(n,Dot,.f,ClassPointer(n,*p2))
; or 
;   PublicMethod(n,Dot,.f,*p2.m_#n) using m_#n  
;
;=============================================================================================================  
; Example 
;=============================================================================================================
Macro Vector3DClass(n)
 
ClassStructure(n)
  ;Structure types in here 
  x.f
  y.f
  z.f
  mag.f
 
ClassPrototypes(n)
  ;Prototypes of the methods 
  Set(x.f,y.f,z.f)
  GetX.f()
  GetY.f()
  GetZ.f()
  ;references to another class instance use ClassPointer macro ClassPointer(n,*clspointer)
  Dot.f(ClassPointer(n,*p2)) 
  Cross.i(ClassPointer(n,*p2)) 

ClassMethods(n)
                            
  ;Public methods of the form 
  
  ;PublicMethod(n,function-name, return-type, parameters)  
  
  ;When passing more than one parmeter in the function use the Param() macro
  
  PublicMethod(n,Set,.f,x.f Param(y.f) Param(z.f))
    *this\mag = Sqr(x*x+y*y+z*z)
    *this\x = x / *this\mag
    *this\y = y / *this\mag
    *this\z = z / *this\mag
  EndMethod()
  
  ;If there is no parmameter put in *null
  
  PublicMethod(n,getX,.f,*null)
     PublicReturn (*this\x)  
  EndMethod()
  
  PublicMethod(n,GetY,.f,*null)
    PublicReturn (*this\y)  
  EndMethod()
  
  PublicMethod(n,GetZ,.f,*null)
    PublicReturn (*this\z)  
  EndMethod()
  
  ;If you need a reference to another class instance in the parmaeters use the ClassPointer(n,param)
  
  PublicMethod(n,Dot,.f,ClassPointer(n,*p2))
     PublicReturn (*this\x * *p2\x) + (*this\y * *p2\y) + (*this\z * *p2\z);
  EndMethod() 
  
  PublicMethod(n,Cross,.i,ClassPointer(n,*p2))
     Protected tx.f,ty.f,tz.f
     tx = (*this\y * *p2\z) - (*this\z * *p2\y)
     ty = (*this\z * *p2\x) - (*this\x * *p2\z)
     tz = (*this\x * *p2\y) - (*this\y * *p2\x)
     *this\x = tx
     *this\y = ty
     *this\z = tz 
  EndMethod()
 
AddressTable(n) 
  ;Names of the methods specified in the same order as the ClassPrototypes 
  pfunc(n,Set)
  pFunc(n,GetX)
  pFunc(n,GetY)
  pFunc(n,GetZ)
  pFunc(n,Dot)
  pFunc(n,Cross)

  ;To see the code generated by them macro remove the comment
  ;and right click in the macro error box select all and copy
EndClass();)

EndMacro 

;The Macro Outputs==========================================================================================  
;
; Structure m_Vector3D
;   *vt 
;   x.f
;   y.f
;   z.f
;   mag.f
; EndStructure
; 
; Interface Vector3D_obj
;   Destroy(*obj)
;   Set(x.f,y.f,z.f)
;   GetX.f()
;   GetY.f()
;   GetZ.f()
;   Dot.f(*p2.m_Vector3D ) 
;   Cross.i(*p2.m_Vector3D ) 
; EndInterface
; 
; Procedure New_Vector3D(*obj.m_Vector3D)
;   *obj = AllocateMemory(SizeOf(m_Vector3D))
;   If *obj
;     *obj\vt=?Vector3D_vt
;   EndIf
;   ProcedureReturn *obj
; EndProcedure
; 
; Procedure Destroy_Vector3D(*obj)
;   If *obj: FreeMemory(*obj)
;      *obj=0
;   EndIf
; EndProcedure
; 
; Procedure.f Set_Vector3D(*this.m_Vector3D, x.f ,y.f ,z.f)
;    *this\mag = Sqr(x*x+y*y+z*z)
;    *this\x = x / *this\mag
;    *this\y = y / *this\mag
;    *this\z = z / *this\mag
; EndProcedure
; 
; Procedure.f GetX_Vector3D(*this.m_Vector3D, *null)
;   ProcedureReturn (*this\x)  
; EndProcedure
; 
; Procedure.f GetY_Vector3D(*this.m_Vector3D, *null)
;    ProcedureReturn (*this\y)  
; EndProcedure
; 
; Procedure.f GetZ_Vector3D(*this.m_Vector3D, *null)
;    ProcedureReturn (*this\z)  
; EndProcedure
; 
; Procedure.f Dot_Vector3D(*this.m_Vector3D, *p2.m_Vector3D )
;    ProcedureReturn (*this\x * *p2\x) + (*this\y * *p2\y) + (*this\z * *p2\z)
; EndProcedure 
; 
; Procedure.i Cross_Vector3D(*this.m_Vector3D, *p2.m_Vector3D )
;   Protected tx.f,ty.f,tz.f
;   tx = (*this\y * *p2\z) - (*this\z * *p2\y)
;   ty = (*this\z * *p2\x) - (*this\x * *p2\z)
;   tz = (*this\x * *p2\y) - (*this\y * *p2\x)
;   *this\x = tx
;   *this\y = ty
;   *this\z = tz 
; EndProcedure
; 
; DataSection: Vector3D_vt:
;   Data.i @Destroy_Vector3D() 
;   Data.i @Set_Vector3D()
;   Data.i @GetX_Vector3D()
;   Data.i @GetY_Vector3D()
;   Data.i @GetZ_Vector3D()
;   Data.i @Dot_Vector3D()
;   Data.i @Cross_Vector3D()
; EndDataSection  
;=============================================================================================================  
;
;Test the Class 
;=============================================================================================================
;Create Class
Vector3DClass(Vector3D)  

;Create objects 
Global V1.Vector3D_obj = New_Vector3D(@V1)
Global V2.Vector3D_obj = New_Vector3D(@V2)

If V1 = #Null
  Debug "V1 couldn't be created"
  End
EndIf


V1\set(1.5, 0.2, -1.98)
V2\set(-1.90,-0.2,1.5)

Debug V1\Dot(V2)
Define x.f=((V1\getX() * V2\getX()) + (V1\gety() * V2\gety()) + (V1\getz() * V2\getz()))
Debug x  

Debug V1\Cross(V2)
Debug V1\getX() 
Debug V1\getY() 
Debug V1\getZ() 


V1\Destroy(@V1)
V2\Destroy(@V2)

Debug "done"
Last edited by idle on Tue Dec 08, 2009 9:34 am, edited 1 time in total.
User avatar
idle
Always Here
Always Here
Posts: 5915
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: macro class template

Post by idle »

Another method slightly more difficult but flexible

Code: Select all

Macro class template pbi 
;
;An easy way to define classes to visually isolate classes from regular code
;==========================================================================================================
; Another useage 
;==========================================================================================================
;Alternate use see example uses common base macros to define new classes 
;
; Macro Class(n,Struct,Proto,Methods,Table)
;  ClassStructure(n)
;   struct 
;  ClassPrototypes(n)  
;   proto 
;  ClassMethods(n)
;   methods 
;  AddressTable(n) 
;   table 
; Endclass()    
;
;EndMacro


#PB440 =0
CompilerIf #PB440
Macro e(e=o):EndMacr#e:EndMacro:Macro m():Macro :e()
m()ss(n):Structure n:e():m()es():EndStructure:e():m()param(p):,p:e():m()ClassPointer(n,pointer):pointer.m_#n :e()
m()ClassStructure(Class):ss(m_#class):*vt :e():m()ClassPrototypes(Class):es():Interface Class#_obj:Destroy(*obj):e()
m()ClassMethods(Class):EndInterface:Procedure new_#class(*obj.m_#class):*obj = AllocateMemory(SizeOf(m_#class))
If *obj: *obj\vt=?class#_vt: EndIf :ProcedureReturn *obj : EndProcedure:Procedure Destroy_#class(*obj):If *obj:
ClearStructure(*obj, m_#class): FreeMemory(*obj)
*obj=0:EndIf:EndProcedure:EndMacro:m()AddressTable(Class):DataSection:Class#_vt::Data.i @Destroy_#Class():e()
m()pFunc(Class,function):Data.i @function#_#class#():e():m()EndClass():EndDataSection:e()
m()PublicMethod(Class,name,type,params):Procedure type name#_#class#(*this.m_#class, params):e()
m()EndMethod():EndProcedure:e():m()PublicReturn:ProcedureReturn:e():m()Private:Protected:e()
CompilerElse 
Macro e(e=o):EndMacr#e:EndMacro:Macro m():Macro :e()
m()ss(n):Structure n:e():m()es():EndStructure:e():m()param(p):,p:e():m()ClassPointer(n,pointer):pointer.m_#n :e()
m()ClassStructure(Class):ss(m_#class):*vt :e():m()ClassPrototypes(Class):es():Interface Class#_obj:Destroy(*obj):e()
m()ClassMethods(Class):EndInterface:Procedure New_#class(*obj.m_#class):*obj = AllocateMemory(SizeOf(m_#class))
If *obj: *obj\vt=?class#_vt: EndIf :ProcedureReturn *obj : EndProcedure:Procedure Destroy_#class(*obj):If *obj:
FreeMemory(*obj):*obj=0:EndIf:EndProcedure:EndMacro:m()AddressTable(Class):DataSection:Class#_vt::Data.i @Destroy_#Class():e()
m()pFunc(Class,function):Data.i @function#_#class#():e():m()EndClass():EndDataSection:e()
m()PublicMethod(Class,name,type,params):Procedure type name#_#class#(*this.m_#class, params):e()
m()EndMethod():EndProcedure:e():m()PublicReturn:ProcedureReturn:e():m()Private:Protected:e()
CompilerEndIf

;=============================================================================================================  
; Example construct 3D vector and 4D vector classes from common components  
;=============================================================================================================
;Generic Class Constructor Macro 
Macro Class(n,Struct,Proto,Methods,Table)
 ClassStructure(n)
   struct 
 ClassPrototypes(n)  
   proto 
 ClassMethods(n)
   methods 
 AddressTable(n) 
   table 
 Endclass()    
EndMacro
;Component macros for the classes   
Macro Vector3D(n)
   x.f
   y.f
   z.f
   mag.f
EndMacro() 

Macro Vector4D(n)
   Vector3D(n)
   w.f
EndMacro 

Macro ProtoCommon(n)
  GetX.f()
  GetY.f()
  GetZ.f()
EndMacro

Macro Proto3D(n) 
  ProtoCommon(n)
  Set(x.f,y.f,z.f)
  Dot.f(ClassPointer(n,*p2)) 
  Cross.i(ClassPointer(n,*p2)) 
EndMacro

Macro Proto4D(n)
  ProtoCommon(n)
  Set(x.f,y.f,z.f,w.f)
  GetW.f()
  Dot.f(ClassPointer(n,*p2)) 
    
EndMacro 

Macro MethodCommon(n)
      
  PublicMethod(n,GetX,.f,*null)
     PublicReturn (*this\x)  
  EndMethod()
  
  PublicMethod(n,GetY,.f,*null)
    PublicReturn (*this\y)  
  EndMethod()
  
  PublicMethod(n,GetZ,.f,*null)
    PublicReturn (*this\z)  
  EndMethod()
    
EndMacro 

Macro Method3D(n)
  
  MethodCommon(n)
  
  PublicMethod(n,Set,.f,x.f Param(y.f) Param(z.f))
    *this\mag = Sqr(x*x+y*y+z*z)
    *this\x = x / *this\mag
    *this\y = y / *this\mag
    *this\z = z / *this\mag
  EndMethod()
  
  PublicMethod(n,Dot,.f,ClassPointer(n,*p2))
     PublicReturn (*this\x * *p2\x) + (*this\y * *p2\y) + (*this\z * *p2\z);
  EndMethod() 
  
  PublicMethod(n,Cross,.i,ClassPointer(n,*p2))
     Protected tx.f,ty.f,tz.f
     tx = (*this\y * *p2\z) - (*this\z * *p2\y)
     ty = (*this\z * *p2\x) - (*this\x * *p2\z)
     tz = (*this\x * *p2\y) - (*this\y * *p2\x)
     *this\x = tx
     *this\y = ty
     *this\z = tz 
  EndMethod()
    
EndMacro

Macro Method4D(n)
   
   MethodCommon(n)
   
   PublicMethod(n,Set,.f,x.f Param(y.f) Param(z.f) param(w.f))
    *this\mag = Sqr(x*x+y*y+z*z+w*w)
    *this\x = x / *this\mag
    *this\y = y / *this\mag
    *this\z = z / *this\mag
    *this\w = w / *this\mag 
   EndMethod()
   
   PublicMethod(n,GetW,.f,*null)
     PublicReturn (*this\w)  
   EndMethod()
   
   PublicMethod(n,Dot,.f,ClassPointer(n,*p2))
     PublicReturn (*this\x * *p2\x) + (*this\y * *p2\y) + (*this\z * *p2\z) + (*this\w * *p2\w);
   EndMethod() 
     
EndMacro 
Macro TableCommon(n)

  pFunc(n,GetX)
  pFunc(n,GetY)
  pFunc(n,GetZ)

EndMacro 
Macro Table3D(n)
  
  TableCommon(n)
  pfunc(n,Set)
  pFunc(n,Dot)
  pFunc(n,Cross)

EndMacro

Macro Table4D(n)

  TableCommon(n)
  pfunc(n,Set)
  pFunc(n,GetW)
  pFunc(n,Dot)
   
  
EndMacro    

;constructor macros 
Macro Vector3DClass(n)
  
  Class(n,Vector3d(n),Proto3D(n),Method3D(n),Table3D(n)) 

EndMacro 

Macro Vector4DClass(n) 
  
  Class(n,Vector4d(n),Proto4D(n),Method4D(n),Table4D(n)) 
  
EndMacro 


;=============================================================================================================
;Create Class
Vector3DClass(Vector3D)  
Vector4DClass(Vector4D)
;Create objects 
Global V3D1.Vector3D_obj = New_Vector3D(@V3D1)
Global V3D2.Vector3D_obj = New_Vector3D(@V3D2)
Global V4D1.Vector4D_obj = New_Vector4D(@V4D1)
Global V4D2.Vector4D_obj = New_Vector4D(@V4D2)

V3D1\set(1.5, 0.2, -1.98)
V3D2\set(-1.90,-0.2,1.5)
V4D1\set(1,2,3,4) 
V4D2\set(4,3,2,1)

Define x.f 
x = V3d1\Dot(V3d2)
Debug "Dot Product of V3d1.V3d2 " + StrF(x,3)  
x = V4d1\Dot(V4d2)
Debug "Dot Product of V4d1.V4d2 " + StrF(x,3)
Debug "V3D1 Get x y z " 
Debug V3d1\getX() 
Debug V3d1\getY() 
Debug V3d1\getZ() 
V3d1\Cross(V3d2)
Debug "Cross Product V3d1 * V3d2 " 
Debug "V3D1 Get x y z " 
Debug V3d1\getX() 
Debug V3d1\getY() 
Debug V3d1\getZ() 
Debug "V4D1 Get x y z w " 
Debug V4d1\getX() 
Debug V4d1\getY() 
Debug V4d1\getZ() 
Debug V4d1\getW() 

V3d1\Destroy(@V3d1)
V3d2\Destroy(@V3d2)
V4d1\Destroy(@V4d1)
V4d2\Destroy(@V4d2)

Debug "done"
Last edited by idle on Tue Dec 08, 2009 9:35 am, edited 1 time in total.
User avatar
GeBonet
Enthusiast
Enthusiast
Posts: 135
Joined: Fri Apr 04, 2008 6:20 pm
Location: Belgium

Re: macro class template

Post by GeBonet »

idle wrote:

Code: Select all

Macro e(e):EndMacr#e:EndMacro:Macro m():Macro :e(o)
m()ss(n):Structure n:e(o):m()es():EndStructure:e(o):m()param(p):,p:e(o):m()ClassPointer(n,pointer):pointer.m_#n :e(o)
m()ClassStructure(class):ss(m_#class):*vt :e(o):m()ClassPrototypes(class):es():Interface class#_obj:Destroy(*obj):e(o)
m()ClassMethods(class):EndInterface:Procedure new_#class(*obj.m_#class):*obj = AllocateMemory(SizeOf(m_#class))
If *obj: *obj\vt=?class#_vt: EndIf :ProcedureReturn *obj : EndProcedure:Procedure Destroy_#class(*obj):If *obj: FreeMemory(*obj)
*obj=0:EndIf:EndProcedure:EndMacro:m()AddressTable(Class):DataSection:Class#_vt::Data.i @Destroy_#Class():e(o)
m()pFunc(class,function):Data.i @function#_#class#():e(o):m()EndClass():EndDataSection:e(o)
m()PublicMethod(class,name,type,params):Procedure type name#_#class#(*this.m_#class, params):e(o)
m()EndMethod():EndProcedure:e(o):m()PublicReturn:ProcedureReturn:e(o):m()Private:Protected:e(o)
Sorry, but i have some difficulty with the english, but it's nothing comparing with this code above... :cry:
Thanks, if you can make this understandable ?
Sorry for my english :wink: ! (Windows Xp, Vista and Windows 7, Windows 10)
User avatar
Demivec
Addict
Addict
Posts: 4270
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: macro class template

Post by Demivec »

@idle: Since your first macro can accept only one valid value for its parameter you can simplify your first macro by giving it this value by default so that it isn't necessary to supply it each time it's used:

Code: Select all

Macro e(e=o):EndMacr#e:EndMacro
Macro m():Macro :e()
User avatar
idle
Always Here
Always Here
Posts: 5915
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: macro class template

Post by idle »

thanks
User avatar
idle
Always Here
Always Here
Posts: 5915
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: macro class template

Post by idle »

I don't know if it can be made to be easy to understand. Getting the macros to do what you want can be difficult and time consuming especially when they're nested.

This is about as much as you can expand it between m() and e() pairs

Code: Select all

Macro e(e=o):EndMacr#e:EndMacro:Macro m():Macro :e()
;macros for nested end and start macros M() e()  
m()ss(n):Structure n:e()
m()es():EndStructure:e()
m()param(p):,p:e()
m()ClassPointer(n,pointer):pointer.m_#n :e()
m()ClassStructure(class):ss(m_#class):*vt :e()
m()ClassPrototypes(class):es():Interface class#_obj:Destroy(*obj):e()
m()ClassMethods(class):EndInterface:Procedure new_#class(*obj.m_#class):*obj = AllocateMemory(SizeOf(m_#class))
If *obj: *obj\vt=?class#_vt: EndIf :ProcedureReturn *obj : EndProcedure:Procedure Destroy_#class(*obj):If *obj: FreeMemory(*obj)
*obj=0:EndIf:EndProcedure:EndMacro:m()AddressTable(Class):DataSection:Class#_vt::Data.i @Destroy_#Class():e()
m()pFunc(class,function):Data.i @function#_#class#():e()
m()EndClass():EndDataSection:e()
m()PublicMethod(class,name,type,params):Procedure type name#_#class#(*this.m_#class, params):e()
m()EndMethod():EndProcedure:e():m()PublicReturn:ProcedureReturn:e():m()Private:Protected:e()
User avatar
mk-soft
Always Here
Always Here
Posts: 6253
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: macro class template

Post by mk-soft »

Very nice :D

added ClearStructure(...) to avoidance of memory leakages when using strings.

Code: Select all

Macro e(e):EndMacr#e:EndMacro:Macro m():Macro :e(o)
m()ss(n):Structure n:e(o):m()es():EndStructure:e(o):m()param(p):,p:e(o):m()ClassPointer(n,pointer):pointer.m_#n :e(o)
m()ClassStructure(Class):ss(m_#class):*vt :e(o):m()ClassPrototypes(Class):es():Interface Class#_obj:Destroy(*obj):e(o)
m()ClassMethods(Class):EndInterface:Procedure new_#class(*obj.m_#class):*obj = AllocateMemory(SizeOf(m_#class))
If *obj: *obj\vt=?class#_vt: EndIf :ProcedureReturn *obj : EndProcedure:Procedure Destroy_#class(*obj):If *obj: 
ClearStructure(*obj, m_#class): FreeMemory(*obj)
*obj=0:EndIf:EndProcedure:EndMacro:m()AddressTable(Class):DataSection:Class#_vt::Data.i @Destroy_#Class():e(o)
m()pFunc(Class,function):Data.i @function#_#class#():e(o):m()EndClass():EndDataSection:e(o)
m()PublicMethod(Class,name,type,params):Procedure type name#_#class#(*this.m_#class, params):e(o)
m()EndMethod():EndProcedure:e(o):m()PublicReturn:ProcedureReturn:e(o):m()Private:Protected:e(o)
GT :wink:
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
idle
Always Here
Always Here
Posts: 5915
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: macro class template

Post by idle »

Thanks I hadn't thought of the string issues.
Matt
Enthusiast
Enthusiast
Posts: 447
Joined: Sat May 21, 2005 1:08 am
Location: USA

Re: macro class template

Post by Matt »

PB needs OOP support. Honestly it would be the perfect language. I find myself having to use other languages sometimes because of the lack of it. :( :(
User avatar
mk-soft
Always Here
Always Here
Posts: 6253
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: macro class template

Post by mk-soft »

Purebasic supports OOP such as 'C' without ++ 8)
I don´t need more :wink:
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Post Reply