| 1 | /* This file is part of the FaCT++ DL reasoner |
| 2 | Copyright (C) 2009-2015 Dmitry Tsarkov and The University of Manchester |
| 3 | Copyright (C) 2015-2017 Dmitry Tsarkov |
| 4 | |
| 5 | This library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either |
| 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | |
| 10 | This library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | Lesser General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with this library; if not, write to the Free Software |
| 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | */ |
| 19 | |
| 20 | #ifndef TONTOLOGYPRINTERLISP_H |
| 21 | #define TONTOLOGYPRINTERLISP_Hcxx . . $ `Kernel/tOntologyPrinterLISP.h:21:9`! |
| 22 | |
| 23 | #include "tExpressionPrinterLISP.h"cxx . . $ `<file>/Kernel/tExpressionPrinterLISP.h`/ |
| 24 | #include "tDLAxiom.h"cxx . . $ `<file>/Kernel/tDLAxiom.h`/ |
| 25 | #include "tOntology.h"cxx . . $ `<file>/Kernel/tOntology.h`/ |
| 26 | |
| 27 | class TLISPOntologyPrintercxx . . $ TLISPOntologyPrinter#: public DLAxiomVisitorcxx . . $ DLAxiomVisitor# |
| 28 | { |
| 29 | protected: // members |
| 30 | /// main stream |
| 31 | stdcxx . . $ std/::ostreamcxx . . $ std/ostream#& ocxx . . $ TLISPOntologyPrinter#o.; |
| 32 | /// printer for the expressions |
| 33 | TLISPExpressionPrintercxx . . $ TLISPExpressionPrinter# LEPcxx . . $ TLISPOntologyPrinter#LEP.; |
| 34 | /// if true, print declarations |
| 35 | bool printDeclarationscxx . . $ TLISPOntologyPrinter#printDeclarations. = true; |
| 36 | /// if true, print logical axioms |
| 37 | bool printAxiomscxx . . $ TLISPOntologyPrinter#printAxioms. = true; |
| 38 | |
| 39 | protected: // methods |
| 40 | /// helper to print several expressions in a row |
| 41 | template <typename Expression> |
| 42 | TLISPOntologyPrintercxx . . $ TLISPOntologyPrinter#& operatorcxx . . $ TLISPOntologyPrinter#`operator<<`(91d7aeb8ad783e42). << ( const TDLNAryExpressioncxx . . $ TDLNAryExpression#<Expression>& c ) |
| 43 | { |
| 44 | if (printAxiomscxx . . $ TLISPOntologyPrinter#printAxioms.) |
| 45 | for ( const auto& expr: c ) |
| 46 | expr->accept(LEPcxx . . $ TLISPOntologyPrinter#LEP.); |
| 47 | return *this; |
| 48 | } |
| 49 | /// helper to print a string |
| 50 | TLISPOntologyPrintercxx . . $ TLISPOntologyPrinter#& operatorcxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). << ( const char* str ) |
| 51 | { |
| 52 | if (printAxiomscxx . . $ TLISPOntologyPrinter#printAxioms.) |
| 53 | ocxx . . $ TLISPOntologyPrinter#o. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). str; |
| 54 | return *this; |
| 55 | } |
| 56 | /// helper to print an expression |
| 57 | TLISPOntologyPrintercxx . . $ TLISPOntologyPrinter#& operatorcxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). << ( const TDLExpressioncxx . . $ TDLExpression#* expr ) |
| 58 | { |
| 59 | if (printAxiomscxx . . $ TLISPOntologyPrinter#printAxioms.) |
| 60 | expr->acceptcxx . . $ TDLExpression#accept(8c3f5312553ddf9b).(LEPcxx . . $ TLISPOntologyPrinter#LEP.); |
| 61 | return *this; |
| 62 | } |
| 63 | |
| 64 | public: // visitor interface |
| 65 | void visitcxx . . $ TLISPOntologyPrinter#visit(d9d59c22ba059f26). ( const TDLAxiomDeclarationcxx . . $ TDLAxiomDeclaration#& axiom ) override |
| 66 | { |
| 67 | if (!printDeclarationscxx . . $ TLISPOntologyPrinter#printDeclarations.) |
| 68 | return; |
| 69 | const TDLExpressioncxx . . $ TDLExpression#* decl = axiom.getDeclarationcxx . . $ TDLAxiomDeclaration#getDeclaration(64c3665937a632bf).(); |
| 70 | // print only declarations for non-constant entities, ignore datatypes |
| 71 | if (const TDLConceptNamecxx . . $ TDLConceptName#* concept = dynamic_cast<const TDLConceptNamecxx . . $ TDLConceptName#*>(decl)) |
| 72 | ocxx . . $ TLISPOntologyPrinter#o. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "(defprimconcept " <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). concept->getNamecxx . . $ TNamedEntity#getName(a9f41ea0e82d88cf).() <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). ")\n"; |
| 73 | else if (const TDLIndividualNamecxx . . $ TDLIndividualName#* individual = dynamic_cast<const TDLIndividualNamecxx . . $ TDLIndividualName#*>(decl)) |
| 74 | ocxx . . $ TLISPOntologyPrinter#o. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "(defindividual " <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). individual->getNamecxx . . $ TNamedEntity#getName(a9f41ea0e82d88cf).() <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). ")\n"; |
| 75 | else if (const TDLObjectRoleNamecxx . . $ TDLObjectRoleName#* objectRole = dynamic_cast<const TDLObjectRoleNamecxx . . $ TDLObjectRoleName#*>(decl)) |
| 76 | ocxx . . $ TLISPOntologyPrinter#o. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "(defprimrole " <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). objectRole->getNamecxx . . $ TNamedEntity#getName(a9f41ea0e82d88cf).() <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). ")\n"; |
| 77 | else if (const TDLDataRoleNamecxx . . $ TDLDataRoleName#* dataRole = dynamic_cast<const TDLDataRoleNamecxx . . $ TDLDataRoleName#*>(decl)) |
| 78 | ocxx . . $ TLISPOntologyPrinter#o. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "(defdatarole " <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). dataRole ->getNamecxx . . $ TNamedEntity#getName(a9f41ea0e82d88cf).() <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). ")\n"; |
| 79 | } |
| 80 | |
| 81 | void visitcxx . . $ TLISPOntologyPrinter#visit(9ecff12220e47c40). ( const TDLAxiomEquivalentConceptscxx . . $ TDLAxiomEquivalentConcepts#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(equal_c" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(91d7aeb8ad783e42). axiom <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 82 | void visitcxx . . $ TLISPOntologyPrinter#visit(aa51a7285ba589ba). ( const TDLAxiomDisjointConceptscxx . . $ TDLAxiomDisjointConcepts#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(disjoint_c" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(91d7aeb8ad783e42). axiom <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 83 | void visitcxx . . $ TLISPOntologyPrinter#visit(402fe14fc3eb0067). ( const TDLAxiomDisjointUnioncxx . . $ TDLAxiomDisjointUnion#& axiom ) override |
| 84 | { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(disjoint_c" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(91d7aeb8ad783e42). axiom <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n(equal_c" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getCcxx . . $ TDLAxiomDisjointUnion#getC(76ab2b9ad52d3e83).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). " (or" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(91d7aeb8ad783e42). axiom <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "))\n"; } |
| 85 | void visitcxx . . $ TLISPOntologyPrinter#visit(c0fc84e0a2be77f7). ( const TDLAxiomEquivalentORolescxx . . $ TDLAxiomEquivalentORoles#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(equal_r" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(91d7aeb8ad783e42). axiom <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 86 | void visitcxx . . $ TLISPOntologyPrinter#visit(c126fb3da66d6497). ( const TDLAxiomEquivalentDRolescxx . . $ TDLAxiomEquivalentDRoles#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(equal_r" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(91d7aeb8ad783e42). axiom <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 87 | void visitcxx . . $ TLISPOntologyPrinter#visit(9b4c04465f82a032). ( const TDLAxiomDisjointORolescxx . . $ TDLAxiomDisjointORoles#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(disjoint_r" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(91d7aeb8ad783e42). axiom <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 88 | void visitcxx . . $ TLISPOntologyPrinter#visit(f937f280b5be5d09). ( const TDLAxiomDisjointDRolescxx . . $ TDLAxiomDisjointDRoles#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(disjoint_r" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(91d7aeb8ad783e42). axiom <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 89 | void visitcxx . . $ TLISPOntologyPrinter#visit(d37f1d21cd25a5f3). ( const TDLAxiomSameIndividualscxx . . $ TDLAxiomSameIndividuals#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(same" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(91d7aeb8ad783e42). axiom <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 90 | void visitcxx . . $ TLISPOntologyPrinter#visit(d0a24753794666b). ( const TDLAxiomDifferentIndividualscxx . . $ TDLAxiomDifferentIndividuals#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(different" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(91d7aeb8ad783e42). axiom <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 91 | void visitcxx . . $ TLISPOntologyPrinter#visit(8ec85f1c9f859b33). ( const TDLAxiomFairnessConstraintcxx . . $ TDLAxiomFairnessConstraint#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(fairness" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(91d7aeb8ad783e42). axiom <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 92 | |
| 93 | void visitcxx . . $ TLISPOntologyPrinter#visit(dbfe2e7150e0dc38). ( const TDLAxiomRoleInversecxx . . $ TDLAxiomRoleInverse#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(equal_r" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRolecxx . . $ TDLAxiomSingleORole#getRole(b0a963b5b1b1e1ae).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). " (inv" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getInvRolecxx . . $ TDLAxiomRoleInverse#getInvRole(b0a963b5b1b1e1ae).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "))\n"; } |
| 94 | void visitcxx . . $ TLISPOntologyPrinter#visit(71a707b53d3a8b2f). ( const TDLAxiomORoleSubsumptioncxx . . $ TDLAxiomORoleSubsumption#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(implies_r" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getSubRolecxx . . $ TDLAxiomORoleSubsumption#getSubRole(15ec025ea2d791ae).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRolecxx . . $ TDLAxiomSingleORole#getRole(b0a963b5b1b1e1ae).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 95 | void visitcxx . . $ TLISPOntologyPrinter#visit(20fca8e39bd7f9de). ( const TDLAxiomDRoleSubsumptioncxx . . $ TDLAxiomDRoleSubsumption#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(implies_r" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getSubRolecxx . . $ TDLAxiomDRoleSubsumption#getSubRole(a81f3d9965bf170b).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRolecxx . . $ TDLAxiomSingleDRole#getRole(a81f3d9965bf170b).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 96 | void visitcxx . . $ TLISPOntologyPrinter#visit(b19917e065e373b0). ( const TDLAxiomORoleDomaincxx . . $ TDLAxiomORoleDomain#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(domain" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRolecxx . . $ TDLAxiomSingleORole#getRole(b0a963b5b1b1e1ae).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getDomaincxx . . $ TDLAxiomORoleDomain#getDomain(76ab2b9ad52d3e83).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 97 | void visitcxx . . $ TLISPOntologyPrinter#visit(6a89384f45b02cb7). ( const TDLAxiomDRoleDomaincxx . . $ TDLAxiomDRoleDomain#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(domain" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRolecxx . . $ TDLAxiomSingleDRole#getRole(a81f3d9965bf170b).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getDomaincxx . . $ TDLAxiomDRoleDomain#getDomain(76ab2b9ad52d3e83).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 98 | void visitcxx . . $ TLISPOntologyPrinter#visit(eef9ff8aad06e081). ( const TDLAxiomORoleRangecxx . . $ TDLAxiomORoleRange#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(range" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRolecxx . . $ TDLAxiomSingleORole#getRole(b0a963b5b1b1e1ae).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRangecxx . . $ TDLAxiomORoleRange#getRange(76ab2b9ad52d3e83).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 99 | void visitcxx . . $ TLISPOntologyPrinter#visit(da8dca8cacae49f9). ( const TDLAxiomDRoleRangecxx . . $ TDLAxiomDRoleRange#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(range" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRolecxx . . $ TDLAxiomSingleDRole#getRole(a81f3d9965bf170b).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRangecxx . . $ TDLAxiomDRoleRange#getRange(8a5cd50e478c5d2c).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 100 | void visitcxx . . $ TLISPOntologyPrinter#visit(e8585e86130514df). ( const TDLAxiomRoleTransitivecxx . . $ TDLAxiomRoleTransitive#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(transitive" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRolecxx . . $ TDLAxiomSingleORole#getRole(b0a963b5b1b1e1ae).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 101 | void visitcxx . . $ TLISPOntologyPrinter#visit(1555e5dd37550403). ( const TDLAxiomRoleReflexivecxx . . $ TDLAxiomRoleReflexive#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(reflexive" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRolecxx . . $ TDLAxiomSingleORole#getRole(b0a963b5b1b1e1ae).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 102 | void visitcxx . . $ TLISPOntologyPrinter#visit(eabfd54a3bd95b2). ( const TDLAxiomRoleIrreflexivecxx . . $ TDLAxiomRoleIrreflexive#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(irreflexive" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRolecxx . . $ TDLAxiomSingleORole#getRole(b0a963b5b1b1e1ae).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 103 | void visitcxx . . $ TLISPOntologyPrinter#visit(371dc479b720f66a). ( const TDLAxiomRoleSymmetriccxx . . $ TDLAxiomRoleSymmetric#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(symmetric" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRolecxx . . $ TDLAxiomSingleORole#getRole(b0a963b5b1b1e1ae).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 104 | void visitcxx . . $ TLISPOntologyPrinter#visit(2eab0e2ee768d6ea). ( const TDLAxiomRoleAsymmetriccxx . . $ TDLAxiomRoleAsymmetric#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(asymmetric" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRolecxx . . $ TDLAxiomSingleORole#getRole(b0a963b5b1b1e1ae).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 105 | void visitcxx . . $ TLISPOntologyPrinter#visit(1cb3074f4e7d0a89). ( const TDLAxiomORoleFunctionalcxx . . $ TDLAxiomORoleFunctional#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(functional" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRolecxx . . $ TDLAxiomSingleORole#getRole(b0a963b5b1b1e1ae).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 106 | void visitcxx . . $ TLISPOntologyPrinter#visit(4ed58748b443d4d). ( const TDLAxiomDRoleFunctionalcxx . . $ TDLAxiomDRoleFunctional#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(functional" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRolecxx . . $ TDLAxiomSingleDRole#getRole(a81f3d9965bf170b).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 107 | void visitcxx . . $ TLISPOntologyPrinter#visit(92d9880035cab613). ( const TDLAxiomRoleInverseFunctionalcxx . . $ TDLAxiomRoleInverseFunctional#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(functional (inv" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRolecxx . . $ TDLAxiomSingleORole#getRole(b0a963b5b1b1e1ae).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "))\n"; } |
| 108 | |
| 109 | void visitcxx . . $ TLISPOntologyPrinter#visit(4415e73e741b43da). ( const TDLAxiomConceptInclusioncxx . . $ TDLAxiomConceptInclusion#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(implies_c" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getSubCcxx . . $ TDLAxiomConceptInclusion#getSubC(76ab2b9ad52d3e83).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getSupCcxx . . $ TDLAxiomConceptInclusion#getSupC(76ab2b9ad52d3e83).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 110 | void visitcxx . . $ TLISPOntologyPrinter#visit(ac53f03206c5ffd8). ( const TDLAxiomInstanceOfcxx . . $ TDLAxiomInstanceOf#& axiom ) override { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(instance" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getIndividualcxx . . $ TDLAxiomIndividual#getIndividual(11d970b45c73cfb9).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getCcxx . . $ TDLAxiomInstanceOf#getC(76ab2b9ad52d3e83).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 111 | void visitcxx . . $ TLISPOntologyPrinter#visit(adefee3ba499aec2). ( const TDLAxiomRelatedTocxx . . $ TDLAxiomRelatedTo#& axiom ) override |
| 112 | { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(related" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getIndividualcxx . . $ TDLAxiomIndividual#getIndividual(11d970b45c73cfb9).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRelationcxx . . $ TDLAxiomRelatedTo#getRelation(b0a963b5b1b1e1ae).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRelatedIndividualcxx . . $ TDLAxiomRelatedTo#getRelatedIndividual(11d970b45c73cfb9).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")\n"; } |
| 113 | void visitcxx . . $ TLISPOntologyPrinter#visit(8c7dc9507962ec65). ( const TDLAxiomRelatedToNotcxx . . $ TDLAxiomRelatedToNot#& axiom ) override |
| 114 | { *this<<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(instance" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getIndividualcxx . . $ TDLAxiomIndividual#getIndividual(11d970b45c73cfb9).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). " (all" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRelationcxx . . $ TDLAxiomRelatedToNot#getRelation(b0a963b5b1b1e1ae).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(not (one-of" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getRelatedIndividualcxx . . $ TDLAxiomRelatedToNot#getRelatedIndividual(11d970b45c73cfb9).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "))))\n"; } |
| 115 | void visitcxx . . $ TLISPOntologyPrinter#visit(ff1a1ebde6ad8bad). ( const TDLAxiomValueOfcxx . . $ TDLAxiomValueOf#& axiom ) override |
| 116 | { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(instance" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getIndividualcxx . . $ TDLAxiomIndividual#getIndividual(11d970b45c73cfb9).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). " (some" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getAttributecxx . . $ TDLAxiomValueOf#getAttribute(a81f3d9965bf170b).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getValuecxx . . $ TDLAxiomValueOf#getValue(493934cfcada0bd8).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "))\n"; } |
| 117 | void visitcxx . . $ TLISPOntologyPrinter#visit(df12686069e02fa4). ( const TDLAxiomValueOfNotcxx . . $ TDLAxiomValueOfNot#& axiom ) override |
| 118 | { *this <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(instance" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getIndividualcxx . . $ TDLAxiomIndividual#getIndividual(11d970b45c73cfb9).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). " (all" <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getAttributecxx . . $ TDLAxiomValueOfNot#getAttribute(a81f3d9965bf170b).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). "(not " <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1e897230e7744bda). axiom.getValuecxx . . $ TDLAxiomValueOfNot#getValue(493934cfcada0bd8).() <<cxx . . $ TLISPOntologyPrinter#`operator<<`(1662864b8eab9e5e). ")))\n"; } |
| 119 | |
| 120 | public: // interface |
| 121 | /// init c'tor |
| 122 | explicit TLISPOntologyPrintercxx . . $ TLISPOntologyPrinter#TLISPOntologyPrinter(f7f45734e6842120). ( stdcxx . . $ std/::ostreamcxx . . $ std/ostream#& o_ ) |
| 123 | : ocxx . . $ TLISPOntologyPrinter#o.(o_) |
| 124 | , LEPcxx . . $ TLISPOntologyPrinter#LEP.(o_) |
| 125 | {} |
| 126 | |
| 127 | /// instruct printer whether to print/ignore declarations and axioms |
| 128 | void setPrintFlagscxx . . $ TLISPOntologyPrinter#setPrintFlags(b0b38cda41d4ede4).(bool declarations, bool axioms) |
| 129 | { |
| 130 | printDeclarationscxx . . $ TLISPOntologyPrinter#printDeclarations. = declarations; |
| 131 | printAxiomscxx . . $ TLISPOntologyPrinter#printAxioms. = axioms; |
| 132 | } |
| 133 | }; // TLISPOntologyPrinter |
| 134 | |
| 135 | #endif |