|
|
@ -2,33 +2,70 @@ |
|
|
|
#define MODGMT_MAP_H |
|
|
|
#define MODGMT_MAP_H |
|
|
|
#include "common.h" |
|
|
|
#include "common.h" |
|
|
|
|
|
|
|
|
|
|
|
class ObjectGMTMap: public ObjectBase |
|
|
|
class GMTBlob: public ObjectBase |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
GMTBlob()=delete; |
|
|
|
|
|
|
|
protected: |
|
|
|
std::shared_ptr<std::string> data; |
|
|
|
std::shared_ptr<std::string> data; |
|
|
|
int64_t bblx,bbly,bbrx,bbry; |
|
|
|
GMTBlob(const GMTBlob& b)=default; |
|
|
|
|
|
|
|
GMTBlob(GMTBlob&& b)=default; |
|
|
|
ObjectGMTMap(const ObjectGMTMap* p):data(p->data),bblx(p->bblx),bbly(p->bbly),bbrx(p->bbrx),bbry(p->bbry) {}; |
|
|
|
GMTBlob(const GMTBlob* p):data(p->data) {} |
|
|
|
|
|
|
|
GMTBlob(std::string* s):data(s) {} |
|
|
|
public: |
|
|
|
|
|
|
|
ObjectGMTMap(std::string* s, int nbblx, int nbbly, int nbbrx, int nbbry):data(s),bblx(nbblx),bbly(nbbly),bbrx(nbbrx),bbry(nbbry) {}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
// Pure virtual overrides
|
|
|
|
// Pure virtual overrides
|
|
|
|
ObjectBase* Copy() const override {return new ObjectGMTMap(this);} |
|
|
|
|
|
|
|
bool Print() const override |
|
|
|
bool Print() const override |
|
|
|
{ |
|
|
|
{ |
|
|
|
COUT(NORMAL)<<std::endl<<"Object type: "<<Type()<<std::endl; |
|
|
|
COUT(NORMAL)<<std::endl<<"Object type: "<<Type()<<std::endl; |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
std::string Type() const override {return "GMTMap";} |
|
|
|
|
|
|
|
const int8_t* Blob(size_t* size) const override |
|
|
|
const int8_t* Blob(size_t* size) const override |
|
|
|
{ |
|
|
|
{ |
|
|
|
*size=data->size(); |
|
|
|
*size=data->size(); |
|
|
|
return reinterpret_cast<const int8_t*>(data->data()); |
|
|
|
return reinterpret_cast<const int8_t*>(data->data()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Data access
|
|
|
|
|
|
|
|
const std::string* pValue() const {return data.get();} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class GMTMap: public GMTBlob |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
protected: |
|
|
|
|
|
|
|
int32_t bblx,bbly,bbrx,bbry; |
|
|
|
|
|
|
|
GMTMap(const GMTMap* p):GMTBlob(p),bblx(p->bblx),bbly(p->bbly),bbrx(p->bbrx),bbry(p->bbry) {}; |
|
|
|
|
|
|
|
GMTMap(std::string* s, int nbblx, int nbbly, int nbbrx, int nbbry):GMTBlob(s),bblx(nbblx),bbly(nbbly),bbrx(nbbrx),bbry(nbbry) {}; |
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
int32_t Bblx() const {return bblx;} |
|
|
|
|
|
|
|
int32_t Bbly() const {return bbly;} |
|
|
|
|
|
|
|
int32_t Bbrx() const {return bbrx;} |
|
|
|
|
|
|
|
int32_t Bbry() const {return bbry;} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ObjectGMTMapPDF: public GMTMap |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ObjectGMTMapPDF(const ObjectGMTMapPDF* p):GMTMap(p) {}; |
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
ObjectGMTMapPDF(std::string* s, int nbblx, int nbbly, int nbbrx, int nbbry):GMTMap(s,nbblx,nbbly,nbbrx,nbbry) {}; |
|
|
|
|
|
|
|
// Pure virtual overrides
|
|
|
|
|
|
|
|
ObjectBase* Copy() const override {return new ObjectGMTMapPDF(this);} |
|
|
|
|
|
|
|
std::string Type() const override {return "GMTMapPDF";} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ObjectGMTMap: public GMTMap |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ObjectGMTMap(const ObjectGMTMap* p):GMTMap(p) {}; |
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
ObjectGMTMap(std::string* s, int nbblx, int nbbly, int nbbrx, int nbbry):GMTMap(s,nbblx,nbbly,nbbrx,nbbry) {}; |
|
|
|
|
|
|
|
// Pure virtual overrides
|
|
|
|
|
|
|
|
ObjectBase* Copy() const override {return new ObjectGMTMap(this);} |
|
|
|
|
|
|
|
std::string Type() const override {return "GMTMap";} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// Creating eps map from set of layers
|
|
|
|
// Creating eps map from set of layers
|
|
|
|
ObjectBase* GMT_Map(const ObjectList* input); |
|
|
|
ObjectBase* GMT_Map(const ObjectList* input); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Converting map to pdf
|
|
|
|
|
|
|
|
ObjectBase* GMT_Convert2PDF(const ObjectList* input); |
|
|
|
|
|
|
|
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|