Base Module  VST 3.6.5
SDK for developing VST Plug-in
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions
FComparablePtr< I > Class Template Reference

Extends IPtr to allow comparison in containers. More...

#include <fcontainer.h>

+ Inheritance diagram for FComparablePtr< I >:

Public Member Functions

 FComparablePtr (I *_ptr, bool addRef=true)
 
 FComparablePtr (const FComparablePtr &p)
 
 FComparablePtr ()
 
template<class T2 >
 FComparablePtr (const T2 &t2)
 
bool operator== (const FComparablePtr< I > &other) const
 
bool operator!= (const FComparablePtr< I > &other) const
 

Detailed Description

template<class I>
class Steinberg::FComparablePtr< I >

Extends IPtr to allow comparison in containers.

When an implementation of FObject defines operators== and a lookup in a container should compare object data instead of addresses, FComparablePtr can be used instead of IPtr.

Example:

TArray <FComparablePtr <StringObject> > strings;
StringObject* test = new StringObject ("test");
strings.add (test);
test->release ();
StringObject tmp ("test");
StringObject* lookup = strings.lookup (&tmp);

Constructor & Destructor Documentation

FComparablePtr ( I *  _ptr,
bool  addRef = true 
)
inline
FComparablePtr ( const FComparablePtr< I > &  p)
inline
FComparablePtr ( )
inline
FComparablePtr ( const T2 &  t2)
inline

Member Function Documentation

bool operator== ( const FComparablePtr< I > &  other) const
inline
bool operator!= ( const FComparablePtr< I > &  other) const
inline
Empty

Copyright ©2015 Steinberg Media Technologies GmbH. All Rights Reserved.