VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtRwrContactInfoList Class Reference

Detailed Description

This class manages a collection of DtRwRwrContactInfo elements, representing radar contacts detected by a Radar Warning Receiver. It provides methods for adding, removing, and finding contact information, as well as notification mechanisms for tracking changes to the list.

Use the DtRwList::add() and remove() methods to add and remove elements. The list can be iterated through using DtList iteration methods. The list will delete all of its contents when destroyed, so use caution if holding pointers to any of the list elements.

If you need to monitor the change state of a list, use a DtRwrContactInfoListChangeMonitor.

#include <rwrContactInfoList.h>

Inheritance diagram for makVre::DtRwrContactInfoList:
[legend]

Public Member Functions

 DtRwrContactInfoList ()
 
 DtRwrContactInfoList (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtRwrContactInfoList (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL)
 
virtual ~DtRwrContactInfoList () override
 
 DtRwrContactInfoList (const DtString &name, const DtRwrContactInfoList &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtRwrContactInfoList (const DtSymbolString &name, const DtRwrContactInfoList &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
DtRwrContactInfoListoperator= (const DtRwrContactInfoList &orig)
 
virtual DtRwrContactInfoListclone (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL)
 
virtual DtRwrContactInfoListclone (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL)
 
virtual void clear ()
 
virtual void removeAndDelete (DtRwRwrContactInfo *contactInfo)
 
virtual DtRwRwrContactInfocreateRwrContactInfo ()
 
virtual void addModifiedCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usr)
 
virtual void removeModifiedCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usr)
 
virtual void listModified ()
 
bool operator== (const DtRwrContactInfoList &other) const
 
virtual const char * xmlType () const override
 

Static Public Member Functions

static const char * theXmlType ()
 

Protected Member Functions

void copyList (const DtRwrContactInfoList &orig)
 
void emptyList ()
 
virtual DtlObjPtr getData (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings) override
 
virtual const char * readerWriterType () const override
 

Protected Attributes

DtNoArgumentCallbackList myModifiedCallbackList
 

Constructor & Destructor Documentation

◆ DtRwrContactInfoList() [1/5]

makVre::DtRwrContactInfoList::DtRwrContactInfoList ( )

Default constructor.

Creates a new RWR contact information list with default values.

Referenced by clone(), clone(), copyList(), DtRwrContactInfoList(), DtRwrContactInfoList(), operator=(), and operator==().

◆ DtRwrContactInfoList() [2/5]

makVre::DtRwrContactInfoList::DtRwrContactInfoList ( const DtString & name,
DtReaderWriterRegistry * parentRegistry = NULL )

Constructor with name.

Parameters
nameThe name of this list
parentRegistryParent registry for reader/writer functionality (optional)

Creates a new RWR contact information list with the specified name.

◆ DtRwrContactInfoList() [3/5]

makVre::DtRwrContactInfoList::DtRwrContactInfoList ( const DtSymbolString & name,
DtReaderWriterRegistry * parentRegistry = NULL )

Constructor with name as symbol string.

Parameters
nameThe name of this list as a symbol string
parentRegistryParent registry for reader/writer functionality (optional)

Creates a new RWR contact information list with the specified name.

◆ ~DtRwrContactInfoList()

virtual makVre::DtRwrContactInfoList::~DtRwrContactInfoList ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the list, including deleting all contact information elements.

◆ DtRwrContactInfoList() [4/5]

makVre::DtRwrContactInfoList::DtRwrContactInfoList ( const DtString & name,
const DtRwrContactInfoList & orig,
DtReaderWriterRegistry * parentRegistry = NULL )

Copy constructor with name.

Parameters
nameThe name of the new list
origThe source list to copy from
parentRegistryParent registry for reader/writer functionality (optional)

Creates a new RWR contact information list as a deep copy of the provided original, cloning all list items onto the new list.

References DtRwrContactInfoList().

◆ DtRwrContactInfoList() [5/5]

makVre::DtRwrContactInfoList::DtRwrContactInfoList ( const DtSymbolString & name,
const DtRwrContactInfoList & orig,
DtReaderWriterRegistry * parentRegistry = NULL )

Copy constructor with name as symbol string.

Parameters
nameThe name of the new list as a symbol string
origThe source list to copy from
parentRegistryParent registry for reader/writer functionality (optional)

Creates a new RWR contact information list as a deep copy of the provided original, cloning all list items onto the new list.

References DtRwrContactInfoList().

Member Function Documentation

◆ operator=()

DtRwrContactInfoList & makVre::DtRwrContactInfoList::operator= ( const DtRwrContactInfoList & orig)

Assignment operator.

Parameters
origThe source list to copy from
Returns
Reference to this list after assignment

Assigns the contents of the provided list to this one. This is a deep copy; all items on the target list are deleted, and new items are cloned onto the list.

References DtRwrContactInfoList().

◆ clone() [1/2]

virtual DtRwrContactInfoList * makVre::DtRwrContactInfoList::clone ( const DtString & name,
DtReaderWriterRegistry * parentRegistry = NULL )
virtual

Creates a complete clone of the list and all items.

Parameters
nameThe name for the cloned list
parentRegistryParent registry for reader/writer functionality (optional)
Returns
Pointer to a new list that is a clone of this one

Creates a complete clone of this list and all items on it.

References DtRwrContactInfoList().

◆ clone() [2/2]

virtual DtRwrContactInfoList * makVre::DtRwrContactInfoList::clone ( const DtSymbolString & name,
DtReaderWriterRegistry * parentRegistry = NULL )
virtual

Creates a complete clone of the list and all items.

Parameters
nameThe name for the cloned list as a symbol string
parentRegistryParent registry for reader/writer functionality (optional)
Returns
Pointer to a new list that is a clone of this one

Creates a complete clone of this list and all items on it.

References DtRwrContactInfoList().

◆ clear()

virtual void makVre::DtRwrContactInfoList::clear ( )
virtual

Clears the list.

Removes and deletes all contact information elements from the list. This method calls the non-virtual emptyList() function.

◆ removeAndDelete()

virtual void makVre::DtRwrContactInfoList::removeAndDelete ( DtRwRwrContactInfo * contactInfo)
virtual

Removes and deletes a contact information element.

Parameters
contactInfoPointer to the contact information to remove and delete

If the specified contact info is on the list, removes it from the list and deletes the contact info object.

◆ createRwrContactInfo()

virtual DtRwRwrContactInfo * makVre::DtRwrContactInfoList::createRwrContactInfo ( )
virtual

Commented-out method for finding contact info by contact ID.

Would find the first contact info in the list with the specified contact, and return a pointer to it, or NULL if not found.

Commented-out method for getting all contact IDs

Would return a set of all the contact IDs in the list.

Factory method to create new RWR contact information elements

Returns
Pointer to a newly created RWR contact information element

Creates a new DtRwRwrContactInfo or derivative object. This base class implementation creates the base DtRwRwrContactInfo type.

The getData() method uses this factory when adding new items to the list that are read from an input file. All items on the list should be of the type created by this method.

Note
If you need to add custom data to your RWR contact information, create a derived version of DtRwRwrContactInfo, override this class, and return your new RWR contact info from this method.

◆ addModifiedCallback()

virtual void makVre::DtRwrContactInfoList::addModifiedCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType fcn,
void * usr )
virtual

