JobCPathConnectionHelper Class Reference

List of all members.

Public Member Functions

 JobCPathConnectionHelper (const JobCPath *p)
void BuildConnectionList (const JobCPath *p1)
void PreenConnectionList ()
ostream & DoPrint (ostream &os)
void DoHandleResult (const JobCResult &r)
void DoBeginJob ()
void SetRefreshMode (bool m)

Private Attributes

vector< const JobCPath * > fConnectionList

Detailed Description

Definition at line 33 of file JobCPath.cxx.


Constructor & Destructor Documentation

JobCPathConnectionHelper::JobCPathConnectionHelper ( const JobCPath p  )  [inline]

Definition at line 39 of file JobCPath.cxx.

00039                                               {
00040     this->BuildConnectionList(p);
00041     this->PreenConnectionList();
00042   }


Member Function Documentation

void JobCPathConnectionHelper::BuildConnectionList ( const JobCPath p1  )  [inline]

Definition at line 43 of file JobCPath.cxx.

References JobCGraphVtx::GetAttached().

00043                                                {
00044     // Recursively find all paths attached to p1
00045     fConnectionList.push_back(p1);
00046     for (int i=0; void *v=p1->GetAttached(i); ++i) {
00047       JobCPath *p2 = static_cast<JobCPath*>(v);
00048       this->BuildConnectionList(p2);
00049     }
00050   }

void JobCPathConnectionHelper::DoBeginJob (  )  [inline]

Definition at line 75 of file JobCPath.cxx.

Referenced by JobCPath::Run().

00075                     {
00076     // Alert everyone in the list to the start of job
00077     vector<const JobCPath*>::iterator itr(fConnectionList.begin());
00078     vector<const JobCPath*>::iterator itrEnd(fConnectionList.end());
00079     for (; itr!=itrEnd; ++itr) {
00080       if (*itr) (*itr)->BeginJob();
00081     }
00082   }

void JobCPathConnectionHelper::DoHandleResult ( const JobCResult r  )  [inline]

Definition at line 67 of file JobCPath.cxx.

Referenced by JobCPath::PropagateResult().

00067                                            {
00068     // Alert everyone in the list to the status change
00069     vector<const JobCPath*>::iterator itr(fConnectionList.begin());
00070     vector<const JobCPath*>::iterator itrEnd(fConnectionList.end());
00071     for (; itr!=itrEnd; ++itr) {
00072       if (*itr) (*itr)->HandleResult(r);
00073     }
00074   }

ostream& JobCPathConnectionHelper::DoPrint ( ostream &  os  )  [inline]

Definition at line 60 of file JobCPath.cxx.

Referenced by operator<<().

00060                                 {
00061     // Print everyone in the list
00062     vector<const JobCPath*>::iterator itr(fConnectionList.begin());
00063     vector<const JobCPath*>::iterator itrEnd(fConnectionList.end());
00064     for (; itr!=itrEnd; ++itr) if (*itr) (*itr)->Print(os);
00065     return os;
00066   }

void JobCPathConnectionHelper::PreenConnectionList (  )  [inline]

Definition at line 51 of file JobCPath.cxx.

References size.

00051                              {
00052     // Eliminate duplicates, keeping the deeper of the two occurances
00053     int size = fConnectionList.size();
00054     for (int i=0; i<size-1; ++i) {
00055       for (int j=i+1; j<size; ++j) {
00056         if (fConnectionList[i] == fConnectionList[j]) fConnectionList[i] = 0;
00057       }
00058     }
00059   }

void JobCPathConnectionHelper::SetRefreshMode ( bool  m  )  [inline]

Definition at line 83 of file JobCPath.cxx.

Referenced by JobCPath::PropagateRefreshMode().

00083                               {
00084     // Alert everyone in the list that we're running in refresh mode
00085     vector<const JobCPath*>::iterator itr(fConnectionList.begin());
00086     vector<const JobCPath*>::iterator itrEnd(fConnectionList.end());
00087     for (; itr!=itrEnd; ++itr) {
00088       if (*itr) (*itr)->SetRefreshMode(m);
00089     }
00090   }


Member Data Documentation

Definition at line 92 of file JobCPath.cxx.


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

Generated on 24 Jul 2018 for loon by  doxygen 1.6.1