9e504f8f2b
PR: ports/62886 Submitted by: Sergey Matveychuk <sem@ciam.ru> (maintainer)
490 lines
16 KiB
Text
490 lines
16 KiB
Text
--- coss/lifecycle/Makefile.orig Mon Oct 13 13:49:23 2003
|
|
+++ coss/lifecycle/Makefile Sun Feb 15 21:15:07 2004
|
|
@@ -101,6 +101,8 @@
|
|
$(CXX) $(CXXFLAGS) $(LDFLAGS) genericfactory.o $(LDLIBS) -o genericfactory
|
|
$(POSTLD) $@
|
|
|
|
+idlcompile: CosLifeCycle.cc CosCompoundLifeCycle.cc CosLifeCycleContainment.cc CosLifeCycleReference.cc
|
|
+
|
|
CosLifeCycle.h CosLifeCycle.cc: \
|
|
../../include/coss/CosLifeCycle.idl $(IDL)
|
|
$(IDL) $(IDLFLAGS) --name CosLifeCycle \
|
|
@@ -149,6 +151,12 @@
|
|
$(IBINCMD) lifecontainmentd $(INSTDIR)/bin
|
|
$(IDIRCMD) $(INSTDIR)/bin
|
|
$(IBINCMD) lifereferenced $(INSTDIR)/bin
|
|
+ $(IDIRCMD) $(INSTDIR)/bin
|
|
+ $(IBINCMD) lifecriteriad $(INSTDIR)/bin
|
|
+ $(IDIRCMD) $(INSTDIR)/bin
|
|
+ $(IBINCMD) factoryfinderd $(INSTDIR)/bin
|
|
+ $(IDIRCMD) $(INSTDIR)/bin
|
|
+ $(IBINCMD) genericfactory $(INSTDIR)/bin
|
|
|
|
|
|
ifeq (.depend, $(wildcard .depend))
|
|
--- coss/lifecycle/FactoryFinder_impl.cc.orig Fri Jul 4 14:44:09 2003
|
|
+++ coss/lifecycle/FactoryFinder_impl.cc Fri Jul 4 16:44:03 2003
|
|
@@ -28,6 +28,8 @@
|
|
#include <coss/FactoryFinder_impl.h>
|
|
#include <string>
|
|
|
|
+using std::string;
|
|
+
|
|
FactoryFinder_impl::FactoryFinder_impl()
|
|
#ifndef _WIN32
|
|
: POA_CosLifeCycle::FactoryFinder ()
|
|
@@ -61,13 +63,13 @@
|
|
nm_obj = orb -> resolve_initial_references("NameService");
|
|
#ifdef HAVE_EXCEPTIONS
|
|
} catch(CORBA::ORB::InvalidName&) {
|
|
- cerr << "Can`t resolve Naming Service. Abort" << endl;
|
|
+ std::cerr << "Can`t resolve Naming Service. Abort" << std::endl;
|
|
exit(1);
|
|
}
|
|
#endif
|
|
if (CORBA::is_nil(nm_obj))
|
|
{
|
|
- cerr << "Can`t resolve Naming Service. Abort" << endl;
|
|
+ std::cerr << "Can`t resolve Naming Service. Abort" << std::endl;
|
|
exit(1);
|
|
}
|
|
naming_ = CosNaming::NamingContext::_narrow (nm_obj);
|
|
@@ -82,13 +84,13 @@
|
|
tr_obj = orb -> resolve_initial_references("TradingService");
|
|
#ifdef HAVE_EXCEPTIONS
|
|
} catch(CORBA::ORB::InvalidName&) {
|
|
- cerr << "Can`t resolve Trading Service. Abort" << endl;
|
|
+ std::cerr << "Can`t resolve Trading Service. Abort" << std::endl;
|
|
exit(1);
|
|
}
|
|
#endif
|
|
if (CORBA::is_nil(tr_obj))
|
|
{
|
|
- cerr << "Can`t resolve Trading Service. Abort" << endl;
|
|
+ std::cerr << "Can`t resolve Trading Service. Abort" << std::endl;
|
|
exit(1);
|
|
}
|
|
trader_ = CosTrading::Lookup::_narrow (tr_obj);
|
|
--- coss/lifecycle/GenericFactory_impl.cc.orig Fri Jul 4 14:47:28 2003
|
|
+++ coss/lifecycle/GenericFactory_impl.cc Fri Jul 4 16:19:21 2003
|
|
@@ -25,6 +25,7 @@
|
|
#include <CORBA.h>
|
|
#include <coss/GenericFactory_impl.h>
|
|
|
|
+using std::string;
|
|
|
|
GenericFactory_impl::GenericFactory_impl (void)
|
|
#ifndef _WIN32
|
|
@@ -58,13 +59,13 @@
|
|
nm_obj = orb -> resolve_initial_references("NameService");
|
|
#ifdef HAVE_EXCEPTIONS
|
|
} catch(CORBA::ORB::InvalidName&) {
|
|
- cerr << "Can`t resolve Naming Service. Abort" << endl;
|
|
+ std::cerr << "Can`t resolve Naming Service. Abort" << std::endl;
|
|
exit(1);
|
|
}
|
|
#endif
|
|
if (CORBA::is_nil(nm_obj))
|
|
{
|
|
- cerr << "Can`t resolve Naming Service. Abort" << endl;
|
|
+ std::cerr << "Can`t resolve Naming Service. Abort" << std::endl;
|
|
exit(1);
|
|
}
|
|
naming_ = CosNaming::NamingContext::_narrow (nm_obj);
|
|
@@ -79,13 +80,13 @@
|
|
tr_obj = orb -> resolve_initial_references("TradingService");
|
|
#ifdef HAVE_EXCEPTIONS
|
|
} catch(CORBA::ORB::InvalidName&) {
|
|
- cerr << "Can`t resolve Trading Service. Abort" << endl;
|
|
+ std::cerr << "Can`t resolve Trading Service. Abort" << std::endl;
|
|
exit(1);
|
|
}
|
|
#endif
|
|
if (CORBA::is_nil(tr_obj))
|
|
{
|
|
- cerr << "Can`t resolve Trading Service. Abort" << endl;
|
|
+ std::cerr << "Can`t resolve Trading Service. Abort" << std::endl;
|
|
exit(1);
|
|
}
|
|
trader_ = CosTrading::Lookup::_narrow (tr_obj);
|
|
@@ -404,8 +405,8 @@
|
|
if (!strcmp(factory_key[3].id.in(),""))
|
|
return CORBA::Object::_nil();
|
|
|
|
- CORBA::String_var filter_ = (char *)NULL;
|
|
- CORBA::String_var preferences = (char *)NULL;
|
|
+ const char* filter_ = NULL;
|
|
+ const char* preferences = NULL;
|
|
CORBA::ULong i;
|
|
for(i = 0;i < the_criteria.length();++i)
|
|
if (!strcmp(the_criteria[i].name,"filter"))
|
|
@@ -505,13 +506,13 @@
|
|
add_ += filter;
|
|
filter = add_;
|
|
}
|
|
- if (filter.size() && filter_.in())
|
|
+ if (filter.size() && filter_ != NULL)
|
|
{
|
|
string add_;
|
|
add_ += "(";
|
|
add_ += filter;
|
|
add_ += ") and ";
|
|
- add_ += filter_.in();
|
|
+ add_ += filter_;
|
|
filter = add_;
|
|
}
|
|
|
|
--- coss/lifecycle/Operations_impl.cc.orig Fri Jul 4 16:41:53 2003
|
|
+++ coss/lifecycle/Operations_impl.cc Fri Jul 4 16:42:53 2003
|
|
@@ -30,9 +30,9 @@
|
|
#include <list>
|
|
#include <algorithm>
|
|
|
|
-typedef map<RoleKey,CosGraphs::Role_ptr,less<RoleKey> > WorkedRoles;
|
|
-typedef list<CosObjectIdentity::ObjectIdentifier> WorkedRelationships;
|
|
-typedef list<CosGraphs::Traversal::TraversalScopedId> WorkedNodes;
|
|
+typedef std::map<RoleKey,CosGraphs::Role_ptr,std::less<RoleKey> > WorkedRoles;
|
|
+typedef std::list<CosObjectIdentity::ObjectIdentifier> WorkedRelationships;
|
|
+typedef std::list<CosGraphs::Traversal::TraversalScopedId> WorkedNodes;
|
|
|
|
Operations_impl::Operations_impl()
|
|
#ifndef _WIN32
|
|
@@ -142,7 +142,7 @@
|
|
#endif
|
|
for(CORBA::ULong i = 0;i < (*OriginalEdgeList).length();++i)
|
|
{
|
|
- if (find(workedRelationships.begin(),
|
|
+ if (std::find(workedRelationships.begin(),
|
|
workedRelationships.end(),
|
|
(*OriginalEdgeList)[i].the_relationship.scoped_relationship.constant_random_id) !=
|
|
workedRelationships.end())
|
|
@@ -251,7 +251,7 @@
|
|
ex.reason = CORBA::string_dup("Node not supported CosCompoundLifeCycle::Node interface.");
|
|
mico_throw (ex);
|
|
}
|
|
- if (find(MovedNodes.begin(),MovedNodes.end(),(*OriginalEdgeList)[i].from.point.the_node.constant_random_id) !=
|
|
+ if (std::find(MovedNodes.begin(),MovedNodes.end(),(*OriginalEdgeList)[i].from.point.the_node.constant_random_id) !=
|
|
MovedNodes.end())
|
|
continue;
|
|
current_node_ptr->move_node(there,the_criteria);
|
|
@@ -290,7 +290,7 @@
|
|
|
|
for(CORBA::ULong i = 0;i < (*OriginalEdgeList).length();++i)
|
|
{
|
|
- if (find(Rel4Remove.begin(),Rel4Remove.end(),
|
|
+ if (std::find(Rel4Remove.begin(),Rel4Remove.end(),
|
|
(*OriginalEdgeList)[i].the_relationship.scoped_relationship.constant_random_id) !=
|
|
Rel4Remove.end())
|
|
continue;
|
|
@@ -316,7 +316,7 @@
|
|
#endif
|
|
for(CORBA::ULong i = 0;i < (*OriginalEdgeList).length();++i)
|
|
{
|
|
- if (find(Nodes4Remove.begin(),Nodes4Remove.end(),(*OriginalEdgeList)[i].from.point.the_node.constant_random_id) !=
|
|
+ if (std::find(Nodes4Remove.begin(),Nodes4Remove.end(),(*OriginalEdgeList)[i].from.point.the_node.constant_random_id) !=
|
|
Nodes4Remove.end())
|
|
continue;
|
|
CosCompoundLifeCycle::Node_ptr tmp_node_ptr =
|
|
--- coss/lifecycle/RegisterHelper.cc.orig Fri Jul 4 16:44:17 2003
|
|
+++ coss/lifecycle/RegisterHelper.cc Fri Jul 4 16:45:17 2003
|
|
@@ -45,7 +45,7 @@
|
|
#ifdef HAVE_EXCEPTIONS
|
|
} catch(CORBA::ORB::InvalidName&) {
|
|
#if DEBUG
|
|
- cerr << "Can`t resolve Naming Service." << endl;
|
|
+ std::cerr << "Can`t resolve Naming Service." << std::endl;
|
|
#endif
|
|
}
|
|
#endif
|
|
@@ -64,7 +64,7 @@
|
|
#ifdef HAVE_EXCEPTIONS
|
|
} catch(CORBA::ORB::InvalidName&) {
|
|
#if DEBUG
|
|
- cerr << "Can`t resolve Trading Service." << endl;
|
|
+ std::cerr << "Can`t resolve Trading Service." << std::endl;
|
|
#endif
|
|
}
|
|
#endif
|
|
@@ -121,14 +121,14 @@
|
|
{
|
|
if (CORBA::is_nil(_obj))
|
|
{
|
|
- cerr << "Can`t resolve Naming Service. Abort" << endl;
|
|
- return FALSE;
|
|
+ std::cerr << "Can`t resolve Naming Service. Abort" << std::endl;
|
|
+ return FALSE;
|
|
}
|
|
CosNaming::NamingContext_var nc = CosNaming::NamingContext::_narrow(_obj);
|
|
if (CORBA::is_nil(nc.in()))
|
|
{
|
|
- cerr << "Invalid Naming Service. Abort" << endl;
|
|
- return FALSE;
|
|
+ std::cerr << "Invalid Naming Service. Abort" << std::endl;
|
|
+ return FALSE;
|
|
}
|
|
CosNaming::Name full(4);
|
|
full.length(4);
|
|
@@ -173,14 +173,14 @@
|
|
{
|
|
if (CORBA::is_nil(_obj))
|
|
{
|
|
- cerr << "Can`t resolve Trading Service. Abort" << endl;
|
|
+ std::cerr << "Can`t resolve Trading Service. Abort" << std::endl;
|
|
return FALSE;
|
|
}
|
|
CosTrading::Lookup_var trader_ = CosTrading::Lookup::_narrow (_obj);
|
|
CosTrading::Register_var reg = trader_->register_if();
|
|
if (CORBA::is_nil(reg))
|
|
{
|
|
- cerr << "Invalid Trading Service. Abort" << endl;
|
|
+ std::cerr << "Invalid Trading Service. Abort" << std::endl;
|
|
return FALSE;
|
|
}
|
|
CORBA::Object_var obj = trader_->type_repos();
|
|
@@ -188,7 +188,7 @@
|
|
CosTradingRepos::ServiceTypeRepository::_narrow(obj);
|
|
if (CORBA::is_nil(repo))
|
|
{
|
|
- cerr << "Invalid Trading Service. Abort" << endl;
|
|
+ std::cerr << "Invalid Trading Service. Abort" << std::endl;
|
|
return FALSE;
|
|
}
|
|
|
|
--- coss/lifecycle/lifenoded.cc.orig Fri Jul 4 17:16:08 2003
|
|
+++ coss/lifecycle/lifenoded.cc Fri Jul 4 17:17:41 2003
|
|
@@ -36,8 +36,8 @@
|
|
static void
|
|
usage(const char* progName)
|
|
{
|
|
- cerr << "Usage:\n";
|
|
- cerr << progName << " [options]\n"
|
|
+ std::cerr << "Usage:\n";
|
|
+ std::cerr << progName << " [options]\n"
|
|
"\n"
|
|
"Options:\n"
|
|
"-h, --help Show this message.\n"
|
|
@@ -66,7 +66,7 @@
|
|
else if(strcmp(argv[i], "--version") == 0 ||
|
|
strcmp(argv[i], "-v") == 0)
|
|
{
|
|
- cerr << "Version of CosCompoundLifeCycle::Node Service Factories is " << MICO_VERSION << endl;
|
|
+ std::cerr << "Version of CosCompoundLifeCycle::Node Service Factories is " << MICO_VERSION << std::endl;
|
|
return 0;
|
|
}
|
|
else if(strcmp(argv[i], "--with-naming") == 0 ||
|
|
@@ -81,8 +81,8 @@
|
|
}
|
|
else
|
|
{
|
|
- cerr << progName << ": unknown option `"
|
|
- << argv[i] << "'\n" << endl;
|
|
+ std::cerr << progName << ": unknown option `"
|
|
+ << argv[i] << "'\n" << std::endl;
|
|
usage(progName);
|
|
return 1;
|
|
}
|
|
--- coss/lifecycle/lifecontainmentd.cc.orig Fri Jul 4 17:22:32 2003
|
|
+++ coss/lifecycle/lifecontainmentd.cc Fri Jul 4 17:23:15 2003
|
|
@@ -36,8 +36,8 @@
|
|
static void
|
|
usage(const char* progName)
|
|
{
|
|
- cerr << "Usage:\n";
|
|
- cerr << progName << " [options]\n"
|
|
+ std::cerr << "Usage:\n";
|
|
+ std::cerr << progName << " [options]\n"
|
|
"\n"
|
|
"Options:\n"
|
|
"-h, --help Show this message.\n"
|
|
@@ -65,7 +65,7 @@
|
|
else if(strcmp(argv[i], "--version") == 0 ||
|
|
strcmp(argv[i], "-v") == 0)
|
|
{
|
|
- cerr << "Version of CosLifeCycleContainment Service Factories is " << MICO_VERSION << endl;
|
|
+ std::cerr << "Version of CosLifeCycleContainment Service Factories is " << MICO_VERSION << std::endl;
|
|
return 0;
|
|
}
|
|
else if(strcmp(argv[i], "--with-naming") == 0 ||
|
|
@@ -80,8 +80,8 @@
|
|
}
|
|
else
|
|
{
|
|
- cerr << progName << ": unknown option `"
|
|
- << argv[i] << "'\n" << endl;
|
|
+ std::cerr << progName << ": unknown option `"
|
|
+ << argv[i] << "'\n" << std::endl;
|
|
usage(progName);
|
|
return 1;
|
|
}
|
|
--- coss/lifecycle/lifereferenced.cc.orig Fri Jul 4 17:24:49 2003
|
|
+++ coss/lifecycle/lifereferenced.cc Fri Jul 4 17:25:32 2003
|
|
@@ -36,8 +36,8 @@
|
|
static void
|
|
usage(const char* progName)
|
|
{
|
|
- cerr << "Usage:\n";
|
|
- cerr << progName << " [options]\n"
|
|
+ std::cerr << "Usage:\n";
|
|
+ std::cerr << progName << " [options]\n"
|
|
"\n"
|
|
"Options:\n"
|
|
"-h, --help Show this message.\n"
|
|
@@ -67,7 +67,7 @@
|
|
else if(strcmp(argv[i], "--version") == 0 ||
|
|
strcmp(argv[i], "-v") == 0)
|
|
{
|
|
- cerr << "Version of CosLifeCycleReference Service Factories is " << MICO_VERSION << endl;
|
|
+ std::cerr << "Version of CosLifeCycleReference Service Factories is " << MICO_VERSION << std::endl;
|
|
return 0;
|
|
}
|
|
else if(strcmp(argv[i], "--with-naming") == 0 ||
|
|
@@ -82,8 +82,8 @@
|
|
}
|
|
else
|
|
{
|
|
- cerr << progName << ": unknown option `"
|
|
- << argv[i] << "'\n" << endl;
|
|
+ std::cerr << progName << ": unknown option `"
|
|
+ << argv[i] << "'\n" << std::endl;
|
|
usage(progName);
|
|
return 1;
|
|
}
|
|
--- coss/lifecycle/operationd.cc.orig Fri Jul 4 17:26:48 2003
|
|
+++ coss/lifecycle/operationd.cc Fri Jul 4 17:27:22 2003
|
|
@@ -30,8 +30,8 @@
|
|
static void
|
|
usage(const char* progName)
|
|
{
|
|
- cerr << "Usage:\n";
|
|
- cerr << progName << " [options]\n"
|
|
+ std::cerr << "Usage:\n";
|
|
+ std::cerr << progName << " [options]\n"
|
|
"\n"
|
|
"Options:\n"
|
|
"-h, --help Show this message.\n"
|
|
@@ -56,13 +56,13 @@
|
|
else if(strcmp(argv[i], "--version") == 0 ||
|
|
strcmp(argv[i], "-v") == 0)
|
|
{
|
|
- cerr << "Version of CosCompoundLifeCycle::OperationsFactory Service is " << MICO_VERSION << endl;
|
|
+ std::cerr << "Version of CosCompoundLifeCycle::OperationsFactory Service is " << MICO_VERSION << std::endl;
|
|
return 0;
|
|
}
|
|
else
|
|
{
|
|
- cerr << progName << ": unknown option `"
|
|
- << argv[i] << "'\n" << endl;
|
|
+ std::cerr << progName << ": unknown option `"
|
|
+ << argv[i] << "'\n" << std::endl;
|
|
usage(progName);
|
|
return 1;
|
|
}
|
|
--- coss/lifecycle/lifecriteriad.cc.orig Fri Jul 4 17:29:24 2003
|
|
+++ coss/lifecycle/lifecriteriad.cc Fri Jul 4 17:29:58 2003
|
|
@@ -38,8 +38,8 @@
|
|
static void
|
|
usage(const char* progName)
|
|
{
|
|
- cerr << "Usage:\n";
|
|
- cerr << progName << " [options]\n"
|
|
+ std::cerr << "Usage:\n";
|
|
+ std::cerr << progName << " [options]\n"
|
|
"\n"
|
|
"Options:\n"
|
|
"-h, --help Show this message.\n"
|
|
@@ -64,13 +64,13 @@
|
|
else if(strcmp(argv[i], "--version") == 0 ||
|
|
strcmp(argv[i], "-v") == 0)
|
|
{
|
|
- cerr << "Version of CosCompoundLifeCycle::PropagationCriteriaFactory Service is " << MICO_VERSION << endl;
|
|
+ std::cerr << "Version of CosCompoundLifeCycle::PropagationCriteriaFactory Service is " << MICO_VERSION << std::endl;
|
|
return 0;
|
|
}
|
|
else
|
|
{
|
|
- cerr << progName << ": unknown option `"
|
|
- << argv[i] << "'\n" << endl;
|
|
+ std::cerr << progName << ": unknown option `"
|
|
+ << argv[i] << "'\n" << std::endl;
|
|
usage(progName);
|
|
return 1;
|
|
}
|
|
--- coss/lifecycle/factoryfinderd.cc.orig Fri Jul 4 17:31:06 2003
|
|
+++ coss/lifecycle/factoryfinderd.cc Fri Jul 4 17:31:36 2003
|
|
@@ -29,8 +29,8 @@
|
|
static void
|
|
usage(const char* progName)
|
|
{
|
|
- cerr << "Usage:\n";
|
|
- cerr << progName << " [options]\n"
|
|
+ std::cerr << "Usage:\n";
|
|
+ std::cerr << progName << " [options]\n"
|
|
"\n"
|
|
"Options:\n"
|
|
"-h, --help Show this message.\n"
|
|
@@ -58,7 +58,7 @@
|
|
else if(strcmp(argv[i], "--version") == 0 ||
|
|
strcmp(argv[i], "-v") == 0)
|
|
{
|
|
- cerr << "Version of CosLifeCycle::FactoryFinder Service is " << MICO_VERSION << endl;
|
|
+ std::cerr << "Version of CosLifeCycle::FactoryFinder Service is " << MICO_VERSION << std::endl;
|
|
return 0;
|
|
}
|
|
else if(strcmp(argv[i], "--with-naming") == 0 ||
|
|
@@ -69,8 +69,8 @@
|
|
type = RegisterHelper::trading;
|
|
else
|
|
{
|
|
- cerr << progName << ": unknown option `"
|
|
- << argv[i] << "'\n" << endl;
|
|
+ std::cerr << progName << ": unknown option `"
|
|
+ << argv[i] << "'\n" << std::endl;
|
|
usage(progName);
|
|
return 1;
|
|
}
|
|
--- coss/lifecycle/genericfactory.cc.orig Fri Jul 4 17:32:54 2003
|
|
+++ coss/lifecycle/genericfactory.cc Fri Jul 4 17:33:21 2003
|
|
@@ -29,8 +29,8 @@
|
|
static void
|
|
usage(const char* progName)
|
|
{
|
|
- cerr << "Usage:\n";
|
|
- cerr << progName << " [options]\n"
|
|
+ std::cerr << "Usage:\n";
|
|
+ std::cerr << progName << " [options]\n"
|
|
"\n"
|
|
"Options:\n"
|
|
"-h, --help Show this message.\n"
|
|
@@ -58,7 +58,7 @@
|
|
else if(strcmp(argv[i], "--version") == 0 ||
|
|
strcmp(argv[i], "-v") == 0)
|
|
{
|
|
- cerr << "Version of CosLifeCycle::GenericFactory Service is " << MICO_VERSION << endl;
|
|
+ std::cerr << "Version of CosLifeCycle::GenericFactory Service is " << MICO_VERSION << std::endl;
|
|
return 0;
|
|
}
|
|
else if(strcmp(argv[i], "--with-naming") == 0 ||
|
|
@@ -69,8 +69,8 @@
|
|
type = RegisterHelper::trading;
|
|
else
|
|
{
|
|
- cerr << progName << ": unknown option `"
|
|
- << argv[i] << "'\n" << endl;
|
|
+ std::cerr << progName << ": unknown option `"
|
|
+ << argv[i] << "'\n" << std::endl;
|
|
usage(progName);
|
|
return 1;
|
|
}
|
|
--- include/coss/CosLifeCycle.idl.orig Tue Oct 14 04:25:27 2003
|
|
+++ include/coss/CosLifeCycle.idl Tue Oct 14 04:21:38 2003
|
|
@@ -24,8 +24,8 @@
|
|
// The purpose of the life cycle service is to
|
|
|
|
typedef CosNaming::Name Key;
|
|
- typedef Object Factory;
|
|
- typedef sequence <Factory> Factories;
|
|
+ typedef Object Factory_;
|
|
+ typedef sequence <Factory_> Factories;
|
|
|
|
typedef struct NVP
|
|
{
|