MOAB: Mesh Oriented datABase  (version 5.4.1)
smoab::detail::UsageTable Class Reference

#include <UsageTable.h>

Public Member Functions

void incrementUsage (const std::vector< smoab::EntityHandle > &entities, const std::vector< int > &usageId)
smoab::Range multipleUsage () const
smoab::Range singleUsage () const

Private Attributes

std::vector< smoab::EntityHandleMultipleUsageIds
std::set< internal::KeyTypeSingleUsageIds

Detailed Description

Definition at line 68 of file UsageTable.h.


Member Function Documentation

void smoab::detail::UsageTable::incrementUsage ( const std::vector< smoab::EntityHandle > &  entities,
const std::vector< int > &  usageId 
)

Definition at line 82 of file UsageTable.h.

References MultipleUsageIds, SingleUsageIds, and usage.

Referenced by smoab::ExtractShell::findSkins().

    {
        typedef std::vector< smoab::EntityHandle >::const_iterator iterator;
        typedef std::vector< int >::const_iterator uiterator;

        uiterator usage = usageId.begin();
        for( iterator i = entities.begin(); i != entities.end(); ++i, ++usage )
        {
            internal::KeyType key( *i, *usage );
            if( this->SingleUsageIds.find( key ) != this->SingleUsageIds.end() )
            {
                this->SingleUsageIds.erase( key );
                this->MultipleUsageIds.push_back( *i );
            }
            else
            {
                this->SingleUsageIds.insert( key );
            }
        }
    }

Definition at line 105 of file UsageTable.h.

References MultipleUsageIds.

Referenced by smoab::ExtractShell::findSkins().

    {
        smoab::Range multiples;
        std::copy( this->MultipleUsageIds.rbegin(), this->MultipleUsageIds.rend(), moab::range_inserter( multiples ) );
        return multiples;
    }

Definition at line 113 of file UsageTable.h.

References SingleUsageIds.

Referenced by smoab::ExtractShell::findSkins().

    {
        smoab::Range single;
        std::copy( this->SingleUsageIds.rbegin(), this->SingleUsageIds.rend(), internal::key_inserter( single ) );
        return single;
    }

Member Data Documentation

Definition at line 77 of file UsageTable.h.

Referenced by incrementUsage(), and multipleUsage().

Definition at line 78 of file UsageTable.h.

Referenced by incrementUsage(), and singleUsage().

List of all members.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines