248 lines
5.3 KiB
C
248 lines
5.3 KiB
C
|
// 总纵强度计算输入 结构定义,StrengthSet.xsd表中的相关xml结构在c++中的自定义
|
|||
|
|
|||
|
// 包含 1、梁端横剖面 2、船体梁外载 3、船体有限梁 4、总强度校核 的相关结构体
|
|||
|
|
|||
|
#ifndef STRENGTH_CAL_H
|
|||
|
#define STRENGTH_CAL_H
|
|||
|
#include "nlohmann/json.hpp"
|
|||
|
// #include "ModelDS.hxx"
|
|||
|
#include "StrengthSet.hxx"
|
|||
|
|
|||
|
// class...
|
|||
|
namespace strength_set
|
|||
|
{
|
|||
|
class JsonSection
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const Section &obj);
|
|||
|
|
|||
|
static Section from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonSecNode
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const SecNode &obj);
|
|||
|
|
|||
|
static SecNode from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonSecPlate
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const SecPlate &obj);
|
|||
|
|
|||
|
static SecPlate from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonSecOpenroom
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const SecOpenroom &obj);
|
|||
|
|
|||
|
static SecOpenroom from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonSecCloseroom
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const SecCloseroom &obj);
|
|||
|
|
|||
|
static SecCloseroom from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonSecShell
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const SecShell &obj);
|
|||
|
|
|||
|
static SecShell from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonSubnode
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const Subnode &obj);
|
|||
|
|
|||
|
static Subnode from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonMat
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const Mat &obj);
|
|||
|
|
|||
|
static Mat from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonSubgirder
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const Subgirder &obj);
|
|||
|
static Subgirder from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonAttach
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const Attach &obj);
|
|||
|
|
|||
|
static Attach from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonGirder
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const Girder &obj);
|
|||
|
|
|||
|
static Girder from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonLoads
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const Loads &obj);
|
|||
|
|
|||
|
static Loads from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonOffset
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const Offset &obj);
|
|||
|
|
|||
|
static Offset from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonWL
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const WL &obj);
|
|||
|
|
|||
|
static WL from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonBonjean
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const Bonjean &obj);
|
|||
|
|
|||
|
static Bonjean from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonKL
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const KL &obj);
|
|||
|
|
|||
|
static KL from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonLoadCase
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const LoadCase &obj);
|
|||
|
|
|||
|
static LoadCase from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonStWeight
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const StWeight &obj);
|
|||
|
|
|||
|
static StWeight from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonItemWeight
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const ItemWeight &obj);
|
|||
|
|
|||
|
static ItemWeight from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonMTC
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const MTC &obj);
|
|||
|
|
|||
|
static MTC from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonLiftedCargo
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const LiftedCargo &obj);
|
|||
|
|
|||
|
static LiftedCargo from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonChkSubgirder
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const ChkSubgirder &obj);
|
|||
|
|
|||
|
static ChkSubgirder from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonChkPlate
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const ChkPlate &obj);
|
|||
|
|
|||
|
static ChkPlate from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonChkLongitudinal
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const ChkLongitudinal &obj);
|
|||
|
|
|||
|
static ChkLongitudinal from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonStaticLoad
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const StaticLoad &obj);
|
|||
|
|
|||
|
static StaticLoad from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonAllowLoad
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const AllowLoad &obj);
|
|||
|
|
|||
|
static AllowLoad from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonAddtionalLoad
|
|||
|
{
|
|||
|
public:
|
|||
|
// 从 AddtionalLoad 生成 JSON(静态方法)
|
|||
|
static nlohmann::json to_json(const AddtionalLoad &obj);
|
|||
|
|
|||
|
// 从 JSON 构造 AddtionalLoad(静态工厂)
|
|||
|
static AddtionalLoad from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonProjectInfo
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const ProjectInfo &obj);
|
|||
|
|
|||
|
static ProjectInfo from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
|
|||
|
class JsonPub
|
|||
|
{
|
|||
|
public:
|
|||
|
static nlohmann::json to_json(const Pub &obj);
|
|||
|
|
|||
|
static Pub from_json(const nlohmann::json &j);
|
|||
|
};
|
|||
|
}
|
|||
|
|
|||
|
#endif
|