====== XExternalRef ====== **//Inherited from//** [[class::domain:xitem|XItem]], **//Inherited by//** NULL **//Friend class//** NULL **//Description//** 定义了被本地的某个数据对象所参考的外部引用,它可以是一个本地文件,也可以是一个远程链接,可以被m_strif所标定的接口访问,外部引用对象也包含了获取数据对象哪些数据的信息。 **//Members//** * int m_iStatus = [[xexternalref#0|0]] * int [[xexternalref#m_irefloc[3]|m_iRefLoc[3]]] * int64 m_TimeStamp = [[xexternalref#0|0]] * XType [[xexternalref#m_strif|m_strIF]] * XPath [[xexternalref#m_strpath|m_strPath]] * const XItem * m_pTarget = [[xexternalref#0|0]] **//Public interface//** * [[xexternalref#xexternalref1|XExternalRef]](ulong id) * void [[xexternalref#setpath|setPath]](const char * dir,const char * ifType) * void [[xexternalref#setlocation|setLocation]](int loc0, int loc1 = -1, int loc2 = -1) * const char * [[xexternalref#getpath|getPath]]() const * const char * [[xexternalref#getiftype|getIFType]]() const * int [[xexternalref#getlocation|getLocation]](int idx = 0) const * const int * [[xexternalref#getlocations|getLocations]]() const * void [[xexternalref#setstatus|setStatus]](TypeID st) * const XItem * [[xexternalref#gettarget|getTarget]]() const * void [[xexternalref#settarget|setTarget]](const XItem * tar) * bool [[xexternalref#ischanged|isChanged]]() const ---- {{anchor:0}} **int m_iStatus = 0** {{anchor:m_irefloc[3]}} **int m_iRefLoc[3]** {{anchor:0}} **int64 m_TimeStamp = 0** {{anchor:m_strif}} **XType m_strIF** {{anchor:m_strpath}} **XPath m_strPath** {{anchor:0}} **const XItem * m_pTarget = 0** ---- {{anchor:xexternalref1}} **XExternalRef(ulong id)** *function: 构造函数 *parameters: - [i]ulong id: 整数ID *return value: 无 {{anchor:setpath}} **void setPath(const char * dir,const char * ifType)** *function: 设置访问路径和接口类型 *parameters: - [i]const char * dir: 路径名 - [i]const char * ifType: 接口类型 *return value: 无 {{anchor:setlocation}} **void setLocation(int loc0, int loc1 = -1, int loc2 = -1)** *function: 设置被访问数据的位置 *parameters: - [i]int loc0: 第一层位置 - [i] int loc1 = -1: 第二层位置 - [i] int loc2 = -1: 第三层位置 *return value: {{anchor:getpath}} **const char * getPath() const** *function: 获取引用路径 *parameters: NULL *return value: 路径字符串 {{anchor:getiftype}} **const char * getIFType() const** *function: 获取接口类型 *parameters: NULL *return value: 接口类型字符串 {{anchor:getlocation}} **int getLocation(int idx = 0) const** *function: 获取访问位置 *parameters: - [i]int idx = 0: *return value: {{anchor:getlocations}} **const int * getLocations() const** *function: *parameters: NULL *return value: {{anchor:setstatus}} **void setStatus(TypeID st)** *function: *parameters: - [i]TypeID st: *return value: {{anchor:gettarget}} **const XItem * getTarget() const** *function: 获取参考该引用的对象指针 *parameters: NULL *return value: 对象指针 {{anchor:settarget}} **void setTarget(const XItem * tar)** *function: 设置参考该引用的对象指针 *parameters: - [i]const XItem * tar: 对象指针 *return value: 无 {{anchor:ischanged}} **bool isChanged() const** *function: 判断外部引用是否修改 *parameters: NULL *return value: 若已修改,返回true;否则返回false