PFUNC  1.0
Public Types | Public Member Functions | Private Attributes | Friends
pfunc::detail::attribute< Priority, Compare > Struct Template Reference

An implementation of the ``attributes'' that a task can have. More...

#include <pfunc/attribute.hpp>

List of all members.

Public Types

typedef Compare compare_type
typedef Priority priority_type
typedef unsigned int qnum_type
typedef unsigned int num_waiters_type
typedef bool nested_type
typedef bool grouped_type
typedef unsigned int level_type

Public Member Functions

const qnum_typeget_queue_number () const
const priority_typeget_priority () const
const num_waiters_typeget_num_waiters () const
const nested_typeget_nested () const
const grouped_type get_grouped () const
const level_typeget_level () const
void set_queue_number (const qnum_type &qnum)
void set_priority (const priority_type &prio)
void set_num_waiters (const num_waiters_type &nwait)
void set_nested (const nested_type &nest)
void set_grouped (const grouped_type &grouped)
void set_level (const level_type &new_level)
 attribute (const nested_type &is_nested=true, const grouped_type &join_group=false)

Private Attributes

qnum_type queue_number
priority_type priority
num_waiters_type num_waiters
nested_type is_nested
grouped_type join_group
level_type level

Friends

bool operator< (const attribute &one, const attribute &two)

Detailed Description

template<typename Priority, typename Compare>
struct pfunc::detail::attribute< Priority, Compare >

An implementation of the ``attributes'' that a task can have.

Parameters:
PriorityThe type of the priority, defaults to int.
CompareThe comparison function that orders on Priority.
AllocThe allocator that needs to be used to allocate attribute.

Each ``task'' that is added has certain attributes. These include the queue_number, priority of the task, etc. This structure implements the functionality described above. Note that a single attribute can be reused with multiple tasks if they are all going to have the same attributes.


Member Typedef Documentation

template<typename Priority , typename Compare >
typedef Compare pfunc::detail::attribute< Priority, Compare >::compare_type

Type of the ordering function

template<typename Priority , typename Compare >
typedef bool pfunc::detail::attribute< Priority, Compare >::grouped_type

Type of join_group

template<typename Priority , typename Compare >
typedef unsigned int pfunc::detail::attribute< Priority, Compare >::level_type

Type of the level variable

template<typename Priority , typename Compare >
typedef bool pfunc::detail::attribute< Priority, Compare >::nested_type

Type of is_nested

template<typename Priority , typename Compare >
typedef unsigned int pfunc::detail::attribute< Priority, Compare >::num_waiters_type

Type of the num waiters

template<typename Priority , typename Compare >
typedef Priority pfunc::detail::attribute< Priority, Compare >::priority_type

Type of the priority

template<typename Priority , typename Compare >
typedef unsigned int pfunc::detail::attribute< Priority, Compare >::qnum_type

Type of the qnumber


Constructor & Destructor Documentation

template<typename Priority , typename Compare >
pfunc::detail::attribute< Priority, Compare >::attribute ( const nested_type is_nested = true,
const grouped_type join_group = false 
) [inline]

Constructor


Member Function Documentation

template<typename Priority , typename Compare >
const grouped_type pfunc::detail::attribute< Priority, Compare >::get_grouped ( ) const [inline]
Returns:
True is the task should join the group
False otherwise
template<typename Priority , typename Compare >
const level_type& pfunc::detail::attribute< Priority, Compare >::get_level ( ) const [inline]
Returns:
Level of the current task in the spawn tree.
template<typename Priority , typename Compare >
const nested_type& pfunc::detail::attribute< Priority, Compare >::get_nested ( ) const [inline]
Returns:
True if the task is a nested task
False otherwise
template<typename Priority , typename Compare >
const num_waiters_type& pfunc::detail::attribute< Priority, Compare >::get_num_waiters ( ) const [inline]
Returns:
Number of waiters receiving completion notices
template<typename Priority , typename Compare >
const priority_type& pfunc::detail::attribute< Priority, Compare >::get_priority ( ) const [inline]
Returns:
Priority of the task
template<typename Priority , typename Compare >
const qnum_type& pfunc::detail::attribute< Priority, Compare >::get_queue_number ( ) const [inline]
Returns:
Queue number to which this task belongs
template<typename Priority , typename Compare >
void pfunc::detail::attribute< Priority, Compare >::set_grouped ( const grouped_type grouped) [inline]
Parameters:
groupedGroup the task.
template<typename Priority , typename Compare >
void pfunc::detail::attribute< Priority, Compare >::set_level ( const level_type new_level) [inline]
Parameters:
nwaitNumber of waiters receiving completion notices.
template<typename Priority , typename Compare >
void pfunc::detail::attribute< Priority, Compare >::set_nested ( const nested_type nest) [inline]
Parameters:
nestNest (unnest) the task.
template<typename Priority , typename Compare >
void pfunc::detail::attribute< Priority, Compare >::set_num_waiters ( const num_waiters_type nwait) [inline]
Parameters:
nwaitNumber of waiters receiving completion notices.
template<typename Priority , typename Compare >
void pfunc::detail::attribute< Priority, Compare >::set_priority ( const priority_type prio) [inline]
Parameters:
prioPriority of this task.
template<typename Priority , typename Compare >
void pfunc::detail::attribute< Priority, Compare >::set_queue_number ( const qnum_type qnum) [inline]
Parameters:
qnumQueue number that this particular task should be put into

Friends And Related Function Documentation

template<typename Priority , typename Compare >
bool operator< ( const attribute< Priority, Compare > &  one,
const attribute< Priority, Compare > &  two 
) [friend]

operator<


Member Data Documentation

template<typename Priority , typename Compare >
nested_type pfunc::detail::attribute< Priority, Compare >::is_nested [private]

Is the task nested

template<typename Priority , typename Compare >
grouped_type pfunc::detail::attribute< Priority, Compare >::join_group [private]

Should we join the group or not

template<typename Priority , typename Compare >
level_type pfunc::detail::attribute< Priority, Compare >::level [private]

Denotes the level of the task in the spawn tree

template<typename Priority , typename Compare >
num_waiters_type pfunc::detail::attribute< Priority, Compare >::num_waiters [private]

Number of parents of this task

template<typename Priority , typename Compare >
priority_type pfunc::detail::attribute< Priority, Compare >::priority [private]

Priority of this task

template<typename Priority , typename Compare >
qnum_type pfunc::detail::attribute< Priority, Compare >::queue_number [private]

The queue that this task should be put into


The documentation for this struct was generated from the following file: