1 | #include "expand_domain.hpp" |
---|
2 | #include "type.hpp" |
---|
3 | |
---|
4 | namespace xios { |
---|
5 | |
---|
6 | /// ////////////////////// Définitions ////////////////////// /// |
---|
7 | |
---|
8 | CExpandDomain::CExpandDomain(void) |
---|
9 | : CObjectTemplate<CExpandDomain>(), CExpandDomainAttributes(), CTransformation<CDomain>() |
---|
10 | { /* Ne rien faire de plus */ } |
---|
11 | |
---|
12 | CExpandDomain::CExpandDomain(const StdString & id) |
---|
13 | : CObjectTemplate<CExpandDomain>(id), CExpandDomainAttributes(), CTransformation<CDomain>() |
---|
14 | { /* Ne rien faire de plus */ } |
---|
15 | |
---|
16 | CExpandDomain::~CExpandDomain(void) |
---|
17 | {} |
---|
18 | |
---|
19 | CTransformation<CDomain>* CExpandDomain::create(const StdString& id, xml::CXMLNode* node) |
---|
20 | { |
---|
21 | CExpandDomain* expandDomain = CExpandDomainGroup::get("expand_domain_definition")->createChild(id); |
---|
22 | if (node) expandDomain->parse(*node); |
---|
23 | return static_cast<CTransformation<CDomain>*>(expandDomain); |
---|
24 | } |
---|
25 | |
---|
26 | bool CExpandDomain::_dummyRegistered = CExpandDomain::registerTrans(); |
---|
27 | bool CExpandDomain::registerTrans() |
---|
28 | { |
---|
29 | registerTransformation(TRANS_EXPAND_DOMAIN, CExpandDomain::create); |
---|
30 | } |
---|
31 | |
---|
32 | //---------------------------------------------------------------- |
---|
33 | |
---|
34 | StdString CExpandDomain::GetName(void) { return StdString("expand_domain"); } |
---|
35 | StdString CExpandDomain::GetDefName(void) { return StdString("expand_domain"); } |
---|
36 | ENodeType CExpandDomain::GetType(void) { return eExpandDomain; } |
---|
37 | |
---|
38 | void CExpandDomain::checkValid(CDomain* domainDst) |
---|
39 | { |
---|
40 | // if (CDomain::type_attr::unstructured != domainDst->type) |
---|
41 | // { |
---|
42 | // ERROR("CExpandDomain::checkValid(CDomain* domainDst)", |
---|
43 | // << "Domain extension is only supported for unstructured" << std::endl |
---|
44 | // << "Check type of domain destination, id = " << domainDst->getId()); |
---|
45 | // } |
---|
46 | |
---|
47 | if (this->type.isEmpty()) this->type.setValue(CExpandDomain::type_attr::edge); |
---|
48 | } |
---|
49 | |
---|
50 | } |
---|