Computer Assisted Medical Intervention Tool Kit  version 5.2
TargetList Class Reference

Manage a list of targets, can be created/modified using either an integer, a name, a list of integers given in a string (e.g. More...

#include <TargetList.h>

+ Collaboration diagram for TargetList:

Public Member Functions

void add (const std::string)
 add a load using a list (either an indexed list or a named list) More...
 
void add (const unsigned int)
 add a load using an integer More...
 
void clear ()
 clear the list More...
 
int getIndexedTarget (const unsigned int) const
 get an indexed target More...
 
std::string getNamedTarget (const unsigned int) const
 get a named target More...
 
unsigned int getNumberOfTargets () const
 get the nr of indevidual targets More...
 
bool indexedTargets () const
 return true only if the list of target are indexes More...
 
bool isIn (unsigned int) const
 return true only if this is the list of target are indexes and the given index is in the list or if the name of the entities is star! More...
 
 TargetList ()=default
 default constructor, the target list is empty More...
 
 TargetList (const std::string)
 create a target list using initial list of targets. More...
 
 TargetList (const TargetList &)
 create a target list using another one More...
 
std::string toAnsys () const
 return the ANSYS command to select the list of target (only work for indexed targets) More...
 
std::string toString () const
 return the list in a handy/compact format (compact interval, i.e. 4,5,6 becomes 4-6, ...) More...
 

Detailed Description

Manage a list of targets, can be created/modified using either an integer, a name, a list of integers given in a string (e.g.

"1,3,5,10-15"), or a list of names given in a string (e.g. "componentA,componentB").

Note
Mixed (indexed/named) are not supported (yet?)

Constructor & Destructor Documentation

◆ TargetList() [1/3]

TargetList::TargetList ( )
default

default constructor, the target list is empty

◆ TargetList() [2/3]

TargetList::TargetList ( const std::string  l)

create a target list using initial list of targets.

The list of targets can be either a indexed list (eg. "5-7,10,12-15") or a named list (eg. "componentA,componentB")

References add().

+ Here is the call graph for this function:

◆ TargetList() [3/3]

TargetList::TargetList ( const TargetList t)

create a target list using another one

References add(), and toString().

+ Here is the call graph for this function:

Member Function Documentation

◆ add() [1/2]

void TargetList::add ( const std::string  s)

add a load using a list (either an indexed list or a named list)

References add(), and isDigit.

+ Here is the call graph for this function:

◆ add() [2/2]

void TargetList::add ( const unsigned int  index)

add a load using an integer

Referenced by add(), Load::addTarget(), and TargetList().

+ Here is the caller graph for this function:

◆ clear()

void TargetList::clear ( )

clear the list

◆ getIndexedTarget()

int TargetList::getIndexedTarget ( const unsigned int  targetIndex) const

get an indexed target

Returns
-1 if index out of bound or if targets are not indexed (i.e targets are named)

Referenced by AtomIterator::AtomIterator(), and Load::getTarget().

+ Here is the caller graph for this function:

◆ getNamedTarget()

std::string TargetList::getNamedTarget ( const unsigned int  targetIndexInList) const

get a named target

Returns
"" if index out of bound or if targets are not named (i.e targets are indexed)

Referenced by AtomIterator::AtomIterator().

+ Here is the caller graph for this function:

◆ getNumberOfTargets()

unsigned int TargetList::getNumberOfTargets ( ) const

get the nr of indevidual targets

References indexedTargets().

Referenced by AtomIterator::AtomIterator(), and Load::numberOfTargets().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ indexedTargets()

bool TargetList::indexedTargets ( ) const

return true only if the list of target are indexes

Referenced by AtomIterator::AtomIterator(), getNumberOfTargets(), toAnsys(), and toString().

+ Here is the caller graph for this function:

◆ isIn()

bool TargetList::isIn ( unsigned int  id) const

return true only if this is the list of target are indexes and the given index is in the list or if the name of the entities is star!

◆ toAnsys()

std::string TargetList::toAnsys ( ) const

return the ANSYS command to select the list of target (only work for indexed targets)

References indexedTargets(), and toString().

Referenced by Load::ansysPrint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toString()

std::string TargetList::toString ( ) const

return the list in a handy/compact format (compact interval, i.e. 4,5,6 becomes 4-6, ...)

References indexedTargets().

Referenced by TargetList(), toAnsys(), and Load::xmlPrint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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