InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
UIDList Class Reference

#include <UIDList.h>

Inheritance diagram for UIDList:
PersistUIDList

Public Types

typedef object_type data_type
 
typedef UIDListInternal::value_type value_type
 
typedef UIDListInternal::size_type size_type
 
typedef
UIDListInternal::const_reference 
const_reference
 
typedef UIDListInternal::reference reference
 
typedef
UIDListInternal::difference_type 
difference_type
 
typedef UIDListInternal::pointer pointer
 
typedef
UIDListInternal::const_pointer 
const_pointer
 
typedef index_based_iterator
< UIDList, UIDList::value_type > 
iterator
 
typedef index_based_iterator
< UIDList, UIDList::value_type
const > 
const_iterator
 
typedef std::reverse_iterator
< iterator
reverse_iterator
 
typedef std::reverse_iterator
< const_iterator
const_reverse_iterator
 

Public Member Functions

 UIDList ()
 
 UIDList (IDataBase *db)
 
 UIDList (const UIDList &copy)
 
 UIDList (UIDList &&other) noexcept
 
 UIDList (IDataBase *db, const UID singleEntry)
 
 UIDList (const IPMUnknown *object)
 
 UIDList (const UIDRef &ref)
 
 ~UIDList ()
 
UIDListoperator= (const UIDList &other)
 
UIDListoperator= (UIDList &&other) noexcept
 
bool16 operator== (const UIDList &other) const
 
bool16 operator!= (const UIDList &other) const
 
const_iterator begin () const
 
iterator begin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rbegin ()
 
const_iterator end () const
 
iterator end ()
 
const_reverse_iterator rend () const
 
reverse_iterator rend ()
 
UID operator[] (int32 i) const
 
UIDAt (int32 i)
 
UID At (int32 i) const
 
void SetChunkSize (int32 chunk)
 
bool16 Preallocate (int32 newlen)
 
void Clear ()
 
void Insert (const UID t)
 
void Insert (const UIDList &list, int32 before)
 
void Insert (const UID t, int32 before)
 
void Append (const UID t)
 
void Append (const UID t, int32 after)
 
void Append (const UIDList &list)
 
void Remove (int32 at)
 
iterator erase (iterator i)
 
iterator erase (iterator first, iterator last)
 
void push_back (const_reference value)
 
size_type size () const
 
void Replace (int32 at, const UID t)
 
int32 Location (UID t) const
 
bool16 Contains (UID t) const
 
bool16 DoesNotContain (UID t) const
 
void AddRef ()
 
void Release ()
 
int32 ChunkSize () const
 
int32 Length () const
 
bool16 IsEmpty () const
 
UID First () const
 
UIDFirst ()
 
UID Last () const
 
UIDLast ()
 
IDataBaseGetDataBase () const
 
UIDRef GetRef (int32 at) const
 
void ReadWriteXferObject (IPMStream *stream)
 
void ReadWriteXferReference (IPMStream *stream)
 

Friends

class SortedUIDList
 
class index_based_iterator< UIDList, UIDList::value_type >
 
class index_based_iterator< UIDList, UIDList::value_type const >
 
void swap (UIDList &a, UIDList &b) noexcept
 

Detailed Description

Contains a run-time only data-structure for maintaining a list of UIDs.

See Also
PersistUIDList

Constructor & Destructor Documentation

UIDList::UIDList ()

This ctor sets the fUIDList to NULL but prevents use of Append(), etc since fDB in the fUIDList is never set.

UIDList::UIDList (IDataBasedb)
explicit

Constructor

Parameters
dbIN database where contained UIDs exist
UIDList::UIDList (const UIDListcopy)

Copy constructor

Parameters
copyIN UIDList to copy
UIDList::UIDList (IDataBasedb,
const UID singleEntry 
)

Constructor

Parameters
dbIN database where contained UIDs exist
singleEntryIN element to add to the list
UIDList::UIDList (const IPMUnknownobject)

Constructor

Parameters
objectIN object (with associated database) to add to the list
UIDList::UIDList (const UIDRefref)

Constructor

Parameters
refIN UIDRef to add to the list
UIDList::~UIDList ()

The destructor

Member Function Documentation

void UIDList::AddRef ()
inline

Increment the reference count of the underlying list

void UIDList::Append (const UID t)

Append the specified element at the end of the list

Parameters
tIN element to append
void UIDList::Append (const UID t,
int32 after 
)

Append the specified element after the specified index

Parameters
tIN element to append
afterIN index to insert after
void UIDList::Append (const UIDListlist)

Append the specified elements at the end of the list

Parameters
listIN elements to append
UID& UIDList::At (int32 i)

return ith UID reference

Parameters
iIN index of item
Returns
ith UID reference
UID UIDList::At (int32 i) const
inline

return ith UID

Parameters
iIN index of item
Returns
ith UID
const_iterator UIDList::begin () const
inline

const iterator begin

Returns
first item in the UIDList
iterator UIDList::begin ()
inline

non-const iterator begin

Returns
first item in the UIDList
int32 UIDList::ChunkSize () const
inline
Returns
the current chunk size - deprecated
void UIDList::Clear ()

Erase all the elements

