26 #include <boost/filesystem.hpp>
86 template<nximp_code>
class GTYPE,
90 const pni::core::string &name)
101 link_type::create_external_link(target,g.imp(),name);
105 nxpath real_target = target;
109 GTYPE<IMPID> parent = g;
110 while(real_target.
front().first==
"..")
112 parent = parent.parent();
123 link_type::create_internal_link(real_target,g.imp(),name);
144 template<
typename GTYPE>
145 void link(
const pni::core::string &target,
const GTYPE &g,
146 const pni::core::string &name)
169 template<
typename GTYPE>
170 void link(
const char *target,
const GTYPE &g,
const pni::core::string &name)
172 link(pni::core::string(target),g,name);
207 void link(
const STYPE &target,
const GTYPE &g,
const pni::core::string &name)
230 template<nximp_code>
class GTYPE,
233 auto link_type(
const GTYPE<IMPID> &parent,
const pni::core::string &name)
261 template<nximp_code>
class GTYPE,
290 template<nximp_code>
class GTYPE,
293 auto link_target(
const GTYPE<IMPID> &parent,
const pni::core::string &lname)
321 template<nximp_code>
class GTYPE,
349 template<
typename GTYPE>
374 template<
typename GTYPE>
399 template<
typename GTYPE>
407 template<nximp_code>
class GTYPE,
411 const pni::core::string &lname)
414 using namespace boost::filesystem;
436 if(!exists(path(target.filename())))
442 auto f = file_type::open_file(target.filename());
nxpath join(const nxpath &a, const nxpath &b)
Definition: nxpath/utils.cpp:142
bool is_soft_link(const GTYPE &parent, const pni::core::string &name)
return true if link is soft
Definition: nxlink.hpp:375
static nxpath from_string(const pni::core::string &input)
create path from string
Definition: nxpath.cpp:52
bool has_file_section(const nxpath &p)
Definition: nxpath/utils.cpp:83
void pop_front()
last element from path
Definition: nxpath.cpp:120
element_type front() const
get last element
Definition: nxpath/nxpath.hpp:207
nexus object traits
Definition: nxobject_traits.hpp:44
auto link_type(const GTYPE< IMPID > &parent, const pni::core::string &name) -> nxlink_type
return link type
Definition: nxlink.hpp:233
auto link_status(const GTYPE< IMPID > parent, const pni::core::string &lname) -> nxlink_status
Definition: nxlink.hpp:410
void __check_target_path(const nxpath &target)
Definition: nxlink.cpp:27
nxlink_type
Nexus link type.
Definition: nxlink_type.hpp:51
auto link_target(const GTYPE< IMPID > &parent, const pni::core::string &lname) -> nxpath
get link target
Definition: nxlink.hpp:293
Definition: cbf_reader.hpp:41
nxlink_status
Nexus link status.
Definition: nxlink_type.hpp:76
auto link_name(const GTYPE< IMPID > &parent, size_t index) -> pni::core::string
get link name
Definition: nxlink.hpp:264
bool is_absolute(const nxpath &p)
Definition: nxpath/utils.cpp:107
nximp_code
implementation codes
Definition: nximp_code.hpp:40
auto link_target(const GTYPE< IMPID > &parent, size_t index) -> nxpath
get link target
Definition: nxlink.hpp:324
auto get_object(const OTYPE &o, const PATHT &path) -> decltype(get_parent(o))
retrieve an object from path
Definition: get_object.hpp:62
bool is_external_link(const GTYPE &parent, const pni::core::string &name)
return true if link is external
Definition: nxlink.hpp:350
Nexus path class.
Definition: nxpath/nxpath.hpp:60
bool is_hard_link(const GTYPE &parent, const pni::core::string &name)
return true if link is hard
Definition: nxlink.hpp:400
pni::core::string get_path(const OTYPE< IMPID > &o)
get object path
Definition: get_path.hpp:59
void link(const nxpath &target, const GTYPE< IMPID > &g, const pni::core::string &name)
create a link
Definition: nxlink.hpp:89