IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
ObjectBaseInfoHdrMacros.h
Go to the documentation of this file.
1 // ObjectBaseInfoHdrMacros.h:
3 // --------------------------
4 //
14 
15 #ifndef __IPSDKUTIL_OBJECTBASEINFOHDRMACROS_H__
16 #define __IPSDKUTIL_OBJECTBASEINFOHDRMACROS_H__
17 
19 #include <boost/preprocessor/stringize.hpp>
20 
23 
27 #define IPSDK_DECLARE_OBJECT_BASE_INFO(libraryName, className) \
28 public: \
29  static const boost::filesystem::path getHeaderPathStr() { \
30  boost::filesystem::path relativePath; \
31  const boost::filesystem::path fullHdrPath(__FILE__); \
32  const boost::filesystem::path ipsdkHdrPublicPath(PROJECT_HDR_PUBLIC_DIRECTORY); \
33  relativePath = ipsdk::getRelativeFromRoot(ipsdkHdrPublicPath, fullHdrPath); \
34  if (relativePath.empty() == false) \
35  return relativePath; \
36  const boost::filesystem::path ipsdkHdrPartnerPath(PROJECT_HDR_PARTNER_DIRECTORY); \
37  relativePath = ipsdk::getRelativeFromRoot(ipsdkHdrPartnerPath, fullHdrPath); \
38  if (relativePath.empty() == false) \
39  return relativePath; \
40  const boost::filesystem::path ipsdkHdrPrivatePath(PROJECT_HDR_PRIVATE_DIRECTORY); \
41  relativePath = ipsdk::getRelativeFromRoot(ipsdkHdrPrivatePath, fullHdrPath); \
42  return relativePath; \
43  } \
44  const boost::filesystem::path getHeaderPath() const { \
45  return className::getHeaderPathStr(); \
46  } \
47  static const std::string getLibraryNameStr() { \
48  return BOOST_PP_STRINGIZE(libraryName); \
49  } \
50  const std::string getLibraryName() const { \
51  return className::getLibraryNameStr(); \
52  }
53 
56 
57 #endif // __IPSDKUTIL_OBJECTBASEINFOHDRMACROS_H__
Utility functions for path management.