Salome HOME
projects
/
modules
/
yacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge V9_dev
[modules/yacs.git]
/
src
/
runtime
/
SalomeContainer.cxx
diff --git
a/src/runtime/SalomeContainer.cxx
b/src/runtime/SalomeContainer.cxx
index 849e7e5af04b5bdcaecb99496c44153dc3222c8f..70b405be81ec278df2a943cf15461b75d9e080d7 100644
(file)
--- a/
src/runtime/SalomeContainer.cxx
+++ b/
src/runtime/SalomeContainer.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2006-201
4
CEA/DEN, EDF R&D
+// Copyright (C) 2006-201
6
CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@
-52,6
+52,10
@@
using namespace YACS::ENGINE;
using namespace std;
using namespace YACS::ENGINE;
using namespace std;
+const char SalomeContainer::KIND[]="Salome";
+
+const char SalomeContainer::TYPE_PROPERTY_STR[]="type";
+
SalomeContainer::SalomeContainer():_launchModeType(new SalomeContainerMonoHelper),_shutdownLevel(999)
{
}
SalomeContainer::SalomeContainer():_launchModeType(new SalomeContainerMonoHelper),_shutdownLevel(999)
{
}
@@
-64,9
+68,9
@@
SalomeContainer::SalomeContainer(const SalomeContainer& other)
{
}
{
}
-SalomeContainer::SalomeContainer(const Container& other, const SalomeContainerTools& sct, SalomeContainerHelper *lmt,
+SalomeContainer::SalomeContainer(const Container& other, const SalomeContainerTools& sct,
const
SalomeContainerHelper *lmt,
const std::vector<std::string>& componentNames, int shutdownLev):Container(other),_componentNames(componentNames),
const std::vector<std::string>& componentNames, int shutdownLev):Container(other),_componentNames(componentNames),
- _launchModeType(
lmt
),_shutdownLevel(shutdownLev),_sct(sct)
+ _launchModeType(
const_cast<SalomeContainerHelper *>(lmt)
),_shutdownLevel(shutdownLev),_sct(sct)
{
if(lmt)
lmt->incrRef();
{
if(lmt)
lmt->incrRef();
@@
-87,6
+91,11
@@
void SalomeContainer::unLock()
_mutex.unLock();
}
_mutex.unLock();
}
+std::string SalomeContainer::getKind() const
+{
+ return KIND;
+}
+
Container *SalomeContainer::clone() const
{
if(_isAttachedOnCloning)
Container *SalomeContainer::clone() const
{
if(_isAttachedOnCloning)
@@
-111,7
+120,14
@@
void SalomeContainer::checkCapabilityToDealWith(const ComponentInstance *inst) c
void SalomeContainer::setProperty(const std::string& name, const std::string& value)
{
void SalomeContainer::setProperty(const std::string& name, const std::string& value)
{
- if (name == "type")
+ if (name == AOC_ENTRY)
+ {
+ std::istringstream iss(value);
+ int val;
+ iss >> val;
+ setAttachOnCloningStatus((bool)val);
+ }
+ else if (name == TYPE_PROPERTY_STR)
{
if (value == SalomeContainerMonoHelper::TYPE_NAME)
{
{
if (value == SalomeContainerMonoHelper::TYPE_NAME)
{
@@
-125,13
+141,20
@@
void SalomeContainer::setProperty(const std::string& name, const std::string& va
}
else
throw Exception("SalomeContainer::setProperty : type value is not correct (mono or multi): " + value);
}
else
throw Exception("SalomeContainer::setProperty : type value is not correct (mono or multi): " + value);
- return ;
}
_sct.setProperty(name,value);
}
std::string SalomeContainer::getProperty(const std::string& name) const
{
}
_sct.setProperty(name,value);
}
std::string SalomeContainer::getProperty(const std::string& name) const
{
+ if (name == TYPE_PROPERTY_STR)
+ return _launchModeType->getType();
+ if (name==AOC_ENTRY)
+ {
+ int reti(_isAttachedOnCloning);
+ std::ostringstream oss; oss << reti;
+ return oss.str();
+ }
return _sct.getProperty(name);
}
return _sct.getProperty(name);
}