HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_TagExpression Class Reference

An expression to match tags (i.e. "* & ^fill") More...

#include <UT_TagManager.h>

+ Inheritance diagram for UT_TagExpression:

Public Types

using SubExpressionList = UT_Array< UT_IntArray >
 

Public Member Functions

 UT_TagExpression (UT_TagManager &manager)
 
 ~UT_TagExpression ()
 
bool compare (const UT_TagExpression &expr) const
 
bool operator== (const UT_TagExpression &expr) const
 
bool operator!= (const UT_TagExpression &expr) const
 
uint hash () const
 
void getExpressionString (UT_WorkBuffer &buffer) const
 
bool match (const UT_TagList &list) const
 
bool isTautology () const
 
void matchAllNames (UT_Array< const char * > &matching, UT_Array< const char * > &failing, bool &outmatch)
 
int64 getMemUsage () const
 
UT_TagExpressionaddTags (const UT_TagList &list) const
 
UT_TagExpressionrmTags (const UT_TagList &list) const
 
const UT_TagManagergetManager () const
 
UT_TagManagergetManager ()
 
- Public Member Functions inherited from UT_IntrusiveRefCounter< UT_TagExpression >
SYS_FORCE_INLINE UT_IntrusiveRefCounter ()
 Default constructor: Sets counter to 0. More...
 
SYS_FORCE_INLINE UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &)
 Copy constructor: Sets counter to 0. More...
 
UT_IntrusiveRefCounteroperator= (const UT_IntrusiveRefCounter &)
 Assignment operator: Does not modify counter. More...
 
SYS_FORCE_INLINE uint32 use_count () const
 Return current counter. More...
 

Friends

class UT_TagManager
 

Additional Inherited Members

- Protected Member Functions inherited from UT_IntrusiveRefCounter< UT_TagExpression >
SYS_FORCE_INLINE ~UT_IntrusiveRefCounter ()
 Destructor: Only derived classes can destruct this. More...
 

Detailed Description

An expression to match tags (i.e. "* & ^fill")

Definition at line 103 of file UT_TagManager.h.

Member Typedef Documentation

Constructor & Destructor Documentation

UT_TagExpression::UT_TagExpression ( UT_TagManager manager)
UT_TagExpression::~UT_TagExpression ( )

Member Function Documentation

UT_TagExpression* UT_TagExpression::addTags ( const UT_TagList list) const

Allocate a new expression with the appropriate edits (expr) -> A|(expr). However, we can also simplify some components of expression. For example, (A|-A) -> * (Complementary Law)

bool UT_TagExpression::compare ( const UT_TagExpression expr) const
void UT_TagExpression::getExpressionString ( UT_WorkBuffer buffer) const
const UT_TagManager& UT_TagExpression::getManager ( ) const
inline

Get the tag manager

Definition at line 132 of file UT_TagManager.h.

UT_TagManager& UT_TagExpression::getManager ( )
inline

Get the tag manager

Definition at line 133 of file UT_TagManager.h.

int64 UT_TagExpression::getMemUsage ( ) const
inline

Definition at line 157 of file UT_TagManager.h.

uint UT_TagExpression::hash ( ) const
bool UT_TagExpression::isTautology ( ) const
bool UT_TagExpression::match ( const UT_TagList list) const
void UT_TagExpression::matchAllNames ( UT_Array< const char * > &  matching,
UT_Array< const char * > &  failing,
bool &  outmatch 
)

Determine whether any known names match. The matching names will be returned in 'matching' and names that don't match are put in 'failing'. 'outmatch' will be set to true when unknown names will produce a match.

bool UT_TagExpression::operator!= ( const UT_TagExpression expr) const
inline

Definition at line 139 of file UT_TagManager.h.

bool UT_TagExpression::operator== ( const UT_TagExpression expr) const
inline

Definition at line 137 of file UT_TagManager.h.

UT_TagExpression* UT_TagExpression::rmTags ( const UT_TagList list) const

(expr) -> -A & (expr). Since | has a greater precedence, we need to expand using distributive property. Some components of the expression can be simplified (i.e. -A & A -> -*).

Friends And Related Function Documentation

friend class UT_TagManager
friend

Definition at line 194 of file UT_TagManager.h.


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