递归火山软件开发平台
标题:
这个类型如何解决
[打印本页]
作者:
沉默流星
时间:
昨天 08:59
标题:
这个类型如何解决
问题如下:
在封装时碰到这个数据类型,代码如下
virtual ITexture* getTexture(const io::path& filename) = 0;
typedef core::string<fschar_t> path;
template <typename T, typename TAlloc = irrAllocator<T> >
class string
{
public:
typedef T char_type;
//! Default constructor
string()
: array(0), allocated(1), used(1)
{
array = allocator.allocate(1); // new T[1];
array[0] = 0;
}
//! Constructor
string(const string<T,TAlloc>& other)
: array(0), allocated(0), used(0)
{
*this = other;
}
复制代码
调用代码如下:
node->setMaterialTexture(0, driver->getTexture("H:\\CAD开发安装包\\游戏相关\\day013d\\irrlicht3Dday01\\irrlicht3Dday01\\media\\sydney.bmp"));
复制代码
在火山中试过以下几种
1.@pvpt<参数名称> 组合@sn<quot>
2.嵌入式方法
req_obj_param_pointer:
req_str_param_text_pointer
3.GetText()
4.@an<CVolString>
5. CU8String
复制代码
五种方法都试过,都是中文路径访问不了,必须是英文的,在VS当中中文路径是正常的,应该如何解决
也试过下面这个,但封装失败,封装代码如下
<火山程序 类型 = "通常" 版本 = 1 />
类 鬼火环境类 <公开 @别名 = "irr::io::path" @别名类型 = 本地类>
{
方法 创建 <公开 静态 类型 = 标准文本类 注释 = "基于所指定文本内容创建对应的utf-8编码标准文本数据" @嵌入式方法 = "">
参数 文本数据 <类型 = 文本型>
{
@ irr::io::path ((const char *)CU8String (@<文本数据>).GetText ())
}
#
}
复制代码
作者:
hcwanz
时间:
昨天 09:27
vs正常, 火山不正常, 可能不是代码的问题了, 在vs里运行时看一下代码页? 和火山的一样吗?
欢迎光临 递归火山软件开发平台 (https://bbs.voldp.com/)
Powered by Discuz! X3.4