LibreOffice Module codemaker (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
codemaker::GeneratedTypeSet Class Reference

A simple class to track which types have already been processed by a code maker. More...

#include <generatedtypeset.hxx>

Public Member Functions

 GeneratedTypeSet ()
 
void add (OString const &type)
 Add a type to the set of generated types. More...
 
bool contains (OString const &type) const
 Checks whether a given type has already been generated. More...
 

Private Member Functions

 GeneratedTypeSet (GeneratedTypeSet const &)=delete
 
GeneratedTypeSetoperator= (GeneratedTypeSet const &)=delete
 

Private Attributes

std::unordered_set< OString > m_set
 

Detailed Description

A simple class to track which types have already been processed by a code maker.

This class is not multi-thread–safe.

Definition at line 37 of file generatedtypeset.hxx.

Constructor & Destructor Documentation

◆ GeneratedTypeSet() [1/2]

codemaker::GeneratedTypeSet::GeneratedTypeSet ( )
inline

Definition at line 40 of file generatedtypeset.hxx.

◆ GeneratedTypeSet() [2/2]

codemaker::GeneratedTypeSet::GeneratedTypeSet ( GeneratedTypeSet const &  )
privatedelete

Member Function Documentation

◆ add()

void codemaker::GeneratedTypeSet::add ( OString const &  type)
inline

Add a type to the set of generated types.

If the type was already present, nothing happens.

Parameters
typea UNO type registry name

Definition at line 49 of file generatedtypeset.hxx.

References m_set, and type.

Referenced by produce().

◆ contains()

bool codemaker::GeneratedTypeSet::contains ( OString const &  type) const
inline

Checks whether a given type has already been generated.

Parameters
typea UNO type registry name
Returns
true iff the given type has already been generated

Definition at line 58 of file generatedtypeset.hxx.

References m_set, and type.

Referenced by produce().

◆ operator=()

GeneratedTypeSet & codemaker::GeneratedTypeSet::operator= ( GeneratedTypeSet const &  )
privatedelete

Member Data Documentation

◆ m_set

std::unordered_set<OString> codemaker::GeneratedTypeSet::m_set
private

Definition at line 64 of file generatedtypeset.hxx.

Referenced by add(), and contains().


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