#include <Broker.h>
Collaboration diagram for Broker:
Public Member Functions | |
Broker () | |
Broker (const string name) | |
~Broker () | |
const int | getCounter () |
const string | getServerName () |
bool | convertDocument (Document &doc) |
Result | getConversionListing () |
Result | getRepresentationTypeListing (string representationType) |
Result | getFeatureTypeListing (string featureType) |
Private Member Functions | |
void | increaseCounter () |
void | decreaseCounter () |
Private Attributes | |
string | serverName |
Static Private Attributes | |
int | brokerCounter = 0 |
const string | DEFAULT_NAME = "127.0.0.1" |
|
Definition at line 49 of file Broker.cpp. References DEFAULT_NAME, increaseCounter(), and serverName.
00050 { 00051 // assign static address and ip. 00052 serverName = DEFAULT_NAME; 00053 Broker::increaseCounter(); 00054 return; 00055 } |
Here is the call graph for this function:
|
Definition at line 66 of file Broker.cpp. References increaseCounter(), and serverName.
00067 { 00068 // assign static address and ip. 00069 serverName = name; 00070 Broker::increaseCounter(); 00071 return; 00072 } |
Here is the call graph for this function:
|
Definition at line 82 of file Broker.cpp. References decreaseCounter().
00083 { 00084 // remove ourselves from the list. 00085 Broker::decreaseCounter(); 00086 return; 00087 } |
Here is the call graph for this function:
|
Definition at line 129 of file Broker.cpp. References Document::getDocumentConversion(), Server::requestConversion(), and serverName. Referenced by main(), and DocConversionTestSuite::testConvertDocument().
00130 { 00131 // check if conversion is set. 00132 if ( doc.getDocumentConversion() == "0" ) 00133 { 00134 00135 // conversion has not been set, error out. 00136 cout << "Broker Error: no conversion has been assigned to this Document yet..."; 00137 cout << endl; 00138 return false; 00139 } 00140 00141 // need to have a server now. 00142 Server myConversionServer( serverName ); 00143 00144 if ( !( myConversionServer.requestConversion( doc ) ) ) 00145 { 00146 cout << "Broker Error: File was not converted by Server..." << endl; 00147 return false; 00148 ; 00149 } 00150 else 00151 { 00152 return true; 00153 } 00154 } |
Here is the call graph for this function:
|
Definition at line 177 of file Broker.cpp. References brokerCounter. Referenced by ~Broker().
00178 { 00179 if ( brokerCounter == 1 ) 00180 { 00181 brokerCounter = 0; 00182 return; 00183 } 00184 00185 brokerCounter--; 00186 return; 00187 } |
|
Definition at line 205 of file Broker.cpp. References Server::listConversionDB(), and serverName. Referenced by main(), and DocConversionTestSuite::testListConversionDB().
00206 { 00207 // 00208 // Just call the server to do the work and assume it works.. 00209 // 00210 Server myConversionServer( serverName ); 00211 Result myResultsListing = myConversionServer.listConversionDB(); 00212 return myResultsListing; 00213 } |
Here is the call graph for this function:
|
Definition at line 97 of file Broker.cpp. References brokerCounter. Referenced by DocConversionTestSuite::testDecreaseCounter(), DocConversionTestSuite::testGetCounter(), and DocConversionTestSuite::testIncreaseCounter().
00098 { 00099 return brokerCounter; 00100 }; |
|
Definition at line 259 of file Broker.cpp. References Server::listFeatureTypes(), and serverName. Referenced by main(), and DocConversionTestSuite::testServerFeatureTypeQuery().
00260 { 00261 // 00262 // Just call the server to do the work and assume it works.. 00263 // 00264 Server myConversionServer( serverName ); 00265 Result myFeatureTypeListing = myConversionServer.listFeatureTypes( featureType ); 00266 return myFeatureTypeListing; 00267 } |
Here is the call graph for this function:
|
Definition at line 232 of file Broker.cpp. References Server::listRepesentationTypes(), and serverName. Referenced by main(), and DocConversionTestSuite::testServerRepresentationTypeQuery().
00233 { 00234 // 00235 // Just call the server to do the work and assume it works.. 00236 // 00237 Server myConversionServer( serverName ); 00238 Result myRepTypeListing = myConversionServer.listRepesentationTypes( representationType ); 00239 return myRepTypeListing; 00240 } |
Here is the call graph for this function:
|
Definition at line 111 of file Broker.cpp. References serverName. Referenced by DocConversionTestSuite::testBrokerRemoteServer().
00112 { 00113 return serverName; 00114 } |
|
Definition at line 164 of file Broker.cpp. References brokerCounter. Referenced by Broker().
00165 { 00166 brokerCounter++; 00167 } |
|
Definition at line 37 of file Broker.cpp. Referenced by decreaseCounter(), getCounter(), and increaseCounter(). |
|
Definition at line 38 of file Broker.cpp. Referenced by Broker(). |
|
Definition at line 164 of file Broker.h. Referenced by Broker(), convertDocument(), getConversionListing(), getFeatureTypeListing(), getRepresentationTypeListing(), and getServerName(). |