Follow this link to skip to the main content

Core Package


Classes

class  claraty::Semaphore
class  claraty::Parameter_Parser
struct  claraty::queue_timeout

Defines

#define CL_OP_BIT_OR   (1 << 0)
#define _PUGXML_
#define __PUGXML_UTIL_H

Enumerations

enum  on_off_t { OFF = 0, ON = 1 }

Detailed Description

CLARAty Core Package. The CLARAty Vision Package is intended to the basis for the CLARAty softwre.

Define Documentation

#define __PUGXML_UTIL_H

Definition at line 30 of file pugxml_util.h.

#define _PUGXML_

Definition at line 74 of file pugxml.h.

#define CL_OP_BIT_OR   (1 << 0)

This file defines an enumeration that is used to generate operators for math types which include arithmetic, logical, and bitwise operators for CLARAty define class types.

Use the enumeration to define what operations need to defined for a class. Set multiple operators for CL_OP_GENERATE by composing them using hte | (or) operator. Set this macro before including the claraty/operator.h as follows:

IMPORTANT: Make sure to put parentheses around the value used for CL_OP_MODE so that there are not ambiguities about the order of operations.

Header file (foo.h):
#include "claraty/operator_def.h"
#define CL_OP_GENERATE ( CL_OP::PLUS | <br> CL_OP::MINUS | <br> CL_OP::NOT_EQUAL )
#define CL_OP_CLASS Foo
#include "claraty/operator.h"

Template instantiation (foo_templates.cc) file:
#include "claraty/foo.h"
#define CL_OP_NAME foo<int>
#define CL_OP_MODE FOO_OP_MODE
#include "claraty/operator.h"

For each operation available using this pattern, there are two macros defined:
CL_OP_xxx Has only one bit set for positive composition (only)
CL_OP_NO_xxx Has all but one bit set for negative composition (except)

The above example uses positive composition to only use + and != by composing using the preprocessor's | operator. To use negative logic, start with CL_OP_ALL (all bits set), then remove the bits using the preprocessor's & opertor with the CL_OP_NO_xxx macros, as in:

#define FOO_OP_MODE (CL_OP_ALL & CL_OP_NOT_DIV & CL_OP_NOT_BITXOR)

The following is the full table of operations available. The 'Defined wrt' field refers to the operation that has to already be defined on the type in order to be able to automatically generate the new operation. The composite entries are provided for convenience, and are no different than using the individual names of the components.

Individual Operator Name Defined wrt -------- ---- ----------- | CL_OP_BIT_OR |= & CL_OP_BIT_AND &= ^ CL_OP_BIT_XOR ^= != CL_OP_NOT_EQUAL == + CL_OP_PLUS +=

  • CL_OP_MINUS -= * CL_OP_TIMES *= / CL_OP_DIVIDE /=

Composite Operators Name --------- ---- | & ^ CL_OP_BITWISE + - * / CL_OP_ARITHMETIC all CL_OP_ALL

Definition at line 108 of file operator_def.h.


Enumeration Type Documentation

enum on_off_t

Shared definintions.

Enumerator:
OFF 
ON 

Definition at line 83 of file share.h.

00083 {OFF = 0, ON = 1};