The routines in this section are part of Extended Fortran Support described in Section Extended Fortran Support .
MPI provides a small number of named datatypes that correspond to named intrinsic types supported by C and Fortran. These include MPI_INTEGER, MPI_REAL, MPI_INT, MPI_DOUBLE, etc., as well as the optional types MPI_REAL4, MPI_REAL8, etc. There is a one-to-one correspondence between language declarations and MPI types.
Fortran (starting with Fortran 90) provides so-called KIND-parameterized
types. These types are declared using an intrinsic type (one of
INTEGER, REAL, COMPLEX, LOGICAL and
CHARACTER) with an optional integer
KIND parameter that selects from among one or more variants.
The specific meaning of different KIND values themselves are
implementation dependent and not specified by the language.
Fortran
provides the KIND selection functions selected_real_kind
for REAL and COMPLEX types, and
selected_int_kind for INTEGER types
that allow users to declare variables
with a minimum precision or number of digits. These functions provide
a portable way to declare KIND-parameterized REAL,
COMPLEX and INTEGER variables in Fortran.
This scheme is backward compatible with Fortran 77. REAL and
INTEGER Fortran variables have a default KIND if none
is specified. Fortran DOUBLE PRECISION variables are of
intrinsic type REAL with a non-default KIND. The following
two declarations are equivalent:
double precision x real(KIND(0.0d0)) xMPI provides two orthogonal methods to communicate using numeric intrinsic types. The first method can be used when variables have been declared in a portable way --- using default KIND or using KIND parameters obtained with the selected_int_kind or selected_real_kind functions. With this method, MPI automatically selects the correct data size (e.g., 4 or 8 bytes) and provides representation conversion in heterogeneous environments. The second method gives the user complete control over communication by exposing machine representations.
MPI provides named datatypes corresponding to standard Fortran 77 numeric types --- MPI_INTEGER, MPI_COMPLEX, MPI_REAL, MPI_DOUBLE_PRECISION and MPI_DOUBLE_COMPLEX. MPI automatically selects the correct data size and provides representation conversion in heterogeneous environments. The mechanism described in this section extends this model to support portable parameterized numeric types.
The model for supporting portable parameterized types is as follows. Real variables are declared (perhaps indirectly) using selected_real_kind(p, r) to determine the KIND parameter, where p is decimal digits of precision and r is an exponent range. Implicitly MPI maintains a two-dimensional array of predefined MPI datatypes D(p, r). D(p, r) is defined for each value of (p, r) supported by the compiler, including pairs for which one value is unspecified. Attempting to access an element of the array with an index (p, r) not supported by the compiler is erroneous. MPI implicitly maintains a similar array of COMPLEX datatypes. For integers, there is a similar implicit array related to selected_int_kind and indexed by the requested number of digits r. Note that the predefined datatypes contained in these implicit arrays are not the same as the named MPI datatypes MPI_REAL, etc., but a new set.
Advice
to implementors.
The above description is for explanatory purposes only. It is not
expected that implementations will have such internal arrays.
( End of advice to implementors.)
Advice to users.
selected_real_kind() maps a large number of (p,r) pairs
to a much smaller number of KIND parameters supported by the compiler.
KIND parameters are not specified by the language and are not
portable. From the language point of view intrinsic types of the
same base type and KIND parameter are of the same type.
In order to allow interoperability in a heterogeneous environment,
MPI is more stringent. The corresponding MPI datatypes match if
and only if they have the same (p,r) value ( REAL and COMPLEX) or
r value ( INTEGER). Thus MPI has many more datatypes than
there are fundamental language types.
( End of advice to users.)
| MPI_TYPE_CREATE_F90_REAL(p, r, newtype) | |
| IN p | precision, in decimal digits (integer) |
| IN r | decimal exponent range (integer) |
| OUT newtype | the requested MPI datatype (handle) |
This function returns a predefined MPI datatype that matches a REAL variable of KIND selected_real_kind(p, r). In the model described above it returns a handle for the element D(p, r). Either p or r may be omitted from calls to selected_real_kind(p, r) (but not both). Analogously, either p or r may be set to MPI_UNDEFINED. In communication, an MPI datatype A returned by MPI_TYPE_CREATE_F90_REAL matches a datatype B if and only if B was returned by MPI_TYPE_CREATE_F90_REAL called with the same values for p and r or B is a duplicate of such a datatype. Restrictions on using the returned datatype with the ``external32'' data representation are given on page Parameterized Datatypes with Specified Precision and Exponent Range .
It is erroneous to supply values for p and r not supported by the compiler.
| MPI_TYPE_CREATE_F90_COMPLEX(p, r, newtype) | |
| IN p | precision, in decimal digits (integer) |
| IN r | decimal exponent range (integer) |
| OUT newtype | the requested MPI datatype (handle) |
int MPI_Type_create_f90_complex(int p, int r, MPI_Datatype *newtype)
This function returns a predefined MPI datatype that matches a COMPLEX variable
of KIND selected_real_kind(p, r).
Either p or r may be omitted from calls to
selected_real_kind(p, r) (but not both). Analogously, either
p or r may be set to MPI_UNDEFINED.
Matching rules for datatypes created by this function are
analogous to the matching rules for datatypes created by
MPI_TYPE_CREATE_F90_REAL.
Restrictions on using the returned datatype with the ``external32'' data
representation are given on page Parameterized Datatypes with Specified Precision and Exponent Range
.
It is erroneous to supply values for p and r not
supported by the compiler.
This function returns a predefined MPI datatype that matches a INTEGER variable
of KIND selected_int_kind(r).
Matching rules for datatypes created by this function are
analogous to the matching rules for datatypes created by
MPI_TYPE_CREATE_F90_REAL.
Restrictions on using the returned datatype with the ``external32'' data
representation are given on page Parameterized Datatypes with Specified Precision and Exponent Range
.
It is erroneous to supply a value for r that is not
supported by the compiler.
Example:
The datatypes returned by the above functions are
predefined datatypes. They cannot be freed; they do not need to be
committed; they can be used with predefined reduction operations.
There are two situations in which they behave differently syntactically,
but not semantically, from the MPI named predefined datatypes.
( End of advice to users.)
An application may often repeat a call to
MPI_TYPE_CREATE_F90_xxxx with the same combination of
( xxxx, p, r).
The application is not allowed to free the returned predefined, unnamed
datatype handles. To prevent the creation of a potentially huge amount of handles,
a high quality
MPI implementation should return the same datatype handle for
the same
( REAL/ COMPLEX/ INTEGER, p, r)
combination.
Checking for the
combination ( p, r) in the preceding call to
MPI_TYPE_CREATE_F90_xxxx and
using a hash-table to find formerly generated handles should limit the
overhead of finding a previously generated datatype with same combination
of ( xxxx, p, r).
( End of advice to implementors.)
The MPI_TYPE_CREATE_F90_REAL/COMPLEX/INTEGER interface
needs as input the original range and precision values to be able to
define useful and compiler-independent
external (Section External Data Representation: ``external32''
on page External Data Representation: ``external32''
)
or user-defined (Section User-Defined Data Representations
on
page User-Defined Data Representations
) data representations, and in order
to be able to perform automatic and efficient data conversions in a heterogeneous
environment.
( End of rationale.)
The external32 representation specifies data formats for integer
and floating point values. Integer values are represented in two's complement
big-endian format. Floating point values are represented by one
of three IEEE formats. These are the IEEE ``Single,'' ``Double'' and
``Double Extended'' formats, requiring 4, 8 and 16 bytes of storage,
respectively.
For the IEEE ``Double Extended'' formats, MPI specifies a
Format Width of 16 bytes, with 15 exponent bits, bias = +10383,
112 fraction bits, and an encoding analogous to the ``Double'' format.
The external32 representations of the datatypes returned by
MPI_TYPE_CREATE_F90_REAL/COMPLEX/INTEGER
are given by the following rules.
MPI
provides named datatypes corresponding to optional Fortran 77
numeric types that contain explicit byte lengths --- MPI_REAL4,
MPI_INTEGER8, etc. This section describes a mechanism
that generalizes this model to support all Fortran numeric
intrinsic types.
We assume that for each typeclass (integer, real, complex) and each
word size there is a unique machine representation.
For every pair ( typeclass, n) supported by a compiler,
MPI must provide a named size-specific datatype.
The name of this datatype is of the form
MPI_<TYPE>n in C and Fortran and of the form
MPI::<TYPE>n in C++ where <TYPE> is one of
REAL, INTEGER and COMPLEX, and n is the length in bytes of the
machine representation. This datatype locally matches all variables
of type ( typeclass, n). The list of names for such types
includes:
The following functions allow a
user to obtain a size-specific MPI datatype for any intrinsic Fortran type.
MPI_SIZEOF(X, SIZE, IERROR)
This function returns the size in bytes of the machine representation of
the given variable. It is a generic Fortran routine and has a Fortran
binding only.
This function is similar to the C and C++ sizeof operator
but behaves slightly differently. If given an array argument, it
returns the size of the base element, not the size of the
whole array.
( End of advice to users.)
This function is not available in other languages because it would
not be useful.
( End of rationale.)
int MPI_Type_match_size(int typeclass, int size, MPI_Datatype *type)
typeclass is one of MPI_TYPECLASS_REAL,
MPI_TYPECLASS_INTEGER and
MPI_TYPECLASS_COMPLEX,
corresponding to the desired typeclass. The function returns
an MPI datatype matching a local variable of type ( typeclass,
size).
This function
returns a reference (handle) to one of the predefined named
datatypes, not a duplicate. This type cannot be freed.
MPI_TYPE_MATCH_SIZE can be used to obtain a size-specific type that
matches a Fortran numeric intrinsic type by first calling
MPI_SIZEOF in order to compute the variable size, and then
calling MPI_TYPE_MATCH_SIZE to find a suitable
datatype.
In C and C++, one can use the C function sizeof(), instead of
MPI_SIZEOF. In addition, for variables of default kind
the variable's size can be computed by a call to
MPI_TYPE_GET_EXTENT, if the typeclass is known.
It is erroneous to specify a size not supported by the compiler.
This is a convenience function. Without it, it can be tedious to
find the correct named type. See note to implementors below.
( End of rationale.)
This function could be implemented as a series of tests.
The usual type matching rules apply to size-specific datatypes: a
value sent with datatype
MPI_<TYPE>n can be received with this same datatype on
another process.
Most modern computers use 2's complement for integers and
IEEE format for floating point. Thus, communication using these
size-specific datatypes will not entail loss of precision or
truncation errors.
Care is required when communicating in a heterogeneous
environment. Consider the following code:
Note finally that using the ``external32'' representation for I/O
requires explicit attention to the representation sizes. Consider the
following code:
MPI_TYPE_CREATE_F90_COMPLEX(P, R, NEWTYPE, IERROR)
INTEGER P, R, NEWTYPE, IERROR
{ static MPI::Datatype MPI::Datatype::Create_f90_complex(int p, int r) (binding deprecated, see Section Deprecated since MPI-2.2
) }
int MPI_Type_create_f90_integer(int r, MPI_Datatype *newtype) MPI_TYPE_CREATE_F90_INTEGER(r, newtype) IN r decimal exponent range, i.e., number of decimal digits (integer) OUT newtype the requested MPI datatype (handle)
MPI_TYPE_CREATE_F90_INTEGER(R, NEWTYPE, IERROR)
INTEGER R, NEWTYPE, IERROR
{ static MPI::Datatype MPI::Datatype::Create_f90_integer(int r) (binding deprecated, see Section Deprecated since MPI-2.2
) }
integer longtype, quadtype
integer, parameter :: long = selected_int_kind(15)
integer(long) ii(10)
real(selected_real_kind(30)) x(10)
call MPI_TYPE_CREATE_F90_INTEGER(15, longtype, ierror)
call MPI_TYPE_CREATE_F90_REAL(30, MPI_UNDEFINED, quadtype, ierror)
...
call MPI_SEND(ii, 10, longtype, ...)
call MPI_SEND(x, 10, quadtype, ...)
Advice to users.
1. MPI_TYPE_GET_ENVELOPE returns special
combiners that allow a program to retrieve the values of
p and r.
If a variable was declared specifying a non-default KIND value that was
not obtained with selected_real_kind() or
selected_int_kind(), the only way to obtain a matching
MPI datatype is to use the size-based mechanism described
in the next section.
2. Because the datatypes are not named, they cannot
be used as compile-time initializers or otherwise
accessed before a call to one of the MPI_TYPE_CREATE_F90_
routines.
Advice
to implementors.
Rationale.
We now specify how the datatypes described in this section
behave when used with the ``external32'' external data representation
described in Section External Data Representation: ``external32''
on page External Data Representation: ``external32''
.
For MPI_TYPE_CREATE_F90_REAL:
if (p > 33) or (r > 4931) then external32 representation
is undefined
else if (p > 15) or (r > 307) then external32_size = 16
else if (p > 6) or (r > 37) then external32_size = 8
else external32_size = 4
For MPI_TYPE_CREATE_F90_COMPLEX: twice the size
as for MPI_TYPE_CREATE_F90_REAL.
For MPI_TYPE_CREATE_F90_INTEGER:
if (r > 38) then external32 representation is undefined
else if (r > 18) then external32_size = 16
else if (r > 9) then external32_size = 8
else if (r > 4) then external32_size = 4
else if (r > 2) then external32_size = 2
else external32_size = 1
If the external32 representation of
a datatype is undefined, the result of using the datatype directly
or indirectly (i.e., as part of another datatype or through a
duplicated datatype) in operations that require the external32
representation is undefined. These operations include MPI_PACK_EXTERNAL,
MPI_UNPACK_EXTERNAL and many MPI_FILE
functions, when the ``external32'' data representation is used.
The ranges for which the external32 representation is undefined are
reserved for future standardization.
Up: Additional Support for Fortran Numeric Intrinsic Types
Next: Support for Size-specific MPI Datatypes
Previous: Additional Support for Fortran Numeric Intrinsic Types
316.2. Support for Size-specific MPI Datatypes
Up: Additional Support for Fortran Numeric Intrinsic Types
Next: Communication With Size-specific Types
Previous: Parameterized Datatypes with Specified Precision and Exponent Range
MPI_REAL4
MPI_REAL8
MPI_REAL16
MPI_COMPLEX8
MPI_COMPLEX16
MPI_COMPLEX32
MPI_INTEGER1
MPI_INTEGER2
MPI_INTEGER4
MPI_INTEGER8
MPI_INTEGER16
One
datatype is required for each representation supported by
the compiler. To be backward compatible with the interpretation of
these types in MPI-1, we assume that the nonstandard declarations
REAL*n, INTEGER*n, always create a variable whose
representation is of size n. All these datatypes are predefined.
MPI_SIZEOF(x, size) IN x a Fortran variable of numeric intrinsic type (choice) OUT size size of machine representation of that type (integer)
<type> X
INTEGER SIZE, IERROR
Advice to users.
Rationale.
MPI_TYPE_MATCH_SIZE(typeclass, size, type) IN typeclass generic type specifier (integer) IN size size, in bytes, of representation (integer) OUT type datatype with correct type, size (handle)
MPI_TYPE_MATCH_SIZE(TYPECLASS, SIZE, TYPE, IERROR)
INTEGER TYPECLASS, SIZE, TYPE, IERROR
{ static MPI::Datatype MPI::Datatype::Match_size(int typeclass, int size) (binding deprecated, see Section Deprecated since MPI-2.2
) }
Rationale.
Advice
to implementors.
int MPI_Type_match_size(int typeclass, int size, MPI_Datatype *rtype)
{
switch(typeclass) {
case MPI_TYPECLASS_REAL: switch(size) {
case 4: *rtype = MPI_REAL4; return MPI_SUCCESS;
case 8: *rtype = MPI_REAL8; return MPI_SUCCESS;
default: error(...);
}
case MPI_TYPECLASS_INTEGER: switch(size) {
case 4: *rtype = MPI_INTEGER4; return MPI_SUCCESS;
case 8: *rtype = MPI_INTEGER8; return MPI_SUCCESS;
default: error(...); }
... etc. ...
}
}
( End of advice to implementors.)
Up: Additional Support for Fortran Numeric Intrinsic Types
Next: Communication With Size-specific Types
Previous: Parameterized Datatypes with Specified Precision and Exponent Range
316.3. Communication With Size-specific Types
Up: Additional Support for Fortran Numeric Intrinsic Types
Next: Language Interoperability
Previous: Support for Size-specific MPI Datatypes
Advice to users.
real(selected_real_kind(5)) x(100)
call MPI_SIZEOF(x, size, ierror)
call MPI_TYPE_MATCH_SIZE(MPI_TYPECLASS_REAL, size, xtype, ierror)
if (myrank .eq. 0) then
... initialize x ...
call MPI_SEND(x, xtype, 100, 1, ...)
else if (myrank .eq. 1) then
call MPI_RECV(x, xtype, 100, 0, ...)
endif
This may not work in a heterogeneous environment
if the value of size is not the same on process 1 and
process 0. There should be no problem in a homogeneous environment.
To communicate in a heterogeneous environment, there are at least four
options. The first is to declare variables of default type and use
the MPI datatypes for these types, e.g., declare a variable of type
REAL and use MPI_REAL. The second is to use
selected_real_kind or selected_int_kind and
with the functions of the previous section.
The third is to declare a variable
that is known to be the same size on all architectures (e.g.,
selected_real_kind(12) on almost all compilers will result in an 8-byte
representation). The fourth is to carefully check
representation size before communication. This may require explicit
conversion to a variable of size that can be communicated and
handshaking between sender and receiver to agree on a size.
real(selected_real_kind(5)) x(100)
call MPI_SIZEOF(x, size, ierror)
call MPI_TYPE_MATCH_SIZE(MPI_TYPECLASS_REAL, size, xtype, ierror)
if (myrank .eq. 0) then
call MPI_FILE_OPEN(MPI_COMM_SELF, 'foo', &
MPI_MODE_CREATE+MPI_MODE_WRONLY, &
MPI_INFO_NULL, fh, ierror)
call MPI_FILE_SET_VIEW(fh, 0, xtype, xtype, 'external32', &
MPI_INFO_NULL, ierror)
call MPI_FILE_WRITE(fh, x, 100, xtype, status, ierror)
call MPI_FILE_CLOSE(fh, ierror)
endif
call MPI_BARRIER(MPI_COMM_WORLD, ierror)
if (myrank .eq. 1) then
call MPI_FILE_OPEN(MPI_COMM_SELF, 'foo', MPI_MODE_RDONLY, &
MPI_INFO_NULL, fh, ierror)
call MPI_FILE_SET_VIEW(fh, 0, xtype, xtype, 'external32', &
MPI_INFO_NULL, ierror)
call MPI_FILE_WRITE(fh, x, 100, xtype, status, ierror)
call MPI_FILE_CLOSE(fh, ierror)
endif
If processes 0 and 1 are on different machines, this code may not work
as expected if the size is different on the two machines.
( End of advice to users.)
Up: Additional Support for Fortran Numeric Intrinsic Types
Next: Language Interoperability
Previous: Support for Size-specific MPI Datatypes
Return to MPI-2.2 Standard Index
Return to MPI Forum Home Page
(Unofficial) MPI-2.2 of September 4, 2009
HTML Generated on September 10, 2009


