小编Dan*_*iel的帖子

如何解析二进制流格式的OpenFoam polyMesh?

我正在开发一个需要解析 OpenFoam polyMesh 文件(点、面、边界)的工具。

目前该工具只能解析 PolyMesh 文件的 ASCII 格式,我还需要添加对二进制的支持。

如何解释二进制流格式?

有没有关于 OpenFoam 如何解析这些二进制文件的文档?

谁能指导我处理 PolyMesh 二进制流的 OpenFoam 代码?

binary parsing ascii openfoam

4
推荐指数
1
解决办法
804
查看次数

在Steam市场上检索商品的价格历史记录

关于Steam市场的商品,我想知道是否有办法在一段时间内检索商品的价格历史.

我知道Steam为想要将特定于市场的数据集成到他们自己的网站中的开发人员提供了一个特殊的API,但我无法找到任何关于以json形式检索项目的价格历史记录的信息.

你们有没有人这样做过吗?

json steam-web-api steam

3
推荐指数
1
解决办法
7232
查看次数

调用存储在std映射中的成员函数指针

我将地图存储在一个类中,该类具有字符串作为键和指向成员函数的指针作为值.我无法调用正确的函数抛出函数指针.这是代码:

#include <iostream>
#include <string>
#include <map>

using namespace std;


class Preprocessor;

typedef void (Preprocessor::*function)();



class Preprocessor
{

public:
    Preprocessor();
   ~Preprocessor();

   void processing(const string before_processing);

private:

   void   take_new_key();

   map<string, function>   srch_keys;

   string  after_processing;
};


Preprocessor::Preprocessor()
{
   srch_keys.insert(pair<string, function>(string("#define"), &Preprocessor::take_new_key));
}

Preprocessor::~Preprocessor()
{

}


void Preprocessor::processing(const string before_processing)
{
   map<string, function>::iterator result = srch_keys.find("#define");

   if(result != srch_keys.end())
      result->second; 
}


void Preprocessor::take_new_key()
{
   cout << "enters here";
}


int main()
{
   Preprocessor pre;
   pre.processing(string("...word #define other word"));

   return 0;
}
Run Code Online (Sandbox Code Playgroud)

在函数中,Preprocessor::processing …

c++ stl function-pointers

2
推荐指数
1
解决办法
5815
查看次数

标签 统计

ascii ×1

binary ×1

c++ ×1

function-pointers ×1

json ×1

openfoam ×1

parsing ×1

steam ×1

steam-web-api ×1

stl ×1