Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sahrkm committed Sep 18, 2024
1 parent 41699b3 commit b36e438
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 89 deletions.
1 change: 0 additions & 1 deletion src/lib/dglib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ add_library(dglib
include/dglib/DgInShapefile.h
include/dglib/DgInShapefileAtt.h
include/dglib/DgInputStream.h
include/dglib/DgLabelLoc.h
include/dglib/DgLocBase.h
include/dglib/DgLocList.h
include/dglib/DgLocVector.h
Expand Down
67 changes: 0 additions & 67 deletions src/lib/dglib/include/dglib/DgLabelLoc.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/lib/dglib/include/dglib/DgPhysicalRF.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ template<class A, class C, class B, class DB> class DgPhysicalRF

public:

DgPhysicalRF<A, C> (const DgBoundedRF<A, B, DB>& rfIn)
DgPhysicalRF<A, C, B, DB> (const DgBoundedRF<A, B, DB>& rfIn)
: DgPhysicalRFBase<C> (rfIn), boundedRF_ (rfIn) { }

const DgBoundedRF<A, B, DB>& boundedRF (void) const { return boundedRF_; }
Expand Down
2 changes: 1 addition & 1 deletion src/lib/dglib/include/dglib/DgPhysicalRFBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ template<class C> class DgPhysicalRFBase {

public:

DgPhysicalRFBase (const DgBoundedRFBase& rfIn)
DgPhysicalRFBase<C> (const DgBoundedRFBase& rfIn)
: boundedRFBase_ (rfIn) { }

virtual ~DgPhysicalRFBase (void);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/dglib/include/dglib/DgSpatialDB.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ template<class C> class DgSpatialDB {

const DgPhysicalRFBase<C>& physRF (void) const { return physicalRF_; }

const DgBoundedRFBase& boundedRF (void) const
const DgBoundedRFBase0& boundedRF (void) const
{ return physicalRF_.boundedRFBase(); }

const DgRFBase& rf (void) const { return boundedRF().rf(); }
Expand Down
32 changes: 16 additions & 16 deletions src/lib/dglib/lib/DgPhysicalRF.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,27 @@
//
////////////////////////////////////////////////////////////////////////////////

template<class A, class C> void
DgPhysicalRF<A, C>::deleteContents (const DgLocation& loc, bool convert)
template<A, C, B, DB> void
DgPhysicalRF<A, C, B, DB>::deleteContents (const DgLocation& loc, bool convert)
{
DgLocation* pLoc = discRF().createLocation(loc, convert);
const A* add = discRF().getAddress(*pLoc);

if (!boundedRF().validAddress(*add))
{
report("DgPhysicalRF<A, C>::deleteContents() invalid address",
report("DgPhysicalRF<A, C, B, DB>::deleteContents() invalid address",
DgBase::Fatal);
}

deleteAddContents(*add);

delete pLoc;

} // void DgPhysicalRF<A, C>::deleteContents
} // void DgPhysicalRF<A, C, B, DB>::deleteContents

////////////////////////////////////////////////////////////////////////////////
template<class A, class C> C*
DgPhysicalRF<A, C>::getContents (const DgLocation& loc, bool convert,
template<class A, class C, class B, class DB> C*
DgPhysicalRF<A, C, B, DB>::getContents (const DgLocation& loc, bool convert,
bool allocate) const
{
DgLocation* pLoc = discRF().createLocation(loc, convert);
Expand All @@ -51,7 +51,7 @@ DgPhysicalRF<A, C>::getContents (const DgLocation& loc, bool convert,
if (!boundedRF().validAddress(*add)) return (C*) 0;
/*
{
report("DgPhysicalRF<A, C>::getContents() invalid address",
report("DgPhysicalRF<A, C, B, DB>::getContents() invalid address",
DgBase::Fatal);
}
*/
Expand All @@ -62,47 +62,47 @@ DgPhysicalRF<A, C>::getContents (const DgLocation& loc, bool convert,

return cont;

} // C* DgPhysicalRF<A, C>::getContents
} // C* DgPhysicalRF<A, C, B, DB>::getContents

////////////////////////////////////////////////////////////////////////////////
template<class A, class C> void
DgPhysicalRF<A, C>::replaceContents (const DgLocation& loc, C* cont,
template<class A, class C, class B, class DB> void
DgPhysicalRF<A, C, B, DB>::replaceContents (const DgLocation& loc, C* cont,
bool convert)
{
DgLocation* pLoc = discRF().createLocation(loc, convert);
const A* add = discRF().getAddress(*pLoc);

if (!boundedRF().validAddress(*add))
{
report("DgPhysicalRF<A, C>::replaceContents() invalid address",
report("DgPhysicalRF<A, C, B, DB>::replaceContents() invalid address",
DgBase::Fatal);
}

replaceAddContents(*add, cont);

delete pLoc;

} // void DgPhysicalRF<A, C>::setContents
} // void DgPhysicalRF<A, C, B, DB>::setContents

////////////////////////////////////////////////////////////////////////////////
template<class A, class C> void
DgPhysicalRF<A, C>::setContents (const DgLocation& loc, const C& cont,
template<class A, class C, class B, class DB> void
DgPhysicalRF<A, C, B, DB>::setContents (const DgLocation& loc, const C& cont,
bool convert)
{
DgLocation* pLoc = discRF().createLocation(loc, convert);
const A* add = discRF().getAddress(*pLoc);

if (!boundedRF().validAddress(*add))
{
report("DgPhysicalRF<A, C>::setContents() invalid address",
report("DgPhysicalRF<A, C, B, DB>::setContents() invalid address",
DgBase::Fatal);
}

setAddContents(*add, cont);

delete pLoc;

} // void DgPhysicalRF<A, C>::setContents
} // void DgPhysicalRF<A, C, B, DB>::setContents

////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
2 changes: 1 addition & 1 deletion src/lib/dglib/lib/DgPhysicalRF2D.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
////////////////////////////////////////////////////////////////////////////////
template<class C>
DgPhysicalRF2D<C>::DgPhysicalRF2D (const DgBoundedRF2D& rfIn, bool allocate)
: DgPhysicalRF<DgIVec2D, C> (rfIn), boundedRF2D_ (rfIn)
: DgPhysicalRF<DgIVec2D, C, DgDVec2D, long double> (rfIn), boundedRF2D_ (rfIn)
{
matrix_ = new (C (**[boundedRF2D().numI()]));
for (int i = 0; i < boundedRF2D().numI(); i++)
Expand Down
3 changes: 2 additions & 1 deletion src/lib/dglib/lib/DgPhysicalRFS2D.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@

template<class C>
DgPhysicalRFS2D<C>::DgPhysicalRFS2D (const DgBoundedRFS2D& rfIn, bool allocate)
: DgPhysicalRF<DgResAdd<DgIVec2D>, C> (rfIn), boundedRFS2D_ (rfIn)
: DgPhysicalRF<DgResAdd<DgIVec2D>, C, DgDVec2D, long double> (rfIn),
boundedRFS2D_ (rfIn)
{
int nRes = rfIn.grids().size();

Expand Down

0 comments on commit b36e438

Please sign in to comment.