‘Bata’ is back, opens a N350 million factory
by Abiola OdutolaA famous shoe manufacturer, Bata has staged a comeback in Nigeria as it launched a new factory worth N350 million in the Federal Capital Territory, Abuja, to aid local production of footwear in Nigeria.
The manufacturer has employed artisans that have started manufacturing footwear that would soon hit the market.
What it means: The shoemaker that left Nigeria in the 80’s has returned to the most populous black nation and is expected to generate employment for the teeming youth while the internally generated revenue would also witness a boost.
An executive of the company, Tobe Eze, who disclosed during the official visit of some officials of Standard Organisation of Nigeria to the facility, explained that the brand returned to the country last April when it imported some shoes.
[READ MORE: Cadbury’s Hot Chocolate Drink is scarce, and border closure could be responsible]
He said, “Now, our local shoemakers have started work and we will soon floor the market with our products. We will open another $1million shoe plant at Idu Industrial layout (Abuja) and that will be fully manned by over 128 Nigerians.
“Everybody working here are all Nigerians. We have six people undergoing training as supervisors at the Bata factory. The return of Bata would improve the country’s economy. To have the confidence to partner with us and come back is a good sign also for the country.
“Government is also trying to attract foreign investment; whether direct and indirect. Nigerians can expect what they have always known about Bata. First of all, it is quality and affordability.”
He added that there were plans to expand to other states in the country. “We are also not losing our tradition. We are bringing the old with the new and we are infusing both to satisfy our customers. Measures had been put in place to ensure that the shoe company does not close up shops as it did in the 80s.”


