Changeset 4476
- Timestamp:
- 07/19/07 14:47:18 (6 years ago)
- Location:
- components/FileInput/trunk/FileInput
- Files:
-
- 2 modified
-
FileInput.spd.xml (modified) (1 diff)
-
main.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
components/FileInput/trunk/FileInput/FileInput.spd.xml
r4391 r4476 12 12 </author> 13 13 <propertyfile type="PRF"> 14 <localfile name=" xml/FileInput/FileInput.prf.xml"/>14 <localfile name="FileInput.prf.xml"/> 15 15 </propertyfile> 16 16 <descriptor> 17 <localfile name=" xml/FileInput/FileInput.scd.xml"/>17 <localfile name="FileInput.scd.xml"/> 18 18 </descriptor> 19 19 <implementation id="DCE:3855c5c0-6db5-11db-b780-00123f63025f" aepcompliance="aep_compliant"> 20 <description>Default Description</description>20 <description>Default implementation description</description> 21 21 <code type="Executable"> 22 <localfile name=" bin/FileInput"/>22 <localfile name="/bin/FileInput"/> 23 23 </code> 24 24 <processor name="x86"/> -
components/FileInput/trunk/FileInput/main.cpp
r2575 r4476 22 22 23 23 #include <iostream> 24 24 25 #include "ossie/ossieSupport.h" 25 26 #include "ossie/debug.h" … … 27 28 #include "FileInput.h" 28 29 30 29 31 int main(int argc, char* argv[]) 30 32 31 33 { 34 ossieDebugLevel = 3; 35 32 36 ossieSupport::ORB *orb = new ossieSupport::ORB; 33 37 omni_mutex component_running_mutex; 34 38 omni_condition *component_running = new omni_condition(&component_running_mutex); 35 39 36 ossieDebugLevel = 5; 37 38 if (argc != 3) { 39 std::cout << argv[0] << " <id> <usage name> " << std::endl; 40 exit (-1); 41 } 42 43 char *uuid = argv[1]; 44 char *label = argv[2]; 45 46 DEBUG(1, FileInput, "Identifier - " << uuid << " Label - " << label) 40 ossieSupport::ossieComponent fileinput(orb, argc, argv); 47 41 48 42 FileInput_i* fileinput_servant; … … 51 45 // Create the fileinput component servant and object reference 52 46 53 fileinput_servant = new FileInput_i( uuid, component_running);47 fileinput_servant = new FileInput_i(fileinput.getUuid(), component_running); 54 48 fileinput_var = fileinput_servant->_this(); 55 fileinput_servant->post_constructor(fileinput_var);56 49 57 orb->bind_object_to_name((CORBA::Object_ptr) fileinput_var, label); 50 PortableServer::ObjectId_var servantId = orb->poa->reference_to_id(fileinput_var); 51 52 fileinput.bind(fileinput_var); 58 53 59 54 // This bit is ORB specific … … 63 58 64 59 component_running->wait(); 65 orb->unbind_name(label); 60 61 fileinput.unbind(); 62 63 DEBUG(4, FileInput, "Deactivate object."); 64 orb->poa->deactivate_object(servantId); 65 66 DEBUG(4, FileInput, "Destroy POA."); 67 orb->poa->destroy(false, false); 68 69 DEBUG(4, FileInput, "Shutdown orb."); 66 70 orb->orb->shutdown(0); 67 71