bool16 UIDList::Contains (UID t) const
inline

Return kTrue if the specified item is in the list

Parameters
tIN UID to look for
Returns
kTrue if t is in the list
bool16 UIDList::DoesNotContain (UID t) const
inline

Return kTrue if the specified item is not in the list

Parameters
tIN UID to look for
Returns
kTrue if t is not in the list
const_iterator UIDList::end () const
inline

const iterator end

Returns
last item in the UIDList
iterator UIDList::end ()
inline

non-const iterator end

Returns
last item in the UIDList
iterator UIDList::erase (iterator i)

Removes the element pointed by the iterator. All iterators are invalidated after the call except for the returned one.

Parameters
i[IN] - iterator that points to the element we want to remove. Caller must check that iterator is not equal to end().
Returns
iterator that points to the next element after the one removed (or end()).
iterator UIDList::erase (iterator first,
iterator last 
)

Removes the elements in the range [first, last). All iterators are invalidated after the call except for the returned one.

Parameters
first[IN] - iterator that points to the first element in the range that we want to remove.
last[IN] - iterator that points past the last element in the range that we want to remove (open range). Caller must ensure that the range is valid and part of the container.
Returns
iterator that points to the next element after the last removed.
UID UIDList::First () const
Returns
the first UID in the UIDList
UID& UIDList::First ()
Returns
a reference to the first UID in the UIDList
IDataBase* UIDList::GetDataBase () const
Returns
the database for this UIDList
UIDRef UIDList::GetRef (int32 at) const

Get a UIDRef for a specified element

Parameters
atIN index into the list
Returns
a UIDRef for the specified element
void UIDList::Insert (const UID t)

Insert the specified element at the beginning of the list

Parameters
tIN element to insert
void UIDList::Insert (const UIDListlist,
int32 before 
)

Insert the specified elements before the specified index

Parameters
listIN elements to insert
beforeIN index to insert before
void UIDList::Insert (const UID t,
int32 before 
)

Insert the specified element before the specified index

Parameters
tIN element to insert
beforeIN index to insert before
bool16 UIDList::IsEmpty (void ) const
inline
Returns
kTrue if the UIDList length is 0
UID UIDList::Last () const
Returns
the last UID in the UIDList
UID& UIDList::Last ()
Returns
a reference to the last UID in the UIDList
int32 UIDList::Length (void ) const
inline
Returns
the UIDList length
int32 UIDList::Location (UID t) const
inline

Return the index of the specified element

Parameters
tIN UID to look up
Returns
index in the UIDList, or -1 if t is not in the list
bool16 UIDList::operator!= (const UIDListother) const

Comparison operator

Parameters
otherIN UIDList to compare to
Returns
kTrue if the list is not the same
UIDList& UIDList::operator= (const UIDListother)

Assignment operator

Parameters
otherIN UIDList to replace this UIDList with
bool16 UIDList::operator== (const UIDListother) const

Comparison operator

Parameters
otherIN UIDList to compare to
Returns
kTrue if the list is the same
UID UIDList::operator[] (int32 i) const
inline

Subscript operator (non-standard)

Parameters
iIN index of item
Returns
ith UID
bool16 UIDList::Preallocate (int32 newlen)

set the minimum size of this UIDList (number of entries)

Parameters
newlenIN set minimum size for this list
Returns
kTrue
void UIDList::push_back (const_reference value)

Appends a copy of the specified element to the end of the container. All iterators and references are invalidated after the call when a reallocation occurs.

Parameters
value[IN] - value to be added to the end of the container.
const_reverse_iterator UIDList::rbegin () const
inline

const iterator rbegin

Returns
last item in the UIDList
reverse_iterator UIDList::rbegin ()
inline

non-const iterator rbegin

Returns
last item in the UIDList
void UIDList::ReadWriteXferObject (IPMStreamstream)

Reads or Writes to the stream. The format is first the length of the UIDList written as an int32 and then the UIDs. Use ReadWriteXferObject if the UIDs are owned by this implementation and use ReadWriteXferReference if they are references.

Parameters
streamIN stream to read/write to/from
void UIDList::ReadWriteXferReference (IPMStreamstream)

Reads or Writes to the stream. The format is first the length of the UIDList written as an int32 and then the UIDs. Use ReadWriteXferObject if the UIDs are owned by this implementation and use ReadWriteXferReference if they are references.

Parameters
streamIN stream to read/write to/from
void UIDList::Release ()

Decrement the reference count of the underlying list

void UIDList::Remove (int32 at)

Remove the specified element

Parameters
atIN element to remove
const_reverse_iterator UIDList::rend () const
inline

const iterator rend

Returns
first item in the UIDList
reverse_iterator UIDList::rend ()
inline

non-const iterator rend

Returns
first item in the UIDList
void UIDList::Replace (int32 at,
const UID t 
)

Replace the item at the specified index with the new UID

Parameters
atIN index to replace
tIN UID to put at the specified index
void UIDList::SetChunkSize (int32 chunk)

set the minimum size of this UIDList (number of entries)

Parameters
chunkIN set minimum size for this list
size_type UIDList::size () const
inline

Returns the actual number of UIDs in the container.