java.util.Collection
or java.util.Map
is a collection or map itself.
This includes adding a collection to itself, for example, calling hashCode()
on the self-containing collection, which can lead to a java.lang.StackOverflowError
.
Such situations may occur in the code with raw types as a result of copy-paste.
Example:
ArrayList list = new ArrayList<>();
list.add(list);
return list.hashCode(); // throws StackOverflowException


- removeAvailableAction(GoapAction) - Method in class javaGOAP.GoapUnit
-
- removeEdge(VertexType, VertexType) - Method in class javaGOAP.graph.DirectedGraph
-
- removeEdge(VertexType, VertexType) - Method in interface javaGOAP.graph.IGraph
-
Function for removing an edge from a Graph.
- removeEffect(GoapState) - Method in class javaGOAP.GoapAction
-
Overloaded function for convenience.
- removeEffect(String) - Method in class javaGOAP.GoapAction
-
Remove a effect from the HashSet.
- removeGoalStat(GoapState) - Method in class javaGOAP.GoapUnit
-
- removeGoalState(String) - Method in class javaGOAP.GoapUnit
-
- removeImportantUnitGoalChangeListener(Object) - Method in class javaGOAP.GoapUnit
-
- removePlanCreatedListener(Object) - Method in class javaGOAP.IdleState
-
- removePlanEventListener(Object) - Method in class javaGOAP.FSM
-
- removePrecondition(GoapState) - Method in class javaGOAP.GoapAction
-
Overloaded function for convenience.
- removePrecondition(String) - Method in class javaGOAP.GoapAction
-
Remove a precondition from the HashSet.
- removeWorldState(String) - Method in class javaGOAP.GoapUnit
-
- removeWorldState(GoapState) - Method in class javaGOAP.GoapUnit
-
- requiresInRange(IGoapUnit) - Method in class javaGOAP.GoapAction
-
Defines if the unit needs to be in a certain range in relation to the
target to execute the action.
- reset() - Method in class javaGOAP.GoapAction
-
Function used to reset an action.
- resetActions() - Method in class javaGOAP.GoapUnit
-
Can be called to remove any existing GoapActions and start fresh.
- RunActionState - Class in javaGOAP
-
RunActionState.java --- State on the FSM Stack
- RunActionState(FSM, Queue<GoapAction>) - Constructor for class javaGOAP.RunActionState
-
- runGoapAction(IGoapUnit) - Method in class javaGOAP.IdleState
-
- runGoapAction(IGoapUnit) - Method in interface javaGOAP.IFSMState
-
Returning false results in the removing of the implementers instance on
the stack of the FSM.
- runGoapAction(IGoapUnit) - Method in class javaGOAP.MoveToState
-
Move to the target of the currentAction until the unit is in range to
perform the action itself.
- runGoapAction(IGoapUnit) - Method in class javaGOAP.RunActionState
-
Cycle trough all actions until an invalid one or the end of the Queue is
reached.


Organic foods are foods produced by organic farming. Currently, the European Union, the United States, Canada, Mexico, Japan and many other countries require producers to obtain special certification in order to market food as organic within their borders. In the context of these regulations, organic food is food produced in a way that complies with organic standards set by national governments and international organizations. Although the produce of kitchen gardens may be organic, selling food with the organic label is regulated by governmental food safety authorities.


Slow Adventures is a small eco-friendly company that organize off the beaten tracks trips and excursions in Dominican Republic.
Dominican Republic is much more than only beaches and all inclusive hotels! If you want to discover the "real" Dominican Republic, off the beaten tracks, and visit some places only known by the locals, whether you are adventurous or not too much, those excursions are made for you.
Check also our Slow Dive Scuba Diving excursions and Casa Chihuahua B&B accomodation :


The In Pin component is a circuit input pin, a source for a value of true or false. Anything it is connected to will receive a constant one value. The current state is indicated by the value 0 or 1 and an LED. Green indicates a value of one. The value can be changed from one to zero or zero to one (toggled) by clicking on the LED.
The names of inputs are significant to testing and are used as the inputs for reference components. Names must be unique in a given tab.


A set of one-line C++ macros to simplify the creation of reccurent things (like Qt Meta Properties) so that doing them in C++ is not harder than in QML, and requires no boilerplate glue-code.
This fork aim is too add CMake support to this library. It also change the macros to match my naming convention.
Dependencies
- Doxygen : To generate the documentation.
- DoxygenBootstrapped : Integrate doxygen with CMake. v1.3.2.
API
- The documentation can be found here
Release
1.0.0
: Initial work1.1.0
: Reset functions
Convention
- Class attribute are
_<property>
. - Getter and Setter are
Get<Property>
,Set<Property>
. - Reset are
Reset<Property>
. - Signals are
<property>Changed
.
For one-line creation of QML properties
QSM_WRITABLE_***_PROPERTY
: a macro that takes a type and a name, and creates automatically the member attribute, the public getter and setter, and the Qt signal for notifier, and allow use in QML by exposing a read/writeQ_PROPERTY
.QSM_READONLY_***_PROPERTY
: another macro that does almost the same asQSM_WRITABLE_PROPERTY
except that the property is not modifiable from the QML side, only C++ can access the setter.QSM_CONSTANT_***_PROPERTY
: a simplified version of the previous macros, that exposes a constant property with no getter and no setter, from C++ or QML side.
The ***
can be either VAR
, PTR
, CSTREF
, or AUTO
. The three first are simple macros that you use by simply passing the non-qualified type (T
) and it'll add the qualifiers for var (none), pointer (*
), or constant-reference (const &
) where needed. The last one in the other hand, uses either T
or T*
and it's capable of adding constant-reference by deciding itself which type is the cheapest (using some template trickery internally).
INFO : by default, getters are named
Get<PropertyName>
, but if you want more Qt-compliant naming (no prefix) you can set theQSUPER_MACROS_USE_QT_GETTERS
flag in QMake or QBS or CMake.The same for setters that are named
Set<PropertyName>
. With the flagQSUPER_MACROS_USE_QT_SETTERS
the will be set asset<PropertyName>
.Same for signals they are default to
<PropertyName>Changed
. With the flagQSUPER_MACROS_USE_QT_SIGNALS
the will be set to<propertyName>Changed
. It is recommended for better to use the Qt-ish form of signals (they are default in CMake) because QML connections don't support signals starting with a Capital letter.The Prefix of member variable is default to nothing. So the attribute is
_attribute
. You can setQSUPER_MACROS_USE_QT_PREFIX
tom
to have a more Qt-ish naming convention.
Using default values for attribute
It is possible to set a default value for the attribute by using the macros <MACROS>_WDEFAULT
.
For easier QQmlListProperty from QList
QSM_LIST_PROPERTY
: a really handy macro to create a QML list property that maps to an internalQList
of objects, without having to declare and implement all static function pointers...
For simple enum class that can be used in C++ and QML
QSM_ENUM_CLASS
: a macro to declare aQObject
class that only contains aQ_ENUM
and can be exposed as is to QML.
For single property
QSM_SINGLETON_PROPERTY
: Macros to generate Singleton properties without the need to handle the factory.
CMake
Build
Input
- QSUPER_MACROS_TARGET : Name of the library target. Default : "QSuperMacros"
- QSUPER_MACROS_PROJECT : Name of the project. Default : "QSuperMacros"
- QSUPER_MACROS_BUILD_SHARED : Build shared library [ON OFF]. Default: OFF.
- QSUPER_MACROS_BUILD_STATIC : Build static library [ON OFF]. Default: ON.
- QSUPER_MACROS_USE_NAMESPACE : If the library compile with a namespace [ON OFF]. Default: OFF.
- QSUPER_MACROS_NAMESPACE : Namespace for the library. Only relevant if QSUPER_MACROS_USE_NAMESPACE is ON. Default: "Qsm".
- QSUPER_MACROS_BUILD_DOC : Build the QSuperMacros Doc [ON OFF]. Default: OFF.
Naming Convention
- QSUPER_MACROS_USE_QT_PREFIX : Use Qt-ish internal attribute prefix
m_attribute
[ON OFF]. Default = OFF. - QSUPER_MACROS_USE_QT_GETTERS : Use Qt-ish Getter naming convention
attribute()
[ON OFF]. Default = OFF. - QSUPER_MACROS_USE_QT_SETTERS : Use Qt-ish Setter naming convention
setAttribute
[ON OFF]. Default = OFF. - QSUPER_MACROS_USE_QT_RESET : Use Qt-ish Setter naming convention resetAttribute [ON OFF]. Default = OFF.
- QSUPER_MACROS_USE_QT_SIGNALS : Use Qt-ish signal naming convention
attributeChanged
. It is really recommended to leave this option ON because QML Connections don't handle signals starting with Capital Letter [ON OFF]. Default = ON.
Dependencies
- QSUPER_MACROS_DOXYGEN_BT_REPOSITORY : Repository of DoxygenBt. Default : "https://github.com/OlivierLDff/DoxygenBootstrapped.git"
- QSUPER_MACROS_DOXYGEN_BT_TAG : Git Tag of DoxygenBt. Default : "v1.3.2"
Output
- QSUPER_MACROS_TARGET : Output target to link to.
- QSUPER_MACROS_VERSION : Current version of the library
Integration in CMake project
The main goal of this CMake project is to big included into another CMake project.
It is also possible to download the repository with the scripts inside cmake/
. folder Simply call BuildQSuperMacros.cmake
.
You will need:
DownloadProject.cmake
DownloadProject.CMakeLists.cmake.in
BuildQSuperMacros.cmake
NOTE : If you want to donate to Thomas Boutroue, use this link :