Adds a callback for list modification notifications.

Parameters
fcnThe callback function to add
usrUser data pointer to pass to the callback

Registers a callback that will be invoked when the list or any of its contents change.

Note
If you want list modified notification in an asynchronous way, consider using a DtRwrContactInfoListChangeMonitor instead.

◆ removeModifiedCallback()

virtual void makVre::DtRwrContactInfoList::removeModifiedCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType fcn,
void * usr )
virtual

Removes a callback for list modification notifications.

Parameters
fcnThe callback function to remove
usrUser data pointer that was registered with the callback

Unregisters a previously registered modification callback.

◆ listModified()

virtual void makVre::DtRwrContactInfoList::listModified ( )
virtual

Notifies that the list has been modified.

Call this method after making changes to the contents of the list. This will invoke all registered modification callbacks.

◆ operator==()

bool makVre::DtRwrContactInfoList::operator== ( const DtRwrContactInfoList & other) const

Equality operator.

Parameters
otherThe list to compare with
Returns
True if the lists are equal, false otherwise

Compares this list with another to determine if they are equal.

References DtRwrContactInfoList().

◆ theXmlType()

static const char * makVre::DtRwrContactInfoList::theXmlType ( )
static

Gets the XML type identifier.

Returns
String identifying this type in XML archives

Returns the type identifier used when archiving to an XML stream.

Referenced by xmlType().

◆ xmlType()

virtual const char * makVre::DtRwrContactInfoList::xmlType ( ) const
inlineoverridevirtual

Gets the XML type identifier for this instance.

Returns
String identifying this type in XML archives

Returns the type identifier used when archiving this instance to an XML stream.

References theXmlType().

◆ copyList()

void makVre::DtRwrContactInfoList::copyList ( const DtRwrContactInfoList & orig)
protected

Copies contents from another list.

Parameters
origThe source list to copy from

Helper method used by constructors to copy contents from another list. Performs a deep copy of all list elements.

References DtRwrContactInfoList().

◆ emptyList()

void makVre::DtRwrContactInfoList::emptyList ( )
protected

Removes and deletes all list elements.

Helper method used by the destructor and clear() to remove and delete all elements from the list.

◆ getData()

virtual DtlObjPtr makVre::DtRwrContactInfoList::getData ( DtlObjPtr args,
const DtReaderWriter::SearchPaths & searchPaths,
const DtVariableBindingsList & variableBindings )
overrideprotectedvirtual

Processes input data to populate the list.

Parameters
argsInput arguments to process
searchPathsSearch paths for resolving file references
variableBindingsVariable bindings for resolving script variables
Returns
Object pointer containing the processed data

Constructs contact information elements and reads their data from the input arguments.

◆ readerWriterType()

virtual const char * makVre::DtRwrContactInfoList::readerWriterType ( ) const
overrideprotectedvirtual

Gets the reader/writer type identifier.

Returns
String identifying this reader/writer type

Returns the type identifier for this reader/writer class. This can be used in place of dynamic-casting and is also used by the OPD editor to determine which type of control to create.

Member Data Documentation

◆ myModifiedCallbackList

DtNoArgumentCallbackList makVre::DtRwrContactInfoList::myModifiedCallbackList
protected

List of callbacks for modification notifications.

Stores the list of callback functions to be invoked when the list or its contents are modified.


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