I would like to know if it's possible in Inno Setup to define my own units or classes - with both fields (just like defining a record) and methods.
相关问题
- how to define constructor for Python's new Nam
- Keeping track of variable instances
- What uses more memory in c++? An 2 ints or 2 funct
- Object.create() bug?
- How Does WebSphere Choose the Classloading Order i
相关文章
- 接口B继承接口A,但是又不添加新的方法。这样有什么意义吗?
- NameError: name 'self' is not defined, eve
- Implementation Strategies for Object Orientation
- .NET - how to make a class such that only one othe
- Check if the Type of an Object is inherited from a
- In inno setup how to set the unins000.exe with pro
- When to use Interfaces in PHP
- Are default parameters bad practice in OOP?
No, you can define only:
record
keyword) - fields only, andinterface
keyword) - abstract methods only - for COM/ActiveX.But you cannot implement classes (fields and methods).
The Pascal Script does not even recognize the
class
keyword.Not even
unit
s. The Inno Setup Pascal Script is just a single block of code. There's no really any point trying to hide some implementation/code.If you just want to organize the code somehow, you can use the
#include
directive of Inno Setup pre-processor to split the code into files.You can have a header/interface-like file with prototypes/forward declarations of the "public" functions/procedures and implementation-like file with the implementation and "private" functions/procedures.
The interface-like file (say
header.iss
):The implementation-like file (say
impl.iss
):And use it like: