Commit 3e77bf0d authored by Gilles MARCKMANN's avatar Gilles MARCKMANN

Due to GIT mystery files xAttachableXXX.* were moved to target directories but...

Due to GIT mystery files xAttachableXXX.* were moved to target directories but not remove form xFEM/src. Now they are moved to attic.
parent 3fb4eab2
/*
This file is a part of eXlibris C++ Library
under the GNU Lesser General Public License.
See the NOTICE.md & LICENSE.md files for terms
and conditions.
*/
#include "xAttachableString.h"
// AOMD
#include <mEntity.h>
namespace xfem
{
// get attached data of type xAttachableString
std::string &getAttachedString(AOMD::mEntity *e, unsigned int tag)
{
xAttachableString *a = (xAttachableString *)(e->getData(tag));
if (!a)
{
a = new xAttachableString;
e->attachData(tag, a);
}
return a->s;
}
// set attached data of type xAttachableString
void attachString(AOMD::mEntity *e, unsigned int tag, const std::string &s)
{
xAttachableString *a = (xAttachableString *)(e->getData(tag));
if (!a)
{
a = new xAttachableString;
e->attachData(tag, a);
}
a->s = s;
return;
}
} // namespace xfem
/*
This file is a part of eXlibris C++ Library
under the GNU Lesser General Public License.
See the NOTICE.md & LICENSE.md files for terms
and conditions.
*/
#ifndef ___XENTITIESSETCONTAINER_H
#define ___XENTITIESSETCONTAINER_H
#include <set>
#include "mAttachableDataContainer.h"
#include "mEntity.h"
namespace xfem
{
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////// xAttachableEntitiesSet class
//////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class xAttachableEntitiesSet : public AOMD::mAttachableData
{
public:
xAttachableEntitiesSet() __attribute__((deprecated)) = default;
~xAttachableEntitiesSet() override = default;
// public methodes ///////////////
// public members ////////////////
std::set<AOMD::mEntity *> vect;
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////// End xAttachableEntitiesSet class
//////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// get attached data of type xAttachableEntitiesSet
std::set<AOMD::mEntity *> *getAttachedEntitiesSet(AOMD::mEntity *e, unsigned int tag) __attribute__((deprecated));
inline std::set<AOMD::mEntity *> *getAttachedEntitiesSet(AOMD::mEntity *e, unsigned int tag)
{
xAttachableEntitiesSet *av = (xAttachableEntitiesSet *)(e->getData(tag));
if (!av) return nullptr;
return &(av->vect);
}
// set attached data of type
void xAttachableEntitiesSetvoid attachEntitiesSet(AOMD::mEntity *e, unsigned int tag, std::set<AOMD::mEntity *> &v)
__attribute__((deprecated));
{
inline void attachEntitiesSet(AOMD::mEntity * e, unsigned int tag, std::set<AOMD::mEntity *> &v)
{
xAttachableEntitiesSet *av = (xAttachableEntitiesSet *)(e->getData(tag));
if (!av)
{
av = new xAttachableEntitiesSet;
e->attachData(tag, av);
}
(av->vect).insert(v.begin(), v.end());
}
} // end of namespace
#endif
/*
This file is a part of eXlibris C++ Library
under the GNU Lesser General Public License.
See the NOTICE.md & LICENSE.md files for terms
and conditions.
*/
#include "xAttachableString.h"
// AOMD
#include <mEntity.h>
namespace xfem
{
// get attached data of type xAttachableString
std::string & getAttachedString(AOMD::mEntity* e, unsigned int tag)
{
xAttachableString *a = (xAttachableString *)(e->getData(tag));
if(!a)
{
a = new xAttachableString;
e->attachData(tag,a);
}
return a->s;
}
// set attached data of type xAttachableString
void attachString(AOMD::mEntity* e,unsigned int tag, const std::string & s)
{
xAttachableString *a = (xAttachableString *)(e->getData(tag));
if(!a)
{
a = new xAttachableString;
e->attachData(tag,a);
}
a->s = s;
return;
}
} // end namespace
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment