yosys-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
RTLIL::ObjRange< T > Struct Template Reference

#include <rtlil.h>

Public Member Functions

 ObjRange (decltype(list_p) list_p, int *refcount_p)
 
RTLIL::ObjIterator< T > begin ()
 
RTLIL::ObjIterator< T > end ()
 
size_t size () const
 
 operator std::set< T > () const
 
 operator std::vector< T > () const
 
std::set< T > to_set () const
 
std::vector< T > to_vector () const
 

Data Fields

std::map< RTLIL::IdString, T > * list_p
 
int * refcount_p
 

Detailed Description

template<typename T>
struct RTLIL::ObjRange< T >

Definition at line 402 of file rtlil.h.

Constructor & Destructor Documentation

template<typename T>
RTLIL::ObjRange< T >::ObjRange ( decltype(list_p list_p,
int *  refcount_p 
)
inline

Definition at line 407 of file rtlil.h.

std::map< RTLIL::IdString, T > * list_p
Definition: rtlil.h:404
int * refcount_p
Definition: rtlil.h:405

Member Function Documentation

template<typename T>
RTLIL::ObjIterator<T> RTLIL::ObjRange< T >::begin ( )
inline

Definition at line 408 of file rtlil.h.

std::map< RTLIL::IdString, T > * list_p
Definition: rtlil.h:404
int * refcount_p
Definition: rtlil.h:405
template<typename T>
RTLIL::ObjIterator<T> RTLIL::ObjRange< T >::end ( )
inline

Definition at line 409 of file rtlil.h.

409 { return RTLIL::ObjIterator<T>(); }
template<typename T>
RTLIL::ObjRange< T >::operator std::set< T > ( ) const
inline

Definition at line 415 of file rtlil.h.

415  {
416  std::set<T> result;
417  for (auto &it : *list_p)
418  result.insert(it.second);
419  return result;
420  }
std::map< RTLIL::IdString, T > * list_p
Definition: rtlil.h:404
template<typename T>
RTLIL::ObjRange< T >::operator std::vector< T > ( ) const
inline

Definition at line 422 of file rtlil.h.

422  {
423  std::vector<T> result;
424  result.reserve(list_p->size());
425  for (auto &it : *list_p)
426  result.push_back(it.second);
427  return result;
428  }
std::map< RTLIL::IdString, T > * list_p
Definition: rtlil.h:404
template<typename T>
size_t RTLIL::ObjRange< T >::size ( ) const
inline

Definition at line 411 of file rtlil.h.

411  {
412  return list_p->size();
413  }
std::map< RTLIL::IdString, T > * list_p
Definition: rtlil.h:404
template<typename T>
std::set<T> RTLIL::ObjRange< T >::to_set ( ) const
inline

Definition at line 430 of file rtlil.h.

430 { return *this; }
template<typename T>
std::vector<T> RTLIL::ObjRange< T >::to_vector ( ) const
inline

Definition at line 431 of file rtlil.h.

431 { return *this; }

Field Documentation

template<typename T>
std::map<RTLIL::IdString, T>* RTLIL::ObjRange< T >::list_p

Definition at line 404 of file rtlil.h.

template<typename T>
int* RTLIL::ObjRange< T >::refcount_p

Definition at line 405 of file rtlil.h.


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