コード例 #1
0
ファイル: utilities.cpp プロジェクト: DerekDick/MagicCube
void configServer(CubeServer &server, Value &config)
{
	server.MaxConnections = getSizeT(config["MaxConnections"]);

#ifdef ENABLE_IPV4
	{
		Value &IPVal = config["IPv4"];
		if (IPVal["Enable"].GetBool())
		{
			log_normal("Listening %s:%d...", IPVal["Address"].GetString(), IPVal["Port"].GetUint());
			server.Listen(IPVal["Address"].GetString(), IPVal["Port"].GetUint(), IPVal["Backlog"].GetInt());
		}
	}
#endif

#ifdef ENABLE_IPV6
	{
		Value &IPVal = config["IPv6"];
		if (IPVal["Enable"].GetBool())
		{
			log_normal("Listening [%s]:%d...", IPVal["Address"].GetString(), IPVal["Port"].GetUint());
			server.Listen6(IPVal["Address"].GetString(), IPVal["Port"].GetUint(), IPVal["Backlog"].GetInt());
		}
	}
#endif

	server.NeedAuth = config["Auth"].GetBool();
	server.ServerKey = config["ServerKey"].GetString();
}
コード例 #2
0
ファイル: FormatWriter.cpp プロジェクト: dgault/bioformats
 ome::compat::array<dimension_size_type, 3>
 FormatWriter::getZCTCoords(dimension_size_type index) const
 {
   assertId(currentId, true);
   return ome::bioformats::getZCTCoords(getDimensionOrder(),
                                        getSizeZ(),
                                        getEffectiveSizeC(),
                                        getSizeT(),
                                        getImageCount(),
                                        index);
 }
コード例 #3
0
ファイル: FormatWriter.cpp プロジェクト: dgault/bioformats
 dimension_size_type
 FormatWriter::getIndex(dimension_size_type z,
                        dimension_size_type c,
                        dimension_size_type t) const
 {
   assertId(currentId, true);
   return ome::bioformats::getIndex(getDimensionOrder(),
                                    getSizeZ(),
                                    getEffectiveSizeC(),
                                    getSizeT(),
                                    getImageCount(),
                                    z, c, t);
 }
コード例 #4
0
ファイル: utilities.cpp プロジェクト: DerekDick/MagicCube
vector<RoomInfo> loadRooms(Value &rooms)
{
	log_normal("%s", "Loading rooms...");

	size_t count = rooms.Size();
	vector<RoomInfo> ris;

	for (size_t i = 0; i < count; ++i)
	{
		Value &room = rooms[i];

		RoomInfo ri;
		ri.Name = room["Name"].GetString();
		ri.NeedAuth = room["Auth"].GetBool();
		ri.Key = room["Key"].GetString();
		ri.Capacity = getSizeT(room["Capacity"]);
		ris.push_back(move(ri));
		log_normal("%s...", room["Name"].GetString());
	}

	return ris;
}
コード例 #5
0
ファイル: FormatWriter.cpp プロジェクト: dgault/bioformats
 dimension_size_type
 FormatWriter::getImageCount() const
 {
   return getSizeZ() * getSizeT() * getEffectiveSizeC();
 }