Search Experiences For Your ASP.NET Core Apps With Elasticsearch As a developer, I want to build the best software my users can have. More often than not, a great search experience is at the forefront of that user experience. In this post, I’ll show you how to build a search experience within your ASP.NET Core applicat...
davidfowl/DynamicLinq Dynamic LINQ queries based on C# 4 dynamic. Contribute to davidfowl/DynamicLinq development by creating an account on GitHub.
DOH! DNS over HTTPS explained | APNIC Blog A deeper look at the potential benefits of DNS over HTTPS, or DOH.
CallSiteValidator doesn't cache results of the walk · Issue #2353 · dotnet/extensions When ScopeValidation is on for the dependency injection container, we walk to resolution graph and find places where service lifetimes are mismatched (like singleton -> scoped). This logic curre...
langleyfoxall/laravel-nist-password-rules 🔒 Laravel validation rules that follow the password related recommendations found in NIST Special Publication 800-63B section 5. - langleyfoxall/laravel-nist-password-rules
Detecting Sync over Async Code in ASP.NET Core - CodeOpinion Not properly awaiting async calls can lead to thread pool starvation. Most often caused by sync over async code. Here's how you can detect and fix it.
Every game should copy Death Stranding’s “Very Easy Mode” Not every player wants to suffer through gatekeeping challenges just to see a game.
pipeline doc - by Rick-Anderson · Pull Request #14414 · dotnet/docs Internal review URLs System.IO.Pipelines Todo Hook up TOC add metadata UE Pass Fixes #7516
Buy Samsung HMD Odyssey+ - Microsoft Store Immerse yourself in the virtual world with this cutting-edge VR headset.