ALib C++ Framework
by
Library Version: 2511 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
camp.prepro.hpp File Reference

Description:

This header-file is part of the ALib C++ Framework.

© 2013-2025 A-Worx GmbH, Germany. Published under Boost Software License.

Definition in file camp.prepro.hpp.

#include "alib/alib.inl"

Go to the source code of this file.

Macros

#define ALIB_CAMP_ENUM(T, TRecord, Camp, ResName)
#define ALIB_CAMP_OMIT_DEFAULT_RESOURCES   0
#define ALIB_RESOURCED_IN_CAMP(T, Camp, ResName)

Macro Definition Documentation

◆ ALIB_CAMP_ENUM

#define ALIB_CAMP_ENUM ( T,
TRecord,
Camp,
ResName )
Value:
ALIB_ENUMS_ASSIGN_RECORD( T, TRecord ) \
ALIB_RESOURCED_IN_CAMP( T, Camp, ResName )
#define ALIB_ENUMS_ASSIGN_RECORD(TEnum, TRecord)

Combines macros ALIB_ENUMS_ASSIGN_RECORD and ALIB_RESOURCED_IN_CAMP.

Parameters
TThe enumeration to assign a record and resources to.
TRecordThe record type to assign.
ResNameResource name string.
CampPointer to the Camp that provides the ResourcePool object.

Definition at line 24 of file camp.prepro.hpp.

◆ ALIB_CAMP_OMIT_DEFAULT_RESOURCES

#define ALIB_CAMP_OMIT_DEFAULT_RESOURCES   0

If set, code that defines static default resource strings is pruned, and thus, all static resource string data is pruned from the library's executable's data segment.

The omission occurs in the implementations of virtual void Bootstrap() =0 of various ALib Modules, where methods void Bootstrap(const NString&, const NString&, const String&)  and virtual void BootstrapBulk(const nchar*, ...) =0 are used to define the default resources.

If resources are omitted, the bootstrap process has to be customized to use an external resource provider. Otherwise the library has undefined behavior as resources are missing.

See also
Chapter 6.2 Exporting Resources For Externalization of the Programmer's Manual of module ALib Resources for more information.

Definition at line 29 of file camp.prepro.hpp.

◆ ALIB_RESOURCED_IN_CAMP

#define ALIB_RESOURCED_IN_CAMP ( T,
Camp,
ResName )
Value:
ALIB_RESOURCED( T, &Camp.GetResourcePool(), Camp.ResourceCategory, ResName )
#define ALIB_RESOURCED(T, ResPool, ResCategory, ResName)

Variant of macro ALIB_RESOURCED, which specializes the type trait ResourcedTraits for type T to use the resource-backend found in the given Camp, as well as its default ResourceCategory.

Availability
This macro is available only if ALIB_CAMP equals true.
Parameters
TThe type to specialize the type trait ResourcedTraits for.
CampPointer to the Camp that provides the ResourcePool object.
ResNameExpression providing the resource name.

Definition at line 21 of file camp.prepro.hpp.