comma_list< T > Class Template Reference

#include <comma_list.h>

Public Member Functions

 comma_list ()
void set (std::string const &str)
bool is_set () const
 return true if a specific value is held by this container
bool match (T const &value) const

Private Types

typedef T value_type
typedef std::vector< value_typecontainer_type
typedef
container_type::const_iterator 
const_iterator

Private Attributes

bool is_all
container_type items

Detailed Description

template<class T>
class comma_list< T >

hold a list of item of type T, tracking also if item has been set.

Definition at line 23 of file comma_list.h.


Member Typedef Documentation

template<class T>
typedef container_type::const_iterator comma_list< T >::const_iterator [private]

Definition at line 52 of file comma_list.h.

template<class T>
typedef std::vector<value_type> comma_list< T >::container_type [private]

Definition at line 51 of file comma_list.h.

template<class T>
typedef T comma_list< T >::value_type [private]

Definition at line 50 of file comma_list.h.


Constructor & Destructor Documentation

template<class T >
comma_list< T >::comma_list (  )  [inline]

Definition at line 59 of file comma_list.h.


Member Function Documentation

template<class T>
bool comma_list< T >::is_set (  )  const [inline]

return true if a specific value is held by this container

Definition at line 38 of file comma_list.h.

template<class T>
bool comma_list< T >::match ( T const &  value  )  const [inline]
Parameters:
value the value to test

return true if value match one the stored value in items

Definition at line 85 of file comma_list.h.

References comma_list< T >::is_all, and comma_list< T >::items.

Referenced by profile_spec::match().

Here is the caller graph for this function:

template<class T >
void comma_list< T >::set ( std::string const &  str  )  [inline]
Parameters:
str list of comma separated item

setup items array according to str parameters. Implement PP:3.17 w/o restriction on charset and with the special string all which match anything.

Definition at line 66 of file comma_list.h.

References comma_list< T >::is_all, comma_list< T >::items, and separate_token().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

template<class T>
bool comma_list< T >::is_all [private]
template<class T>
container_type comma_list< T >::items [private]

Definition at line 54 of file comma_list.h.

Referenced by comma_list< T >::match(), and comma_list< T >::set().


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

Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1