|
Architecture
Installation
Licensing issues and other string classes
Why isn't the class
implemented as a template, or purely inline code?
Today lots of code is implemented using C++ templates that inherently mean all
the processing code will be inlined when you use it in your application. An
alternative is to create "regular" (non-template) classes but place all
implementation in the header file, which achieves roughly the same result.
We have made some measurements and concluded this would not be beneficiary for
Str.
The particular issue lies in the fact that inlining everything typically makes
binary code much bigger. It is true that todays's compilers are very smart and
can optimize excellently when methods are inlined. What
people often forget is that code size is a big factor in code execution
speed, due to the enormous performance differences when your inner code loops
can reside entirely in the CPU internal cache, or they should be fetced from
the external cache or - worse yet - main memory.
Practically all often-used operations that would benefit from inlining in the
context of caller code are implemented inline in Str Library. Operations
that would not save enough CPU cycles are placed in the accompanying CPP files,
thus reducing the size of the application "working binary set" significantly,
both in terms of the executable file and the code bytes that need to be
cached in the CPU.
Does Str Library support
MBCS strings, or UTF-8?
MBCS encodings are generally not supported.
Although some of the class methods will call MBCS-aware underlying C API's, the
use of multi-byte character strings with Str Library is not recommended or
supported.
If you need to support characters outside of the Latin-1 encoding, we strongly
recommend using Unicode instead. The support for Unicode is stable, and
you will avoid a myriad of small issues that make it very hard to debug your
code with foreign character sets. Now that Unicode is a world standard, all
MBCS character sets (except UTF-8) should be treated as obsolete technology.
You may want to retain backwards compatibility by being able to read or write
existing MBCS data files, but internally your program should always use the
Unicode Character Set.
As an alternative, if you really want an 8-bit binary representation instead of
16-bit, you can use Str Library's UTF-8 encoding support. UTF-8 is a
special case of an MBCS encoding that is able to encode all Unicode characters
as a sequence of between 1 and 6 bytes, without utilizing null characters.
Please see a more detailed discussion.
Can I use Str Library
without running the Wizard?
You have to start the Wizard at least one time after you've obtained (or
upgraded) your copy of the library.
You can point it to a folder that does not belong to a particular
project (when it asks for project location) and choose "Non-MFC
application". Then all proper H and CPP files will be copied to that
folder.
The wizard will also generate a file called str_config.h that contains
various #define-s controlling the behavior of the library.
These conditional symbols are explained in various places throughout
this documentation.
There are so many free
libraries, why does this one require registration?
There is a great effort involved in building an efficient, cross-platform
system-level library. Lots of testing at different platforms needs to be
done, and the architect has to juggle numerous, highly incompatible
architectures for the different target devices. This obviously costs a lot of
time and money.
Also, when you get something free, it represents the voluntary effort of people
who have invested their time and skills in a given problem. They package their
know-how, make it public, and leave it at that point to work on their daytime
jobs. Maybe they return later to fix a bug, add a feature or write a bit of
documentation, but this comes whenever they have free time and desire to do so.
You, as a standalone developer or a software company, know the value of ongoing
technical support and having code customized for your particular case, plus
having expert advice on system-level architectural details. Two technical
support incidents are included with each registration, and additional
support / consulting can be arranged.
Do I have to pay for using
Str Library in my applications?
You only have to pay for your own license to develop with the
library. When you have registered your copy, you can build as many
applications as you want, and there are no royalties involved.
There is just one condition: you can distribute the compiled bits of the
library (in whatever form) but you cannot distribute its source.
|