OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ossimConnectableObject Class Referenceabstract

#include <ossimConnectableObject.h>

Inheritance diagram for ossimConnectableObject:
ossimObject ossimListenerManager ossimPropertyInterface ossimReferenced ossimAtbController ossimConnectableContainer ossimMetadataFileWriter ossimResampler ossimSource ossimEnviHeaderFileWriter ossimERSFileWriter ossimFgdcFileWriter ossimGeomFileWriter ossimReadmeFileWriter ossimWorldFileWriter ossimElevSource ossimHistogramSource ossimImageSource ossimImageStatisticsSource ossimOutputSource ossimOverviewBuilderBase ossimPointCloudSource ossimVideoSource ossimViewController

Public Types

enum  ossimConnectableObjectDirectionType { CONNECTABLE_DIRECTION_NONE = 0, CONNECTABLE_DIRECTION_INPUT = 1, CONNECTABLE_DIRECTION_OUTPUT = 2 }
 
typedef std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
 

Public Member Functions

 ossimConnectableObject (ossimObject *owner=0)
 Base constructor of this object. More...
 
 ossimConnectableObject (ossimObject *owner, ossim_int32 inputListSize, ossim_int32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimConnectableObject ()
 
void setId (const ossimId &id)
 All connectable objects will have id's. More...
 
const ossimIdgetId () const
 Will allow us to get this object's id. More...
 
const ossimObjectgetOwner () const
 Fetches the current owner, most likely a container but not limited to one. More...
 
virtual void changeOwner (ossimObject *owner)
 Permits changing the object's owner. More...
 
virtual void setDescription (const ossimString &description)
 
virtual ossimString getDescription () const
 
virtual bool isConnected (ossimConnectableObjectDirectionType direction=CONNECTABLE_DIRECTION_INPUT) const
 will check the direction specified to see if all slots are full. More...
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findConnectableObject(const ossimId &id))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(RTTItypeid typeId, ossimConnectableObjectDirectionType directionType, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(const ossimString &obj, ossimConnectableObjectDirectionType directionType, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findInputObjectOfType(const ossimString &className))
 
virtual ossim_int32 findInputIndex (const ossimConnectableObject *object)
 Return a valid index of the input list if the passed in object is found else return -1. More...
 
virtual ossim_int32 findInputIndex (const ossimId &id)
 Return a valid index of the input list if the passed id is found else return -1. More...
 
virtual ossim_int32 findOutputIndex (const ossimConnectableObject *object)
 Return a valid index of the output list if the passed in object is found else return -1. More...
 
virtual ossim_int32 findOutputIndex (const ossimId &id)
 Return a valid index of the output list if the passed in object is found else return -1. More...
 
virtual ossim_int32 getMyInputIndexToConnectTo (ossimConnectableObject *object) const
 Should return the first available index to connect to. More...
 
virtual ossim_int32 getMyOutputIndexToConnectTo (ossimConnectableObject *object) const
 Should return the first available index to connect to. More...
 
virtual bool canConnectMyInputTo (ossim_int32 myInputIndex, const ossimConnectableObject *object) const =0
 required to be overriden by derived classes More...
 
virtual bool canConnectMyOutputTo (ossim_int32 myOutputIndex, const ossimConnectableObject *object) const
 default implementation is to allow anyone to connect to us. More...
 
virtual void disconnect (ossimConnectableObject *object=0)
 Will disconnect the object passed in. More...
 
virtual void disconnect (const ossimId &id)
 Will disconnect the object passed in. More...
 
virtual ossimRefPtr< ossimConnectableObjectdisconnectMyInput (ossim_int32 inputIndex, bool disconnectOutputFlag=true, bool createEventFlag=true)
 Will disconnect the object at the given input index and generate a connection event. More...
 
virtual void disconnectMyInput (ossimConnectableObject *input, bool disconnectOutputFlag=true, bool createEventFlag=true)
 Finds the index of the passed in input and calls disconnectMyInput(inputIndex, disconnectOutputFlag, createEventFlag);. More...
 
virtual void disconnectMyInputs (ConnectableObjectList &inputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
 
virtual ossimRefPtr< ossimConnectableObjectdisconnectMyOutput (ossim_int32 outputIndex, bool disconnectInputFlag=true, bool createEventFlag=true)
 Will disconnect the object at the given output index and generate a connection event. More...
 
virtual void disconnectMyOutput (ossimConnectableObject *output, bool disconnectInputFlag=true, bool createEventFlag=true)
 Will disconnect the output object. More...
 
virtual void disconnectMyOutputs (ConnectableObjectList &outputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
 
virtual void disconnectAllInputs ()
 Will disconnect all of the input objects. More...
 
virtual void disconnectAllOutputs ()
 Will disconnect all of the output objects. More...
 
virtual ossim_int32 connectMyInputTo (ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
 Will try to connect this objects input to the passed in object. More...
 
virtual ossim_int32 connectMyInputTo (ossim_int32 inputIndex, ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
 Will connect the specified input to the passed in object. More...
 
virtual bool connectMyInputTo (ConnectableObjectList &inputList, bool makeOutputConnection=true, bool createEventFlag=true)
 
virtual ossim_int32 connectMyOutputTo (ossimConnectableObject *outputObject, bool makeInputConnection=true, bool createEventFlag=true)
 Will try to connect this objects output to the passed in object. More...
 
virtual bool connectMyOutputTo (ConnectableObjectList &outputList, bool makeInputConnection=true, bool createEventFlag=true)
 
virtual bool connectInputList (ConnectableObjectList &inputList)
 Will disconnect itself from all inputs and reset to the passed in input list. More...
 
virtual bool connectOutputList (ConnectableObjectList &outputList)
 Will disconnect itself from all outputs and reset to the passed in output list. More...
 
virtual ossim_uint32 getNumberOfInputs () const
 Returns the number of input objects. More...
 
virtual ossim_uint32 getNumberOfOutputs () const
 Return the number of output objects. More...
 
ossimConnectableObjectgetInput (ossim_uint32 index=0)
 returns the object at the specified index. More...
 
const ossimConnectableObjectgetInput (ossim_uint32 index=0) const
 returns the object at the specified index. More...
 
ossimConnectableObjectgetOutput (ossim_uint32 index=0)
 returns the object at the specified index. More...
 
const ossimConnectableObjectgetOutput (ossim_uint32 index=0) const
 returns the object at the specified index. More...
 
virtual void setNumberOfInputs (ossim_int32 numberOfInputs)
 Will set the number of inputs. More...
 
virtual bool getInputListIsFixedFlag () const
 
virtual bool getOutputListIsFixedFlag () const
 
virtual void setNumberOfOutputs (ossim_int32 numberOfInputs)
 Will set the number of outputs. More...
 
const ConnectableObjectListgetInputList () const
 
const ConnectableObjectListgetOutputList () const
 
ConnectableObjectListgetInputList ()
 
ConnectableObjectListgetOutputList ()
 
 OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const RTTItypeid &typeInfo, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const ossimString &className, bool recurse=true))
 
virtual void propagateEventToOutputs (ossimEvent &event)
 
virtual void propagateEventToInputs (ossimEvent &event)
 
virtual void setProperty (ossimRefPtr< ossimProperty > property)
 
virtual void setProperty (const ossimString &name, const ossimString &value)
 
virtual ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual ossim_uint32 saveStateOfAllInputs (ossimKeywordlist &kwl, bool saveThisStateFlag=true, ossim_uint32 objectIndex=1, const char *prefix=0) const
 Save the state of all inputs to a keyword list. More...
 
virtual bool fillContainer (ossimConnectableContainer &container)
 Inserts this object and all of its children and inputs into the container provided. More...
 
bool moveInputUp (const ossimId &id)
 Moves the input connection matching id up one in the connection list. More...
 
bool moveInputDown (const ossimId &id)
 Moves the input connection matching id down one in the connection list. More...
 
bool moveInputToTop (const ossimId &id)
 Moves the input connection matching id to the top of the connection list. More...
 
bool moveInputToBottom (const ossimId &id)
 Moves the input connection matching id to the bottom of the connection list. More...
 
virtual void accept (ossimVisitor &visitor)
 We will add a visitor interface for all connectable objects. More...
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimObjectdup () const
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual std::ostream & print (std::ostream &out) const
 Generic print method. More...
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 
- Public Member Functions inherited from ossimListenerManager
 ossimListenerManager ()
 
virtual ~ossimListenerManager ()
 
virtual void fireEvent (ossimEvent &event)
 
virtual bool addListener (ossimListener *listener)
 
virtual bool removeListener (ossimListener *listener)
 
virtual bool findListener (ossimListener *listener)
 
- Public Member Functions inherited from ossimPropertyInterface
 ossimPropertyInterface ()
 
virtual ~ossimPropertyInterface ()
 
virtual ossimString getPropertyValueAsString (const ossimString &name) const
 
void getPropertyList (std::vector< ossimRefPtr< ossimProperty > > &propertyList) const
 
void setProperties (std::vector< ossimRefPtr< ossimProperty > > &propertyList)
 

Protected Member Functions

ossimConnectableObjectfindObjectOfType (ConnectableObjectList *connectableList, ossimVisitor &visitor)
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 
- Protected Member Functions inherited from ossimListenerManager
 ossimListenerManager (const ossimListenerManager &rhs)
 

Protected Attributes

ossimId theId
 
ossimString theDescription
 
ossimObjecttheOwner
 
bool theInputListIsFixedFlag
 Indicates whether the theInputObjectList is fixed. More...
 
bool theOutputListIsFixedFlag
 Indicates whether the theOutputObjectList is fixed. More...
 
ConnectableObjectList theInputObjectList
 Holds a list of input objects. More...
 
ConnectableObjectList theOutputObjectList
 Holds a list of output objects. More...
 
- Protected Attributes inherited from ossimListenerManager
std::list< ossimListener * > theListenerList
 
bool theEnabledFlag
 
std::list< ossimListener * > theDelayedAdd
 
std::list< ossimListener * > theDelayedRemove
 
bool theFireEventFlag
 

Detailed Description

Definition at line 30 of file ossimConnectableObject.h.

Member Typedef Documentation

◆ ConnectableObjectList

Definition at line 35 of file ossimConnectableObject.h.

Member Enumeration Documentation

◆ ossimConnectableObjectDirectionType

Constructor & Destructor Documentation

◆ ossimConnectableObject() [1/2]

ossimConnectableObject::ossimConnectableObject ( ossimObject owner = 0)

Base constructor of this object.

Definition at line 31 of file ossimConnectableObject.cpp.

References ossimIdManager::generateId(), ossimIdManager::instance(), theId, and theOwner.

32 :ossimObject(),
36 {
38  theOwner = owner;
39 }
ossimId generateId()
bool theInputListIsFixedFlag
Indicates whether the theInputObjectList is fixed.
bool theOutputListIsFixedFlag
Indicates whether the theOutputObjectList is fixed.
static ossimIdManager * instance()

◆ ossimConnectableObject() [2/2]

ossimConnectableObject::ossimConnectableObject ( ossimObject owner,
ossim_int32  inputListSize,
ossim_int32  outputListSize,
bool  inputListIsFixedFlag = true,
bool  outputListIsFixedFlag = true 
)

Definition at line 41 of file ossimConnectableObject.cpp.

References ossimIdManager::generateId(), ossimIdManager::instance(), setNumberOfInputs(), setNumberOfOutputs(), theId, and theOwner.

46 :ossimObject(),
48 theInputListIsFixedFlag(inputListIsFixedFlag),
49 theOutputListIsFixedFlag(outputListIsFixedFlag)
50 {
52  theOwner = owner;
53 
54  setNumberOfInputs(inputListSize);
55  setNumberOfOutputs(outputListSize);
56 }
virtual void setNumberOfInputs(ossim_int32 numberOfInputs)
Will set the number of inputs.
ossimId generateId()
bool theInputListIsFixedFlag
Indicates whether the theInputObjectList is fixed.
bool theOutputListIsFixedFlag
Indicates whether the theOutputObjectList is fixed.
static ossimIdManager * instance()
virtual void setNumberOfOutputs(ossim_int32 numberOfInputs)
Will set the number of outputs.

◆ ~ossimConnectableObject()

ossimConnectableObject::~ossimConnectableObject ( )
virtual

Definition at line 58 of file ossimConnectableObject.cpp.

59 {
60 
61  // tell the immediate listeners that we are destructing.
62  // RP - Probably not a great change, but the multithread sequencer boms
63  // here due to one image handler with multiple connected thread image
64  // chains
65  //ossimObjectDestructingEvent event(this);
66 
67  // if(theOwner)
68  // {
69  // ossimListenerManager* manager = PTR_CAST(ossimListenerManager, theOwner);
70 
71  // if(manager)
72  // {
73  // // notify the owner that you are destructing
74  // //
75  // manager->fireEvent(event);
76  // }
77  // }
78 
79  // notify all other listeners that you are destructing
80  //
81  //fireEvent(event);
82 
83  }

Member Function Documentation

◆ accept()

void ossimConnectableObject::accept ( ossimVisitor visitor)
virtual

We will add a visitor interface for all connectable objects.

Reimplemented from ossimObject.

Reimplemented in ossimImageChain, ossimConnectableContainer, and ossimElevManager.

Definition at line 2237 of file ossimConnectableObject.cpp.

References CONNECTABLE_DIRECTION_OUTPUT, getNumberOfOutputs(), ossimVisitor::getVisitorType(), ossimVisitor::hasVisited(), isConnected(), ossimVisitor::setVisitorType(), ossimVisitor::stopTraversal(), theInputObjectList, theOutputObjectList, theOwner, ossimVisitor::turnOffVisitorType(), ossimVisitor::visit(), ossimVisitor::VISIT_INPUTS, and ossimVisitor::VISIT_OUTPUTS.

Referenced by ossimConnectableContainer::accept(), ossimImageChain::accept(), ossimNitf20Writer::addTags(), ossimHistogramMatchFilter::autoLoadInputHistogram(), ossimBitMaskWriter::connectMyInputTo(), disconnect(), ossimLandsatTopoCorrectionFilter::findLandsatHeader(), findObjectOfType(), ossimBandSelector::getBandSelectableImageHandler(), ossimBandSelector::getRgbBandList(), ossimSFIMFusion::initialize(), ossimKmlSuperOverlayWriter::propagateViewChange(), ossimGpkgWriter::reInitializeCombiners(), ossimGpkgWriter::reInitializeCutters(), ossimGpkgWriter::setView(), and ossimIvtGeomXformVisitor::visit().

2238 {
2239  if(!visitor.stopTraversal())
2240  {
2241  if(!visitor.hasVisited(this))
2242  {
2243  visitor.visit(this);
2244  }
2245 
2246  if(!visitor.stopTraversal())
2247  {
2248 
2250  {
2251  ConnectableObjectList::iterator current = theInputObjectList.begin();
2252  while(current != theInputObjectList.end())
2253  {
2254  if((*current).get()&&!visitor.hasVisited((*current).get())) (*current)->accept(visitor);
2255  ++current;
2256  }
2257  }
2258 
2260  {
2261  // go through the outputs
2262  ConnectableObjectList::iterator current = theOutputObjectList.begin();
2263  while(current != theOutputObjectList.end())
2264  {
2265  if((*current).get()&&!visitor.hasVisited((*current).get())) (*current)->accept(visitor);
2266  ++current;
2267  }
2269 
2271  {
2272  ossimVisitor::VisitorType currentType = visitor.getVisitorType();
2273  // lets make sure inputs and outputs are turned off for we are traversing all children and we should not have
2274  // to have that enabled
2275  //
2276  visitor.turnOffVisitorType(ossimVisitor::VISIT_INPUTS);// |ossimVisitor::VISIT_CHILDREN);
2277 
2278  //obj->accept(visitor);
2279  visitor.setVisitorType(currentType);
2280  // visitor.turnOffVisitorType(ossimVisitor::VISIT_INPUTS);
2281  // now go through outputs
2282  //
2283  ConnectableObjectList::iterator current = obj->theOutputObjectList.begin();
2284  while(current != obj->theOutputObjectList.end())
2285  {
2286  if((*current).get()&&!visitor.hasVisited((*current).get())) (*current)->accept(visitor);
2287  ++current;
2288  }
2289 
2290  visitor.setVisitorType(currentType);
2291 
2292  }
2293  }
2294  }
2295  }
2296 }
virtual void visit(ossimObject *obj)
void setVisitorType(int vType, bool on=true)
virtual ossim_uint32 getNumberOfOutputs() const
Return the number of output objects.
void turnOffVisitorType(int vType)
virtual bool isConnected(ossimConnectableObjectDirectionType direction=CONNECTABLE_DIRECTION_INPUT) const
will check the direction specified to see if all slots are full.
bool hasVisited(ossimObject *obj) const
ConnectableObjectList theInputObjectList
Holds a list of input objects.
VisitorType getVisitorType() const
ConnectableObjectList theOutputObjectList
Holds a list of output objects.
VisitorType
Enumeration type can be a mask and will traverse a graph of connectables based on the values...
Definition: ossimVisitor.h:27
bool stopTraversal() const

◆ canConnectMyInputTo()

virtual bool ossimConnectableObject::canConnectMyInputTo ( ossim_int32  myInputIndex,
const ossimConnectableObject object 
) const
pure virtual

◆ canConnectMyOutputTo()

bool ossimConnectableObject::canConnectMyOutputTo ( ossim_int32  myOutputIndex,
const ossimConnectableObject object 
) const
virtual

default implementation is to allow anyone to connect to us.

Reimplemented in ossimConnectableContainer, and ossimVideoSource.

Definition at line 2047 of file ossimConnectableObject.cpp.

References theOutputListIsFixedFlag, and theOutputObjectList.

Referenced by ossimBandSeparateHandler::canConnectMyOutputTo(), connectOutputList(), and getMyOutputIndexToConnectTo().

2049 {
2051  {
2052  return ((myOutputIndex >= 0) &&
2053  (myOutputIndex < (ossim_int32)theOutputObjectList.size()));
2054  }
2055 
2056  return ((myOutputIndex >= 0) &&
2057  (myOutputIndex <= (ossim_int32)theOutputObjectList.size()));
2058 }
ConnectableObjectList theOutputObjectList
Holds a list of output objects.
bool theOutputListIsFixedFlag
Indicates whether the theOutputObjectList is fixed.
int ossim_int32

◆ changeOwner()

void ossimConnectableObject::changeOwner ( ossimObject owner)
virtual

◆ connectInputList()

bool ossimConnectableObject::connectInputList ( ConnectableObjectList inputList)
virtual

Will disconnect itself from all inputs and reset to the passed in input list.

It will return true if all objects were successfully added.

Definition at line 1384 of file ossimConnectableObject.cpp.

References connectMyInputTo(), ossimListenerManager::fireEvent(), OSSIM_EVENT_CONNECTION_CONNECT_ID, OSSIM_EVENT_CONNECTION_DISCONNECT_ID, ossimConnectionEvent::OSSIM_INPUT_DIRECTION, theInputListIsFixedFlag, and theInputObjectList.

Referenced by ossimImageChain::add(), ossimImageChain::addLast(), ossimImageChain::insertLeft(), and ossimImageChain::replace().

1385 {
1386  bool result = true;
1387  ossim_uint32 i = 0;
1389  ConnectableObjectList newInputs;
1390  ConnectableObjectList::iterator currentInput = inputList.begin();
1391  ConnectableObjectList tempOld;
1392  if(theInputObjectList.size())
1393  {
1394  for(i = 0; i < theInputObjectList.size(); ++i)
1395  {
1396  if(oldInputs[i].valid())
1397  {
1398  tempOld.push_back(oldInputs[i].get());
1399  }
1400  theInputObjectList[i] = 0;
1401  }
1402  }
1403  if(theInputListIsFixedFlag && (theInputObjectList.size()==0))
1404  {
1405  return false;
1406  }
1407 
1409  {
1410  theInputObjectList.clear();
1411  }
1412  if(tempOld.size())
1413  {
1414  for(i = 0; i < tempOld.size(); ++ i)
1415  {
1416  tempOld[i]->disconnectMyOutput(this, false);
1417  }
1418  }
1419  // disconnectAllInputs();
1420 
1421  if(inputList.size() == 1)
1422  {
1423  return (connectMyInputTo(inputList[0].get())>=0);
1424  }
1425  i = 0;
1426  // now connect the new outputs
1427  //
1428  currentInput = inputList.begin();
1429  result = false;
1430 
1431  while(currentInput != inputList.end())
1432  {
1433  if((*currentInput).valid())
1434  {
1435  if(connectMyInputTo((*currentInput).get(), false) >= 0)
1436  {
1437  newInputs.push_back((*currentInput).get());
1438  result = true;
1439  }
1440  }
1441  ++currentInput;
1442  }
1443  ossimConnectionEvent event(this,
1445  newInputs,
1446  oldInputs,
1448 
1449  if(theInputObjectList.size())
1450  {
1451  fireEvent(event);
1452  }
1453 
1454  newInputs = theInputObjectList;
1455 
1456 
1457 
1458  event = ossimConnectionEvent(this,
1460  newInputs,
1461  oldInputs,
1463  fireEvent(event);
1464 
1465  return result;
1466 }
#define OSSIM_EVENT_CONNECTION_DISCONNECT_ID
Definition: ossimEventIds.h:21
virtual void fireEvent(ossimEvent &event)
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
#define OSSIM_EVENT_CONNECTION_CONNECT_ID
Definition: ossimEventIds.h:22
unsigned int ossim_uint32
virtual ossim_int32 connectMyInputTo(ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
Will try to connect this objects input to the passed in object.
ConnectableObjectList theInputObjectList
Holds a list of input objects.
bool theInputListIsFixedFlag
Indicates whether the theInputObjectList is fixed.

◆ connectMyInputTo() [1/3]

ossim_int32 ossimConnectableObject::connectMyInputTo ( ossimConnectableObject inputObject,
bool  makeOutputConnection = true,
bool  createEventFlag = true 
)
virtual

Will try to connect this objects input to the passed in object.

It will return a valid index >= 0 if successful. Will use the getMyInputIndexToConnectTo method to implement the connection

Reimplemented in ossimBitMaskWriter.

Definition at line 1027 of file ossimConnectableObject.cpp.

References findInputIndex(), ossimListenerManager::fireEvent(), ossimObject::getClassName(), getMyInputIndexToConnectTo(), OSSIM_EVENT_CONNECTION_CONNECT_ID, ossimConnectionEvent::OSSIM_INPUT_DIRECTION, ossimNotify(), ossimNotifyLevel_WARN, theInputListIsFixedFlag, and theInputObjectList.

Referenced by ossimImageChain::addLast(), ossimEquationCombiner::applyBlurr(), ossimEquationCombiner::applyConvolution(), ossimEquationCombiner::applyShift(), ATP::AtpTileSource::AtpTileSource(), ossimImageHandler::buildHistogram(), ossimImageFileWriter::changeSequencer(), ossimChipProcTool::combineLayers(), ossimImageHistogramSource::computeNormalModeHistogram(), ossimImageStatisticsSource::computeStatisticsTemplate(), ossimConnectableContainer::connectAllObjects(), ossimImageChain::connectAllSources(), ossimImageSharpenFilter::connectInputEvent(), ossimImageGaussianFilter::connectInputEvent(), ossimHistogramMatchFilter::connectInputEvent(), ossimImageFileWriter::connectInputEvent(), connectInputList(), ossimBitMaskWriter::connectMyInputTo(), connectMyInputTo(), connectMyOutputTo(), ossimImageChainMtAdaptor::connectSharedHandlers(), ossimImageSharpenFilter::disconnectInputEvent(), ossimImageGaussianFilter::disconnectInputEvent(), ossimHistogramMatchFilter::disconnectInputEvent(), ossimDemTool::doOMG(), ossimPointCloudTool::execute(), ossimChipProcTool::execute(), ossimEquationCombiner::getImageData(), ossimKakaduJpipHandler::getTile(), ossimFftFilter::initialize(), ossimTrimFilter::initialize(), ossimBrightnessMatch::initialize(), ossimImageSharpenFilter::initialize(), ossimSFIMFusion::initialize(), ossimLocalCorrelationFusion::initialize(), ossimKMeansFilter::initialize(), ossimChipperUtil::initialize2CmvChain(), ossimBitMaskWriter::initializeFlipper(), ossimChipperUtil::initializePsmChain(), ossimEquationUtil::initInputSources(), ossimHillshadeTool::initProcessingChain(), ossimHlzTool::initProcessingChain(), ossimViewshedTool::initProcessingChain(), ossimImageChain::insertLeft(), ossimImageChain::insertRight(), main(), ossimTiledElevationDatabase::mapRegion(), ossimBandSeparateHandler::open(), ossimHistogramMatchFilter::ossimHistogramMatchFilter(), ossimHistogramWriter::ossimHistogramWriter(), ossimImageCombiner::ossimImageCombiner(), ossimImageGaussianFilter::ossimImageGaussianFilter(), ossimImageSourceFilter::ossimImageSourceFilter(), ossimImageSourceSequencer::ossimImageSourceSequencer(), ossimTopographicCorrectionFilter::ossimTopographicCorrectionFilter(), ossimVertexExtractor::ossimVertexExtractor(), ossimIgen::outputProduct(), ossimEquationCombiner::setOutputScalarType(), ATP::AtpAnnotatedImage::write(), ossimImageFileWriter::writeEnviHeaderFile(), ossimImageFileWriter::writeErsHeaderFile(), ossimImageFileWriter::writeExternalGeometryFile(), ossimImageFileWriter::writeFgdcFile(), ossimArcInfoGridWriter::writeFile(), ossimJpegWriter::writeFile(), ossimHistogramWriter::writeHistogram(), ossimImageFileWriter::writeHistogramFile(), writeRaster(), ossimImageFileWriter::writeReadmeFile(), ossimHlzTool::writeSlopeImage(), and ossimImageFileWriter::writeWorldFile().

1030 {
1031  if(!object) return false;
1032 
1033  ossim_int32 index = findInputIndex(object);
1034  if(index >= 0) return index;
1035 
1036  index = getMyInputIndexToConnectTo(object);
1037 
1038  if(index>-1)
1039  {
1040  if(index >= (ossim_int32)theInputObjectList.size())
1041  {
1042  if(theInputListIsFixedFlag) return -1;
1043 
1044  index = (ossim_int32)theInputObjectList.size();
1045  theInputObjectList.push_back(object);
1046  }
1047  else
1048  {
1049  if(!theInputObjectList[index])
1050  {
1051  theInputObjectList[index] = object;
1052  }
1053  else
1054  {
1055  ossimNotify(ossimNotifyLevel_WARN) << "Must issue a detach first!! trying to attach object " << object->getClassName()
1056  << "\n to input index " << index << " in " << getClassName() << "\n";
1057 
1058  return -1;
1059  }
1060  }
1061  if(createEventFlag)
1062  {
1063  ossimConnectionEvent event(this, // owner of message
1065  theInputObjectList[index].get(), // new object
1066  0,// old object
1068  // send event to any listener.
1069  //
1070  fireEvent(event);
1071  }
1072 
1073  if(makeOutputConnection&&object)
1074  {
1075  // make sure we tell the input not to connect
1076  // back to us or infinite loop
1077  //
1078  object->connectMyOutputTo(this, false, createEventFlag);
1079  }
1080  }
1081  else
1082  {
1083  return index;
1084  }
1085 
1086  return index;
1087 }
virtual ossim_int32 findInputIndex(const ossimConnectableObject *object)
Return a valid index of the input list if the passed in object is found else return -1...
virtual ossimString getClassName() const
Definition: ossimObject.cpp:64
virtual void fireEvent(ossimEvent &event)
#define OSSIM_EVENT_CONNECTION_CONNECT_ID
Definition: ossimEventIds.h:22
virtual ossim_int32 getMyInputIndexToConnectTo(ossimConnectableObject *object) const
Should return the first available index to connect to.
ConnectableObjectList theInputObjectList
Holds a list of input objects.
bool theInputListIsFixedFlag
Indicates whether the theInputObjectList is fixed.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
int ossim_int32

◆ connectMyInputTo() [2/3]

ossim_int32 ossimConnectableObject::connectMyInputTo ( ossim_int32  inputIndex,
ossimConnectableObject inputObject,
bool  makeOutputConnection = true,
bool  createEventFlag = true 
)
virtual

Will connect the specified input to the passed in object.

Definition at line 1089 of file ossimConnectableObject.cpp.

References canConnectMyInputTo(), connectMyOutputTo(), disconnectMyOutput(), findInputIndex(), ossimListenerManager::fireEvent(), OSSIM_EVENT_CONNECTION_CONNECT_ID, ossimConnectionEvent::OSSIM_INPUT_DIRECTION, theInputListIsFixedFlag, and theInputObjectList.

1093 {
1094  if(!inputObject)
1095  {
1096  if(inputIndex < (ossim_int32)theInputObjectList.size())
1097  {
1098  ossimConnectableObject* oldObject = theInputObjectList[inputIndex].get();
1100  {
1101  theInputObjectList[inputIndex] = 0;
1102  }
1103  else
1104  {
1105  theInputObjectList.erase(theInputObjectList.begin() + inputIndex);
1106  }
1107  if(createEventFlag)
1108  {
1109  ossimConnectionEvent event(this, // owner of message
1111  0, // new object
1112  oldObject,// old object
1114  // send event to any listener.
1115  //
1116  fireEvent(event);
1117  }
1118  return -1;
1119  }
1120  return -1;
1121  }
1122 
1123  ossim_int32 index = findInputIndex(inputObject);
1124 
1125  if((index >= 0)&&!inputObject) return index;
1126  if(!inputObject) return -1;
1127 
1128  if(canConnectMyInputTo(inputIndex, inputObject))
1129  {
1130  if(inputIndex>-1)
1131  {
1132  ossimConnectableObject* oldObject=0;
1133  if(inputIndex >= (ossim_int32)theInputObjectList.size())
1134  {
1135  if(theInputListIsFixedFlag) return -1;
1136 
1137  inputIndex = (ossim_int32)theInputObjectList.size();
1138  theInputObjectList.push_back(inputObject);
1139  }
1140  else
1141  {
1142  oldObject = theInputObjectList[inputIndex].get();
1143  theInputObjectList[inputIndex] = inputObject;
1144  if(oldObject)
1145  {
1146  oldObject->disconnectMyOutput(this, false);
1147  }
1148  }
1149 
1150  if(createEventFlag)
1151  {
1152  ossimConnectionEvent event(this, // owner of message
1154  theInputObjectList[inputIndex].get(), // new object
1155  oldObject,// old object
1157  // send event to any listener.
1158  //
1159  fireEvent(event);
1160  }
1161 
1162  if(makeOutputConnection&&inputObject)
1163  {
1164  // make sure we tell the input not to connect
1165  // back to us or infinite loop
1166  //
1167  inputObject->connectMyOutputTo(this, false, createEventFlag);
1168  }
1169  }
1170  else
1171  {
1172  return inputIndex;
1173  }
1174 
1175  return inputIndex;
1176  }
1177 
1178  return -1;
1179 }
virtual ossim_int32 findInputIndex(const ossimConnectableObject *object)
Return a valid index of the input list if the passed in object is found else return -1...
virtual void fireEvent(ossimEvent &event)
#define OSSIM_EVENT_CONNECTION_CONNECT_ID
Definition: ossimEventIds.h:22
virtual ossim_int32 connectMyOutputTo(ossimConnectableObject *outputObject, bool makeInputConnection=true, bool createEventFlag=true)
Will try to connect this objects output to the passed in object.
ConnectableObjectList theInputObjectList
Holds a list of input objects.
bool theInputListIsFixedFlag
Indicates whether the theInputObjectList is fixed.
virtual ossimRefPtr< ossimConnectableObject > disconnectMyOutput(ossim_int32 outputIndex, bool disconnectInputFlag=true, bool createEventFlag=true)
Will disconnect the object at the given output index and generate a connection event.
virtual bool canConnectMyInputTo(ossim_int32 myInputIndex, const ossimConnectableObject *object) const =0
required to be overriden by derived classes
int ossim_int32

◆ connectMyInputTo() [3/3]

bool ossimConnectableObject::connectMyInputTo ( ConnectableObjectList inputList,
bool  makeOutputConnection = true,
bool  createEventFlag = true 
)
virtual

Definition at line 1181 of file ossimConnectableObject.cpp.

References connectMyInputTo(), ossimListenerManager::fireEvent(), OSSIM_EVENT_CONNECTION_CONNECT_ID, ossimConnectionEvent::OSSIM_INPUT_DIRECTION, theInputListIsFixedFlag, and theInputObjectList.

1184 {
1185  bool result = true;
1186  ConnectableObjectList oldInputs;
1187  ConnectableObjectList newInputs;
1188 
1189  if(inputList.size() == 1)
1190  {
1191  if(inputList[0].valid())
1192  {
1193  return (connectMyInputTo(inputList[0].get(), makeOutputConnection, createEventFlag) >= 0);
1194  }
1195  else
1196  {
1198  {
1199  theInputObjectList[0] = 0;
1200  }
1201  else
1202  {
1203  theInputObjectList.clear();
1204  }
1205  if(createEventFlag)
1206  {
1207  ossimConnectionEvent event(this,
1209  0,
1210  theInputObjectList[0].get(),
1212  fireEvent(event);
1213  }
1214 
1215  return true;
1216  }
1217  }
1218  ossim_int32 i = 0;
1219  for(i = 0; i < (ossim_int32)inputList.size(); ++i)
1220  {
1221  if(inputList[i].valid())
1222  {
1223  if(connectMyInputTo(inputList[i].get(), makeOutputConnection, false)<0)
1224  {
1225  result = false;
1226  }
1227  else
1228  {
1229  newInputs.push_back(inputList[i]);
1230  }
1231  }
1232  else
1233  {
1234  newInputs.push_back(0);
1235  }
1236  }
1237  if(createEventFlag)
1238  {
1239  ossimConnectionEvent event(this,
1241  newInputs,
1242  oldInputs,
1244  fireEvent(event);
1245  }
1246  return result;
1247 }
virtual void fireEvent(ossimEvent &event)
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
#define OSSIM_EVENT_CONNECTION_CONNECT_ID
Definition: ossimEventIds.h:22
virtual ossim_int32 connectMyInputTo(ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
Will try to connect this objects input to the passed in object.
ConnectableObjectList theInputObjectList
Holds a list of input objects.
bool theInputListIsFixedFlag
Indicates whether the theInputObjectList is fixed.
int ossim_int32

◆ connectMyOutputTo() [1/2]

ossim_int32 ossimConnectableObject::connectMyOutputTo ( ossimConnectableObject outputObject,
bool  makeInputConnection = true,
bool  createEventFlag = true 
)
virtual

Will try to connect this objects output to the passed in object.

It will return a valid index >= 0 if successful. It will in turn call the passed in objects connect input command if makeInputConnection is set to true.

Will use the getMyOutputIndexToConnectTo to implement this method

Reimplemented in ossimImageChainMtAdaptor.

Definition at line 1249 of file ossimConnectableObject.cpp.

References connectMyInputTo(), findOutputIndex(), ossimListenerManager::fireEvent(), ossimObject::getClassName(), getMyOutputIndexToConnectTo(), OSSIM_EVENT_CONNECTION_CONNECT_ID, ossimConnectionEvent::OSSIM_OUTPUT_DIRECTION, ossimNotify(), ossimNotifyLevel_WARN, theOutputListIsFixedFlag, and theOutputObjectList.

Referenced by connectMyInputTo(), ossimImageChainMtAdaptor::connectMyOutputTo(), connectMyOutputTo(), connectOutputList(), ossimImageSourceFilter::ossimImageSourceFilter(), and ossimImageHandlerMtAdaptor::setAdaptee().

1252 {
1253  ossim_int32 index = findOutputIndex(output);
1254  if(index >= 0) return index;
1255 
1256  index = getMyOutputIndexToConnectTo(output);
1257 
1258  if(index > -1)
1259  {
1260  if((index >= (ossim_int32)theOutputObjectList.size())&&
1262  {
1263  index = (ossim_int32)theOutputObjectList.size();
1264  theOutputObjectList.push_back(output);
1265  }
1266  else
1267  {
1268  if(!theOutputObjectList[index])
1269  {
1270  theOutputObjectList[index] = output;
1271  }
1272  else
1273  {
1274  ossimNotify(ossimNotifyLevel_WARN) << "Must issue a disconnect first!! trying to connect object " << output->getClassName()
1275  << "\n to output index " << index << " in " << getClassName() << "\n";
1276 
1277  return -1;
1278  }
1279  }
1280  if(createEventFlag)
1281  {
1282  ossimConnectionEvent event(this, // owner of message
1284  theOutputObjectList[index].get(), // new object
1285  0,// old object
1287  // send event to any listener.
1288  //
1289  fireEvent(event);
1290  }
1291  if(makeInputConnection&&output)
1292  {
1293  // tell the output object not to connect back
1294  // to us since this is already done.
1295  //
1296  output->connectMyInputTo(this, false, createEventFlag);
1297  }
1298  }
1299  else
1300  {
1301  return index;
1302  }
1303 
1304  return index;
1305 }
virtual ossimString getClassName() const
Definition: ossimObject.cpp:64
virtual void fireEvent(ossimEvent &event)
virtual ossim_int32 findOutputIndex(const ossimConnectableObject *object)
Return a valid index of the output list if the passed in object is found else return -1...
virtual ossim_int32 getMyOutputIndexToConnectTo(ossimConnectableObject *object) const
Should return the first available index to connect to.
#define OSSIM_EVENT_CONNECTION_CONNECT_ID
Definition: ossimEventIds.h:22
ConnectableObjectList theOutputObjectList
Holds a list of output objects.
bool theOutputListIsFixedFlag
Indicates whether the theOutputObjectList is fixed.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
int ossim_int32

◆ connectMyOutputTo() [2/2]

bool ossimConnectableObject::connectMyOutputTo ( ConnectableObjectList outputList,
bool  makeInputConnection = true,
bool  createEventFlag = true 
)
virtual

Definition at line 1307 of file ossimConnectableObject.cpp.

References connectMyOutputTo(), disconnectAllOutputs(), ossimListenerManager::fireEvent(), OSSIM_EVENT_CONNECTION_CONNECT_ID, and ossimConnectionEvent::OSSIM_OUTPUT_DIRECTION.

1310 {
1311  bool result = true;
1312  ConnectableObjectList oldOutputs;
1313  ConnectableObjectList newOutputs;
1314 
1315  if(outputList.size() == 0)
1316  {
1318  return true;
1319  }
1320  if((outputList.size() == 1)&&outputList[0].valid())
1321  {
1322  if(outputList[0].valid())
1323  {
1324  return (connectMyOutputTo(outputList[0].get(), makeInputConnection, createEventFlag) >= 0);
1325  }
1326  else
1327  {
1329  }
1330  }
1331 
1332  ossim_int32 i = 0;
1333  for(i = 0; i < (ossim_int32)outputList.size(); ++i)
1334  {
1335  if((connectMyOutputTo(outputList[i].get(), makeInputConnection, false)<0)&&outputList[i].valid())
1336  {
1337  newOutputs.push_back(outputList[i].get());
1338  result = false;
1339  }
1340  }
1341  if(createEventFlag&&newOutputs.size())
1342  {
1343  ossimConnectionEvent event(this,
1345  newOutputs,
1346  oldOutputs,
1348  fireEvent(event);
1349  }
1350 
1351  return result;
1352 }
virtual void disconnectAllOutputs()
Will disconnect all of the output objects.
virtual void fireEvent(ossimEvent &event)
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
#define OSSIM_EVENT_CONNECTION_CONNECT_ID
Definition: ossimEventIds.h:22
virtual ossim_int32 connectMyOutputTo(ossimConnectableObject *outputObject, bool makeInputConnection=true, bool createEventFlag=true)
Will try to connect this objects output to the passed in object.
int ossim_int32

◆ connectOutputList()

bool ossimConnectableObject::connectOutputList ( ConnectableObjectList outputList)
virtual

Will disconnect itself from all outputs and reset to the passed in output list.

It will return true if all objects were successfully added.

Definition at line 1468 of file ossimConnectableObject.cpp.

References canConnectMyOutputTo(), connectMyOutputTo(), disconnectAllOutputs(), ossimListenerManager::fireEvent(), OSSIM_EVENT_CONNECTION_CONNECT_ID, ossimConnectionEvent::OSSIM_OUTPUT_DIRECTION, and theOutputObjectList.

Referenced by ossimImageChain::insertRight(), and ossimImageChain::replace().

1469 {
1470  bool result = true;
1471  ossim_int32 index = 0;
1473  ConnectableObjectList newOutputs;
1474  ConnectableObjectList::const_iterator currentOutput = outputList.begin();
1475 
1477 
1478  if(outputList.size() == 1)
1479  {
1480  return (connectMyOutputTo(outputList[0].get())>=0);
1481  }
1482  while(currentOutput != outputList.end())
1483  {
1484  if(!canConnectMyOutputTo(index, (*currentOutput).get()))
1485  {
1486  result = false;
1487  }
1488  ++currentOutput;
1489  }
1490 
1491  if(!result)
1492  {
1493  return false;
1494  }
1495 
1496  theOutputObjectList = outputList;
1497  newOutputs = theOutputObjectList;
1498 
1499  ossimConnectionEvent event(this,
1501  newOutputs,
1502  oldOutputs,
1504  fireEvent(event);
1505 
1506  return result;
1507 }
virtual void disconnectAllOutputs()
Will disconnect all of the output objects.
virtual void fireEvent(ossimEvent &event)
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
#define OSSIM_EVENT_CONNECTION_CONNECT_ID
Definition: ossimEventIds.h:22
virtual ossim_int32 connectMyOutputTo(ossimConnectableObject *outputObject, bool makeInputConnection=true, bool createEventFlag=true)
Will try to connect this objects output to the passed in object.
ConnectableObjectList theOutputObjectList
Holds a list of output objects.
virtual bool canConnectMyOutputTo(ossim_int32 myOutputIndex, const ossimConnectableObject *object) const
default implementation is to allow anyone to connect to us.
int ossim_int32

◆ disconnect() [1/2]

void ossimConnectableObject::disconnect ( ossimConnectableObject object = 0)
virtual

Will disconnect the object passed in.

Definition at line 721 of file ossimConnectableObject.cpp.

References disconnectAllInputs(), disconnectAllOutputs(), disconnectMyInput(), disconnectMyOutput(), findInputIndex(), and findOutputIndex().

Referenced by ossimEquationCombiner::applyBlurr(), ossimEquationCombiner::applyConvolution(), ossimEquationCombiner::applyShift(), ossimImageHandler::buildHistogram(), ossimChipperUtil::clear(), ossimImageHistogramSource::computeNormalModeHistogram(), ossimImageStatisticsSource::computeStatisticsTemplate(), ossimConnectableContainer::deleteAllChildren(), disconnect(), ossimKakaduJpipHandler::getTile(), ossimLocalCorrelationFusion::initialize(), ossimIgen::outputProduct(), ossimImageChain::prepareForRemoval(), ossimImageFileWriter::writeHistogramFile(), ossimEquationCombiner::~ossimEquationCombiner(), ossimFftFilter::~ossimFftFilter(), ossimIgen::~ossimIgen(), and ossimImageGaussianFilter::~ossimImageGaussianFilter().

722 {
723  if( (object==this) || (object==0) )
724  {
727  }
728  else
729  {
730  ossim_int32 index = findInputIndex(object);
731  if(index > -1)
732  {
733  disconnectMyInput(index);
734  }
735  index = findOutputIndex(object);
736  if(index > -1)
737  {
738  disconnectMyOutput(index, object);
739  }
740  }
741 }
virtual ossimRefPtr< ossimConnectableObject > disconnectMyInput(ossim_int32 inputIndex, bool disconnectOutputFlag=true, bool createEventFlag=true)
Will disconnect the object at the given input index and generate a connection event.
virtual ossim_int32 findInputIndex(const ossimConnectableObject *object)
Return a valid index of the input list if the passed in object is found else return -1...
virtual void disconnectAllOutputs()
Will disconnect all of the output objects.
virtual ossim_int32 findOutputIndex(const ossimConnectableObject *object)
Return a valid index of the output list if the passed in object is found else return -1...
virtual ossimRefPtr< ossimConnectableObject > disconnectMyOutput(ossim_int32 outputIndex, bool disconnectInputFlag=true, bool createEventFlag=true)
Will disconnect the object at the given output index and generate a connection event.
virtual void disconnectAllInputs()
Will disconnect all of the input objects.
int ossim_int32

◆ disconnect() [2/2]

void ossimConnectableObject::disconnect ( const ossimId id)
virtual

Will disconnect the object passed in.

Definition at line 743 of file ossimConnectableObject.cpp.

References accept(), disconnect(), ossimIdVisitor::getObject(), theId, ossimVisitor::VISIT_CHILDREN, ossimVisitor::VISIT_INPUTS, and ossimVisitor::VISIT_OUTPUTS.

744 {
745  if(id == theId)
746  {
747  disconnect(this);
748  }
749  else
750  {
751  ossimIdVisitor visitor( id,
755  accept( visitor );
756  disconnect( visitor.getObject() );
757  }
758 }
virtual void disconnect(ossimConnectableObject *object=0)
Will disconnect the object passed in.
virtual void accept(ossimVisitor &visitor)
We will add a visitor interface for all connectable objects.

◆ disconnectAllInputs()

void ossimConnectableObject::disconnectAllInputs ( )
virtual

Will disconnect all of the input objects.

Definition at line 930 of file ossimConnectableObject.cpp.

References disconnectMyInput(), ossimListenerManager::fireEvent(), OSSIM_EVENT_CONNECTION_DISCONNECT_ID, ossimConnectionEvent::OSSIM_INPUT_DIRECTION, theInputListIsFixedFlag, and theInputObjectList.

Referenced by ossimImageChain::addLast(), ossimBitMaskWriter::connectMyInputTo(), disconnect(), ossimImageSharpenFilter::initialize(), ossimSFIMFusion::initialize(), and ossimImageChain::insertLeft().

931 {
932  if(theInputObjectList.size() == 0) return;
933  if(theInputObjectList.size() == 1)
934  {
935  // ossimConnectableObject* obj = disconnectMyInput((ossim_int32)0, false);
937  // if(obj)
938  // {
939  // obj->disconnectMyOutput(this, false);
940  // }
941  return;
942  }
943  ConnectableObjectList::iterator current;
945  ConnectableObjectList newInputs;
946 
947 
948  current = theInputObjectList.begin();
949  while(current != theInputObjectList.end())
950  {
952  {
953  current = theInputObjectList.erase(current);
954  }
955  else
956  {
957  *current = 0;
958  ++current;
959  }
960  }
961  ossimConnectionEvent event(this,
963  newInputs,
964  oldInputs,
966  fireEvent(event);
967 
968  for(ossim_uint32 index = 0; index < oldInputs.size(); ++index)
969  {
970  if(oldInputs[index].valid())
971  {
972  oldInputs[index]->disconnectMyOutput(this, false);
973  }
974  }
975 }
virtual ossimRefPtr< ossimConnectableObject > disconnectMyInput(ossim_int32 inputIndex, bool disconnectOutputFlag=true, bool createEventFlag=true)
Will disconnect the object at the given input index and generate a connection event.
#define OSSIM_EVENT_CONNECTION_DISCONNECT_ID
Definition: ossimEventIds.h:21
virtual void fireEvent(ossimEvent &event)
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
unsigned int ossim_uint32
ConnectableObjectList theInputObjectList
Holds a list of input objects.
bool theInputListIsFixedFlag
Indicates whether the theInputObjectList is fixed.
int ossim_int32

◆ disconnectAllOutputs()

void ossimConnectableObject::disconnectAllOutputs ( )
virtual

Will disconnect all of the output objects.

Definition at line 977 of file ossimConnectableObject.cpp.

References disconnectMyOutput(), ossimListenerManager::fireEvent(), OSSIM_EVENT_CONNECTION_DISCONNECT_ID, ossimConnectionEvent::OSSIM_OUTPUT_DIRECTION, theOutputListIsFixedFlag, and theOutputObjectList.

Referenced by ossimImageChain::add(), ossimImageHandlerMtAdaptor::close(), connectMyOutputTo(), connectOutputList(), disconnect(), ossimImageChain::insertRight(), and ossimMultiThreadSequencer::setToStartOfSequence().

978 {
979  if(theOutputObjectList.size() == 0) return;
980  if(theOutputObjectList.size() == 1)
981  {
982  // ossimConnectableObject* obj = disconnectMyOutput((ossim_int32)0, false);
983  // RP - another probably bad change to keep the multithread adapter from
984  // crashing on the destructor
985  disconnectMyOutput((ossim_int32)0, false, false);
986  // if(obj)
987  // {
988  // obj->disconnectMyInput(this,
989  // false);
990  // }
991  return;
992  }
993  ConnectableObjectList::iterator current;
994 
996  ConnectableObjectList newOutputs;
997 
998  current = theOutputObjectList.begin();
999  while(current != theOutputObjectList.end())
1000  {
1002  {
1003  current = theOutputObjectList.erase(current);
1004  }
1005  else
1006  {
1007  *current = 0;
1008  ++current;
1009  }
1010  }
1011  ossimConnectionEvent event(this,
1013  newOutputs,
1014  oldOutputs,
1016  fireEvent(event);
1017 
1018  for(ossim_uint32 index = 0; index < oldOutputs.size(); ++index)
1019  {
1020  if(oldOutputs[index].valid())
1021  {
1022  oldOutputs[index]->disconnectMyInput(this, false);
1023  }
1024  }
1025 }
#define OSSIM_EVENT_CONNECTION_DISCONNECT_ID
Definition: ossimEventIds.h:21
virtual void fireEvent(ossimEvent &event)
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
unsigned int ossim_uint32
ConnectableObjectList theOutputObjectList
Holds a list of output objects.
virtual ossimRefPtr< ossimConnectableObject > disconnectMyOutput(ossim_int32 outputIndex, bool disconnectInputFlag=true, bool createEventFlag=true)
Will disconnect the object at the given output index and generate a connection event.
bool theOutputListIsFixedFlag
Indicates whether the theOutputObjectList is fixed.
int ossim_int32

◆ disconnectMyInput() [1/2]

ossimRefPtr< ossimConnectableObject > ossimConnectableObject::disconnectMyInput ( ossim_int32  inputIndex,
bool  disconnectOutputFlag = true,
bool  createEventFlag = true 
)
virtual

Will disconnect the object at the given input index and generate a connection event.

Definition at line 760 of file ossimConnectableObject.cpp.

References disconnectMyOutput(), ossimListenerManager::fireEvent(), ossimRefPtr< T >::get(), OSSIM_EVENT_CONNECTION_DISCONNECT_ID, ossimConnectionEvent::OSSIM_INPUT_DIRECTION, theInputListIsFixedFlag, theInputObjectList, and ossimRefPtr< T >::valid().

Referenced by ossimImageChain::connectAllSources(), ossimImageGaussianFilter::connectInputEvent(), ossimHistogramMatchFilter::connectInputEvent(), disconnect(), disconnectAllInputs(), ossimImageGaussianFilter::disconnectInputEvent(), ossimHistogramMatchFilter::disconnectInputEvent(), ossimImageFileWriter::disconnectInputEvent(), disconnectMyInput(), disconnectMyInputs(), disconnectMyOutput(), and ossimTrimFilter::initialize().

763 {
764  if(theInputObjectList.size() == 0)
765  {
766  return 0;
767  }
768 
769  ConnectableObjectList::iterator current;
771 
772  if( (inputIndex > -1)&&
773  (inputIndex < (ossim_int32)theInputObjectList.size()))
774  {
775  current = (theInputObjectList.begin()+inputIndex);
776  result = (*current).get();
777 
779  {
780  current = theInputObjectList.erase(current);
781  }
782  else
783  {
784  *current = 0;
785  }
786  if(createEventFlag&&result.valid())
787  {
788  ossimConnectionEvent event(this, // owner of message
790  0, // new object
791  result.get(),// old object
793 
794  // send event to all listeners.
795  //
796  fireEvent(event);
797  }
798 
799  if(disconnectOutputFlag&&result.valid())
800  {
801  result->disconnectMyOutput(this, false, createEventFlag);
802  }
803  }
804  return result;
805 }
bool valid() const
Definition: ossimRefPtr.h:75
#define OSSIM_EVENT_CONNECTION_DISCONNECT_ID
Definition: ossimEventIds.h:21
virtual void fireEvent(ossimEvent &event)
ConnectableObjectList theInputObjectList
Holds a list of input objects.
bool theInputListIsFixedFlag
Indicates whether the theInputObjectList is fixed.
virtual ossimRefPtr< ossimConnectableObject > disconnectMyOutput(ossim_int32 outputIndex, bool disconnectInputFlag=true, bool createEventFlag=true)
Will disconnect the object at the given output index and generate a connection event.
int ossim_int32

◆ disconnectMyInput() [2/2]

void ossimConnectableObject::disconnectMyInput ( ossimConnectableObject input,
bool  disconnectOutputFlag = true,
bool  createEventFlag = true 
)
virtual

Finds the index of the passed in input and calls disconnectMyInput(inputIndex, disconnectOutputFlag, createEventFlag);.

Definition at line 808 of file ossimConnectableObject.cpp.

References disconnectMyInput(), and findInputIndex().

811 {
813  disconnectOutputFlag,
814  createEventFlag);
815 }
virtual ossimRefPtr< ossimConnectableObject > disconnectMyInput(ossim_int32 inputIndex, bool disconnectOutputFlag=true, bool createEventFlag=true)
Will disconnect the object at the given input index and generate a connection event.
virtual ossim_int32 findInputIndex(const ossimConnectableObject *object)
Return a valid index of the input list if the passed in object is found else return -1...

◆ disconnectMyInputs()

void ossimConnectableObject::disconnectMyInputs ( ConnectableObjectList inputList,
bool  disconnectOutputFlag = true,
bool  createEventFlag = true 
)
virtual

Definition at line 817 of file ossimConnectableObject.cpp.

References disconnectMyInput(), findInputIndex(), ossimListenerManager::fireEvent(), OSSIM_EVENT_CONNECTION_DISCONNECT_ID, ossimConnectionEvent::OSSIM_INPUT_DIRECTION, and theInputObjectList.

Referenced by setNumberOfInputs().

820 {
821  if(theInputObjectList.size() == 0) return;
822  ConnectableObjectList oldInputs;
823  ConnectableObjectList newInputs;
824  ossim_int32 i = 0;
825 
826  for(i = 0; i < (ossim_int32)inputList.size(); ++i)
827  {
828  if(findInputIndex(inputList[i].get()) >= 0)
829  {
830  disconnectMyInput(inputList[i].get(), disconnectOutputFlag, false);
831  oldInputs.push_back(inputList[i]);
832  }
833  }
834  if(createEventFlag && oldInputs.size())
835  {
836  ossimConnectionEvent event(this,
838  newInputs,
839  oldInputs,
841  fireEvent(event);
842  }
843 }
virtual ossimRefPtr< ossimConnectableObject > disconnectMyInput(ossim_int32 inputIndex, bool disconnectOutputFlag=true, bool createEventFlag=true)
Will disconnect the object at the given input index and generate a connection event.
virtual ossim_int32 findInputIndex(const ossimConnectableObject *object)
Return a valid index of the input list if the passed in object is found else return -1...
#define OSSIM_EVENT_CONNECTION_DISCONNECT_ID
Definition: ossimEventIds.h:21
virtual void fireEvent(ossimEvent &event)
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
ConnectableObjectList theInputObjectList
Holds a list of input objects.
int ossim_int32

◆ disconnectMyOutput() [1/2]

ossimRefPtr< ossimConnectableObject > ossimConnectableObject::disconnectMyOutput ( ossim_int32  outputIndex,
bool  disconnectInputFlag = true,
bool  createEventFlag = true 
)
virtual

Will disconnect the object at the given output index and generate a connection event.

If there is no object at that index then no event is generated and NULL is returned. The disconnectOutputFlag says do you want this method to disconnect the output pointer to this object.

Definition at line 845 of file ossimConnectableObject.cpp.

References disconnectMyInput(), ossimListenerManager::fireEvent(), ossimRefPtr< T >::get(), OSSIM_EVENT_CONNECTION_DISCONNECT_ID, ossimConnectionEvent::OSSIM_OUTPUT_DIRECTION, theOutputListIsFixedFlag, theOutputObjectList, and ossimRefPtr< T >::valid().

Referenced by connectMyInputTo(), disconnect(), disconnectAllOutputs(), disconnectMyInput(), disconnectMyOutput(), and disconnectMyOutputs().

848 {
849  if(theOutputObjectList.size() == 0)
850  {
851  return 0;
852  }
853 
854  ConnectableObjectList::iterator current;
856  if( (outputIndex > -1)&&
857  (outputIndex < (ossim_int32)theOutputObjectList.size()))
858  {
859  current = (theOutputObjectList.begin()+outputIndex);
860  result = (*current).get();
862  {
863  current = theOutputObjectList.erase(current);
864  }
865  else
866  {
867  *current = 0;
868  }
869  if(createEvent)
870  {
871  ossimConnectionEvent event(this, // owner of message
873  0, // new object
874  result.get(),// old object
876 
877  // send event to all listeners.
878  //
879  fireEvent(event);
880  }
881 
882  if(disconnectInputFlag&&result.valid())
883  {
884  result->disconnectMyInput(this, false, createEvent);
885  }
886  }
887  return result;
888 }
virtual ossimRefPtr< ossimConnectableObject > disconnectMyInput(ossim_int32 inputIndex, bool disconnectOutputFlag=true, bool createEventFlag=true)
Will disconnect the object at the given input index and generate a connection event.
bool valid() const
Definition: ossimRefPtr.h:75
#define OSSIM_EVENT_CONNECTION_DISCONNECT_ID
Definition: ossimEventIds.h:21
virtual void fireEvent(ossimEvent &event)
ConnectableObjectList theOutputObjectList
Holds a list of output objects.
bool theOutputListIsFixedFlag
Indicates whether the theOutputObjectList is fixed.
int ossim_int32

◆ disconnectMyOutput() [2/2]

void ossimConnectableObject::disconnectMyOutput ( ossimConnectableObject output,
bool  disconnectInputFlag = true,
bool  createEventFlag = true 
)
virtual

Will disconnect the output object.

It will get the index of the object and call disconnectMyOutput(index, disconnectOutputFlag).

Definition at line 890 of file ossimConnectableObject.cpp.

References disconnectMyOutput(), and findOutputIndex().

893 {
894  disconnectMyOutput(findOutputIndex(output), disconnectInputFlag, createEventFlag);
895 }
virtual ossim_int32 findOutputIndex(const ossimConnectableObject *object)
Return a valid index of the output list if the passed in object is found else return -1...
virtual ossimRefPtr< ossimConnectableObject > disconnectMyOutput(ossim_int32 outputIndex, bool disconnectInputFlag=true, bool createEventFlag=true)
Will disconnect the object at the given output index and generate a connection event.

◆ disconnectMyOutputs()

void ossimConnectableObject::disconnectMyOutputs ( ConnectableObjectList outputList,
bool  disconnectOutputFlag = true,
bool  createEventFlag = true 
)
virtual

Definition at line 897 of file ossimConnectableObject.cpp.

References disconnectMyOutput(), findOutputIndex(), ossimListenerManager::fireEvent(), OSSIM_EVENT_CONNECTION_DISCONNECT_ID, ossimConnectionEvent::OSSIM_OUTPUT_DIRECTION, and theOutputObjectList.

Referenced by ossimImageHandlerMtAdaptor::setAdaptee(), and setNumberOfOutputs().

900 {
901  if(theOutputObjectList.size() == 0) return;
902 
903  if(theOutputObjectList.size() == 1)
904  {
906  return;
907  }
908  ConnectableObjectList oldOutputs;
909  ConnectableObjectList newOutputs;
910  ossim_int32 i = 0;
911  for(i = 0; i < (ossim_int32)outputList.size(); ++i)
912  {
913  if(findOutputIndex(outputList[i].get()) >= 0)
914  {
915  disconnectMyOutput(outputList[i].get(), disconnectInputFlag, false);
916  oldOutputs.push_back(outputList[i]);
917  }
918  }
919  if(createEventFlag && oldOutputs.size())
920  {
921  ossimConnectionEvent event(this,
923  newOutputs,
924  oldOutputs,
926  fireEvent(event);
927  }
928 }
#define OSSIM_EVENT_CONNECTION_DISCONNECT_ID
Definition: ossimEventIds.h:21
virtual void fireEvent(ossimEvent &event)
virtual ossim_int32 findOutputIndex(const ossimConnectableObject *object)
Return a valid index of the output list if the passed in object is found else return -1...
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
ConnectableObjectList theOutputObjectList
Holds a list of output objects.
virtual ossimRefPtr< ossimConnectableObject > disconnectMyOutput(ossim_int32 outputIndex, bool disconnectInputFlag=true, bool createEventFlag=true)
Will disconnect the object at the given output index and generate a connection event.
int ossim_int32

◆ fillContainer()

bool ossimConnectableObject::fillContainer ( ossimConnectableContainer container)
virtual

Inserts this object and all of its children and inputs into the container provided.

Returns
Returns TRUE if successful.

Reimplemented in ossimConnectableContainer.

Definition at line 2028 of file ossimConnectableObject.cpp.

References ossimConnectableContainer::addChild(), fillContainer(), getInput(), and getNumberOfInputs().

Referenced by fillContainer(), and ossimImageChainMtAdaptor::setOriginalChain().

2029 {
2030  // Insert inputs into the container:
2031  bool good_fill = true;
2032  ossim_uint32 num_inputs = getNumberOfInputs();
2033  for(ossim_uint32 i=0; (i<num_inputs) && good_fill; ++i)
2034  {
2035  ossimConnectableObject* input = getInput(i);
2036  if (input)
2037  good_fill = input->fillContainer(container);
2038  }
2039 
2040  // Insert this object and all of its children and inputs into the container provided:
2041  if (good_fill)
2042  good_fill = container.addChild(this);
2043 
2044  return good_fill;
2045 }
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
unsigned int ossim_uint32
virtual bool addChild(ossimConnectableObject *attachableObject)
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.
virtual bool fillContainer(ossimConnectableContainer &container)
Inserts this object and all of its children and inputs into the container provided.

◆ findInputIndex() [1/2]

ossim_int32 ossimConnectableObject::findInputIndex ( const ossimConnectableObject object)
virtual

Return a valid index of the input list if the passed in object is found else return -1.

Definition at line 603 of file ossimConnectableObject.cpp.

References theInputObjectList.

Referenced by ossimImageChain::connectInputEvent(), connectMyInputTo(), disconnect(), disconnectMyInput(), disconnectMyInputs(), moveInputDown(), and moveInputUp().

604 {
605  ossim_int32 i = 0;
606  for(i = 0; i < (ossim_int32)theInputObjectList.size(); ++i)
607  {
608  if(theInputObjectList[i].get() == object)
609  {
610  return i;
611  }
612  }
613 
614  return -1;
615 }
ConnectableObjectList theInputObjectList
Holds a list of input objects.
int ossim_int32

◆ findInputIndex() [2/2]

ossim_int32 ossimConnectableObject::findInputIndex ( const ossimId id)
virtual

Return a valid index of the input list if the passed id is found else return -1.

Definition at line 617 of file ossimConnectableObject.cpp.

References theInputObjectList.

618 {
619  ossim_int32 i = 0;
620  for(i = 0; i < (ossim_int32)theInputObjectList.size(); ++i)
621  {
622  if(theInputObjectList[i].valid() &&
623  (theInputObjectList[i]->getId() == id))
624  {
625  return i;
626  }
627  }
628 
629  return -1;
630 }
ConnectableObjectList theInputObjectList
Holds a list of input objects.
int ossim_int32

◆ findObjectOfType()

ossimConnectableObject * ossimConnectableObject::findObjectOfType ( ConnectableObjectList connectableList,
ossimVisitor visitor 
)
protected

Definition at line 181 of file ossimConnectableObject.cpp.

References accept(), CONNECTABLE_DIRECTION_INPUT, CONNECTABLE_DIRECTION_NONE, ossimCollectionVisitor::getObject(), theInputObjectList, theOutputObjectList, ossimVisitor::VISIT_CHILDREN, ossimVisitor::VISIT_INPUTS, ossimVisitor::VISIT_NONE, and ossimVisitor::VISIT_OUTPUTS.

185 {
186  ossimConnectableObject* result = 0;
187 
188  if(directionType != CONNECTABLE_DIRECTION_NONE)
189  {
190  ConnectableObjectList* connectableList = 0;
191 
193  {
194  connectableList = &theInputObjectList;
195  }
196  else // (directionType == CONNECTABLE_DIRECTION_OUTPUT)
197  {
198  connectableList = &theOutputObjectList;
199  }
200 
201  // see if it is in the immediate list
202  for(ossim_uint32 index = 0; index < connectableList->size(); ++index)
203  {
204  if( (*connectableList)[index].valid() )
205  {
206  if( (*connectableList)[index]->canCastTo( typeId ) )
207  {
208  result = (*connectableList)[index].get();
209  break;
210  }
211  }
212  }
213 
214  if ( !result )
215  {
217 
219  {
220  if ( recurse )
221  {
222  // Cast needed for compiler...
223  vType = (ossimVisitor::VisitorType)
225  }
226  else
227  {
229  }
230  }
231  else // (directionType == CONNECTABLE_DIRECTION_OUTPUT)
232  {
233  if ( recurse )
234  {
235  // Cast needed for compiler...
236  vType = (ossimVisitor::VisitorType)
238  }
239  else
240  {
242  }
243  }
244 
245  ossimTypeIdVisitor visitor( typeId,
246  true, // firstofTypeFlag
247  vType );
248 
249 
250  this->accept( visitor );
251  result = dynamic_cast<ossimConnectableObject*>( visitor.getObject(0) );
252  }
253 
254  } // Matches: if(directionType != CONNECTABLE_DIRECTION_NONE)
255 
256  return result;
257 
258 } // End: findObjectOfType( RTTItypeid ...
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
unsigned int ossim_uint32
ConnectableObjectList theInputObjectList
Holds a list of input objects.
ConnectableObjectList theOutputObjectList
Holds a list of output objects.
VisitorType
Enumeration type can be a mask and will traverse a graph of connectables based on the values...
Definition: ossimVisitor.h:27
virtual void accept(ossimVisitor &visitor)
We will add a visitor interface for all connectable objects.

◆ findOutputIndex() [1/2]

ossim_int32 ossimConnectableObject::findOutputIndex ( const ossimConnectableObject object)
virtual

Return a valid index of the output list if the passed in object is found else return -1.

Definition at line 632 of file ossimConnectableObject.cpp.

References theOutputObjectList.

Referenced by connectMyOutputTo(), disconnect(), disconnectMyOutput(), and disconnectMyOutputs().

633 {
634  ossim_int32 i = 0;
635  for(i = 0; i < (ossim_int32)theOutputObjectList.size(); ++i)
636  {
637  if(theOutputObjectList[i] == object)
638  {
639  return i;
640  }
641  }
642 
643  return -1;
644 }
ConnectableObjectList theOutputObjectList
Holds a list of output objects.
int ossim_int32

◆ findOutputIndex() [2/2]

ossim_int32 ossimConnectableObject::findOutputIndex ( const ossimId id)
virtual

Return a valid index of the output list if the passed in object is found else return -1.

Definition at line 646 of file ossimConnectableObject.cpp.

References theOutputObjectList.

647 {
648  ossim_int32 i = 0;
649  for(i = 0; i < (ossim_int32)theOutputObjectList.size(); ++i)
650  {
651  if(theOutputObjectList[i].valid() &&
652  (theOutputObjectList[i]->getId() == id))
653  {
654  return i;
655  }
656  }
657 
658  return -1;
659 }
ConnectableObjectList theOutputObjectList
Holds a list of output objects.
int ossim_int32

◆ getDescription()

ossimString ossimConnectableObject::getDescription ( ) const
virtual

Reimplemented from ossimObject.

Reimplemented in ossimWatermarkFilter, and ossimMaxMosaic.

Definition at line 95 of file ossimConnectableObject.cpp.

References theDescription.

96 {
97  return theDescription;
98 }

◆ getId()

const ossimId & ossimConnectableObject::getId ( ) const

◆ getInput() [1/2]

ossimConnectableObject * ossimConnectableObject::getInput ( ossim_uint32  index = 0)

returns the object at the specified index.

if the index is not valid then NULL is returned

Definition at line 1354 of file ossimConnectableObject.cpp.

References theInputObjectList.

Referenced by ossimElevationMosaic::allocate(), ossimImageMosaic::allocate(), ossimMaxMosaic::allocate(), ossimTopographicCorrectionFilter::allocate(), ossimMaskFilter::allocate(), ossimEquationCombiner::applyBlurr(), ossimEquationCombiner::applyConvolution(), ossimEquationCombiner::applyShift(), ossimImageFileWriter::changeSequencer(), ossimImageRenderer::checkIVT(), ossimImageHistogramSource::computeFastModeHistogram(), ossimImageHistogramSource::computeNormalModeHistogram(), ossimBandMergeSource::computeNumberOfInputBands(), ossimImageStatisticsSource::computeStatistics(), ossimImageStatisticsSource::computeStatisticsTemplate(), ossimImageSourceHistogramFilter::connectInputEvent(), ossimImageSharpenFilter::connectInputEvent(), ossimImageGaussianFilter::connectInputEvent(), ossimHistogramMatchFilter::connectInputEvent(), ossimHistogramWriter::connectInputEvent(), ossimImageRenderer::connectInputEvent(), ossimImageFileWriter::connectInputEvent(), ossimVideoSource::currentFrameTime(), ossimAtbController::disableImage(), ossimImageSharpenFilter::disconnectInputEvent(), ossimImageGaussianFilter::disconnectInputEvent(), ossimHistogramMatchFilter::disconnectInputEvent(), ossimHistogramWriter::disconnectInputEvent(), ossimImageSourceSequencer::disconnectInputEvent(), ossimImageFileWriter::disconnectInputEvent(), ossimVideoSource::duration(), ossimAtbController::enableImage(), ossimImageHistogramSource::execute(), fillContainer(), ossimLandsatTopoCorrectionFilter::findLandsatHeader(), ossimIgenGenerator::generateChainForMultiInputRecurse(), ossimIgenGenerator::generateInputKwl(), ossimImageHistogramSource::getBinInformation(), ossimOrthoImageMosaic::getBoundingRect(), ossimImageCombiner::getBoundingRect(), ossimTopographicCorrectionFilter::getBoundingRect(), ossimEsriShapeFileFilter::getBoundingRect(), ossimImageSource::getBoundingRect(), ossimImageChain::getBoundingRect(), ossimImageSource::getDecimationFactor(), ossimTopographicCorrectionFilter::getDecimationFactor(), ossimImageChain::getDecimationFactor(), ossimTopographicCorrectionFilter::getDecimationFactors(), ossimImageSource::getDecimationFactors(), ossimImageChain::getDecimationFactors(), ossimPointCloudSource::getFieldCode(), ossimImageSourceHistogramFilter::getHistogram(), ossimHistogramRemapper::getHistogram(), ossimEquationCombiner::getImageData(), ossimOrthoImageMosaic::getImageGeometry(), ossimVideoImageSource::getImageGeometry(), ossimImageChain::getImageGeometry(), ossimImageSource::getImageGeometry(), ossimBandMergeSource::getMaxPixelValue(), ossimImageCombiner::getMaxPixelValue(), ossimTopographicCorrectionFilter::getMaxPixelValue(), ossimImageSource::getMaxPixelValue(), ossimImageChain::getMaxPixelValue(), ossimEquationCombiner::getMaxPixelValue(), ossimPointCloudSource::getMaxPoint(), ossimBandMergeSource::getMinPixelValue(), ossimImageCombiner::getMinPixelValue(), ossimTopographicCorrectionFilter::getMinPixelValue(), ossimImageSource::getMinPixelValue(), ossimImageChain::getMinPixelValue(), ossimEquationCombiner::getMinPixelValue(), ossimPointCloudSource::getMinPoint(), ossimOrthoImageMosaic::getNextTile(), ossimImageCombiner::getNextTile(), ossimBandMergeSource::getNullPixelValue(), ossimImageCombiner::getNullPixelValue(), ossimTopographicCorrectionFilter::getNullPixelValue(), ossimImageSource::getNullPixelValue(), ossimImageChain::getNullPixelValue(), ossimEquationCombiner::getNullPixelValue(), ossimTopographicCorrectionFilter::getNumberOfDecimationLevels(), ossimImageSource::getNumberOfDecimationLevels(), ossimImageChain::getNumberOfDecimationLevels(), ossimImageChain::getNumberOfInputBands(), ossimMaskFilter::getNumberOfInputBands(), ossimTopographicCorrectionFilter::getNumberOfOutputBands(), ossimOrthoImageMosaic::getNumberOfOverlappingImages(), ossimImageCombiner::getOutputScalarType(), ossimTopographicCorrectionFilter::getOutputScalarType(), ossimImageSource::getOutputScalarType(), ossimImageChain::getOutputScalarType(), ossimEquationCombiner::getOutputScalarType(), ossimOrthoImageMosaic::getOverlappingImages(), ossimOrthoImageMosaic::getRelativeRect(), ossimBandMergeSource::getTile(), ossimSFIMFusion::getTile(), ossimImageSource::getTile(), ossimLocalCorrelationFusion::getTile(), ossimTopographicCorrectionFilter::getTile(), ossimBumpShadeTileSource::getTile(), ossimImageChain::getTile(), ossimMaskFilter::getTile(), ossimEquationCombiner::getTile(), ossimImageCombiner::getTileHeight(), ossimImageSource::getTileHeight(), ossimImageChain::getTileHeight(), ossimImageCombiner::getTileWidth(), ossimImageSource::getTileWidth(), ossimImageChain::getTileWidth(), ossimImageChain::getValidImageVertices(), ossimImageSource::getValidImageVertices(), ossimVideoSource::getVideoGeometry(), ossimFftFilter::initialize(), ossimTrimFilter::initialize(), ossimBrightnessMatch::initialize(), ossimFusionCombiner::initialize(), ossimFeatherMosaic::initialize(), ossimImageSharpenFilter::initialize(), ossimImageCombiner::initialize(), ossimSFIMFusion::initialize(), ossimImageSourceFilter::initialize(), ossimImageSourceSequencer::initialize(), ossimMetadataFileWriter::initialize(), ossimVideoImageSource::initialize(), ossimTwoColorView::initialize(), ossimMaskFilter::initialize(), ossimBumpShadeTileSource::initialize(), ossimImageSource::isIndexedData(), ossimAtbController::lockImage(), ossimVideoSource::nextFrame(), ossimImageCombiner::precomputeBounds(), propagateEventToInputs(), ossimTopographicCorrectionFilter::resizeArrays(), ossimVideoSource::rewind(), ossimImageSource::saveImageGeometry(), saveStateOfAllInputs(), ossimVideoSource::seek(), ossimPointCloudSource::setFieldCode(), ossimVideoImageSource::setFrameTime(), ossimImageSource::setImageGeometry(), ossimPdfWriter::setupInputChain(), ossimHistogramRemapper::setupTable(), ossimAtbController::unlockImage(), ossimVideoSource::videoFrameRate(), ossimIvtGeomXformVisitor::visit(), ossimJpegWriter::writeFile(), and ossimHistogramWriter::writeHistogram().

1355 {
1356  if(idx < theInputObjectList.size())
1357  {
1358  return theInputObjectList[idx].get();
1359  }
1360 
1361  return 0;
1362 }
ConnectableObjectList theInputObjectList
Holds a list of input objects.

◆ getInput() [2/2]

const ossimConnectableObject * ossimConnectableObject::getInput ( ossim_uint32  index = 0) const

returns the object at the specified index.

if the index is not valid then NULL is returned

Definition at line 1364 of file ossimConnectableObject.cpp.

References theInputObjectList.

1365 {
1366  if( idx < theInputObjectList.size())
1367  {
1368  return theInputObjectList[idx].get();
1369  }
1370 
1371  return 0;
1372 }
ConnectableObjectList theInputObjectList
Holds a list of input objects.

◆ getInputList() [1/2]

const ossimConnectableObject::ConnectableObjectList & ossimConnectableObject::getInputList ( ) const

◆ getInputList() [2/2]

ossimConnectableObject::ConnectableObjectList & ossimConnectableObject::getInputList ( )

Definition at line 2343 of file ossimConnectableObject.cpp.

References theInputObjectList.

2344 {
2345  return theInputObjectList;
2346 }
ConnectableObjectList theInputObjectList
Holds a list of input objects.

◆ getInputListIsFixedFlag()

bool ossimConnectableObject::getInputListIsFixedFlag ( ) const
virtual

Definition at line 2323 of file ossimConnectableObject.cpp.

References theInputListIsFixedFlag.

Referenced by ossimImageChain::add(), and ossimImageChain::addLast().

2324 {
2325  return theInputListIsFixedFlag;
2326 }
bool theInputListIsFixedFlag
Indicates whether the theInputObjectList is fixed.

◆ getMyInputIndexToConnectTo()

ossim_int32 ossimConnectableObject::getMyInputIndexToConnectTo ( ossimConnectableObject object) const
virtual

Should return the first available index to connect to.

The connectMyInputTo that just takes another ossimConnectableObject as input and not an index will call this method. By default this method will find the first open slot (not null) or append o the list if it's dynamic. If the list is dynamic it calls conConnectMyInputTo(index, object) on an index = to listSize.

Definition at line 661 of file ossimConnectableObject.cpp.

References canConnectMyInputTo(), theInputListIsFixedFlag, and theInputObjectList.

Referenced by connectMyInputTo().

662 {
663  ConnectableObjectList::const_iterator current;
664 
665  ossim_int32 index = 0;
666  current = theInputObjectList.begin();
667  while(current != theInputObjectList.end())
668  {
669  if(!(*current))
670  {
671  if(canConnectMyInputTo(index, object))
672  {
673  return index;
674  }
675  }
676  ++current;
677  ++index;
678  }
680  {
682  object))
683  {
684  return (ossim_int32)theInputObjectList.size();
685  }
686  }
687  return -1;
688 }
ConnectableObjectList theInputObjectList
Holds a list of input objects.
bool theInputListIsFixedFlag
Indicates whether the theInputObjectList is fixed.
virtual bool canConnectMyInputTo(ossim_int32 myInputIndex, const ossimConnectableObject *object) const =0
required to be overriden by derived classes
int ossim_int32

◆ getMyOutputIndexToConnectTo()

ossim_int32 ossimConnectableObject::getMyOutputIndexToConnectTo ( ossimConnectableObject object) const
virtual

Should return the first available index to connect to.

The connectMyOutputTo that just takes another ossimConnectableObject as input\ and not an index will call this method. By default this method will find the first open slot (not null) or append to the list if it's dynamic. If the list is dynamic it calls canConnectMyOutputTo(index, object) on an index = to listSize.

Definition at line 690 of file ossimConnectableObject.cpp.

References canConnectMyOutputTo(), theOutputListIsFixedFlag, and theOutputObjectList.

Referenced by connectMyOutputTo().

691 {
692  ConnectableObjectList::const_iterator current;
693 
694  ossim_int32 index = 0;
695  current = theOutputObjectList.begin();
696  while(current != theOutputObjectList.end())
697  {
698  if(!(*current))
699  {
700  if(canConnectMyOutputTo(index, object))
701  {
702  return index;
703  }
704  }
705  ++current;
706  ++index;
707  }
709  {
711  object))
712  {
713  return (ossim_int32)theOutputObjectList.size();
714  }
715  }
716  // default to return the size. This will force an append.
717  //
718  return -1;
719 }
ConnectableObjectList theOutputObjectList
Holds a list of output objects.
bool theOutputListIsFixedFlag
Indicates whether the theOutputObjectList is fixed.
virtual bool canConnectMyOutputTo(ossim_int32 myOutputIndex, const ossimConnectableObject *object) const
default implementation is to allow anyone to connect to us.
int ossim_int32

◆ getNumberOfInputs()

ossim_uint32 ossimConnectableObject::getNumberOfInputs ( ) const
virtual

Returns the number of input objects.

Definition at line 2313 of file ossimConnectableObject.cpp.

References theInputObjectList.

Referenced by ossimImageChain::addLast(), ossimImageMosaic::allocate(), ossimElevationMosaic::allocate(), ossimMaxMosaic::allocate(), ATP::AtpTileSource::allocate(), ossimBandMergeSource::computeNumberOfInputBands(), ossimAtbController::disableImage(), ossimAtbController::enableImage(), fillContainer(), ossimIgenGenerator::generateChainForMultiInputRecurse(), ossimImageCombiner::getBoundingRect(), ossimBandMergeSource::getMaxPixelValue(), ossimImageCombiner::getMaxPixelValue(), ossimBandMergeSource::getMinPixelValue(), ossimImageCombiner::getMinPixelValue(), ossimImageCombiner::getNextNormTile(), ossimOrthoImageMosaic::getNextTile(), ossimImageCombiner::getNextTile(), ossimBandMergeSource::getNullPixelValue(), ossimImageCombiner::getNumberOfOverlappingImages(), ossimImageCombiner::getOverlappingImages(), ossimBlendMosaic::getTile(), ossimFeatherMosaic::getTile(), ATP::ossimCorrelationSource::getTile(), ossimImageMosaic::getTile(), ossimElevationMosaic::getTile(), ATP::ossimDescriptorSource::getTile(), ossimMaxMosaic::getTile(), ossimBandMergeSource::getTile(), ossimFeatherMosaic::initialize(), ATP::AtpTileSource::initialize(), ossimImageCombiner::initialize(), ossimTwoColorView::initialize(), isConnected(), ossimHistogramWriter::loadState(), ossimImageHistogramSource::loadState(), ossimAtbController::lockImage(), ossimImageCombiner::precomputeBounds(), propagateEventToInputs(), saveStateOfAllInputs(), and ossimAtbController::unlockImage().

2314 {
2315  return (ossim_uint32)theInputObjectList.size();
2316 }
unsigned int ossim_uint32
ConnectableObjectList theInputObjectList
Holds a list of input objects.

◆ getNumberOfOutputs()

ossim_uint32 ossimConnectableObject::getNumberOfOutputs ( ) const
virtual

Return the number of output objects.

Definition at line 2318 of file ossimConnectableObject.cpp.

References theOutputObjectList.

Referenced by accept(), and propagateEventToOutputs().

2319 {
2320  return (ossim_uint32)theOutputObjectList.size();
2321 }
unsigned int ossim_uint32
ConnectableObjectList theOutputObjectList
Holds a list of output objects.

◆ getOutput() [1/2]

ossimConnectableObject * ossimConnectableObject::getOutput ( ossim_uint32  index = 0)

returns the object at the specified index.

if the index is not valid then NULL is returned

Definition at line 1374 of file ossimConnectableObject.cpp.

References theOutputObjectList.

Referenced by propagateEventToOutputs().

1375 {
1376  if(idx < theOutputObjectList.size())
1377  {
1378  return theOutputObjectList[idx].get();
1379  }
1380 
1381  return 0;
1382 }
ConnectableObjectList theOutputObjectList
Holds a list of output objects.

◆ getOutput() [2/2]

const ossimConnectableObject * ossimConnectableObject::getOutput ( ossim_uint32  index = 0) const

returns the object at the specified index.

if the index is not valid then NULL is returned

Definition at line 1585 of file ossimConnectableObject.cpp.

References theOutputObjectList.

1586 {
1587  if(idx < theOutputObjectList.size())
1588  {
1589  return theOutputObjectList[idx].get();
1590  }
1591 
1592  return 0;
1593 }
ConnectableObjectList theOutputObjectList
Holds a list of output objects.

◆ getOutputList() [1/2]

const ossimConnectableObject::ConnectableObjectList & ossimConnectableObject::getOutputList ( ) const

Definition at line 2338 of file ossimConnectableObject.cpp.

References theOutputObjectList.

Referenced by ossimImageChain::insertRight(), ossimImageChain::processEvent(), ossimImageChain::replace(), and ossimImageHandlerMtAdaptor::setAdaptee().

2339 {
2340  return theOutputObjectList;
2341 }
ConnectableObjectList theOutputObjectList
Holds a list of output objects.

◆ getOutputList() [2/2]

ossimConnectableObject::ConnectableObjectList & ossimConnectableObject::getOutputList ( )

Definition at line 2348 of file ossimConnectableObject.cpp.

References theOutputObjectList.

2349 {
2350  return theOutputObjectList;
2351 }
ConnectableObjectList theOutputObjectList
Holds a list of output objects.

◆ getOutputListIsFixedFlag()

bool ossimConnectableObject::getOutputListIsFixedFlag ( ) const
virtual

Definition at line 2328 of file ossimConnectableObject.cpp.

References theOutputListIsFixedFlag.

Referenced by ossimImageChain::add().

2329 {
2330  return theOutputListIsFixedFlag;
2331 }
bool theOutputListIsFixedFlag
Indicates whether the theOutputObjectList is fixed.

◆ getOwner()

const ossimObject * ossimConnectableObject::getOwner ( ) const

Fetches the current owner, most likely a container but not limited to one.

Definition at line 2308 of file ossimConnectableObject.cpp.

References theOwner.

Referenced by ossimConnectableContainer::removeChild().

2309 {
2310  return theOwner;
2311 }

◆ getProperty()

ossimRefPtr< ossimProperty > ossimConnectableObject::getProperty ( const ossimString name) const
virtual

Reimplemented from ossimPropertyInterface.

Reimplemented in ossimImageHandler, ossimCibCadrgTileSource, ossimImageFileWriter, ossimRpfCacheTileSource, ossimImageSource, ossimLasReader, ossimTiffTileSource, ossimGdalTileSource, ossimBumpShadeTileSource, ossimPixelFlipper, ossimPointCloudImageHandler, ossimH5ImageHandler, ossimEquationCombiner, ossimNitfTileSource, ossimHdf5ImageHandler, ossimMapCompositionSource, ossimOgrGdalTileSource, ossimMaskFilter, ossimDtedTileSource, ossimAdrgTileSource, ossimCcfTileSource, ossimMetadataFileWriter, ossimJpegTileSource, ossimWriter, ossimPngReader, ossimBandSelector, ossimWatermarkFilter, ossimPdfWriter, ossimTiffWriter, ossimGpkgReader, ossimImageRenderer, ossimGpkgWriter, ossimRangeDomeTileSource, ossimNBandToIndexFilter, ossimPngWriter, ossimHistogramMatchFilter, ossimKmlSuperOverlayWriter, ossimOpjJp2Writer, ossimScalarRemapper, ossimKakaduNitfWriter, ossimKakaduJp2Writer, ossimJpegWriter, ossimPolyCutter, ossimBrightnessContrastSource, ossimGdalWriter, ossimGdalOgrVectorAnnotation, ossimMeanMedianFilter, ossimSlopeFilter, ossimCastTileSourceFilter, ossimConvolutionFilter1D, ossimEnviTileSource, ossimLandsatTileSource, ossimKakaduJpipHandler, ossimNitfWriterBase, ossimSrtmTileSource, ossimCacheTileSource, ossimImageSourceFilter, ossimNitfWriter, ossimSFIMFusion, ossimImageGaussianFilter, ossimFftFilter, ossimImageToPlaneNormalFilter, ossimNitf20Writer, ossimEdgeFilter, ossimSource, ossimSICDToDetectedImage, ossimDilationFilter, ossimHsiRemapper, ossimDoqqTileSource, ossim3x3ConvolutionFilter, ossimTrimFilter, ossimImageSharpenFilter, ossimErosionFilter, ossimBrightnessMatch, and ossimDespeckleFilter.

Definition at line 1815 of file ossimConnectableObject.cpp.

References ossimObject::getClassName(), ossimProperty::setReadOnlyFlag(), and theDescription.

Referenced by ossimSource::getProperty(), and ossimMetadataFileWriter::getProperty().

1816 {
1817  if(name == "Description")
1818  {
1819  return new ossimTextProperty(name, theDescription);
1820  }
1821  // "Class name" check for backwards compatibility only.
1822  else if( (name == "class_name") ||
1823  (name == "Class name") )
1824  {
1825  ossimProperty* prop = new ossimTextProperty(name,
1826  getClassName());
1827  prop->setReadOnlyFlag(true);
1828 
1829  return prop;
1830  }
1831  return ossimRefPtr<ossimProperty>();
1832 }
virtual ossimString getClassName() const
Definition: ossimObject.cpp:64
virtual void setReadOnlyFlag(bool flag)

◆ getPropertyNames()

void ossimConnectableObject::getPropertyNames ( std::vector< ossimString > &  propertyNames) const
virtual

Reimplemented from ossimPropertyInterface.

Reimplemented in ossimImageHandler, ossimCibCadrgTileSource, ossimImageFileWriter, ossimLasReader, ossimImageSource, ossimGdalTileSource, ossimTiffOverviewBuilder, ossimTiffTileSource, ossimBumpShadeTileSource, ossimH5ImageHandler, ossimPixelFlipper, ossimHdf5ImageHandler, ossimNitfTileSource, ossimEquationCombiner, ossimMapCompositionSource, ossimOgrGdalTileSource, ossimMaskFilter, ossimDtedTileSource, ossimAdrgTileSource, ossimCcfTileSource, ossimJpegTileSource, ossimMetadataFileWriter, ossimGdalOverviewBuilder, ossimWatermarkFilter, ossimWriter, ossimPngReader, ossimPdfWriter, ossimTiffWriter, ossimBandSelector, ossimGpkgReader, ossimKakaduNitfOverviewBuilder, ossimGpkgWriter, ossimImageRenderer, ossimHistogramMatchFilter, ossimNBandToIndexFilter, ossimPngWriter, ossimKmlSuperOverlayWriter, ossimOpjJp2Writer, ossimKakaduNitfWriter, ossimKakaduJp2Writer, ossimScalarRemapper, ossimJpegWriter, ossimPolyCutter, ossimBrightnessContrastSource, ossimGdalWriter, ossimGdalOgrVectorAnnotation, ossimMeanMedianFilter, ossimEnviTileSource, ossimLandsatTileSource, ossimNitfWriterBase, ossimSlopeFilter, ossimCastTileSourceFilter, ossimConvolutionFilter1D, ossimNitfWriter, ossimSrtmTileSource, ossimKakaduJpipHandler, ossimNitf20Writer, ossimCacheTileSource, ossimImageSourceFilter, ossimTrimFilter, ossimSFIMFusion, ossimFftFilter, ossimImageGaussianFilter, ossimImageToPlaneNormalFilter, ossimEdgeFilter, ossimDoqqTileSource, ossimSource, ossimSICDToDetectedImage, ossimDilationFilter, ossimHsiRemapper, ossim3x3ConvolutionFilter, ossimImageSharpenFilter, ossimErosionFilter, ossimBrightnessMatch, and ossimDespeckleFilter.

Definition at line 1834 of file ossimConnectableObject.cpp.

Referenced by ossimSource::getPropertyNames(), and ossimMetadataFileWriter::getPropertyNames().

1835 {
1836  propertyNames.push_back("class_name");
1837  propertyNames.push_back("Description");
1838 }

◆ isConnected()

bool ossimConnectableObject::isConnected ( ossimConnectableObjectDirectionType  direction = CONNECTABLE_DIRECTION_INPUT) const
virtual

will check the direction specified to see if all slots are full.

If any slot is null then false is returned. If a filter requires options testing they need to override this method. The argument can be ored together. If you want both checked then pass CONNECTABLE_DIRECTION_INPUT | CONNECTABLE_DIRECTION_OUTPUT

Definition at line 100 of file ossimConnectableObject.cpp.

References CONNECTABLE_DIRECTION_INPUT, CONNECTABLE_DIRECTION_OUTPUT, getNumberOfInputs(), theInputListIsFixedFlag, theInputObjectList, theOutputListIsFixedFlag, and theOutputObjectList.

Referenced by accept().

101 {
102  if(direction & CONNECTABLE_DIRECTION_INPUT)
103  {
104  if(getNumberOfInputs())
105  {
106  ConnectableObjectList::const_iterator current = theInputObjectList.begin();
107 
108  while(current != theInputObjectList.end())
109  {
110  if(! (*current))
111  {
112  return false;
113  }
114 
115  ++current;
116  }
117  }
118  else if(!theInputListIsFixedFlag)
119  {
120  return false;
121  }
122  }
123 
124  if(direction & CONNECTABLE_DIRECTION_OUTPUT)
125  {
126  if(theOutputObjectList.empty())
127  {
129 
130  }
131  ConnectableObjectList::const_iterator current = theOutputObjectList.begin();
132  current = theOutputObjectList.begin();
133  while(current != theOutputObjectList.end())
134  {
135  if(! (*current))
136  {
137  return false;
138  }
139 
140  ++current;
141  }
142  }
143 
144  return true;
145 }
ConnectableObjectList theInputObjectList
Holds a list of input objects.
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.
bool theInputListIsFixedFlag
Indicates whether the theInputObjectList is fixed.
ConnectableObjectList theOutputObjectList
Holds a list of output objects.
bool theOutputListIsFixedFlag
Indicates whether the theOutputObjectList is fixed.

◆ loadState()

bool ossimConnectableObject::loadState ( const ossimKeywordlist kwl,
const char *  prefix = 0 
)
virtual

Method to the load (recreate) the state of the object from a keyword list. Return true if ok or false on error.

Reimplemented from ossimObject.

Reimplemented in ossimHistogramRemapper, ossimImageHandler, ossimImageFileWriter, ossimCibCadrgTileSource, ossimEquationCombiner, ossimEsriShapeFileFilter, ossimLasReader, ossimKakaduJp2Reader, ossimImageChain, ossimMapCompositionSource, ossimKakaduJ2kReader, ossimPointCloudImageHandler, ossimMrSidReader, ossimGeoPdfReader, ossimImageSource, ossimMG4LidarReader, ossimBumpShadeTileSource, ossimTiffTileSource, ossimElevManager, ossimRpfCacheTileSource, ossimMaskFilter, ossimHdfReader, ossimIndexToRgbLutFilter, ossimConnectableContainer, ossimImageSourceSequencer, ossimPixelFlipper, ossimResampler, ossimHistogramMatchFilter, ossimNitfTileSource, ossimScaleFilter, ossimBandLutFilter, ossimWriter, ossimBandSelector, ossimCcfTileSource, ossimOgrGdalTileSource, ossimAdrgTileSource, ossimDtedTileSource, ossimPiecewiseRemapper, ossimOgrVectorTileSource, ossimImageElevationDatabase, ossimH5ImageHandler, ossimOpjJp2Reader, ossimPngReader, ossimAtCorrGridRemapper, ossimWatermarkFilter, ossimGdalTileSource, ossimKMeansFilter, ossimPdfWriter, ossimTiffWriter, ossimHdf5ImageHandler, ossimGpkgReader, ossimNitfWriterBase, ossimUsgsDemTileSource, ossimJpegTileSource, ossimTiledElevationDatabase, ossimImageCacheBase, ossimGpkgWriter, ossimBitMaskWriter, ossimGeoPolyCutter, ossimTopographicCorrectionFilter, ossimKmlSuperOverlayReader, ossimRangeDomeTileSource, ossimVpfTileSource, ossimGeneralRasterTileSource, ossimNitfWriter, ossimMetadataFileWriter, ossimElevImageSource, ossimAnnotationSource, ossimBandAverageFilter, ossimBrightnessContrastSource, ossimMeanMedianFilter, ossimTiledImagePatch, ossimMemoryImageSource, ossimNitf20Writer, ossimOutputSource, ossimGridRemapSource, ossimRgbToIndexFilter, ossimNBandToIndexFilter, ossimGdalOgrVectorAnnotation, ossimImageRenderer, ossimMultiBandHistogramTileSource, ossimPngWriter, ossimKmlSuperOverlayWriter, ossimOpjJp2Writer, ossimScalarRemapper, ossimSubImageTileSource, ossimElevationCellDatabase, ossimHistogramWriter, ossimImageHistogramSource, ossimRLevelFilter, ossimValueAssignImageSourceFilter, ossimGeneralRasterWriter, ossimConvolutionFilter1D, ossimTiledImageHandler, ossimGdalWriter, ossimElevationDatabase, ossimBandClipFilter, ossimKakaduJpipHandler, ossimKakaduNitfWriter, ossimSlopeFilter, ossimKakaduJp2Writer, ossimBandSeparateHandler, ossimJpegWriter, ossimplugins::ossimTerraSarTiffReader, ossimImageWriter, ossimDtedElevationDatabase, ossimGeneralRasterElevationDatabase, ossimGeoAnnotationSource, ossimLocalCorrelationFusion, ossimplugins::ossimRadarSat2TiffReader, ossimEnviTileSource, ossimLandsatTileSource, ossimImageChainMtAdaptor, ossimHsiRemapper, ossimSFIMFusion, ossimDilationFilter, ossimCastTileSourceFilter, ossimVectorRenderer, ossimTableRemapper, ossimSrtmElevationDatabase, ossimFftFilter, ossimImageGaussianFilter, ossimLinearStretchRemapper, ossimSource, ossimCacheTileSource, ossimEdgeFilter, ossimMultiThreadSequencer, ossimFgdcFileWriter, ossimImageHandlerMtAdaptor, ossimMaxMosaic, ossimSrtmTileSource, ossimRgbToGreyFilter, ossimElevationMosaic, ossimImageMosaic, ossimPolyCutter, ossimErosionFilter, ossimRectangleCutFilter, ossimHistoMatchRemapper, ossimMapViewController, ossimEnviHeaderFileWriter, ossimWorldFileWriter, ossim3x3ConvolutionFilter, ossimArcInfoGridWriter, ossimConvolutionSource, ossimImageToPlaneNormalFilter, ossimAOD, ossimAtCorrRemapper, ossimERSTileSource, ossimImageSourceFilter, ossimERSFileWriter, ossimGammaRemapper, ossimElevRemapper, ossimImageSharpenFilter, ossimBlendMosaic, ossimBrightnessMatch, ossimImageCombiner, ossimQuickbirdNitfTileSource, ossimHistogramEqualization, ossimHistogramThreshholdFilter, ossimTrimFilter, ossimImageSourceHistogramFilter, ossimLandsatTopoCorrectionFilter, ossimHistogramSource, ossimVpfAnnotationSource, ossimDoqqTileSource, ossimDespeckleFilter, and ossimEastingNorthingCutter.

Definition at line 1840 of file ossimConnectableObject.cpp.

References CONNECTABLE_INPUT_LIST_FIXED_KW, CONNECTABLE_OUTPUT_LIST_FIXED_KW, ossimKeywordNames::DESCRIPTION_KW, ossimKeywordlist::find(), ossimKeywordlist::getNumberOfSubstringKeys(), ossimKeywordNames::ID_KW, ossimObject::loadState(), ossimKeywordNames::NUMBER_INPUTS_KW, ossimKeywordNames::NUMBER_OUTPUTS_KW, setNumberOfInputs(), setNumberOfOutputs(), theDescription, theId, theInputListIsFixedFlag, theInputObjectList, theOutputListIsFixedFlag, theOutputObjectList, ossimString::toBool(), and ossimString::toLong().

Referenced by ossimSource::loadState(), ossimMetadataFileWriter::loadState(), and ossimConnectableContainer::loadState().

1842 {
1843  const char* lookup = kwl.find(prefix,
1845 
1846  // disconnect(this);
1847 
1848  if(lookup)
1849  {
1850  theId = ossimId(ossimString(lookup).toLong());
1851  }
1852 
1853  lookup = kwl.find(prefix, CONNECTABLE_INPUT_LIST_FIXED_KW);
1854  if(lookup)
1855  {
1857  }
1858 
1859  lookup = kwl.find(prefix, CONNECTABLE_OUTPUT_LIST_FIXED_KW);
1860  if(lookup)
1861  {
1863  }
1864 
1865  ossim_int32 numberInputs = 0;
1866  ossim_int32 numberOutputs = 0;
1867 
1868  ossimString regExpression;
1869  lookup = kwl.find(prefix, ossimKeywordNames::NUMBER_INPUTS_KW);
1870  if(lookup)
1871  {
1872  numberInputs = ossimString(lookup).toLong();
1873  }
1874  else if(!theInputListIsFixedFlag)
1875  {
1876  regExpression = ossimString("^(") + ossimString(prefix) + "input_connection[0-9]+)";
1877  numberInputs = kwl.getNumberOfSubstringKeys(regExpression);
1878  }
1879  else
1880  {
1881  // if we are fixed then the list should already be set
1882  numberInputs = (ossim_int32) theInputObjectList.size();
1883  }
1884 
1885 
1886  lookup = kwl.find(prefix, ossimKeywordNames::NUMBER_OUTPUTS_KW);
1887  if(lookup)
1888  {
1889  numberOutputs = ossimString(lookup).toLong();
1890  }
1891  else if(!theOutputListIsFixedFlag)
1892  {
1893  regExpression = ossimString("^(") + ossimString(prefix) + "output_connection[0-9]+)";
1894  numberOutputs = kwl.getNumberOfSubstringKeys(regExpression);
1895  }
1896  else
1897  {
1898  // if we are fixed then the list should already be set
1899  numberOutputs = (ossim_int32) theOutputObjectList.size();
1900  }
1901 
1902  lookup = kwl.find(prefix, ossimKeywordNames::DESCRIPTION_KW);
1903  if (lookup)
1904  {
1905  theDescription = lookup;
1906  }
1907 
1908  setNumberOfInputs(numberInputs);
1909  setNumberOfOutputs(numberOutputs);
1910 
1911  return ossimObject::loadState(kwl, prefix);
1912 }
virtual void setNumberOfInputs(ossim_int32 numberOfInputs)
Will set the number of inputs.
ossim_uint32 getNumberOfSubstringKeys(const ossimString &regularExpression) const
const char * CONNECTABLE_INPUT_LIST_FIXED_KW
const char * find(const char *key) const
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
static const char * NUMBER_INPUTS_KW
bool toBool() const
String to numeric methods.
const char * CONNECTABLE_OUTPUT_LIST_FIXED_KW
long toLong() const
toLong&#39;s deprecated, please use the toInts...
ConnectableObjectList theInputObjectList
Holds a list of input objects.
static const char * DESCRIPTION_KW
bool theInputListIsFixedFlag
Indicates whether the theInputObjectList is fixed.
static const char * ID_KW
ConnectableObjectList theOutputObjectList
Holds a list of output objects.
bool theOutputListIsFixedFlag
Indicates whether the theOutputObjectList is fixed.
static const char * NUMBER_OUTPUTS_KW
int ossim_int32
virtual void setNumberOfOutputs(ossim_int32 numberOfInputs)
Will set the number of outputs.

◆ moveInputDown()

bool ossimConnectableObject::moveInputDown ( const ossimId id)

Moves the input connection matching id down one in the connection list.

Parameters
idThe id to move.
Returns
true if action was performed, false if not.

Definition at line 2097 of file ossimConnectableObject.cpp.

References findInputIndex(), ossimListenerManager::fireEvent(), OSSIM_EVENT_CONNECTION_CONNECT_ID, ossimConnectionEvent::OSSIM_INPUT_DIRECTION, theInputListIsFixedFlag, and theInputObjectList.

2098 {
2099  bool result = false;
2100 
2101  if (theInputListIsFixedFlag == false)
2102  {
2103  if ( theInputObjectList.size() )
2104  {
2105  ossim_int32 indexOfId = findInputIndex(id);
2106 
2107  if ( indexOfId <
2108  static_cast<ossim_int32>(theInputObjectList.size()-1) )
2109  {
2110  ConnectableObjectList oldInputs =
2112 
2113  // Swap with index below.
2114  ossimRefPtr<ossimConnectableObject> tmpObj = theInputObjectList[indexOfId].get();
2115  theInputObjectList[indexOfId] = theInputObjectList[indexOfId+1].get();
2116  theInputObjectList[indexOfId+1] = tmpObj;
2117  result = true;
2118 
2119  ConnectableObjectList newInputs =
2121 
2122  ossimConnectionEvent event(this,
2124  newInputs,
2125  oldInputs,
2127  fireEvent(event);
2128  }
2129  }
2130  }
2131 
2132  return result;
2133 }
virtual ossim_int32 findInputIndex(const ossimConnectableObject *object)
Return a valid index of the input list if the passed in object is found else return -1...
virtual void fireEvent(ossimEvent &event)
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
#define OSSIM_EVENT_CONNECTION_CONNECT_ID
Definition: ossimEventIds.h:22
ConnectableObjectList theInputObjectList
Holds a list of input objects.
bool theInputListIsFixedFlag
Indicates whether the theInputObjectList is fixed.
int ossim_int32

◆ moveInputToBottom()

bool ossimConnectableObject::moveInputToBottom ( const ossimId id)

Moves the input connection matching id to the bottom of the connection list.

Parameters
idThe id to move.
Returns
true if action was performed, false if not.

Definition at line 2183 of file ossimConnectableObject.cpp.

References ossimListenerManager::fireEvent(), ossimRefPtr< T >::get(), OSSIM_EVENT_CONNECTION_CONNECT_ID, ossimConnectionEvent::OSSIM_INPUT_DIRECTION, theInputListIsFixedFlag, and theInputObjectList.

2184 {
2185  bool result = false;
2186 
2187  if (theInputListIsFixedFlag == false)
2188  {
2189  if ( theInputObjectList.size() )
2190  {
2191  ConnectableObjectList::iterator bottom =
2192  theInputObjectList.end()-1;
2193 
2194  // if not bottom already
2195  if ( (*bottom)->getId() != id )
2196  {
2197  ConnectableObjectList::iterator i =
2198  theInputObjectList.begin();
2199 
2200  while (i != bottom)
2201  {
2202  if ( (*i)->getId() == id )
2203  {
2204  break;
2205  }
2206  ++i;
2207  }
2208 
2209  if (i != bottom)
2210  {
2211  ConnectableObjectList oldInputs =
2213 
2215  theInputObjectList.erase(i);
2216  theInputObjectList.push_back(obj);
2217  result = true;
2218 
2219  ConnectableObjectList newInputs =
2221 
2222  ossimConnectionEvent event(
2223  this,
2225  newInputs,
2226  oldInputs,
2228  fireEvent(event);
2229  }
2230  }
2231  }
2232  }
2233 
2234  return result;
2235 }
virtual void fireEvent(ossimEvent &event)
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
#define OSSIM_EVENT_CONNECTION_CONNECT_ID
Definition: ossimEventIds.h:22
ConnectableObjectList theInputObjectList
Holds a list of input objects.
bool theInputListIsFixedFlag
Indicates whether the theInputObjectList is fixed.

◆ moveInputToTop()

bool ossimConnectableObject::moveInputToTop ( const ossimId id)

Moves the input connection matching id to the top of the connection list.

Parameters
idThe id to move.
Returns
true if action was performed, false if not.

Definition at line 2135 of file ossimConnectableObject.cpp.

References ossimListenerManager::fireEvent(), ossimRefPtr< T >::get(), OSSIM_EVENT_CONNECTION_CONNECT_ID, ossimConnectionEvent::OSSIM_INPUT_DIRECTION, theInputListIsFixedFlag, and theInputObjectList.

2136 {
2137  bool result = false;
2138 
2139  if (theInputListIsFixedFlag == false)
2140  {
2141  if ( theInputObjectList.size() )
2142  {
2143  ConnectableObjectList::iterator i =
2144  theInputObjectList.begin();
2145 
2146  while (i != theInputObjectList.end())
2147  {
2148  if ( (*i)->getId() == id )
2149  {
2150  break;
2151  }
2152  ++i;
2153  }
2154 
2155  if ( (i != theInputObjectList.begin()) &&
2156  (i != theInputObjectList.end()) )
2157  {
2158  ConnectableObjectList oldInputs =
2160 
2162  theInputObjectList.erase(i);
2163  theInputObjectList.insert(theInputObjectList.begin(), obj.get());
2164  result = true;
2165 
2166  ConnectableObjectList newInputs =
2168 
2169  ossimConnectionEvent event(
2170  this,
2172  newInputs,
2173  oldInputs,
2175  fireEvent(event);
2176  }
2177  }
2178  }
2179 
2180  return result;
2181 }
virtual void fireEvent(ossimEvent &event)
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
#define OSSIM_EVENT_CONNECTION_CONNECT_ID
Definition: ossimEventIds.h:22
ConnectableObjectList theInputObjectList
Holds a list of input objects.
bool theInputListIsFixedFlag
Indicates whether the theInputObjectList is fixed.

◆ moveInputUp()

bool ossimConnectableObject::moveInputUp ( const ossimId id)

Moves the input connection matching id up one in the connection list.

Parameters
idThe id to move.
Returns
true if action was performed, false if not.

Definition at line 2060 of file ossimConnectableObject.cpp.

References findInputIndex(), ossimListenerManager::fireEvent(), OSSIM_EVENT_CONNECTION_CONNECT_ID, ossimConnectionEvent::OSSIM_INPUT_DIRECTION, theInputListIsFixedFlag, and theInputObjectList.

2061 {
2062  bool result = false;
2063 
2064  if (theInputListIsFixedFlag == false)
2065  {
2066  if ( theInputObjectList.size() )
2067  {
2068  ossim_int32 indexOfId = findInputIndex(id);
2069 
2070  if (indexOfId > 0)
2071  {
2072  ConnectableObjectList oldInputs =
2074 
2075  // Swap with index above.
2076  ossimRefPtr<ossimConnectableObject> tmpObj = theInputObjectList[indexOfId].get();
2077  theInputObjectList[indexOfId] = theInputObjectList[indexOfId-1].get();
2078  theInputObjectList[indexOfId-1] = tmpObj;
2079  result = true;
2080 
2081  ConnectableObjectList newInputs =
2083 
2084  ossimConnectionEvent event(this,
2086  newInputs,
2087  oldInputs,
2089  fireEvent(event);
2090  }
2091  }
2092  }
2093 
2094  return result;
2095 }
virtual ossim_int32 findInputIndex(const ossimConnectableObject *object)
Return a valid index of the input list if the passed in object is found else return -1...
virtual void fireEvent(ossimEvent &event)
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
#define OSSIM_EVENT_CONNECTION_CONNECT_ID
Definition: ossimEventIds.h:22
ConnectableObjectList theInputObjectList
Holds a list of input objects.
bool theInputListIsFixedFlag
Indicates whether the theInputObjectList is fixed.
int ossim_int32

◆ OSSIM_DEPRECATE_METHOD() [1/6]

ossimConnectableObject::OSSIM_DEPRECATE_METHOD ( virtual ossimConnectableObject findConnectableObjectconst ossimId &id)

These methods are now deprecated. You can achieve the same thing by using the new visitor design pattern. If this does not achieve exactly what you want then you can derive new rules by overriding the virtual visit method in ossimVisitor

   ossimIdVisitor visitor(id, false, ossimVisitor::VISIT_CHILDREN |
   ossimVisitor::VISIT_INPUTS);
   connectableObject->accept(visitor);
   ossimRefPtr<ossimConnectableObject> object = visitor.getObject();

◆ OSSIM_DEPRECATE_METHOD() [2/6]

ossimConnectableObject::OSSIM_DEPRECATE_METHOD ( virtual ossimConnectableObject findObjectOfTypeRTTItypeid typeId, ossimConnectableObjectDirectionType directionType, bool recurse=true)

These methods are now deprecated. You can achieve the same thing by using the new visitor design pattern. If this does not achieve exactly what you want then you can derive new rules by overriding the virtual visit method in ossimVisitor

   ossimTypeIdVisitor visitor(typeId, true, ossimVisitor::VISIT_CHILDREN |
   ossimVisitor::VISIT_INPUTS);
   connectableObject->accept(visitor);
   ossimRefPtr<ossimConnectableObject> object = visitor.getObject();

◆ OSSIM_DEPRECATE_METHOD() [3/6]

ossimConnectableObject::OSSIM_DEPRECATE_METHOD ( virtual ossimConnectableObject findObjectOfTypeconst ossimString &obj, ossimConnectableObjectDirectionType directionType, bool recurse=true)

These methods are now deprecated. You can achieve the same thing by using the new visitor design pattern. If this does not achieve exactly what you want then you can derive new rules by overriding the virtual visit method in ossimVisitor

   ossimTypeNameVisitor visitor(typeName, true,
   ossimVisitor::VISIT_CHILDREN | ossimVisitor::VISIT_INPUTS);
   connectableObject->accept(visitor);
   ossimRefPtr<ossimConnectableObject> object = visitor.getObject();

◆ OSSIM_DEPRECATE_METHOD() [4/6]

ossimConnectableObject::OSSIM_DEPRECATE_METHOD ( virtual ossimConnectableObject findInputObjectOfTypeconst ossimString &className)

These methods are now deprecated. You can achieve the same thing by using the new visitor design pattern. If this does not achieve exactly what you want then you can derive new rules by overriding the virtual visit method in ossimVisitor

   ossimTypeNameVisitor visitor(typeName, true,
   ossimVisitor::VISIT_CHILDREN | ossimVisitor::VISIT_INPUTS);
   connectableObject->accept(visitor);
   ossimRefPtr<ossimConnectableObject> object = visitor.getObject();

◆ OSSIM_DEPRECATE_METHOD() [5/6]

ossimConnectableObject::OSSIM_DEPRECATE_METHOD ( virtual void   findAllObjectsOfTypeConnectableObjectList &result, const RTTItypeid &typeInfo, bool recurse=true)

These methods are now deprecated. You can achieve the same thing by using the new visitor design pattern. If this does not achieve exactly what you want then you can derive new rules by overriding the virtual visit method in ossimVisitor

   ossimTypeNameVisitor visitor("<put type name here>",
   false, ossimVisitor::VISIT_CHILDREN);
   connectableObject->accept(visitor);
   ossimCollectionVisitor::List& collection = visitor.getObjects();

◆ OSSIM_DEPRECATE_METHOD() [6/6]

ossimConnectableObject::OSSIM_DEPRECATE_METHOD ( virtual void   findAllObjectsOfTypeConnectableObjectList &result, const ossimString &className, bool recurse=true)

These methods are now deprecated. You can achieve the same thing by using the new visitor design pattern. If this does not achieve exactly what you want then you can derive new rules by overriding the virtual visit method in ossimVisitor

   ossimTypeNameVisitor visitor("<put type name here>", false,
   ossimVisitor::VISIT_CHILDREN);
   connectableObject->accept(visitor);
   ossimCollectionVisitor::List& collection = visitor.getObjects();

◆ propagateEventToInputs()

void ossimConnectableObject::propagateEventToInputs ( ossimEvent event)
virtual

Reimplemented in ossimImageChain.

Definition at line 1786 of file ossimConnectableObject.cpp.

References ossimListenerManager::fireEvent(), getInput(), getNumberOfInputs(), and propagateEventToInputs().

Referenced by propagateEventToInputs().

1787 {
1788  ossim_uint32 i;
1789 
1790  for(i = 0; i <getNumberOfInputs(); ++i)
1791  {
1792  ossimConnectableObject* obj = getInput(i);
1793  if(obj)
1794  {
1795  obj->fireEvent(event);
1796  obj->propagateEventToInputs(event);
1797  }
1798  }
1799 }
virtual void fireEvent(ossimEvent &event)
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
unsigned int ossim_uint32
virtual void propagateEventToInputs(ossimEvent &event)
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.

◆ propagateEventToOutputs()

void ossimConnectableObject::propagateEventToOutputs ( ossimEvent event)
virtual

Reimplemented in ossimImageChain.

Definition at line 1770 of file ossimConnectableObject.cpp.

References ossimListenerManager::fireEvent(), getNumberOfOutputs(), getOutput(), propagateEventToOutputs(), and ossimEvent::PROPAGATION_OUTPUT.

Referenced by propagateEventToOutputs(), ossimChipProcTool::propagateGeometryToChains(), and ossimConnectableContainerChildListener::propagatePropertyEvent().

1771 {
1772  ossim_uint32 i;
1773 
1774  for(i = 0; i <getNumberOfOutputs(); ++i)
1775  {
1777  if(obj)
1778  {
1779  event.setPropagationType(ossimEvent::PROPAGATION_OUTPUT);
1780  obj->fireEvent(event);
1781  obj->propagateEventToOutputs(event);
1782  }
1783  }
1784 }
virtual void propagateEventToOutputs(ossimEvent &event)
virtual ossim_uint32 getNumberOfOutputs() const
Return the number of output objects.
virtual void fireEvent(ossimEvent &event)
ossimConnectableObject * getOutput(ossim_uint32 index=0)
returns the object at the specified index.
unsigned int ossim_uint32

◆ saveState()

bool ossimConnectableObject::saveState ( ossimKeywordlist kwl,
const char *  prefix = 0 
) const
virtual

Method to save the state of the object to a keyword list. Return true if ok or false on error.

Reimplemented from ossimObject.

Reimplemented in ossimHistogramRemapper, ossimImageHandler, ossimImageFileWriter, ossimGeoPdfReader, ossimEsriShapeFileFilter, ossimEquationCombiner, ossimLasReader, ossimImageChain, ossimMapCompositionSource, ossimCibCadrgTileSource, ossimPointCloudImageHandler, ossimBumpShadeTileSource, ossimImageSource, ossimMaskFilter, ossimTiffTileSource, ossimElevManager, ossimHistogramMatchFilter, ossimConnectableContainer, ossimIndexToRgbLutFilter, ossimPixelFlipper, ossimRpfCacheTileSource, ossimBandLutFilter, ossimResampler, ossimNitfTileSource, ossimScaleFilter, ossimWriter, ossimImageElevationDatabase, ossimAtCorrGridRemapper, ossimBandSelector, ossimCcfTileSource, ossimKMeansFilter, ossimOgrGdalTileSource, ossimAdrgTileSource, ossimDtedTileSource, ossimOgrVectorTileSource, ossimPiecewiseRemapper, ossimH5ImageHandler, ossimOpjJp2Reader, ossimPngReader, ossimGdalTileSource, ossimTiledElevationDatabase, ossimPdfWriter, ossimTopographicCorrectionFilter, ossimHdf5ImageHandler, ossimTiffWriter, ossimGpkgReader, ossimRangeDomeTileSource, ossimBrightnessContrastSource, ossimJpegTileSource, ossimTiledImagePatch, ossimGpkgWriter, ossimGeoPolyCutter, ossimUsgsDemTileSource, ossimWatermarkFilter, ossimKmlSuperOverlayReader, ossimBandAverageFilter, ossimVpfTileSource, ossimGeneralRasterTileSource, ossimGridRemapSource, ossimNitfWriterBase, ossimElevImageSource, ossimNitfWriter, ossimAnnotationSource, ossimMeanMedianFilter, ossimMemoryImageSource, ossimMultiBandHistogramTileSource, ossimOutputSource, ossimSubImageTileSource, ossimRgbToIndexFilter, ossimGdalOgrVectorAnnotation, ossimNBandToIndexFilter, ossimRLevelFilter, ossimElevationCellDatabase, ossimImageHistogramSource, ossimImageCacheBase, ossimNitf20Writer, ossimImageRenderer, ossimBandClipFilter, ossimPngWriter, ossimElevationDatabase, ossimConvolutionFilter1D, ossimKmlSuperOverlayWriter, ossimOpjJp2Writer, ossimHistogramWriter, ossimScalarRemapper, ossimKakaduJpipHandler, ossimTiledImageHandler, ossimValueAssignImageSourceFilter, ossimGeneralRasterWriter, ossimGdalWriter, ossimDtedElevationDatabase, ossimGeneralRasterElevationDatabase, ossimImageChainMtAdaptor, ossimBandSeparateHandler, ossimKakaduNitfWriter, ossimImageWriter, ossimSlopeFilter, ossimKakaduJp2Writer, ossimJpegWriter, ossimLocalCorrelationFusion, ossimFftFilter, ossimplugins::ossimTerraSarTiffReader, ossimSrtmElevationDatabase, ossimImageGaussianFilter, ossimSFIMFusion, ossimCacheTileSource, ossimGeoAnnotationSource, ossimplugins::ossimRadarSat2TiffReader, ossimLinearStretchRemapper, ossimDilationFilter, ossimEdgeFilter, ossimHsiRemapper, ossimSource, ossimEnviTileSource, ossimCastTileSourceFilter, ossimVectorRenderer, ossimTableRemapper, ossimImageHandlerMtAdaptor, ossim3x3ConvolutionFilter, ossimImageSourceFilter, ossimImageToPlaneNormalFilter, ossimRectangleCutFilter, ossimMaxMosaic, ossimImageSharpenFilter, ossimRgbToGreyFilter, ossimMapViewController, ossimElevationMosaic, ossimErosionFilter, ossimImageMosaic, ossimPolyCutter, ossimSrtmTileSource, ossimBrightnessMatch, ossimElevRemapper, ossimImageCombiner, ossimHistogramEqualization, ossimArcInfoGridWriter, ossimConvolutionSource, ossimHistogramThreshholdFilter, ossimImageSourceHistogramFilter, ossimTrimFilter, ossimLandsatTopoCorrectionFilter, ossimBlendMosaic, ossimQuickbirdNitfTileSource, ossimHistogramSource, ossimVpfAnnotationSource, ossimDespeckleFilter, and ossimEastingNorthingCutter.

Definition at line 1914 of file ossimConnectableObject.cpp.

References ossimKeywordlist::add(), ossimString::c_str(), CONNECTABLE_INPUT_LIST_FIXED_KW, CONNECTABLE_OUTPUT_LIST_FIXED_KW, ossimKeywordNames::DESCRIPTION_KW, ossimId::getId(), ossimKeywordNames::ID_KW, ossimKeywordNames::NUMBER_INPUTS_KW, ossimKeywordNames::NUMBER_OUTPUTS_KW, ossimObject::saveState(), theDescription, theId, theInputListIsFixedFlag, theInputObjectList, theOutputListIsFixedFlag, theOutputObjectList, and ossimString::toString().

Referenced by ossimIgenGenerator::generateChainForMultiInput(), ossimIgenGenerator::generateInputKwl(), ossimIgenGenerator::generateOutputKwl(), ossimSource::saveState(), ossimConnectableContainer::saveState(), and saveStateOfAllInputs().

1916 {
1917  ossimObject::saveState(kwl, prefix);
1918 
1919  kwl.add(prefix,
1921  theId.getId(),
1922  true);
1923 
1924  kwl.add(prefix,
1927  true);
1928 
1929  kwl.add(prefix,
1932  true);
1933 
1934  kwl.add(prefix,
1937  true);
1938 
1939  kwl.add(prefix,
1941  static_cast<ossim_uint32>(theInputObjectList.size()),
1942  true);
1943 
1944  kwl.add(prefix,
1946  static_cast<ossim_uint32>(theOutputObjectList.size()),
1947  true);
1948 
1949  ossim_int32 i = 0;
1950  for(i = 1; i <= (ossim_int32)theInputObjectList.size(); ++i)
1951  {
1952  ossimString value = "input_connection" + ossimString::toString(i);
1953 
1954  ossim_int32 id;
1955 
1956  if(theInputObjectList[i-1].valid())
1957  {
1958  id = theInputObjectList[i-1]->getId().getId();
1959  }
1960  else
1961  {
1962  id = -1;
1963  }
1964  kwl.add(prefix,
1965  value.c_str(),
1966  id,
1967  true);
1968  }
1969 
1970  for(i = 1; i <= (ossim_int32)theOutputObjectList.size(); ++i)
1971  {
1972  ossimString value = "output_connection" + ossimString::toString(i);
1973 
1974  ossim_int32 id;
1975 
1976  if(theOutputObjectList[i-1].valid())
1977  {
1978  id = theOutputObjectList[i-1]->getId().getId();
1979  }
1980  else
1981  {
1982  id = -1;
1983  }
1984  kwl.add(prefix,
1985  value.c_str(),
1986  id,
1987  true);
1988  }
1989 
1990  return true;
1991 }
const char * CONNECTABLE_INPUT_LIST_FIXED_KW
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Definition: ossimObject.cpp:95
static ossimString toString(bool aValue)
Numeric to string methods.
ossim_int64 getId() const
Definition: ossimId.h:29
static const char * NUMBER_INPUTS_KW
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
const char * CONNECTABLE_OUTPUT_LIST_FIXED_KW
ConnectableObjectList theInputObjectList
Holds a list of input objects.
static const char * DESCRIPTION_KW
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
bool theInputListIsFixedFlag
Indicates whether the theInputObjectList is fixed.
static const char * ID_KW
ConnectableObjectList theOutputObjectList
Holds a list of output objects.
bool theOutputListIsFixedFlag
Indicates whether the theOutputObjectList is fixed.
static const char * NUMBER_OUTPUTS_KW
int ossim_int32

◆ saveStateOfAllInputs()

ossim_uint32 ossimConnectableObject::saveStateOfAllInputs ( ossimKeywordlist kwl,
bool  saveThisStateFlag = true,
ossim_uint32  objectIndex = 1,
const char *  prefix = 0 
) const
virtual

Save the state of all inputs to a keyword list.

This will do a recursive call through all inputs and save their state to a keyword list.

Parameters
kwlKeyword list to save state to.
saveThisStateFlagIf the true the state of this object will be saved as well as all inputs. Default = true.
objectIndexIndex to be used for prefix. So if objectIndex = 1, the first object will have a prefix of: "object1." Default = 1.
prefixPrefix to tack onto keyword. If prefix = "myChain." and objectIndex = 1, then the first keyword would be "myChain.object1.some_keyword".
Returns
Returns the next object index. This is the last index used plus one. Used internally to keep track of index to use for prefix.

Definition at line 1993 of file ossimConnectableObject.cpp.

References ossimString::c_str(), getInput(), getNumberOfInputs(), saveState(), saveStateOfAllInputs(), and ossimString::toString().

Referenced by saveStateOfAllInputs().

1997 {
1998  ossim_uint32 index = objectIndex;
1999 
2000  const ossim_uint32 NUMBER_OF_INPUTS = getNumberOfInputs();
2001  if (NUMBER_OF_INPUTS)
2002  {
2003  // Save all the inputs.
2004  for(ossim_uint32 i = 0; i < NUMBER_OF_INPUTS; ++i)
2005  {
2006  const ossimConnectableObject* input = getInput(i);
2007  if(input)
2008  index = input->saveStateOfAllInputs(kwl, true, index, prefix);
2009  }
2010  }
2011 
2012  if (saveThisStateFlag)
2013  {
2014  ossimString myPrefix;
2015  if (prefix)
2016  myPrefix = prefix;
2017 
2018  myPrefix += "object" + ossimString::toString(index) + ".";
2019 
2020  // Save the state of this object.
2021  saveState(kwl, myPrefix.c_str());
2022  ++index;
2023  }
2024 
2025  return index;
2026 }
static ossimString toString(bool aValue)
Numeric to string methods.
virtual ossim_uint32 saveStateOfAllInputs(ossimKeywordlist &kwl, bool saveThisStateFlag=true, ossim_uint32 objectIndex=1, const char *prefix=0) const
Save the state of all inputs to a keyword list.
ossimConnectableObject * getInput(ossim_uint32 index=0)
returns the object at the specified index.
unsigned int ossim_uint32
virtual ossim_uint32 getNumberOfInputs() const
Returns the number of input objects.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const

◆ setDescription()

void ossimConnectableObject::setDescription ( const ossimString description)
virtual

◆ setId()

void ossimConnectableObject::setId ( const ossimId id)

All connectable objects will have id's.

This allows us to set the id of this object.

Definition at line 2298 of file ossimConnectableObject.cpp.

References theId.

Referenced by ossimConnectableContainer::makeUniqueIds(), and ossimImageChain::makeUniqueIds().

2299 {
2300  theId = id;
2301 }

◆ setNumberOfInputs()

void ossimConnectableObject::setNumberOfInputs ( ossim_int32  numberOfInputs)
virtual

Will set the number of inputs.

This will expand the list if the number of inputs is larger than the current number of inputs. Will shrink the list if the current number of inputs is larger than the passed in inputs.

Definition at line 1509 of file ossimConnectableObject.cpp.

References disconnectMyInputs(), and theInputObjectList.

Referenced by ossimImageChain::addLast(), ossimHistogramWriter::loadState(), ossimImageHistogramSource::loadState(), ossimMaskFilter::loadState(), loadState(), ossimConnectableObject(), ossimHistogramRemapper::ossimHistogramRemapper(), and ossimImageSourceHistogramFilter::ossimImageSourceHistogramFilter().

1510 {
1511  if((ossim_int32)theInputObjectList.size() == numberOfInputs)
1512  {
1513  return;
1514  }
1515  ossim_int32 i = 0;
1516  if(numberOfInputs < (ossim_int32)theInputObjectList.size())
1517  {
1519  theInputObjectList.begin()+numberOfInputs);
1520  ConnectableObjectList disconnectList;
1521 
1522  for(i = numberOfInputs;
1523  i < (ossim_int32)theInputObjectList.size();
1524  ++i)
1525  {
1526  if(theInputObjectList[i].valid())
1527  {
1528  disconnectList.push_back(theInputObjectList[i]);
1529  }
1530  }
1531  disconnectMyInputs(disconnectList);
1532 
1533  theInputObjectList.clear();
1534  theInputObjectList = v;
1535  }
1536  else
1537  {
1538  for(i = (ossim_int32)theInputObjectList.size();
1539  i < numberOfInputs;
1540  ++i)
1541  {
1542  theInputObjectList.push_back(0);
1543  }
1544  }
1545 }
virtual void disconnectMyInputs(ConnectableObjectList &inputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
ConnectableObjectList theInputObjectList
Holds a list of input objects.
int ossim_int32

◆ setNumberOfOutputs()

void ossimConnectableObject::setNumberOfOutputs ( ossim_int32  numberOfInputs)
virtual

Will set the number of outputs.

This will expand the list if the number of outputs is larger than the current number of outputs. Will shrink the list if the current number of outputs is larger than the passed in outputs.

Definition at line 1547 of file ossimConnectableObject.cpp.

References disconnectMyOutputs(), and theOutputObjectList.

Referenced by loadState(), and ossimConnectableObject().

1548 {
1549  if((ossim_int32)theOutputObjectList.size() == numberOfOutputs)
1550  {
1551  return;
1552  }
1553  ossim_int32 i = 0;
1554  if(numberOfOutputs < (ossim_int32)theOutputObjectList.size())
1555  {
1557  theOutputObjectList.begin()+numberOfOutputs);
1558  ConnectableObjectList disconnectList;
1559  for(i = numberOfOutputs;
1560  i < (ossim_int32)theOutputObjectList.size();
1561  ++i)
1562  {
1563  if(theOutputObjectList[i].valid())
1564  {
1565  disconnectList.push_back(theOutputObjectList[i]);
1566  }
1567  }
1568  disconnectMyOutputs(disconnectList);
1569 
1570  theOutputObjectList.clear();
1571  theOutputObjectList = v;
1572  }
1573  else
1574  {
1575  for(i = (ossim_int32)theOutputObjectList.size();
1576  i < numberOfOutputs;
1577  ++i)
1578  {
1579  theOutputObjectList.push_back(0);
1580  }
1581  }
1582 }
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
ConnectableObjectList theOutputObjectList
Holds a list of output objects.
int ossim_int32
virtual void disconnectMyOutputs(ConnectableObjectList &outputList, bool disconnectOutputFlag=true, bool createEventFlag=true)

◆ setProperty() [1/2]

void ossimConnectableObject::setProperty ( ossimRefPtr< ossimProperty property)
virtual

Reimplemented from ossimPropertyInterface.

Reimplemented in ossimImageHandler, ossimImageFileWriter, ossimImageSource, ossimLasReader, ossimTiffTileSource, ossimBumpShadeTileSource, ossimTiffOverviewBuilder, ossimGdalTileSource, ossimPixelFlipper, ossimPointCloudImageHandler, ossimNitfTileSource, ossimH5ImageHandler, ossimEquationCombiner, ossimMapCompositionSource, ossimOgrGdalTileSource, ossimHdf5ImageHandler, ossimMaskFilter, ossimMetadataFileWriter, ossimGdalOverviewBuilder, ossimWatermarkFilter, ossimWriter, ossimBandSelector, ossimPngReader, ossimImageRenderer, ossimPdfWriter, ossimKakaduNitfOverviewBuilder, ossimGpkgReader, ossimTiffWriter, ossimGpkgWriter, ossimRangeDomeTileSource, ossimNBandToIndexFilter, ossimPngWriter, ossimKmlSuperOverlayWriter, ossimOpjJp2Writer, ossimScalarRemapper, ossimHistogramMatchFilter, ossimPolyCutter, ossimBrightnessContrastSource, ossimKakaduNitfWriter, ossimGdalWriter, ossimGdalOgrVectorAnnotation, ossimKakaduJp2Writer, ossimJpegWriter, ossimMeanMedianFilter, ossimSlopeFilter, ossimCastTileSourceFilter, ossimConvolutionFilter1D, ossimKakaduJpipHandler, ossimCacheTileSource, ossimImageSourceFilter, ossimNitfWriter, ossimNitfWriterBase, ossimFftFilter, ossimSFIMFusion, ossimImageGaussianFilter, ossimImageToPlaneNormalFilter, ossimNitf20Writer, ossimEdgeFilter, ossimTrimFilter, ossimSource, ossimSICDToDetectedImage, ossimDilationFilter, ossimHsiRemapper, ossim3x3ConvolutionFilter, ossimImageSharpenFilter, ossimErosionFilter, ossimBrightnessMatch, and ossimDespeckleFilter.

Definition at line 1801 of file ossimConnectableObject.cpp.

References ossimProperty::getName(), theDescription, and ossimRefPtr< T >::valid().

Referenced by ossimSource::setProperty(), and ossimMetadataFileWriter::setProperty().

1802 {
1803  if(!property.valid()) return;
1804  if(property->getName() == "Description")
1805  {
1806  property->valueToString(theDescription);
1807  }
1808 }
bool valid() const
Definition: ossimRefPtr.h:75
const ossimString & getName() const

◆ setProperty() [2/2]

void ossimConnectableObject::setProperty ( const ossimString name,
const ossimString value 
)
virtual

Reimplemented from ossimPropertyInterface.

Definition at line 1810 of file ossimConnectableObject.cpp.

References ossimPropertyInterface::setProperty().

1811 {
1813 }
virtual void setProperty(const ossimString &name, const ossimString &value)

Member Data Documentation

◆ theDescription

ossimString ossimConnectableObject::theDescription
protected

◆ theId

ossimId ossimConnectableObject::theId
protected

◆ theInputListIsFixedFlag

bool ossimConnectableObject::theInputListIsFixedFlag
protected

◆ theInputObjectList

ConnectableObjectList ossimConnectableObject::theInputObjectList
protected

◆ theOutputListIsFixedFlag

bool ossimConnectableObject::theOutputListIsFixedFlag
protected

◆ theOutputObjectList

ConnectableObjectList ossimConnectableObject::theOutputObjectList
protected

◆ theOwner

ossimObject* ossimConnectableObject::theOwner
protected

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