hexsha stringlengths 40 40 | size int64 19 11.4M | ext stringclasses 13
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 270 | max_stars_repo_name stringlengths 5 110 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 9 | max_stars_count float64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 270 | max_issues_repo_name stringlengths 5 116 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 9 | max_issues_count float64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 270 | max_forks_repo_name stringlengths 5 116 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 9 | max_forks_count float64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 19 11.4M | avg_line_length float64 1.93 229k | max_line_length int64 12 688k | alphanum_fraction float64 0.07 0.99 | matches listlengths 1 10 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fc82bdd6585fdcc5d7a4f2f292b2a2c552859da1 | 9,290 | hpp | C++ | 3rdparty/link-android/include/ableton/link/Sessions.hpp | ferluht/pocketdaw | 0e40b32191e431cde54cd5944611c4b5b293ea68 | [
"BSD-2-Clause"
] | null | null | null | 3rdparty/link-android/include/ableton/link/Sessions.hpp | ferluht/pocketdaw | 0e40b32191e431cde54cd5944611c4b5b293ea68 | [
"BSD-2-Clause"
] | null | null | null | 3rdparty/link-android/include/ableton/link/Sessions.hpp | ferluht/pocketdaw | 0e40b32191e431cde54cd5944611c4b5b293ea68 | [
"BSD-2-Clause"
] | 1 | 2022-03-29T19:45:51.000Z | 2022-03-29T19:45:51.000Z | /* Copyright 2016, Ableton AG, Berlin. All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* If you would like to incorporate Link into a proprietary software application,
* please contact <link-devs@ableton.com>.
*/
#pragma once
#include <ableton/link/GhostXForm.hpp>
#include <ableton/link/SessionId.hpp>
#include <ableton/link/Timeline.hpp>
namespace ableton
{
namespace link
{
struct SessionMeasurement
{
GhostXForm xform;
std::chrono::microseconds timestamp;
};
struct Session
{
SessionId sessionId;
Timeline timeline;
SessionMeasurement measurement;
};
template <typename Peers,
typename MeasurePeer,
typename JoinSessionCallback,
typename IoContext,
typename Clock>
class Sessions
{
public:
using Timer = typename util::Injected<IoContext>::type::Timer;
Sessions(Session init,
util::Injected<Peers> peers,
MeasurePeer measure,
JoinSessionCallback join,
util::Injected<IoContext> io,
Clock clock)
: mPeers(std::move(peers))
, mMeasure(std::move(measure))
, mCallback(std::move(join))
, mCurrent(std::move(init))
, mIo(std::move(io))
, mTimer(mIo->makeTimer())
, mClock(std::move(clock))
{
}
void resetSession(Session session)
{
mCurrent = std::move(session);
mOtherSessions.clear();
}
void resetTimeline(Timeline timeline)
{
mCurrent.timeline = std::move(timeline);
}
// Consider the observed session/timeline pair and return a possibly
// new timeline that should be used going forward.
Timeline sawSessionTimeline(SessionId sid, Timeline timeline)
{
using namespace std;
if (sid == mCurrent.sessionId)
{
// matches our current session, update the timeline if necessary
updateTimeline(mCurrent, move(timeline));
}
else
{
auto session = Session{move(sid), move(timeline), {}};
const auto range =
equal_range(begin(mOtherSessions), end(mOtherSessions), session, SessionIdComp{});
if (range.first == range.second)
{
// brand new session, insert it into our list of known
// sessions and launch a measurement
launchSessionMeasurement(session);
mOtherSessions.insert(range.first, move(session));
}
else
{
// we've seen this session before, update its timeline if necessary
updateTimeline(*range.first, move(timeline));
}
}
return mCurrent.timeline;
}
private:
void launchSessionMeasurement(Session& session)
{
using namespace std;
auto peers = mPeers->sessionPeers(session.sessionId);
if (!peers.empty())
{
// first criteria: always prefer the founding peer
const auto it = find_if(begin(peers), end(peers),
[&session](const Peer& peer) { return session.sessionId == peer.first.ident(); });
// TODO: second criteria should be degree. We don't have that
// represented yet so just use the first peer for now
auto peer = it == end(peers) ? peers.front() : *it;
// mark that a session is in progress by clearing out the
// session's timestamp
session.measurement.timestamp = {};
mMeasure(move(peer), MeasurementResultsHandler{*this, session.sessionId});
}
}
void handleSuccessfulMeasurement(const SessionId& id, GhostXForm xform)
{
using namespace std;
debug(mIo->log()) << "Session " << id << " measurement completed with result "
<< "(" << xform.slope << ", " << xform.intercept.count() << ")";
auto measurement = SessionMeasurement{move(xform), mClock.micros()};
if (mCurrent.sessionId == id)
{
mCurrent.measurement = move(measurement);
mCallback(mCurrent);
}
else
{
const auto range = equal_range(
begin(mOtherSessions), end(mOtherSessions), Session{id, {}, {}}, SessionIdComp{});
if (range.first != range.second)
{
const auto SESSION_EPS = chrono::microseconds{500000};
// should we join this session?
const auto hostTime = mClock.micros();
const auto curGhost = mCurrent.measurement.xform.hostToGhost(hostTime);
const auto newGhost = measurement.xform.hostToGhost(hostTime);
// update the measurement for the session entry
range.first->measurement = move(measurement);
// If session times too close - fall back to session id order
const auto ghostDiff = newGhost - curGhost;
if (ghostDiff > SESSION_EPS
|| (std::abs(ghostDiff.count()) < SESSION_EPS.count()
&& id < mCurrent.sessionId))
{
// The new session wins, switch over to it
auto current = mCurrent;
mCurrent = move(*range.first);
mOtherSessions.erase(range.first);
// Put the old current session back into our list of known
// sessions so that we won't re-measure it
const auto it = upper_bound(
begin(mOtherSessions), end(mOtherSessions), current, SessionIdComp{});
mOtherSessions.insert(it, move(current));
// And notify that we have a new session and make sure that
// we remeasure it periodically.
mCallback(mCurrent);
scheduleRemeasurement();
}
}
}
}
void scheduleRemeasurement()
{
// set a timer to re-measure the active session after a period
mTimer.expires_from_now(std::chrono::microseconds{30000000});
mTimer.async_wait([this](const typename Timer::ErrorCode e) {
if (!e)
{
launchSessionMeasurement(mCurrent);
scheduleRemeasurement();
}
});
}
void handleFailedMeasurement(const SessionId& id)
{
using namespace std;
debug(mIo->log()) << "Session " << id << " measurement failed.";
// if we failed to measure for our current session, schedule a
// retry in the future. Otherwise, remove the session from our set
// of known sessions (if it is seen again it will be measured as
// if new).
if (mCurrent.sessionId == id)
{
scheduleRemeasurement();
}
else
{
const auto range = equal_range(
begin(mOtherSessions), end(mOtherSessions), Session{id, {}, {}}, SessionIdComp{});
if (range.first != range.second)
{
mOtherSessions.erase(range.first);
mPeers->forgetSession(id);
}
}
}
void updateTimeline(Session& session, Timeline timeline)
{
// We use beat origin magnitude to prioritize sessions.
if (timeline.beatOrigin > session.timeline.beatOrigin)
{
debug(mIo->log()) << "Adopting peer timeline (" << timeline.tempo.bpm() << ", "
<< timeline.beatOrigin.floating() << ", "
<< timeline.timeOrigin.count() << ")";
session.timeline = std::move(timeline);
}
else
{
debug(mIo->log()) << "Rejecting peer timeline with beat origin: "
<< timeline.beatOrigin.floating()
<< ". Current timeline beat origin: "
<< session.timeline.beatOrigin.floating();
}
}
struct MeasurementResultsHandler
{
void operator()(GhostXForm xform) const
{
Sessions& sessions = mSessions;
const SessionId& sessionId = mSessionId;
if (xform == GhostXForm{})
{
mSessions.mIo->async([&sessions, sessionId] {
sessions.handleFailedMeasurement(std::move(sessionId));
});
}
else
{
mSessions.mIo->async([&sessions, sessionId, xform] {
sessions.handleSuccessfulMeasurement(std::move(sessionId), std::move(xform));
});
}
}
Sessions& mSessions;
SessionId mSessionId;
};
struct SessionIdComp
{
bool operator()(const Session& lhs, const Session& rhs) const
{
return lhs.sessionId < rhs.sessionId;
}
};
using Peer = typename util::Injected<Peers>::type::Peer;
util::Injected<Peers> mPeers;
MeasurePeer mMeasure;
JoinSessionCallback mCallback;
Session mCurrent;
util::Injected<IoContext> mIo;
Timer mTimer;
Clock mClock;
std::vector<Session> mOtherSessions; // sorted/unique by session id
};
template <typename Peers,
typename MeasurePeer,
typename JoinSessionCallback,
typename IoContext,
typename Clock>
Sessions<Peers, MeasurePeer, JoinSessionCallback, IoContext, Clock> makeSessions(
Session init,
util::Injected<Peers> peers,
MeasurePeer measure,
JoinSessionCallback join,
util::Injected<IoContext> io,
Clock clock)
{
using namespace std;
return {move(init), move(peers), move(measure), move(join), move(io), move(clock)};
}
} // namespace link
} // namespace ableton
| 30.459016 | 90 | 0.646071 | [
"vector"
] |
fc83bd383ddff4800752a67950722b8aad3a1b1a | 184 | cc | C++ | facebook_interview_practice/HackerRank/Left_Rotation/solve.cc | ldy121/algorithm | 7939cb4c15e2bc655219c934f00c2bb74ddb4eec | [
"Apache-2.0"
] | 1 | 2020-04-11T22:04:23.000Z | 2020-04-11T22:04:23.000Z | facebook_interview_practice/HackerRank/Left_Rotation/solve.cc | ldy121/algorithm | 7939cb4c15e2bc655219c934f00c2bb74ddb4eec | [
"Apache-2.0"
] | null | null | null | facebook_interview_practice/HackerRank/Left_Rotation/solve.cc | ldy121/algorithm | 7939cb4c15e2bc655219c934f00c2bb74ddb4eec | [
"Apache-2.0"
] | null | null | null | vector<int> rotLeft(vector<int> a, int d) {
vector<int> ret;
for (int i = d % a.size(), j = 0; j < a.size(); ++j, i = (i + 1) % a.size()) {
ret.push_back(a[i]);
}
return ret;
}
| 23 | 79 | 0.516304 | [
"vector"
] |
fc844d2ffc69d51ab72d78b10e78cd86b1ad4fbe | 166,500 | cpp | C++ | html_parser/parser.cpp | johnzhd/learnandtraining | 31cc0595cded675c3c860920dfb57b0e49727a52 | [
"MIT"
] | null | null | null | html_parser/parser.cpp | johnzhd/learnandtraining | 31cc0595cded675c3c860920dfb57b0e49727a52 | [
"MIT"
] | null | null | null | html_parser/parser.cpp | johnzhd/learnandtraining | 31cc0595cded675c3c860920dfb57b0e49727a52 | [
"MIT"
] | 1 | 2019-04-30T18:56:59.000Z | 2019-04-30T18:56:59.000Z | // Copyright 2010 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Author: jdtang@google.com (Jonathan Tang)
#include "stdafx.h"
#include <assert.h>
#include <ctype.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
//#include <strings.h>
#include "attribute.h"
#include "error.h"
#include "gumbo.h"
#include "insertion_mode.h"
#include "parser.h"
#include "tokenizer.h"
#include "tokenizer_states.h"
#include "utf8.h"
#include "util.h"
#include "vector.h"
#define AVOID_UNUSED_VARIABLE_WARNING(i) (void)(i)
#define GUMBO_STRING(literal) { literal, sizeof(literal) - 1 }
#define TERMINATOR { "", 0 }
static void* malloc_wrapper(void* unused, size_t size) {
(unused);
return malloc(size);
}
static void free_wrapper(void* unused, void* ptr) {
(unused);
free(ptr);
}
const GumboOptions kGumboDefaultOptions = {
&malloc_wrapper,
&free_wrapper,
NULL,
8,
false,
-1,
};
static const GumboStringPiece kDoctypeHtml = GUMBO_STRING("html");
static const GumboStringPiece kPublicIdHtml4_0 = GUMBO_STRING(
"-//W3C//DTD HTML 4.0//EN");
static const GumboStringPiece kPublicIdHtml4_01 = GUMBO_STRING(
"-//W3C//DTD HTML 4.01//EN");
static const GumboStringPiece kPublicIdXhtml1_0 = GUMBO_STRING(
"-//W3C//DTD XHTML 1.0 Strict//EN");
static const GumboStringPiece kPublicIdXhtml1_1 = GUMBO_STRING(
"-//W3C//DTD XHTML 1.1//EN");
static const GumboStringPiece kSystemIdRecHtml4_0 = GUMBO_STRING(
"http://www.w3.org/TR/REC-html40/strict.dtd");
static const GumboStringPiece kSystemIdHtml4 = GUMBO_STRING(
"http://www.w3.org/TR/html4/strict.dtd");
static const GumboStringPiece kSystemIdXhtmlStrict1_1 = GUMBO_STRING(
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd");
static const GumboStringPiece kSystemIdXhtml1_1 = GUMBO_STRING(
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd");
static const GumboStringPiece kSystemIdLegacyCompat = GUMBO_STRING(
"about:legacy-compat");
// The doctype arrays have an explicit terminator because we want to pass them
// to a helper function, and passing them as a pointer discards sizeof
// information. The SVG arrays are used only by one-off functions, and so loops
// over them use sizeof directly instead of a terminator.
static const GumboStringPiece kQuirksModePublicIdPrefixes[] = {
GUMBO_STRING("+//Silmaril//dtd html Pro v0r11 19970101//"),
GUMBO_STRING("-//AdvaSoft Ltd//DTD HTML 3.0 asWedit + extensions//"),
GUMBO_STRING("-//AS//DTD HTML 3.0 asWedit + extensions//"),
GUMBO_STRING("-//IETF//DTD HTML 2.0 Level 1//"),
GUMBO_STRING("-//IETF//DTD HTML 2.0 Level 2//"),
GUMBO_STRING("-//IETF//DTD HTML 2.0 Strict Level 1//"),
GUMBO_STRING("-//IETF//DTD HTML 2.0 Strict Level 2//"),
GUMBO_STRING("-//IETF//DTD HTML 2.0 Strict//"),
GUMBO_STRING("-//IETF//DTD HTML 2.0//"),
GUMBO_STRING("-//IETF//DTD HTML 2.1E//"),
GUMBO_STRING("-//IETF//DTD HTML 3.0//"),
GUMBO_STRING("-//IETF//DTD HTML 3.2 Final//"),
GUMBO_STRING("-//IETF//DTD HTML 3.2//"),
GUMBO_STRING("-//IETF//DTD HTML 3//"),
GUMBO_STRING("-//IETF//DTD HTML Level 0//"),
GUMBO_STRING("-//IETF//DTD HTML Level 1//"),
GUMBO_STRING("-//IETF//DTD HTML Level 2//"),
GUMBO_STRING("-//IETF//DTD HTML Level 3//"),
GUMBO_STRING("-//IETF//DTD HTML Strict Level 0//"),
GUMBO_STRING("-//IETF//DTD HTML Strict Level 1//"),
GUMBO_STRING("-//IETF//DTD HTML Strict Level 2//"),
GUMBO_STRING("-//IETF//DTD HTML Strict Level 3//"),
GUMBO_STRING("-//IETF//DTD HTML Strict//"),
GUMBO_STRING("-//IETF//DTD HTML//"),
GUMBO_STRING("-//Metrius//DTD Metrius Presentational//"),
GUMBO_STRING("-//Microsoft//DTD Internet Explorer 2.0 HTML Strict//"),
GUMBO_STRING("-//Microsoft//DTD Internet Explorer 2.0 HTML//"),
GUMBO_STRING("-//Microsoft//DTD Internet Explorer 2.0 Tables//"),
GUMBO_STRING("-//Microsoft//DTD Internet Explorer 3.0 HTML Strict//"),
GUMBO_STRING("-//Microsoft//DTD Internet Explorer 3.0 HTML//"),
GUMBO_STRING("-//Microsoft//DTD Internet Explorer 3.0 Tables//"),
GUMBO_STRING("-//Netscape Comm. Corp.//DTD HTML//"),
GUMBO_STRING("-//Netscape Comm. Corp.//DTD Strict HTML//"),
GUMBO_STRING("-//O'Reilly and Associates//DTD HTML 2.0//"),
GUMBO_STRING("-//O'Reilly and Associates//DTD HTML Extended 1.0//"),
GUMBO_STRING("-//O'Reilly and Associates//DTD HTML Extended Relaxed 1.0//"),
GUMBO_STRING("-//SoftQuad Software//DTD HoTMetaL PRO 6.0::19990601::)"
"extensions to HTML 4.0//"),
GUMBO_STRING("-//SoftQuad//DTD HoTMetaL PRO 4.0::19971010::"
"extensions to HTML 4.0//"),
GUMBO_STRING("-//Spyglass//DTD HTML 2.0 Extended//"),
GUMBO_STRING("-//SQ//DTD HTML 2.0 HoTMetaL + extensions//"),
GUMBO_STRING("-//Sun Microsystems Corp.//DTD HotJava HTML//"),
GUMBO_STRING("-//Sun Microsystems Corp.//DTD HotJava Strict HTML//"),
GUMBO_STRING("-//W3C//DTD HTML 3 1995-03-24//"),
GUMBO_STRING("-//W3C//DTD HTML 3.2 Draft//"),
GUMBO_STRING("-//W3C//DTD HTML 3.2 Final//"),
GUMBO_STRING("-//W3C//DTD HTML 3.2//"),
GUMBO_STRING("-//W3C//DTD HTML 3.2S Draft//"),
GUMBO_STRING("-//W3C//DTD HTML 4.0 Frameset//"),
GUMBO_STRING("-//W3C//DTD HTML 4.0 Transitional//"),
GUMBO_STRING("-//W3C//DTD HTML Experimental 19960712//"),
GUMBO_STRING("-//W3C//DTD HTML Experimental 970421//"),
GUMBO_STRING("-//W3C//DTD W3 HTML//"),
GUMBO_STRING("-//W3O//DTD W3 HTML 3.0//"),
GUMBO_STRING("-//WebTechs//DTD Mozilla HTML 2.0//"),
GUMBO_STRING("-//WebTechs//DTD Mozilla HTML//"),
TERMINATOR
};
static const GumboStringPiece kQuirksModePublicIdExactMatches[] = {
GUMBO_STRING("-//W3O//DTD W3 HTML Strict 3.0//EN//"),
GUMBO_STRING("-/W3C/DTD HTML 4.0 Transitional/EN"),
GUMBO_STRING("HTML"),
TERMINATOR
};
static const GumboStringPiece kQuirksModeSystemIdExactMatches[] = {
GUMBO_STRING("http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"),
TERMINATOR
};
static const GumboStringPiece kLimitedQuirksPublicIdPrefixes[] = {
GUMBO_STRING("-//W3C//DTD XHTML 1.0 Frameset//"),
GUMBO_STRING("-//W3C//DTD XHTML 1.0 Transitional//"),
TERMINATOR
};
static const GumboStringPiece kLimitedQuirksRequiresSystemIdPublicIdPrefixes[] = {
GUMBO_STRING("-//W3C//DTD HTML 4.01 Frameset//"),
GUMBO_STRING("-//W3C//DTD HTML 4.01 Transitional//"),
TERMINATOR
};
// Indexed by GumboNamespaceEnum; keep in sync with that.
static const char* kLegalXmlns[] = {
"http://www.w3.org/1999/xhtml",
"http://www.w3.org/2000/svg",
"http://www.w3.org/1998/Math/MathML"
};
typedef struct _ReplacementEntry {
const GumboStringPiece from;
const GumboStringPiece to;
} ReplacementEntry;
#define REPLACEMENT_ENTRY(from, to) \
{ GUMBO_STRING(from), GUMBO_STRING(to) }
// Static data for SVG attribute replacements.
// http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#adjust-svg-attributes
static const ReplacementEntry kSvgAttributeReplacements[] = {
REPLACEMENT_ENTRY("attributename", "attributeName"),
REPLACEMENT_ENTRY("attributetype", "attributeType"),
REPLACEMENT_ENTRY("basefrequency", "baseFrequency"),
REPLACEMENT_ENTRY("baseprofile", "baseProfile"),
REPLACEMENT_ENTRY("calcmode", "calcMode"),
REPLACEMENT_ENTRY("clippathunits", "clipPathUnits"),
REPLACEMENT_ENTRY("contentscripttype", "contentScriptType"),
REPLACEMENT_ENTRY("contentstyletype", "contentStyleType"),
REPLACEMENT_ENTRY("diffuseconstant", "diffuseConstant"),
REPLACEMENT_ENTRY("edgemode", "edgeMode"),
REPLACEMENT_ENTRY("externalresourcesrequired", "externalResourcesRequired"),
REPLACEMENT_ENTRY("filterres", "filterRes"),
REPLACEMENT_ENTRY("filterunits", "filterUnits"),
REPLACEMENT_ENTRY("glyphref", "glyphRef"),
REPLACEMENT_ENTRY("gradienttransform", "gradientTransform"),
REPLACEMENT_ENTRY("gradientunits", "gradientUnits"),
REPLACEMENT_ENTRY("kernelmatrix", "kernelMatrix"),
REPLACEMENT_ENTRY("kernelunitlength", "kernelUnitLength"),
REPLACEMENT_ENTRY("keypoints", "keyPoints"),
REPLACEMENT_ENTRY("keysplines", "keySplines"),
REPLACEMENT_ENTRY("keytimes", "keyTimes"),
REPLACEMENT_ENTRY("lengthadjust", "lengthAdjust"),
REPLACEMENT_ENTRY("limitingconeangle", "limitingConeAngle"),
REPLACEMENT_ENTRY("markerheight", "markerHeight"),
REPLACEMENT_ENTRY("markerunits", "markerUnits"),
REPLACEMENT_ENTRY("markerwidth", "markerWidth"),
REPLACEMENT_ENTRY("maskcontentunits", "maskContentUnits"),
REPLACEMENT_ENTRY("maskunits", "maskUnits"),
REPLACEMENT_ENTRY("numoctaves", "numOctaves"),
REPLACEMENT_ENTRY("pathlength", "pathLength"),
REPLACEMENT_ENTRY("patterncontentunits", "patternContentUnits"),
REPLACEMENT_ENTRY("patterntransform", "patternTransform"),
REPLACEMENT_ENTRY("patternunits", "patternUnits"),
REPLACEMENT_ENTRY("pointsatx", "pointsAtX"),
REPLACEMENT_ENTRY("pointsaty", "pointsAtY"),
REPLACEMENT_ENTRY("pointsatz", "pointsAtZ"),
REPLACEMENT_ENTRY("preservealpha", "preserveAlpha"),
REPLACEMENT_ENTRY("preserveaspectratio", "preserveAspectRatio"),
REPLACEMENT_ENTRY("primitiveunits", "primitiveUnits"),
REPLACEMENT_ENTRY("refx", "refX"),
REPLACEMENT_ENTRY("refy", "refY"),
REPLACEMENT_ENTRY("repeatcount", "repeatCount"),
REPLACEMENT_ENTRY("repeatdur", "repeatDur"),
REPLACEMENT_ENTRY("requiredextensions", "requiredExtensions"),
REPLACEMENT_ENTRY("requiredfeatures", "requiredFeatures"),
REPLACEMENT_ENTRY("specularconstant", "specularConstant"),
REPLACEMENT_ENTRY("specularexponent", "specularExponent"),
REPLACEMENT_ENTRY("spreadmethod", "spreadMethod"),
REPLACEMENT_ENTRY("startoffset", "startOffset"),
REPLACEMENT_ENTRY("stddeviation", "stdDeviation"),
REPLACEMENT_ENTRY("stitchtiles", "stitchTiles"),
REPLACEMENT_ENTRY("surfacescale", "surfaceScale"),
REPLACEMENT_ENTRY("systemlanguage", "systemLanguage"),
REPLACEMENT_ENTRY("tablevalues", "tableValues"),
REPLACEMENT_ENTRY("targetx", "targetX"),
REPLACEMENT_ENTRY("targety", "targetY"),
REPLACEMENT_ENTRY("textlength", "textLength"),
REPLACEMENT_ENTRY("viewbox", "viewBox"),
REPLACEMENT_ENTRY("viewtarget", "viewTarget"),
REPLACEMENT_ENTRY("xchannelselector", "xChannelSelector"),
REPLACEMENT_ENTRY("ychannelselector", "yChannelSelector"),
REPLACEMENT_ENTRY("zoomandpan", "zoomAndPan"),
};
static const ReplacementEntry kSvgTagReplacements[] = {
REPLACEMENT_ENTRY("altglyph", "altGlyph"),
REPLACEMENT_ENTRY("altglyphdef", "altGlyphDef"),
REPLACEMENT_ENTRY("altglyphitem", "altGlyphItem"),
REPLACEMENT_ENTRY("animatecolor", "animateColor"),
REPLACEMENT_ENTRY("animatemotion", "animateMotion"),
REPLACEMENT_ENTRY("animatetransform", "animateTransform"),
REPLACEMENT_ENTRY("clippath", "clipPath"),
REPLACEMENT_ENTRY("feblend", "feBlend"),
REPLACEMENT_ENTRY("fecolormatrix", "feColorMatrix"),
REPLACEMENT_ENTRY("fecomponenttransfer", "feComponentTransfer"),
REPLACEMENT_ENTRY("fecomposite", "feComposite"),
REPLACEMENT_ENTRY("feconvolvematrix", "feConvolveMatrix"),
REPLACEMENT_ENTRY("fediffuselighting", "feDiffuseLighting"),
REPLACEMENT_ENTRY("fedisplacementmap", "feDisplacementMap"),
REPLACEMENT_ENTRY("fedistantlight", "feDistantLight"),
REPLACEMENT_ENTRY("feflood", "feFlood"),
REPLACEMENT_ENTRY("fefunca", "feFuncA"),
REPLACEMENT_ENTRY("fefuncb", "feFuncB"),
REPLACEMENT_ENTRY("fefuncg", "feFuncG"),
REPLACEMENT_ENTRY("fefuncr", "feFuncR"),
REPLACEMENT_ENTRY("fegaussianblur", "feGaussianBlur"),
REPLACEMENT_ENTRY("feimage", "feImage"),
REPLACEMENT_ENTRY("femerge", "feMerge"),
REPLACEMENT_ENTRY("femergenode", "feMergeNode"),
REPLACEMENT_ENTRY("femorphology", "feMorphology"),
REPLACEMENT_ENTRY("feoffset", "feOffset"),
REPLACEMENT_ENTRY("fepointlight", "fePointLight"),
REPLACEMENT_ENTRY("fespecularlighting", "feSpecularLighting"),
REPLACEMENT_ENTRY("fespotlight", "feSpotLight"),
REPLACEMENT_ENTRY("fetile", "feTile"),
REPLACEMENT_ENTRY("feturbulence", "feTurbulence"),
REPLACEMENT_ENTRY("foreignobject", "foreignObject"),
REPLACEMENT_ENTRY("glyphref", "glyphRef"),
REPLACEMENT_ENTRY("lineargradient", "linearGradient"),
REPLACEMENT_ENTRY("radialgradient", "radialGradient"),
REPLACEMENT_ENTRY("textpath", "textPath"),
};
typedef struct _NamespacedAttributeReplacement {
const char* from;
const char* local_name;
const GumboAttributeNamespaceEnum attr_namespace;
} NamespacedAttributeReplacement;
static const NamespacedAttributeReplacement kForeignAttributeReplacements[] = {
{ "xlink:actuate", "actuate", GUMBO_ATTR_NAMESPACE_XLINK },
{ "xlink:actuate", "actuate", GUMBO_ATTR_NAMESPACE_XLINK },
{ "xlink:href", "href", GUMBO_ATTR_NAMESPACE_XLINK },
{ "xlink:role", "role", GUMBO_ATTR_NAMESPACE_XLINK },
{ "xlink:show", "show", GUMBO_ATTR_NAMESPACE_XLINK },
{ "xlink:title", "title", GUMBO_ATTR_NAMESPACE_XLINK },
{ "xlink:type", "type", GUMBO_ATTR_NAMESPACE_XLINK },
{ "xml:base", "base", GUMBO_ATTR_NAMESPACE_XML },
{ "xml:lang", "lang", GUMBO_ATTR_NAMESPACE_XML },
{ "xml:space", "space", GUMBO_ATTR_NAMESPACE_XML },
{ "xmlns", "xmlns", GUMBO_ATTR_NAMESPACE_XMLNS },
{ "xmlns:xlink", "xlink", GUMBO_ATTR_NAMESPACE_XMLNS },
};
// The "scope marker" for the list of active formatting elements. We use a
// pointer to this as a generic marker element, since the particular element
// scope doesn't matter.
static const GumboNode kActiveFormattingScopeMarker;
// The tag_is and tag_in function use true & false to denote start & end tags,
// but for readability, we define constants for them here.
static const bool kStartTag = true;
static const bool kEndTag = false;
// Because GumboStringPieces are immutable, we can't insert a character directly
// into a text node. Instead, we accumulate all pending characters here and
// flush them out to a text node whenever a new element is inserted.
//
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#insert-a-character
typedef struct _TextNodeBufferState {
// The accumulated text to be inserted into the current text node.
GumboStringBuffer _buffer;
// A pointer to the original text represented by this text node. Note that
// because of foster parenting and other strange DOM manipulations, this may
// include other non-text HTML tags in it; it is defined as the span of
// original text from the first character in this text node to the last
// character in this text node.
const char* _start_original_text;
// The source position of the start of this text node.
GumboSourcePosition _start_position;
// The type of node that will be inserted (TEXT or WHITESPACE).
GumboNodeType _type;
} TextNodeBufferState;
typedef struct GumboInternalParserState {
// http://www.whatwg.org/specs/web-apps/current-work/complete/parsing.html#insertion-mode
GumboInsertionMode _insertion_mode;
// Used for run_generic_parsing_algorithm, which needs to switch back to the
// original insertion mode at its conclusion.
GumboInsertionMode _original_insertion_mode;
// http://www.whatwg.org/specs/web-apps/current-work/complete/parsing.html#the-stack-of-open-elements
GumboVector /*GumboNode*/ _open_elements;
// http://www.whatwg.org/specs/web-apps/current-work/complete/parsing.html#the-list-of-active-formatting-elements
GumboVector /*GumboNode*/ _active_formatting_elements;
// The stack of template insertion modes.
// http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#the-insertion-mode
GumboVector /*InsertionMode*/ _template_insertion_modes;
// http://www.whatwg.org/specs/web-apps/current-work/complete/parsing.html#the-element-pointers
GumboNode* _head_element;
GumboNode* _form_element;
// The flag for when the spec says "Reprocess the current token in..."
bool _reprocess_current_token;
// The flag for "acknowledge the token's self-closing flag".
bool _self_closing_flag_acknowledged;
// The "frameset-ok" flag from the spec.
bool _frameset_ok;
// The flag for "If the next token is a LINE FEED, ignore that token...".
bool _ignore_next_linefeed;
// The flag for "whenever a node would be inserted into the current node, it
// must instead be foster parented". This is used for misnested table
// content, which needs to be handled according to "in body" rules yet foster
// parented outside of the table.
// It would perhaps be more explicit to have this as a parameter to
// handle_in_body and insert_element, but given how special-purpose this is
// and the number of call-sites that would need to take the extra parameter,
// it's easier just to have a state flag.
bool _foster_parent_insertions;
// The accumulated text node buffer state.
TextNodeBufferState _text_node;
// The current token.
GumboToken* _current_token;
// The way that the spec is written, the </body> and </html> tags are *always*
// implicit, because encountering one of those tokens merely switches the
// insertion mode out of "in body". So we have individual state flags for
// those end tags that are then inspected by pop_current_node when the <body>
// and <html> nodes are popped to set the GUMBO_INSERTION_IMPLICIT_END_TAG
// flag appropriately.
bool _closed_body_tag;
bool _closed_html_tag;
} GumboParserState;
static bool token_has_attribute(const GumboToken* token, const char* name) {
assert(token->type == GUMBO_TOKEN_START_TAG);
return gumbo_get_attribute(&token->v.start_tag.attributes, name) != NULL;
}
// Checks if the value of the specified attribute is a case-insensitive match
// for the specified string.
static bool attribute_matches(
const GumboVector* attributes, const char* name, const char* value) {
const GumboAttribute* attr = gumbo_get_attribute(attributes, name);
return attr ? _strcasecmp(value, attr->value) == 0 : false;
}
// Checks if the value of the specified attribute is a case-sensitive match
// for the specified string.
static bool attribute_matches_case_sensitive(
const GumboVector* attributes, const char* name, const char* value) {
const GumboAttribute* attr = gumbo_get_attribute(attributes, name);
return attr ? strcmp(value, attr->value) == 0 : false;
}
// Checks if the specified attribute vectors are identical.
static bool all_attributes_match(
const GumboVector* attr1, const GumboVector* attr2) {
int num_unmatched_attr2_elements = attr2->length;
for (unsigned int i = 0; i < attr1->length; ++i) {
const GumboAttribute* attr = (GumboAttribute*)attr1->data[i];
if (attribute_matches_case_sensitive(attr2, attr->name, attr->value)) {
--num_unmatched_attr2_elements;
} else {
return false;
}
}
return num_unmatched_attr2_elements == 0;
}
static void set_frameset_not_ok(GumboParser* parser) {
gumbo_debug("Setting frameset_ok to false.\n");
parser->_parser_state->_frameset_ok = false;
}
static GumboNode* create_node(GumboParser* parser, GumboNodeType type) {
GumboNode* node = (GumboNode*)gumbo_parser_allocate(parser, sizeof(GumboNode));
node->parent = NULL;
node->index_within_parent = -1;
node->type = type;
node->parse_flags = GUMBO_INSERTION_NORMAL;
return node;
}
static GumboNode* new_document_node(GumboParser* parser) {
GumboNode* document_node = create_node(parser, GUMBO_NODE_DOCUMENT);
document_node->parse_flags = GUMBO_INSERTION_BY_PARSER;
gumbo_vector_init(
parser, 1, &document_node->v.document.children);
// Must be initialized explicitly, as there's no guarantee that we'll see a
// doc type token.
GumboDocument* document = &document_node->v.document;
document->has_doctype = false;
document->name = NULL;
document->public_identifier = NULL;
document->system_identifier = NULL;
return document_node;
}
static void output_init(GumboParser* parser) {
GumboOutput* output = (GumboOutput*)gumbo_parser_allocate(parser, sizeof(GumboOutput));
output->root = NULL;
output->document = new_document_node(parser);
parser->_output = output;
gumbo_init_errors(parser);
}
static void parser_state_init(GumboParser* parser) {
GumboParserState* parser_state = (GumboParserState*)
gumbo_parser_allocate(parser, sizeof(GumboParserState));
parser_state->_insertion_mode = GUMBO_INSERTION_MODE_INITIAL;
parser_state->_reprocess_current_token = false;
parser_state->_frameset_ok = true;
parser_state->_ignore_next_linefeed = false;
parser_state->_foster_parent_insertions = false;
parser_state->_text_node._type = GUMBO_NODE_WHITESPACE;
gumbo_string_buffer_init(parser, &parser_state->_text_node._buffer);
gumbo_vector_init(parser, 10, &parser_state->_open_elements);
gumbo_vector_init(parser, 5, &parser_state->_active_formatting_elements);
gumbo_vector_init(parser, 5, &parser_state->_template_insertion_modes);
parser_state->_head_element = NULL;
parser_state->_form_element = NULL;
parser_state->_current_token = NULL;
parser_state->_closed_body_tag = false;
parser_state->_closed_html_tag = false;
parser->_parser_state = parser_state;
}
static void parser_state_destroy(GumboParser* parser) {
GumboParserState* state = parser->_parser_state;
gumbo_vector_destroy(parser, &state->_active_formatting_elements);
gumbo_vector_destroy(parser, &state->_open_elements);
gumbo_vector_destroy(parser, &state->_template_insertion_modes);
gumbo_string_buffer_destroy(parser, &state->_text_node._buffer);
gumbo_parser_deallocate(parser, state);
}
static GumboNode* get_document_node(GumboParser* parser) {
return parser->_output->document;
}
// Returns the node at the bottom of the stack of open elements, or NULL if no
// elements have been added yet.
static GumboNode* get_current_node(GumboParser* parser) {
GumboVector* open_elements = &parser->_parser_state->_open_elements;
if (open_elements->length == 0) {
assert(!parser->_output->root);
return NULL;
}
assert(open_elements->length > 0);
assert(open_elements->data != NULL);
return (GumboNode*)open_elements->data[open_elements->length - 1];
}
// Returns true if the given needle is in the given array of literal
// GumboStringPieces. If exact_match is true, this requires that they match
// exactly; otherwise, this performs a prefix match to check if any of the
// elements in haystack start with needle. This always performs a
// case-insensitive match.
static bool is_in_static_list(
const char* needle, const GumboStringPiece* haystack, bool exact_match) {
for (int i = 0; haystack[i].length > 0; ++i) {
if ((exact_match && !strcmp(needle, haystack[i].data)) ||
(!exact_match && !_strcasecmp(needle, haystack[i].data))) {
return true;
}
}
return false;
}
static void push_template_insertion_mode(
GumboParser* parser, GumboInsertionMode mode) {
gumbo_vector_add(
parser, (void*) mode, &parser->_parser_state->_template_insertion_modes);
}
static void pop_template_insertion_mode(GumboParser* parser) {
gumbo_vector_pop(parser, &parser->_parser_state->_template_insertion_modes);
}
static GumboInsertionMode get_current_template_insertion_mode(
GumboParser* parser) {
GumboVector* template_insertion_modes =
&parser->_parser_state->_template_insertion_modes;
assert(template_insertion_modes->length > 0);
return (GumboInsertionMode)(int)template_insertion_modes->data[
template_insertion_modes->length - 1];
}
static void set_insertion_mode(GumboParser* parser, GumboInsertionMode mode) {
parser->_parser_state->_insertion_mode = mode;
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/parsing.html#reset-the-insertion-mode-appropriately
// This is a helper function that returns the appropriate insertion mode instead
// of setting it. Returns GUMBO_INSERTION_MODE_INITIAL as a sentinel value to
// indicate that there is no appropriate insertion mode, and the loop should
// continue.
static GumboInsertionMode get_appropriate_insertion_mode(
const GumboNode* node, bool is_last) {
assert(node->type == GUMBO_NODE_ELEMENT);
switch (node->v.element.tag) {
case GUMBO_TAG_SELECT:
return GUMBO_INSERTION_MODE_IN_SELECT;
case GUMBO_TAG_TD:
case GUMBO_TAG_TH:
return is_last ?
GUMBO_INSERTION_MODE_IN_BODY : GUMBO_INSERTION_MODE_IN_CELL;
case GUMBO_TAG_TR:
return GUMBO_INSERTION_MODE_IN_ROW;
case GUMBO_TAG_TBODY:
case GUMBO_TAG_THEAD:
case GUMBO_TAG_TFOOT:
return GUMBO_INSERTION_MODE_IN_TABLE_BODY;
case GUMBO_TAG_CAPTION:
return GUMBO_INSERTION_MODE_IN_CAPTION;
case GUMBO_TAG_COLGROUP:
return GUMBO_INSERTION_MODE_IN_COLUMN_GROUP;
case GUMBO_TAG_TABLE:
return GUMBO_INSERTION_MODE_IN_TABLE;
case GUMBO_TAG_HEAD:
case GUMBO_TAG_BODY:
return GUMBO_INSERTION_MODE_IN_BODY;
case GUMBO_TAG_FRAMESET:
return GUMBO_INSERTION_MODE_IN_FRAMESET;
case GUMBO_TAG_HTML:
return GUMBO_INSERTION_MODE_BEFORE_HEAD;
default:
return is_last ?
GUMBO_INSERTION_MODE_IN_BODY : GUMBO_INSERTION_MODE_INITIAL;
}
}
// This performs the actual "reset the insertion mode" loop.
static void reset_insertion_mode_appropriately(GumboParser* parser) {
const GumboVector* open_elements = &parser->_parser_state->_open_elements;
for (int i = open_elements->length; --i >= 0; ) {
GumboInsertionMode mode =
get_appropriate_insertion_mode((GumboNode*)open_elements->data[i], i == 0);
if (mode != GUMBO_INSERTION_MODE_INITIAL) {
set_insertion_mode(parser, mode);
return;
}
}
// Should never get here, because is_last will be set on the last iteration
// and will force GUMBO_INSERTION_MODE_IN_BODY.
assert(0);
}
static GumboError* add_parse_error(GumboParser* parser, const GumboToken* token) {
gumbo_debug("Adding parse error.\n");
GumboError* error = gumbo_add_error(parser);
if (!error) {
return NULL;
}
error->type = GUMBO_ERR_PARSER;
error->position = token->position;
error->original_text = token->original_text.data;
GumboParserError* extra_data = &error->v.parser;
extra_data->input_type = token->type;
extra_data->input_tag = GUMBO_TAG_UNKNOWN;
if (token->type == GUMBO_TOKEN_START_TAG) {
extra_data->input_tag = token->v.start_tag.tag;
} else if (token->type == GUMBO_TOKEN_END_TAG) {
extra_data->input_tag = token->v.end_tag;
}
GumboParserState* state = parser->_parser_state;
extra_data->parser_state = state->_insertion_mode;
gumbo_vector_init(parser, state->_open_elements.length,
&extra_data->tag_stack);
for (unsigned int i = 0; i < state->_open_elements.length; ++i) {
const GumboNode* node = (GumboNode*)state->_open_elements.data[i];
assert(node->type == GUMBO_NODE_ELEMENT);
gumbo_vector_add(parser, (void*) node->v.element.tag,
&extra_data->tag_stack);
}
return error;
}
// Returns true if the specified token is either a start or end tag (specified
// by is_start) with one of the tag types in the varargs list. Terminate the
// list with GUMBO_TAG_LAST; this functions as a sentinel since no portion of
// the spec references tags that are not in the spec.
// TODO(jdtang): A lot of the tag lists for this function are repeated in many
// places in the code. This is how it's written in the spec (and it's done this
// way so it's easy to verify the code against the spec), but it may be worth
// coming up with a notion of a "tag set" that includes a list of tags, and
// using that in many places. It'd probably also help performance, but I want
// to profile before optimizing.
static bool tag_in(const GumboToken* token, bool is_start, ...) {
GumboTag token_tag;
if (is_start && token->type == GUMBO_TOKEN_START_TAG) {
token_tag = token->v.start_tag.tag;
} else if (!is_start && token->type == GUMBO_TOKEN_END_TAG) {
token_tag = token->v.end_tag;
} else {
return false;
}
va_list tags;
va_start(tags, is_start);
bool result = false;
for (GumboTag tag = va_arg(tags, GumboTag); tag != GUMBO_TAG_LAST;
tag = va_arg(tags, GumboTag)) {
if (tag == token_tag) {
result = true;
break;
}
}
va_end(tags);
return result;
}
// Like tag_in, but for the single-tag case.
static bool tag_is(const GumboToken* token, bool is_start, GumboTag tag) {
if (is_start && token->type == GUMBO_TOKEN_START_TAG) {
return token->v.start_tag.tag == tag;
} else if (!is_start && token->type == GUMBO_TOKEN_END_TAG) {
return token->v.end_tag == tag;
} else {
return false;
}
}
// Like tag_in, but checks for the tag of a node, rather than a token.
static bool node_tag_in(const GumboNode* node, ...) {
assert(node != NULL);
if (node->type != GUMBO_NODE_ELEMENT) {
return false;
}
GumboTag node_tag = node->v.element.tag;
va_list tags;
va_start(tags, node);
bool result = false;
for (GumboTag tag = va_arg(tags, GumboTag); tag != GUMBO_TAG_LAST;
tag = va_arg(tags, GumboTag)) {
assert(tag <= GUMBO_TAG_LAST);
if (tag == node_tag) {
result = true;
break;
}
}
va_end(tags);
return result;
}
// Like node_tag_in, but for the single-tag case.
static bool node_tag_is(const GumboNode* node, GumboTag tag) {
return node->type == GUMBO_NODE_ELEMENT && node->v.element.tag == tag;
}
// http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#mathml-text-integration-point
static bool is_mathml_integration_point(const GumboNode* node) {
return node_tag_in(node, GUMBO_TAG_MI, GUMBO_TAG_MO, GUMBO_TAG_MN,
GUMBO_TAG_MS, GUMBO_TAG_MTEXT, GUMBO_TAG_LAST) &&
node->v.element.tag_namespace == GUMBO_NAMESPACE_MATHML;
}
// http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#html-integration-point
static bool is_html_integration_point(const GumboNode* node) {
return (node_tag_in(node, GUMBO_TAG_FOREIGNOBJECT, GUMBO_TAG_DESC,
GUMBO_TAG_TITLE, GUMBO_TAG_LAST) &&
node->v.element.tag_namespace == GUMBO_NAMESPACE_SVG) ||
(node_tag_is(node, GUMBO_TAG_ANNOTATION_XML) && (
attribute_matches(&node->v.element.attributes,
"encoding", "text/html") ||
attribute_matches(&node->v.element.attributes,
"encoding", "application/xhtml+xml")));
}
// Appends a node to the end of its parent, setting the "parent" and
// "index_within_parent" fields appropriately.
static void append_node(
GumboParser* parser, GumboNode* parent, GumboNode* node) {
assert(node->parent == NULL);
assert(node->index_within_parent == -1);
GumboVector* children;
if (parent->type == GUMBO_NODE_ELEMENT) {
children = &parent->v.element.children;
} else {
assert(parent->type == GUMBO_NODE_DOCUMENT);
children = &parent->v.document.children;
}
node->parent = parent;
node->index_within_parent = children->length;
gumbo_vector_add(parser, (void*) node, children);
assert(node->index_within_parent < children->length);
}
// Inserts a node at the specified index within its parent, updating the
// "parent" and "index_within_parent" fields of it and all its siblings.
static void insert_node(
GumboParser* parser, GumboNode* parent, int index, GumboNode* node) {
assert(node->parent == NULL);
assert(node->index_within_parent == -1);
assert(parent->type == GUMBO_NODE_ELEMENT);
GumboVector* children = &parent->v.element.children;
assert(index >= 0);
assert(index < children->length);
node->parent = parent;
node->index_within_parent = index;
gumbo_vector_insert_at(parser, (void*) node, index, children);
assert(node->index_within_parent < children->length);
for (unsigned int i = index + 1; i < children->length; ++i) {
GumboNode* sibling = (GumboNode*)children->data[i];
sibling->index_within_parent = i;
assert(sibling->index_within_parent < children->length);
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#foster-parenting
static void foster_parent_element(GumboParser* parser, GumboNode* node) {
GumboVector* open_elements = &parser->_parser_state->_open_elements;
assert(open_elements->length > 2);
node->parse_flags = (GumboParseFlags)((int)node->parse_flags | (int) GUMBO_INSERTION_FOSTER_PARENTED);
GumboNode* foster_parent_element = (GumboNode*)open_elements->data[0];
assert(foster_parent_element->type == GUMBO_NODE_ELEMENT);
assert(node_tag_is(foster_parent_element, GUMBO_TAG_HTML));
for (int i = open_elements->length; --i > 1; ) {
GumboNode* table_element = (GumboNode*)open_elements->data[i];
if (node_tag_is(table_element, GUMBO_TAG_TABLE)) {
foster_parent_element = table_element->parent;
if (!foster_parent_element ||
foster_parent_element->type != GUMBO_NODE_ELEMENT) {
// Table has no parent; spec says it's possible if a script manipulated
// the DOM, although I don't think we have to worry about this case.
gumbo_debug("Table has no parent.\n");
foster_parent_element = (GumboNode*)open_elements->data[i - 1];
break;
}
assert(foster_parent_element->type == GUMBO_NODE_ELEMENT);
gumbo_debug("Found enclosing table (%x) at %d; parent=%s, index=%d.\n",
table_element, i, gumbo_normalized_tagname(
foster_parent_element->v.element.tag),
table_element->index_within_parent);
assert(foster_parent_element->v.element.children.data[
table_element->index_within_parent] == table_element);
insert_node(parser, foster_parent_element,
table_element->index_within_parent, node);
return;
}
}
if (node->type == GUMBO_NODE_ELEMENT) {
gumbo_vector_add(parser, (void*) node, open_elements);
}
append_node(parser, foster_parent_element, node);
}
static void maybe_flush_text_node_buffer(GumboParser* parser) {
GumboParserState* state = parser->_parser_state;
TextNodeBufferState* buffer_state = &state->_text_node;
if (buffer_state->_buffer.length == 0) {
return;
}
assert(buffer_state->_type == GUMBO_NODE_WHITESPACE ||
buffer_state->_type == GUMBO_NODE_TEXT);
GumboNode* text_node = create_node(parser, buffer_state->_type);
GumboText* text_node_data = &text_node->v.text;
text_node_data->text = gumbo_string_buffer_to_string(
parser, &buffer_state->_buffer);
text_node_data->original_text.data = buffer_state->_start_original_text;
text_node_data->original_text.length =
state->_current_token->original_text.data -
buffer_state->_start_original_text;
text_node_data->start_pos = buffer_state->_start_position;
if (state->_foster_parent_insertions && node_tag_in(
get_current_node(parser), GUMBO_TAG_TABLE, GUMBO_TAG_TBODY,
GUMBO_TAG_TFOOT, GUMBO_TAG_THEAD, GUMBO_TAG_TR, GUMBO_TAG_LAST)) {
foster_parent_element(parser, text_node);
} else {
append_node(
parser, parser->_output->root ?
get_current_node(parser) : parser->_output->document, text_node);
}
gumbo_debug("Flushing text node buffer of %.*s.\n",
(int) buffer_state->_buffer.length, buffer_state->_buffer.data);
gumbo_string_buffer_destroy(parser, &buffer_state->_buffer);
gumbo_string_buffer_init(parser, &buffer_state->_buffer);
buffer_state->_type = GUMBO_NODE_WHITESPACE;
assert(buffer_state->_buffer.length == 0);
}
static void record_end_of_element(
GumboToken* current_token, GumboElement* element) {
element->end_pos = current_token->position;
element->original_end_tag =
current_token->type == GUMBO_TOKEN_END_TAG ?
current_token->original_text : kGumboEmptyString;
}
static GumboNode* pop_current_node(GumboParser* parser) {
GumboParserState* state = parser->_parser_state;
maybe_flush_text_node_buffer(parser);
if (state->_open_elements.length > 0) {
assert(node_tag_is((GumboNode*)state->_open_elements.data[0], GUMBO_TAG_HTML));
gumbo_debug(
"Popping %s node.\n",
gumbo_normalized_tagname(get_current_node(parser)->v.element.tag));
}
GumboNode* current_node = (GumboNode*)gumbo_vector_pop(parser, &state->_open_elements);
if (!current_node) {
assert(state->_open_elements.length == 0);
return NULL;
}
assert(current_node->type == GUMBO_NODE_ELEMENT);
bool is_closed_body_or_html_tag =
(node_tag_is(current_node, GUMBO_TAG_BODY) && state->_closed_body_tag) ||
(node_tag_is(current_node, GUMBO_TAG_HTML) && state->_closed_html_tag);
if ((state->_current_token->type != GUMBO_TOKEN_END_TAG ||
!node_tag_is(current_node, state->_current_token->v.end_tag)) &&
!is_closed_body_or_html_tag) {
current_node->parse_flags = (GumboParseFlags)((int)current_node->parse_flags | (int) GUMBO_INSERTION_IMPLICIT_END_TAG);
}
if (!is_closed_body_or_html_tag) {
record_end_of_element(state->_current_token, ¤t_node->v.element);
}
return current_node;
}
static void append_comment_node(
GumboParser* parser, GumboNode* node, const GumboToken* token) {
maybe_flush_text_node_buffer(parser);
GumboNode* comment = create_node(parser, GUMBO_NODE_COMMENT);
comment->type = GUMBO_NODE_COMMENT;
comment->parse_flags = GUMBO_INSERTION_NORMAL;
comment->v.text.text = token->v.text;
comment->v.text.original_text = token->original_text;
comment->v.text.start_pos = token->position;
append_node(parser, node, comment);
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#clear-the-stack-back-to-a-table-row-context
static void clear_stack_to_table_row_context(GumboParser* parser) {
while (!node_tag_in(get_current_node(parser),
GUMBO_TAG_HTML, GUMBO_TAG_TR, GUMBO_TAG_LAST)) {
pop_current_node(parser);
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#clear-the-stack-back-to-a-table-context
static void clear_stack_to_table_context(GumboParser* parser) {
while (!node_tag_in(get_current_node(parser),
GUMBO_TAG_HTML, GUMBO_TAG_TABLE, GUMBO_TAG_LAST)) {
pop_current_node(parser);
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#clear-the-stack-back-to-a-table-body-context
void clear_stack_to_table_body_context(GumboParser* parser) {
while (!node_tag_in(get_current_node(parser), GUMBO_TAG_HTML,
GUMBO_TAG_TBODY, GUMBO_TAG_TFOOT, GUMBO_TAG_THEAD,
GUMBO_TAG_LAST)) {
pop_current_node(parser);
}
}
// Creates a parser-inserted element in the HTML namespace and returns it.
static GumboNode* create_element(GumboParser* parser, GumboTag tag) {
GumboNode* node = create_node(parser, GUMBO_NODE_ELEMENT);
GumboElement* element = &node->v.element;
gumbo_vector_init(parser, 1, &element->children);
gumbo_vector_init(parser, 0, &element->attributes);
element->tag = tag;
element->tag_namespace = GUMBO_NAMESPACE_HTML;
element->original_tag = kGumboEmptyString;
element->original_end_tag = kGumboEmptyString;
element->start_pos = parser->_parser_state->_current_token->position;
element->end_pos = kGumboEmptySourcePosition;
return node;
}
// Constructs an element from the given start tag token.
static GumboNode* create_element_from_token(
GumboParser* parser, GumboToken* token, GumboNamespaceEnum tag_namespace) {
assert(token->type == GUMBO_TOKEN_START_TAG);
GumboTokenStartTag* start_tag = &token->v.start_tag;
GumboNode* node = create_node(parser, GUMBO_NODE_ELEMENT);
GumboElement* element = &node->v.element;
gumbo_vector_init(parser, 1, &element->children);
element->attributes = start_tag->attributes;
element->tag = start_tag->tag;
element->tag_namespace = tag_namespace;
assert(token->original_text.length >= 2);
assert(token->original_text.data[0] == '<');
assert(token->original_text.data[token->original_text.length - 1] == '>');
element->original_tag = token->original_text;
element->start_pos = token->position;
element->original_end_tag = kGumboEmptyString;
element->end_pos = kGumboEmptySourcePosition;
// The element takes ownership of the attributes from the token, so any
// allocated-memory fields should be nulled out.
start_tag->attributes = kGumboEmptyVector;
return node;
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#insert-an-html-element
static void insert_element(GumboParser* parser, GumboNode* node,
bool is_reconstructing_formatting_elements) {
GumboParserState* state = parser->_parser_state;
// NOTE(jdtang): The text node buffer must always be flushed before inserting
// a node, otherwise we're handling nodes in a different order than the spec
// mandated. However, one clause of the spec (character tokens in the body)
// requires that we reconstruct the active formatting elements *before* adding
// the character, and reconstructing the active formatting elements may itself
// result in the insertion of new elements (which should be pushed onto the
// stack of open elements before the buffer is flushed). We solve this (for
// the time being, the spec has been rewritten for <template> and the new
// version may be simpler here) with a boolean flag to this method.
if (!is_reconstructing_formatting_elements) {
maybe_flush_text_node_buffer(parser);
}
if (state->_foster_parent_insertions && node_tag_in(
get_current_node(parser), GUMBO_TAG_TABLE, GUMBO_TAG_TBODY,
GUMBO_TAG_TFOOT, GUMBO_TAG_THEAD, GUMBO_TAG_TR, GUMBO_TAG_LAST)) {
foster_parent_element(parser, node);
gumbo_vector_add(parser, (void*) node, &state->_open_elements);
return;
}
// This is called to insert the root HTML element, but get_current_node
// assumes the stack of open elements is non-empty, so we need special
// handling for this case.
append_node(
parser, parser->_output->root ?
get_current_node(parser) : parser->_output->document, node);
gumbo_vector_add(parser, (void*) node, &state->_open_elements);
}
// Convenience method that combines create_element_from_token and
// insert_element, inserting the generated element directly into the current
// node. Returns the node inserted.
static GumboNode* insert_element_from_token(
GumboParser* parser, GumboToken* token) {
GumboNode* element =
create_element_from_token(parser, token, GUMBO_NAMESPACE_HTML);
insert_element(parser, element, false);
gumbo_debug("Inserting <%s> element (@%x) from token.\n",
gumbo_normalized_tagname(element->v.element.tag), element);
return element;
}
// Convenience method that combines create_element and insert_element, inserting
// a parser-generated element of a specific tag type. Returns the node
// inserted.
static GumboNode* insert_element_of_tag_type(
GumboParser* parser, GumboTag tag, GumboParseFlags reason) {
GumboNode* element = create_element(parser, tag);
element->parse_flags = (GumboParseFlags)((int)element->parse_flags | (int) GUMBO_INSERTION_BY_PARSER | (int)reason);
insert_element(parser, element, false);
gumbo_debug("Inserting %s element (@%x) from tag type.\n",
gumbo_normalized_tagname(tag), element);
return element;
}
// Convenience method for creating foreign namespaced element. Returns the node
// inserted.
static GumboNode* insert_foreign_element(
GumboParser* parser, GumboToken* token, GumboNamespaceEnum tag_namespace) {
assert(token->type == GUMBO_TOKEN_START_TAG);
GumboNode* element = create_element_from_token(parser, token, tag_namespace);
insert_element(parser, element, false);
if (token_has_attribute(token, "xmlns") &&
!attribute_matches_case_sensitive(
&token->v.start_tag.attributes, "xmlns",
kLegalXmlns[tag_namespace])) {
// TODO(jdtang): Since there're multiple possible error codes here, we
// eventually need reason codes to differentiate them.
add_parse_error(parser, token);
}
if (token_has_attribute(token, "xmlns:xlink") &&
!attribute_matches_case_sensitive(
&token->v.start_tag.attributes,
"xmlns:xlink", "http://www.w3.org/1999/xlink")) {
add_parse_error(parser, token);
}
return element;
}
static void insert_text_token(GumboParser* parser, GumboToken* token) {
assert(token->type == GUMBO_TOKEN_WHITESPACE ||
token->type == GUMBO_TOKEN_CHARACTER);
TextNodeBufferState* buffer_state = &parser->_parser_state->_text_node;
if (buffer_state->_buffer.length == 0) {
// Initialize position fields.
buffer_state->_start_original_text = token->original_text.data;
buffer_state->_start_position = token->position;
}
gumbo_string_buffer_append_codepoint(
parser, token->v.character, &buffer_state->_buffer);
if (token->type == GUMBO_TOKEN_CHARACTER) {
buffer_state->_type = GUMBO_NODE_TEXT;
}
gumbo_debug("Inserting text token '%c'.\n", token->v.character);
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#generic-rcdata-element-parsing-algorithm
static void run_generic_parsing_algorithm(
GumboParser* parser, GumboToken* token, GumboTokenizerEnum lexer_state) {
insert_element_from_token(parser, token);
gumbo_tokenizer_set_state(parser, lexer_state);
parser->_parser_state->_original_insertion_mode =
parser->_parser_state->_insertion_mode;
parser->_parser_state->_insertion_mode = GUMBO_INSERTION_MODE_TEXT;
}
static void acknowledge_self_closing_tag(GumboParser* parser) {
parser->_parser_state->_self_closing_flag_acknowledged = true;
}
// Returns true if there's an anchor tag in the list of active formatting
// elements, and fills in its index if so.
static bool find_last_anchor_index(GumboParser* parser, int* anchor_index) {
GumboVector* elements = &parser->_parser_state->_active_formatting_elements;
for (int i = elements->length; --i >= 0; ) {
GumboNode* node = (GumboNode*)elements->data[i];
if (node == &kActiveFormattingScopeMarker) {
return false;
}
if (node_tag_is(node, GUMBO_TAG_A)) {
*anchor_index = i;
return true;
}
}
return false;
}
// Counts the number of open formatting elements in the list of active
// formatting elements (after the last active scope marker) that have a specific
// tag. If this is > 0, then earliest_matching_index will be filled in with the
// index of the first such element.
static int count_formatting_elements_of_tag(
GumboParser* parser, const GumboNode* desired_node,
int* earliest_matching_index) {
const GumboElement* desired_element = &desired_node->v.element;
GumboVector* elements = &parser->_parser_state->_active_formatting_elements;
int num_identical_elements = 0;
for (int i = elements->length; --i >= 0; ) {
GumboNode* node = (GumboNode*)elements->data[i];
if (node == &kActiveFormattingScopeMarker) {
break;
}
assert(node->type == GUMBO_NODE_ELEMENT);
GumboElement* element = &node->v.element;
if (node_tag_is(node, desired_element->tag) &&
element->tag_namespace == desired_element->tag_namespace &&
all_attributes_match(&element->attributes,
&desired_element->attributes)) {
num_identical_elements++;
*earliest_matching_index = i;
}
}
return num_identical_elements;
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/parsing.html#reconstruct-the-active-formatting-elements
static void add_formatting_element(GumboParser* parser, const GumboNode* node) {
assert(node == &kActiveFormattingScopeMarker ||
node->type == GUMBO_NODE_ELEMENT);
GumboVector* elements = &parser->_parser_state->_active_formatting_elements;
if (node == &kActiveFormattingScopeMarker) {
gumbo_debug("Adding a scope marker.\n");
} else {
gumbo_debug("Adding a formatting element.\n");
}
// Hunt for identical elements.
int earliest_identical_element = elements->length;
int num_identical_elements = count_formatting_elements_of_tag(
parser, node, &earliest_identical_element);
// Noah's Ark clause: if there're at least 3, remove the earliest.
if (num_identical_elements >= 3) {
gumbo_debug("Noah's ark clause: removing element at %d.\n",
earliest_identical_element);
gumbo_vector_remove_at(parser, earliest_identical_element, elements);
}
gumbo_vector_add(parser, (void*) node, elements);
}
static bool is_open_element(GumboParser* parser, const GumboNode* node) {
GumboVector* open_elements = &parser->_parser_state->_open_elements;
for (unsigned int i = 0; i < open_elements->length; ++i) {
if (open_elements->data[i] == node) {
return true;
}
}
return false;
}
// Clones attributes, tags, etc. of a node, but does not copy the content. The
// clone shares no structure with the original node: all owned strings and
// values are fresh copies.
GumboNode* clone_node(
GumboParser* parser, const GumboNode* node, GumboParseFlags reason) {
assert(node->type == GUMBO_NODE_ELEMENT);
GumboNode* new_node = (GumboNode*)gumbo_parser_allocate(parser, sizeof(GumboNode));
*new_node = *node;
new_node->parent = NULL;
new_node->index_within_parent = -1;
// Clear the GUMBO_INSERTION_IMPLICIT_END_TAG flag, as the cloned node may
// have a separate end tag.
//new_node->parse_flags &= ~GUMBO_INSERTION_IMPLICIT_END_TAG;
new_node->parse_flags = (GumboParseFlags)((int)new_node->parse_flags & (int) (~GUMBO_INSERTION_IMPLICIT_END_TAG));
//new_node->parse_flags |= reason | GUMBO_INSERTION_BY_PARSER;
new_node->parse_flags = (GumboParseFlags)((int)new_node->parse_flags | (int) GUMBO_INSERTION_BY_PARSER | (int)reason);
GumboElement* element = &new_node->v.element;
gumbo_vector_init(parser, 1, &element->children);
const GumboVector* old_attributes = &node->v.element.attributes;
gumbo_vector_init(parser, old_attributes->length, &element->attributes);
for (unsigned int i = 0; i < old_attributes->length; ++i) {
const GumboAttribute* old_attr = (GumboAttribute*)old_attributes->data[i];
GumboAttribute* attr =
(GumboAttribute*)gumbo_parser_allocate(parser, sizeof(GumboAttribute));
*attr = *old_attr;
attr->name = gumbo_copy_stringz(parser, old_attr->name);
attr->value = gumbo_copy_stringz(parser, old_attr->value);
gumbo_vector_add(parser, attr, &element->attributes);
}
return new_node;
}
// "Reconstruct active formatting elements" part of the spec.
// This implementation is based on the html5lib translation from the mess of
// GOTOs in the spec to reasonably structured programming.
// http://code.google.com/p/html5lib/source/browse/python/html5lib/treebuilders/_base.py
static void reconstruct_active_formatting_elements(GumboParser* parser) {
GumboVector* elements = &parser->_parser_state->_active_formatting_elements;
// Step 1
if (elements->length == 0) {
return;
}
// Step 2 & 3
int i = elements->length - 1;
const GumboNode* element = (GumboNode*)elements->data[i];
if (element == &kActiveFormattingScopeMarker ||
is_open_element(parser, element)) {
return;
}
// Step 6
do {
if (i == 0) {
// Step 4
i = -1; // Incremented to 0 below.
break;
}
// Step 5
element = (GumboNode*)elements->data[--i];
} while (element != &kActiveFormattingScopeMarker &&
!is_open_element(parser, element));
++i;
gumbo_debug("Reconstructing elements from %d on %s parent.\n", i,
gumbo_normalized_tagname(
get_current_node(parser)->v.element.tag));
for(; i < elements->length; ++i) {
// Step 7 & 8.
assert(elements->length > 0);
assert(i < elements->length);
element = (GumboNode*)elements->data[i];
assert(element != &kActiveFormattingScopeMarker);
GumboNode* clone = clone_node(
parser, element, GUMBO_INSERTION_RECONSTRUCTED_FORMATTING_ELEMENT);
// Step 9.
insert_element(parser, clone, true);
// Step 10.
elements->data[i] = clone;
gumbo_debug("Reconstructed %s element at %d.\n",
gumbo_normalized_tagname(clone->v.element.tag), i);
}
}
static void clear_active_formatting_elements(GumboParser* parser) {
GumboVector* elements = &parser->_parser_state->_active_formatting_elements;
int num_elements_cleared = 0;
const GumboNode* node;
do {
node = (GumboNode*)gumbo_vector_pop(parser, elements);
++num_elements_cleared;
} while(node && node != &kActiveFormattingScopeMarker);
gumbo_debug("Cleared %d elements from active formatting list.\n",
num_elements_cleared);
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#the-initial-insertion-mode
static GumboQuirksModeEnum compute_quirks_mode(
const GumboTokenDocType* doctype) {
if (doctype->force_quirks ||
strcmp(doctype->name, kDoctypeHtml.data) ||
is_in_static_list(doctype->public_identifier,
kQuirksModePublicIdPrefixes, false) ||
is_in_static_list(doctype->public_identifier,
kQuirksModePublicIdExactMatches, true) ||
is_in_static_list(doctype->system_identifier,
kQuirksModeSystemIdExactMatches, true) ||
(is_in_static_list(doctype->public_identifier,
kLimitedQuirksRequiresSystemIdPublicIdPrefixes, false)
&& !doctype->has_system_identifier)) {
return GUMBO_DOCTYPE_QUIRKS;
} else if (
is_in_static_list(doctype->public_identifier,
kLimitedQuirksPublicIdPrefixes, false) ||
(is_in_static_list(doctype->public_identifier,
kLimitedQuirksRequiresSystemIdPublicIdPrefixes, false)
&& doctype->has_system_identifier)) {
return GUMBO_DOCTYPE_LIMITED_QUIRKS;
}
return GUMBO_DOCTYPE_NO_QUIRKS;
}
// The following functions are all defined by the "has an element in __ scope"
// sections of the HTML5 spec:
// http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#has-an-element-in-the-specific-scope
// The basic idea behind them is that they check for an element of the given tag
// name, contained within a scope formed by a set of other tag names. For
// example, "has an element in list scope" looks for an element of the given tag
// within the nearest enclosing <ol> or <ul>, along with a bunch of generic
// element types that serve to "firewall" their content from the rest of the
// document.
static bool has_an_element_in_specific_scope(
GumboParser* parser, GumboVector* /* GumboTag */ expected, bool negate, ...) {
GumboVector* open_elements = &parser->_parser_state->_open_elements;
va_list args;
va_start(args, negate);
// va_arg can only run through the list once, so we copy it to an GumboVector
// here. I wonder if it'd make more sense to make tags the GumboVector*
// parameter and 'expected' a vararg list, but that'd require changing a lot
// of code for unknown benefit. We may want to change the representation of
// these tag sets anyway, to something more efficient.
GumboVector tags;
gumbo_vector_init(parser, 10, &tags);
for (GumboTag tag = va_arg(args, GumboTag); tag != GUMBO_TAG_LAST;
tag = va_arg(args, GumboTag)) {
// We store the tags inline instead of storing pointers to them.
gumbo_vector_add(parser, (void*) tag, &tags);
}
va_end(args);
bool result = false;
for (int i = open_elements->length; --i >= 0; ) {
const GumboNode* node = (GumboNode*)open_elements->data[i];
if (node->type != GUMBO_NODE_ELEMENT) {
continue;
}
GumboTag node_tag = node->v.element.tag;
for (int j = 0; j < expected->length; ++j) {
GumboTag expected_tag = (GumboTag)(int) expected->data[j];
if (node_tag == expected_tag) {
result = true;
goto cleanup;
}
}
bool found_tag = false;
for (int j = 0; j < tags.length; ++j) {
GumboTag tag = (GumboTag)(int) tags.data[j];
if (tag == node_tag) {
found_tag = true;
break;
}
}
if (negate != found_tag) {
result = false;
goto cleanup;
}
}
cleanup:
gumbo_vector_destroy(parser, &tags);
return result;
}
// This is a bit of a hack to stack-allocate a one-element GumboVector name
// 'varname' containing the 'from_var' variable, since it's used in nearly all
// the subsequent helper functions. Note the use of void* and casts instead of
// GumboTag; this is so the alignment requirements are the same as GumboVector
// and the data inside it can be freely accessed as if it were a normal
// GumboVector.
#define DECLARE_ONE_ELEMENT_GUMBO_VECTOR(varname, from_var) \
void* varname ## _tmp_array[1] = { (void*) from_var }; \
GumboVector varname = { varname ## _tmp_array, 1, 1 }
// http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#has-an-element-in-scope
static bool has_an_element_in_scope(GumboParser* parser, GumboTag tag) {
DECLARE_ONE_ELEMENT_GUMBO_VECTOR(tags, tag);
return has_an_element_in_specific_scope(
parser, &tags, false, GUMBO_TAG_APPLET, GUMBO_TAG_CAPTION, GUMBO_TAG_HTML,
GUMBO_TAG_TABLE, GUMBO_TAG_TD, GUMBO_TAG_TH, GUMBO_TAG_MARQUEE,
GUMBO_TAG_OBJECT, GUMBO_TAG_MI, GUMBO_TAG_MO, GUMBO_TAG_MN, GUMBO_TAG_MS,
GUMBO_TAG_MTEXT, GUMBO_TAG_ANNOTATION_XML, GUMBO_TAG_FOREIGNOBJECT,
GUMBO_TAG_DESC, GUMBO_TAG_TITLE, GUMBO_TAG_LAST);
}
// Like "has an element in scope", but for the specific case of looking for a
// unique target node, not for any node with a given tag name. This duplicates
// much of the algorithm from has_an_element_in_specific_scope because the
// predicate is different when checking for an exact node, and it's easier &
// faster just to duplicate the code for this one case than to try and
// parameterize it.
static bool has_node_in_scope(GumboParser* parser, const GumboNode* node) {
GumboVector* open_elements = &parser->_parser_state->_open_elements;
for (int i = open_elements->length; --i >= 0; ) {
const GumboNode* current = (GumboNode*)open_elements->data[i];
if (current == node) {
return true;
}
if (current->type != GUMBO_NODE_ELEMENT) {
continue;
}
if (node_tag_in(
current, GUMBO_TAG_APPLET, GUMBO_TAG_CAPTION, GUMBO_TAG_HTML,
GUMBO_TAG_TABLE, GUMBO_TAG_TD, GUMBO_TAG_TH, GUMBO_TAG_MARQUEE,
GUMBO_TAG_OBJECT, GUMBO_TAG_MI, GUMBO_TAG_MO, GUMBO_TAG_MN,
GUMBO_TAG_MS, GUMBO_TAG_MTEXT, GUMBO_TAG_ANNOTATION_XML,
GUMBO_TAG_FOREIGNOBJECT, GUMBO_TAG_DESC, GUMBO_TAG_TITLE,
GUMBO_TAG_LAST)) {
return false;
}
}
assert(false);
return false;
}
// Like has_an_element_in_scope, but restricts the expected tag to a range of
// possible tag names instead of just a single one.
static bool has_an_element_in_scope_with_tagname(GumboParser* parser, ...) {
GumboVector tags;
// 6 = arbitrary initial size for vector, chosen because the major use-case
// for this method is heading tags, of which there are 6.
gumbo_vector_init(parser, 6, &tags);
va_list args;
va_start(args, parser);
for (GumboTag tag = va_arg(args, GumboTag); tag != GUMBO_TAG_LAST;
tag = va_arg(args, GumboTag)) {
gumbo_vector_add(parser, (void*) tag, &tags);
}
bool found = has_an_element_in_specific_scope(
parser, &tags, false, GUMBO_TAG_APPLET, GUMBO_TAG_CAPTION, GUMBO_TAG_HTML,
GUMBO_TAG_TABLE, GUMBO_TAG_TD, GUMBO_TAG_TH, GUMBO_TAG_MARQUEE,
GUMBO_TAG_OBJECT, GUMBO_TAG_MI, GUMBO_TAG_MO, GUMBO_TAG_MN, GUMBO_TAG_MS,
GUMBO_TAG_MTEXT, GUMBO_TAG_ANNOTATION_XML, GUMBO_TAG_FOREIGNOBJECT,
GUMBO_TAG_DESC, GUMBO_TAG_TITLE, GUMBO_TAG_LAST);
gumbo_vector_destroy(parser, &tags);
va_end(args);
return found;
}
// http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#has-an-element-in-list-item-scope
static bool has_an_element_in_list_scope(GumboParser* parser, GumboTag tag) {
DECLARE_ONE_ELEMENT_GUMBO_VECTOR(tags, tag);
return has_an_element_in_specific_scope(
parser, &tags, false, GUMBO_TAG_APPLET, GUMBO_TAG_CAPTION, GUMBO_TAG_HTML,
GUMBO_TAG_TABLE, GUMBO_TAG_TD, GUMBO_TAG_TH, GUMBO_TAG_MARQUEE,
GUMBO_TAG_OBJECT, GUMBO_TAG_MI, GUMBO_TAG_MO, GUMBO_TAG_MN, GUMBO_TAG_MS,
GUMBO_TAG_MTEXT, GUMBO_TAG_ANNOTATION_XML, GUMBO_TAG_FOREIGNOBJECT,
GUMBO_TAG_DESC, GUMBO_TAG_TITLE, GUMBO_TAG_OL, GUMBO_TAG_UL,
GUMBO_TAG_LAST);
}
// http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#has-an-element-in-button-scope
static bool has_an_element_in_button_scope(GumboParser* parser, GumboTag tag) {
DECLARE_ONE_ELEMENT_GUMBO_VECTOR(tags, tag);
return has_an_element_in_specific_scope(
parser, &tags, false, GUMBO_TAG_APPLET, GUMBO_TAG_CAPTION, GUMBO_TAG_HTML,
GUMBO_TAG_TABLE, GUMBO_TAG_TD, GUMBO_TAG_TH, GUMBO_TAG_MARQUEE,
GUMBO_TAG_OBJECT, GUMBO_TAG_MI, GUMBO_TAG_MO, GUMBO_TAG_MN, GUMBO_TAG_MS,
GUMBO_TAG_MTEXT, GUMBO_TAG_ANNOTATION_XML, GUMBO_TAG_FOREIGNOBJECT,
GUMBO_TAG_DESC, GUMBO_TAG_TITLE, GUMBO_TAG_BUTTON, GUMBO_TAG_LAST);
}
// http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#has-an-element-in-table-scope
static bool has_an_element_in_table_scope(GumboParser* parser, GumboTag tag) {
DECLARE_ONE_ELEMENT_GUMBO_VECTOR(tags, tag);
return has_an_element_in_specific_scope(
parser, &tags, false, GUMBO_TAG_HTML, GUMBO_TAG_TABLE, GUMBO_TAG_LAST);
}
// http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#has-an-element-in-select-scope
static bool has_an_element_in_select_scope(GumboParser* parser, GumboTag tag) {
DECLARE_ONE_ELEMENT_GUMBO_VECTOR(tags, tag);
return has_an_element_in_specific_scope(
parser, &tags, true, GUMBO_TAG_OPTGROUP, GUMBO_TAG_OPTION,
GUMBO_TAG_LAST);
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#generate-implied-end-tags
// "exception" is the "element to exclude from the process" listed in the spec.
// Pass GUMBO_TAG_LAST to not exclude any of them.
static void generate_implied_end_tags(GumboParser* parser, GumboTag exception) {
for (;
node_tag_in(get_current_node(parser), GUMBO_TAG_DD, GUMBO_TAG_DT,
GUMBO_TAG_LI, GUMBO_TAG_OPTION, GUMBO_TAG_OPTGROUP,
GUMBO_TAG_P, GUMBO_TAG_RP, GUMBO_TAG_RT, GUMBO_TAG_LAST) &&
!node_tag_is(get_current_node(parser), exception);
pop_current_node(parser));
}
// This factors out the clauses relating to "act as if an end tag token with tag
// name "table" had been seen. Returns true if there's a table element in table
// scope which was successfully closed, false if not and the token should be
// ignored. Does not add parse errors; callers should handle that.
static bool close_table(GumboParser* parser) {
if (!has_an_element_in_table_scope(parser, GUMBO_TAG_TABLE)) {
return false;
}
GumboNode* node = pop_current_node(parser);
while (!node_tag_is(node, GUMBO_TAG_TABLE)) {
node = pop_current_node(parser);
}
reset_insertion_mode_appropriately(parser);
return true;
}
// This factors out the clauses relating to "act as if an end tag token with tag
// name `cell_tag` had been seen".
static bool close_table_cell(GumboParser* parser, const GumboToken* token,
GumboTag cell_tag) {
bool result = true;
generate_implied_end_tags(parser, GUMBO_TAG_LAST);
const GumboNode* node = get_current_node(parser);
if (!node_tag_is(node, cell_tag)) {
add_parse_error(parser, token);
result = false;
}
do {
node = pop_current_node(parser);
} while (!node_tag_is(node, cell_tag));
clear_active_formatting_elements(parser);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_ROW);
return result;
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#close-the-cell
// This holds the logic to determine whether we should close a <td> or a <th>.
static bool close_current_cell(GumboParser* parser, const GumboToken* token) {
if (has_an_element_in_table_scope(parser, GUMBO_TAG_TD)) {
assert(!has_an_element_in_table_scope(parser, GUMBO_TAG_TH));
return close_table_cell(parser, token, GUMBO_TAG_TD);
} else {
assert(has_an_element_in_table_scope(parser, GUMBO_TAG_TH));
return close_table_cell(parser, token, GUMBO_TAG_TH);
}
}
// This factors out the "act as if an end tag of tag name 'select' had been
// seen" clause of the spec, since it's referenced in several places. It pops
// all nodes from the stack until the current <select> has been closed, then
// resets the insertion mode appropriately.
static void close_current_select(GumboParser* parser) {
GumboNode* node = pop_current_node(parser);
while (!node_tag_is(node, GUMBO_TAG_SELECT)) {
node = pop_current_node(parser);
}
reset_insertion_mode_appropriately(parser);
}
// The list of nodes in the "special" category:
// http://www.whatwg.org/specs/web-apps/current-work/complete/parsing.html#special
static bool is_special_node(const GumboNode* node) {
assert(node->type == GUMBO_NODE_ELEMENT);
switch (node->v.element.tag_namespace) {
case GUMBO_NAMESPACE_HTML:
return node_tag_in(node,
GUMBO_TAG_ADDRESS, GUMBO_TAG_APPLET, GUMBO_TAG_AREA,
GUMBO_TAG_ARTICLE, GUMBO_TAG_ASIDE, GUMBO_TAG_BASE,
GUMBO_TAG_BASEFONT, GUMBO_TAG_BGSOUND, GUMBO_TAG_BLOCKQUOTE,
GUMBO_TAG_BODY, GUMBO_TAG_BR, GUMBO_TAG_BUTTON, GUMBO_TAG_CAPTION,
GUMBO_TAG_CENTER, GUMBO_TAG_COL, GUMBO_TAG_COLGROUP,
GUMBO_TAG_MENUITEM, GUMBO_TAG_DD, GUMBO_TAG_DETAILS, GUMBO_TAG_DIR,
GUMBO_TAG_DIV, GUMBO_TAG_DL, GUMBO_TAG_DT, GUMBO_TAG_EMBED,
GUMBO_TAG_FIELDSET, GUMBO_TAG_FIGCAPTION, GUMBO_TAG_FIGURE,
GUMBO_TAG_FOOTER, GUMBO_TAG_FORM, GUMBO_TAG_FRAME,
GUMBO_TAG_FRAMESET, GUMBO_TAG_H1, GUMBO_TAG_H2, GUMBO_TAG_H3,
GUMBO_TAG_H4, GUMBO_TAG_H5, GUMBO_TAG_H6, GUMBO_TAG_HEAD,
GUMBO_TAG_HEADER, GUMBO_TAG_HGROUP, GUMBO_TAG_HR, GUMBO_TAG_HTML,
GUMBO_TAG_IFRAME, GUMBO_TAG_IMG, GUMBO_TAG_INPUT, GUMBO_TAG_ISINDEX,
GUMBO_TAG_LI, GUMBO_TAG_LINK, GUMBO_TAG_LISTING, GUMBO_TAG_MARQUEE,
GUMBO_TAG_MENU, GUMBO_TAG_META, GUMBO_TAG_NAV, GUMBO_TAG_NOEMBED,
GUMBO_TAG_NOFRAMES, GUMBO_TAG_NOSCRIPT, GUMBO_TAG_OBJECT,
GUMBO_TAG_OL, GUMBO_TAG_P, GUMBO_TAG_PARAM, GUMBO_TAG_PLAINTEXT,
GUMBO_TAG_PRE, GUMBO_TAG_SCRIPT, GUMBO_TAG_SECTION, GUMBO_TAG_SELECT,
GUMBO_TAG_STYLE, GUMBO_TAG_SUMMARY, GUMBO_TAG_TABLE, GUMBO_TAG_TBODY,
GUMBO_TAG_TD, GUMBO_TAG_TEXTAREA, GUMBO_TAG_TFOOT, GUMBO_TAG_TH,
GUMBO_TAG_THEAD, GUMBO_TAG_TITLE, GUMBO_TAG_TR, GUMBO_TAG_UL,
GUMBO_TAG_WBR, GUMBO_TAG_XMP, GUMBO_TAG_LAST);
case GUMBO_NAMESPACE_MATHML:
return node_tag_in(node,
GUMBO_TAG_MI, GUMBO_TAG_MO, GUMBO_TAG_MN, GUMBO_TAG_MS,
GUMBO_TAG_MTEXT, GUMBO_TAG_ANNOTATION_XML, GUMBO_TAG_LAST);
case GUMBO_NAMESPACE_SVG:
return node_tag_in(node,
GUMBO_TAG_FOREIGNOBJECT, GUMBO_TAG_DESC, GUMBO_TAG_LAST);
}
abort();
return false; // Pacify compiler.
}
// Implicitly closes currently open tags until it reaches an element with the
// specified tag name. If the elements closed are in the set handled by
// generate_implied_end_tags, this is normal operation and this function returns
// true. Otherwise, a parse error is recorded and this function returns false.
static bool implicitly_close_tags(
GumboParser* parser, GumboToken* token, GumboTag target) {
bool result = true;
generate_implied_end_tags(parser, target);
if (!node_tag_is(get_current_node(parser), target)) {
add_parse_error(parser, token);
while (!node_tag_is(get_current_node(parser), target)) {
pop_current_node(parser);
}
result = false;
}
assert(node_tag_is(get_current_node(parser), target));
pop_current_node(parser);
return result;
}
// If the stack of open elements has a <p> tag in button scope, this acts as if
// a </p> tag was encountered, implicitly closing tags. Returns false if a
// parse error occurs. This is a convenience function because this particular
// clause appears several times in the spec.
static bool maybe_implicitly_close_p_tag(GumboParser* parser, GumboToken* token) {
if (has_an_element_in_button_scope(parser, GUMBO_TAG_P)) {
return implicitly_close_tags(parser, token, GUMBO_TAG_P);
}
return true;
}
// Convenience function to encapsulate the logic for closing <li> or <dd>/<dt>
// tags. Pass true to is_li for handling <li> tags, false for <dd> and <dt>.
static void maybe_implicitly_close_list_tag(
GumboParser* parser, GumboToken* token, bool is_li) {
GumboParserState* state = parser->_parser_state;
state->_frameset_ok = false;
for (int i = state->_open_elements.length; --i >= 0; ) {
const GumboNode* node = (GumboNode*)state->_open_elements.data[i];
bool is_list_tag = is_li ?
node_tag_is(node, GUMBO_TAG_LI) :
node_tag_in(node, GUMBO_TAG_DD, GUMBO_TAG_DT, GUMBO_TAG_LAST);
if (is_list_tag) {
implicitly_close_tags(parser, token, node->v.element.tag);
return;
}
if (is_special_node(node) &&
!node_tag_in(node, GUMBO_TAG_ADDRESS, GUMBO_TAG_DIV, GUMBO_TAG_P,
GUMBO_TAG_LAST)) {
return;
}
}
}
static void merge_attributes(
GumboParser* parser, GumboToken* token, GumboNode* node) {
assert(token->type == GUMBO_TOKEN_START_TAG);
assert(node->type == GUMBO_NODE_ELEMENT);
const GumboVector* token_attr = &token->v.start_tag.attributes;
GumboVector* node_attr = &node->v.element.attributes;
for (int i = 0; i < token_attr->length; ++i) {
GumboAttribute* attr = (GumboAttribute*)token_attr->data[i];
if (!gumbo_get_attribute(node_attr, attr->name)) {
// Ownership of the attribute is transferred by this gumbo_vector_add,
// so it has to be nulled out of the original token so it doesn't get
// double-deleted.
gumbo_vector_add(parser, attr, node_attr);
token_attr->data[i] = NULL;
}
}
// When attributes are merged, it means the token has been ignored and merged
// with another token, so we need to free its memory. The attributes that are
// transferred need to be nulled-out in the vector above so that they aren't
// double-deleted.
gumbo_token_destroy(parser, token);
#ifndef NDEBUG
// Mark this sentinel so the assertion in the main loop knows it's been
// destroyed.
token->v.start_tag.attributes = kGumboEmptyVector;
#endif
}
const char* gumbo_normalize_svg_tagname(const GumboStringPiece* tag) {
for (int i = 0;
i < sizeof(kSvgTagReplacements) / sizeof(ReplacementEntry); ++i) {
const ReplacementEntry* entry = &kSvgTagReplacements[i];
if (gumbo_string_equals_ignore_case(tag, &entry->from)) {
return entry->to.data;
}
}
return NULL;
}
// http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#adjust-foreign-attributes
// This destructively modifies any matching attributes on the token and sets the
// namespace appropriately.
static void adjust_foreign_attributes(GumboParser* parser, GumboToken* token) {
assert(token->type == GUMBO_TOKEN_START_TAG);
const GumboVector* attributes = &token->v.start_tag.attributes;
for (int i = 0;
i < sizeof(kForeignAttributeReplacements) /
sizeof(NamespacedAttributeReplacement); ++i) {
const NamespacedAttributeReplacement* entry =
&kForeignAttributeReplacements[i];
GumboAttribute* attr = gumbo_get_attribute(attributes, entry->from);
if (!attr) {
continue;
}
gumbo_parser_deallocate(parser, (void*) attr->name);
attr->attr_namespace = entry->attr_namespace;
attr->name = gumbo_copy_stringz(parser, entry->local_name);
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#adjust-svg-attributes
// This destructively modifies any matching attributes on the token.
static void adjust_svg_attributes(GumboParser* parser, GumboToken* token) {
assert(token->type == GUMBO_TOKEN_START_TAG);
const GumboVector* attributes = &token->v.start_tag.attributes;
for (int i = 0;
i < sizeof(kSvgAttributeReplacements) / sizeof(ReplacementEntry); ++i) {
const ReplacementEntry* entry = &kSvgAttributeReplacements[i];
GumboAttribute* attr = gumbo_get_attribute(attributes, entry->from.data);
if (!attr) {
continue;
}
gumbo_parser_deallocate(parser, (void*) attr->name);
attr->name = gumbo_copy_stringz(parser, entry->to.data);
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#adjust-mathml-attributes
// Note that this may destructively modify the token with the new attribute
// value.
static void adjust_mathml_attributes(GumboParser* parser, GumboToken* token) {
assert(token->type == GUMBO_TOKEN_START_TAG);
GumboAttribute* attr = gumbo_get_attribute(
&token->v.start_tag.attributes, "definitionurl");
if (!attr) {
return;
}
gumbo_parser_deallocate(parser, (void*) attr->name);
attr->name = gumbo_copy_stringz(parser, "definitionURL");
}
static bool doctype_matches(
const GumboTokenDocType* doctype,
const GumboStringPiece* public_id,
const GumboStringPiece* system_id,
bool allow_missing_system_id) {
return !strcmp(doctype->public_identifier, public_id->data) &&
(allow_missing_system_id || doctype->has_system_identifier) &&
!strcmp(doctype->system_identifier, system_id->data);
}
static bool maybe_add_doctype_error(
GumboParser* parser, const GumboToken* token) {
const GumboTokenDocType* doctype = &token->v.doc_type;
bool html_doctype = !strcmp(doctype->name, kDoctypeHtml.data);
if (!html_doctype ||
doctype->has_public_identifier ||
(doctype->has_system_identifier && !strcmp(
doctype->system_identifier, kSystemIdLegacyCompat.data)) ||
!(html_doctype && (
doctype_matches(doctype, &kPublicIdHtml4_0,
&kSystemIdRecHtml4_0, true) ||
doctype_matches(doctype, &kPublicIdHtml4_01, &kSystemIdHtml4, true) ||
doctype_matches(doctype, &kPublicIdXhtml1_0,
&kSystemIdXhtmlStrict1_1, false) ||
doctype_matches(doctype, &kPublicIdXhtml1_1,
&kSystemIdXhtml1_1, false)))) {
add_parse_error(parser, token);
return false;
}
return true;
}
static void remove_from_parent(GumboParser* parser, GumboNode* node) {
if (!node->parent) {
// The node may not have a parent if, for example, it is a newly-cloned copy
// of an active formatting element. DOM manipulations continue with the
// orphaned fragment of the DOM tree until it's appended/foster-parented to
// the common ancestor at the end of the adoption agency algorithm.
return;
}
assert(node->parent->type == GUMBO_NODE_ELEMENT);
GumboVector* children = &node->parent->v.element.children;
int index = gumbo_vector_index_of(children, node);
assert(index != -1);
gumbo_vector_remove_at(parser, index, children);
node->parent = NULL;
node->index_within_parent = -1;
for (int i = index; i < children->length; ++i) {
GumboNode* child = (GumboNode*)children->data[i];
child->index_within_parent = i;
}
}
// http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#an-introduction-to-error-handling-and-strange-cases-in-the-parser
// Also described in the "in body" handling for end formatting tags.
static bool adoption_agency_algorithm(
GumboParser* parser, GumboToken* token, GumboTag closing_tag) {
GumboParserState* state = parser->_parser_state;
gumbo_debug("Entering adoption agency algorithm.\n");
// Steps 1-3 & 16:
for (int i = 0; i < 8; ++i) {
// Step 4.
GumboNode* formatting_node = NULL;
int formatting_node_in_open_elements = -1;
for (int j = state->_active_formatting_elements.length; --j >= 0; ) {
GumboNode* current_node = (GumboNode*)state->_active_formatting_elements.data[j];
if (current_node == &kActiveFormattingScopeMarker) {
gumbo_debug("Broke on scope marker; aborting.\n");
// Last scope marker; abort the algorithm.
return false;
}
if (node_tag_is(current_node, closing_tag)) {
// Found it.
formatting_node = current_node;
formatting_node_in_open_elements = gumbo_vector_index_of(
&state->_open_elements, formatting_node);
gumbo_debug("Formatting element of tag %s at %d.\n",
gumbo_normalized_tagname(closing_tag),
formatting_node_in_open_elements);
break;
}
}
if (!formatting_node) {
// No matching tag; not a parse error outright, but fall through to the
// "any other end tag" clause (which may potentially add a parse error,
// but not always).
gumbo_debug("No active formatting elements; aborting.\n");
return false;
}
if (formatting_node_in_open_elements == -1) {
gumbo_debug("Formatting node not on stack of open elements.\n");
gumbo_vector_remove(parser, formatting_node,
&state->_active_formatting_elements);
return false;
}
if (!has_an_element_in_scope(parser, formatting_node->v.element.tag)) {
add_parse_error(parser, token);
gumbo_debug("Element not in scope.\n");
return false;
}
if (formatting_node != get_current_node(parser)) {
add_parse_error(parser, token); // But continue onwards.
}
assert(formatting_node);
assert(!node_tag_is(formatting_node, GUMBO_TAG_HTML));
assert(!node_tag_is(formatting_node, GUMBO_TAG_BODY));
// Step 5 & 6.
GumboNode* furthest_block = NULL;
for (int j = formatting_node_in_open_elements;
j < state->_open_elements.length; ++j) {
assert(j > 0);
GumboNode* current = (GumboNode*)state->_open_elements.data[j];
if (is_special_node(current)) {
// Step 5.
furthest_block = current;
break;
}
}
if (!furthest_block) {
// Step 6.
while (get_current_node(parser) != formatting_node) {
pop_current_node(parser);
}
// And the formatting element itself.
pop_current_node(parser);
gumbo_vector_remove(parser, formatting_node,
&state->_active_formatting_elements);
return false;
}
assert(!node_tag_is(furthest_block, GUMBO_TAG_HTML));
assert(furthest_block);
// Step 7.
// Elements may be moved and reparented by this algorithm, so
// common_ancestor is not necessarily the same as formatting_node->parent.
GumboNode* common_ancestor =
(GumboNode*)state->_open_elements.data[gumbo_vector_index_of(
&state->_open_elements, formatting_node) - 1];
gumbo_debug("Common ancestor tag = %s, furthest block tag = %s.\n",
gumbo_normalized_tagname(common_ancestor->v.element.tag),
gumbo_normalized_tagname(furthest_block->v.element.tag));
// Step 8.
int bookmark = gumbo_vector_index_of(
&state->_active_formatting_elements, formatting_node);;
// Step 9.
GumboNode* node = furthest_block;
GumboNode* last_node = furthest_block;
// Must be stored explicitly, in case node is removed from the stack of open
// elements, to handle step 9.4.
int saved_node_index = gumbo_vector_index_of(&state->_open_elements, node);
assert(saved_node_index > 0);
// Step 9.1-9.3 & 9.11.
for (int j = 0; j < 3; ++j) {
// Step 9.4.
int node_index = gumbo_vector_index_of(&state->_open_elements, node);
gumbo_debug(
"Current index: %d, last index: %d.\n", node_index, saved_node_index);
if (node_index == -1) {
node_index = saved_node_index;
}
saved_node_index = --node_index;
assert(node_index > 0);
assert(node_index < state->_open_elements.capacity);
node = (GumboNode*)state->_open_elements.data[node_index];
assert(node->parent);
// Step 9.5.
if (gumbo_vector_index_of(
&state->_active_formatting_elements, node) == -1) {
gumbo_vector_remove_at(parser, node_index, &state->_open_elements);
continue;
} else if (node == formatting_node) {
// Step 9.6.
break;
}
// Step 9.7.
int formatting_index = gumbo_vector_index_of(
&state->_active_formatting_elements, node);
node = clone_node(parser, node, GUMBO_INSERTION_ADOPTION_AGENCY_CLONED);
state->_active_formatting_elements.data[formatting_index] = node;
state->_open_elements.data[node_index] = node;
// Step 9.8.
if (last_node == furthest_block) {
bookmark = formatting_index + 1;
assert(bookmark <= state->_active_formatting_elements.length);
}
// Step 9.9.
//last_node->parse_flags |= GUMBO_INSERTION_ADOPTION_AGENCY_MOVED;
last_node->parse_flags = (GumboParseFlags)((int)last_node->parse_flags | (int) GUMBO_INSERTION_ADOPTION_AGENCY_MOVED);
remove_from_parent(parser, last_node);
append_node(parser, node, last_node);
// Step 9.10.
last_node = node;
}
// Step 10.
gumbo_debug("Removing %s node from parent ",
gumbo_normalized_tagname(last_node->v.element.tag));
remove_from_parent(parser, last_node);
//last_node->parse_flags |= GUMBO_INSERTION_ADOPTION_AGENCY_MOVED;
last_node->parse_flags = (GumboParseFlags)((int)last_node->parse_flags | (int) GUMBO_INSERTION_ADOPTION_AGENCY_MOVED);
if (node_tag_in(common_ancestor, GUMBO_TAG_TABLE, GUMBO_TAG_TBODY,
GUMBO_TAG_TFOOT, GUMBO_TAG_THEAD, GUMBO_TAG_TR,
GUMBO_TAG_LAST)) {
gumbo_debug("and foster-parenting it.\n");
foster_parent_element(parser, last_node);
} else {
gumbo_debug("and inserting it into %s.\n",
gumbo_normalized_tagname(common_ancestor->v.element.tag));
append_node(parser, common_ancestor, last_node);
}
// Step 11.
GumboNode* new_formatting_node = clone_node(
parser, formatting_node, GUMBO_INSERTION_ADOPTION_AGENCY_CLONED);
//formatting_node->parse_flags |= GUMBO_INSERTION_IMPLICIT_END_TAG;
formatting_node->parse_flags = (GumboParseFlags)((int)formatting_node->parse_flags | (int) GUMBO_INSERTION_IMPLICIT_END_TAG);
// Step 12. Instead of appending nodes one-by-one, we swap the children
// vector of furthest_block with the empty children of new_formatting_node,
// reducing memory traffic and allocations. We still have to reset their
// parent pointers, though.
GumboVector temp = new_formatting_node->v.element.children;
new_formatting_node->v.element.children =
furthest_block->v.element.children;
furthest_block->v.element.children = temp;
temp = new_formatting_node->v.element.children;
for (int i = 0; i < temp.length; ++i) {
GumboNode* child = (GumboNode*)temp.data[i];
child->parent = new_formatting_node;
}
// Step 13.
append_node(parser, furthest_block, new_formatting_node);
// Step 14.
// If the formatting node was before the bookmark, it may shift over all
// indices after it, so we need to explicitly find the index and possibly
// adjust the bookmark.
int formatting_node_index = gumbo_vector_index_of(
&state->_active_formatting_elements, formatting_node);
assert(formatting_node_index != -1);
if (formatting_node_index < bookmark) {
--bookmark;
}
gumbo_vector_remove_at(
parser, formatting_node_index, &state->_active_formatting_elements);
assert(bookmark >= 0);
assert(bookmark <= state->_active_formatting_elements.length);
gumbo_vector_insert_at(parser, new_formatting_node, bookmark,
&state->_active_formatting_elements);
// Step 15.
gumbo_vector_remove(
parser, formatting_node, &state->_open_elements);
int insert_at = gumbo_vector_index_of(
&state->_open_elements, furthest_block) + 1;
assert(insert_at >= 0);
assert(insert_at <= state->_open_elements.length);
gumbo_vector_insert_at(
parser, new_formatting_node, insert_at, &state->_open_elements);
}
return true;
}
// This is here to clean up memory when the spec says "Ignore current token."
static void ignore_token(GumboParser* parser) {
GumboToken* token = parser->_parser_state->_current_token;
// Ownership of the token's internal buffers are normally transferred to the
// element, but if no element is emitted (as happens in non-verbatim-mode
// when a token is ignored), we need to free it here to prevent a memory
// leak.
gumbo_token_destroy(parser, token);
#ifndef NDEBUG
if (token->type == GUMBO_TOKEN_START_TAG) {
// Mark this sentinel so the assertion in the main loop knows it's been
// destroyed.
token->v.start_tag.attributes = kGumboEmptyVector;
}
#endif
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/the-end.html
static void finish_parsing(GumboParser* parser) {
maybe_flush_text_node_buffer(parser);
GumboParserState* state = parser->_parser_state;
for (GumboNode* node = pop_current_node(parser); node;
node = pop_current_node(parser)) {
if ((node_tag_is(node, GUMBO_TAG_BODY) && state->_closed_body_tag) ||
(node_tag_is(node, GUMBO_TAG_HTML) && state->_closed_html_tag)) {
continue;
}
//node->parse_flags |= GUMBO_INSERTION_IMPLICIT_END_TAG;
node->parse_flags = (GumboParseFlags)((int)node->parse_flags | (int) GUMBO_INSERTION_IMPLICIT_END_TAG);
}
while (pop_current_node(parser)); // Pop them all.
}
static bool handle_initial(GumboParser* parser, GumboToken* token) {
GumboDocument* document = &get_document_node(parser)->v.document;
if (token->type == GUMBO_TOKEN_WHITESPACE) {
ignore_token(parser);
return true;
} else if (token->type == GUMBO_TOKEN_COMMENT) {
append_comment_node(parser, get_document_node(parser), token);
return true;
} else if (token->type == GUMBO_TOKEN_DOCTYPE) {
document->has_doctype = true;
document->name = token->v.doc_type.name;
document->public_identifier = token->v.doc_type.public_identifier;
document->system_identifier = token->v.doc_type.system_identifier;
document->doc_type_quirks_mode = compute_quirks_mode(&token->v.doc_type);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_BEFORE_HTML);
return maybe_add_doctype_error(parser, token);
}
add_parse_error(parser, token);
document->doc_type_quirks_mode = GUMBO_DOCTYPE_QUIRKS;
set_insertion_mode(parser, GUMBO_INSERTION_MODE_BEFORE_HTML);
parser->_parser_state->_reprocess_current_token = true;
return true;
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#the-before-html-insertion-mode
static bool handle_before_html(GumboParser* parser, GumboToken* token) {
if (token->type == GUMBO_TOKEN_DOCTYPE) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (token->type == GUMBO_TOKEN_COMMENT) {
append_comment_node(parser, get_document_node(parser), token);
return true;
} else if (token->type == GUMBO_TOKEN_WHITESPACE) {
ignore_token(parser);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_HTML)) {
GumboNode* html_node = insert_element_from_token(parser, token);
parser->_output->root = html_node;
set_insertion_mode(parser, GUMBO_INSERTION_MODE_BEFORE_HEAD);
return true;
} else if (token->type == GUMBO_TOKEN_END_TAG && !tag_in(
token, false, GUMBO_TAG_HEAD, GUMBO_TAG_BODY, GUMBO_TAG_HTML,
GUMBO_TAG_BR, GUMBO_TAG_LAST)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else {
GumboNode* html_node = insert_element_of_tag_type(
parser, GUMBO_TAG_HTML, GUMBO_INSERTION_IMPLIED);
assert(html_node);
parser->_output->root = html_node;
set_insertion_mode(parser, GUMBO_INSERTION_MODE_BEFORE_HEAD);
parser->_parser_state->_reprocess_current_token = true;
return true;
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#the-before-head-insertion-mode
static bool handle_before_head(GumboParser* parser, GumboToken* token) {
if (token->type == GUMBO_TOKEN_DOCTYPE) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (token->type == GUMBO_TOKEN_COMMENT) {
append_comment_node(parser, get_current_node(parser), token);
return true;
} else if (token->type == GUMBO_TOKEN_WHITESPACE) {
ignore_token(parser);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_HEAD)) {
GumboNode* node = insert_element_from_token(parser, token);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_HEAD);
parser->_parser_state->_head_element = node;
return true;
} else if (token->type == GUMBO_TOKEN_END_TAG && !tag_in(
token, false, GUMBO_TAG_HEAD, GUMBO_TAG_BODY, GUMBO_TAG_HTML,
GUMBO_TAG_BR, GUMBO_TAG_LAST)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else {
GumboNode* node = insert_element_of_tag_type(
parser, GUMBO_TAG_HEAD, GUMBO_INSERTION_IMPLIED);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_HEAD);
parser->_parser_state->_head_element = node;
parser->_parser_state->_reprocess_current_token = true;
return true;
}
}
// Forward declarations because of mutual dependencies.
static bool handle_token(GumboParser* parser, GumboToken* token);
static bool handle_in_body(GumboParser* parser, GumboToken* token);
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#parsing-main-inhead
static bool handle_in_head(GumboParser* parser, GumboToken* token) {
if (token->type == GUMBO_TOKEN_WHITESPACE) {
insert_text_token(parser, token);
return true;
} else if (token->type == GUMBO_TOKEN_DOCTYPE) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (token->type == GUMBO_TOKEN_COMMENT) {
append_comment_node(parser, get_current_node(parser), token);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_HTML)) {
return handle_in_body(parser, token);
} else if (tag_in(token, kStartTag, GUMBO_TAG_BASE, GUMBO_TAG_BASEFONT,
GUMBO_TAG_BGSOUND, GUMBO_TAG_MENUITEM, GUMBO_TAG_LINK,
GUMBO_TAG_LAST)) {
insert_element_from_token(parser, token);
pop_current_node(parser);
acknowledge_self_closing_tag(parser);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_META)) {
insert_element_from_token(parser, token);
pop_current_node(parser);
acknowledge_self_closing_tag(parser);
// NOTE(jdtang): Gumbo handles only UTF-8, so the encoding clause of the
// spec doesn't apply. If clients want to handle meta-tag re-encoding, they
// should specifically look for that string in the document and re-encode it
// before passing to Gumbo.
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_TITLE)) {
run_generic_parsing_algorithm(parser, token, GUMBO_LEX_RCDATA);
return true;
} else if (tag_in(token, kStartTag, GUMBO_TAG_NOFRAMES, GUMBO_TAG_STYLE,
GUMBO_TAG_LAST)) {
run_generic_parsing_algorithm(parser, token, GUMBO_LEX_RAWTEXT);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_NOSCRIPT)) {
insert_element_from_token(parser, token);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_HEAD_NOSCRIPT);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_SCRIPT)) {
run_generic_parsing_algorithm(parser, token, GUMBO_LEX_SCRIPT);
return true;
} else if (tag_is(token, kEndTag, GUMBO_TAG_HEAD)) {
GumboNode* head = pop_current_node(parser);
AVOID_UNUSED_VARIABLE_WARNING(head);
assert(node_tag_is(head, GUMBO_TAG_HEAD));
set_insertion_mode(parser, GUMBO_INSERTION_MODE_AFTER_HEAD);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_HEAD)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (tag_is(token, kStartTag, GUMBO_TAG_HEAD) ||
(token->type == GUMBO_TOKEN_END_TAG &&
!tag_in(token, kEndTag, GUMBO_TAG_BODY, GUMBO_TAG_HTML,
GUMBO_TAG_BR, GUMBO_TAG_LAST))) {
add_parse_error(parser, token);
return false;
} else {
const GumboNode* node = pop_current_node(parser);
assert(node_tag_is(node, GUMBO_TAG_HEAD));
AVOID_UNUSED_VARIABLE_WARNING(node);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_AFTER_HEAD);
parser->_parser_state->_reprocess_current_token = true;
return true;
}
return true;
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#parsing-main-inheadnoscript
static bool handle_in_head_noscript(GumboParser* parser, GumboToken* token) {
if (token->type == GUMBO_TOKEN_DOCTYPE) {
add_parse_error(parser, token);
return false;
} else if (tag_is(token, kStartTag, GUMBO_TAG_HTML)) {
return handle_in_body(parser, token);
} else if (tag_is(token, kEndTag, GUMBO_TAG_NOSCRIPT)) {
const GumboNode* node = pop_current_node(parser);
assert(node_tag_is(node, GUMBO_TAG_NOSCRIPT));
AVOID_UNUSED_VARIABLE_WARNING(node);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_HEAD);
return true;
} else if (token->type == GUMBO_TOKEN_WHITESPACE ||
token->type == GUMBO_TOKEN_COMMENT ||
tag_in(token, kStartTag, GUMBO_TAG_BASEFONT, GUMBO_TAG_BGSOUND,
GUMBO_TAG_LINK, GUMBO_TAG_META, GUMBO_TAG_NOFRAMES,
GUMBO_TAG_STYLE, GUMBO_TAG_LAST)) {
return handle_in_head(parser, token);
} else if (tag_in(token, kStartTag, GUMBO_TAG_HEAD, GUMBO_TAG_NOSCRIPT,
GUMBO_TAG_LAST) ||
(token->type == GUMBO_TOKEN_END_TAG &&
!tag_is(token, kEndTag, GUMBO_TAG_BR))) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else {
add_parse_error(parser, token);
const GumboNode* node = pop_current_node(parser);
assert(node_tag_is(node, GUMBO_TAG_NOSCRIPT));
AVOID_UNUSED_VARIABLE_WARNING(node);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_HEAD);
parser->_parser_state->_reprocess_current_token = true;
return false;
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#the-after-head-insertion-mode
static bool handle_after_head(GumboParser* parser, GumboToken* token) {
GumboParserState* state = parser->_parser_state;
if (token->type == GUMBO_TOKEN_WHITESPACE) {
insert_text_token(parser, token);
return true;
} else if (token->type == GUMBO_TOKEN_DOCTYPE) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (token->type == GUMBO_TOKEN_COMMENT) {
append_comment_node(parser, get_current_node(parser), token);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_HTML)) {
return handle_in_body(parser, token);
} else if (tag_is(token, kStartTag, GUMBO_TAG_BODY)) {
insert_element_from_token(parser, token);
state->_frameset_ok = false;
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_BODY);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_FRAMESET)) {
insert_element_from_token(parser, token);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_FRAMESET);
return true;
} else if (tag_in(token, kStartTag, GUMBO_TAG_BASE, GUMBO_TAG_BASEFONT,
GUMBO_TAG_BGSOUND, GUMBO_TAG_LINK, GUMBO_TAG_META,
GUMBO_TAG_NOFRAMES, GUMBO_TAG_SCRIPT, GUMBO_TAG_STYLE,
GUMBO_TAG_TITLE, GUMBO_TAG_LAST)) {
add_parse_error(parser, token);
assert(state->_head_element != NULL);
// This must be flushed before we push the head element on, as there may be
// pending character tokens that should be attached to the root.
maybe_flush_text_node_buffer(parser);
gumbo_vector_add(parser, state->_head_element, &state->_open_elements);
bool result = handle_in_head(parser, token);
gumbo_vector_remove(parser, state->_head_element, &state->_open_elements);
return result;
} else if (tag_is(token, kStartTag, GUMBO_TAG_HEAD) ||
(token->type == GUMBO_TOKEN_END_TAG &&
!tag_in(token, kEndTag, GUMBO_TAG_BODY, GUMBO_TAG_HTML,
GUMBO_TAG_BR, GUMBO_TAG_LAST))) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else {
insert_element_of_tag_type(parser, GUMBO_TAG_BODY, GUMBO_INSERTION_IMPLIED);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_BODY);
state->_reprocess_current_token = true;
return true;
}
}
static void destroy_node(GumboParser* parser, GumboNode* node) {
switch (node->type) {
case GUMBO_NODE_DOCUMENT:
{
GumboDocument* doc = &node->v.document;
for (int i = 0; i < doc->children.length; ++i) {
destroy_node(parser, (GumboNode*)doc->children.data[i]);
}
gumbo_parser_deallocate(parser, (void*) doc->children.data);
gumbo_parser_deallocate(parser, (void*) doc->name);
gumbo_parser_deallocate(parser, (void*) doc->public_identifier);
gumbo_parser_deallocate(parser, (void*) doc->system_identifier);
}
break;
case GUMBO_NODE_ELEMENT:
for (int i = 0; i < node->v.element.attributes.length; ++i) {
gumbo_destroy_attribute(parser, (GumboAttribute*)node->v.element.attributes.data[i]);
}
gumbo_parser_deallocate(parser, node->v.element.attributes.data);
for (int i = 0; i < node->v.element.children.length; ++i) {
destroy_node(parser, (GumboNode*)node->v.element.children.data[i]);
}
gumbo_parser_deallocate(parser, node->v.element.children.data);
break;
case GUMBO_NODE_TEXT:
case GUMBO_NODE_CDATA:
case GUMBO_NODE_COMMENT:
case GUMBO_NODE_WHITESPACE:
gumbo_parser_deallocate(parser, (void*) node->v.text.text);
break;
}
gumbo_parser_deallocate(parser, node);
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#parsing-main-inbody
static bool handle_in_body(GumboParser* parser, GumboToken* token) {
GumboParserState* state = parser->_parser_state;
assert(state->_open_elements.length > 0);
if (token->type == GUMBO_TOKEN_NULL) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (token->type == GUMBO_TOKEN_WHITESPACE) {
reconstruct_active_formatting_elements(parser);
insert_text_token(parser, token);
return true;
} else if (token->type == GUMBO_TOKEN_CHARACTER) {
reconstruct_active_formatting_elements(parser);
insert_text_token(parser, token);
set_frameset_not_ok(parser);
return true;
} else if (token->type == GUMBO_TOKEN_COMMENT) {
append_comment_node(parser, get_current_node(parser), token);
return true;
} else if (token->type == GUMBO_TOKEN_DOCTYPE) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (tag_is(token, kStartTag, GUMBO_TAG_HTML)) {
assert(parser->_output->root != NULL);
assert(parser->_output->root->type == GUMBO_NODE_ELEMENT);
add_parse_error(parser, token);
merge_attributes(parser, token, parser->_output->root);
return false;
} else if (tag_in(token, kStartTag, GUMBO_TAG_BASE, GUMBO_TAG_BASEFONT,
GUMBO_TAG_BGSOUND, GUMBO_TAG_MENUITEM, GUMBO_TAG_LINK,
GUMBO_TAG_META, GUMBO_TAG_NOFRAMES, GUMBO_TAG_SCRIPT,
GUMBO_TAG_STYLE, GUMBO_TAG_TITLE, GUMBO_TAG_LAST)) {
return handle_in_head(parser, token);
} else if (tag_is(token, kStartTag, GUMBO_TAG_BODY)) {
add_parse_error(parser, token);
if (state->_open_elements.length < 2 ||
!node_tag_is((GumboNode*)state->_open_elements.data[1], GUMBO_TAG_BODY)) {
ignore_token(parser);
return false;
}
state->_frameset_ok = false;
merge_attributes(parser, token, (GumboNode*)state->_open_elements.data[1]);
return false;
} else if (tag_is(token, kStartTag, GUMBO_TAG_FRAMESET)) {
add_parse_error(parser, token);
if (state->_open_elements.length < 2 ||
!node_tag_is((GumboNode*)state->_open_elements.data[1], GUMBO_TAG_BODY) ||
!state->_frameset_ok) {
ignore_token(parser);
return false;
}
// Save the body node for later removal.
GumboNode* body_node = (GumboNode*)state->_open_elements.data[1];
// Pop all nodes except root HTML element.
GumboNode* node;
do {
node = pop_current_node(parser);
} while (node != state->_open_elements.data[1]);
// Remove the body node. We may want to factor this out into a generic
// helper, but right now this is the only code that needs to do this.
GumboVector* children = &parser->_output->root->v.element.children;
for (int i = 0; i < children->length; ++i) {
if (children->data[i] == body_node) {
gumbo_vector_remove_at(parser, i, children);
break;
}
}
destroy_node(parser, body_node);
// Insert the <frameset>, and switch the insertion mode.
insert_element_from_token(parser, token);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_FRAMESET);
return true;
} else if (token->type == GUMBO_TOKEN_EOF) {
for (int i = 0; i < state->_open_elements.length; ++i) {
if (!node_tag_in((GumboNode*)state->_open_elements.data[i], GUMBO_TAG_DD,
GUMBO_TAG_DT, GUMBO_TAG_LI, GUMBO_TAG_P, GUMBO_TAG_TBODY,
GUMBO_TAG_TD, GUMBO_TAG_TFOOT, GUMBO_TAG_TH,
GUMBO_TAG_THEAD, GUMBO_TAG_TR, GUMBO_TAG_BODY,
GUMBO_TAG_HTML, GUMBO_TAG_LAST)) {
add_parse_error(parser, token);
return false;
}
}
return true;
} else if (tag_in(token, kEndTag, GUMBO_TAG_BODY, GUMBO_TAG_HTML,
GUMBO_TAG_LAST)) {
if (!has_an_element_in_scope(parser, GUMBO_TAG_BODY)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
bool success = true;
for (int i = 0; i < state->_open_elements.length; ++i) {
if (!node_tag_in((GumboNode*)state->_open_elements.data[i], GUMBO_TAG_DD,
GUMBO_TAG_DT, GUMBO_TAG_LI, GUMBO_TAG_OPTGROUP,
GUMBO_TAG_OPTION, GUMBO_TAG_P, GUMBO_TAG_RP,
GUMBO_TAG_RT, GUMBO_TAG_TBODY, GUMBO_TAG_TD,
GUMBO_TAG_TFOOT, GUMBO_TAG_TH, GUMBO_TAG_THEAD,
GUMBO_TAG_TR, GUMBO_TAG_BODY, GUMBO_TAG_HTML,
GUMBO_TAG_LAST)) {
add_parse_error(parser, token);
success = false;
break;
}
}
set_insertion_mode(parser, GUMBO_INSERTION_MODE_AFTER_BODY);
if (tag_is(token, kEndTag, GUMBO_TAG_HTML)) {
parser->_parser_state->_reprocess_current_token = true;
} else {
GumboNode* body = (GumboNode*)state->_open_elements.data[1];
assert(node_tag_is(body, GUMBO_TAG_BODY));
record_end_of_element(state->_current_token, &body->v.element);
}
return success;
} else if (tag_in(token, kStartTag, GUMBO_TAG_ADDRESS, GUMBO_TAG_ARTICLE,
GUMBO_TAG_ASIDE, GUMBO_TAG_BLOCKQUOTE, GUMBO_TAG_CENTER,
GUMBO_TAG_DETAILS, GUMBO_TAG_DIR, GUMBO_TAG_DIV,
GUMBO_TAG_DL, GUMBO_TAG_FIELDSET, GUMBO_TAG_FIGCAPTION,
GUMBO_TAG_FIGURE, GUMBO_TAG_FOOTER, GUMBO_TAG_HEADER,
GUMBO_TAG_HGROUP, GUMBO_TAG_MENU, GUMBO_TAG_NAV,
GUMBO_TAG_OL, GUMBO_TAG_P, GUMBO_TAG_SECTION,
GUMBO_TAG_SUMMARY, GUMBO_TAG_UL, GUMBO_TAG_LAST)) {
bool result = maybe_implicitly_close_p_tag(parser, token);
insert_element_from_token(parser, token);
return result;
} else if (tag_in(token, kStartTag, GUMBO_TAG_H1, GUMBO_TAG_H2, GUMBO_TAG_H3,
GUMBO_TAG_H4, GUMBO_TAG_H5, GUMBO_TAG_H6, GUMBO_TAG_LAST)) {
bool result = maybe_implicitly_close_p_tag(parser, token);
if (node_tag_in(get_current_node(parser), GUMBO_TAG_H1, GUMBO_TAG_H2,
GUMBO_TAG_H3, GUMBO_TAG_H4, GUMBO_TAG_H5, GUMBO_TAG_H6,
GUMBO_TAG_LAST)) {
add_parse_error(parser, token);
pop_current_node(parser);
result = false;
}
insert_element_from_token(parser, token);
return result;
} else if (tag_in(token, kStartTag, GUMBO_TAG_PRE, GUMBO_TAG_LISTING,
GUMBO_TAG_LAST)) {
bool result = maybe_implicitly_close_p_tag(parser, token);
insert_element_from_token(parser, token);
state->_ignore_next_linefeed = true;
state->_frameset_ok = false;
return result;
} else if (tag_is(token, kStartTag, GUMBO_TAG_FORM)) {
if (state->_form_element != NULL) {
gumbo_debug("Ignoring nested form.\n");
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
bool result = maybe_implicitly_close_p_tag(parser, token);
state->_form_element =
insert_element_from_token(parser, token);
return result;
} else if (tag_is(token, kStartTag, GUMBO_TAG_LI)) {
maybe_implicitly_close_list_tag(parser, token, true);
bool result = maybe_implicitly_close_p_tag(parser, token);
insert_element_from_token(parser, token);
return result;
} else if (tag_in(token, kStartTag, GUMBO_TAG_DD, GUMBO_TAG_DT,
GUMBO_TAG_LAST)) {
maybe_implicitly_close_list_tag(parser, token, false);
bool result = maybe_implicitly_close_p_tag(parser, token);
insert_element_from_token(parser, token);
return result;
} else if (tag_is(token, kStartTag, GUMBO_TAG_PLAINTEXT)) {
bool result = maybe_implicitly_close_p_tag(parser, token);
insert_element_from_token(parser, token);
gumbo_tokenizer_set_state(parser, GUMBO_LEX_PLAINTEXT);
return result;
} else if (tag_is(token, kStartTag, GUMBO_TAG_BUTTON)) {
if (has_an_element_in_scope(parser, GUMBO_TAG_BUTTON)) {
add_parse_error(parser, token);
implicitly_close_tags(parser, token, GUMBO_TAG_BUTTON);
state->_reprocess_current_token = true;
return false;
}
reconstruct_active_formatting_elements(parser);
insert_element_from_token(parser, token);
state->_frameset_ok = false;
return true;
} else if (tag_in(token, kEndTag, GUMBO_TAG_ADDRESS, GUMBO_TAG_ARTICLE,
GUMBO_TAG_ASIDE, GUMBO_TAG_BLOCKQUOTE, GUMBO_TAG_BUTTON,
GUMBO_TAG_CENTER, GUMBO_TAG_DETAILS, GUMBO_TAG_DIR,
GUMBO_TAG_DIV, GUMBO_TAG_DL, GUMBO_TAG_FIELDSET,
GUMBO_TAG_FIGCAPTION, GUMBO_TAG_FIGURE, GUMBO_TAG_FOOTER,
GUMBO_TAG_HEADER, GUMBO_TAG_HGROUP, GUMBO_TAG_LISTING,
GUMBO_TAG_MENU, GUMBO_TAG_NAV, GUMBO_TAG_OL, GUMBO_TAG_PRE,
GUMBO_TAG_SECTION, GUMBO_TAG_SUMMARY, GUMBO_TAG_UL,
GUMBO_TAG_LAST)) {
GumboTag tag = token->v.end_tag;
if (!has_an_element_in_scope(parser, tag)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
implicitly_close_tags(parser, token, token->v.end_tag);
return true;
} else if (tag_is(token, kEndTag, GUMBO_TAG_FORM)) {
bool result = true;
const GumboNode* node = state->_form_element;
assert(!node || node->type == GUMBO_NODE_ELEMENT);
state->_form_element = NULL;
if (!node || !has_node_in_scope(parser, node)) {
gumbo_debug("Closing an unopened form.\n");
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
// This differs from implicitly_close_tags because we remove *only* the
// <form> element; other nodes are left in scope.
generate_implied_end_tags(parser, GUMBO_TAG_LAST);
if (get_current_node(parser) != node) {
add_parse_error(parser, token);
result = false;
}
GumboVector* open_elements = &state->_open_elements;
int index = open_elements->length - 1;
for (; index >= 0 && open_elements->data[index] != node; --index);
assert(index >= 0);
gumbo_vector_remove_at(parser, index, open_elements);
return result;
} else if (tag_is(token, kEndTag, GUMBO_TAG_P)) {
if (!has_an_element_in_button_scope(parser, GUMBO_TAG_P)) {
add_parse_error(parser, token);
reconstruct_active_formatting_elements(parser);
insert_element_of_tag_type(
parser, GUMBO_TAG_P, GUMBO_INSERTION_CONVERTED_FROM_END_TAG);
state->_reprocess_current_token = true;
return false;
}
return implicitly_close_tags(parser, token, GUMBO_TAG_P);
} else if (tag_is(token, kEndTag, GUMBO_TAG_LI)) {
if (!has_an_element_in_list_scope(parser, GUMBO_TAG_LI)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
return implicitly_close_tags(parser, token, GUMBO_TAG_LI);
} else if (tag_in(token, kEndTag, GUMBO_TAG_DD, GUMBO_TAG_DT,
GUMBO_TAG_LAST)) {
assert(token->type == GUMBO_TOKEN_END_TAG);
GumboTag token_tag = token->v.end_tag;
if (!has_an_element_in_scope(parser, token_tag)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
return implicitly_close_tags(parser, token, token_tag);
} else if (tag_in(token, kEndTag, GUMBO_TAG_H1, GUMBO_TAG_H2, GUMBO_TAG_H3,
GUMBO_TAG_H4, GUMBO_TAG_H5, GUMBO_TAG_H6, GUMBO_TAG_LAST)) {
if (!has_an_element_in_scope_with_tagname(
parser, GUMBO_TAG_H1, GUMBO_TAG_H2, GUMBO_TAG_H3, GUMBO_TAG_H4,
GUMBO_TAG_H5, GUMBO_TAG_H6, GUMBO_TAG_LAST)) {
// No heading open; ignore the token entirely.
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else {
generate_implied_end_tags(parser, GUMBO_TAG_LAST);
const GumboNode* current_node = get_current_node(parser);
bool success = node_tag_is(current_node, token->v.end_tag);
if (!success) {
// There're children of the heading currently open; close them below and
// record a parse error.
// TODO(jdtang): Add a way to distinguish this error case from the one
// above.
add_parse_error(parser, token);
}
do {
current_node = pop_current_node(parser);
} while (!node_tag_in(current_node, GUMBO_TAG_H1, GUMBO_TAG_H2,
GUMBO_TAG_H3, GUMBO_TAG_H4, GUMBO_TAG_H5,
GUMBO_TAG_H6, GUMBO_TAG_LAST));
return success;
}
} else if (tag_is(token, kStartTag, GUMBO_TAG_A)) {
bool success = true;
int last_a;
int has_matching_a = find_last_anchor_index(parser, &last_a);
if (has_matching_a) {
assert(has_matching_a == 1);
add_parse_error(parser, token);
adoption_agency_algorithm(parser, token, GUMBO_TAG_A);
// The adoption agency algorithm usually removes all instances of <a>
// from the list of active formatting elements, but in case it doesn't,
// we're supposed to do this. (The conditions where it might not are
// listed in the spec.)
if (find_last_anchor_index(parser, &last_a)) {
void* last_element = gumbo_vector_remove_at(
parser, last_a, &state->_active_formatting_elements);
gumbo_vector_remove(
parser, last_element, &state->_open_elements);
}
success = false;
}
reconstruct_active_formatting_elements(parser);
add_formatting_element(parser, insert_element_from_token(parser, token));
return success;
} else if (tag_in(token, kStartTag, GUMBO_TAG_B, GUMBO_TAG_BIG,
GUMBO_TAG_CODE, GUMBO_TAG_EM, GUMBO_TAG_FONT, GUMBO_TAG_I,
GUMBO_TAG_S, GUMBO_TAG_SMALL, GUMBO_TAG_STRIKE,
GUMBO_TAG_STRONG, GUMBO_TAG_TT, GUMBO_TAG_U,
GUMBO_TAG_LAST)) {
reconstruct_active_formatting_elements(parser);
add_formatting_element(parser, insert_element_from_token(parser, token));
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_NOBR)) {
bool result = true;
reconstruct_active_formatting_elements(parser);
if (has_an_element_in_scope(parser, GUMBO_TAG_NOBR)) {
result = false;
add_parse_error(parser, token);
adoption_agency_algorithm(parser, token, GUMBO_TAG_NOBR);
reconstruct_active_formatting_elements(parser);
}
insert_element_from_token(parser, token);
add_formatting_element(parser, get_current_node(parser));
return result;
} else if (tag_in(token, kEndTag, GUMBO_TAG_A, GUMBO_TAG_B, GUMBO_TAG_BIG,
GUMBO_TAG_CODE, GUMBO_TAG_EM, GUMBO_TAG_FONT, GUMBO_TAG_I,
GUMBO_TAG_NOBR, GUMBO_TAG_S, GUMBO_TAG_SMALL,
GUMBO_TAG_STRIKE, GUMBO_TAG_STRONG, GUMBO_TAG_TT,
GUMBO_TAG_U, GUMBO_TAG_LAST)) {
return adoption_agency_algorithm(parser, token, token->v.end_tag);
} else if (tag_in(token, kStartTag, GUMBO_TAG_APPLET, GUMBO_TAG_MARQUEE,
GUMBO_TAG_OBJECT, GUMBO_TAG_LAST)) {
reconstruct_active_formatting_elements(parser);
insert_element_from_token(parser, token);
add_formatting_element(parser, &kActiveFormattingScopeMarker);
set_frameset_not_ok(parser);
return true;
} else if (tag_in(token, kEndTag, GUMBO_TAG_APPLET, GUMBO_TAG_MARQUEE,
GUMBO_TAG_OBJECT, GUMBO_TAG_LAST)) {
GumboTag token_tag = token->v.end_tag;
if (!has_an_element_in_table_scope(parser, token_tag)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
implicitly_close_tags(parser, token, token_tag);
clear_active_formatting_elements(parser);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_TABLE)) {
if (get_document_node(parser)->v.document.doc_type_quirks_mode !=
GUMBO_DOCTYPE_QUIRKS) {
maybe_implicitly_close_p_tag(parser, token);
}
insert_element_from_token(parser, token);
set_frameset_not_ok(parser);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_TABLE);
return true;
} else if (tag_in(token, kStartTag, GUMBO_TAG_AREA, GUMBO_TAG_BR,
GUMBO_TAG_EMBED, GUMBO_TAG_IMG, GUMBO_TAG_IMAGE,
GUMBO_TAG_KEYGEN, GUMBO_TAG_WBR, GUMBO_TAG_LAST)) {
bool success = true;
if (tag_is(token, kStartTag, GUMBO_TAG_IMAGE)) {
success = false;
add_parse_error(parser, token);
token->v.start_tag.tag = GUMBO_TAG_IMG;
}
reconstruct_active_formatting_elements(parser);
GumboNode* node = insert_element_from_token(parser, token);
if (tag_is(token, kStartTag, GUMBO_TAG_IMAGE)) {
success = false;
add_parse_error(parser, token);
node->v.element.tag = GUMBO_TAG_IMG;
//node->parse_flags |= GUMBO_INSERTION_FROM_IMAGE;
node->parse_flags = (GumboParseFlags)((int)node->parse_flags | (int) GUMBO_INSERTION_FROM_IMAGE);
}
pop_current_node(parser);
acknowledge_self_closing_tag(parser);
set_frameset_not_ok(parser);
return success;
} else if (tag_is(token, kStartTag, GUMBO_TAG_INPUT)) {
if (!attribute_matches(&token->v.start_tag.attributes, "type", "hidden")) {
// Must be before the element is inserted, as that takes ownership of the
// token's attribute vector.
set_frameset_not_ok(parser);
}
reconstruct_active_formatting_elements(parser);
insert_element_from_token(parser, token);
pop_current_node(parser);
acknowledge_self_closing_tag(parser);
return true;
} else if (tag_in(token, kStartTag, GUMBO_TAG_PARAM, GUMBO_TAG_SOURCE,
GUMBO_TAG_TRACK, GUMBO_TAG_LAST)) {
insert_element_from_token(parser, token);
pop_current_node(parser);
acknowledge_self_closing_tag(parser);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_HR)) {
bool result = maybe_implicitly_close_p_tag(parser, token);
insert_element_from_token(parser, token);
pop_current_node(parser);
acknowledge_self_closing_tag(parser);
set_frameset_not_ok(parser);
return result;
} else if (tag_is(token, kStartTag, GUMBO_TAG_ISINDEX)) {
add_parse_error(parser, token);
if (parser->_parser_state->_form_element != NULL) {
ignore_token(parser);
return false;
}
acknowledge_self_closing_tag(parser);
maybe_implicitly_close_p_tag(parser, token);
set_frameset_not_ok(parser);
GumboVector* token_attrs = &token->v.start_tag.attributes;
GumboAttribute* prompt_attr = gumbo_get_attribute(token_attrs, "prompt");
GumboAttribute* action_attr = gumbo_get_attribute(token_attrs, "action");
GumboAttribute* name_attr = gumbo_get_attribute(token_attrs, "isindex");
GumboNode* form = insert_element_of_tag_type(
parser, GUMBO_TAG_FORM, GUMBO_INSERTION_FROM_ISINDEX);
if (action_attr) {
gumbo_vector_add(parser, action_attr, &form->v.element.attributes);
}
insert_element_of_tag_type(parser, GUMBO_TAG_HR,
GUMBO_INSERTION_FROM_ISINDEX);
pop_current_node(parser); // <hr>
insert_element_of_tag_type(parser, GUMBO_TAG_LABEL,
GUMBO_INSERTION_FROM_ISINDEX);
TextNodeBufferState* text_state = &parser->_parser_state->_text_node;
text_state->_start_original_text = token->original_text.data;
text_state->_start_position = token->position;
text_state->_type = GUMBO_NODE_TEXT;
if (prompt_attr) {
int prompt_attr_length = strlen(prompt_attr->value);
gumbo_string_buffer_destroy(parser, &text_state->_buffer);
text_state->_buffer.data = (DE_CHAR*)gumbo_copy_stringz(parser, prompt_attr->value);
text_state->_buffer.length = prompt_attr_length;
text_state->_buffer.capacity = prompt_attr_length + 1;
gumbo_destroy_attribute(parser, prompt_attr);
} else {
GumboStringPiece prompt_text = GUMBO_STRING(
"This is a searchable index. Enter search keywords: ");
gumbo_string_buffer_append_string(
parser, &prompt_text, &text_state->_buffer);
}
GumboNode* input = insert_element_of_tag_type(
parser, GUMBO_TAG_INPUT, GUMBO_INSERTION_FROM_ISINDEX);
for (int i = 0; i < token_attrs->length; ++i) {
GumboAttribute* attr = (GumboAttribute*)token_attrs->data[i];
if (attr != prompt_attr && attr != action_attr && attr != name_attr) {
gumbo_vector_add(parser, attr, &input->v.element.attributes);
}
token_attrs->data[i] = NULL;
}
// All attributes have been successfully transferred and nulled out at this
// point, so the call to ignore_token will free the memory for it without
// touching the attributes.
ignore_token(parser);
GumboAttribute* name =
(GumboAttribute*)gumbo_parser_allocate(parser, sizeof(GumboAttribute));
GumboStringPiece name_str = GUMBO_STRING("name");
GumboStringPiece isindex_str = GUMBO_STRING("isindex");
name->attr_namespace = GUMBO_ATTR_NAMESPACE_NONE;
name->name = gumbo_copy_stringz(parser, "name");
name->value = gumbo_copy_stringz(parser, "isindex");
name->original_name = name_str;
name->original_value = isindex_str;
name->name_start = kGumboEmptySourcePosition;
name->name_end = kGumboEmptySourcePosition;
name->value_start = kGumboEmptySourcePosition;
name->value_end = kGumboEmptySourcePosition;
gumbo_vector_add(parser, name, &input->v.element.attributes);
pop_current_node(parser); // <input>
pop_current_node(parser); // <label>
insert_element_of_tag_type(
parser, GUMBO_TAG_HR, GUMBO_INSERTION_FROM_ISINDEX);
pop_current_node(parser); // <hr>
pop_current_node(parser); // <form>
return false;
} else if (tag_is(token, kStartTag, GUMBO_TAG_TEXTAREA)) {
run_generic_parsing_algorithm(parser, token, GUMBO_LEX_RCDATA);
parser->_parser_state->_ignore_next_linefeed = true;
set_frameset_not_ok(parser);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_XMP)) {
bool result = maybe_implicitly_close_p_tag(parser, token);
reconstruct_active_formatting_elements(parser);
set_frameset_not_ok(parser);
run_generic_parsing_algorithm(parser, token, GUMBO_LEX_RAWTEXT);
return result;
} else if (tag_is(token, kStartTag, GUMBO_TAG_IFRAME)) {
set_frameset_not_ok(parser);
run_generic_parsing_algorithm(parser, token, GUMBO_LEX_RAWTEXT);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_NOEMBED)) {
run_generic_parsing_algorithm(parser, token, GUMBO_LEX_RAWTEXT);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_SELECT)) {
reconstruct_active_formatting_elements(parser);
insert_element_from_token(parser, token);
set_frameset_not_ok(parser);
GumboInsertionMode state = parser->_parser_state->_insertion_mode;
if (state == GUMBO_INSERTION_MODE_IN_TABLE ||
state == GUMBO_INSERTION_MODE_IN_CAPTION ||
state == GUMBO_INSERTION_MODE_IN_TABLE_BODY ||
state == GUMBO_INSERTION_MODE_IN_ROW ||
state == GUMBO_INSERTION_MODE_IN_CELL) {
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_SELECT_IN_TABLE);
} else {
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_SELECT);
}
return true;
} else if (tag_in(token, kStartTag, GUMBO_TAG_OPTION, GUMBO_TAG_OPTGROUP,
GUMBO_TAG_LAST)) {
if (node_tag_is(get_current_node(parser), GUMBO_TAG_OPTION)) {
pop_current_node(parser);
}
reconstruct_active_formatting_elements(parser);
insert_element_from_token(parser, token);
return true;
} else if (tag_in(token, kStartTag, GUMBO_TAG_RP, GUMBO_TAG_RT,
GUMBO_TAG_LAST)) {
bool success = true;
if (has_an_element_in_scope(parser, GUMBO_TAG_RUBY)) {
generate_implied_end_tags(parser, GUMBO_TAG_LAST);
}
if (!node_tag_is(get_current_node(parser), GUMBO_TAG_RUBY)) {
add_parse_error(parser, token);
success = false;
}
insert_element_from_token(parser, token);
return success;
} else if (tag_is(token, kEndTag, GUMBO_TAG_BR)) {
add_parse_error(parser, token);
reconstruct_active_formatting_elements(parser);
insert_element_of_tag_type(
parser, GUMBO_TAG_BR, GUMBO_INSERTION_CONVERTED_FROM_END_TAG);
pop_current_node(parser);
return false;
} else if (tag_is(token, kStartTag, GUMBO_TAG_MATH)) {
reconstruct_active_formatting_elements(parser);
adjust_mathml_attributes(parser, token);
adjust_foreign_attributes(parser, token);
insert_foreign_element(parser, token, GUMBO_NAMESPACE_MATHML);
if (token->v.start_tag.is_self_closing) {
pop_current_node(parser);
acknowledge_self_closing_tag(parser);
}
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_SVG)) {
reconstruct_active_formatting_elements(parser);
adjust_svg_attributes(parser, token);
adjust_foreign_attributes(parser, token);
insert_foreign_element(parser, token, GUMBO_NAMESPACE_SVG);
if (token->v.start_tag.is_self_closing) {
pop_current_node(parser);
acknowledge_self_closing_tag(parser);
}
return true;
} else if (tag_in(token, kStartTag, GUMBO_TAG_CAPTION, GUMBO_TAG_COL,
GUMBO_TAG_COLGROUP, GUMBO_TAG_FRAME, GUMBO_TAG_HEAD,
GUMBO_TAG_TBODY, GUMBO_TAG_TD, GUMBO_TAG_TFOOT,
GUMBO_TAG_TH, GUMBO_TAG_THEAD, GUMBO_TAG_TR,
GUMBO_TAG_LAST)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (token->type == GUMBO_TOKEN_START_TAG) {
reconstruct_active_formatting_elements(parser);
insert_element_from_token(parser, token);
return true;
} else {
assert(token->type == GUMBO_TOKEN_END_TAG);
GumboTag end_tag = token->v.end_tag;
assert(state->_open_elements.length > 0);
assert(node_tag_is((GumboNode*)state->_open_elements.data[0], GUMBO_TAG_HTML));
// Walk up the stack of open elements until we find one that either:
// a) Matches the tag name we saw
// b) Is in the "special" category.
// If we see a), implicitly close everything up to and including it. If we
// see b), then record a parse error, don't close anything (except the
// implied end tags) and ignore the end tag token.
for (int i = state->_open_elements.length; --i >= 0; ) {
const GumboNode* node = (GumboNode*)state->_open_elements.data[i];
if (node->v.element.tag_namespace == GUMBO_NAMESPACE_HTML &&
node_tag_is(node, end_tag)) {
generate_implied_end_tags(parser, end_tag);
// TODO(jdtang): Do I need to add a parse error here? The condition in
// the spec seems like it's the inverse of the loop condition above, and
// so would never fire.
while (node != pop_current_node(parser)); // Pop everything.
return true;
} else if (is_special_node(node)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
}
// <html> is in the special category, so we should never get here.
assert(0);
return false;
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#parsing-main-incdata
static bool handle_text(GumboParser* parser, GumboToken* token) {
if (token->type == GUMBO_TOKEN_CHARACTER || token->type == GUMBO_TOKEN_WHITESPACE) {
insert_text_token(parser, token);
} else {
// We provide only bare-bones script handling that doesn't involve any of
// the parser-pause/already-started/script-nesting flags or re-entrant
// invocations of the tokenizer. Because the intended usage of this library
// is mostly for templating, refactoring, and static-analysis libraries, we
// provide the script body as a text-node child of the <script> element.
// This behavior doesn't support document.write of partial HTML elements,
// but should be adequate for almost all other scripting support.
if (token->type == GUMBO_TOKEN_EOF) {
add_parse_error(parser, token);
parser->_parser_state->_reprocess_current_token = true;
}
pop_current_node(parser);
set_insertion_mode(parser, parser->_parser_state->_original_insertion_mode);
}
return true;
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#parsing-main-intable
static bool handle_in_table(GumboParser* parser, GumboToken* token) {
GumboParserState* state = parser->_parser_state;
if (token->type == GUMBO_TOKEN_CHARACTER ||
token->type == GUMBO_TOKEN_WHITESPACE) {
// The "pending table character tokens" list described in the spec is
// nothing more than the TextNodeBufferState. We accumulate text tokens as
// normal, except that when we go to flush them in the handle_in_table_text,
// we set _foster_parent_insertions if there're non-whitespace characters in
// the buffer.
assert(state->_text_node._buffer.length == 0);
state->_original_insertion_mode = state->_insertion_mode;
state->_reprocess_current_token = true;
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_TABLE_TEXT);
return true;
} else if (token->type == GUMBO_TOKEN_DOCTYPE) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (token->type == GUMBO_TOKEN_COMMENT) {
append_comment_node(parser, get_current_node(parser), token);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_CAPTION)) {
clear_stack_to_table_context(parser);
add_formatting_element(parser, &kActiveFormattingScopeMarker);
insert_element_from_token(parser, token);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_CAPTION);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_COLGROUP)) {
clear_stack_to_table_context(parser);
insert_element_from_token(parser, token);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_COLUMN_GROUP);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_COL)) {
clear_stack_to_table_context(parser);
insert_element_of_tag_type(
parser, GUMBO_TAG_COLGROUP, GUMBO_INSERTION_IMPLIED);
parser->_parser_state->_reprocess_current_token = true;
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_COLUMN_GROUP);
return true;
} else if (tag_in(token, kStartTag, GUMBO_TAG_TBODY, GUMBO_TAG_TFOOT,
GUMBO_TAG_THEAD, GUMBO_TAG_TD, GUMBO_TAG_TH, GUMBO_TAG_TR,
GUMBO_TAG_LAST)) {
clear_stack_to_table_context(parser);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_TABLE_BODY);
if (tag_in(token, kStartTag, GUMBO_TAG_TD, GUMBO_TAG_TH, GUMBO_TAG_TR,
GUMBO_TAG_LAST)) {
insert_element_of_tag_type(
parser, GUMBO_TAG_TBODY, GUMBO_INSERTION_IMPLIED);
state->_reprocess_current_token = true;
} else {
insert_element_from_token(parser, token);
}
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_TABLE)) {
add_parse_error(parser, token);
if (close_table(parser)) {
parser->_parser_state->_reprocess_current_token = true;
} else {
ignore_token(parser);
}
return false;
} else if (tag_is(token, kEndTag, GUMBO_TAG_TABLE)) {
if (!close_table(parser)) {
add_parse_error(parser, token);
return false;
}
return true;
} else if (tag_in(token, kEndTag, GUMBO_TAG_BODY, GUMBO_TAG_CAPTION,
GUMBO_TAG_COL, GUMBO_TAG_COLGROUP, GUMBO_TAG_HTML,
GUMBO_TAG_TBODY, GUMBO_TAG_TD, GUMBO_TAG_TFOOT,
GUMBO_TAG_TH, GUMBO_TAG_THEAD, GUMBO_TAG_TR,
GUMBO_TAG_LAST)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (tag_in(token, kStartTag, GUMBO_TAG_STYLE, GUMBO_TAG_SCRIPT,
GUMBO_TAG_LAST)) {
return handle_in_head(parser, token);
} else if (tag_is(token, kStartTag, GUMBO_TAG_INPUT) &&
attribute_matches(&token->v.start_tag.attributes,
"type", "hidden")) {
add_parse_error(parser, token);
insert_element_from_token(parser, token);
pop_current_node(parser);
return false;
} else if (tag_is(token, kStartTag, GUMBO_TAG_FORM)) {
add_parse_error(parser, token);
if (state->_form_element) {
ignore_token(parser);
return false;
}
state->_form_element = insert_element_from_token(parser, token);
pop_current_node(parser);
return false;
} else if (token->type == GUMBO_TOKEN_EOF) {
if (!node_tag_is(get_current_node(parser), GUMBO_TAG_HTML)) {
add_parse_error(parser, token);
return false;
}
return true;
} else {
add_parse_error(parser, token);
state->_foster_parent_insertions = true;
bool result = handle_in_body(parser, token);
state->_foster_parent_insertions = false;
return result;
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#parsing-main-intabletext
static bool handle_in_table_text(GumboParser* parser, GumboToken* token) {
if (token->type == GUMBO_TOKEN_NULL) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (token->type == GUMBO_TOKEN_CHARACTER ||
token->type == GUMBO_TOKEN_WHITESPACE) {
insert_text_token(parser, token);
return true;
} else {
GumboParserState* state = parser->_parser_state;
GumboStringBuffer* buffer = &state->_text_node._buffer;
// Can't use strspn for this because GumboStringBuffers are not
// null-terminated.
// Note that TextNodeBuffer may contain UTF-8 characters, but the presence
// of any one byte that is not whitespace means we flip the flag, so this
// loop is still valid.
for (int i = 0; i < buffer->length; ++i) {
if (!isspace(buffer->data[i]) || buffer->data[i] == '\v') {
state->_foster_parent_insertions = true;
reconstruct_active_formatting_elements(parser);
break;
}
}
maybe_flush_text_node_buffer(parser);
state->_foster_parent_insertions = false;
state->_reprocess_current_token = true;
state->_insertion_mode = state->_original_insertion_mode;
return true;
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#parsing-main-incaption
static bool handle_in_caption(GumboParser* parser, GumboToken* token) {
if (tag_in(token, kStartTag, GUMBO_TAG_CAPTION, GUMBO_TAG_COL,
GUMBO_TAG_COLGROUP, GUMBO_TAG_TBODY, GUMBO_TAG_TD,
GUMBO_TAG_TFOOT, GUMBO_TAG_TH, GUMBO_TAG_THEAD,
GUMBO_TAG_TR, GUMBO_TAG_LAST) ||
tag_in(token, kEndTag, GUMBO_TAG_CAPTION, GUMBO_TAG_TABLE,
GUMBO_TAG_LAST)) {
if (!has_an_element_in_table_scope(parser, GUMBO_TAG_CAPTION)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
if (!tag_is(token, kEndTag, GUMBO_TAG_CAPTION)) {
add_parse_error(parser, token);
parser->_parser_state->_reprocess_current_token = true;
}
generate_implied_end_tags(parser, GUMBO_TAG_LAST);
bool result = true;
if (!node_tag_is(get_current_node(parser), GUMBO_TAG_CAPTION)) {
add_parse_error(parser, token);
while (!node_tag_is(get_current_node(parser), GUMBO_TAG_CAPTION)) {
pop_current_node(parser);
}
result = false;
}
pop_current_node(parser); // The <caption> itself.
clear_active_formatting_elements(parser);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_TABLE);
return result;
} else if (tag_in(token, kEndTag, GUMBO_TAG_BODY, GUMBO_TAG_COL,
GUMBO_TAG_COLGROUP, GUMBO_TAG_HTML, GUMBO_TAG_TBODY,
GUMBO_TAG_TD, GUMBO_TAG_TFOOT, GUMBO_TAG_TH,
GUMBO_TAG_THEAD, GUMBO_TAG_TR, GUMBO_TAG_LAST)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else {
return handle_in_body(parser, token);
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#parsing-main-incolgroup
static bool handle_in_column_group(GumboParser* parser, GumboToken* token) {
if (token->type == GUMBO_TOKEN_WHITESPACE) {
insert_text_token(parser, token);
return true;
} else if (token->type == GUMBO_TOKEN_DOCTYPE) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (token->type == GUMBO_TOKEN_COMMENT) {
append_comment_node(parser, get_current_node(parser), token);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_HTML)) {
return handle_in_body(parser, token);
} else if (tag_is(token, kStartTag, GUMBO_TAG_COL)) {
insert_element_from_token(parser, token);
pop_current_node(parser);
acknowledge_self_closing_tag(parser);
return true;
} else if (tag_is(token, kEndTag, GUMBO_TAG_COL)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (token->type == GUMBO_TOKEN_EOF &&
get_current_node(parser) == parser->_output->root) {
return true;
} else {
if (get_current_node(parser) == parser->_output->root) {
add_parse_error(parser, token);
return false;
}
assert(node_tag_is(get_current_node(parser), GUMBO_TAG_COLGROUP));
pop_current_node(parser);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_TABLE);
if (!tag_is(token, kEndTag, GUMBO_TAG_COLGROUP)) {
parser->_parser_state->_reprocess_current_token = true;
}
return true;
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#parsing-main-intbody
static bool handle_in_table_body(GumboParser* parser, GumboToken* token) {
if (tag_is(token, kStartTag, GUMBO_TAG_TR)) {
clear_stack_to_table_body_context(parser);
insert_element_from_token(parser, token);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_ROW);
return true;
} else if (tag_in(token, kStartTag, GUMBO_TAG_TD, GUMBO_TAG_TH,
GUMBO_TAG_LAST)) {
add_parse_error(parser, token);
clear_stack_to_table_body_context(parser);
insert_element_of_tag_type(parser, GUMBO_TAG_TR, GUMBO_INSERTION_IMPLIED);
parser->_parser_state->_reprocess_current_token = true;
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_ROW);
return false;
} else if (tag_in(token, kEndTag, GUMBO_TAG_TBODY, GUMBO_TAG_TFOOT,
GUMBO_TAG_THEAD, GUMBO_TAG_LAST)) {
if (!has_an_element_in_table_scope(parser, token->v.end_tag)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
clear_stack_to_table_body_context(parser);
pop_current_node(parser);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_TABLE);
return true;
} else if (tag_in(token, kStartTag, GUMBO_TAG_CAPTION, GUMBO_TAG_COL,
GUMBO_TAG_COLGROUP, GUMBO_TAG_TBODY, GUMBO_TAG_TFOOT,
GUMBO_TAG_THEAD, GUMBO_TAG_LAST) ||
tag_is(token, kEndTag, GUMBO_TAG_TABLE)) {
if (!(has_an_element_in_table_scope(parser, GUMBO_TAG_TBODY) ||
has_an_element_in_table_scope(parser, GUMBO_TAG_THEAD) ||
has_an_element_in_table_scope(parser, GUMBO_TAG_TFOOT))) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
clear_stack_to_table_body_context(parser);
pop_current_node(parser);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_TABLE);
parser->_parser_state->_reprocess_current_token = true;
return true;
} else if (tag_in(token, kEndTag, GUMBO_TAG_BODY, GUMBO_TAG_CAPTION,
GUMBO_TAG_COL, GUMBO_TAG_TR, GUMBO_TAG_COLGROUP,
GUMBO_TAG_HTML, GUMBO_TAG_TD, GUMBO_TAG_TH, GUMBO_TAG_LAST))
{
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else {
return handle_in_table(parser, token);
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#parsing-main-intr
static bool handle_in_row(GumboParser* parser, GumboToken* token) {
if (tag_in(token, kStartTag, GUMBO_TAG_TH, GUMBO_TAG_TD, GUMBO_TAG_LAST)) {
clear_stack_to_table_row_context(parser);
insert_element_from_token(parser, token);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_CELL);
add_formatting_element(parser, &kActiveFormattingScopeMarker);
return true;
} else if (tag_in(token, kStartTag, GUMBO_TAG_CAPTION, GUMBO_TAG_COLGROUP,
GUMBO_TAG_TBODY, GUMBO_TAG_TFOOT, GUMBO_TAG_THEAD,
GUMBO_TAG_TR, GUMBO_TAG_LAST) ||
tag_in(token, kEndTag, GUMBO_TAG_TR, GUMBO_TAG_TABLE,
GUMBO_TAG_TBODY, GUMBO_TAG_TFOOT, GUMBO_TAG_THEAD,
GUMBO_TAG_LAST)) {
// This case covers 4 clauses of the spec, each of which say "Otherwise, act
// as if an end tag with the tag name "tr" had been seen." The differences
// are in error handling and whether the current token is reprocessed.
GumboTag desired_tag =
tag_in(token, kEndTag, GUMBO_TAG_TBODY, GUMBO_TAG_TFOOT,
GUMBO_TAG_THEAD, GUMBO_TAG_LAST)
? token->v.end_tag : GUMBO_TAG_TR;
if (!has_an_element_in_table_scope(parser, desired_tag)) {
gumbo_debug("Bailing because there is no tag %s in table scope.\nOpen elements:",
gumbo_normalized_tagname(desired_tag));
for (int i = 0; i < parser->_parser_state->_open_elements.length; ++i) {
const GumboNode* node = (GumboNode*)parser->_parser_state->_open_elements.data[i];
gumbo_debug("%s\n", gumbo_normalized_tagname(node->v.element.tag));
}
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
clear_stack_to_table_row_context(parser);
GumboNode* last_element = pop_current_node(parser);
assert(node_tag_is(last_element, GUMBO_TAG_TR));
AVOID_UNUSED_VARIABLE_WARNING(last_element);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_TABLE_BODY);
if (!tag_is(token, kEndTag, GUMBO_TAG_TR)) {
parser->_parser_state->_reprocess_current_token = true;
}
return true;
} else if (tag_in(token, kEndTag, GUMBO_TAG_BODY, GUMBO_TAG_CAPTION,
GUMBO_TAG_COL, GUMBO_TAG_COLGROUP, GUMBO_TAG_HTML,
GUMBO_TAG_TD, GUMBO_TAG_TH, GUMBO_TAG_LAST)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else {
return handle_in_table(parser, token);
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#parsing-main-intd
static bool handle_in_cell(GumboParser* parser, GumboToken* token) {
if (tag_in(token, kEndTag, GUMBO_TAG_TD, GUMBO_TAG_TH, GUMBO_TAG_LAST)) {
GumboTag token_tag = token->v.end_tag;
if (!has_an_element_in_table_scope(parser, token_tag)) {
add_parse_error(parser, token);
return false;
}
return close_table_cell(parser, token, token_tag);
} else if (tag_in(token, kStartTag, GUMBO_TAG_CAPTION, GUMBO_TAG_COL,
GUMBO_TAG_COLGROUP, GUMBO_TAG_TBODY, GUMBO_TAG_TD,
GUMBO_TAG_TFOOT, GUMBO_TAG_TH, GUMBO_TAG_THEAD,
GUMBO_TAG_TR, GUMBO_TAG_LAST)) {
gumbo_debug("Handling <td> in cell.\n");
if (!has_an_element_in_table_scope(parser, GUMBO_TAG_TH) &&
!has_an_element_in_table_scope(parser, GUMBO_TAG_TD)) {
gumbo_debug("Bailing out because there's no <td> or <th> in scope.\n");
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
parser->_parser_state->_reprocess_current_token = true;
return close_current_cell(parser, token);
} else if (tag_in(token, kEndTag, GUMBO_TAG_BODY, GUMBO_TAG_CAPTION,
GUMBO_TAG_COL, GUMBO_TAG_COLGROUP, GUMBO_TAG_HTML,
GUMBO_TAG_LAST)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (tag_in(token, kEndTag, GUMBO_TAG_TABLE, GUMBO_TAG_TBODY,
GUMBO_TAG_TFOOT, GUMBO_TAG_THEAD, GUMBO_TAG_TR,
GUMBO_TAG_LAST)) {
if (!has_an_element_in_table_scope(parser, token->v.end_tag)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
parser->_parser_state->_reprocess_current_token = true;
return close_current_cell(parser, token);
} else {
return handle_in_body(parser, token);
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#parsing-main-inselect
static bool handle_in_select(GumboParser* parser, GumboToken* token) {
if (token->type == GUMBO_TOKEN_NULL) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (token->type == GUMBO_TOKEN_CHARACTER ||
token->type == GUMBO_TOKEN_WHITESPACE) {
insert_text_token(parser, token);
return true;
} else if (token->type == GUMBO_TOKEN_DOCTYPE) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (token->type == GUMBO_TOKEN_COMMENT) {
append_comment_node(parser, get_current_node(parser), token);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_HTML)) {
return handle_in_body(parser, token);
} else if (tag_is(token, kStartTag, GUMBO_TAG_OPTION)) {
if (node_tag_is(get_current_node(parser), GUMBO_TAG_OPTION)) {
pop_current_node(parser);
}
insert_element_from_token(parser, token);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_OPTGROUP)) {
if (node_tag_is(get_current_node(parser), GUMBO_TAG_OPTION)) {
pop_current_node(parser);
}
if (node_tag_is(get_current_node(parser), GUMBO_TAG_OPTGROUP)) {
pop_current_node(parser);
}
insert_element_from_token(parser, token);
return true;
} else if (tag_is(token, kEndTag, GUMBO_TAG_OPTGROUP)) {
GumboVector* open_elements = &parser->_parser_state->_open_elements;
if (node_tag_is(get_current_node(parser), GUMBO_TAG_OPTION) &&
node_tag_is((GumboNode*)open_elements->data[open_elements->length - 2],
GUMBO_TAG_OPTGROUP)) {
pop_current_node(parser);
}
if (node_tag_is(get_current_node(parser), GUMBO_TAG_OPTGROUP)) {
pop_current_node(parser);
return true;
} else {
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
} else if (tag_is(token, kEndTag, GUMBO_TAG_OPTION)) {
if (node_tag_is(get_current_node(parser), GUMBO_TAG_OPTION)) {
pop_current_node(parser);
return true;
} else {
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
} else if (tag_is(token, kEndTag, GUMBO_TAG_SELECT)) {
if (!has_an_element_in_select_scope(parser, GUMBO_TAG_SELECT)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
close_current_select(parser);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_SELECT)) {
add_parse_error(parser, token);
ignore_token(parser);
close_current_select(parser);
return false;
} else if (tag_in(token, kStartTag, GUMBO_TAG_INPUT, GUMBO_TAG_KEYGEN,
GUMBO_TAG_TEXTAREA, GUMBO_TAG_LAST)) {
add_parse_error(parser, token);
if (!has_an_element_in_select_scope(parser, GUMBO_TAG_SELECT)) {
ignore_token(parser);
} else {
close_current_select(parser);
parser->_parser_state->_reprocess_current_token = true;
}
return false;
} else if (tag_is(token, kStartTag, GUMBO_TAG_SCRIPT)) {
return handle_in_head(parser, token);
} else if (token->type == GUMBO_TOKEN_EOF) {
if (get_current_node(parser) != parser->_output->root) {
add_parse_error(parser, token);
return false;
}
return true;
} else {
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#parsing-main-inselectintable
static bool handle_in_select_in_table(GumboParser* parser, GumboToken* token) {
if (tag_in(token, kStartTag, GUMBO_TAG_CAPTION, GUMBO_TAG_TABLE,
GUMBO_TAG_TBODY, GUMBO_TAG_TFOOT, GUMBO_TAG_THEAD, GUMBO_TAG_TR,
GUMBO_TAG_TD, GUMBO_TAG_TH, GUMBO_TAG_LAST)) {
add_parse_error(parser, token);
close_current_select(parser);
parser->_parser_state->_reprocess_current_token = true;
return false;
} else if (tag_in(token, kEndTag, GUMBO_TAG_CAPTION, GUMBO_TAG_TABLE,
GUMBO_TAG_TBODY, GUMBO_TAG_TFOOT, GUMBO_TAG_THEAD,
GUMBO_TAG_TR, GUMBO_TAG_TD, GUMBO_TAG_TH, GUMBO_TAG_LAST)) {
add_parse_error(parser, token);
if (has_an_element_in_table_scope(parser, token->v.end_tag)) {
close_current_select(parser);
reset_insertion_mode_appropriately(parser);
parser->_parser_state->_reprocess_current_token = true;
} else {
ignore_token(parser);
}
return false;
} else {
return handle_in_select(parser, token);
}
}
// http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#parsing-main-intemplate
static bool handle_in_template(GumboParser* parser, GumboToken* token) {
// TODO(jdtang): Implement this.
return true;
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#parsing-main-afterbody
static bool handle_after_body(GumboParser* parser, GumboToken* token) {
if (token->type == GUMBO_TOKEN_WHITESPACE ||
tag_is(token, kStartTag, GUMBO_TAG_HTML)) {
return handle_in_body(parser, token);
} else if (token->type == GUMBO_TOKEN_COMMENT) {
GumboNode* html_node = parser->_output->root;
assert(html_node != NULL);
append_comment_node(parser, html_node, token);
return true;
} else if (token->type == GUMBO_TOKEN_DOCTYPE) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (tag_is(token, kEndTag, GUMBO_TAG_HTML)) {
// TODO(jdtang): Handle fragment parsing algorithm case.
set_insertion_mode(parser, GUMBO_INSERTION_MODE_AFTER_AFTER_BODY);
GumboNode* html = (GumboNode*)parser->_parser_state->_open_elements.data[0];
assert(node_tag_is(html, GUMBO_TAG_HTML));
record_end_of_element(
parser->_parser_state->_current_token, &html->v.element);
return true;
} else if (token->type == GUMBO_TOKEN_EOF) {
return true;
} else {
add_parse_error(parser, token);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_BODY);
parser->_parser_state->_reprocess_current_token = true;
return false;
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#parsing-main-inframeset
static bool handle_in_frameset(GumboParser* parser, GumboToken* token) {
if (token->type == GUMBO_TOKEN_WHITESPACE) {
insert_text_token(parser, token);
return true;
} else if (token->type == GUMBO_TOKEN_COMMENT) {
append_comment_node(parser, get_current_node(parser), token);
return true;
} else if (token->type == GUMBO_TOKEN_DOCTYPE) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (tag_is(token, kStartTag, GUMBO_TAG_HTML)) {
return handle_in_body(parser, token);
} else if (tag_is(token, kStartTag, GUMBO_TAG_FRAMESET)) {
insert_element_from_token(parser, token);
return true;
} else if (tag_is(token, kEndTag, GUMBO_TAG_FRAMESET)) {
if (node_tag_is(get_current_node(parser), GUMBO_TAG_HTML)) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
pop_current_node(parser);
// TODO(jdtang): Add a condition to ignore this for the fragment parsing
// algorithm.
if (!node_tag_is(get_current_node(parser), GUMBO_TAG_FRAMESET)) {
set_insertion_mode(parser, GUMBO_INSERTION_MODE_AFTER_FRAMESET);
}
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_FRAME)) {
insert_element_from_token(parser, token);
pop_current_node(parser);
acknowledge_self_closing_tag(parser);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_NOFRAMES)) {
return handle_in_head(parser, token);
} else if (token->type == GUMBO_TOKEN_EOF) {
if (!node_tag_is(get_current_node(parser), GUMBO_TAG_HTML)) {
add_parse_error(parser, token);
return false;
}
return true;
} else {
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#parsing-main-afterframeset
static bool handle_after_frameset(GumboParser* parser, GumboToken* token) {
if (token->type == GUMBO_TOKEN_WHITESPACE) {
insert_text_token(parser, token);
return true;
} else if (token->type == GUMBO_TOKEN_COMMENT) {
append_comment_node(parser, get_current_node(parser), token);
return true;
} else if (token->type == GUMBO_TOKEN_DOCTYPE) {
add_parse_error(parser, token);
ignore_token(parser);
return false;
} else if (tag_is(token, kStartTag, GUMBO_TAG_HTML)) {
return handle_in_body(parser, token);
} else if (tag_is(token, kEndTag, GUMBO_TAG_HTML)) {
set_insertion_mode(parser, GUMBO_INSERTION_MODE_AFTER_AFTER_FRAMESET);
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_NOFRAMES)) {
return handle_in_head(parser, token);
} else if (token->type == GUMBO_TOKEN_EOF) {
return true;
} else {
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#the-after-after-body-insertion-mode
static bool handle_after_after_body(GumboParser* parser, GumboToken* token) {
if (token->type == GUMBO_TOKEN_COMMENT) {
append_comment_node(parser, get_document_node(parser), token);
return true;
} else if (token->type == GUMBO_TOKEN_DOCTYPE ||
token->type == GUMBO_TOKEN_WHITESPACE ||
tag_is(token, kStartTag, GUMBO_TAG_HTML)) {
return handle_in_body(parser, token);
} else if (token->type == GUMBO_TOKEN_EOF) {
return true;
} else {
add_parse_error(parser, token);
set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_BODY);
parser->_parser_state->_reprocess_current_token = true;
return false;
}
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#the-after-after-frameset-insertion-mode
static bool handle_after_after_frameset(
GumboParser* parser, GumboToken* token) {
if (token->type == GUMBO_TOKEN_COMMENT) {
append_comment_node(parser, get_document_node(parser), token);
return true;
} else if (token->type == GUMBO_TOKEN_DOCTYPE ||
token->type == GUMBO_TOKEN_WHITESPACE ||
tag_is(token, kStartTag, GUMBO_TAG_HTML)) {
return handle_in_body(parser, token);
} else if (token->type == GUMBO_TOKEN_EOF) {
return true;
} else if (tag_is(token, kStartTag, GUMBO_TAG_NOFRAMES)) {
return handle_in_head(parser, token);
} else {
add_parse_error(parser, token);
ignore_token(parser);
return false;
}
}
// Function pointers for each insertion mode. Keep in sync with
// insertion_mode.h.
typedef bool (*TokenHandler)(GumboParser* parser, GumboToken* token);
static const TokenHandler kTokenHandlers[] = {
handle_initial,
handle_before_html,
handle_before_head,
handle_in_head,
handle_in_head_noscript,
handle_after_head,
handle_in_body,
handle_text,
handle_in_table,
handle_in_table_text,
handle_in_caption,
handle_in_column_group,
handle_in_table_body,
handle_in_row,
handle_in_cell,
handle_in_select,
handle_in_select_in_table,
handle_in_template,
handle_after_body,
handle_in_frameset,
handle_after_frameset,
handle_after_after_body,
handle_after_after_frameset
};
static bool handle_html_content(GumboParser* parser, GumboToken* token) {
return kTokenHandlers[(unsigned int) parser->_parser_state->_insertion_mode](
parser, token);
}
// http://www.whatwg.org/specs/web-apps/current-work/complete/tokenization.html#parsing-main-inforeign
static bool handle_in_foreign_content(GumboParser* parser, GumboToken* token) {
switch (token->type) {
case GUMBO_TOKEN_NULL:
add_parse_error(parser, token);
token->type = GUMBO_TOKEN_CHARACTER;
token->v.character = kUtf8ReplacementChar;
insert_text_token(parser, token);
return false;
case GUMBO_TOKEN_WHITESPACE:
insert_text_token(parser, token);
return true;
case GUMBO_TOKEN_CHARACTER:
insert_text_token(parser, token);
set_frameset_not_ok(parser);
return true;
case GUMBO_TOKEN_COMMENT:
append_comment_node(parser, get_current_node(parser), token);
return true;
case GUMBO_TOKEN_DOCTYPE:
add_parse_error(parser, token);
ignore_token(parser);
return false;
default:
// Fall through to the if-statements below.
break;
}
// Order matters for these clauses.
if (tag_in(token, kStartTag, GUMBO_TAG_B, GUMBO_TAG_BIG,
GUMBO_TAG_BLOCKQUOTE, GUMBO_TAG_BODY, GUMBO_TAG_BR,
GUMBO_TAG_CENTER, GUMBO_TAG_CODE, GUMBO_TAG_DD, GUMBO_TAG_DIV,
GUMBO_TAG_DL, GUMBO_TAG_DT, GUMBO_TAG_EM, GUMBO_TAG_EMBED,
GUMBO_TAG_H1, GUMBO_TAG_H2, GUMBO_TAG_H3, GUMBO_TAG_H4,
GUMBO_TAG_H5, GUMBO_TAG_H6, GUMBO_TAG_HEAD, GUMBO_TAG_HR,
GUMBO_TAG_I, GUMBO_TAG_IMG, GUMBO_TAG_LI, GUMBO_TAG_LISTING,
GUMBO_TAG_MENU, GUMBO_TAG_META, GUMBO_TAG_NOBR, GUMBO_TAG_OL,
GUMBO_TAG_P, GUMBO_TAG_PRE, GUMBO_TAG_RUBY, GUMBO_TAG_S,
GUMBO_TAG_SMALL, GUMBO_TAG_SPAN, GUMBO_TAG_STRONG,
GUMBO_TAG_STRIKE, GUMBO_TAG_SUB, GUMBO_TAG_SUP,
GUMBO_TAG_TABLE, GUMBO_TAG_TT, GUMBO_TAG_U, GUMBO_TAG_UL,
GUMBO_TAG_VAR, GUMBO_TAG_LAST) ||
(tag_is(token, kStartTag, GUMBO_TAG_FONT) && (
token_has_attribute(token, "color") ||
token_has_attribute(token, "face") ||
token_has_attribute(token, "size")))) {
add_parse_error(parser, token);
do {
pop_current_node(parser);
} while(!(is_mathml_integration_point(get_current_node(parser)) ||
is_html_integration_point(get_current_node(parser)) ||
get_current_node(parser)->v.element.tag_namespace ==
GUMBO_NAMESPACE_HTML));
parser->_parser_state->_reprocess_current_token = true;
return false;
} else if (token->type == GUMBO_TOKEN_START_TAG) {
const GumboNamespaceEnum current_namespace =
get_current_node(parser)->v.element.tag_namespace;
if (current_namespace == GUMBO_NAMESPACE_MATHML) {
adjust_mathml_attributes(parser, token);
}
if (current_namespace == GUMBO_NAMESPACE_SVG) {
// Tag adjustment is left to the gumbo_normalize_svg_tagname helper
// function.
adjust_svg_attributes(parser, token);
}
adjust_foreign_attributes(parser, token);
insert_foreign_element(parser, token, current_namespace);
if (token->v.start_tag.is_self_closing) {
pop_current_node(parser);
acknowledge_self_closing_tag(parser);
}
return true;
// </script> tags are handled like any other end tag, putting the script's
// text into a text node child and closing the current node.
} else {
assert(token->type == GUMBO_TOKEN_END_TAG);
GumboNode* node = get_current_node(parser);
assert(node != NULL);
GumboStringPiece token_tagname = token->original_text;
GumboStringPiece node_tagname = node->v.element.original_tag;
gumbo_tag_from_original_text(&token_tagname);
gumbo_tag_from_original_text(&node_tagname);
bool is_success = true;
if (!gumbo_string_equals_ignore_case(&node_tagname, &token_tagname)) {
add_parse_error(parser, token);
is_success = false;
}
int i = parser->_parser_state->_open_elements.length;
for( --i; i > 0; ) {
// Here we move up the stack until we find an HTML element (in which
// case we do nothing) or we find the element that we're about to
// close (in which case we pop everything we've seen until that
// point.)
gumbo_debug("Foreign %.*s node at %d.\n", node_tagname.length,
node_tagname.data, i);
if (gumbo_string_equals_ignore_case(&node_tagname, &token_tagname)) {
gumbo_debug("Matches.\n");
while (pop_current_node(parser) != node) {
// Pop all the nodes below the current one. Node is guaranteed to
// be an element on the stack of open elements (set below), so
// this loop is guaranteed to terminate.
}
return is_success;
}
--i;
node = (GumboNode*)parser->_parser_state->_open_elements.data[i];
if (node->v.element.tag_namespace == GUMBO_NAMESPACE_HTML) {
// Must break before gumbo_tag_from_original_text to avoid passing
// parser-inserted nodes through.
break;
}
node_tagname = node->v.element.original_tag;
gumbo_tag_from_original_text(&node_tagname);
}
assert(node->v.element.tag_namespace == GUMBO_NAMESPACE_HTML);
// We can't call handle_token directly because the current node is still in
// the SVG namespace, so it would re-enter this and result in infinite
// recursion.
return handle_html_content(parser, token) && is_success;
}
}
// http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#tree-construction
static bool handle_token(GumboParser* parser, GumboToken* token) {
if (parser->_parser_state->_ignore_next_linefeed &&
token->type == GUMBO_TOKEN_WHITESPACE && token->v.character == '\n') {
parser->_parser_state->_ignore_next_linefeed = false;
ignore_token(parser);
return true;
}
// This needs to be reset both here and in the conditional above to catch both
// the case where the next token is not whitespace (so we don't ignore
// whitespace in the middle of <pre> tags) and where there are multiple
// whitespace tokens (so we don't ignore the second one).
parser->_parser_state->_ignore_next_linefeed = false;
if (tag_is(token, kEndTag, GUMBO_TAG_BODY)) {
parser->_parser_state->_closed_body_tag = true;
}
if (tag_is(token, kEndTag, GUMBO_TAG_HTML)) {
parser->_parser_state->_closed_html_tag = true;
}
const GumboNode* current_node = get_current_node(parser);
assert(!current_node || current_node->type == GUMBO_NODE_ELEMENT);
if (current_node) {
gumbo_debug("Current node: <%s>.\n",
gumbo_normalized_tagname(current_node->v.element.tag));
}
if (!current_node ||
current_node->v.element.tag_namespace == GUMBO_NAMESPACE_HTML ||
(is_mathml_integration_point(current_node) &&
(token->type == GUMBO_TOKEN_CHARACTER ||
token->type == GUMBO_TOKEN_WHITESPACE ||
token->type == GUMBO_TOKEN_NULL ||
(token->type == GUMBO_TOKEN_START_TAG &&
!tag_in(token, kStartTag, GUMBO_TAG_MGLYPH, GUMBO_TAG_MALIGNMARK,
GUMBO_TAG_LAST)))) ||
(current_node->v.element.tag_namespace == GUMBO_NAMESPACE_MATHML &&
node_tag_is(current_node, GUMBO_TAG_ANNOTATION_XML) &&
tag_is(token, kStartTag, GUMBO_TAG_SVG)) ||
(is_html_integration_point(current_node) && (
token->type == GUMBO_TOKEN_START_TAG ||
token->type == GUMBO_TOKEN_CHARACTER ||
token->type == GUMBO_TOKEN_NULL ||
token->type == GUMBO_TOKEN_WHITESPACE)) ||
token->type == GUMBO_TOKEN_EOF) {
return handle_html_content(parser, token);
} else {
return handle_in_foreign_content(parser, token);
}
}
GumboOutput* gumbo_parse(const char* buffer) {
return gumbo_parse_with_options(
&kGumboDefaultOptions, buffer, strlen(buffer));
}
GumboOutput* gumbo_parse_with_options(
const GumboOptions* options, const char* buffer, size_t length) {
GumboParser parser;
parser._options = options;
output_init(&parser);
gumbo_tokenizer_state_init(&parser, buffer, length);
parser_state_init(&parser);
GumboParserState* state = parser._parser_state;
gumbo_debug("Parsing %.*s.\n", length, buffer);
// Sanity check so that infinite loops die with an assertion failure instead
// of hanging the process before we ever get an error.
int loop_count = 0;
GumboToken token;
token.type = GUMBO_TOKEN_NULL;
bool has_error = false;
do {
if (state->_reprocess_current_token) {
state->_reprocess_current_token = false;
} else {
GumboNode* current_node = get_current_node(&parser);
gumbo_tokenizer_set_is_current_node_foreign(
&parser, current_node &&
current_node->v.element.tag_namespace != GUMBO_NAMESPACE_HTML);
has_error = !gumbo_lex(&parser, &token) || has_error;
}
const char* token_type = "text";
switch (token.type) {
case GUMBO_TOKEN_DOCTYPE:
token_type = "doctype";
break;
case GUMBO_TOKEN_START_TAG:
token_type = gumbo_normalized_tagname(token.v.start_tag.tag);
break;
case GUMBO_TOKEN_END_TAG:
token_type = gumbo_normalized_tagname(token.v.end_tag);
break;
case GUMBO_TOKEN_COMMENT:
token_type = "comment";
break;
default:
break;
}
gumbo_debug("Handling %s token @%d:%d in state %d.\n",
(char*) token_type, token.position.line, token.position.column,
state->_insertion_mode);
state->_current_token = &token;
state->_self_closing_flag_acknowledged =
!(token.type == GUMBO_TOKEN_START_TAG &&
token.v.start_tag.is_self_closing);
has_error = !handle_token(&parser, &token) || has_error;
// Check for memory leaks when ownership is transferred from start tag
// tokens to nodes.
assert(state->_reprocess_current_token ||
token.type != GUMBO_TOKEN_START_TAG ||
token.v.start_tag.attributes.data == NULL);
if (!state->_self_closing_flag_acknowledged) {
GumboError* error = add_parse_error(&parser, &token);
if (error) {
error->type = GUMBO_ERR_UNACKNOWLEDGED_SELF_CLOSING_TAG;
}
}
++loop_count;
assert(loop_count < 1000000000);
} while ((token.type != GUMBO_TOKEN_EOF || state->_reprocess_current_token) &&
!(options->stop_on_first_error && has_error));
finish_parsing(&parser);
// For API uniformity reasons, if the doctype still has nulls, convert them to
// empty strings.
GumboDocument* doc_type = &parser._output->document->v.document;
if (doc_type->name == NULL) {
doc_type->name = gumbo_copy_stringz(&parser, "");
}
if (doc_type->public_identifier == NULL) {
doc_type->public_identifier = gumbo_copy_stringz(&parser, "");
}
if (doc_type->system_identifier == NULL) {
doc_type->system_identifier = gumbo_copy_stringz(&parser, "");
}
parser_state_destroy(&parser);
gumbo_tokenizer_state_destroy(&parser);
return parser._output;
}
void gumbo_destroy_node(GumboOptions* options, GumboNode* node) {
// Need a dummy GumboParser because the allocator comes along with the
// options object.
GumboParser parser;
parser._options = options;
destroy_node(&parser, node);
}
void gumbo_destroy_output(const GumboOptions* options, GumboOutput* output) {
// Need a dummy GumboParser because the allocator comes along with the
// options object.
GumboParser parser;
parser._options = options;
destroy_node(&parser, output->document);
for (int i = 0; i < output->errors.length; ++i) {
gumbo_error_destroy(&parser, (GumboError*)output->errors.data[i]);
}
gumbo_vector_destroy(&parser, &output->errors);
gumbo_parser_deallocate(&parser, output);
}
| 42.269612 | 141 | 0.712619 | [
"object",
"vector"
] |
fc86dd0cb320c80fcb381cccaa4885790a749d8a | 157,149 | cpp | C++ | admin/darwin/src/msitools/patchwiz/msistuff.cpp | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | admin/darwin/src/msitools/patchwiz/msistuff.cpp | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | admin/darwin/src/msitools/patchwiz/msistuff.cpp | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z | //+-------------------------------------------------------------------------
//
// Microsoft Windows
//
// Copyright (C) Microsoft Corporation, 1999-2000
//
//--------------------------------------------------------------------------
/* MSISTUFF.CPP -- MSI stuff */
#pragma warning (disable:4553)
#include "patchdll.h"
EnableAsserts
#define iSchemaMin 0
#define iSchemaMax 1
enum pteEnum // Patch table enum
{
pteFirstEnum,
ptePatch,
ptePatchPackage,
pteMsiPatchHeaders,
pteNextEnum
};
int iOrderMax = 0;
static BOOL g_fValidateProductCodeIncluded = FALSE;
static BOOL FValidSummInfoVersion ( LPTSTR szPcp, INT iMin, INT iMax );
static BOOL FValidateInputMsiSchema ( MSIHANDLE hdb );
static BOOL FAddColumnToTable ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szColumn, BOOL fSz, BOOL fTemporary );
/* ********************************************************************** */
UINT UiOpenInputPcp ( LPTSTR szPcpPath, LPTSTR szTempFldrBuf, LPTSTR szTempFName, MSIHANDLE* phdbInput )
{
Assert(!FEmptySz(szPcpPath));
TCHAR rgchPcpPath[MAX_PATH];
EvalAssert( FFixupPathEx(szPcpPath, rgchPcpPath) );
Assert(FFileExist(rgchPcpPath));
Assert(!FEmptySz(szTempFldrBuf));
Assert(szTempFName != szNull);
Assert(phdbInput != NULL);
*phdbInput = NULL;
if (FEmptySz(rgchPcpPath) || !FFileExist(rgchPcpPath))
return (UiLogError(ERROR_PCW_PCP_DOESNT_EXIST, rgchPcpPath, NULL));
lstrcpy(szTempFName, TEXT("inputcpy.pcp"));
if (FFileExist(szTempFldrBuf))
SetFileAttributes(szTempFldrBuf, FILE_ATTRIBUTE_NORMAL);
EvalAssert( CopyFile(rgchPcpPath, szTempFldrBuf, fFalse) );
// CopyFile preserves FILE_ATTRIBUTE_READONLY so we'll remove it from our copy
SetFileAttributes(szTempFldrBuf, FILE_ATTRIBUTE_NORMAL);
if (!FValidSummInfoVersion(szTempFldrBuf, iSchemaMin, iSchemaMax))
return (UiLogError(ERROR_PCW_PCP_BAD_FORMAT, rgchPcpPath, NULL));
MSIHANDLE hdb;
UINT ui = MsiOpenDatabase(szTempFldrBuf, MSIDBOPEN_DIRECT, &hdb);
if (ui != MSI_OKAY)
return (UiLogError(ERROR_PCW_PCP_BAD_FORMAT, rgchPcpPath, NULL));
#define STRING fTrue
#define INTEGER fFalse
#define TEMPORARY fTrue
#define PERSIST fFalse
if (!FValidateInputMsiSchema(hdb)
|| !FAddColumnToTable(hdb, TEXT("`UpgradedImages`"), TEXT("`LFN`"), STRING, PERSIST)
|| !FAddColumnToTable(hdb, TEXT("`UpgradedImages`"), TEXT("`ProductCode`"), STRING, PERSIST)
|| !FAddColumnToTable(hdb, TEXT("`UpgradedImages`"), TEXT("`ProductVersion`"), STRING, PERSIST)
|| !FAddColumnToTable(hdb, TEXT("`UpgradedImages`"), TEXT("`UpgradeCode`"), STRING, PERSIST)
|| !FAddColumnToTable(hdb, TEXT("`UpgradedImages`"), TEXT("`PackageCode`"), STRING, PERSIST)
|| !FAddColumnToTable(hdb, TEXT("`UpgradedImages`"), TEXT("`SummSubject`"), STRING, PERSIST)
|| !FAddColumnToTable(hdb, TEXT("`UpgradedImages`"), TEXT("`SummComments`"), STRING, PERSIST)
|| !FAddColumnToTable(hdb, TEXT("`TargetImages`"), TEXT("`LFN`"), STRING, PERSIST)
|| !FAddColumnToTable(hdb, TEXT("`TargetImages`"), TEXT("`ProductCode`"), STRING, PERSIST)
|| !FAddColumnToTable(hdb, TEXT("`TargetImages`"), TEXT("`ProductVersion`"), STRING, PERSIST)
|| !FAddColumnToTable(hdb, TEXT("`TargetImages`"), TEXT("`UpgradeCode`"), STRING, PERSIST)
|| !FAddColumnToTable(hdb, TEXT("`TargetImages`"), TEXT("`PackageCode`"), STRING, PERSIST)
|| !FAddColumnToTable(hdb, TEXT("`TargetImages`"), TEXT("`Family`"), STRING, TEMPORARY)
|| !FAddColumnToTable(hdb, TEXT("`TargetImages`"), TEXT("`MsiPathUpgradedCopy`"), STRING, TEMPORARY)
|| !FAddColumnToTable(hdb, TEXT("`TargetImages`"), TEXT("`Attributes`"), INTEGER, TEMPORARY)
|| !FAddColumnToTable(hdb, TEXT("`FamilyFileRanges`"), TEXT("`RetainCount`"), INTEGER, TEMPORARY)
|| !FAddColumnToTable(hdb, TEXT("`ExternalFiles`"), TEXT("`IgnoreCount`"), INTEGER, TEMPORARY)
|| !FAddColumnToTable(hdb, TEXT("`TargetFiles_OptionalData`"), TEXT("`IgnoreCount`"), INTEGER, TEMPORARY)
|| !FExecSqlCmd(hdb, TEXT("CREATE TABLE `NewSequenceNums` ( `Family` CHAR(13) NOT NULL, `FTK` CHAR(128) NOT NULL, `SequenceNum` INTEGER NOT NULL PRIMARY KEY `Family`, `FTK` )"))
|| !FExecSqlCmd(hdb, TEXT("CREATE TABLE `TempPackCodes` ( `PackCode` CHAR(63) NOT NULL PRIMARY KEY `PackCode` )"))
|| !FExecSqlCmd(hdb, TEXT("CREATE TABLE `TempImageNames` ( `ImageName` CHAR(63) NOT NULL PRIMARY KEY `ImageName` )"))
)
{
MsiCloseHandle(hdb);
return (UiLogError(ERROR_PCW_PCP_BAD_FORMAT, szTempFldrBuf, NULL));
}
*phdbInput = hdb;
return (ERROR_SUCCESS);
}
/* ********************************************************************** */
static BOOL FValidSummInfoVersion ( LPTSTR szPcp, INT iMin, INT iMax )
{
Assert(!FEmptySz(szPcp));
Assert(FFileExist(szPcp));
Assert(iMin >= 0);
Assert(iMin <= iMax);
MSIHANDLE hSummaryInfo = NULL;
UINT uiRet = MsiGetSummaryInformation(NULL, szPcp, 0, &hSummaryInfo);
if (uiRet != MSI_OKAY || hSummaryInfo == NULL)
return (fFalse);
UINT uiType;
INT intRet;
uiRet = MsiSummaryInfoGetProperty(hSummaryInfo, PID_PAGECOUNT, &uiType, &intRet, NULL, NULL, NULL);
if (uiRet != MSI_OKAY || (uiType != VT_I4 && uiType != VT_EMPTY))
return (fFalse);
if (uiType == VT_EMPTY)
intRet = 0;
EvalAssert( MsiCloseHandle(hSummaryInfo) == MSI_OKAY );
return (intRet >= iMin && intRet <= iMax);
}
/* ********************************************************************** */
static BOOL FAddColumnToTable ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szColumn, BOOL fSz, BOOL fTemporary )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(!FEmptySz(szColumn));
TCHAR rgchQuery[MAX_PATH];
StringCchPrintf(rgchQuery, sizeof(rgchQuery)/sizeof(TCHAR), TEXT("ALTER TABLE %s ADD %s %s"), szTable, szColumn, (fSz) ? TEXT("CHAR(32)") : TEXT("INTEGER"));
// if (fTemporary)
// lstrcat(rgchQuery, TEXT(" TEMPORARY"));
MSIHANDLE hview = NULL;
if (MsiDatabaseOpenView(hdb, rgchQuery, &hview) != MSI_OKAY)
{
AssertFalse();
return (fFalse);
}
UINT ids = MsiViewExecute(hview, 0);
EvalAssert(MsiCloseHandle(hview) == MSI_OKAY); /* calls MsiViewClose() internally */
Assert(ids == IDS_OKAY);
return (ids == IDS_OKAY);
}
/* Generic Table stuff */
/* return value does NOT include terminating null; zero if error */
/* ********************************************************************** */
UINT CchMsiTableString ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szPKey, LPTSTR szFieldName, LPTSTR szPKeyValue )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(!FEmptySz(szPKey));
Assert(!FEmptySz(szFieldName));
Assert(!FEmptySz(szPKeyValue));
const TCHAR szWhereSzPattern[] = TEXT("%s = '%s'");
UINT cchQuery = 0;
cchQuery = lstrlen(szWhereSzPattern) + lstrlen(szPKey) + lstrlen(szPKeyValue) + 1;
LPTSTR rgchWhere = (LPTSTR)LocalAlloc(LPTR, cchQuery * sizeof(TCHAR));
if (!rgchWhere)
return IDS_OOM;
// don't use StringCchPrintf because of 1024 buffer length limitation
lstrcpy(rgchWhere, szPKey);
lstrcat(rgchWhere, TEXT(" = '"));
lstrcat(rgchWhere, szPKeyValue);
lstrcat(rgchWhere, TEXT("'"));
UINT idsRet = CchMsiTableStringWhere(hdb, szTable, szFieldName, rgchWhere);
EvalAssert( NULL == LocalFree((HLOCAL)rgchWhere) );
return (idsRet);
}
/* return value does NOT include terminating null; zero if error */
/* ********************************************************************** */
UINT CchMsiTableStringWhere ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szFieldName, LPTSTR szWhere )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(!FEmptySz(szFieldName));
Assert(!FEmptySz(szWhere));
UINT cchBufNeeded = 0;
static const TCHAR szSelectWherePattern[] = TEXT("SELECT %s FROM %s WHERE %s");
UINT cchQuery = 0;
cchQuery = lstrlen(szSelectWherePattern) + lstrlen(szTable) + lstrlen(szFieldName) + lstrlen(szWhere) + 1;
LPTSTR rgchQuery = (LPTSTR)LocalAlloc(LPTR, cchQuery * sizeof(TCHAR));
if (!rgchQuery)
return IDS_OOM;
// don't use StringCchPrintf because of 1024 buffer length limitation
lstrcpy(rgchQuery, TEXT("SELECT "));
lstrcat(rgchQuery, szFieldName);
lstrcat(rgchQuery, TEXT(" FROM "));
lstrcat(rgchQuery, szTable);
lstrcat(rgchQuery, TEXT(" WHERE "));
lstrcat(rgchQuery, szWhere);
MSIHANDLE hview = NULL;
MSIHANDLE hrec = NULL;
if (MsiDatabaseOpenView(hdb, rgchQuery, &hview) != MSI_OKAY)
goto LEarlyReturn;
if (MsiViewExecute(hview, 0) != MSI_OKAY)
goto LEarlyReturn;
UINT uiRet;
uiRet = MsiViewFetch(hview, &hrec);
if (uiRet == ERROR_NO_MORE_ITEMS)
goto LEarlyReturn;
else if (uiRet != MSI_OKAY)
goto LEarlyReturn;
TCHAR rgchBuf[1];
DWORD dwcch;
dwcch = 0;
uiRet = MsiRecordGetString(hrec, 1, rgchBuf, &dwcch);
Assert(uiRet != MSI_OKAY);
if (uiRet == ERROR_MORE_DATA)
{
Assert(dwcch < 50*1024);
cchBufNeeded = (UINT)dwcch;
}
LEarlyReturn:
if (hrec != NULL)
EvalAssert(MsiCloseHandle(hrec) == MSI_OKAY);
if (hview != NULL)
EvalAssert(MsiCloseHandle(hview) == MSI_OKAY); /* calls MsiViewClose() internally */
EvalAssert( NULL == LocalFree((HLOCAL)rgchQuery) );
return (cchBufNeeded);
}
/* ********************************************************************** */
UINT IdsMsiGetTableString ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szPKey, LPTSTR szFieldName, LPTSTR szPKeyValue, LPTSTR szBuf, UINT cch )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(!FEmptySz(szPKey));
Assert(!FEmptySz(szFieldName));
Assert(!FEmptySz(szPKeyValue));
Assert(szBuf != szNull);
Assert(cch > 1);
const TCHAR szWhereSzPattern[] = TEXT("%s = '%s'");
UINT cchQuery = 0;
cchQuery = lstrlen(szWhereSzPattern) + lstrlen(szPKey) + lstrlen(szPKeyValue) + 1;
LPTSTR rgchWhere = (LPTSTR)LocalAlloc(LPTR, cchQuery * sizeof(TCHAR));
if (!rgchWhere)
return IDS_OOM;
// don't use StringCchPrintf because of 1024 buffer length limitation
lstrcpy(rgchWhere, szPKey);
lstrcat(rgchWhere, TEXT(" = '"));
lstrcat(rgchWhere, szPKeyValue);
lstrcat(rgchWhere, TEXT("'"));
UINT idsRet = IdsMsiGetTableStringWhere(hdb, szTable, szFieldName, rgchWhere, szBuf, cch);
EvalAssert( NULL == LocalFree((HLOCAL)rgchWhere) );
return (idsRet);
}
/* ********************************************************************** */
UINT IdsMsiGetTableStringWhere ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szFieldName, LPTSTR szWhere, LPTSTR szBuf, UINT cch )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(!FEmptySz(szFieldName));
Assert(!FEmptySz(szWhere));
Assert(szBuf != szNull);
Assert(cch > 1);
*szBuf = TEXT('\0');
UINT idsRet = IDS_OKAY;
const TCHAR szSelectWherePattern[] = TEXT("SELECT %s FROM %s WHERE %s");
UINT cchQuery = 0;
cchQuery = lstrlen(szSelectWherePattern) + lstrlen(szFieldName) + lstrlen(szTable) + lstrlen(szWhere) + 1;
LPTSTR rgchQuery = (LPTSTR)LocalAlloc(LPTR, cchQuery * sizeof(TCHAR));
if (!rgchQuery)
return IDS_OOM;
// don't use StringCchPrintf because of 1024 buffer length limitation
lstrcpy(rgchQuery, TEXT("SELECT "));
lstrcat(rgchQuery, szFieldName);
lstrcat(rgchQuery, TEXT(" FROM "));
lstrcat(rgchQuery, szTable);
lstrcat(rgchQuery, TEXT(" WHERE "));
lstrcat(rgchQuery, szWhere);
MSIHANDLE hview = NULL;
MSIHANDLE hrec = NULL;
if (MsiDatabaseOpenView(hdb, rgchQuery, &hview) != MSI_OKAY)
{
idsRet = IDS_CANT_OPEN_VIEW;
goto LEarlyReturn;
}
if (MsiViewExecute(hview, 0) != MSI_OKAY)
{
idsRet = IDS_CANT_EXECUTE_VIEW;
goto LEarlyReturn;
}
UINT uiRet;
uiRet = MsiViewFetch(hview, &hrec);
if (uiRet == ERROR_NO_MORE_ITEMS)
goto LEarlyReturn;
else if (uiRet != MSI_OKAY)
{
idsRet = IDS_CANT_FETCH_RECORD;
goto LEarlyReturn;
}
DWORD dwcch;
dwcch = (DWORD)cch;
uiRet = MsiRecordGetString(hrec, 1, szBuf, &dwcch);
if (uiRet == ERROR_MORE_DATA)
idsRet = IDS_BUFFER_IS_TOO_SHORT;
else if (uiRet != MSI_OKAY)
idsRet = IDS_CANT_GET_RECORD_FIELD;
LEarlyReturn:
if (hrec != NULL)
EvalAssert(MsiCloseHandle(hrec) == MSI_OKAY);
if (hview != NULL)
EvalAssert(MsiCloseHandle(hview) == MSI_OKAY); /* calls MsiViewClose() internally */
EvalAssert( NULL == LocalFree((HLOCAL)rgchQuery) );
return (idsRet);
}
/* ********************************************************************** */
UINT IdsMsiGetTableInteger ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szPKey, LPTSTR szFieldName, LPTSTR szPKeyValue, int * pi )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(!FEmptySz(szPKey));
Assert(!FEmptySz(szFieldName));
Assert(!FEmptySz(szPKeyValue));
Assert(pi != NULL);
const TCHAR szWherePattern[] = TEXT("%s = '%s'");
UINT cchQuery = 0;
cchQuery = lstrlen(szWherePattern) + lstrlen(szPKey) + lstrlen(szPKeyValue) + 1;
LPTSTR rgchWhere = (LPTSTR)LocalAlloc(LPTR, cchQuery * sizeof(TCHAR));
if (!rgchWhere)
return IDS_OOM;
// don't use StringCchPrintf due to 1024 buffer limitation
lstrcpy(rgchWhere, szPKey);
lstrcat(rgchWhere, TEXT(" = '"));
lstrcat(rgchWhere, szPKeyValue);
lstrcat(rgchWhere, TEXT("'"));
UINT idsRet = IdsMsiGetTableIntegerWhere(hdb, szTable, szFieldName, rgchWhere, pi);
EvalAssert( NULL == LocalFree((HLOCAL)rgchWhere) );
return (idsRet);
}
/* ********************************************************************** */
UINT IdsMsiGetTableIntegerWhere ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szFieldName, LPTSTR szWhere, int * pi )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(!FEmptySz(szFieldName));
Assert(!FEmptySz(szWhere));
Assert(pi != NULL);
*pi = 0;
UINT idsRet = IDS_OKAY;
const TCHAR szSelectQuery[] = TEXT("SELECT %s FROM %s WHERE %s");
UINT cchQuery = 0;
cchQuery = lstrlen(szSelectQuery) + lstrlen(szFieldName) + lstrlen(szTable) + lstrlen(szWhere) + 1;
LPTSTR rgchQuery = (LPTSTR)LocalAlloc(LPTR, cchQuery * sizeof(TCHAR));
if (!rgchQuery)
return IDS_OOM;
// don't use StringCchPrintf due to 1024 buffer limitation
lstrcpy(rgchQuery, TEXT("SELECT "));
lstrcat(rgchQuery, szFieldName);
lstrcat(rgchQuery, TEXT(" FROM "));
lstrcat(rgchQuery, szTable);
lstrcat(rgchQuery, TEXT(" WHERE "));
lstrcat(rgchQuery, szWhere);
MSIHANDLE hview = NULL;
MSIHANDLE hrec = NULL;
if (MsiDatabaseOpenView(hdb, rgchQuery, &hview) != MSI_OKAY)
{
idsRet = IDS_CANT_OPEN_VIEW;
goto LEarlyReturn;
}
if (MsiViewExecute(hview, 0) != MSI_OKAY)
{
idsRet = IDS_CANT_EXECUTE_VIEW;
goto LEarlyReturn;
}
UINT uiRet;
uiRet = MsiViewFetch(hview, &hrec);
if (uiRet == ERROR_NO_MORE_ITEMS)
goto LEarlyReturn;
else if (uiRet != MSI_OKAY)
{
idsRet = IDS_CANT_FETCH_RECORD;
goto LEarlyReturn;
}
*pi = MsiRecordGetInteger(hrec, 1);
LEarlyReturn:
if (hrec != NULL)
EvalAssert(MsiCloseHandle(hrec) == MSI_OKAY);
if (hview != NULL)
EvalAssert(MsiCloseHandle(hview) == MSI_OKAY); /* calls MsiViewClose() internally */
EvalAssert( NULL == LocalFree((HLOCAL)rgchQuery) );
return (idsRet);
}
/* ********************************************************************** */
UINT IdsMsiSetTableRecordWhere ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szFields, LPTSTR szWhere, MSIHANDLE hrec )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(!FEmptySz(szFields));
Assert(!FEmptySz(szWhere));
Assert(hrec != NULL);
UINT idsRet = IDS_OKAY;
const TCHAR szSelectQuery[] = TEXT("SELECT %s FROM %s WHERE %s");
UINT cchQuery = 0;
cchQuery = lstrlen(szSelectQuery) + lstrlen(szFields)+ lstrlen(szTable) + lstrlen(szWhere) + 1;
LPTSTR rgchQuery = (LPTSTR)LocalAlloc(LPTR, cchQuery * sizeof(TCHAR));
if (!rgchQuery)
return IDS_OOM;
// avoid StringCchPrintf due to 1024 limitation
lstrcpy(rgchQuery, TEXT("SELECT "));
lstrcat(rgchQuery, szFields);
lstrcat(rgchQuery, TEXT(" FROM "));
lstrcat(rgchQuery, szTable);
lstrcat(rgchQuery, TEXT(" WHERE "));
lstrcat(rgchQuery, szWhere);
MSIHANDLE hview = NULL;
if (MsiDatabaseOpenView(hdb, rgchQuery, &hview) != MSI_OKAY)
{
idsRet = IDS_CANT_OPEN_VIEW;
goto LEarlyReturn;
}
if (MsiViewExecute(hview, 0) != MSI_OKAY)
{
idsRet = IDS_CANT_EXECUTE_VIEW;
goto LEarlyReturn;
}
if (MsiViewModify(hview, MSIMODIFY_ASSIGN, hrec) != MSI_OKAY)
idsRet = IDS_CANT_ASSIGN_RECORD_IN_VIEW;
LEarlyReturn:
if (hrec != NULL)
EvalAssert(MsiCloseHandle(hrec) == MSI_OKAY);
if (hview != NULL)
EvalAssert(MsiCloseHandle(hview) == MSI_OKAY); /* calls MsiViewClose() internally */
EvalAssert( NULL == LocalFree((HLOCAL)rgchQuery) );
return (idsRet);
}
/* ********************************************************************** */
UINT IdsMsiSetTableRecord ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szFields, LPTSTR szPrimaryField, LPTSTR szKey, MSIHANDLE hrec )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(!FEmptySz(szFields));
Assert(!FEmptySz(szPrimaryField));
Assert(!FEmptySz(szKey));
Assert(hrec != NULL);
const TCHAR szWherePattern[] = TEXT("%s = '%s'");
UINT cchWhere = 0;
cchWhere = lstrlen(szWherePattern) + lstrlen(szPrimaryField) + lstrlen(szKey) + 1;
LPTSTR rgchWhere = (LPTSTR)LocalAlloc(LPTR, cchWhere * sizeof(TCHAR));
if (!rgchWhere)
return IDS_OOM;
// avoid StringCchPrintf due to 1024 limitation
lstrcpy(rgchWhere, szPrimaryField);
lstrcat(rgchWhere, TEXT(" = '"));
lstrcat(rgchWhere, szKey);
lstrcat(rgchWhere, TEXT("'"));
UINT idsRet = IdsMsiSetTableRecordWhere(hdb, szTable, szFields, rgchWhere, hrec);
EvalAssert( NULL == LocalFree((HLOCAL)rgchWhere) );
return (idsRet);
}
/* ********************************************************************** */
UINT IdsMsiUpdateTableRecordSz ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szField, LPTSTR szValue, LPTSTR szPKeyField, LPTSTR szPKeyValue )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(*szTable != TEXT('`'));
Assert(!FEmptySz(szField));
Assert(*szField != TEXT('`'));
Assert(szValue != szNull);
Assert(!FEmptySz(szPKeyField));
Assert(*szPKeyField != TEXT('`'));
Assert(!FEmptySz(szPKeyValue));
UINT cchQuery;
// keep szUpdateSQLPatern for easy understanding of the SQL statement
static const TCHAR szUpdateSQLPatern[] = TEXT("UPDATE `%s` SET `%s` = '%s' WHERE `%s` = '%s'");
// TCHAR rgchQuery[MAX_PATH];
cchQuery = lstrlen(szUpdateSQLPatern) +
(szTable ? lstrlen(szTable) : 0) +
(szField ? lstrlen(szField) : 0) +
(szValue ? lstrlen(szValue) : 0) +
(szPKeyField ? lstrlen(szPKeyField) : 0) +
(szPKeyValue ? lstrlen(szPKeyValue) : 0) + 1;
LPTSTR rgchQuery = (LPTSTR)LocalAlloc(LPTR, cchQuery * sizeof(TCHAR));
if (!rgchQuery)
return IDS_OOM;
// don't use StringCchPrintf because of 1024 buffer length limitation
lstrcpy(rgchQuery, TEXT("UPDATE `"));
lstrcat(rgchQuery, szTable);
lstrcat(rgchQuery, TEXT("` SET `"));
lstrcat(rgchQuery, szField);
lstrcat(rgchQuery, TEXT("` = '"));
lstrcat(rgchQuery, szValue);
lstrcat(rgchQuery, TEXT("' WHERE `"));
lstrcat(rgchQuery, szPKeyField);
lstrcat(rgchQuery, TEXT("` = '"));
lstrcat(rgchQuery, szPKeyValue);
lstrcat(rgchQuery, TEXT("'"));
UINT idsRet = IDS_OKAY;
MSIHANDLE hview = NULL;
if (MsiDatabaseOpenView(hdb, rgchQuery, &hview) != MSI_OKAY)
{
Assert(hview == NULL);
idsRet = IDS_CANT_OPEN_VIEW;
}
if (hview != NULL && MsiViewExecute(hview, 0) != MSI_OKAY)
idsRet = IDS_CANT_EXECUTE_VIEW;
if (hview != NULL)
EvalAssert(MsiCloseHandle(hview) == MSI_OKAY); /* calls MsiViewClose() internally */
EvalAssert( NULL == LocalFree((HLOCAL)rgchQuery) );
return (idsRet);
}
/* ********************************************************************** */
UINT IdsMsiUpdateTableRecordInt ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szField, int iValue, LPTSTR szPKeyField, LPTSTR szPKeyValue )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(*szTable != TEXT('`'));
Assert(!FEmptySz(szField));
Assert(*szField != TEXT('`'));
Assert(!FEmptySz(szPKeyField));
Assert(*szPKeyField != TEXT('`'));
Assert(!FEmptySz(szPKeyValue));
const TCHAR szUpdatePattern[] = TEXT("UPDATE `%s` SET `%s` = %d WHERE `%s` = '%s'");
UINT cchQuery = 0;
TCHAR szInt[32] = {0};
StringCchPrintf(szInt, sizeof(szInt)/sizeof(TCHAR), TEXT("%d"), iValue);
cchQuery = lstrlen(szUpdatePattern) + lstrlen(szTable) + lstrlen(szField) + lstrlen(szInt) + lstrlen(szPKeyField) + lstrlen(szPKeyValue) + 1;
LPTSTR rgchQuery = (LPTSTR)LocalAlloc(LPTR, cchQuery * sizeof(TCHAR));
if (!rgchQuery)
return IDS_OOM;
// avoid StringCchPrintf due to 1024 buffer limitation
lstrcpy(rgchQuery, TEXT("UPDATE `"));
lstrcat(rgchQuery, szTable);
lstrcat(rgchQuery, TEXT("` SET `"));
lstrcat(rgchQuery, szField);
lstrcat(rgchQuery, TEXT("` = "));
lstrcat(rgchQuery, szInt);
lstrcat(rgchQuery, TEXT(" WHERE `"));
lstrcat(rgchQuery, szPKeyField);
lstrcat(rgchQuery, TEXT("` = '"));
lstrcat(rgchQuery, szPKeyValue);
lstrcat(rgchQuery, TEXT("'"));
UINT idsRet = IDS_OKAY;
MSIHANDLE hview = NULL;
if (MsiDatabaseOpenView(hdb, rgchQuery, &hview) != MSI_OKAY)
{
Assert(hview == NULL);
idsRet = IDS_CANT_OPEN_VIEW;
}
if (hview != NULL && MsiViewExecute(hview, 0) != MSI_OKAY)
idsRet = IDS_CANT_EXECUTE_VIEW;
if (hview != NULL)
EvalAssert(MsiCloseHandle(hview) == MSI_OKAY); /* calls MsiViewClose() internally */
EvalAssert( NULL == LocalFree((HLOCAL)rgchQuery) );
return (idsRet);
}
/* ********************************************************************** */
UINT IdsMsiUpdateTableRecordIntPkeyInt ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szField, int iValue, LPTSTR szPKeyField, int iPKeyValue )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(*szTable != TEXT('`'));
Assert(!FEmptySz(szField));
Assert(*szField != TEXT('`'));
Assert(!FEmptySz(szPKeyField));
Assert(*szPKeyField != TEXT('`'));
const TCHAR szQueryPattern[] = TEXT("UPDATE `%s SET `%s` = %d WHERE `%s` = %d");
UINT cchQuery = 0;
TCHAR szInt1[32] = {0};
StringCchPrintf(szInt1, sizeof(szInt1)/sizeof(TCHAR), TEXT("%d"), iValue);
TCHAR szInt2[32] = {0};
StringCchPrintf(szInt2, sizeof(szInt2)/sizeof(TCHAR), TEXT("%d"), iPKeyValue);
cchQuery = lstrlen(szQueryPattern) + lstrlen(szTable) + lstrlen(szField) + lstrlen(szInt1) + lstrlen(szPKeyField) + lstrlen(szInt2) + 1;
LPTSTR rgchQuery = (LPTSTR)LocalAlloc(LPTR, cchQuery * sizeof(TCHAR));
if (!rgchQuery)
return (IDS_OOM);
// avoid StringCchPrintf due to 1024 buffer limitation
lstrcpy(rgchQuery, TEXT("UPDATE `"));
lstrcat(rgchQuery, szTable);
lstrcat(rgchQuery, TEXT("` SET `"));
lstrcat(rgchQuery, szField);
lstrcat(rgchQuery, TEXT("` = "));
lstrcat(rgchQuery, szInt1);
lstrcat(rgchQuery, TEXT(" WHERE `"));
lstrcat(rgchQuery, szPKeyField);
lstrcat(rgchQuery, TEXT("` = "));
lstrcat(rgchQuery, szInt2);
UINT idsRet = IDS_OKAY;
MSIHANDLE hview = NULL;
if (MsiDatabaseOpenView(hdb, rgchQuery, &hview) != MSI_OKAY)
{
Assert(hview == NULL);
idsRet = IDS_CANT_OPEN_VIEW;
}
if (hview != NULL && MsiViewExecute(hview, 0) != MSI_OKAY)
idsRet = IDS_CANT_EXECUTE_VIEW;
if (hview != NULL)
EvalAssert(MsiCloseHandle(hview) == MSI_OKAY); /* calls MsiViewClose() internally */
EvalAssert( NULL == LocalFree((HLOCAL)rgchQuery) );
return (idsRet);
}
/* ********************************************************************** */
UINT IdsMsiDeleteTableRecords ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szField, LPTSTR szKey )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(!FEmptySz(szField));
Assert(!FEmptySz(szKey));
const TCHAR szWherePattern[] = TEXT("%s = '%s'");
UINT cchWhere = 0;
cchWhere = lstrlen(szWherePattern) + lstrlen(szField) + lstrlen(szKey) + 1;
LPTSTR rgchWhere = (LPTSTR)LocalAlloc(LPTR, cchWhere * sizeof(TCHAR));
if (!rgchWhere)
return (IDS_OOM);
// avoid StringCchPrintf due to 1024 buffer limitation
lstrcpy(rgchWhere, szField);
lstrcat(rgchWhere, TEXT(" = '"));
lstrcat(rgchWhere, szKey);
lstrcat(rgchWhere, TEXT("'"));
UINT idsRet = IdsMsiDeleteTableRecordsWhere(hdb, szTable, rgchWhere);
EvalAssert( NULL == LocalFree((HLOCAL)rgchWhere) );
return (idsRet);
}
/* ********************************************************************** */
UINT IdsMsiDeleteTableRecordsWhere ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szWhere )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(!FEmptySz(szWhere));
const TCHAR szDeletePattern[] = TEXT("DELETE FROM %s WHERE %s");
UINT cchQuery = 0;
cchQuery = lstrlen(szDeletePattern) + lstrlen(szTable) + lstrlen(szWhere) + 1;
LPTSTR rgchQuery = (LPTSTR)LocalAlloc(LPTR, cchQuery * sizeof(TCHAR));
if (!rgchQuery)
return (IDS_OOM);
// avoid StringCchPrintf due to 1024 buffer limitation
lstrcpy(rgchQuery, TEXT("DELETE FROM "));
lstrcat(rgchQuery, szTable);
lstrcat(rgchQuery, TEXT(" WHERE "));
lstrcat(rgchQuery, szWhere);
MSIHANDLE hview = NULL;
if (MsiDatabaseOpenView(hdb, rgchQuery, &hview) != MSI_OKAY)
return (IDS_CANT_OPEN_VIEW);
UINT ids = IDS_OKAY;
if (MsiViewExecute(hview, 0) != MSI_OKAY)
ids = IDS_CANT_EXECUTE_VIEW;
EvalAssert(MsiCloseHandle(hview) == MSI_OKAY); /* calls MsiViewClose() internally */
EvalAssert( NULL == LocalFree((HLOCAL)rgchQuery) );
return (ids);
}
/* ********************************************************************** */
UINT IdsMsiEnumTable ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szFields,
LPTSTR szWhere, PIEMTPROC pIemtProc, LPARAM lp1, LPARAM lp2 )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(!FEmptySz(szFields));
Assert(pIemtProc != NULL);
UINT idsRet = IDS_OKAY;
const TCHAR szEnumQueryPattern[] = TEXT("SELECT %s FROM %s WHERE %s");
UINT cchQuery = 0;
cchQuery = lstrlen(szEnumQueryPattern)
+ lstrlen(szFields)
+ lstrlen(szTable)
+ (szWhere ? lstrlen(szWhere) : 0)
+ 1;
LPTSTR rgchQuery = (LPTSTR)LocalAlloc(LPTR, cchQuery * sizeof(TCHAR));
if (!rgchQuery)
return (IDS_OOM);
// avoid StringCchPrintf due to 1024 buffer limitation
lstrcpy(rgchQuery, TEXT("SELECT "));
lstrcat(rgchQuery, szFields);
lstrcat(rgchQuery, TEXT(" FROM "));
lstrcat(rgchQuery, szTable);
if (szWhere != szNull)
{
lstrcat(rgchQuery, TEXT(" WHERE "));
lstrcat(rgchQuery, szWhere);
}
MSIHANDLE hview = NULL;
MSIHANDLE hrec = NULL;
if (MsiDatabaseOpenView(hdb, rgchQuery, &hview) != MSI_OKAY)
{
idsRet = IDS_CANT_OPEN_VIEW;
goto LEarlyReturn;
}
if (MsiViewExecute(hview, 0) != MSI_OKAY)
{
idsRet = IDS_CANT_EXECUTE_VIEW;
goto LEarlyReturn;
}
UINT uiRet;
uiRet = MsiViewFetch(hview, &hrec);
while (uiRet != ERROR_NO_MORE_ITEMS)
{
if (uiRet != MSI_OKAY)
{
idsRet = IDS_CANT_FETCH_RECORD;
goto LEarlyReturn;
}
idsRet = (*pIemtProc)(hview, hrec, lp1, lp2);
if (idsRet != IDS_OKAY)
goto LEarlyReturn;
EvalAssert(MsiCloseHandle(hrec) == MSI_OKAY);
hrec = NULL;
uiRet = MsiViewFetch(hview, &hrec);
}
LEarlyReturn:
if (hrec != NULL)
EvalAssert(MsiCloseHandle(hrec) == MSI_OKAY);
if (hview != NULL)
EvalAssert(MsiCloseHandle(hview) == MSI_OKAY); /* calls MsiViewClose() internally */
EvalAssert( NULL == LocalFree((HLOCAL)rgchQuery) );
return (idsRet);
}
/* ********************************************************************** */
UINT IdsMsiExistTableRecords ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szField, LPTSTR szValue, PBOOL pf )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(!FEmptySz(szValue));
Assert(pf != pfNull);
if (*pf != fFalse)
return (IDS_OKAY);
if (szField == szNull)
szField = TEXT("`Component_`");
Assert(*szField != TEXT('\0'));
const TCHAR szWherePattern[] = TEXT("WHERE %s = '%s'");
UINT cchWhere = 0;
cchWhere = lstrlen(szWherePattern) + lstrlen(szField) + lstrlen(szValue) + 1;
LPTSTR rgchWhere = (LPTSTR)LocalAlloc(LPTR, cchWhere * sizeof(TCHAR));
if (!rgchWhere)
return (IDS_OOM);
// avoid StringCchPrintf due to 1024 buffer limitation
lstrcpy(rgchWhere, TEXT("WHERE "));
lstrcat(rgchWhere, szField);
lstrcat(rgchWhere, TEXT(" = '"));
lstrcat(rgchWhere, szValue);
lstrcat(rgchWhere, TEXT("'"));
UINT idsRet = IdsMsiExistTableRecordsWhere(hdb, szTable, szField, rgchWhere, pf);
EvalAssert( NULL == LocalFree((HLOCAL)rgchWhere) );
return (idsRet);
}
/* ********************************************************************** */
UINT IdsMsiExistTableRecordsWhere ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szField, LPTSTR szWhere, PBOOL pf )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(szWhere != szNull);
// Assert(!FEmptySz(szWhere));
Assert(pf != pfNull);
if (*pf != fFalse)
return (IDS_OKAY);
if (szField == szNull)
szField = TEXT("`Component_`");
Assert(*szField != TEXT('\0'));
const TCHAR szQueryPattern[] = TEXT("SELECT %s FROM %s ");
UINT cchQuery = 0;
cchQuery = lstrlen(szQueryPattern) + lstrlen(szField) + lstrlen(szTable) + lstrlen(szWhere) + 1;
LPTSTR rgchQuery = (LPTSTR)LocalAlloc(LPTR, cchQuery * sizeof(TCHAR));
if (!rgchQuery)
return (IDS_OOM);
// avoid StringCchPrintf due to 1024 buffer limitation
lstrcpy(rgchQuery, TEXT("SELECT "));
lstrcat(rgchQuery, szField);
lstrcat(rgchQuery, TEXT(" FROM "));
lstrcat(rgchQuery, szTable);
lstrcat(rgchQuery, TEXT(" "));
lstrcat(rgchQuery, szWhere);
MSIHANDLE hview = NULL;
MSIHANDLE hrec = NULL;
if (MsiDatabaseOpenView(hdb, rgchQuery, &hview) != MSI_OKAY)
{
// AssertFalse(); FSz/IntColumnExists() expects this to fail
return (IDS_CANT_OPEN_VIEW);
}
if (MsiViewExecute(hview, 0) != MSI_OKAY)
{
AssertFalse();
EvalAssert(MsiCloseHandle(hview) == MSI_OKAY); /* calls MsiViewClose() internally */
return (IDS_CANT_EXECUTE_VIEW);
}
UINT idsRet = IDS_OKAY;
UINT uiRet;
uiRet = MsiViewFetch(hview, &hrec);
if (uiRet != ERROR_NO_MORE_ITEMS)
{
if (uiRet != MSI_OKAY)
idsRet = IDS_CANT_FETCH_RECORD;
else
*pf = fTrue;
}
if (hrec != NULL)
EvalAssert(MsiCloseHandle(hrec) == MSI_OKAY);
Assert(hview != NULL);
EvalAssert(MsiCloseHandle(hview) == MSI_OKAY); /* calls MsiViewClose() internally */
EvalAssert( NULL == LocalFree((HLOCAL)rgchQuery) );
return (idsRet);
}
/* PROPERTY TABLES */
/* ********************************************************************** */
UINT IdsMsiGetPropertyString ( MSIHANDLE hdb, LPTSTR szName, LPTSTR szValue, UINT cch )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szName));
Assert(szValue != szNull);
Assert(cch > 1);
return (IdsMsiGetTableString(hdb, TEXT("`Property`"),
TEXT("`Property`"), TEXT("`Value`"), szName, szValue, cch));
}
/* ********************************************************************** */
UINT IdsMsiSetPropertyString ( MSIHANDLE hdb, LPTSTR szName, LPTSTR szValue )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szName));
Assert(!FEmptySz(szValue));
MSIHANDLE hrec = MsiCreateRecord(2);
if (hrec == NULL)
return (IDS_CANT_CREATE_RECORD);
if (MsiRecordSetString(hrec, 1, szName) != MSI_OKAY
|| MsiRecordSetString(hrec, 2, szValue) != MSI_OKAY)
{
EvalAssert(MsiCloseHandle(hrec) == MSI_OKAY);
return (IDS_CANT_SET_RECORD_FIELD);
}
return (IdsMsiSetTableRecord(hdb, TEXT("`Property`"), TEXT("`Property`,`Value`"), TEXT("`Property`"), szName, hrec));
}
/* return value does NOT include terminating null; zero if error */
/* ********************************************************************** */
UINT CchMsiPcwPropertyString ( MSIHANDLE hdb, LPTSTR szName )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szName));
return (CchMsiTableString(hdb, TEXT("`Properties`"),
TEXT("`Name`"), TEXT("`Value`"), szName));
}
/* ********************************************************************** */
UINT IdsMsiGetPcwPropertyString ( MSIHANDLE hdb, LPTSTR szName, LPTSTR szValue, UINT cch )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szName));
Assert(szValue != szNull);
Assert(cch > 1);
return (IdsMsiGetTableString(hdb, TEXT("`Properties`"),
TEXT("`Name`"), TEXT("`Value`"), szName, szValue, cch));
}
/* ********************************************************************** */
UINT IdsMsiGetPcwPropertyInteger ( MSIHANDLE hdb, LPTSTR szName, int * pi )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szName));
Assert(pi != (int*)NULL);
TCHAR rgch[MAX_PATH];
UINT idsRet = IdsMsiGetPcwPropertyString(hdb, szName, rgch, sizeof(rgch)/sizeof(TCHAR));
if (idsRet != IDS_OKAY)
return (idsRet);
LPTSTR sz = rgch;
BOOL fNegative = fFalse;
if (*sz == TEXT('-'))
{
fNegative = fTrue;
sz = CharNext(sz);
}
*pi = 0;
while (*sz != TEXT('\0') && *sz >= TEXT('0') && *sz <= TEXT('9'))
{
*pi = (*pi * 10) + (UINT)(*sz - TEXT('0'));
sz = CharNext(sz);
}
if (fNegative)
*pi = *pi * (-1);
return (IDS_OKAY);
}
/* ********************************************************************** */
UINT IdsMsiSetPcwPropertyString ( MSIHANDLE hdb, LPTSTR szName, LPTSTR szValue )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szName));
Assert(!FEmptySz(szValue));
MSIHANDLE hrec = MsiCreateRecord(2);
if (hrec == NULL)
return (IDS_CANT_CREATE_RECORD);
if (MsiRecordSetString(hrec, 1, szName) != MSI_OKAY
|| MsiRecordSetString(hrec, 2, szValue) != MSI_OKAY)
{
EvalAssert(MsiCloseHandle(hrec) == MSI_OKAY);
return (IDS_CANT_SET_RECORD_FIELD);
}
return (IdsMsiSetTableRecord(hdb, TEXT("`Properties`"), TEXT("`Name`,`Value`"), TEXT("`Name`"), szName, hrec));
}
static BOOL FSzColumnExists ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szColumn, BOOL fMsg );
static BOOL FIntColumnExists ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szColumn, BOOL fMsg );
static BOOL FBinaryColumnExists ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szColumn, LPTSTR szPKey, BOOL fMsg );
#define TableExists(szT) if (!FTableExists(hdb,szT,fTrue)) return (fFalse); szTable = szT
#define SzColExists(szC) if (!FSzColumnExists(hdb,szTable,szC,fTrue)) return (fFalse)
#define IntColExists(szC) if (!FIntColumnExists(hdb,szTable,szC,fTrue)) return (fFalse)
static BOOL FCopyRecordsFromFileDataToUFOD ( MSIHANDLE hdb );
/* ********************************************************************** */
static BOOL FValidateInputMsiSchema ( MSIHANDLE hdb )
{
Assert(hdb != NULL);
LPTSTR szTable;
TableExists (TEXT("Properties"));
SzColExists (TEXT("Name"));
SzColExists (TEXT("Value"));
TableExists (TEXT("ImageFamilies"));
SzColExists (TEXT("Family"));
SzColExists (TEXT("MediaSrcPropName"));
IntColExists(TEXT("MediaDiskId"));
IntColExists(TEXT("FileSequenceStart"));
if (!FSzColumnExists(hdb, szTable, TEXT("DiskPrompt"), fFalse))
{
if (!FAddColumnToTable(hdb, szTable, TEXT("`DiskPrompt`"), STRING, PERSIST))
return (fFalse);
}
if (!FSzColumnExists(hdb, szTable, TEXT("VolumeLabel"), fFalse))
{
if (!FAddColumnToTable(hdb, szTable, TEXT("`VolumeLabel`"), STRING, PERSIST))
return (fFalse);
}
TableExists (TEXT("UpgradedImages"));
SzColExists (TEXT("Upgraded"));
SzColExists (TEXT("MsiPath"));
SzColExists (TEXT("Family"));
if (!FSzColumnExists(hdb, szTable, TEXT("PatchMsiPath"), fFalse))
{
if (!FAddColumnToTable(hdb, szTable, TEXT("`PatchMsiPath`"), STRING, PERSIST))
return (fFalse);
}
if (!FSzColumnExists(hdb, szTable, TEXT("SymbolPaths"), fFalse))
{
if (!FAddColumnToTable(hdb, szTable, TEXT("`SymbolPaths`"), STRING, PERSIST))
return (fFalse);
}
TableExists (TEXT("TargetImages"));
SzColExists (TEXT("Target"));
SzColExists (TEXT("MsiPath"));
SzColExists (TEXT("Upgraded"));
IntColExists(TEXT("Order"));
SzColExists (TEXT("ProductValidateFlags"));
if (!FSzColumnExists(hdb, szTable, TEXT("SymbolPaths"), fFalse))
{
if (!FAddColumnToTable(hdb, szTable, TEXT("`SymbolPaths`"), STRING, PERSIST))
return (fFalse);
}
if (!FIntColumnExists(hdb, szTable, TEXT("IgnoreMissingSrcFiles"), fFalse))
{
if (!FAddColumnToTable(hdb, szTable, TEXT("`IgnoreMissingSrcFiles`"), INTEGER, PERSIST))
return (fFalse);
}
if (FTableExists(hdb, TEXT("ExternalFiles"), fFalse))
{
szTable = TEXT("ExternalFiles");
SzColExists (TEXT("Family"));
SzColExists (TEXT("FTK"));
SzColExists (TEXT("FilePath"));
if (!FIntColumnExists(hdb, szTable, TEXT("Order"), fFalse))
{
if (!FAddColumnToTable(hdb, szTable, TEXT("`Order`"), INTEGER, PERSIST))
return (fFalse);
}
if (!FSzColumnExists(hdb, szTable, TEXT("SymbolPaths"), fFalse))
{
if (!FAddColumnToTable(hdb, szTable, TEXT("`SymbolPaths`"), STRING, PERSIST))
return (fFalse);
}
if (!FSzColumnExists(hdb, szTable, TEXT("IgnoreOffsets"), fFalse))
{
if (!FAddColumnToTable(hdb, szTable, TEXT("`IgnoreOffsets`"), STRING, PERSIST))
return (fFalse);
}
if (!FSzColumnExists(hdb, szTable, TEXT("IgnoreLengths"), fFalse))
{
if (!FAddColumnToTable(hdb, szTable, TEXT("`IgnoreLengths`"), STRING, PERSIST))
return (fFalse);
}
if (!FSzColumnExists(hdb, szTable, TEXT("RetainOffsets"), fFalse))
{
if (!FAddColumnToTable(hdb, szTable, TEXT("`RetainOffsets`"), STRING, PERSIST))
return (fFalse);
}
}
else if (!FExecSqlCmd(hdb, TEXT("CREATE TABLE `ExternalFiles` ( `Family` CHAR(13) NOT NULL, `FTK` CHAR(128) NOT NULL, `FilePath` CHAR(128) NOT NULL, `SymbolPaths` CHAR(128), `IgnoreOffsets` CHAR(128), `IgnoreLengths` CHAR(128), `RetainOffsets` CHAR(128), `Order` INTEGER PRIMARY KEY `Family`, `FTK`, `FilePath` )")))
return (fFalse);
if (FTableExists(hdb, TEXT("UpgradedFiles_OptionalData"), fFalse))
{
szTable = TEXT("UpgradedFiles_OptionalData");
SzColExists (TEXT("Upgraded"));
SzColExists (TEXT("FTK"));
SzColExists (TEXT("SymbolPaths"));
if (FIntColumnExists(hdb, szTable, TEXT("IgnoreErrors"), fFalse))
{
#ifdef DEBUG
OutputDebugString(TEXT("The IgnoreErrors column has been dropped from the UpgradedFiles_OptionalData table; ignoring column in current PCP. Use 'AllowIgnoreOnPatchError' column."));
#endif /* DEBUG */
FWriteLogFile(TEXT(" WARNING - ignoring 'IgnoreErrors' column in UpgradedFiles_OptionalData table.\r\n"));
if (!FIntColumnExists(hdb, szTable, TEXT("AllowIgnoreOnPatchError"), fFalse))
{
if (!FAddColumnToTable(hdb, szTable, TEXT("`AllowIgnoreOnPatchError`"), INTEGER, PERSIST))
return (fFalse);
}
}
else
IntColExists(TEXT("AllowIgnoreOnPatchError"));
IntColExists(TEXT("IncludeWholeFile"));
if (FTableExists(hdb, TEXT("FileData"), fFalse))
return (fFalse);
}
else if (!FExecSqlCmd(hdb, TEXT("CREATE TABLE `UpgradedFiles_OptionalData` ( `Upgraded` CHAR(13) NOT NULL, `FTK` CHAR(128) NOT NULL, `SymbolPaths` CHAR(128), `AllowIgnoreOnPatchError` INTEGER, `IncludeWholeFile` INTEGER PRIMARY KEY `Upgraded`, `FTK` )")))
return (fFalse);
else if (FTableExists(hdb, TEXT("FileData"), fFalse))
{
szTable = TEXT("FileData");
SzColExists (TEXT("Upgraded"));
SzColExists (TEXT("FTK"));
IntColExists(TEXT("AllowIgnoreOnPatchError"));
if (!FSzColumnExists(hdb, szTable, TEXT("SymbolPaths"), fFalse))
{
if (!FAddColumnToTable(hdb, szTable, TEXT("`SymbolPaths`"), STRING, PERSIST))
return (fFalse);
}
if (!FIntColumnExists(hdb, szTable, TEXT("IncludeWholeFile"), fFalse))
{
if (!FAddColumnToTable(hdb, szTable, TEXT("`IncludeWholeFile`"), INTEGER, PERSIST))
return (fFalse);
}
if (!FCopyRecordsFromFileDataToUFOD(hdb))
return (fFalse);
if (!FExecSqlCmd(hdb, TEXT("DROP TABLE `FileData`")))
return (fFalse);
}
if (FTableExists(hdb, TEXT("UpgradedFilesToIgnore"), fFalse))
{
szTable = TEXT("UpgradedFilesToIgnore");
SzColExists (TEXT("Upgraded"));
SzColExists (TEXT("FTK"));
}
else if (!FExecSqlCmd(hdb, TEXT("CREATE TABLE `UpgradedFilesToIgnore` ( `Upgraded` CHAR(13) NOT NULL, `FTK` CHAR(128) NOT NULL PRIMARY KEY `Upgraded`, `FTK` )")))
return (fFalse);
if (FTableExists(hdb, TEXT("TargetFiles_OptionalData"), fFalse))
{
szTable = TEXT("TargetFiles_OptionalData");
SzColExists (TEXT("Target"));
SzColExists (TEXT("FTK"));
SzColExists (TEXT("SymbolPaths"));
if (!FSzColumnExists(hdb, szTable, TEXT("IgnoreOffsets"), fFalse))
{
if (!FAddColumnToTable(hdb, szTable, TEXT("`IgnoreOffsets`"), STRING, PERSIST))
return (fFalse);
}
if (!FSzColumnExists(hdb, szTable, TEXT("IgnoreLengths"), fFalse))
{
if (!FAddColumnToTable(hdb, szTable, TEXT("`IgnoreLengths`"), STRING, PERSIST))
return (fFalse);
}
if (!FSzColumnExists(hdb, szTable, TEXT("RetainOffsets"), fFalse))
{
if (!FAddColumnToTable(hdb, szTable, TEXT("`RetainOffsets`"), STRING, PERSIST))
return (fFalse);
}
}
else if (!FExecSqlCmd(hdb, TEXT("CREATE TABLE `TargetFiles_OptionalData` ( `Target` CHAR(13) NOT NULL, `FTK` CHAR(128) NOT NULL, `SymbolPaths` CHAR(128), `IgnoreOffsets` CHAR(128), `IgnoreLengths` CHAR(128), `RetainOffsets` CHAR(128) PRIMARY KEY `Target`, `FTK` )")))
return (fFalse);
if (FTableExists(hdb, TEXT("FamilyFileRanges"), fFalse))
{
szTable = TEXT("FamilyFileRanges");
SzColExists (TEXT("Family"));
SzColExists (TEXT("FTK"));
SzColExists (TEXT("RetainOffsets"));
SzColExists (TEXT("RetainLengths"));
}
else if (!FExecSqlCmd(hdb, TEXT("CREATE TABLE `FamilyFileRanges` ( `Family` CHAR(13) NOT NULL, `FTK` CHAR(128) NOT NULL, `RetainOffsets` CHAR(128), `RetainLengths` CHAR(128) PRIMARY KEY `Family`, `FTK` )")))
return (fFalse);
return (fTrue);
}
/* ********************************************************************** */
BOOL FTableExists ( MSIHANDLE hdb, LPTSTR szTable, BOOL fMsg )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
MSIHANDLE hrec;
UINT ids = MsiDatabaseGetPrimaryKeys(hdb, szTable, &hrec);
if (ids == IDS_OKAY && hrec != NULL)
{
EvalAssert(MsiCloseHandle(hrec) == MSI_OKAY);
return (fTrue);
}
#ifdef DEBUG
if (fMsg)
{
TCHAR rgch[256];
StringCchPrintf(rgch, sizeof(rgch)/sizeof(TCHAR), TEXT("Input-Msi is missing a table: '%s'."), szTable);
OutputDebugString(rgch);
}
#endif
return (fFalse);
}
/* ********************************************************************** */
static BOOL FSzColumnExists ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szColumn, BOOL fMsg )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(!FEmptySz(szColumn));
TCHAR rgchTable[MAX_PATH];
StringCchPrintf(rgchTable, sizeof(rgchTable)/sizeof(TCHAR), TEXT("`%s`"), szTable);
TCHAR rgchColumn[MAX_PATH];
StringCchPrintf(rgchColumn, sizeof(rgchColumn)/sizeof(TCHAR), TEXT("`%s`"), szColumn);
BOOL fExist = fFalse;
UINT ids = IdsMsiExistTableRecords(hdb, rgchTable,
rgchColumn, TEXT("bogus_value"), &fExist);
#ifdef DEBUG
if (fMsg && ids != IDS_OKAY)
{
TCHAR rgch[256];
StringCchPrintf(rgch, sizeof(rgch)/sizeof(TCHAR), TEXT("Input-Msi table '%s' is missing a string column: '%s'."), szTable, szColumn);
OutputDebugString(rgch);
}
#endif
return (ids == IDS_OKAY);
}
/* ********************************************************************** */
static BOOL FIntColumnExists ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szColumn, BOOL fMsg )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(!FEmptySz(szColumn));
TCHAR rgchTable[MAX_PATH];
StringCchPrintf(rgchTable, sizeof(rgchTable)/sizeof(TCHAR), TEXT("`%s`"), szTable);
TCHAR rgchColumn[MAX_PATH];
StringCchPrintf(rgchColumn, sizeof(rgchColumn)/sizeof(TCHAR), TEXT("`%s`"), szColumn);
TCHAR rgchWhere[MAX_PATH];
StringCchPrintf(rgchWhere, sizeof(rgchWhere)/sizeof(TCHAR), TEXT("WHERE `%s` = 7"), szColumn);
BOOL fExist = fFalse;
UINT ids = IdsMsiExistTableRecordsWhere(hdb, rgchTable,
rgchColumn, rgchWhere, &fExist);
#ifdef DEBUG
if (fMsg && ids != IDS_OKAY)
{
TCHAR rgch[256];
StringCchPrintf(rgch, sizeof(rgch)/sizeof(TCHAR), TEXT("Input-Msi table '%s' is missing an integer column: '%s'."), szTable, szColumn);
OutputDebugString(rgch);
}
#endif
return (ids == IDS_OKAY);
}
/* ********************************************************************** */
static BOOL FBinaryColumnExists ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szColumn, LPTSTR szPKey, BOOL fMsg )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(!FEmptySz(szColumn));
Assert(!FEmptySz(szPKey));
TCHAR rgchTable[MAX_PATH];
StringCchPrintf(rgchTable, sizeof(rgchTable)/sizeof(TCHAR), TEXT("`%s`"), szTable);
TCHAR rgchColumn[MAX_PATH];
StringCchPrintf(rgchColumn, sizeof(rgchColumn)/sizeof(TCHAR), TEXT("`%s`"), szColumn);
TCHAR rgchWhere[MAX_PATH];
StringCchPrintf(rgchWhere, sizeof(rgchWhere)/sizeof(TCHAR), TEXT("WHERE `%s` = 'foo'"), szPKey);
BOOL fExist = fFalse;
UINT ids = IdsMsiExistTableRecordsWhere(hdb, rgchTable,
rgchColumn, rgchWhere, &fExist);
#ifdef DEBUG
if (fMsg && ids != IDS_OKAY)
{
TCHAR rgch[256];
StringCchPrintf(rgch, sizeof(rgch)/sizeof(TCHAR), TEXT("Input-Msi table '%s' is missing a binary column: '%s'."), szTable, szColumn);
OutputDebugString(rgch);
}
#endif
return (ids == IDS_OKAY);
}
static UINT IdsCopyRecordsFromFileDataToUFOD ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 );
/* ********************************************************************** */
static BOOL FCopyRecordsFromFileDataToUFOD ( MSIHANDLE hdb )
{
Assert(hdb != NULL);
return (IDS_OKAY == IdsMsiEnumTable(hdb, TEXT("`FileData`"),
TEXT("`Upgraded`,`FTK`,`SymbolPaths`,`IgnoreErrors`,`IncludeWholeFile`"),
szNull, IdsCopyRecordsFromFileDataToUFOD, (LPARAM)(hdb), 0L) );
}
/* ********************************************************************** */
static UINT IdsCopyRecordsFromFileDataToUFOD ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 )
{
Assert(hview != NULL);
Assert(hrec != NULL);
Assert(lp2 == 0L);
MSIHANDLE hdb = (MSIHANDLE)lp1;
Assert(hdb != NULL);
TCHAR rgchUpgradedImage[64];
DWORD dwcch = 64;
UINT uiRet = MsiRecordGetString(hrec, 1, rgchUpgradedImage, &dwcch);
if (uiRet != MSI_OKAY || FEmptySz(rgchUpgradedImage))
return (IDS_CANCEL);
TCHAR rgchFTK[128];
dwcch = 128;
uiRet = MsiRecordGetString(hrec, 2, rgchFTK, &dwcch);
if (uiRet != MSI_OKAY || FEmptySz(rgchFTK))
return (IDS_CANCEL);
TCHAR rgchSymbolPaths[MAX_PATH+MAX_PATH];
dwcch = MAX_PATH+MAX_PATH;
uiRet = MsiRecordGetString(hrec, 3, rgchSymbolPaths, &dwcch);
if (uiRet != MSI_OKAY)
return (IDS_CANCEL);
TCHAR rgchIgnoreErrors[64];
dwcch = 64;
uiRet = MsiRecordGetString(hrec, 4, rgchIgnoreErrors, &dwcch);
if (uiRet != MSI_OKAY || FEmptySz(rgchIgnoreErrors))
return (IDS_CANCEL);
TCHAR rgchIncludeWholeFile[64];
dwcch = 64;
uiRet = MsiRecordGetString(hrec, 5, rgchIncludeWholeFile, &dwcch);
if (uiRet != MSI_OKAY)
return (IDS_CANCEL);
if (FEmptySz(rgchIncludeWholeFile))
lstrcpy(rgchIncludeWholeFile, TEXT("0"));
TCHAR rgchQuery[MAX_PATH+MAX_PATH+MAX_PATH];
StringCchPrintf(rgchQuery, sizeof(rgchQuery)/sizeof(TCHAR), TEXT("INSERT INTO `UpgradedFiles_OptionalData` ( `Upgraded`, `FTK`, `SymbolPaths`, `AllowIgnoreOnPatchError`, `IncludeWholeFile` ) VALUES ( '%s', '%s', '%s', %s, %s )"),
rgchUpgradedImage, rgchFTK, rgchSymbolPaths, rgchIgnoreErrors, rgchIncludeWholeFile);
if (!FExecSqlCmd(hdb, rgchQuery))
return (IDS_CANCEL);
return (IDS_OKAY);
}
static MSIHANDLE hdbInput = NULL;
static UINT UiValidateAndLogPCWProperties ( MSIHANDLE hdbInput, LPTSTR szPcpPath, LPTSTR szPatchPath, LPTSTR szTempFolder, LPTSTR szTempFName );
static int IGetOrderMax ( MSIHANDLE hdbInput );
static UINT IdsValidateFamilyRecords ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 );
static UINT IdsValidateFamilyRangeRecords ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 );
static UINT IdsValidateUpgradedRecords ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 );
static UINT IdsValidateTargetRecords ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 );
static UINT IdsValidateExternalFileRecords ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 );
static UINT IdsValidateUFileDataRecords ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 );
static UINT IdsValidateUFileIgnoreRecords ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 );
static UINT IdsValidateTFileDataRecords ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 );
static UINT IdsValidateTargetProductCodesAgainstList ( MSIHANDLE hdb );
static BOOL FNoUpgradedImages ( MSIHANDLE hdb );
static BOOL FCheckForProductCodeMismatches ( MSIHANDLE hdb );
static BOOL FCheckForProductVersionMismatches ( MSIHANDLE hdb );
static BOOL FCheckForProductCodeMismatchWithVersionMatch (MSIHANDLE hdb );
static void FillInListOfTargetProductCodes ( MSIHANDLE hdb );
/* ********************************************************************** */
UINT UiValidateInputRecords ( MSIHANDLE hdb, LPTSTR szPcpPath, LPTSTR szPatchPath, LPTSTR szTempFolder, LPTSTR szTempFName )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szPcpPath));
Assert(FFileExist(szPcpPath));
Assert(!FEmptySz(szPatchPath));
Assert(!FEmptySz(szTempFolder));
Assert(szTempFName != szNull);
UpdateStatusMsg(IDS_STATUS_VALIDATE_INPUT, szEmpty, szEmpty);
UpdateStatusMsg(0, TEXT("Table: Properties"), szNull);
UINT ids = UiValidateAndLogPCWProperties(hdb, szPcpPath, szPatchPath, szTempFolder, szTempFName);
if (ids != IDS_OKAY)
return (ids);
hdbInput = hdb;
iOrderMax = IGetOrderMax(hdbInput);
Assert(iOrderMax > 0);
UpdateStatusMsg(IDS_STATUS_VALIDATE_INPUT, TEXT("Table: ImageFamilies"), szEmpty);
ids = IdsMsiEnumTable(hdb, TEXT("`ImageFamilies`"),
TEXT("`Family`,`MediaSrcPropName`,`MediaDiskId`,`FileSequenceStart`"),
szNull, IdsValidateFamilyRecords, 0L, 0L);
if (ids != IDS_OKAY)
return (ids);
UpdateStatusMsg(IDS_STATUS_VALIDATE_INPUT, TEXT("Table: FamilyFileRanges"), szEmpty);
ids = IdsMsiEnumTable(hdb, TEXT("`FamilyFileRanges`"),
TEXT("`Family`,`FTK`,`RetainOffsets`,`RetainLengths`,`RetainCount`"),
szNull, IdsValidateFamilyRangeRecords, 0L, 0L);
if (ids != IDS_OKAY)
return (ids);
UpdateStatusMsg(IDS_STATUS_VALIDATE_INPUT, TEXT("Table: UpgradedImages"), szEmpty);
ids = IdsMsiEnumTable(hdb, TEXT("`UpgradedImages`"),
TEXT("`Upgraded`,`MsiPath`,`Family`,`PatchMsiPath`"),
szNull, IdsValidateUpgradedRecords, 0L, 0L);
if (ids != IDS_OKAY)
return (ids);
UpdateStatusMsg(0, TEXT("Table: TargetImages"), szEmpty);
ids = IdsMsiEnumTable(hdb, TEXT("`TargetImages`"),
TEXT("`Target`,`MsiPath`,`Upgraded`,`ProductValidateFlags`,`Order`,`IgnoreMissingSrcFiles`"),
szNull, IdsValidateTargetRecords, 0L, 0L);
if (ids != IDS_OKAY)
return (ids);
UpdateStatusMsg(0, TEXT("Table: ExternalFiles"), szEmpty);
ids = IdsMsiEnumTable(hdb, TEXT("`ExternalFiles`"),
TEXT("`Family`,`FTK`,`FilePath`,`Order`,`IgnoreOffsets`,`IgnoreLengths`,`RetainOffsets`,`IgnoreCount`"),
szNull, IdsValidateExternalFileRecords, 0L, 0L);
if (ids != IDS_OKAY)
return (ids);
UpdateStatusMsg(0, TEXT("Table: UpgradedFiles_OptionalData"), szEmpty);
ids = IdsMsiEnumTable(hdb, TEXT("`UpgradedFiles_OptionalData`"),
TEXT("`Upgraded`,`FTK`,`IncludeWholeFile`"),
szNull, IdsValidateUFileDataRecords, 0L, 0L);
if (ids != IDS_OKAY)
return (ids);
UpdateStatusMsg(0, TEXT("Table: UpgradedFilesToIgnore"), szEmpty);
ids = IdsMsiEnumTable(hdb, TEXT("`UpgradedFilesToIgnore`"),
TEXT("`Upgraded`,`FTK`"),
szNull, IdsValidateUFileIgnoreRecords, 0L, 0L);
if (ids != IDS_OKAY)
return (ids);
UpdateStatusMsg(0, TEXT("Table: TargetFiles_OptionalData"), szEmpty);
ids = IdsMsiEnumTable(hdb, TEXT("`TargetFiles_OptionalData`"),
TEXT("`Target`,`FTK`,`IgnoreOffsets`,`IgnoreLengths`,`RetainOffsets`,`IgnoreCount`"),
szNull, IdsValidateTFileDataRecords, 0L, 0L);
if (ids != IDS_OKAY)
return (ids);
UpdateStatusMsg(IDS_STATUS_VALIDATE_INPUT, TEXT("Table: UpgradedImages"), szEmpty);
if (FNoUpgradedImages(hdb))
return (UiLogError(ERROR_PCW_NO_UPGRADED_IMAGES_TO_PATCH, NULL, NULL));
if (!FCheckForProductCodeMismatches(hdb))
return (UiLogError(ERROR_PCW_MISMATCHED_PRODUCT_CODES, NULL, NULL));
if (!FCheckForProductVersionMismatches(hdb))
return (UiLogError(ERROR_PCW_MISMATCHED_PRODUCT_VERSIONS, NULL, NULL));
if (!FCheckForProductCodeMismatchWithVersionMatch(hdb))
return (UiLogError(ERROR_PCW_MATCHED_PRODUCT_VERSIONS, NULL, NULL));
FillInListOfTargetProductCodes(hdb);
ids = IdsValidateTargetProductCodesAgainstList(hdb);
if (ids != IDS_OKAY)
return (ids);
return (ERROR_SUCCESS);
}
static UINT IdsGetMaxOrder ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 );
/* ********************************************************************** */
static int IGetOrderMax ( MSIHANDLE hdbInput )
{
Assert(hdbInput != NULL);
int iMax = 0;
EvalAssert( IDS_OKAY == IdsMsiEnumTable(hdbInput, TEXT("`TargetImages`"),
TEXT("`Order`"), szNull, IdsGetMaxOrder, (LPARAM)(&iMax), 0L) );
EvalAssert( IDS_OKAY == IdsMsiEnumTable(hdbInput, TEXT("`ExternalFiles`"),
TEXT("`Order`"), szNull, IdsGetMaxOrder, (LPARAM)(&iMax), 0L) );
return (iMax+1);
}
/* ********************************************************************** */
static UINT IdsGetMaxOrder ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 )
{
Assert(hview != NULL);
Assert(hrec != NULL);
Assert(lp2 == 0L);
int* piMax = (int*)lp1;
Assert(piMax != NULL);
Assert(*piMax >= 0);
int iOrder = MsiRecordGetInteger(hrec, 1);
if (iOrder != MSI_NULL_INTEGER && iOrder > *piMax)
*piMax = iOrder;
return (IDS_OKAY);
}
static BOOL FValidName ( LPTSTR sz, int cchMax );
#define FValidFamilyName(sz) FValidName(sz,MAX_LENGTH_IMAGE_FAMILY_NAME)
#define FValidImageName(sz) FValidName(sz,MAX_LENGTH_TARGET_IMAGE_NAME)
static BOOL FUniqueImageName ( LPTSTR sz, MSIHANDLE hdbInput );
static BOOL FUniquePackageCode ( LPTSTR sz, MSIHANDLE hdbInput );
static BOOL FValidPropertyName ( LPTSTR sz );
static BOOL FValidDiskId ( LPTSTR sz );
/* ********************************************************************** */
static UINT IdsValidateFamilyRecords ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 )
{
Assert(hview != NULL);
Assert(hrec != NULL);
Assert(lp1 == 0L);
Assert(lp2 == 0L);
Assert(hdbInput != NULL);
TCHAR rgchFamily[MAX_LENGTH_IMAGE_FAMILY_NAME + 1];
DWORD dwcch = MAX_LENGTH_IMAGE_FAMILY_NAME + 1;
UINT uiRet = MsiRecordGetString(hrec, 1, rgchFamily, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_IMAGE_FAMILY_NAME_TOO_LONG, szNull, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("ImageFamilies.Family"), szNull));
UpdateStatusMsg(0, 0, rgchFamily);
if (!FValidFamilyName(rgchFamily))
return (UiLogError(ERROR_PCW_BAD_IMAGE_FAMILY_NAME, rgchFamily, szNull));
if (!FUniqueImageName(rgchFamily, hdbInput))
return (UiLogError(ERROR_PCW_DUP_IMAGE_FAMILY_NAME, rgchFamily, szNull));
int iMinimumMsiVersion = 100;
EvalAssert( IDS_OKAY == IdsMsiGetPcwPropertyInteger(hdbInput, TEXT("MinimumRequiredMsiVersion"), &iMinimumMsiVersion) );
TCHAR rgchPropName[MAX_PATH];
dwcch = MAX_PATH;
if (MsiRecordIsNull(hrec, 2) && iMinimumMsiVersion >= iWindowsInstallerXP)
{
// patch targets Windows Installer 2.0 or greater
// MediaSrcPropName is not required since sequence conflict management handles
// this automatically
}
else
{
// author chose to author this value so we will validate it; or author is not
// targeting the patch for Windows Installer 2.0 or greater
uiRet = MsiRecordGetString(hrec, 2, rgchPropName, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_BAD_IMAGE_FAMILY_SRC_PROP, rgchFamily, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("ImageFamilies.MediaSrcPropName"), szNull));
if (!FValidPropertyName(rgchPropName))
return (UiLogError(ERROR_PCW_BAD_IMAGE_FAMILY_SRC_PROP, rgchPropName, rgchFamily));
}
if (MsiRecordIsNull(hrec, 3) && iMinimumMsiVersion >= iWindowsInstallerXP)
{
// patch targets Windows Installer 2.0 or greater
// MediaDiskId is not required since sequence conflict management handles
// this automatically
}
else
{
// author chose to author this value so we will validate it; or author is not
// targeting the patch for Windows Installer 2.0 or greater
int iDiskId = MsiRecordGetInteger(hrec, 3);
if (iDiskId == MSI_NULL_INTEGER || iDiskId < 2)
return (UiLogError(ERROR_PCW_BAD_IMAGE_FAMILY_DISKID, rgchFamily, szNull));
}
if (MsiRecordIsNull(hrec, 4) && iMinimumMsiVersion >= iWindowsInstallerXP)
{
// patch targets Windows Installer 2.0 or greater
// FileSequenceStart is not required since sequence conflict management handles
// this automatically
}
else
{
// author chose to author this value so we will validate it; or author is not
// targeting the patch for Windows Installer 2.0 or greater
int iSeqStart = MsiRecordGetInteger(hrec, 4);
if (iSeqStart == MSI_NULL_INTEGER || iSeqStart < 2)
return (UiLogError(ERROR_PCW_BAD_IMAGE_FAMILY_FILESEQSTART, rgchFamily, szNull));
}
return (IDS_OKAY);
}
static int ICountRangeElements ( LPTSTR sz, BOOL fAllowZeros );
/* ********************************************************************** */
static UINT IdsValidateFamilyRangeRecords ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 )
{
Assert(hview != NULL);
Assert(hrec != NULL);
Assert(lp1 == 0L);
Assert(lp2 == 0L);
Assert(hdbInput != NULL);
TCHAR rgchFamily[MAX_LENGTH_IMAGE_FAMILY_NAME + 1];
DWORD dwcch = MAX_LENGTH_IMAGE_FAMILY_NAME + 1;
UINT uiRet = MsiRecordGetString(hrec, 1, rgchFamily, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_FAMILY_RANGE_NAME_TOO_LONG, szNull, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("FamilyFileRanges.Family"), szNull));
if (!FValidFamilyName(rgchFamily))
return (UiLogError(ERROR_PCW_BAD_FAMILY_RANGE_NAME, rgchFamily, szNull));
UpdateStatusMsg(0, 0, rgchFamily);
int iMinimumMsiVersion = 100;
EvalAssert( IDS_OKAY == IdsMsiGetPcwPropertyInteger(hdbInput, TEXT("MinimumRequiredMsiVersion"), &iMinimumMsiVersion) );
int iDiskId;
uiRet = IdsMsiGetTableInteger(hdbInput, TEXT("`ImageFamilies`"),
TEXT("`Family`"), TEXT("`MediaDiskId`"), rgchFamily, &iDiskId);
Assert(uiRet == IDS_OKAY);
if (iDiskId == MSI_NULL_INTEGER && iMinimumMsiVersion >= iWindowsInstallerXP)
{
// patch targets Windows Installer 2.0 so a NULL MediaDiskId is allowed
iDiskId = 2;
}
if (iDiskId < 2)
return (UiLogError(ERROR_PCW_BAD_FAMILY_RANGE_NAME, rgchFamily, szNull));
Assert(iDiskId != MSI_NULL_INTEGER && iDiskId >= 2);
TCHAR rgchFTK[MAX_PATH];
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 2, rgchFTK, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_FAMILY_RANGE_LONG_FILE_TABLE_KEY, rgchFamily, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("FamilyFileRanges.FTK"), szNull));
if (FEmptySz(rgchFTK))
return (UiLogError(ERROR_PCW_FAMILY_RANGE_BLANK_FILE_TABLE_KEY, rgchFamily, szNull));
TCHAR rgchRetainOffsets[MAX_PATH];
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 3, rgchRetainOffsets, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_FAMILY_RANGE_LONG_RETAIN_OFFSETS, rgchFamily, rgchFTK));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("FamilyFileRanges.RetainOffsets"), szNull));
if (FEmptySz(rgchRetainOffsets))
return (UiLogError(ERROR_PCW_FAMILY_RANGE_BLANK_RETAIN_OFFSETS, rgchFamily, rgchFTK));
int cRetainOffsets = ICountRangeElements(rgchRetainOffsets, fTrue);
if (cRetainOffsets <= 0)
return (UiLogError(ERROR_PCW_FAMILY_RANGE_BAD_RETAIN_OFFSETS, rgchFamily, rgchFTK));
Assert(cRetainOffsets < 256);
TCHAR rgchRetainLengths[MAX_PATH];
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 4, rgchRetainLengths, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_FAMILY_RANGE_LONG_RETAIN_LENGTHS, rgchFamily, rgchFTK));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("FamilyFileRanges.RetainLengths"), szNull));
if (FEmptySz(rgchRetainLengths))
return (UiLogError(ERROR_PCW_FAMILY_RANGE_BLANK_RETAIN_LENGTHS, rgchFamily, rgchFTK));
int cRetainLengths = ICountRangeElements(rgchRetainLengths, fFalse);
if (cRetainLengths <= 0)
return (UiLogError(ERROR_PCW_FAMILY_RANGE_BAD_RETAIN_LENGTHS, rgchFamily, rgchFTK));
Assert(cRetainLengths < 256);
if (cRetainOffsets != cRetainLengths)
return (UiLogError(ERROR_PCW_FAMILY_RANGE_COUNT_MISMATCH, rgchFamily, rgchFTK));
// TODO - could check for overlaps in ranges
EvalAssert( MSI_OKAY == MsiRecordSetInteger(hrec, 5, cRetainOffsets) );
EvalAssert( MSI_OKAY == MsiViewModify(hview, MSIMODIFY_UPDATE, hrec) );
return (IDS_OKAY);
}
/* ********************************************************************** */
static int ICountRangeElements ( LPTSTR sz, BOOL fAllowZeros )
{
Assert(sz != szNull);
CharLower(sz);
int iCount = 0;
while (!FEmptySz(sz))
{
ULONG ul = UlGetRangeElement(&sz);
if (sz == szNull)
{
Assert(ul == (ULONG)(-1));
return (-1);
}
if (ul == 0L && !fAllowZeros)
return (-1);
iCount++;
}
return (iCount);
}
/* ********************************************************************** */
ULONG UlGetRangeElement ( LPTSTR* psz )
{
Assert(psz != NULL);
LPTSTR sz = *psz;
Assert(!FEmptySz(sz));
BOOL fHex = FMatchPrefix(sz, TEXT("0x"));
if (fHex)
sz += 2;
ULONG ulRet = 0L;
ULONG ulMult = (fHex) ? 16L : 10L;
TCHAR ch = *sz;
do {
ULONG ulNext;
if (ch >= TEXT('0') && ch <= TEXT('9'))
ulNext = (ULONG)(ch - TEXT('0'));
else if (fHex && ch >= TEXT('a') && ch <= TEXT('f'))
ulNext = (ULONG)(ch - TEXT('a') + 10);
else
{
*psz = szNull;
return ((ULONG)(-1));
}
// TODO - watch for overflow
Assert(ulRet < ((ULONG)(-1) / ulMult));
ulRet = (ulRet * ulMult) + ulNext;
ch = *(++sz);
} while (ch != TEXT('\0') && ch != TEXT(','));
if (ch == TEXT(','))
{
sz++;
while (*sz == TEXT(' '))
sz++;
}
Assert(ulRet != (ULONG)(-1));
*psz = sz;
return (ulRet);
}
#define MSISOURCE_SFN 0x0001
#define MSISOURCE_COMPRESSED 0x0002
static BOOL FValidGUID ( LPTSTR sz, BOOL fList, BOOL fLeadAsterisk, BOOL fSemiColonSeparated );
static BOOL FValidProductVersion ( LPTSTR sz, UINT iFields );
static BOOL FEnsureAllSrcFilesExist ( MSIHANDLE hdb, LPTSTR szFolder, BOOL fLfn );
/* ********************************************************************** */
static UINT IdsValidateUpgradedRecords ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 )
{
Assert(hview != NULL);
Assert(hrec != NULL);
Assert(lp1 == 0L);
Assert(lp2 == 0L);
Assert(hdbInput != NULL);
TCHAR rgchUpgraded[MAX_LENGTH_TARGET_IMAGE_NAME + 1];
DWORD dwcch = MAX_LENGTH_TARGET_IMAGE_NAME + 1;
UINT uiRet = MsiRecordGetString(hrec, 1, rgchUpgraded, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_UPGRADED_IMAGE_NAME_TOO_LONG, szNull, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("UpgradedImages.Upgraded"), szNull));
UpdateStatusMsg(0, 0, rgchUpgraded);
if (!FValidImageName(rgchUpgraded))
return (UiLogError(ERROR_PCW_BAD_UPGRADED_IMAGE_NAME, rgchUpgraded, szNull));
TCHAR rgchFamily[MAX_PATH];
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 3, rgchFamily, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_BAD_UPGRADED_IMAGE_FAMILY, rgchUpgraded, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("UpgradedImages.Family"), szNull));
if (!FValidFamilyName(rgchFamily))
return (UiLogError(ERROR_PCW_BAD_UPGRADED_IMAGE_FAMILY, rgchUpgraded, rgchFamily));
// TODO for each file in this image that exists, check all
// UpgradedImages in this family with non-blank PackageCode fields
// for same file and FileName
if (!FUniqueImageName(rgchUpgraded, hdbInput))
return (UiLogError(ERROR_PCW_DUP_UPGRADED_IMAGE_NAME, rgchUpgraded, szNull));
TCHAR rgchMsiPath[MAX_PATH];
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 2, rgchMsiPath, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_UPGRADED_IMAGE_PATH_TOO_LONG, rgchUpgraded, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("UpgradedImages.MsiPath"), szNull));
if (FEmptySz(rgchMsiPath))
return (UiLogError(ERROR_PCW_UPGRADED_IMAGE_PATH_EMPTY, rgchUpgraded, szNull));
EvalAssert( FFixupPath(rgchMsiPath) );
if (FEmptySz(rgchMsiPath))
return (UiLogError(ERROR_PCW_UPGRADED_IMAGE_PATH_EMPTY, rgchUpgraded, szNull));
if (!FFileExist(rgchMsiPath))
return (UiLogError(ERROR_PCW_UPGRADED_IMAGE_PATH_NOT_EXIST, rgchMsiPath, szNull));
uiRet = IdsMsiUpdateTableRecordSz(hdbInput, TEXT("UpgradedImages"),
TEXT("MsiPath"), rgchMsiPath, TEXT("Upgraded"), rgchUpgraded);
Assert(uiRet == MSI_OKAY);
MSIHANDLE hSummaryInfo = NULL;
uiRet = MsiGetSummaryInformation(NULL, rgchMsiPath, 0, &hSummaryInfo);
if (uiRet != MSI_OKAY || hSummaryInfo == NULL)
return (UiLogError(ERROR_PCW_UPGRADED_IMAGE_PATH_NOT_MSI, rgchMsiPath, szNull));
UINT uiType;
INT intRet;
uiRet = MsiSummaryInfoGetProperty(hSummaryInfo, PID_MSISOURCE, &uiType, &intRet, NULL, NULL, NULL);
if (uiRet != MSI_OKAY || uiType != VT_I4 || intRet > 7)
return (UiLogError(ERROR_PCW_UPGRADED_IMAGE_PATH_NOT_MSI, rgchMsiPath, szNull));
if (intRet & MSISOURCE_COMPRESSED)
return (UiLogError(ERROR_PCW_UPGRADED_IMAGE_COMPRESSED, rgchMsiPath, szNull));
uiRet = IdsMsiUpdateTableRecordSz(hdbInput, TEXT("UpgradedImages"),
TEXT("LFN"), (intRet & MSISOURCE_SFN) ? TEXT("No") : TEXT("Yes"),
TEXT("Upgraded"), rgchUpgraded);
Assert(uiRet == MSI_OKAY);
TCHAR rgchData[MAX_PATH+MAX_PATH];
dwcch = MAX_PATH+MAX_PATH;
uiRet = MsiSummaryInfoGetProperty(hSummaryInfo, PID_REVNUMBER, &uiType, NULL, NULL, rgchData, &dwcch);
if (uiRet != MSI_OKAY || uiType != VT_LPTSTR)
return (UiLogError(ERROR_PCW_UPGRADED_IMAGE_PATH_NOT_MSI, rgchMsiPath, szNull));
uiRet = IdsMsiUpdateTableRecordSz(hdbInput, TEXT("UpgradedImages"),
TEXT("PackageCode"), rgchData, TEXT("Upgraded"), rgchUpgraded);
Assert(uiRet == MSI_OKAY);
if (!FUniquePackageCode(rgchData, hdbInput))
return (UiLogError(ERROR_PCW_DUP_UPGRADED_IMAGE_PACKCODE, rgchUpgraded, rgchData));
dwcch = MAX_PATH+MAX_PATH;
uiRet = MsiSummaryInfoGetProperty(hSummaryInfo, PID_SUBJECT, &uiType, NULL, NULL, rgchData, &dwcch);
if (uiRet != MSI_OKAY || uiType != VT_LPTSTR)
return (UiLogError(ERROR_PCW_UPGRADED_IMAGE_PATH_NOT_MSI, rgchMsiPath, szNull));
uiRet = IdsMsiUpdateTableRecordSz(hdbInput, TEXT("UpgradedImages"),
TEXT("SummSubject"), rgchData, TEXT("Upgraded"), rgchUpgraded);
Assert(uiRet == MSI_OKAY);
dwcch = MAX_PATH+MAX_PATH;
uiRet = MsiSummaryInfoGetProperty(hSummaryInfo, PID_COMMENTS, &uiType, NULL, NULL, rgchData, &dwcch);
if (uiRet != MSI_OKAY || uiType != VT_LPTSTR)
return (UiLogError(ERROR_PCW_UPGRADED_IMAGE_PATH_NOT_MSI, rgchMsiPath, szNull));
uiRet = IdsMsiUpdateTableRecordSz(hdbInput, TEXT("UpgradedImages"),
TEXT("SummComments"), rgchData, TEXT("Upgraded"), rgchUpgraded);
Assert(uiRet == MSI_OKAY);
EvalAssert( MsiCloseHandle(hSummaryInfo) == MSI_OKAY );
MSIHANDLE hdb = NULL;
uiRet = MsiOpenDatabase(rgchMsiPath, MSIDBOPEN_READONLY, &hdb);
if (uiRet != MSI_OKAY)
return (UiLogError(ERROR_PCW_UPGRADED_IMAGE_PATH_NOT_MSI, rgchMsiPath, szNull));
Assert(hdb != NULL);
// NYI bug 9392 - could call ICE24 validation on this
EvalAssert( MSI_OKAY == IdsMsiGetPropertyString(hdb, TEXT("ProductCode"), rgchData, MAX_PATH) );
if (!FValidGUID(rgchData, fFalse, fFalse, fFalse))
return (UiLogError(ERROR_PCW_BAD_UPGRADED_IMAGE_PRODUCT_CODE, rgchUpgraded, szNull));
uiRet = IdsMsiUpdateTableRecordSz(hdbInput, TEXT("UpgradedImages"),
TEXT("ProductCode"), rgchData, TEXT("Upgraded"), rgchUpgraded);
Assert(uiRet == MSI_OKAY);
EvalAssert( MSI_OKAY == IdsMsiGetPropertyString(hdb, TEXT("ProductVersion"), rgchData, MAX_PATH) );
if (!FValidProductVersion(rgchData, 4))
return (UiLogError(ERROR_PCW_BAD_UPGRADED_IMAGE_PRODUCT_VERSION, rgchUpgraded, szNull));
uiRet = IdsMsiUpdateTableRecordSz(hdbInput, TEXT("UpgradedImages"),
TEXT("ProductVersion"), rgchData, TEXT("Upgraded"), rgchUpgraded);
Assert(uiRet == MSI_OKAY);
EvalAssert( MSI_OKAY == IdsMsiGetPropertyString(hdb, TEXT("UpgradeCode"), rgchData, MAX_PATH) );
if (!FEmptySz(rgchData) && !FValidGUID(rgchData, fFalse, fFalse, fFalse))
return (UiLogError(ERROR_PCW_BAD_UPGRADED_IMAGE_UPGRADE_CODE, rgchUpgraded, szNull));
uiRet = IdsMsiUpdateTableRecordSz(hdbInput, TEXT("UpgradedImages"),
TEXT("UpgradeCode"), rgchData, TEXT("Upgraded"), rgchUpgraded);
Assert(uiRet == MSI_OKAY);
StringCchPrintf(rgchData, sizeof(rgchData)/sizeof(TCHAR), TEXT("Upgraded image: %s"), rgchUpgraded);
UpdateStatusMsg(IDS_STATUS_VALIDATE_IMAGES, rgchData, szEmpty);
lstrcpy(rgchData, rgchMsiPath);
*SzFindFilenameInPath(rgchData) = TEXT('\0');
// if (!FEnsureAllSrcFilesExist(hdb, rgchData, !(intRet & MSISOURCE_SFN)))
// return (UiLogError(ERROR_PCW_UPGRADED_MISSING_SRC_FILES, rgchData, szNull));
// UpdateStatusMsg(IDS_STATUS_VALIDATE_INPUT, TEXT("Table: UpgradedImages"), rgchUpgraded);
int iMinimumMsiVersion = 100;
EvalAssert( IDS_OKAY == IdsMsiGetPcwPropertyInteger(hdbInput, TEXT("MinimumRequiredMsiVersion"), &iMinimumMsiVersion) );
int iDiskId;
uiRet = IdsMsiGetTableInteger(hdbInput, TEXT("`ImageFamilies`"),
TEXT("`Family`"), TEXT("`MediaDiskId`"), rgchFamily, &iDiskId);
Assert(uiRet == IDS_OKAY);
if (iDiskId == MSI_NULL_INTEGER && iMinimumMsiVersion >= iWindowsInstallerXP)
{
// patch targets Windows Installer 2.0, MediaDiskId can be NULL
iDiskId = 2;
}
if (iDiskId < 2)
return (UiLogError(ERROR_PCW_BAD_UPGRADED_IMAGE_FAMILY, rgchUpgraded, rgchFamily));
Assert(iDiskId != MSI_NULL_INTEGER && iDiskId >= 2);
int iFileSeqStart;
uiRet = IdsMsiGetTableInteger(hdbInput, TEXT("`ImageFamilies`"),
TEXT("`Family`"), TEXT("`FileSequenceStart`"), rgchFamily, &iFileSeqStart);
Assert(uiRet == IDS_OKAY);
if (iFileSeqStart == MSI_NULL_INTEGER && iMinimumMsiVersion >= iWindowsInstallerXP)
{
// patch targets Windows Installer 2.0, FileSequenceStart can be NULL
iFileSeqStart = 2;
}
Assert(iFileSeqStart != MSI_NULL_INTEGER && iFileSeqStart >= 2);
// verify ImageFamilies.FileSequenceStart (pcp) > Media.LastSequence (upgraded image)
// -- only matters when not targeting Windows XP or greater since XP or greater has conflict mgmt
if (iMinimumMsiVersion < iWindowsInstallerXP)
{
PMSIHANDLE hViewMedia = 0;
PMSIHANDLE hRecMedia = 0;
EvalAssert( MsiDatabaseOpenView(hdb, TEXT("SELECT `LastSequence` FROM `Media`"), &hViewMedia) == MSI_OKAY );
EvalAssert( MsiViewExecute(hViewMedia, 0) == MSI_OKAY );
int iMediaLargestLastSequence = 0;
int iSequence = 0;
while (ERROR_SUCCESS == (uiRet = MsiViewFetch(hViewMedia, &hRecMedia)))
{
iSequence = MsiRecordGetInteger(hRecMedia, 1);
if (iSequence > iMediaLargestLastSequence)
{
iMediaLargestLastSequence = iSequence;
}
}
Assert( ERROR_NO_MORE_ITEMS == uiRet );
if (iFileSeqStart <= iMediaLargestLastSequence)
{
// overlapping sequence numbers
return (UiLogError(ERROR_PCW_BAD_FILE_SEQUENCE_START, rgchFamily, rgchUpgraded));
}
}
// TODO ensure all Media.DiskId, PatchPackage.PatchId < iDiskId
// ensure all File.Sequence < iFileSeqStart
// assert that ExecuteSequence tables have InstallFiles actions
// assert that if PatchFiles is present it comes after InstallFiles
// EvalAssert( MsiCloseHandle(hdb) == MSI_OKAY );
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 4, rgchMsiPath, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_UPGRADED_IMAGE_PATCH_PATH_TOO_LONG, rgchUpgraded, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("UpgradedImages.PatchMsiPath"), szNull));
if (!FEmptySz(rgchMsiPath))
{
EvalAssert( FFixupPath(rgchMsiPath) );
Assert(!FEmptySz(rgchMsiPath));
if (!FFileExist(rgchMsiPath))
return (UiLogError(ERROR_PCW_UPGRADED_IMAGE_PATCH_PATH_NOT_EXIST, rgchMsiPath, szNull));
uiRet = IdsMsiUpdateTableRecordSz(hdbInput, TEXT("UpgradedImages"),
TEXT("PatchMsiPath"), rgchMsiPath, TEXT("Upgraded"), rgchUpgraded);
Assert(uiRet == MSI_OKAY);
hSummaryInfo = NULL;
uiRet = MsiGetSummaryInformation(NULL, rgchMsiPath, 0, &hSummaryInfo);
if (uiRet != MSI_OKAY || hSummaryInfo == NULL)
return (UiLogError(ERROR_PCW_UPGRADED_IMAGE_PATCH_PATH_NOT_MSI, rgchMsiPath, szNull));
EvalAssert( MsiCloseHandle(hSummaryInfo) == MSI_OKAY );
}
EvalAssert( MsiCloseHandle(hdb) == MSI_OKAY );
return (IDS_OKAY);
}
/* ********************************************************************** */
static BOOL FValidProductVersion ( LPTSTR sz, UINT iFields )
{
Assert(iFields <= 4);
if (FEmptySz(sz))
return (iFields < 4);
if (*sz < TEXT('0') || *sz > TEXT('9'))
return (fFalse);
DWORD dw = 0;
while (*sz >= TEXT('0') && *sz <= TEXT('9'))
{
dw = (dw * 10) + (*sz - TEXT('0'));
if (dw > 65535)
return (fFalse);
sz = CharNext(sz);
}
if (*sz == TEXT('.'))
sz = CharNext(sz);
else if (*sz != TEXT('\0'))
return (fFalse);
return (FValidProductVersion(sz, --iFields));
}
static BOOL FValidProdValValue ( LPTSTR sz );
/* ********************************************************************** */
static UINT IdsValidateTargetRecords ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 )
{
Assert(hview != NULL);
Assert(hrec != NULL);
Assert(lp1 == 0L);
Assert(lp2 == 0L);
Assert(hdbInput != NULL);
TCHAR rgchTarget[MAX_LENGTH_TARGET_IMAGE_NAME + 1];
DWORD dwcch = MAX_LENGTH_TARGET_IMAGE_NAME + 1;
UINT uiRet = MsiRecordGetString(hrec, 1, rgchTarget, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_TARGET_IMAGE_NAME_TOO_LONG, szNull, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("TargetImages.Target"), szNull));
UpdateStatusMsg(0, 0, rgchTarget);
if (!FValidImageName(rgchTarget))
return (UiLogError(ERROR_PCW_BAD_TARGET_IMAGE_NAME, rgchTarget, szNull));
if (!FUniqueImageName(rgchTarget, hdbInput))
return (UiLogError(ERROR_PCW_DUP_TARGET_IMAGE_NAME, rgchTarget, szNull));
TCHAR rgchMsiPath[MAX_PATH];
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 2, rgchMsiPath, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_TARGET_IMAGE_PATH_TOO_LONG, rgchTarget, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("TargetImages.MsiPath"), szNull));
if (FEmptySz(rgchMsiPath))
return (UiLogError(ERROR_PCW_TARGET_IMAGE_PATH_EMPTY, rgchTarget, szNull));
EvalAssert( FFixupPath(rgchMsiPath) );
if (FEmptySz(rgchMsiPath))
return (UiLogError(ERROR_PCW_TARGET_IMAGE_PATH_EMPTY, rgchTarget, szNull));
if (!FFileExist(rgchMsiPath))
return (UiLogError(ERROR_PCW_TARGET_IMAGE_PATH_NOT_EXIST, rgchMsiPath, szNull));
uiRet = IdsMsiUpdateTableRecordSz(hdbInput, TEXT("TargetImages"),
TEXT("MsiPath"), rgchMsiPath, TEXT("Target"), rgchTarget);
Assert(uiRet == MSI_OKAY);
MSIHANDLE hSummaryInfo = NULL;
uiRet = MsiGetSummaryInformation(NULL, rgchMsiPath, 0, &hSummaryInfo);
if (uiRet != MSI_OKAY || hSummaryInfo == NULL)
return (UiLogError(ERROR_PCW_TARGET_IMAGE_PATH_NOT_MSI, rgchMsiPath, szNull));
UINT uiType;
INT intRet;
uiRet = MsiSummaryInfoGetProperty(hSummaryInfo, PID_MSISOURCE, &uiType, &intRet, NULL, NULL, NULL);
if (uiRet != MSI_OKAY || uiType != VT_I4 || intRet > 7)
return (UiLogError(ERROR_PCW_TARGET_IMAGE_PATH_NOT_MSI, rgchMsiPath, szNull));
if (intRet & MSISOURCE_COMPRESSED)
return (UiLogError(ERROR_PCW_TARGET_IMAGE_COMPRESSED, rgchMsiPath, szNull));
TCHAR rgchData[MAX_PATH+MAX_PATH];
dwcch = MAX_PATH+MAX_PATH;
uiRet = MsiSummaryInfoGetProperty(hSummaryInfo, PID_REVNUMBER, &uiType, NULL, NULL, rgchData, &dwcch);
if (uiRet != MSI_OKAY || uiType != VT_LPTSTR)
return (UiLogError(ERROR_PCW_TARGET_IMAGE_PATH_NOT_MSI, rgchMsiPath, szNull));
uiRet = IdsMsiUpdateTableRecordSz(hdbInput, TEXT("TargetImages"),
TEXT("PackageCode"), rgchData, TEXT("Target"), rgchTarget);
Assert(uiRet == MSI_OKAY);
if (!FUniquePackageCode(rgchData, hdbInput))
return (UiLogError(ERROR_PCW_DUP_TARGET_IMAGE_PACKCODE, rgchTarget, rgchData));
EvalAssert( MsiCloseHandle(hSummaryInfo) == MSI_OKAY );
uiRet = IdsMsiUpdateTableRecordSz(hdbInput, TEXT("TargetImages"),
TEXT("LFN"), (intRet & MSISOURCE_SFN) ? TEXT("No") : TEXT("Yes"),
TEXT("Target"), rgchTarget);
Assert(uiRet == MSI_OKAY);
MSIHANDLE hdb = NULL;
uiRet = MsiOpenDatabase(rgchMsiPath, MSIDBOPEN_READONLY, &hdb);
if (uiRet != MSI_OKAY)
return (UiLogError(ERROR_PCW_TARGET_IMAGE_PATH_NOT_MSI, rgchMsiPath, szNull));
Assert(hdb != NULL);
// NYI bug 9392 - could call ICE24 validation on this
EvalAssert( MSI_OKAY == IdsMsiGetPropertyString(hdb, TEXT("ProductCode"), rgchData, MAX_PATH) );
if (!FValidGUID(rgchData, fFalse, fFalse, fFalse))
return (UiLogError(ERROR_PCW_BAD_TARGET_IMAGE_PRODUCT_CODE, rgchTarget, szNull));
uiRet = IdsMsiUpdateTableRecordSz(hdbInput, TEXT("TargetImages"),
TEXT("ProductCode"), rgchData, TEXT("Target"), rgchTarget);
Assert(uiRet == MSI_OKAY);
EvalAssert( MSI_OKAY == IdsMsiGetPropertyString(hdb, TEXT("ProductVersion"), rgchData, MAX_PATH) );
if (!FValidProductVersion(rgchData, 4))
return (UiLogError(ERROR_PCW_BAD_TARGET_IMAGE_PRODUCT_VERSION, rgchTarget, szNull));
uiRet = IdsMsiUpdateTableRecordSz(hdbInput, TEXT("TargetImages"),
TEXT("ProductVersion"), rgchData, TEXT("Target"), rgchTarget);
Assert(uiRet == MSI_OKAY);
EvalAssert( MSI_OKAY == IdsMsiGetPropertyString(hdb, TEXT("UpgradeCode"), rgchData, MAX_PATH) );
if (!FEmptySz(rgchData) && !FValidGUID(rgchData, fFalse, fFalse, fFalse))
return (UiLogError(ERROR_PCW_BAD_TARGET_IMAGE_UPGRADE_CODE, rgchTarget, szNull));
uiRet = IdsMsiUpdateTableRecordSz(hdbInput, TEXT("TargetImages"),
TEXT("UpgradeCode"), rgchData, TEXT("Target"), rgchTarget);
Assert(uiRet == MSI_OKAY);
StringCchPrintf(rgchData, sizeof(rgchData)/sizeof(TCHAR), TEXT("Target image: %s"), rgchTarget);
UpdateStatusMsg(IDS_STATUS_VALIDATE_IMAGES, rgchData, szEmpty);
lstrcpy(rgchData, rgchMsiPath);
*SzFindFilenameInPath(rgchData) = TEXT('\0');
// int iIgnoreMissingSrcFiles = MsiRecordGetInteger(hrec, 6);
// if (iIgnoreMissingSrcFiles == MSI_NULL_INTEGER || iIgnoreMissingSrcFiles == 0)
// {
// if (!FEnsureAllSrcFilesExist(hdb, rgchData, !(intRet & MSISOURCE_SFN)))
// return (UiLogError(ERROR_PCW_TARGET_MISSING_SRC_FILES, rgchData, szNull));
// UpdateStatusMsg(IDS_STATUS_VALIDATE_INPUT, TEXT("Table: TargetImages"), rgchTarget);
// }
EvalAssert( MsiCloseHandle(hdb) == MSI_OKAY );
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 3, rgchData, &dwcch); // Upgraded
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_BAD_TARGET_IMAGE_UPGRADED, rgchTarget, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("TargetImages.Upgraded"), szNull));
if (!FValidImageName(rgchData))
return (UiLogError(ERROR_PCW_BAD_TARGET_IMAGE_UPGRADED, rgchTarget, rgchData));
TCHAR rgchFamily[32];
uiRet = IdsMsiGetTableString(hdbInput, TEXT("`UpgradedImages`"),
TEXT("`Upgraded`"), TEXT("`Family`"), rgchData, rgchFamily, 32);
Assert(uiRet == IDS_OKAY);
if (!FValidFamilyName(rgchFamily))
return (UiLogError(ERROR_PCW_BAD_TARGET_IMAGE_UPGRADED, rgchTarget, rgchData));
uiRet = IdsMsiUpdateTableRecordSz(hdbInput, TEXT("TargetImages"),
TEXT("Family"), rgchFamily, TEXT("Target"), rgchTarget);
Assert(uiRet == MSI_OKAY);
int iDiskId;
uiRet = IdsMsiGetTableInteger(hdbInput, TEXT("`ImageFamilies`"),
TEXT("`Family`"), TEXT("`MediaDiskId`"), rgchFamily, &iDiskId);
Assert(uiRet == IDS_OKAY);
Assert(iDiskId != MSI_NULL_INTEGER && iDiskId >= 2);
int iFileSeqStart;
uiRet = IdsMsiGetTableInteger(hdbInput, TEXT("`ImageFamilies`"),
TEXT("`Family`"), TEXT("`FileSequenceStart`"), rgchFamily, &iFileSeqStart);
Assert(uiRet == IDS_OKAY);
Assert(iFileSeqStart != MSI_NULL_INTEGER && iFileSeqStart >= 2);
// TODO ensure all Media.DiskId, PatchPackage.PatchId < iDiskId
// ensure all File.Sequence < iFileSeqStart
// assert that ExecuteSequence tables have InstallFiles actions
// assert that if PatchFiles is present it comes after InstallFiles
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 4, rgchData, &dwcch); // ProductValidateFlags
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_TARGET_BAD_PROD_VALIDATE, rgchTarget, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("TargetImages.ProductValidateFlags"), szNull));
if (FEmptySz(rgchData))
{
Assert(FValidProdValValue(TEXT("0x00000922")));
uiRet = IdsMsiUpdateTableRecordSz(hdbInput, TEXT("TargetImages"),
TEXT("ProductValidateFlags"), TEXT("0x00000922"), TEXT("Target"), rgchTarget);
Assert(uiRet == MSI_OKAY);
g_fValidateProductCodeIncluded = TRUE;
}
else
{
if (!FValidHexValue(rgchData) || !FValidProdValValue(rgchData))
return (UiLogError(ERROR_PCW_TARGET_BAD_PROD_VALIDATE, rgchTarget, szNull));
// see if MSITRANSFORM_VALIDATE_PRODUCT is included (0x00000002)
ULONG ulFlags = UlFromHexSz(rgchData);
if (ulFlags & MSITRANSFORM_VALIDATE_PRODUCT)
{
g_fValidateProductCodeIncluded = TRUE;
}
}
Assert(iOrderMax > 0);
int iOrder = MsiRecordGetInteger(hrec, 5);
if (iOrder == MSI_NULL_INTEGER || iOrder < 0)
{
uiRet = IdsMsiUpdateTableRecordInt(hdbInput, TEXT("TargetImages"), TEXT("Order"), iOrderMax-1, TEXT("Target"), rgchTarget);
Assert(uiRet == MSI_OKAY);
}
Assert(iOrder < iOrderMax);
return (IDS_OKAY);
}
/* ********************************************************************** */
static BOOL FValidProdValValue ( LPTSTR sz )
{
Assert(!FEmptySz(sz));
Assert(FValidHexValue(sz));
ULONG ulFlags = UlFromHexSz(sz);
if (ulFlags > 0x00000FFF)
EvalAssert( FWriteLogFile(TEXT(" WARNING: TargetImages.ProductValidateFlags contains unknown bits above 0x00000FFF that might cause patch to fail.\r\n")) );
UINT cVerFlags = 0;
if (ulFlags & MSITRANSFORM_VALIDATE_MAJORVERSION)
cVerFlags++;
if (ulFlags & MSITRANSFORM_VALIDATE_MINORVERSION)
cVerFlags++;
if (ulFlags & MSITRANSFORM_VALIDATE_UPDATEVERSION)
cVerFlags++;
UINT cCompFlags = 0;
if (ulFlags & MSITRANSFORM_VALIDATE_NEWLESSBASEVERSION)
cCompFlags++;
if (ulFlags & MSITRANSFORM_VALIDATE_NEWLESSEQUALBASEVERSION)
cCompFlags++;
if (ulFlags & MSITRANSFORM_VALIDATE_NEWEQUALBASEVERSION)
cCompFlags++;
if (ulFlags & MSITRANSFORM_VALIDATE_NEWGREATEREQUALBASEVERSION)
cCompFlags++;
if (ulFlags & MSITRANSFORM_VALIDATE_NEWGREATERBASEVERSION)
cCompFlags++;
// prevent specification of product version check without comparison flag
if (cVerFlags >= 1 && cCompFlags == 0)
{
EvalAssert( FWriteLogFile(TEXT(" ERROR: TargetImages.ProductValidateFlags specifies validation of the product version but does not also include a product version comparison flag.\r\n")) );
return FALSE;
}
return (cVerFlags <= 1 && cCompFlags <= 1);
}
#ifdef UNUSED
static LPTSTR g_szFolder = szNull;
static LPTSTR g_szFName = szNull;
static UINT IdsCheckFileExists ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 );
/* ********************************************************************** */
static BOOL FEnsureAllSrcFilesExist ( MSIHANDLE hdb, LPTSTR szFolder, BOOL fLfn )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szFolder));
Assert(FFolderExist(szFolder));
g_szFolder = szFolder;
g_szFName = szFolder + lstrlen(szFolder);
UINT ids = IdsMsiEnumTable(hdb, TEXT("`File`"),
TEXT("`File`,`Component_`,`FileName`"),
szNull, IdsCheckFileExists,
(LPARAM)(hdb), (LPARAM)(fLfn));
return (ids == MSI_OKAY);
}
/* ********************************************************************** */
static UINT IdsCheckFileExists ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 )
{
Assert(hview != NULL);
Assert(hrec != NULL);
MSIHANDLE hdb = (MSIHANDLE)(lp1);
Assert(hdb != NULL);
BOOL fLfn = (BOOL)(lp2);
Assert(!FEmptySz(g_szFolder));
Assert(g_szFName != szNull);
Assert(g_szFName > g_szFolder);
*g_szFName = TEXT('\0');
Assert(FFolderExist(g_szFolder)); // true but expensive to test repeatedly
TCHAR rgchComponent[MAX_PATH];
TCHAR rgchFName[MAX_PATH];
DWORD dwcch = MAX_PATH;
UINT uiRet = MsiRecordGetString(hrec, 1, rgchFName, &dwcch);
Assert(uiRet == MSI_OKAY);
Assert(!FEmptySz(rgchFName));
UpdateStatusMsg(0, 0, rgchFName);
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 2, rgchComponent, &dwcch);
Assert(uiRet == MSI_OKAY);
Assert(!FEmptySz(rgchComponent));
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 3, rgchFName, &dwcch);
Assert(uiRet == MSI_OKAY);
Assert(!FEmptySz(rgchFName));
uiRet = IdsResolveSrcFilePathSzs(hdb, g_szFName, rgchComponent, rgchFName, fLfn, szNull);
Assert(uiRet == MSI_OKAY);
Assert(!FEmptySz(g_szFName));
return ((FFileExist(g_szFolder)) ? IDS_OKAY : IDS_CANCEL);
}
#endif /* UNUSED */
static UINT IdsResolveSrcDir ( MSIHANDLE hdb, LPTSTR szDir, LPTSTR szBuf, BOOL fLfn, LPTSTR szFullSubFolder );
/* ********************************************************************** */
UINT IdsResolveSrcFilePathSzs ( MSIHANDLE hdb, LPTSTR szBuf, LPTSTR szComponent, LPTSTR szFName, BOOL fLfn, LPTSTR szFullSubFolder )
{
Assert(hdb != NULL);
Assert(szBuf != szNull);
Assert(!FEmptySz(szComponent));
Assert(!FEmptySz(szFName));
Assert(*szFName != TEXT('\\'));
Assert(*SzLastChar(szFName) != TEXT('\\'));
*szBuf = TEXT('\0');
if (szFullSubFolder != szNull)
*szFullSubFolder = TEXT('\0');
TCHAR rgchDir[MAX_PATH] = {0};
UINT ids = IdsMsiGetTableString(hdb, TEXT("`Component`"), TEXT("`Component`"), TEXT("`Directory_`"), szComponent, rgchDir, MAX_PATH);
Assert(ids == MSI_OKAY);
Assert(!FEmptySz(rgchDir));
ids = IdsResolveSrcDir(hdb, rgchDir, szBuf, fLfn, szFullSubFolder);
Assert(ids == MSI_OKAY);
Assert(!FEmptySz(szBuf));
LPTSTR szBar = szFName;
while (*szBar != TEXT('\0') && *szBar != TEXT('|'))
szBar = CharNext(szBar);
if (!fLfn)
*szBar = TEXT('\0');
if (*szBar == TEXT('\0'))
lstrcat(szBuf, szFName);
else
{
Assert(fLfn);
Assert(*CharNext(szBar) != TEXT('\0'));
Assert(*CharNext(szBar) != TEXT('\\'));
lstrcat(szBuf, CharNext(szBar));
}
return (MSI_OKAY);
}
/* ********************************************************************** */
static UINT IdsResolveSrcDir ( MSIHANDLE hdb, LPTSTR szDir, LPTSTR szBuf, BOOL fLfn, LPTSTR szFullSubFolder )
{
/* RECURSION WARNING */
Assert(hdb != NULL);
Assert(!FEmptySz(szDir));
Assert(szBuf != szNull);
Assert(*szBuf == TEXT('\0'));
TCHAR rgchData[MAX_PATH] = {0};
UINT ids = IdsMsiGetTableString(hdb, TEXT("`Directory`"), TEXT("`Directory`"), TEXT("`Directory_Parent`"), szDir, rgchData, MAX_PATH);
Assert(ids == MSI_OKAY);
if (!FEmptySz(rgchData) && lstrcmp(rgchData, szDir))
{
ids = IdsResolveSrcDir(hdb, rgchData, szBuf, fLfn, szFullSubFolder);
Assert(ids == MSI_OKAY);
Assert(!FEmptySz(szBuf));
Assert(*SzLastChar(szBuf) == TEXT('\\'));
if (szFullSubFolder != szNull)
{
Assert(!FEmptySz(szFullSubFolder));
Assert(*SzLastChar(szFullSubFolder) == TEXT('\\'));
}
}
ids = IdsMsiGetTableString(hdb, TEXT("`Directory`"), TEXT("`Directory`"), TEXT("`DefaultDir`"), szDir, rgchData, MAX_PATH);
Assert(ids == MSI_OKAY);
Assert(!FEmptySz(rgchData));
Assert(*rgchData != TEXT('\\'));
Assert(*rgchData != TEXT('|'));
Assert(*SzLastChar(rgchData) != TEXT('\\'));
LPTSTR szCur = rgchData;
if (szFullSubFolder != szNull)
lstrcat(szFullSubFolder, rgchData);
while (*szCur != TEXT('\0') && *szCur != TEXT(':'))
szCur = CharNext(szCur);
if (*szCur == TEXT(':'))
{
lstrcpy(rgchData, CharNext(szCur));
Assert(!FEmptySz(rgchData));
Assert(*rgchData != TEXT('\\'));
Assert(*rgchData != TEXT('|'));
}
if (szFullSubFolder != szNull)
{
Assert(*SzLastChar(szFullSubFolder) != TEXT('\\'));
lstrcat(szFullSubFolder, TEXT("\\"));
}
szCur = rgchData;
while (*szCur != TEXT('\0') && *szCur != TEXT('|'))
szCur = CharNext(szCur);
if (!fLfn)
*szCur = TEXT('\0');
if (*szCur == TEXT('\0'))
szCur = rgchData;
else
{
Assert(fLfn);
Assert(*CharNext(szCur) != TEXT('\0'));
Assert(*CharNext(szCur) != TEXT('\\'));
szCur = CharNext(szCur);
}
if (!lstrcmp(szCur, TEXT("SOURCEDIR")) || !lstrcmp(szCur, TEXT("SourceDir")))
lstrcpy(szBuf, TEXT("."));
else
lstrcat(szBuf, szCur);
Assert(*SzLastChar(szBuf) != TEXT('\\'));
lstrcat(szBuf, TEXT("\\"));
return (MSI_OKAY);
}
/* ********************************************************************** */
static UINT IdsValidateExternalFileRecords ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 )
{
Assert(hview != NULL);
Assert(hrec != NULL);
Assert(lp1 == 0L);
Assert(lp2 == 0L);
Assert(hdbInput != NULL);
TCHAR rgchFamily[MAX_PATH];
DWORD dwcch = MAX_PATH;
UINT uiRet = MsiRecordGetString(hrec, 1, rgchFamily, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_EXTFILE_BAD_FAMILY_FIELD, szNull, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("ExternalFiles.Family"), szNull));
if (!FValidFamilyName(rgchFamily))
return (UiLogError(ERROR_PCW_EXTFILE_BAD_FAMILY_FIELD, rgchFamily, szNull));
int iMinimumMsiVersion = 100;
EvalAssert( IDS_OKAY == IdsMsiGetPcwPropertyInteger(hdbInput, TEXT("MinimumRequiredMsiVersion"), &iMinimumMsiVersion) );
int iDiskId;
uiRet = IdsMsiGetTableInteger(hdbInput, TEXT("`ImageFamilies`"),
TEXT("`Family`"), TEXT("`MediaDiskId`"), rgchFamily, &iDiskId);
Assert(uiRet == IDS_OKAY);
if (iDiskId == MSI_NULL_INTEGER && iMinimumMsiVersion >= iWindowsInstallerXP)
{
// patch is targeted to Windows Installer 2.0 so MediaDiskId can be NULL
iDiskId = 2;
}
if (iDiskId <= 0)
return (UiLogError(ERROR_PCW_EXTFILE_BAD_FAMILY_FIELD, rgchFamily, szNull));
TCHAR rgchFTK[MAX_PATH];
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 2, rgchFTK, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_EXTFILE_LONG_FILE_TABLE_KEY, rgchFamily, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("ExternalFiles.FTK"), szNull));
if (FEmptySz(rgchFTK))
return (UiLogError(ERROR_PCW_EXTFILE_BLANK_FILE_TABLE_KEY, rgchFamily, szNull));
TCHAR rgchPath[MAX_PATH];
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 3, rgchPath, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_EXTFILE_LONG_PATH_TO_FILE, rgchFamily, rgchFTK));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("ExternalFiles.FilePath"), szNull));
if (FEmptySz(rgchPath))
return (UiLogError(ERROR_PCW_EXTFILE_BLANK_PATH_TO_FILE, rgchFamily, rgchFTK));
EvalAssert( FFixupPath(rgchPath) );
if (FEmptySz(rgchPath))
return (UiLogError(ERROR_PCW_EXTFILE_BLANK_PATH_TO_FILE, rgchFamily, rgchFTK));
if (!FFileExist(rgchPath))
return (UiLogError(ERROR_PCW_EXTFILE_MISSING_FILE, rgchPath, rgchFamily));
EvalAssert( MSI_OKAY == MsiRecordSetString(hrec, 3, rgchPath) );
Assert(iOrderMax > 0);
int iOrder = MsiRecordGetInteger(hrec, 4);
if (iOrder == MSI_NULL_INTEGER || iOrder < 0)
EvalAssert( MSI_OKAY == MsiRecordSetInteger(hrec, 4, iOrderMax-1) );
Assert(iOrder < iOrderMax);
TCHAR rgchOffsets[MAX_PATH];
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 5, rgchOffsets, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_EXTFILE_LONG_IGNORE_OFFSETS, rgchFamily, rgchFTK));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("ExternalFiles.IgnoreOffsets"), szNull));
int cOffsets = ICountRangeElements(rgchOffsets, fTrue);
if (cOffsets < 0)
return (UiLogError(ERROR_PCW_EXTFILE_BAD_IGNORE_OFFSETS, rgchFamily, rgchFTK));
Assert(cOffsets < 256);
TCHAR rgchLengths[MAX_PATH];
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 6, rgchLengths, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_EXTFILE_LONG_IGNORE_LENGTHS, rgchFamily, rgchFTK));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("ExternalFiles.IgnoreLengths"), szNull));
int cLengths = ICountRangeElements(rgchLengths, fFalse);
if (cLengths < 0)
return (UiLogError(ERROR_PCW_EXTFILE_BAD_IGNORE_LENGTHS, rgchFamily, rgchFTK));
Assert(cLengths < 256);
if (cOffsets != cLengths)
return (UiLogError(ERROR_PCW_EXTFILE_IGNORE_COUNT_MISMATCH, rgchFamily, rgchFTK));
EvalAssert( MSI_OKAY == MsiRecordSetInteger(hrec, 8, cOffsets) );
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 7, rgchOffsets, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_EXTFILE_LONG_RETAIN_OFFSETS, rgchFamily, rgchFTK));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("ExternalFiles.RetainOffsets"), szNull));
cOffsets = ICountRangeElements(rgchOffsets, fTrue);
if (cOffsets < 0)
return (UiLogError(ERROR_PCW_EXTFILE_BAD_RETAIN_OFFSETS, rgchFamily, rgchFTK));
Assert(cOffsets < 256);
if (cOffsets > 0)
{
StringCchPrintf(rgchLengths, sizeof(rgchLengths)/sizeof(TCHAR), TEXT("`Family`='%s' AND `FTK`='%s'"), rgchFamily, rgchFTK);
uiRet = IdsMsiGetTableIntegerWhere(hdbInput, TEXT("`FamilyFileRanges`"),
TEXT("`RetainCount`"), rgchLengths, &cLengths);
Assert(uiRet == MSI_OKAY);
if (cOffsets != cLengths)
return (UiLogError(ERROR_PCW_EXTFILE_IGNORE_COUNT_MISMATCH, rgchFamily, rgchFTK));
}
// TODO - could check for overlaps in ranges
EvalAssert( MSI_OKAY == MsiViewModify(hview, MSIMODIFY_UPDATE, hrec) );
return (IDS_OKAY);
}
static BOOL FFileRecordExistsInImage ( MSIHANDLE hdbInput, LPTSTR szFile, LPTSTR szImage, BOOL fUpgradedImage );
/* ********************************************************************** */
static UINT IdsValidateUFileDataRecords ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 )
{
Assert(hview != NULL);
Assert(hrec != NULL);
Assert(lp1 == 0L);
Assert(lp2 == 0L);
Assert(hdbInput != NULL);
TCHAR rgchUpgraded[MAX_PATH];
DWORD dwcch = MAX_PATH;
UINT uiRet = MsiRecordGetString(hrec, 1, rgchUpgraded, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_UFILEDATA_BAD_UPGRADED_FIELD, szNull, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("UpgradedFiles_OptionalData.Upgraded"), szNull));
if (!FValidImageName(rgchUpgraded))
return (UiLogError(ERROR_PCW_UFILEDATA_BAD_UPGRADED_FIELD, rgchUpgraded, szNull));
TCHAR rgchFTK[MAX_PATH];
uiRet = IdsMsiGetTableString(hdbInput, TEXT("`UpgradedImages`"),
TEXT("`Upgraded`"), TEXT("`Family`"), rgchUpgraded, rgchFTK, MAX_PATH);
Assert(uiRet == IDS_OKAY);
if (FEmptySz(rgchFTK))
return (UiLogError(ERROR_PCW_UFILEDATA_BAD_UPGRADED_FIELD, rgchUpgraded, szNull));
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 2, rgchFTK, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_UFILEDATA_LONG_FILE_TABLE_KEY, rgchUpgraded, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("UpgradedFiles_OptionalData.FTK"), szNull));
if (FEmptySz(rgchFTK))
return (UiLogError(ERROR_PCW_UFILEDATA_BLANK_FILE_TABLE_KEY, rgchUpgraded, szNull));
if (!FFileRecordExistsInImage(hdbInput, rgchFTK, rgchUpgraded, fTrue))
return (UiLogError(ERROR_PCW_UFILEDATA_MISSING_FILE_TABLE_KEY, rgchFTK, rgchUpgraded));
int iWholeFile = MsiRecordGetInteger(hrec, 3);
if (iWholeFile == MSI_NULL_INTEGER)
{
EvalAssert( MSI_OKAY == MsiRecordSetInteger(hrec, 3, 0) );
EvalAssert( MSI_OKAY == MsiViewModify(hview, MSIMODIFY_UPDATE, hrec) );
}
return (IDS_OKAY);
}
static BOOL FValidIgnoreFTK ( LPTSTR szFTK );
/* ********************************************************************** */
static UINT IdsValidateUFileIgnoreRecords ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 )
{
Assert(hview != NULL);
Assert(hrec != NULL);
Assert(lp1 == 0L);
Assert(lp2 == 0L);
Assert(hdbInput != NULL);
TCHAR rgchUpgraded[MAX_PATH];
DWORD dwcch = MAX_PATH;
UINT uiRet = MsiRecordGetString(hrec, 1, rgchUpgraded, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_UFILEIGNORE_BAD_UPGRADED_FIELD, szNull, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("UpgradedFilesToIgnore.Upgraded"), szNull));
TCHAR rgchFTK[MAX_PATH];
if (lstrcmp(rgchUpgraded, TEXT("*")))
{
if (!FValidImageName(rgchUpgraded))
return (UiLogError(ERROR_PCW_UFILEIGNORE_BAD_UPGRADED_FIELD, rgchUpgraded, szNull));
uiRet = IdsMsiGetTableString(hdbInput, TEXT("`UpgradedImages`"),
TEXT("`Upgraded`"), TEXT("`Family`"), rgchUpgraded, rgchFTK, MAX_PATH);
Assert(uiRet == IDS_OKAY);
if (FEmptySz(rgchFTK))
return (UiLogError(ERROR_PCW_UFILEIGNORE_BAD_UPGRADED_FIELD, rgchUpgraded, szNull));
}
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 2, rgchFTK, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_UFILEIGNORE_LONG_FILE_TABLE_KEY, rgchUpgraded, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("UpgradedFilesToIgnore.FTK"), szNull));
if (FEmptySz(rgchFTK))
return (UiLogError(ERROR_PCW_UFILEIGNORE_BLANK_FILE_TABLE_KEY, rgchUpgraded, szNull));
if (!FValidIgnoreFTK(rgchFTK))
return (UiLogError(ERROR_PCW_UFILEIGNORE_BAD_FILE_TABLE_KEY, rgchUpgraded, rgchFTK));
return (IDS_OKAY);
}
/* ********************************************************************** */
static BOOL FValidIgnoreFTK ( LPTSTR szFTK )
{
Assert(!FEmptySz(szFTK));
BOOL fEndsInAsterisk = (*SzLastChar(szFTK) == TEXT('*'));
if (fEndsInAsterisk)
*SzLastChar(szFTK) = TEXT('\0');
Assert(!FEmptySz(szFTK));
BOOL fRet = fTrue;
while (*szFTK != TEXT('\0'))
{
if (*szFTK == TEXT('*'))
fRet = fFalse;
szFTK = CharNext(szFTK);
}
if (fEndsInAsterisk)
lstrcpy(szFTK, TEXT("*"));
return (fRet);
}
/* ********************************************************************** */
static UINT IdsValidateTargetProductCodesAgainstList( MSIHANDLE hdb )
{
if (!g_fValidateProductCodeIncluded)
{
// MSITRANSFORM_VALIDATE_PRODUCT isn't included anywhere
// so it doesn't matter whether or not some target product
// codes in ListOfTargetProductCodes are missing from the TargetImages
// table
return (IDS_OKAY);
}
UINT cchProp = CchMsiPcwPropertyString(hdb, TEXT("ListOfTargetProductCodes")) + 1; //length + null terminator
LPTSTR rgchProp = (LPTSTR)LocalAlloc(LPTR, cchProp*sizeof(TCHAR));
if (!rgchProp)
return (IDS_OOM);
UINT ids = IdsMsiGetPcwPropertyString(hdb, TEXT("ListOfTargetProductCodes"), rgchProp, cchProp);
Assert(ids == IDS_OKAY);
if (!FEmptySz(rgchProp))
{
TCHAR* pch = rgchProp;
TCHAR* pchBegin = pch;
TCHAR* pchCur = NULL;
BOOL fRecExists = FALSE;
// ListOfTargetProductCodes is a delimited list of Guids, so no DBCS chars here
while (*pch != '\0')
{
if (*pch == ';')
{
pchCur = pch;
*pchCur = '\0';
pch++; // for ';'
// check for presence of product code in TargetImages table
fRecExists = FALSE;
EvalAssert( IDS_OKAY == IdsMsiExistTableRecords(hdbInput, TEXT("TargetImages"), TEXT("ProductCode"), pchBegin, &fRecExists) );
if (!fRecExists)
{
// patch won't work right
EvalAssert( NULL == LocalFree((HLOCAL)rgchProp) );
return (UiLogError(ERROR_PCW_TARGET_BAD_PROD_CODE_VAL, pchBegin, szNull));
}
pchBegin = pch; // start of next guid
}
else
{
pch++;
}
}
// complete last check
fRecExists = FALSE;
EvalAssert( IDS_OKAY == IdsMsiExistTableRecords(hdbInput, TEXT("TargetImages"), TEXT("ProductCode"), pchBegin, &fRecExists) );
if (!fRecExists)
{
// patch won't work right
EvalAssert( NULL == LocalFree((HLOCAL)rgchProp) );
return (UiLogError(ERROR_PCW_TARGET_BAD_PROD_CODE_VAL, pchBegin, szNull));
}
}
EvalAssert( NULL == LocalFree((HLOCAL)rgchProp) );
return (IDS_OKAY);
}
/* ********************************************************************** */
static UINT IdsValidateTFileDataRecords ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 )
{
Assert(hview != NULL);
Assert(hrec != NULL);
Assert(lp1 == 0L);
Assert(lp2 == 0L);
Assert(hdbInput != NULL);
TCHAR rgchTarget[MAX_PATH];
DWORD dwcch = MAX_PATH;
UINT uiRet = MsiRecordGetString(hrec, 1, rgchTarget, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_TFILEDATA_BAD_TARGET_FIELD, szNull, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("TargetFiles_OptionalData.Upgraded"), szNull));
if (!FValidImageName(rgchTarget))
return (UiLogError(ERROR_PCW_TFILEDATA_BAD_TARGET_FIELD, rgchTarget, szNull));
TCHAR rgchFamily[MAX_PATH];
uiRet = IdsMsiGetTableString(hdbInput, TEXT("`TargetImages`"),
TEXT("`Target`"), TEXT("`Family`"), rgchTarget, rgchFamily, MAX_PATH);
Assert(uiRet == IDS_OKAY);
if (FEmptySz(rgchFamily))
return (UiLogError(ERROR_PCW_TFILEDATA_BAD_TARGET_FIELD, rgchTarget, szNull));
TCHAR rgchFTK[MAX_PATH];
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 2, rgchFTK, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_TFILEDATA_LONG_FILE_TABLE_KEY, rgchTarget, szNull));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("TargetFiles_OptionalData.FTK"), szNull));
if (FEmptySz(rgchFTK))
return (UiLogError(ERROR_PCW_TFILEDATA_BLANK_FILE_TABLE_KEY, rgchTarget, szNull));
if (!FFileRecordExistsInImage(hdbInput, rgchFTK, rgchTarget, fFalse))
return (UiLogError(ERROR_PCW_TFILEDATA_MISSING_FILE_TABLE_KEY, rgchFTK, rgchTarget));
TCHAR rgchOffsets[MAX_PATH];
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 3, rgchOffsets, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_TFILEDATA_LONG_IGNORE_OFFSETS, rgchFamily, rgchFTK));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("TargetFiles_OptionalData.IgnoreOffsets"), szNull));
int cOffsets = ICountRangeElements(rgchOffsets, fTrue);
if (cOffsets < 0)
return (UiLogError(ERROR_PCW_TFILEDATA_BAD_IGNORE_OFFSETS, rgchFamily, rgchFTK));
Assert(cOffsets < 256);
TCHAR rgchLengths[MAX_PATH];
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 4, rgchLengths, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_TFILEDATA_LONG_IGNORE_LENGTHS, rgchFamily, rgchFTK));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("TargetFiles_OptionalData.IgnoreLengths"), szNull));
int cLengths = ICountRangeElements(rgchLengths, fFalse);
if (cLengths < 0)
return (UiLogError(ERROR_PCW_TFILEDATA_BAD_IGNORE_LENGTHS, rgchFamily, rgchFTK));
Assert(cLengths < 256);
if (cOffsets != cLengths)
return (UiLogError(ERROR_PCW_TFILEDATA_IGNORE_COUNT_MISMATCH, rgchFamily, rgchFTK));
EvalAssert( MSI_OKAY == MsiRecordSetInteger(hrec, 6, cOffsets) );
dwcch = MAX_PATH;
uiRet = MsiRecordGetString(hrec, 5, rgchOffsets, &dwcch);
if (uiRet == ERROR_MORE_DATA)
return (UiLogError(ERROR_PCW_TFILEDATA_LONG_RETAIN_OFFSETS, rgchFamily, rgchFTK));
if (uiRet != MSI_OKAY)
return (UiLogError(IDS_CANT_GET_RECORD_FIELD, TEXT("TargetFiles_OptionalData.RetainOffsets"), szNull));
cOffsets = ICountRangeElements(rgchOffsets, fTrue);
if (cOffsets < 0)
return (UiLogError(ERROR_PCW_TFILEDATA_BAD_RETAIN_OFFSETS, rgchFamily, rgchFTK));
Assert(cOffsets < 256);
if (cOffsets > 0)
{
StringCchPrintf(rgchLengths, sizeof(rgchLengths)/sizeof(TCHAR), TEXT("`Family`='%s' AND `FTK`='%s'"), rgchFamily, rgchFTK);
uiRet = IdsMsiGetTableIntegerWhere(hdbInput, TEXT("`FamilyFileRanges`"),
TEXT("`RetainCount`"), rgchLengths, &cLengths);
Assert(uiRet == MSI_OKAY);
if (cOffsets != cLengths)
return (UiLogError(ERROR_PCW_TFILEDATA_IGNORE_COUNT_MISMATCH, rgchFamily, rgchFTK));
}
// TODO - could check for overlaps in ranges
EvalAssert( MSI_OKAY == MsiViewModify(hview, MSIMODIFY_UPDATE, hrec) );
return (IDS_OKAY);
}
/* ********************************************************************** */
static BOOL FFileRecordExistsInImage ( MSIHANDLE hdbInput, LPTSTR szFile, LPTSTR szImage, BOOL fUpgradedImage )
{
Assert(hdbInput != NULL);
Assert(!FEmptySz(szFile));
Assert(!FEmptySz(szImage));
MSIHANDLE hdb = HdbReopenMsi(hdbInput, szImage, fUpgradedImage, fFalse);
Assert(hdb != NULL);
BOOL fExists = fFalse;
EvalAssert( IDS_OKAY == IdsMsiExistTableRecords(hdb, TEXT("`File`"), TEXT("`File`"), szFile, &fExists) );
EvalAssert( MSI_OKAY == MsiCloseHandle(hdb) );
return (fExists);
}
/* ********************************************************************** */
static BOOL FValidName ( LPTSTR sz, int cchMax )
{
Assert(sz != szNull);
if (FEmptySz(sz) || lstrlen(sz) > cchMax
|| *sz == TEXT('_') || *SzLastChar(sz) == TEXT('_'))
{
return (fFalse);
}
while (!FEmptySz(sz))
{
TCHAR ch = *sz;
if ((ch < TEXT('a') || ch > TEXT('z'))
&& (ch < TEXT('A') || ch > TEXT('Z'))
&& (ch < TEXT('0') || ch > TEXT('9'))
&& ch != TEXT('_') )
{
return (fFalse);
}
sz = CharNext(sz);
}
return (fTrue);
}
/* ********************************************************************** */
static BOOL FUniqueImageName ( LPTSTR sz, MSIHANDLE hdbInput )
{
Assert(!FEmptySz(sz));
Assert(FValidImageName(sz));
Assert(lstrlen(sz) < 32);
Assert(hdbInput != NULL);
TCHAR rgch[32];
lstrcpy(rgch, sz);
CharUpper(rgch);
BOOL fExist = fFalse;
UINT ids = IdsMsiExistTableRecords(hdbInput, TEXT("`TempImageNames`"),
TEXT("`ImageName`"), rgch, &fExist);
Assert(ids == MSI_OKAY);
if (!fExist)
{
TCHAR rgchQuery[MAX_PATH];
StringCchPrintf(rgchQuery, sizeof(rgchQuery)/sizeof(TCHAR), TEXT("INSERT INTO `TempImageNames` ( `ImageName` ) VALUES ( '%s' )"), rgch);
EvalAssert( FExecSqlCmd(hdbInput, rgchQuery) );
}
return (!fExist);
}
/* ********************************************************************** */
static BOOL FUniquePackageCode ( LPTSTR sz, MSIHANDLE hdbInput )
{
Assert(!FEmptySz(sz));
Assert(lstrlen(sz) < 64);
Assert(hdbInput != NULL);
TCHAR rgch[64];
lstrcpy(rgch, sz);
CharUpper(rgch);
BOOL fExist = fFalse;
UINT ids = IdsMsiExistTableRecords(hdbInput, TEXT("`TempPackCodes`"),
TEXT("`PackCode`"), rgch, &fExist);
Assert(ids == MSI_OKAY);
if (!fExist)
{
TCHAR rgchQuery[MAX_PATH];
StringCchPrintf(rgchQuery, sizeof(rgchQuery)/sizeof(TCHAR), TEXT("INSERT INTO `TempPackCodes` ( `PackCode` ) VALUES ( '%s' )"), rgch);
EvalAssert( FExecSqlCmd(hdbInput, rgchQuery) );
}
return (!fExist);
}
/* ********************************************************************** */
static BOOL FNoUpgradedImages ( MSIHANDLE hdb )
{
Assert(hdb != NULL);
BOOL fExists = fFalse;
EvalAssert( IDS_OKAY == IdsMsiExistTableRecordsWhere(hdbInput, TEXT("`UpgradedImages`"), TEXT("`Upgraded`"), TEXT(" "), &fExists) );
#ifdef DEBUG
if (fExists)
{
BOOL fExistsTarget = fFalse;
EvalAssert( IDS_OKAY == IdsMsiExistTableRecordsWhere(hdbInput, TEXT("`TargetImages`"), TEXT("`Target`"), TEXT(" "), &fExistsTarget) );
Assert(fExistsTarget);
fExistsTarget = fFalse;
EvalAssert( IDS_OKAY == IdsMsiExistTableRecordsWhere(hdbInput, TEXT("`ImageFamilies`"), TEXT("`Family`"), TEXT(" "), &fExistsTarget) );
Assert(fExistsTarget);
}
#endif
return (!fExists);
}
static UINT IdsCheckPCodeAndVersion( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 );
/* ********************************************************************** */
static BOOL FCheckForProductCodeMismatchWithVersionMatch( MSIHANDLE hdb )
{
Assert(hdb != NULL);
UINT ids = IdsMsiEnumTable(hdb, TEXT("`TargetImages`"),
TEXT("`Target`,`Upgraded`,`ProductCode`,`ProductVersion`"),
szNull, IdsCheckPCodeAndVersion, (LPARAM)(hdb), 0L);
if (ids == IDS_OKAY)
return (fTrue);
return (fFalse);
}
static UINT IdsCheckProductCode ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 );
/* ********************************************************************** */
static BOOL FCheckForProductCodeMismatches ( MSIHANDLE hdb )
{
Assert(hdb != NULL);
TCHAR rgch[MAX_PATH];
EvalAssert( IDS_OKAY == IdsMsiGetPcwPropertyString(hdb, TEXT("AllowProductCodeMismatches"), rgch, MAX_PATH) );
if ((!FEmptySz(rgch)) && (*rgch != TEXT('0')))
return (fTrue);
UINT ids = IdsMsiEnumTable(hdb, TEXT("`TargetImages`"),
TEXT("`Target`,`Upgraded`,`ProductCode`"),
szNull, IdsCheckProductCode, (LPARAM)(hdb), 0L);
Assert(ids == IDS_OKAY || ids == IDS_CANCEL);
if (ids == IDS_OKAY)
return (fTrue);
if (IDNO == IMessageBoxIds(HdlgStatus(), IDS_PRODUCTCODES_DONT_MATCH, MB_YESNO | MB_ICONQUESTION))
{
FWriteLogFile(TEXT(" ERROR - ProductCodes do not match between Target and Upgraded images.\r\n"));
return (fFalse);
}
FWriteLogFile(TEXT(" User supressed error for ProductCodes not matching between Target and Upgraded images.\r\n"));
return (fTrue);
}
static int ICompareVersions ( LPTSTR szUpgradedPC, LPTSTR szTargetPC );
/* ********************************************************************** */
static UINT IdsCheckPCodeAndVersion( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 )
{
Assert(hview != NULL);
Assert(hrec != NULL);
Assert(lp2 == 0L);
MSIHANDLE hdb = (MSIHANDLE)(lp1);
Assert(hdb != NULL);
DWORD dwcch = 64;
TCHAR rgchUpgradedImage[64] = {0};
TCHAR rgchTargetPC[40] = {0};
TCHAR rgchUpgradePC[40] = {0};
TCHAR rgchTargetPV[32] = {0};
TCHAR rgchUpgradePV[32] = {0};
UINT uiRet = MsiRecordGetString(hrec, 2, rgchUpgradedImage, &dwcch);
Assert(uiRet == MSI_OKAY && !FEmptySz(rgchUpgradedImage));
dwcch = 40;
uiRet = MsiRecordGetString(hrec, 3, rgchTargetPC, &dwcch);
Assert(uiRet == MSI_OKAY && !FEmptySz(rgchTargetPC));
dwcch = 32;
uiRet = MsiRecordGetString(hrec, 4, rgchTargetPV, &dwcch);
Assert(uiRet == MSI_OKAY && !FEmptySz(rgchTargetPV));
dwcch = 40;
uiRet = IdsMsiGetTableString(hdb, TEXT("`UpgradedImages`"),
TEXT("`Upgraded`"), TEXT("`ProductCode`"),
rgchUpgradedImage, rgchUpgradePC, 40);
Assert(uiRet == MSI_OKAY && !FEmptySz(rgchUpgradePC));
dwcch = 32;
uiRet = IdsMsiGetTableString(hdb, TEXT("`UpgradedImages`"),
TEXT("`Upgraded`"), TEXT("`ProductVersion`"),
rgchUpgradedImage, rgchUpgradePV, 32);
Assert(uiRet == MSI_OKAY && !FEmptySz(rgchUpgradePV));
// report an error when the product codes differ but the product versions are the same
// -- patch would generally be okay, but we want to err on the side of caution
// -- see Whistler bug #355521
// -- at least one of the 3 fields of the ProductVersion must change to use the Upgrade table
// which enables major update functionality (which coincidentally, requires a ProductCode change)
//
if (0 != lstrcmpi(rgchTargetPC, rgchUpgradePC)
&& 0 == ICompareVersions(rgchUpgradePV, rgchTargetPV))
return (ERROR_PCW_MATCHED_PRODUCT_VERSIONS);
return (IDS_OKAY);
}
/* ********************************************************************** */
static UINT IdsCheckProductCode ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 )
{
Assert(hview != NULL);
Assert(hrec != NULL);
Assert(lp2 == 0L);
MSIHANDLE hdb = (MSIHANDLE)(lp1);
Assert(hdb != NULL);
TCHAR rgchUpgradedImage[64];
DWORD dwcch = 64;
UINT uiRet = MsiRecordGetString(hrec, 2, rgchUpgradedImage, &dwcch);
Assert(uiRet != ERROR_MORE_DATA);
Assert(uiRet == MSI_OKAY);
Assert(!FEmptySz(rgchUpgradedImage));
TCHAR rgchTargetPC[64];
dwcch = 64;
uiRet = MsiRecordGetString(hrec, 3, rgchTargetPC, &dwcch);
Assert(uiRet != ERROR_MORE_DATA);
Assert(uiRet == MSI_OKAY);
Assert(!FEmptySz(rgchTargetPC));
TCHAR rgchUpgradedPC[64];
uiRet = IdsMsiGetTableString(hdb, TEXT("`UpgradedImages`"),
TEXT("`Upgraded`"), TEXT("`ProductCode`"),
rgchUpgradedImage, rgchUpgradedPC, 64);
Assert(uiRet != ERROR_MORE_DATA);
Assert(uiRet == MSI_OKAY);
Assert(!FEmptySz(rgchUpgradedPC));
Assert(MSI_OKAY == IDS_OKAY);
Assert(uiRet == IDS_OKAY);
if (lstrcmpi(rgchTargetPC, rgchUpgradedPC))
uiRet = IDS_CANCEL;
return (uiRet);
}
static UINT IdsCheckProductVersion ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 );
/* ********************************************************************** */
static BOOL FCheckForProductVersionMismatches ( MSIHANDLE hdb )
{
Assert(hdb != NULL);
BOOL fLower = fFalse;
UINT ids = IdsMsiEnumTable(hdb, TEXT("`TargetImages`"),
TEXT("`Target`,`Upgraded`,`ProductVersion`"),
szNull, IdsCheckProductVersion, (LPARAM)(hdb), (LPARAM)(&fLower));
Assert(ids == IDS_OKAY || ids == IDS_CANCEL);
if (ids == IDS_OKAY)
return (fTrue);
if (fLower)
{
if (IDNO == IMessageBoxIds(HdlgStatus(), IDS_PRODUCTVERSION_INVERSION, MB_YESNO | MB_ICONQUESTION))
{
FWriteLogFile(TEXT(" ERROR - Target ProductVersion is greater than Upgraded image.\r\n"));
return (fFalse);
}
FWriteLogFile(TEXT(" User supressed error for Target ProductVersion greater than Upgraded image.\r\n"));
return (fTrue);
}
TCHAR rgch[MAX_PATH];
EvalAssert( IDS_OKAY == IdsMsiGetPcwPropertyString(hdb, TEXT("AllowProductVersionMajorMismatches"), rgch, MAX_PATH) );
if ((!FEmptySz(rgch)) && (*rgch != TEXT('0')))
return (fTrue);
if (IDNO == IMessageBoxIds(HdlgStatus(), IDS_PRODUCTVERSIONS_DONT_MATCH, MB_YESNO | MB_ICONQUESTION))
{
FWriteLogFile(TEXT(" ERROR - ProductVersions do not match between Target and Upgraded images.\r\n"));
return (fFalse);
}
FWriteLogFile(TEXT(" User supressed error for ProductVersions not matching between Target and Upgraded images.\r\n"));
return (fTrue);
}
/* ********************************************************************** */
static UINT IdsCheckProductVersion ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 )
{
Assert(hview != NULL);
Assert(hrec != NULL);
MSIHANDLE hdb = (MSIHANDLE)(lp1);
Assert(hdb != NULL);
PBOOL pfLower = (PBOOL)(lp2);
Assert(pfLower != NULL);
TCHAR rgchUpgradedImage[64];
DWORD dwcch = 64;
UINT uiRet = MsiRecordGetString(hrec, 2, rgchUpgradedImage, &dwcch);
Assert(uiRet != ERROR_MORE_DATA);
Assert(uiRet == MSI_OKAY);
Assert(!FEmptySz(rgchUpgradedImage));
TCHAR rgchTargetPV[64];
dwcch = 64;
uiRet = MsiRecordGetString(hrec, 3, rgchTargetPV, &dwcch);
Assert(uiRet != ERROR_MORE_DATA);
Assert(uiRet == MSI_OKAY);
Assert(!FEmptySz(rgchTargetPV));
TCHAR rgchUpgradedPV[64];
uiRet = IdsMsiGetTableString(hdb, TEXT("`UpgradedImages`"),
TEXT("`Upgraded`"), TEXT("`ProductVersion`"),
rgchUpgradedImage, rgchUpgradedPV, 64);
Assert(uiRet != ERROR_MORE_DATA);
Assert(uiRet == MSI_OKAY);
Assert(!FEmptySz(rgchUpgradedPV));
Assert(MSI_OKAY == IDS_OKAY);
Assert(uiRet == IDS_OKAY);
int i = ICompareVersions(rgchUpgradedPV, rgchTargetPV);
if (i != 0)
{
uiRet = IDS_CANCEL;
if (i < 0)
*pfLower = fTrue;
}
return (uiRet);
}
/* ********************************************************************** */
static int ICompareVersions ( LPTSTR szUpgradedPC, LPTSTR szTargetPC )
{
// compares the next field of the 2 versions.
// if they match, make a recursive call to compare the next field
Assert(szUpgradedPC != szNull);
Assert(szTargetPC != szNull);
if (*szUpgradedPC == TEXT('\0') && *szTargetPC == TEXT('\0'))
return (0);
LPTSTR szUpgradedNext = szUpgradedPC;
while (*szUpgradedNext != TEXT('\0') && *szUpgradedNext != TEXT('.'))
szUpgradedNext = CharNext(szUpgradedNext);
if(*szUpgradedNext != TEXT('\0'))
{
*szUpgradedNext = TEXT('\0');
szUpgradedNext++;
}
LPTSTR szTargetNext = szTargetPC;
while (*szTargetNext != TEXT('\0') && *szTargetNext != TEXT('.'))
szTargetNext = CharNext(szTargetNext);
if(*szTargetNext != TEXT('\0'))
{
*szTargetNext = TEXT('\0');
szTargetNext++;
}
int iUpgradedField = _ttoi(szUpgradedPC);
int iTargetField = _ttoi(szTargetPC);
if(iUpgradedField < iTargetField)
return (-1);
else if(iUpgradedField > iTargetField)
return (1);
else
return (ICompareVersions(szUpgradedNext, szTargetNext));
}
static UINT IdsCountTargets ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 );
static UINT IdsCatTargetProductCode ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 );
/* ********************************************************************** */
static void FillInListOfTargetProductCodes ( MSIHANDLE hdb )
{
Assert(hdb != NULL);
UINT cchCur;
cchCur = CchMsiPcwPropertyString(hdb, TEXT("ListOfTargetProductCodes"));
if (cchCur < 63)
cchCur = 64;
else
cchCur++;
LPTSTR rgchCur = (LPTSTR)LocalAlloc(LPTR, cchCur*sizeof(TCHAR));
Assert(rgchCur != szNull);
if (rgchCur == szNull)
return;
UINT ids = IdsMsiGetPcwPropertyString(hdb, TEXT("ListOfTargetProductCodes"), rgchCur, cchCur);
Assert(ids == IDS_OKAY);
if (FEmptySz(rgchCur) || *rgchCur == TEXT('*'))
{
if (*rgchCur == TEXT('*'))
{
Assert(*(rgchCur+1) == TEXT('\0') || *(rgchCur+1) == TEXT(';'));
if (*(rgchCur+1) == TEXT('\0'))
*rgchCur = TEXT('\0');
else if (*(rgchCur+1) == TEXT(';'))
lstrcpy(rgchCur, rgchCur+2);
else
lstrcpy(rgchCur, rgchCur+1);
}
UINT cTargets = 0;
ids = IdsMsiEnumTable(hdb, TEXT("`TargetImages`"),
TEXT("`Target`,`ProductCode`"), szNull,
IdsCountTargets, (LPARAM)(&cTargets), 0);
Assert(ids == IDS_OKAY);
if (cTargets < 4)
cTargets = 4;
if (cTargets > 512)
{
AssertFalse();
cTargets = 512;
}
LPTSTR rgchNew = (LPTSTR)LocalAlloc(LPTR, (cTargets*64 + cchCur)*sizeof(TCHAR));
Assert(rgchNew != szNull);
if (rgchNew == szNull)
{
EvalAssert( NULL == LocalFree((HLOCAL)rgchCur) );
return;
}
*rgchNew = TEXT('\0');
ids = IdsMsiEnumTable(hdb, TEXT("`TargetImages`"),
TEXT("`Target`,`ProductCode`"), szNull,
IdsCatTargetProductCode, (LPARAM)(rgchNew),
(LPARAM)(cTargets*64));
Assert(ids == IDS_OKAY);
Assert(!FEmptySz(rgchNew));
if (!FEmptySz(rgchCur))
{
lstrcat(rgchNew, TEXT(";"));
lstrcat(rgchNew, rgchCur);
}
ids = IdsMsiSetPcwPropertyString(hdb, TEXT("ListOfTargetProductCodes"), rgchNew);
Assert(ids == IDS_OKAY);
EvalAssert( NULL == LocalFree((HLOCAL)rgchNew) );
}
EvalAssert( NULL == LocalFree((HLOCAL)rgchCur) );
}
/* ********************************************************************** */
static UINT IdsCountTargets ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 )
{
Assert(hview != NULL);
Assert(hrec != NULL);
Assert(lp2 == 0);
UINT* pcTargets = (UINT*)(lp1);
Assert(pcTargets != NULL);
TCHAR rgch[64];
DWORD dwcch = 64;
UINT uiRet = MsiRecordGetString(hrec, 2, rgch, &dwcch);
Assert(uiRet != ERROR_MORE_DATA);
Assert(uiRet == MSI_OKAY);
Assert(!FEmptySz(rgch));
(*pcTargets)++;
return (IDS_OKAY);
}
/* ********************************************************************** */
static UINT IdsCatTargetProductCode ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 )
{
Assert(hview != NULL);
Assert(hrec != NULL);
LPTSTR szBuf = (LPTSTR)(lp1);
int cchBuf = (int)(lp2);
Assert(szBuf != szNull);
Assert(cchBuf > 0);
Assert(lstrlen(szBuf) < cchBuf);
TCHAR rgch[64];
DWORD dwcch = 64;
UINT uiRet = MsiRecordGetString(hrec, 2, rgch, &dwcch);
Assert(uiRet != ERROR_MORE_DATA);
Assert(uiRet == MSI_OKAY);
Assert(!FEmptySz(rgch));
if (lstrlen(szBuf) + lstrlen(rgch) + 2 >= cchBuf)
{
AssertFalse();
return (IDS_CANCEL);
}
LPTSTR sz = szBuf;
while (!FEmptySz(sz))
{
Assert(lstrlen(sz) >= lstrlen(rgch));
if (FMatchPrefix(sz, rgch))
return (IDS_OKAY);
sz += lstrlen(rgch);
if (!FEmptySz(sz))
{
Assert(*sz == TEXT(';'));
sz++;
Assert(!FEmptySz(sz));
}
}
if (!FEmptySz(szBuf))
lstrcat(szBuf, TEXT(";"));
lstrcat(szBuf, rgch);
return (IDS_OKAY);
}
static UINT IdsCopyUpgradeMsi ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 );
/* ********************************************************************** */
UINT UiCopyUpgradedMsiToTempFolderForEachTarget ( MSIHANDLE hdb, LPTSTR szTempFolder, LPTSTR szTempFName )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTempFolder));
Assert(szTempFName != szNull);
hdbInput = hdb;
UINT ids = IdsMsiEnumTable(hdb, TEXT("`TargetImages`"),
TEXT("`Target`,`Upgraded`,`MsiPathUpgradedCopy`"),
szNull, IdsCopyUpgradeMsi,
(LPARAM)(szTempFolder), (LPARAM)(szTempFName));
if (ids != IDS_OKAY)
return (ids);
return (ERROR_SUCCESS);
}
static UINT UiCreatePatchingTables ( MSIHANDLE hdb, LPTSTR szFamily, LPTSTR szTempFolder, LPTSTR szTempFName );
/* ********************************************************************** */
static UINT IdsCopyUpgradeMsi ( MSIHANDLE hview, MSIHANDLE hrec, LPARAM lp1, LPARAM lp2 )
{
Assert(hview != NULL);
Assert(hrec != NULL);
LPTSTR szTempFolder = (LPTSTR)(lp1);
LPTSTR szTempFName = (LPTSTR)(lp2);
Assert(!FEmptySz(szTempFolder));
Assert(szTempFName != szNull);
Assert(szTempFolder != szTempFName);
Assert(hdbInput != NULL);
TCHAR rgchTarget[64];
DWORD dwcch = 64;
UINT uiRet = MsiRecordGetString(hrec, 1, rgchTarget, &dwcch);
Assert(uiRet != ERROR_MORE_DATA);
Assert(uiRet == MSI_OKAY);
Assert(!FEmptySz(rgchTarget));
Assert(FValidImageName(rgchTarget));
lstrcpy(szTempFName, rgchTarget);
lstrcat(szTempFName, TEXT(".MSI"));
Assert(!FFileExist(szTempFolder));
Assert(!FFolderExist(szTempFolder));
#define rgchUpgraded rgchTarget // reuse buffer
dwcch = 64;
uiRet = MsiRecordGetString(hrec, 2, rgchUpgraded, &dwcch);
Assert(uiRet != ERROR_MORE_DATA);
Assert(uiRet == MSI_OKAY);
Assert(!FEmptySz(rgchUpgraded));
Assert(FValidImageName(rgchUpgraded));
TCHAR rgchUpgradedMsi[MAX_PATH];
EvalAssert( IDS_OKAY == IdsMsiGetTableString(hdbInput,
TEXT("`UpgradedImages`"), TEXT("`Upgraded`"),
TEXT("`PatchMsiPath`"), rgchUpgraded, rgchUpgradedMsi, MAX_PATH) );
if (FEmptySz(rgchUpgradedMsi))
{
EvalAssert( IDS_OKAY == IdsMsiGetTableString(hdbInput,
TEXT("`UpgradedImages`"), TEXT("`Upgraded`"),
TEXT("`MsiPath`"), rgchUpgraded, rgchUpgradedMsi, MAX_PATH) );
Assert(!FEmptySz(rgchUpgradedMsi));
}
Assert(FFileExist(rgchUpgradedMsi));
if (!CopyFile(rgchUpgradedMsi, szTempFolder, fFalse))
return (UiLogError(ERROR_PCW_OODS_COPYING_MSI, rgchUpgradedMsi, szTempFolder));
SetFileAttributes(szTempFolder, FILE_ATTRIBUTE_NORMAL);
MSIHANDLE hdb = NULL;
EvalAssert( MSI_OKAY == MsiOpenDatabase(szTempFolder, MSIDBOPEN_DIRECT, &hdb) );
Assert(hdb != NULL);
EvalAssert( MSI_OKAY == MsiRecordSetString(hrec, 3, szTempFolder) );
EvalAssert( MSI_OKAY == MsiViewModify(hview, MSIMODIFY_UPDATE, hrec) );
#define rgchPackageCode rgchUpgradedMsi // reuse buffer
EvalAssert( IDS_OKAY == IdsMsiGetTableString(hdbInput, TEXT("`UpgradedImages`"),
TEXT("`Upgraded`"), TEXT("`PackageCode`"), rgchUpgraded,
rgchPackageCode, MAX_PATH) );
EvalAssert( IDS_OKAY == IdsMsiSetPropertyString(hdb,
TEXT("PATCHNEWPACKAGECODE"), rgchPackageCode) );
#define rgchSummSubject rgchUpgradedMsi // reuse buffer
EvalAssert( IDS_OKAY == IdsMsiGetTableString(hdbInput, TEXT("`UpgradedImages`"),
TEXT("`Upgraded`"), TEXT("`SummSubject`"), rgchUpgraded,
rgchSummSubject, MAX_PATH) );
EvalAssert( IDS_OKAY == IdsMsiSetPropertyString(hdb,
TEXT("PATCHNEWSUMMARYSUBJECT"), rgchSummSubject) );
#define rgchSummComments rgchUpgradedMsi // reuse buffer
EvalAssert( IDS_OKAY == IdsMsiGetTableString(hdbInput, TEXT("`UpgradedImages`"),
TEXT("`Upgraded`"), TEXT("`SummComments`"), rgchUpgraded,
rgchSummComments, MAX_PATH) );
EvalAssert( IDS_OKAY == IdsMsiSetPropertyString(hdb,
TEXT("PATCHNEWSUMMARYCOMMENTS"), rgchSummComments) );
#define rgchFamily rgchUpgradedMsi // reuse buffer
EvalAssert( IDS_OKAY == IdsMsiGetTableString(hdbInput, TEXT("`UpgradedImages`"),
TEXT("`Upgraded`"), TEXT("`Family`"), rgchUpgraded,
rgchFamily, 64) );
Assert(!FEmptySz(rgchFamily));
Assert(FValidFamilyName(rgchFamily));
uiRet = UiCreatePatchingTables(hdb, rgchFamily, szTempFolder, szTempFName);
EvalAssert( MSI_OKAY == MsiDatabaseCommit(hdb) );
EvalAssert( MSI_OKAY == MsiCloseHandle(hdb) );
return (uiRet);
}
static BOOL FValidPatchTableFormat ( MSIHANDLE hdb, pteEnum ptePatchTable );
static void UpdatePatchPackageTable ( MSIHANDLE hdb, MSIHANDLE hdbInput, LPTSTR szFamily );
static void UpdateMediaTable ( MSIHANDLE hdb, MSIHANDLE hdbInput, LPTSTR szFamily );
static void InsertPatchFilesActionIntoTable ( MSIHANDLE hdb, LPTSTR szTable );
/* ********************************************************************** */
static UINT UiCreatePatchingTables ( MSIHANDLE hdb, LPTSTR szFamily, LPTSTR szTempFolder, LPTSTR szTempFName )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szFamily));
Assert(FValidFamilyName(szFamily));
Assert(!FEmptySz(szTempFolder));
Assert(szTempFName != szNull);
Assert(szTempFolder != szTempFName);
lstrcpy(szTempFName, TEXT("Patch.idt"));
Assert(FFileExist(szTempFolder));
lstrcpy(szTempFName, TEXT("PPackage.idt"));
Assert(FFileExist(szTempFolder));
lstrcpy(szTempFName, TEXT("MsiPatch.idt"));
Assert(FFileExist(szTempFolder));
*szTempFName = TEXT('\0');
if (FTableExists(hdb, TEXT("Patch"), fFalse) && !FValidPatchTableFormat(hdb, ptePatch))
{
// drop the Patch table
MSIHANDLE hViewPatch = NULL;
EvalAssert( MSI_OKAY == MsiDatabaseOpenView(hdb, TEXT("DROP TABLE `Patch`"), &hViewPatch) );
EvalAssert( MSI_OKAY == MsiViewExecute(hViewPatch, 0) );
EvalAssert( MSI_OKAY == MsiViewClose(hViewPatch) );
EvalAssert( MSI_OKAY == MsiCloseHandle(hViewPatch) );
EvalAssert( MSI_OKAY == MsiDatabaseCommit(hdb) );
}
EvalAssert( ERROR_SUCCESS == MsiDatabaseImport(hdb, szTempFolder, TEXT("Patch.idt")) );
Assert(FTableExists(hdb, TEXT("Patch"), fFalse));
Assert(FValidPatchTableFormat(hdb, ptePatch));
if (!FTableExists(hdb, TEXT("PatchPackage"), fFalse))
{
EvalAssert( ERROR_SUCCESS == MsiDatabaseImport(hdb, szTempFolder, TEXT("PPackage.idt")) );
Assert(FTableExists(hdb, TEXT("PatchPackage"), fFalse));
}
Assert(FValidPatchTableFormat(hdb, ptePatchPackage));
if (!FTableExists(hdb, TEXT("MsiPatchHeaders"), fFalse))
{
EvalAssert( ERROR_SUCCESS == MsiDatabaseImport(hdb, szTempFolder, TEXT("MsiPatch.idt")) );
Assert(FTableExists(hdb, TEXT("MsiPatchHeaders"), fFalse));
}
Assert(FValidPatchTableFormat(hdb, pteMsiPatchHeaders));
Assert(hdbInput != NULL);
UpdatePatchPackageTable(hdb, hdbInput, szFamily);
UpdateMediaTable(hdb, hdbInput, szFamily);
InsertPatchFilesActionIntoTable(hdb, TEXT("`InstallExecuteSequence`"));
InsertPatchFilesActionIntoTable(hdb, TEXT("`AdminExecuteSequence`"));
return (IDS_OKAY);
}
/* ********************************************************************** */
BOOL FExecSqlCmd ( MSIHANDLE hdb, LPTSTR sz )
{
Assert(hdb != NULL);
Assert(!FEmptySz(sz));
MSIHANDLE hview = NULL;
UINT uiRet = MsiDatabaseOpenView(hdb, sz, &hview);
if (uiRet != MSI_OKAY)
{
AssertFalse();
return (fFalse);
}
uiRet = MsiViewExecute(hview, 0);
if (uiRet != IDS_OKAY)
{
AssertFalse();
return (fFalse);
}
EvalAssert( MSI_OKAY == MsiCloseHandle(hview) );
return (fTrue);
}
/* ********************************************************************** */
static void UpdatePatchPackageTable ( MSIHANDLE hdb, MSIHANDLE hdbInput, LPTSTR szFamily )
{
Assert(hdb != NULL);
Assert(hdbInput != NULL);
Assert(!FEmptySz(szFamily));
Assert(FValidFamilyName(szFamily));
int iDiskId = 1;
EvalAssert( IDS_OKAY == IdsMsiGetTableInteger(hdbInput, TEXT("`ImageFamilies`"),
TEXT("`Family`"), TEXT("`MediaDiskId`"), szFamily, &iDiskId) );
if (iDiskId == MSI_NULL_INTEGER)
{
// assume this is a Windows Installer 2.0 targeted patch; we have validation elsewhere to catch this
// iDiskId is set to 2 (always) in this case. The sequence conflict management feature of Windows
// Installer 2.0 can handle this
iDiskId = 2;
}
Assert(iDiskId > 1);
TCHAR rgch[MAX_PATH];
EvalAssert( IDS_OKAY == IdsMsiGetPcwPropertyString(hdbInput, TEXT("PatchGUID"), rgch, MAX_PATH) );
Assert(!FEmptySz(rgch));
CharUpper(rgch);
MSIHANDLE hrec = MsiCreateRecord(2);
Assert(hrec != NULL);
EvalAssert( MsiRecordSetString(hrec, 1, rgch) == MSI_OKAY );
EvalAssert( MsiRecordSetInteger(hrec, 2, iDiskId) == MSI_OKAY );
TCHAR rgchQuery[MAX_PATH];
StringCchPrintf(rgchQuery, sizeof(rgchQuery)/sizeof(TCHAR), TEXT("SELECT %s FROM %s WHERE %s='%s'"),
TEXT("`PatchId`,`Media_`"), TEXT("`PatchPackage`"),
TEXT("`PatchId`"), rgch);
Assert(lstrlen(rgchQuery) < sizeof(rgchQuery)/sizeof(TCHAR));
MSIHANDLE hview = NULL;
EvalAssert( MsiDatabaseOpenView(hdb, rgchQuery, &hview) == MSI_OKAY );
Assert(hview != NULL);
EvalAssert( MsiViewExecute(hview, 0) == MSI_OKAY );
EvalAssert( MsiViewModify(hview, MSIMODIFY_ASSIGN, hrec) == MSI_OKAY );
EvalAssert(MsiCloseHandle(hrec) == MSI_OKAY);
EvalAssert(MsiCloseHandle(hview) == MSI_OKAY);
}
/* ********************************************************************** */
static void UpdateMediaTable ( MSIHANDLE hdb, MSIHANDLE hdbInput, LPTSTR szFamily )
{
Assert(hdb != NULL);
Assert(hdbInput != NULL);
Assert(!FEmptySz(szFamily));
Assert(FValidFamilyName(szFamily));
int iDiskId = 0;
EvalAssert( IDS_OKAY == IdsMsiGetTableInteger(hdbInput, TEXT("`ImageFamilies`"),
TEXT("`Family`"), TEXT("`MediaDiskId`"), szFamily, &iDiskId) );
if (iDiskId == MSI_NULL_INTEGER)
{
// assume WI 2.0 targeted patch (MediaDiskId can be NULL); validation elsewhere -- sequence conflict management
// feature of WI 2.0 handles this, set to 2 always in this case
iDiskId = 2;
}
Assert(iDiskId > 1);
int iFileSeqStart = 0;
EvalAssert( IDS_OKAY == IdsMsiGetTableInteger(hdbInput, TEXT("`ImageFamilies`"),
TEXT("`Family`"), TEXT("`FileSequenceStart`"), szFamily, &iFileSeqStart) );
if (iFileSeqStart == MSI_NULL_INTEGER)
{
// assume WI 2.0 targeted patch (FileSequenceStart can be NULL); validation elsewhere -- sequence conflict management
// feature of WI 2.0 handles this, set to 2 always in this case
iFileSeqStart = 2;
}
Assert(iFileSeqStart > 1);
TCHAR rgchCabName[MAX_PATH];
StringCchPrintf(rgchCabName, sizeof(rgchCabName)/sizeof(TCHAR), TEXT("#PCW_CAB_%s"), szFamily);
MSIHANDLE hrec = MsiCreateRecord(6);
Assert(hrec != NULL);
EvalAssert( MsiRecordSetInteger(hrec, 1, iDiskId) == MSI_OKAY );
EvalAssert( MsiRecordSetInteger(hrec, 2, iFileSeqStart) == MSI_OKAY ); // to be updated later
EvalAssert( MsiRecordSetString(hrec, 3, rgchCabName) == MSI_OKAY );
TCHAR rgch[MAX_PATH];
EvalAssert( IDS_OKAY == IdsMsiGetTableString(hdbInput, TEXT("`ImageFamilies`"),
TEXT("`Family`"), TEXT("`MediaSrcPropName`"), szFamily, rgch, MAX_PATH) );
if (!FEmptySz(rgch))
{
EvalAssert( MsiRecordSetString(hrec, 4, rgch) == MSI_OKAY );
}
else
{
// else WI 2.0 targeted patch (MediaSrcPropName can be NULL); validation elsewhere -- sequence conflict management feature
// of WI 2.0 handles this, set to PATCHMediaSrcProp always in this case
EvalAssert( MsiRecordSetString(hrec, 4, szPatchMediaSrcProp) == MSI_OKAY );
}
EvalAssert( IDS_OKAY == IdsMsiGetTableString(hdbInput, TEXT("`ImageFamilies`"),
TEXT("`Family`"), TEXT("`DiskPrompt`"), szFamily, rgch, MAX_PATH) );
EvalAssert( MsiRecordSetString(hrec, 5, rgch) == MSI_OKAY );
EvalAssert( IDS_OKAY == IdsMsiGetTableString(hdbInput, TEXT("`ImageFamilies`"),
TEXT("`Family`"), TEXT("`VolumeLabel`"), szFamily, rgch, MAX_PATH) );
EvalAssert( MsiRecordSetString(hrec, 6, rgch) == MSI_OKAY );
#define rgchQuery rgchCabName // reuse buffer
StringCchPrintf(rgchQuery, sizeof(rgchQuery)/sizeof(TCHAR), TEXT("SELECT %s FROM %s WHERE %s=%d"),
TEXT("`DiskId`,`LastSequence`,`Cabinet`,`Source`,`DiskPrompt`,`VolumeLabel`"),
TEXT("`Media`"), TEXT("`DiskId`"), iDiskId);
Assert(lstrlen(rgchQuery) < sizeof(rgchQuery)/sizeof(TCHAR));
MSIHANDLE hview = NULL;
EvalAssert( MsiDatabaseOpenView(hdb, rgchQuery, &hview) == MSI_OKAY );
Assert(hview != NULL);
EvalAssert( MsiViewExecute(hview, 0) == MSI_OKAY );
EvalAssert( MsiViewModify(hview, MSIMODIFY_ASSIGN, hrec) == MSI_OKAY );
EvalAssert(MsiCloseHandle(hrec) == MSI_OKAY);
EvalAssert(MsiCloseHandle(hview) == MSI_OKAY);
}
/* ********************************************************************** */
static void InsertPatchFilesActionIntoTable ( MSIHANDLE hdb, LPTSTR szTable )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(!lstrcmp(szTable, TEXT("`InstallExecuteSequence`"))
|| !lstrcmp(szTable, TEXT("`AdminExecuteSequence`")));
BOOL fExists = fFalse;
EvalAssert( IDS_OKAY == IdsMsiExistTableRecords(hdb, szTable,
TEXT("`Action`"), TEXT("PatchFiles"), &fExists) );
if (fExists)
return;
int iSeq = 0;
EvalAssert( IDS_OKAY == IdsMsiGetTableInteger(hdb, szTable,
TEXT("`Action`"), TEXT("`Sequence`"),
TEXT("InstallFiles"), &iSeq) );
Assert(iSeq > 0);
MSIHANDLE hrec = MsiCreateRecord(2);
Assert(hrec != NULL);
EvalAssert( MsiRecordSetString(hrec, 1, TEXT("PatchFiles")) == MSI_OKAY );
EvalAssert( MsiRecordSetInteger(hrec, 2, iSeq + 1) == MSI_OKAY );
TCHAR rgchQuery[MAX_PATH];
StringCchPrintf(rgchQuery, sizeof(rgchQuery)/sizeof(TCHAR), TEXT("SELECT %s FROM %s WHERE %s='%s'"),
TEXT("`Action`,`Sequence`"), szTable,
TEXT("`Action`"), TEXT("PatchFiles"));
Assert(lstrlen(rgchQuery) < sizeof(rgchQuery)/sizeof(TCHAR));
MSIHANDLE hview = NULL;
EvalAssert( MsiDatabaseOpenView(hdb, rgchQuery, &hview) == MSI_OKAY );
Assert(hview != NULL);
EvalAssert( MsiViewExecute(hview, 0) == MSI_OKAY );
EvalAssert( MsiViewModify(hview, MSIMODIFY_ASSIGN, hrec) == MSI_OKAY );
EvalAssert(MsiCloseHandle(hrec) == MSI_OKAY);
EvalAssert(MsiCloseHandle(hview) == MSI_OKAY);
}
static void LogSzProp ( MSIHANDLE hdbInput, LPTSTR szProp, LPTSTR szBuf, LPTSTR szBufLog );
static UINT UiCreatePatchingTableExportFile ( MSIHANDLE hdbInput, pteEnum ptePatchTable, LPTSTR szTempFolder, LPTSTR szTempFName );
#define BIGPROPERTYSIZE (49*1024)
/* ********************************************************************** */
static UINT UiValidateAndLogPCWProperties ( MSIHANDLE hdbInput, LPTSTR szPcpPath, LPTSTR szPatchPath, LPTSTR szTempFolder, LPTSTR szTempFName )
{
Assert(hdbInput != NULL);
Assert(!FEmptySz(szPcpPath));
Assert(!FEmptySz(szPatchPath));
Assert(!FEmptySz(szTempFolder));
Assert(szTempFName != szNull);
*szTempFName = TEXT('\0');
Assert(!FEmptySz(szTempFolder));
EvalAssert( FSprintfToLog(TEXT("Input-PCP path = '%s'"), szPcpPath, szEmpty, szEmpty, szEmpty) );
EvalAssert( FSprintfToLog(TEXT("Patch-MSP path = '%s'"), szPatchPath, szEmpty, szEmpty, szEmpty) );
EvalAssert( FSprintfToLog(TEXT("Temp Folder = '%s'"), szTempFolder, szEmpty, szEmpty, szEmpty) );
TCHAR rgchLog[BIGPROPERTYSIZE+64];
TCHAR rgch[BIGPROPERTYSIZE];
UINT ids;
UpdateStatusMsg(0, szNull, TEXT("PatchGUID"));
ids = IdsMsiGetPcwPropertyString(hdbInput, TEXT("PatchGUID"), rgch, MAX_PATH);
Assert(ids == IDS_OKAY);
CharUpper(rgch);
if (FEmptySz(rgch))
return (UiLogError(ERROR_PCW_MISSING_PATCH_GUID, NULL, NULL));
if (!FValidGUID(rgch, fFalse, fFalse, fFalse))
return (UiLogError(ERROR_PCW_BAD_PATCH_GUID, rgch, NULL));
StringCchPrintf(rgchLog, sizeof(rgchLog)/sizeof(TCHAR), TEXT("Patch GUID = '%s'\r\n"), rgch);
EvalAssert( FWriteLogFile(rgchLog) );
EvalAssert( FUniquePackageCode(rgch, hdbInput) ); // first entry
UpdateStatusMsg(0, szNull, TEXT("ListOfPatchGUIDsToReplace"));
ids = IdsMsiGetPcwPropertyString(hdbInput, TEXT("ListOfPatchGUIDsToReplace"), rgch, BIGPROPERTYSIZE);
Assert(ids == IDS_OKAY);
CharUpper(rgch);
if (FEmptySz(rgch))
lstrcpy(rgch, TEXT("<none>"));
else if (!FValidGUID(rgch, fTrue, fFalse, fFalse))
return (UiLogError(ERROR_PCW_BAD_GUIDS_TO_REPLACE, rgch, NULL));
StringCchPrintf(rgchLog, sizeof(rgchLog)/sizeof(TCHAR), TEXT("ListOfPatchGUIDsToReplace = '%s'\r\n"), rgch);
EvalAssert( FWriteLogFile(rgchLog) );
UpdateStatusMsg(0, szNull, TEXT("ListOfTargetProductCodes"));
// zzz this could overflow buffer
ids = IdsMsiGetPcwPropertyString(hdbInput, TEXT("ListOfTargetProductCodes"), rgch, BIGPROPERTYSIZE);
Assert(ids == IDS_OKAY);
CharUpper(rgch);
if (FEmptySz(rgch))
lstrcpy(rgch, TEXT("*"));
if (!FValidGUID(rgch, fTrue, fTrue, fTrue))
return (UiLogError(ERROR_PCW_BAD_TARGET_PRODUCT_CODE_LIST, rgch, NULL));
StringCchPrintf(rgchLog, sizeof(rgchLog)/sizeof(TCHAR), TEXT("ListOfTargetProductCodes = '%s'\r\n"), rgch);
EvalAssert( FWriteLogFile(rgchLog) );
LogSzProp(hdbInput, TEXT("PatchSourceList"), rgch, rgchLog);
LogSzProp(hdbInput, TEXT("AllowProductCodeMismatches"), rgch, rgchLog);
LogSzProp(hdbInput, TEXT("AllowProductVersionMajorMismatches"), rgch, rgchLog);
LogSzProp(hdbInput, TEXT("OptimizePatchSizeForLargeFiles"), rgch, rgchLog);
UpdateStatusMsg(0, szNull, TEXT("ApiPatchingSymbolFlags"));
ids = IdsMsiGetPcwPropertyString(hdbInput, TEXT("ApiPatchingSymbolFlags"), rgch, MAX_PATH);
Assert(ids == IDS_OKAY);
if (FEmptySz(rgch))
lstrcpy(rgch, TEXT("<blank>"));
else if (!FValidHexValue(rgch) || !FValidApiPatchSymbolFlags(UlFromHexSz(rgch)))
return (UiLogError(ERROR_PCW_BAD_API_PATCHING_SYMBOL_FLAGS, rgch, NULL));
StringCchPrintf(rgchLog, sizeof(rgchLog)/sizeof(TCHAR), TEXT("ApiPatchingSymbolFlags = '%s'\r\n"), rgch);
EvalAssert( FWriteLogFile(rgchLog) );
LogSzProp(hdbInput, TEXT("MsiFileToUseToCreatePatchTables"), rgch, rgchLog);
LogSzProp(hdbInput, TEXT("SqlCmdToCreatePatchTable"), rgch, rgchLog);
LogSzProp(hdbInput, TEXT("SqlCmdToCreatePatchPackageTable"), rgch, rgchLog);
LogSzProp(hdbInput, TEXT("SqlCmdToCreateMsiPatchHeadersTable"), rgch, rgchLog);
LogSzProp(hdbInput, TEXT("DontRemoveTempFolderWhenFinished"), rgch, rgchLog);
LogSzProp(hdbInput, TEXT("IncludeWholeFilesOnly"), rgch, rgchLog);
LogSzProp(hdbInput, TEXT("MinimumRequiredMsiVersion"), rgch, rgchLog);
EvalAssert( FWriteLogFile(TEXT("\r\n")) );
ids = UiCreatePatchingTableExportFile(hdbInput, ptePatch, szTempFolder, szTempFName);
if (ids != IDS_OKAY)
return (ids);
ids = UiCreatePatchingTableExportFile(hdbInput, ptePatchPackage, szTempFolder, szTempFName);
if (ids != IDS_OKAY)
return (ids);
ids = UiCreatePatchingTableExportFile(hdbInput, pteMsiPatchHeaders, szTempFolder, szTempFName);
if (ids != IDS_OKAY)
return (ids);
*szTempFName = TEXT('\0');
EvalAssert( FWriteLogFile(TEXT("\r\n")) );
return (ERROR_SUCCESS);
}
static BOOL FHexChars ( LPTSTR * psz, UINT cch, BOOL fAllowLower );
/* ********************************************************************** */
static BOOL FValidGUID ( LPTSTR sz, BOOL fList, BOOL fLeadAsterisk, BOOL fSemiColonSeparated )
{
Assert(sz != szNull);
if (fLeadAsterisk && *sz == TEXT('*'))
{
Assert(fList);
Assert(fSemiColonSeparated);
sz = CharNext(sz);
if (*sz == TEXT('\0'))
return (fTrue);
if (*sz != TEXT(';'))
return (fFalse);
return (FValidGUID(CharNext(sz), fTrue, fFalse, fTrue));
}
if (*sz != TEXT('{'))
return (fFalse);
sz = CharNext(sz);
if (!FHexChars(&sz, 8, fFalse))
return (fFalse);
if (*sz != TEXT('-'))
return (fFalse);
sz = CharNext(sz);
if (!FHexChars(&sz, 4, fFalse))
return (fFalse);
if (*sz != TEXT('-'))
return (fFalse);
sz = CharNext(sz);
if (!FHexChars(&sz, 4, fFalse))
return (fFalse);
if (*sz != TEXT('-'))
return (fFalse);
sz = CharNext(sz);
if (!FHexChars(&sz, 4, fFalse))
return (fFalse);
if (*sz != TEXT('-'))
return (fFalse);
sz = CharNext(sz);
if (!FHexChars(&sz, 12, fFalse))
return (fFalse);
if (*sz != TEXT('}'))
return (fFalse);
sz = CharNext(sz);
if (*sz != TEXT('\0'))
{
if (!fList)
return (fFalse);
if (fSemiColonSeparated && *sz != TEXT(';'))
return (fFalse);
if (fSemiColonSeparated)
sz = CharNext(sz);
return (FValidGUID(sz, fList, fFalse, fSemiColonSeparated));
}
return (fTrue);
}
/* ********************************************************************** */
BOOL FValidHexValue ( LPTSTR sz )
{
Assert(sz != szNull);
return (*sz++ == TEXT('0') && *sz++ == TEXT('x') && FHexChars(&sz, 8, fTrue) && *sz == TEXT('\0'));
}
/* ********************************************************************** */
static BOOL FHexChars ( LPTSTR * psz, UINT cch, BOOL fAllowLower )
{
Assert(psz != NULL);
Assert(*psz != szNull);
Assert(cch == 4 || cch == 8 || cch == 12);
LPTSTR sz = *psz;
while (cch--)
{
if (*sz >= TEXT('0') && *sz <= TEXT('9'))
;
else if (*sz >= TEXT('A') && *sz <= TEXT('F'))
;
else if (fAllowLower && *sz >= TEXT('a') && *sz <= TEXT('f'))
;
else
return (fFalse);
sz = CharNext(sz);
}
*psz = sz;
return (fTrue);
}
/* ********************************************************************** */
static BOOL FValidPropertyName ( LPTSTR sz )
{
Assert(!FEmptySz(sz));
if (lstrlen(sz) > 70)
return (fFalse);
TCHAR rgch[128];
lstrcpy(rgch, sz);
sz = rgch;
CharUpper(sz);
TCHAR ch = *sz++;
if (ch != TEXT('_') && (ch < TEXT('A') || ch > TEXT('Z')))
return (fFalse);
while ((ch = *sz++) != TEXT('\0'))
{
if (ch != TEXT('_') && ch != TEXT('.')
&& (ch < TEXT('A') || ch > TEXT('Z'))
&& (ch < TEXT('0') || ch > TEXT('9')))
{
return (fFalse);
}
}
return (fTrue);
}
/* ********************************************************************** */
static BOOL FValidDiskId ( LPTSTR sz )
{
Assert(!FEmptySz(sz));
DWORD dw = 0;
while (*sz != TEXT('\0'))
{
TCHAR ch = *sz++;
if (ch < TEXT('0') || ch > TEXT('9'))
return (fFalse);
if (dw > 3276)
return (fFalse);
dw = (dw * 10) + (DWORD)(ch - TEXT('0'));
}
return (dw <= 32767 && dw > 0);
}
/* ********************************************************************** */
ULONG UlFromHexSz ( LPTSTR sz )
{
Assert(!FEmptySz(sz));
Assert(FValidHexValue(sz));
Assert(FMatchPrefix(sz, TEXT("0x")));
sz += lstrlen(TEXT("0x"));
ULONG ul = 0L;
while (*sz != TEXT('\0'))
{
TCHAR ch = *sz, chBase;
if (ch >= TEXT('0') && ch <= TEXT('9'))
chBase = TEXT('0');
else if (ch >= TEXT('A') && ch <= TEXT('F'))
chBase = TEXT('A') - 10;
else if (ch >= TEXT('a') && ch <= TEXT('f'))
chBase = TEXT('a') - 10;
else
{ AssertFalse(); }
ul = (ul * 16) + (ch - chBase);
sz = CharNext(sz);
}
return (ul);
}
/* ********************************************************************** */
BOOL FValidApiPatchSymbolFlags ( ULONG ul )
{
if (ul > (PATCH_SYMBOL_NO_IMAGEHLP + PATCH_SYMBOL_NO_FAILURES + PATCH_SYMBOL_UNDECORATED_TOO))
return (fFalse);
return (fTrue);
}
/* ********************************************************************** */
static void LogSzProp ( MSIHANDLE hdbInput, LPTSTR szProp, LPTSTR szBuf, LPTSTR szBufLog )
{
Assert(hdbInput != NULL);
Assert(!FEmptySz(szProp));
Assert(szBuf != szNull);
Assert(szBufLog != szNull);
UpdateStatusMsg(0, szNull, szProp);
EvalAssert( IDS_OKAY == IdsMsiGetPcwPropertyString(hdbInput, szProp, szBuf, MAX_PATH) );
if (FEmptySz(szBuf))
lstrcpy(szBuf, TEXT("<blank>"));
wsprintf(szBufLog, TEXT("%-34s = '%s'\r\n"), szProp, szBuf);
EvalAssert( FWriteLogFile(szBufLog) );
}
static BOOL FMsiExistAnyTableRecords ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szField );
/* ********************************************************************** */
static UINT UiCreatePatchingTableExportFile ( MSIHANDLE hdbInput, pteEnum ptePatchTable, LPTSTR szTempFolder, LPTSTR szTempFName )
{
Assert(hdbInput != NULL);
Assert(!FEmptySz(szTempFolder));
Assert(szTempFName != szNull);
Assert(szTempFolder != szTempFName);
Assert(ptePatchTable > pteFirstEnum && ptePatchTable < pteNextEnum);
LPTSTR szTable = TEXT("Patch");
LPTSTR szField = TEXT("`PatchSize`");
LPTSTR szFName = TEXT("Patch.idt");
LPTSTR szCreateSqlCmd = TEXT("CREATE TABLE `Patch` ( `File_` CHAR(72) NOT NULL, `Sequence` INTEGER NOT NULL, `PatchSize` LONG NOT NULL, `Attributes` INTEGER NOT NULL, `Header` OBJECT, `StreamRef_` CHAR(72) PRIMARY KEY `File_`, `Sequence` )");
LPTSTR szDropSqlCmd = TEXT("DROP TABLE `Patch`");
LPTSTR szEmptySqlCmd = TEXT("DELETE FROM `Patch`");
if (ptePatchPackage == ptePatchTable)
{
szTable = TEXT("PatchPackage");
szField = TEXT("`PatchId`");
szFName = TEXT("PPackage.idt");
szCreateSqlCmd = TEXT("CREATE TABLE `PatchPackage` ( `PatchId` CHAR(38) NOT NULL, `Media_` INTEGER NOT NULL PRIMARY KEY `PatchId` )");
szDropSqlCmd = TEXT("DROP TABLE `PatchPackage`");
szEmptySqlCmd = TEXT("DELETE FROM `PatchPackage`");
}
else if (pteMsiPatchHeaders == ptePatchTable)
{
szTable = TEXT("MsiPatchHeaders");
szField = TEXT("`StreamRef`");
szFName = TEXT("MsiPatch.idt");
szCreateSqlCmd = TEXT("CREATE TABLE `MsiPatchHeaders` ( `StreamRef` CHAR(38) NOT NULL, `Header` OBJECT NOT NULL PRIMARY KEY `StreamRef` )");
szDropSqlCmd = TEXT("DROP TABLE `MsiPatchHeaders`");
szEmptySqlCmd = TEXT("DELETE FROM `MsiPatchHeaders`");
}
if (FTableExists(hdbInput, szTable, fFalse))
{
if (FValidPatchTableFormat(hdbInput, ptePatchTable))
{
if (FMsiExistAnyTableRecords(hdbInput, szTable, szField))
{
EvalAssert( FSprintfToLog(TEXT("WARNING (22): PCP: ignoring records in table '%s'."), szTable, szEmpty, szEmpty, szEmpty) );
EvalAssert( FExecSqlCmd(hdbInput, szEmptySqlCmd) );
}
EvalAssert( FSprintfToLog(TEXT("Using '%s' table from PCP."), szTable, szEmpty, szEmpty, szEmpty) );
goto LTableExists;
}
EvalAssert( FSprintfToLog(TEXT("WARNING (21): PCP: bad table syntax for '%s'; ignoring."), szTable, szEmpty, szEmpty, szEmpty) );
EvalAssert( FExecSqlCmd(hdbInput, szDropSqlCmd) );
Assert(!FTableExists(hdbInput, szTable, fFalse));
}
BOOL fUsingDefaultMsi;
fUsingDefaultMsi = fFalse;
TCHAR rgchMsiPath[MAX_PATH] = {0};
EvalAssert( IDS_OKAY == IdsMsiGetPcwPropertyString(hdbInput, TEXT("MsiFileToUseToCreatePatchTables"), rgchMsiPath, MAX_PATH) );
if (!FEmptySz(rgchMsiPath))
{
MSIHANDLE hdb;
hdb = NULL;
TCHAR rgchFullPath[MAX_PATH];
if (MSI_OKAY != MsiOpenDatabase(rgchMsiPath, MSIDBOPEN_READONLY, &hdb))
{
Assert(hdb == NULL);
LHandleRelativePath:
hdb = NULL;
if (FFixupPathEx(rgchMsiPath, rgchFullPath))
MsiOpenDatabase(rgchFullPath, MSIDBOPEN_READONLY, &hdb);
// should we try DLL's folder instead of just CWD??
}
else
lstrcpy(rgchFullPath, rgchMsiPath);
if (hdb != NULL)
{
if (FTableExists(hdb, szTable, fFalse))
{
if (!FValidPatchTableFormat(hdb, ptePatchTable))
{
EvalAssert( FSprintfToLog(TEXT("WARNING (23): bad table syntax for '%s' found in file '%s'; ignoring."), szTable, rgchFullPath, szEmpty, szEmpty) );
}
else
{
LPTSTR szFNameTmp = (ptePatch == ptePatchTable) ? TEXT("export1.idt") : ((ptePatchPackage == ptePatchTable) ? TEXT("export2.idt") : TEXT("export3.idt"));
lstrcpy(szTempFName, szFNameTmp);
Assert(!FFileExist(szTempFolder));
*szTempFName = TEXT('\0');
UINT uiRet = MsiDatabaseExport(hdb, szTable, szTempFolder, szFNameTmp);
lstrcpy(szTempFName, szFNameTmp);
if (!FFileExist(szTempFolder))
{
EvalAssert( FSprintfToLog(TEXT("WARNING (24): unable to export table '%s' from file '%s'; ignoring."), szTable, rgchFullPath, szEmpty, szEmpty) );
}
else
{
Assert(uiRet == MSI_OKAY);
*szTempFName = TEXT('\0');
EvalAssert( MSI_OKAY == MsiDatabaseImport(hdbInput, szTempFolder, szFNameTmp) );
Assert(FTableExists(hdbInput, szTable, fFalse));
Assert(FValidPatchTableFormat(hdbInput, ptePatchTable));
EvalAssert( FExecSqlCmd(hdbInput, szEmptySqlCmd) );
// wait to goto LTableExists; until hdb closed
}
}
}
MsiCloseHandle(hdb);
hdb = NULL;
if (FTableExists(hdbInput, szTable, fFalse))
{
EvalAssert( FSprintfToLog(TEXT("Exported '%s' table from MSI file '%s'."), szTable, rgchFullPath, szEmpty, szEmpty) );
goto LTableExists;
}
}
else if (ptePatch == ptePatchTable && !fUsingDefaultMsi)
{
EvalAssert( FSprintfToLog(TEXT("WARNING (25): unable to find MSI file '%s' to export 'Patch' and/or 'PatchPackage' tables; ignoring."), rgchFullPath, szEmpty, szEmpty, szEmpty) );
}
}
if (FEmptySz(rgchMsiPath) && lstrcmpi(rgchMsiPath, TEXT("patch.msi")))
{
lstrcpy(rgchMsiPath, TEXT("patch.msi"));
fUsingDefaultMsi = fTrue;
goto LHandleRelativePath;
}
#define rgchPropSqlCmd rgchMsiPath // reuse buffer
LPTSTR szPcpSqlPropName;
szPcpSqlPropName = (ptePatch == ptePatchTable) ? TEXT("SqlCmdToCreatePatchTable") : ((ptePatchPackage == ptePatchTable) ? TEXT("SqlCmdToCreatePatchPackageTable") : TEXT("SqlCmdToCreateMsiPatchHeadersTable"));
EvalAssert( IDS_OKAY == IdsMsiGetPcwPropertyString(hdbInput, szPcpSqlPropName, rgchPropSqlCmd, MAX_PATH) );
if (!FEmptySz(rgchPropSqlCmd))
{
if (!FExecSqlCmd(hdbInput, rgchPropSqlCmd))
{
EvalAssert( FSprintfToLog(TEXT("WARNING (26): could not execute PCP SQL command: '%s'; ignoring."), szPcpSqlPropName, szEmpty, szEmpty, szEmpty) );
}
else if (!FTableExists(hdbInput, szTable, fFalse))
{
EvalAssert( FSprintfToLog(TEXT("WARNING (27): no table created by PCP SQL command: '%s'; ignoring."), szPcpSqlPropName, szEmpty, szEmpty, szEmpty) );
}
else if (!FValidPatchTableFormat(hdbInput, ptePatchTable))
{
EvalAssert( FSprintfToLog(TEXT("WARNING (28): bad table format created by PCP SQL command: '%s'; ignoring."), szPcpSqlPropName, szEmpty, szEmpty, szEmpty) );
EvalAssert( FExecSqlCmd(hdbInput, szDropSqlCmd) );
Assert(!FTableExists(hdbInput, szTable, fFalse));
}
else
{
EvalAssert( FSprintfToLog(TEXT("Using SQL cmd from PCP's Properties to create '%s' table."), szTable, szEmpty, szEmpty, szEmpty) );
goto LTableExists;
}
}
EvalAssert( FSprintfToLog(TEXT("Using internal SQL cmd to create '%s' table."), szTable, szEmpty, szEmpty, szEmpty) );
EvalAssert( FExecSqlCmd(hdbInput, szCreateSqlCmd) );
LTableExists:
Assert(FTableExists(hdbInput, szTable, fFalse));
Assert(FValidPatchTableFormat(hdbInput, ptePatchTable));
Assert(!FMsiExistAnyTableRecords(hdbInput, szTable, szField));
*szTempFName = TEXT('\0');
EvalAssert( ERROR_SUCCESS == MsiDatabaseExport(hdbInput, szTable, szTempFolder, szFName) );
lstrcpy(szTempFName, szFName);
Assert(FFileExist(szTempFolder));
EvalAssert( FExecSqlCmd(hdbInput, szDropSqlCmd) );
return (IDS_OKAY);
}
/* ********************************************************************** */
static BOOL FMsiExistAnyTableRecords ( MSIHANDLE hdb, LPTSTR szTable, LPTSTR szField )
{
Assert(hdb != NULL);
Assert(!FEmptySz(szTable));
Assert(!FEmptySz(szField));
Assert(*szField == TEXT('`'));
Assert(*SzLastChar(szField) == TEXT('`'));
Assert(lstrlen(szField) >= 3);
BOOL fExists = fFalse;
EvalAssert( IDS_OKAY == IdsMsiExistTableRecordsWhere(hdb, szTable, szField, TEXT(""), &fExists) );
return (fExists);
}
/* ********************************************************************** */
static BOOL FValidPatchTableFormat ( MSIHANDLE hdb, pteEnum ptePatchTable )
{
Assert(hdb != NULL);
Assert(ptePatchTable > pteFirstEnum && ptePatchTable < pteNextEnum);
LPTSTR szTable = (ptePatch == ptePatchTable) ? TEXT("Patch") : ((ptePatchPackage == ptePatchTable) ? TEXT("PatchPackage") : TEXT("MsiPatchHeaders"));
Assert(FTableExists(hdb, szTable, fFalse));
if (ptePatch == ptePatchTable)
{
return (FSzColumnExists(hdb, szTable, TEXT("File_"), fFalse)
&& FIntColumnExists(hdb, szTable, TEXT("Sequence"), fFalse)
&& FIntColumnExists(hdb, szTable, TEXT("PatchSize"), fFalse)
&& FIntColumnExists(hdb, szTable, TEXT("Attributes"), fFalse)
&& FBinaryColumnExists(hdb, szTable, TEXT("Header"), TEXT("File_"), fFalse)
&& FSzColumnExists(hdb, szTable, TEXT("StreamRef_"), fFalse));
}
else if (ptePatchPackage == ptePatchTable)
{
return (FSzColumnExists(hdb, szTable, TEXT("PatchId"), fFalse)
&& FIntColumnExists(hdb, szTable, TEXT("Media_"), fFalse));
}
return (FSzColumnExists(hdb, szTable, TEXT("StreamRef"), fFalse)
&& FBinaryColumnExists(hdb, szTable, TEXT("Header"), TEXT("StreamRef"), fFalse));
}
/* ********************************************************************** */
MSIHANDLE HdbReopenMsi ( MSIHANDLE hdbInput, LPTSTR szImage, BOOL fUpgradedImage, BOOL fTargetUpgradedCopy )
{
Assert(hdbInput != NULL);
Assert(!FEmptySz(szImage));
Assert(!fUpgradedImage || !fTargetUpgradedCopy);
LPTSTR szTable = TEXT("`TargetImages`");
LPTSTR szPKey = TEXT("`Target`");
LPTSTR szMsiPath = TEXT("`MsiPath`");
if (fUpgradedImage)
{
szTable = TEXT("`UpgradedImages`");
szPKey = TEXT("`Upgraded`");
}
else if (fTargetUpgradedCopy)
szMsiPath = TEXT("`MsiPathUpgradedCopy`");
TCHAR rgch[MAX_PATH];
EvalAssert( IDS_OKAY == IdsMsiGetTableString(hdbInput, szTable, szPKey, szMsiPath, szImage, rgch, MAX_PATH) );
Assert(!FEmptySz(rgch));
Assert(FFileExist(rgch));
MSIHANDLE hdb = NULL;
EvalAssert( MSI_OKAY == MsiOpenDatabase(rgch, (fTargetUpgradedCopy) ? MSIDBOPEN_DIRECT : MSIDBOPEN_READONLY, &hdb) );
Assert(hdb != NULL);
return (hdb);
}
| 34.110918 | 318 | 0.660214 | [
"object"
] |
fc8a52ec0db8f3e6b86db51faf6eb8b7b8fbed79 | 2,709 | cpp | C++ | Server/BackEndMonitoringServer/src/CContainerOfLogicalDisk.cpp | ITA-Dnipro/BackEndMonitoring | 2962b6e14e47c789daaf6f6c5e200c8ec419bc7e | [
"MIT"
] | null | null | null | Server/BackEndMonitoringServer/src/CContainerOfLogicalDisk.cpp | ITA-Dnipro/BackEndMonitoring | 2962b6e14e47c789daaf6f6c5e200c8ec419bc7e | [
"MIT"
] | 44 | 2021-01-11T18:26:25.000Z | 2021-02-28T13:22:12.000Z | Server/BackEndMonitoringServer/src/CContainerOfLogicalDisk.cpp | ITA-Dnipro/BackEndMonitoring | 2962b6e14e47c789daaf6f6c5e200c8ec419bc7e | [
"MIT"
] | null | null | null | #include "stdafx.h"
#include "Utils.h"
#include "PlatformUtils.h"
#include "CLogicalDiskInfo.h"
#include "CContainerOfLogicalDisk.h"
#include "CLogger/include/Log.h"
CContainerOfLogicalDisk::CContainerOfLogicalDisk(
std::chrono::duration<int> period_of_checking_status,
EMemoryConvertType count_type) :
m_specification(period_of_checking_status, count_type),
m_is_initialized(false)
{};
CContainerOfLogicalDisk::CContainerOfLogicalDisk(
const CHardwareStatusSpecification& orig) :
m_specification(orig), m_is_initialized(false)
{};
CContainerOfLogicalDisk::CContainerOfLogicalDisk(
const CContainerOfLogicalDisk& orig) :
m_specification(orig.m_specification),
m_p_container_all_logical_disks(orig.m_p_container_all_logical_disks),
m_is_initialized(orig.m_is_initialized)
{};
CContainerOfLogicalDisk::~CContainerOfLogicalDisk() noexcept
{
CLOG_DEBUG_START_FUNCTION();
for (const auto& disk : m_p_container_all_logical_disks)
{
if (nullptr != disk)
{
delete disk;
}
}
CLOG_DEBUG_END_FUNCTION();
}
bool CContainerOfLogicalDisk::TryGetAllExistedLogicalDisksAndInfo()
{
CLOG_DEBUG_START_FUNCTION();
if (!IsInitialized())
{
// will be changed after implementing an exception handler
CLOG_PROD(
"ERROR!!! Call function on uninitialized container of disks");
return false;
}
std::vector<std::string> all_names_of_disks;
CLOG_TRACE_VAR_CREATION(all_names_of_disks);
if (PlatformUtils::TryGetLogicalDisksNames(all_names_of_disks))
{
for (const auto& disk_name : all_names_of_disks)
{
CLogicalDiskInfo* created_disk = new CLogicalDiskInfo();
CLOG_TRACE_VAR_CREATION(created_disk);
//avoid floppy disk or another logical disk without capacity
if (created_disk->InitializeLogicalDiskStatus(
disk_name, m_specification.GetCountType()))
{
m_p_container_all_logical_disks.push_back(created_disk);
}
}
}
else
{
return false;
}
CLOG_DEBUG_END_FUNCTION();
return true;
}
bool CContainerOfLogicalDisk::InitializeContainerOfLogicalDisk()
{
CLOG_DEBUG_START_FUNCTION();
m_is_initialized = true;
if (!TryGetAllExistedLogicalDisksAndInfo())
{
m_is_initialized = false;
return false;
}
CLOG_DEBUG_END_FUNCTION();
return true;
}
bool CContainerOfLogicalDisk::IsInitialized() const
{
return m_is_initialized;
}
const std::vector<CLogicalDiskInfo*>* CContainerOfLogicalDisk::GetAllLogicalDisk() const
{
CLOG_DEBUG_START_FUNCTION();
if (!IsInitialized())
{
// will be changed after implementing an exception handler
return nullptr;
}
CLOG_DEBUG_END_FUNCTION();
return &m_p_container_all_logical_disks;
}
const CHardwareStatusSpecification* CContainerOfLogicalDisk::GetSpecification() const
{
return &m_specification;
}
| 23.763158 | 88 | 0.787375 | [
"vector"
] |
4759d917db65d088aadffe68938172c833428bf3 | 1,846 | hpp | C++ | iOS/G3MiOSSDK/Commons/Basic/ColumnLayoutImageBuilder.hpp | AeroGlass/g3m | a21a9e70a6205f1f37046ae85dafc6e3bfaeb917 | [
"BSD-2-Clause"
] | null | null | null | iOS/G3MiOSSDK/Commons/Basic/ColumnLayoutImageBuilder.hpp | AeroGlass/g3m | a21a9e70a6205f1f37046ae85dafc6e3bfaeb917 | [
"BSD-2-Clause"
] | null | null | null | iOS/G3MiOSSDK/Commons/Basic/ColumnLayoutImageBuilder.hpp | AeroGlass/g3m | a21a9e70a6205f1f37046ae85dafc6e3bfaeb917 | [
"BSD-2-Clause"
] | null | null | null | //
// ColumnLayoutImageBuilder.hpp
// G3MiOSSDK
//
// Created by Diego Gomez Deck on 2/11/15.
//
//
#ifndef __G3MiOSSDK__ColumnLayoutImageBuilder__
#define __G3MiOSSDK__ColumnLayoutImageBuilder__
#include "LayoutImageBuilder.hpp"
class ColumnLayoutImageBuilder : public LayoutImageBuilder {
protected:
void doLayout(const G3MContext* context,
IImageBuilderListener* listener,
bool deleteListener,
const std::vector<ChildResult*>& results);
public:
ColumnLayoutImageBuilder(const std::vector<IImageBuilder*>& children,
int margin = 0,
float borderWidth = 0.0f,
const Color& borderColor = Color::transparent(),
int padding = 0,
const Color& backgroundColor = Color::transparent(),
float cornerRadius = 0.0f,
int childrenSeparation = 0);
ColumnLayoutImageBuilder(IImageBuilder* child0,
IImageBuilder* child1,
int margin = 0,
float borderWidth = 0.0f,
const Color& borderColor = Color::transparent(),
int padding = 0,
const Color& backgroundColor = Color::transparent(),
float cornerRadius = 0.0f,
int childrenSeparation = 0);
};
#endif
| 40.130435 | 104 | 0.439328 | [
"vector"
] |
475b6ee73dff69a340212a6a80a1aa325c4efe49 | 13,855 | cpp | C++ | src/io.cpp | lambdaconservatory/vx-scheme | 6d4f56d2335d4620c6a4491e73dd32b27dee0ea1 | [
"Artistic-1.0-Perl"
] | null | null | null | src/io.cpp | lambdaconservatory/vx-scheme | 6d4f56d2335d4620c6a4491e73dd32b27dee0ea1 | [
"Artistic-1.0-Perl"
] | null | null | null | src/io.cpp | lambdaconservatory/vx-scheme | 6d4f56d2335d4620c6a4491e73dd32b27dee0ea1 | [
"Artistic-1.0-Perl"
] | null | null | null | //----------------------------------------------------------------------
// vx-scheme : Scheme interpreter.
// Copyright (c) 2002,2003,2006 and onwards Colin Smith.
//
// You may distribute under the terms of the Artistic License,
// as specified in the LICENSE file.
//
// io.cpp : reading and printing S-expressions.
#include "vx-scheme.h"
#include <errno.h>
static const char * delim = "\t\n\r) ";
// --------------------------------------------------------------------------
// token - return the next token (sequence of characters until delimiter).
// the delimiter is left on the stream.
//
void token (sio & in, sstring & ss)
{
int c;
TOP:
if ((c = in.get ()) < 0)
return;
// if (in.eof ())
// return;
// XXX
if (strchr (delim, c))
{
in.unget ();
return;
}
ss.append (c);
if (c == '\\')
ss.append (in.get ());
goto TOP;
}
#define READ_RETURN(value) do { retval = value; goto FINISH; } while (0)
// --------------------------------------------------------------------------
// read: convert source text to internal form
//
Cell * Context::read (sio & in)
{
char c;
Cell * retval = unimplemented;
save (r_nu);
save (r_tmp);
TOP:
c = in.get ();
if (c == EOF)
READ_RETURN (0);
if (isspace (c))
goto TOP;
if (c == ';')
{
// ';' introduces a comment. Text up to the next newline
// is discarded, and the parser restarts at the top.
while (c != '\n')
{
c = in.get ();
if (c == EOF)
READ_RETURN (0);
}
goto TOP;
}
if (c == '(')
{
// '(' introduces a list. We invoke the parser recursively,
// accumulating elements until we see a matching ')'.
// One wrinkle is improper lists, formed by placing a `.'
// before the last element; this has the effect of placing
// the tail element directly in the cdr instead of in the
// car of a node pointed to by the cdr. (In particular,
// this allows the syntax `(a . b)' to produce a "raw
// cons."
clear (r_argl);
int dotmode = 0;
LISTLOOP:
save (r_argl);
r_nu = read (in);
restore (r_argl);
if (r_nu == NULL)
READ_RETURN (Cell::car (&r_argl));
if (dotmode == 1)
{
l_appendtail (r_argl, r_nu);
dotmode = 2; // expecting: )
}
else if (r_nu->is_symbol (s_dot))
{
dotmode = 1; // expecting: cdr
}
else if (dotmode == 2)
{
// Uh-oh: something came between `. cdr' and `)'
error ("bad . list syntax");
}
else
l_append (r_argl, r_nu);
goto LISTLOOP;
}
else if (c == ')')
{
READ_RETURN (0);
}
else if (c == '\'')
{
r_nu = read (in);
if (r_nu)
{
r_nu = make (r_nu);
r_tmp = make_symbol (s_quote);
READ_RETURN (cons (r_tmp, r_nu));
}
error ("unexpected eof");
}
else if (c == '`')
{
if ((r_nu = read (in)) != NULL)
{
r_tmp = make_symbol (s_quasiquote);
r_nu = make (r_nu);
READ_RETURN (cons (r_tmp, r_nu));
}
error ("unexpected eof");
}
else if (c == ',')
{
psymbol wrap = s_unquote;
if (in.peek () == '@')
{
in.ignore ();
wrap = s_unquote_splicing;
}
if ((r_nu = read (in)) != NULL)
{
r_nu = make (r_nu);
r_tmp = make_symbol (wrap);
READ_RETURN (cons (r_tmp, r_nu));
}
error ("unexpected eof");
}
else if (c == '#')
{
// First we must treat the read-syntax for vectors #(...) .
if (in.peek () == '(')
{
// Vector.
int vl = 0;
clear (r_argl);
in.get (); // drop the '('
VECLOOP:
save (r_argl);
r_nu = read (in);
restore (r_argl);
if (r_nu == NULL)
{
r_nu = make_vector (vl);
cellvector * vec = r_nu->VectorValue ();
int ix = 0;
FOR_EACH (elt, Cell::car (&r_argl))
vec->set (ix++, Cell::car (elt));
READ_RETURN (r_nu);
}
l_append (r_argl, r_nu);
++vl;
goto VECLOOP;
}
sstring lexeme;
token (in, lexeme);
if (lexeme == "t")
READ_RETURN (make_boolean (true));
else if (lexeme == "f")
READ_RETURN (make_boolean (false));
else if (lexeme [0] == '\\')
{
// This is #\a syntax for characters. But
// we must also be careful to recognize
// #\space and #\newline.
if (lexeme == "\\newline")
READ_RETURN (make_char ('\n'));
if (lexeme == "\\space" || lexeme == "\\Space")
READ_RETURN (make_char (' '));
if (lexeme.length () == 2)
READ_RETURN (make_char (lexeme [1]));
error ("indecipherable #\\ constant: ", lexeme.str ());
}
else if (lexeme [0] == 'x' || lexeme [0] == 'X')
{
// hex constant. Drop the 'x' and convert with strtoul.
char * endptr;
uintptr_t ul = strtoul (lexeme.str () + 1, &endptr, 16);
if (*endptr == '\0')
READ_RETURN (make_int (ul));
error ("indecipherable #x constant");
}
else if (lexeme [0] == 'o' || lexeme [0] == 'O')
{
// octal constant. Drop the 'o' and convert with stroul.
char * endptr;
unsigned long ul = strtoul (lexeme.str () + 1, &endptr, 8);
if (*endptr == '\0')
READ_RETURN (make_int (ul));
error ("indecipherable #o constant");
}
error ("indecipherable #constant:", lexeme.str());
}
else if (c == '"')
{
bool quote = false;
bool done = false;
sstring ss;
while (!done)
{
c = in.get();
if (c == EOF)
done = true;
else
{
if (quote)
{
switch (c)
{
case 'r': ss.append ('\r'); break;
case 'n': ss.append ('\n'); break;
case 'a': ss.append ('\a'); break;
case 't': ss.append ('\t'); break;
// XXX deal with \octal, \hex for i18n
default: ss.append (c);
}
quote = false;
}
else
{
if (c == '\\')
quote = true;
else if (c == '"')
done = true;
else
ss.append (c);
}
}
}
READ_RETURN (make_string (ss.str ()));
}
else
{
// At this point it is either a number or an identifier.
// Scheme's syntax for identifiers is _very_ loose
// (e.g., 3.14f is a perfectly good variable name.)
// So we must be precise about what we accept as a number.
// The following is a state machine meant to recognize
// the following regular expression for a floating-point
// or integer number (`2' stands for any decimal digit):
//
// -?2*(.2*)?([Ee][+-]?2+)?
//
// State 0 is the initial state, and state X rejects
// (i.e., classifies the lexeme as an identifier--there
// may be more of it to read!). States 3, 4, and 6 are
// accepting.
//
// CLASS
// STATE +/- [0-9] . E/e comment
// -------------------------------------------------------------
// 0 1 3 2 X Initial state.
// 1 X 3 2 X Saw sign; read digits or .
// 2 X 4 X X Saw .; read a digit
// (3) X 3 4 5 Read digits, e, or '.'
// (4) X 4 X 5 Have .; read digits or 'e'
// 5 6 6 X X Have e, read a digit or sign
// (6) X 6 X X Have e, read digits
static const unsigned char tmatrix [7][4] = {
{ 1, 3, 2, 0 },
{ 0, 3, 2, 0 },
{ 0, 4, 0, 0 },
{ 0, 3, 4, 5 },
{ 0, 4, 0, 5 },
{ 6, 6, 0, 0 },
{ 0, 6, 0, 0 },
};
static const bool accept [7] = {
false, false, false, true, true, false, true
};
sstring lexeme;
lexeme.append (c);
token (in, lexeme);
int state = 0;
bool inexact = false;
for (size_t ix = 0; ix < lexeme.length (); ++ix)
{
char lch = lexeme [ix];
if (lch == '-' || lch == '+')
state = tmatrix [state][0];
else if (isdigit (lch))
state = tmatrix [state][1];
else if (lch == '.')
{ inexact = true; state = tmatrix [state][2]; }
else if (lch == 'e' || lch == 'E')
{ inexact = true; state = tmatrix [state][3]; }
if (state == 0)
break;
}
// Did the state machine land in an accepting state?
// if so, we have a number.
if (accept [state])
if (inexact)
READ_RETURN (make_real (strtod (lexeme.str (), 0)));
else
{
errno = 0;
long l = strtol (lexeme.str (), 0, 0);
if (errno == ERANGE)
// too big to fit in an integer?
READ_RETURN (make_real (strtod (lexeme.str (), 0)));
READ_RETURN (make_int (l));
}
// If the machine lands in a non-accepting state,
// then we have an identifier.
READ_RETURN (make_symbol (intern (lexeme.str ())));
}
FINISH:
restore (r_tmp);
restore (r_nu);
return retval;
}
Cell * Context::read (FILE * fp)
{
file_sio fsio (fp);
return read (fsio);
}
void Cell::real_to_string (double d, char * buf, int nbytes)
{
sprintf (buf, "%.15g", d);
// Now if buf contains neither a `.' nor an `e', then
// the number was whole, and it won't "read back" as
// a Real, as desired. We tack on a decimal point in
// that event.
if (!strpbrk (buf, ".eE"))
strcat (buf, ".");
}
void Cell::write(FILE* out) const {
sstring output;
write(output);
fprintf(out, output.str());
}
void Cell::write (sstring& ss) const {
if (this == &Nil)
ss.append("()");
else {
Type t = type ();
switch(t) {
case Int: {
char buf[40];
sprintf(buf, "%" PRIdPTR, IntValue());
ss.append(buf);
break;
}
case Symbol:
ss.append(SymbolValue()->key);
break;
case Builtin:
ss.append("#<builtin ");
ss.append(BuiltinValue()->key);
ss.append(">");
break;
case Char:
ss.append("#\\");
// XXX escaping?
ss.append(CharValue());
break;
case Iport:
ss.append("#<input-port>");
break;
case Oport:
ss.append("#<output-port>");
break;
case Subr:
ss.append("#<subr ");
ss.append(SubrValue()->name);
ss.append('>');
break;
case Cont:
ss.append("#<continuation>");
break;
case Real: {
char buf [80];
real_to_string (RealValue(), buf, sizeof(buf));
ss.append(buf);
break;
}
case Unique:
// "Unique" objects (like #t and EOF) keep their
// printed representations in their cdrs.
ss.append(cd.u);
break;
case Cons: {
const Cell * d;
ss.append('(');
for (d = this; d->type() == Cons; d = cdr(d)) {
if (d == nil) {
ss.append(')');
return;
}
car(d)->write(ss);
if (cdr(d) != nil)
ss.append(' ');
}
ss.append(". ");
d->write(ss);
ss.append(')');
break;
}
case String: {
char * p = StringValue ();
char ch;
ss.append('"');
while ((ch = *p++)) {
if (ch == '"')
ss.append("\\\"");
else if (ch == '\\')
ss.append("\\\\");
else if (ch == '\n')
ss.append("\\n");
else
ss.append(ch);
}
ss.append('"');
break;
}
case Vec: {
cellvector * v = VectorValue ();
ss.append("#(");
for (int ix = 0; ix < v->size(); ++ix) {
if (ix != 0)
ss.append(' ');
v->get(ix)->write(ss);
}
ss.append(')');
break;
}
case Lambda: {
Procedure proc = LambdaValue ();
ss.append(flag (MACRO) ? "#<macro " : "#<lambda ");
if (OS::flag (DEBUG_PRINT_PROCEDURES)) {
proc.arglist->write(ss);
ss.append(' ');
proc.body->write(ss);
ss.append('>');
} else {
proc.arglist->write(ss);
ss.append(" ...>");
}
break;
}
case Promise:
ss.append("#<promise ");
PromiseValue()->write(ss);
ss.append('>');
break;
case Cproc:
ss.append("#<compiled-procedure>");
break;
case Cpromise:
if (flag(FORCED))
CPromiseValue()->write(ss);
else
ss.append("#<compiled-promise>");
break;
case Insn:
ss.append("#<vm-instruction>");
break;
default:
ss.append("#<?>");
}
}
}
void Cell::display (FILE * out)
{
switch (type ())
{
case Char:
fputc (CharValue (), out);
break;
case String:
fputs (StringValue (), out);
break;
default:
write (out);
}
fflush (out);
}
bool Context::read_eval_print
(
FILE * in,
FILE * out,
bool interactive
)
{
Cell * result;
Cell * expr;
sstring text;
file_sio sio (in);
if (interactive) {
fputs ("=> ", out);
fflush (out);
}
while ((expr = read (sio)))
{
// Don't bother printing the unspecified value as result.
if ((result = eval (expr)) != unspecified)
{
result->write (out);
fputc ('\n', out);
fflush (out);
}
gc_if_needed ();
return true;
}
return false;
}
| 22.900826 | 77 | 0.45904 | [
"vector"
] |
475ce0034551b2d3b7c23ff588c72d7ba68c2b5c | 39,880 | cpp | C++ | examples/subpasses/subpasses.cpp | nidefawl/Vulkan-Examples-Fork | 2d93474957a6357ddebbe199d2bd79a215f16ee5 | [
"MIT"
] | null | null | null | examples/subpasses/subpasses.cpp | nidefawl/Vulkan-Examples-Fork | 2d93474957a6357ddebbe199d2bd79a215f16ee5 | [
"MIT"
] | null | null | null | examples/subpasses/subpasses.cpp | nidefawl/Vulkan-Examples-Fork | 2d93474957a6357ddebbe199d2bd79a215f16ee5 | [
"MIT"
] | null | null | null | /*
* Vulkan Example - Using subpasses for G-Buffer compositing
*
* Copyright (C) 2016-2021 by Sascha Willems - www.saschawillems.de
*
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*/
/*
* This sample shows how to use sub passes and input attachments for reading from attachments filled in one sub pass in the next sub pass
* For this, it implements a basic deferred renderer using a "G-Buffer" that contains multiple attachments storing the scene's world-position, normal and albedo
* These attachments are filled in the first pass by rendering the scene geometry, the second pass then reads from the using input attachments
* A third forward pass then adds transparent elements and reads from the G-Buffer's depth attachment for proper depth testing
* Input attachments allow you to read from non-varying pixel positions (pixel-local storage) in subsequent sub passes
* That feature was esp. designed with tile-based architectures in mind and results in better performance over using the attachments as shader input images
* This also requires a special render pass setup, which can be found in setupRenderPass
* Descriptor setup in this sample are a bit more complex than usual due to mixing dynamic and static resources and using forward and derred rendering
* So we split them into multiple layouts and combine them in the pipeline layouts
*/
#include "vulkanexamplebase.h"
#include "VulkanglTFModel.h"
#define ENABLE_VALIDATION false
#define NUM_LIGHTS 64
class VulkanExample : public VulkanExampleBase
{
public:
struct Models {
vkglTF::Model scene;
vkglTF::Model transparent;
} models;
vks::Texture2D transparentTexture;
struct Light {
glm::vec4 position;
glm::vec3 color;
float radius;
};
struct UniformData {
glm::mat4 projection;
glm::mat4 model;
glm::mat4 view;
glm::vec4 viewPos;
Light lights[NUM_LIGHTS];
} uniformData;
struct FrameObjects : public VulkanFrameObjects {
vks::Buffer uniformBuffer;
VkDescriptorSet descriptorSet;
};
std::vector<FrameObjects> frameObjects;
// Static descriptor sets, that don't need to be multiplied per frame
struct DescriptorSets {
VkDescriptorSet inputAttachments;
VkDescriptorSet texture;
} descriptorSets;
struct PipelineLayouts {
VkPipelineLayout gbuffer;
VkPipelineLayout composition;
VkPipelineLayout transparent;
} pipelineLayouts;
struct Pipelines {
VkPipeline gbuffer;
VkPipeline composition;
VkPipeline transparent;
} pipelines;
struct DescriptorSetLayouts {
VkDescriptorSetLayout inputAttachments;
VkDescriptorSetLayout textures;
VkDescriptorSetLayout uniformBuffers;
} descriptorSetLayouts;
// G-Buffer framebuffer attachments
struct FrameBufferAttachment {
VkImage image = VK_NULL_HANDLE;
VkDeviceMemory memory = VK_NULL_HANDLE;
VkImageView view = VK_NULL_HANDLE;
VkFormat format;
};
struct Attachments {
FrameBufferAttachment position, normal, albedo;
int32_t width;
int32_t height;
} attachments;
VulkanExample() : VulkanExampleBase(ENABLE_VALIDATION)
{
title = "Subpasses";
camera.setType(Camera::CameraType::firstperson);
camera.setMovementSpeed(5.0f);
#ifndef __ANDROID__
camera.setRotationSpeed(0.25f);
#endif
camera.setPosition(glm::vec3(-3.2f, 1.0f, 5.9f));
camera.setRotation(glm::vec3(0.5f, 210.05f, 0.0f));
camera.setPerspective(60.0f, (float)width / (float)height, 0.1f, 256.0f);
settings.overlay = true;
// We need to tell the user interface in which sub pass it'll be drawn
UIOverlay.setSubpass(2);
}
~VulkanExample()
{
if (device) {
vkDestroyPipeline(device, pipelines.gbuffer, nullptr);
vkDestroyPipeline(device, pipelines.composition, nullptr);
vkDestroyPipeline(device, pipelines.transparent, nullptr);
vkDestroyPipelineLayout(device, pipelineLayouts.gbuffer, nullptr);
vkDestroyPipelineLayout(device, pipelineLayouts.composition, nullptr);
vkDestroyPipelineLayout(device, pipelineLayouts.transparent, nullptr);
vkDestroyDescriptorSetLayout(device, descriptorSetLayouts.inputAttachments, nullptr);
vkDestroyDescriptorSetLayout(device, descriptorSetLayouts.textures, nullptr);
vkDestroyDescriptorSetLayout(device, descriptorSetLayouts.uniformBuffers, nullptr);
destroyAttachment(&attachments.position);
destroyAttachment(&attachments.normal);
destroyAttachment(&attachments.albedo);
transparentTexture.destroy();
for (FrameObjects& frame : frameObjects) {
frame.uniformBuffer.destroy();
destroyBaseFrameObjects(frame);
}
}
}
virtual void getEnabledFeatures()
{
// Enable anisotropic filtering if supported
enabledFeatures.samplerAnisotropy = deviceFeatures.samplerAnisotropy;
};
// Creates a frame buffer attachment for the selected format and usage
void createAttachment(VkFormat format, VkImageUsageFlags usage, FrameBufferAttachment *attachment)
{
// Destroy Vulkan objects if it has a valid handle (e.g. when resizing)
if (attachment->image != VK_NULL_HANDLE) {
destroyAttachment(attachment);
}
attachment->format = format;
// The usage flags and aspect mask for the image depend on the requested type and differ for depth and color
VkImageAspectFlags aspectMask = 0;
VkImageLayout imageLayout;
if (usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) {
aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
imageLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
}
if (usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) {
aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT;
imageLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
}
assert(aspectMask > 0);
// Create the image for the attachment
VkImageCreateInfo image = vks::initializers::imageCreateInfo();
image.imageType = VK_IMAGE_TYPE_2D;
image.format = format;
image.extent.width = attachments.width;
image.extent.height = attachments.height;
image.extent.depth = 1;
image.mipLevels = 1;
image.arrayLayers = 1;
image.samples = VK_SAMPLE_COUNT_1_BIT;
image.tiling = VK_IMAGE_TILING_OPTIMAL;
// The image will be read from in the composition pass, so VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT needs to be set
image.usage = usage | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT;
image.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
VK_CHECK_RESULT(vkCreateImage(device, &image, nullptr, &attachment->image));
VkMemoryAllocateInfo memAlloc = vks::initializers::memoryAllocateInfo();
VkMemoryRequirements memReqs;
vkGetImageMemoryRequirements(device, attachment->image, &memReqs);
memAlloc.allocationSize = memReqs.size;
memAlloc.memoryTypeIndex = vulkanDevice->getMemoryType(memReqs.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
VK_CHECK_RESULT(vkAllocateMemory(device, &memAlloc, nullptr, &attachment->memory));
VK_CHECK_RESULT(vkBindImageMemory(device, attachment->image, attachment->memory, 0));
// Create the image view for the attachment's image
VkImageViewCreateInfo imageView = vks::initializers::imageViewCreateInfo();
imageView.viewType = VK_IMAGE_VIEW_TYPE_2D;
imageView.format = format;
imageView.subresourceRange = {};
imageView.subresourceRange.aspectMask = aspectMask;
imageView.subresourceRange.baseMipLevel = 0;
imageView.subresourceRange.levelCount = 1;
imageView.subresourceRange.baseArrayLayer = 0;
imageView.subresourceRange.layerCount = 1;
imageView.image = attachment->image;
VK_CHECK_RESULT(vkCreateImageView(device, &imageView, nullptr, &attachment->view));
}
// Releases all Vulkan objects created for this attachment
void destroyAttachment(FrameBufferAttachment* attachment)
{
vkDestroyImageView(device, attachment->view, nullptr);
vkDestroyImage(device, attachment->image, nullptr);
vkFreeMemory(device, attachment->memory, nullptr);
attachment->image = VK_NULL_HANDLE;
}
// Create the color attachments for the G-Buffer storing the different image components used for composition: world position, normals and albedo
void createGBufferAttachments()
{
createAttachment(VK_FORMAT_R16G16B16A16_SFLOAT, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, &attachments.position);
createAttachment(VK_FORMAT_R16G16B16A16_SFLOAT, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, &attachments.normal);
createAttachment(VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, &attachments.albedo);
}
// Override framebuffer setup from base class, will automatically be called upon setup and if a window is resized
void setupFrameBuffer()
{
// If the window is resized, all the framebuffers/attachments used in our composition passes need to be recreated
if (attachments.width != width || attachments.height != height) {
attachments.width = width;
attachments.height = height;
createGBufferAttachments();
// As the image attachments are referred in the descriptor sets, we need to update them to pass the new view handles
std::vector< VkDescriptorImageInfo> descriptorImageInfos = {
vks::initializers::descriptorImageInfo(VK_NULL_HANDLE, attachments.position.view, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL),
vks::initializers::descriptorImageInfo(VK_NULL_HANDLE, attachments.normal.view, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL),
vks::initializers::descriptorImageInfo(VK_NULL_HANDLE, attachments.albedo.view, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL),
};
std::vector<VkWriteDescriptorSet> writeDescriptorSets;
for (size_t i = 0; i < descriptorImageInfos.size(); i++) {
writeDescriptorSets.push_back(vks::initializers::writeDescriptorSet(descriptorSets.inputAttachments, VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, i, &descriptorImageInfos[i]));
}
vkUpdateDescriptorSets(device, static_cast<uint32_t>(writeDescriptorSets.size()), writeDescriptorSets.data(), 0, nullptr);
}
VkImageView attachments[5];
VkFramebufferCreateInfo frameBufferCreateInfo{};
frameBufferCreateInfo.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO;
frameBufferCreateInfo.renderPass = renderPass;
frameBufferCreateInfo.attachmentCount = 5;
frameBufferCreateInfo.pAttachments = attachments;
frameBufferCreateInfo.width = width;
frameBufferCreateInfo.height = height;
frameBufferCreateInfo.layers = 1;
// Create frame buffers for every swap chain image
frameBuffers.resize(swapChain.imageCount);
for (uint32_t i = 0; i < frameBuffers.size(); i++) {
attachments[0] = swapChain.buffers[i].view;
attachments[1] = this->attachments.position.view;
attachments[2] = this->attachments.normal.view;
attachments[3] = this->attachments.albedo.view;
attachments[4] = depthStencil.view;
VK_CHECK_RESULT(vkCreateFramebuffer(device, &frameBufferCreateInfo, nullptr, &frameBuffers[i]));
}
}
// Create a render pass for the three sub passes used by this example:
// Subpass 0 fills the G-Buffer with the image components required for a defferred rendering setup
// Subpass 1 does the scene composition applying lighting and reading from the G-Buffer
// Subpass 2 is a forward rendering pass that adds the transparent elements to the final output
// This overrides the default render pass setup of the example base class
void setupRenderPass()
{
attachments.width = width;
attachments.height = height;
createGBufferAttachments();
std::array<VkAttachmentDescription, 5> attachments{};
// Color attachment
attachments[0].format = swapChain.colorFormat;
attachments[0].samples = VK_SAMPLE_COUNT_1_BIT;
attachments[0].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
attachments[0].storeOp = VK_ATTACHMENT_STORE_OP_STORE;
attachments[0].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
attachments[0].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
attachments[0].initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
attachments[0].finalLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR;
// Deferred attachments
// Position
attachments[1].format = this->attachments.position.format;
attachments[1].samples = VK_SAMPLE_COUNT_1_BIT;
attachments[1].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
attachments[1].storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
attachments[1].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
attachments[1].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
attachments[1].initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
attachments[1].finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
// Normals
attachments[2].format = this->attachments.normal.format;
attachments[2].samples = VK_SAMPLE_COUNT_1_BIT;
attachments[2].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
attachments[2].storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
attachments[2].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
attachments[2].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
attachments[2].initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
attachments[2].finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
// Albedo
attachments[3].format = this->attachments.albedo.format;
attachments[3].samples = VK_SAMPLE_COUNT_1_BIT;
attachments[3].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
attachments[3].storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
attachments[3].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
attachments[3].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
attachments[3].initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
attachments[3].finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
// Depth attachment
attachments[4].format = depthFormat;
attachments[4].samples = VK_SAMPLE_COUNT_1_BIT;
attachments[4].loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
attachments[4].storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
attachments[4].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
attachments[4].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
attachments[4].initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
attachments[4].finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
// The sample uses three subpasses
std::array<VkSubpassDescription,3> subpassDescriptions{};
// First sub pass fills the G-Buffer attachments
VkAttachmentReference colorReferences[4];
colorReferences[0] = { 0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL };
colorReferences[1] = { 1, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL };
colorReferences[2] = { 2, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL };
colorReferences[3] = { 3, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL };
VkAttachmentReference depthReference = { 4, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL };
subpassDescriptions[0].pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
subpassDescriptions[0].colorAttachmentCount = 4;
subpassDescriptions[0].pColorAttachments = colorReferences;
subpassDescriptions[0].pDepthStencilAttachment = &depthReference;
// Second sub pass will compose the scene using the information from the G-Buffer attachments and applies screen-space lighting
VkAttachmentReference colorReference = { 0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL };
// These are the input attachments for the G-Buffer attachments created in the first subpass and will be read in the shader using input attachments
VkAttachmentReference inputReferences[3];
inputReferences[0] = { 1, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL };
inputReferences[1] = { 2, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL };
inputReferences[2] = { 3, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL };
subpassDescriptions[1].pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
subpassDescriptions[1].colorAttachmentCount = 1;
subpassDescriptions[1].pColorAttachments = &colorReference;
subpassDescriptions[1].pDepthStencilAttachment = &depthReference;
// Use the color attachments filled in the first pass as input attachments
subpassDescriptions[1].inputAttachmentCount = 3;
subpassDescriptions[1].pInputAttachments = inputReferences;
// Third subpass renders the transparent geometry using a forward pass that compares against depth stored in th G-Buffer attachments
colorReference = { 0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL };
inputReferences[0] = { 1, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL };
subpassDescriptions[2].pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
subpassDescriptions[2].colorAttachmentCount = 1;
subpassDescriptions[2].pColorAttachments = &colorReference;
subpassDescriptions[2].pDepthStencilAttachment = &depthReference;
// Use the color/depth attachments filled in the first pass as input attachments
subpassDescriptions[2].inputAttachmentCount = 1;
subpassDescriptions[2].pInputAttachments = inputReferences;
// Use subpass dependencies for implicit layout transitions of the images used in the render pass
std::array<VkSubpassDependency, 4> dependencies;
dependencies[0].srcSubpass = VK_SUBPASS_EXTERNAL;
dependencies[0].dstSubpass = 0;
dependencies[0].srcStageMask = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
dependencies[0].dstStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
dependencies[0].srcAccessMask = VK_ACCESS_MEMORY_READ_BIT;
dependencies[0].dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
dependencies[0].dependencyFlags = VK_DEPENDENCY_BY_REGION_BIT;
// This dependency transitions the input attachment from color attachment to shader read
dependencies[1].srcSubpass = 0;
dependencies[1].dstSubpass = 1;
dependencies[1].srcStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
dependencies[1].dstStageMask = VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
dependencies[1].srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
dependencies[1].dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
dependencies[1].dependencyFlags = VK_DEPENDENCY_BY_REGION_BIT;
dependencies[2].srcSubpass = 1;
dependencies[2].dstSubpass = 2;
dependencies[2].srcStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
dependencies[2].dstStageMask = VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
dependencies[2].srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
dependencies[2].dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
dependencies[2].dependencyFlags = VK_DEPENDENCY_BY_REGION_BIT;
dependencies[3].srcSubpass = 2;
dependencies[3].dstSubpass = VK_SUBPASS_EXTERNAL;
dependencies[3].srcStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
dependencies[3].dstStageMask = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT;
dependencies[3].srcAccessMask = VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
dependencies[3].dstAccessMask = VK_ACCESS_MEMORY_READ_BIT;
dependencies[3].dependencyFlags = VK_DEPENDENCY_BY_REGION_BIT;
VkRenderPassCreateInfo renderPassInfo{};
renderPassInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO;
renderPassInfo.attachmentCount = static_cast<uint32_t>(attachments.size());
renderPassInfo.pAttachments = attachments.data();
renderPassInfo.subpassCount = static_cast<uint32_t>(subpassDescriptions.size());
renderPassInfo.pSubpasses = subpassDescriptions.data();
renderPassInfo.dependencyCount = static_cast<uint32_t>(dependencies.size());
renderPassInfo.pDependencies = dependencies.data();
VK_CHECK_RESULT(vkCreateRenderPass(device, &renderPassInfo, nullptr, &renderPass));
}
void loadAssets()
{
const uint32_t glTFLoadingFlags = vkglTF::FileLoadingFlags::PreTransformVertices | vkglTF::FileLoadingFlags::PreMultiplyVertexColors | vkglTF::FileLoadingFlags::FlipY;
models.scene.loadFromFile(getAssetPath() + "models/samplebuilding.gltf", vulkanDevice, queue, glTFLoadingFlags);
models.transparent.loadFromFile(getAssetPath() + "models/samplebuilding_glass.gltf", vulkanDevice, queue, glTFLoadingFlags);
transparentTexture.loadFromFile(getAssetPath() + "textures/colored_glass_rgba.ktx", VK_FORMAT_R8G8B8A8_UNORM, vulkanDevice, queue);
}
void createDescriptors()
{
// Pool
std::vector<VkDescriptorPoolSize> poolSizes = {
vks::initializers::descriptorPoolSize(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, getFrameCount()),
vks::initializers::descriptorPoolSize(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1),
vks::initializers::descriptorPoolSize(VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, 3),
};
// Set count = one set per uniform buffer per frame + one set for the input attachments + one set for the transparent texture
VkDescriptorPoolCreateInfo descriptorPoolInfo = vks::initializers::descriptorPoolCreateInfo(poolSizes, getFrameCount() + 2);
VK_CHECK_RESULT(vkCreateDescriptorPool(device, &descriptorPoolInfo, nullptr, &descriptorPool));
// Layouts
std::vector<VkDescriptorSetLayoutBinding> setLayoutBindings{};
VkDescriptorSetLayoutCreateInfo descriptorLayout{};
// Layout containing the G-Buffer attachments as input attachments to be read from in a shader
setLayoutBindings = {
// Binding 0: Position input attachment
vks::initializers::descriptorSetLayoutBinding(VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, VK_SHADER_STAGE_FRAGMENT_BIT, 0),
// Binding 1: Normal input attachment
vks::initializers::descriptorSetLayoutBinding(VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, VK_SHADER_STAGE_FRAGMENT_BIT, 1),
// Binding 2: Albedo input attachment
vks::initializers::descriptorSetLayoutBinding(VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, VK_SHADER_STAGE_FRAGMENT_BIT, 2),
};
descriptorLayout = vks::initializers::descriptorSetLayoutCreateInfo(setLayoutBindings);
VK_CHECK_RESULT(vkCreateDescriptorSetLayout(device, &descriptorLayout, nullptr, &descriptorSetLayouts.inputAttachments));
// Layout containing the texture used in the transparent pass
setLayoutBindings = {
vks::initializers::descriptorSetLayoutBinding(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_SHADER_STAGE_FRAGMENT_BIT, 0),
};
descriptorLayout = vks::initializers::descriptorSetLayoutCreateInfo(setLayoutBindings);
VK_CHECK_RESULT(vkCreateDescriptorSetLayout(device, &descriptorLayout, nullptr, &descriptorSetLayouts.textures));
// Layout containing the per-frame uniform buffer
setLayoutBindings = {
vks::initializers::descriptorSetLayoutBinding(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT, 0)
};
descriptorLayout = vks::initializers::descriptorSetLayoutCreateInfo(setLayoutBindings);
VK_CHECK_RESULT(vkCreateDescriptorSetLayout(device, &descriptorLayout, nullptr, &descriptorSetLayouts.uniformBuffers));
// Sets
VkDescriptorSetAllocateInfo allocInfo{};
// Set with the input attachments for the G-Buffer color attachments
allocInfo = vks::initializers::descriptorSetAllocateInfo(descriptorPool, &descriptorSetLayouts.inputAttachments, 1);
VK_CHECK_RESULT(vkAllocateDescriptorSets(device, &allocInfo, &descriptorSets.inputAttachments));
VkDescriptorImageInfo texDescriptorPosition = vks::initializers::descriptorImageInfo(VK_NULL_HANDLE, attachments.position.view, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
VkDescriptorImageInfo texDescriptorNormal = vks::initializers::descriptorImageInfo(VK_NULL_HANDLE, attachments.normal.view, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
VkDescriptorImageInfo texDescriptorAlbedo = vks::initializers::descriptorImageInfo(VK_NULL_HANDLE, attachments.albedo.view, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
std::vector<VkWriteDescriptorSet> writeDescriptorSets = {
vks::initializers::writeDescriptorSet(descriptorSets.inputAttachments, VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, 0, &texDescriptorPosition),
vks::initializers::writeDescriptorSet(descriptorSets.inputAttachments, VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, 1, &texDescriptorNormal),
vks::initializers::writeDescriptorSet(descriptorSets.inputAttachments, VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, 2, &texDescriptorAlbedo),
};
vkUpdateDescriptorSets(device, static_cast<uint32_t>(writeDescriptorSets.size()), writeDescriptorSets.data(), 0, nullptr);
// Set with the transparent texture for the forward pass
allocInfo = vks::initializers::descriptorSetAllocateInfo(descriptorPool, &descriptorSetLayouts.textures, 1);
VK_CHECK_RESULT(vkAllocateDescriptorSets(device, &allocInfo, &descriptorSets.texture));
VkWriteDescriptorSet writeDescriptorSet = vks::initializers::writeDescriptorSet(descriptorSets.texture, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 0, &transparentTexture.descriptor);
vkUpdateDescriptorSets(device, 1, &writeDescriptorSet, 0, nullptr);
// Uniform buffers change between frames, so we need one set per frame
for (FrameObjects& frame : frameObjects) {
allocInfo = vks::initializers::descriptorSetAllocateInfo(descriptorPool, &descriptorSetLayouts.uniformBuffers, 1);
VK_CHECK_RESULT(vkAllocateDescriptorSets(device, &allocInfo, &frame.descriptorSet));
writeDescriptorSet = vks::initializers::writeDescriptorSet(frame.descriptorSet, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 0, &frame.uniformBuffer.descriptor);
vkUpdateDescriptorSets(device, 1, &writeDescriptorSet, 0, nullptr);
}
}
void createPipelines()
{
// Layouts
VkPipelineLayoutCreateInfo pipelineLayoutCreateInfo = vks::initializers::pipelineLayoutCreateInfo();
std::vector<VkDescriptorSetLayout> setLayouts;
// G-Buffer filling layout - Only uses the current frame's uniform buffer
setLayouts = { descriptorSetLayouts.uniformBuffers };
pipelineLayoutCreateInfo.pSetLayouts = setLayouts.data();
pipelineLayoutCreateInfo.setLayoutCount = static_cast<uint32_t>(setLayouts.size());
VK_CHECK_RESULT(vkCreatePipelineLayout(device, &pipelineLayoutCreateInfo, nullptr, &pipelineLayouts.gbuffer));
// Transparent forward pass layout - Uses the transparent texture and the current frame's uniform buffer
setLayouts = { descriptorSetLayouts.inputAttachments, descriptorSetLayouts.textures, descriptorSetLayouts.uniformBuffers };
pipelineLayoutCreateInfo.pSetLayouts = setLayouts.data();
pipelineLayoutCreateInfo.setLayoutCount = static_cast<uint32_t>(setLayouts.size());
VK_CHECK_RESULT(vkCreatePipelineLayout(device, &pipelineLayoutCreateInfo, nullptr, &pipelineLayouts.transparent));
// Composition pass layout - Uses the input attachments of rht G-Buffer and the current frame's uniform buffer
setLayouts = { descriptorSetLayouts.inputAttachments, descriptorSetLayouts.uniformBuffers };
pipelineLayoutCreateInfo.pSetLayouts = setLayouts.data();
pipelineLayoutCreateInfo.setLayoutCount = static_cast<uint32_t>(setLayouts.size());
VK_CHECK_RESULT(vkCreatePipelineLayout(device, &pipelineLayoutCreateInfo, nullptr, &pipelineLayouts.composition));
// Pipelines
VkPipelineInputAssemblyStateCreateInfo inputAssemblyState;
VkPipelineRasterizationStateCreateInfo rasterizationState;
VkPipelineColorBlendAttachmentState blendAttachmentState;
VkPipelineColorBlendStateCreateInfo colorBlendState;
VkPipelineDepthStencilStateCreateInfo depthStencilState;
VkPipelineViewportStateCreateInfo viewportState;
VkPipelineMultisampleStateCreateInfo multisampleState;
std::vector<VkDynamicState> dynamicStateEnables;
VkPipelineDynamicStateCreateInfo dynamicState;
std::array<VkPipelineShaderStageCreateInfo, 2> shaderStages;
VkGraphicsPipelineCreateInfo pipelineCI;
// Pipeline for G-Buffer composition - This pipeline fills the G-Buffer attachments with scene world-positions, normals and albedo
inputAssemblyState = vks::initializers::pipelineInputAssemblyStateCreateInfo(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, 0, VK_FALSE);
rasterizationState = vks::initializers::pipelineRasterizationStateCreateInfo(VK_POLYGON_MODE_FILL, VK_CULL_MODE_BACK_BIT, VK_FRONT_FACE_COUNTER_CLOCKWISE, 0);
blendAttachmentState = vks::initializers::pipelineColorBlendAttachmentState(0xf, VK_FALSE);
colorBlendState = vks::initializers::pipelineColorBlendStateCreateInfo(1, &blendAttachmentState);
depthStencilState = vks::initializers::pipelineDepthStencilStateCreateInfo(VK_TRUE, VK_TRUE, VK_COMPARE_OP_LESS_OR_EQUAL);
viewportState = vks::initializers::pipelineViewportStateCreateInfo(1, 1, 0);
multisampleState = vks::initializers::pipelineMultisampleStateCreateInfo(VK_SAMPLE_COUNT_1_BIT, 0);
dynamicStateEnables = { VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR };
dynamicState = vks::initializers::pipelineDynamicStateCreateInfo(dynamicStateEnables);
pipelineCI = vks::initializers::pipelineCreateInfo(pipelineLayouts.gbuffer, renderPass, 0);
// This pipeline will be used in the first subpass
pipelineCI.subpass = 0;
pipelineCI.pInputAssemblyState = &inputAssemblyState;
pipelineCI.pRasterizationState = &rasterizationState;
pipelineCI.pColorBlendState = &colorBlendState;
pipelineCI.pMultisampleState = &multisampleState;
pipelineCI.pViewportState = &viewportState;
pipelineCI.pDepthStencilState = &depthStencilState;
pipelineCI.pDynamicState = &dynamicState;
pipelineCI.stageCount = static_cast<uint32_t>(shaderStages.size());
pipelineCI.pStages = shaderStages.data();
pipelineCI.pVertexInputState = vkglTF::Vertex::getPipelineVertexInputState({ vkglTF::VertexComponent::Position, vkglTF::VertexComponent::Color, vkglTF::VertexComponent::Normal, vkglTF::VertexComponent::UV });
// We need to set a blend attachment state for all four attachments usind in this pass
std::array<VkPipelineColorBlendAttachmentState, 4> blendAttachmentStates = {
vks::initializers::pipelineColorBlendAttachmentState(0xf, VK_FALSE),
vks::initializers::pipelineColorBlendAttachmentState(0xf, VK_FALSE),
vks::initializers::pipelineColorBlendAttachmentState(0xf, VK_FALSE),
vks::initializers::pipelineColorBlendAttachmentState(0xf, VK_FALSE)
};
colorBlendState.attachmentCount = static_cast<uint32_t>(blendAttachmentStates.size());
colorBlendState.pAttachments = blendAttachmentStates.data();
shaderStages[0] = loadShader(getShadersPath() + "subpasses/gbuffer.vert.spv", VK_SHADER_STAGE_VERTEX_BIT);
shaderStages[1] = loadShader(getShadersPath() + "subpasses/gbuffer.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT);
VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCI, nullptr, &pipelines.gbuffer));
// Pipeline for the deferred scene composition - Composes the attachments of the G-Buffer into the final image applying lights in screen space
inputAssemblyState = vks::initializers::pipelineInputAssemblyStateCreateInfo(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, 0, VK_FALSE);
rasterizationState = vks::initializers::pipelineRasterizationStateCreateInfo(VK_POLYGON_MODE_FILL, VK_CULL_MODE_NONE, VK_FRONT_FACE_COUNTER_CLOCKWISE, 0);
blendAttachmentState = vks::initializers::pipelineColorBlendAttachmentState(0xf, VK_FALSE);
colorBlendState = vks::initializers::pipelineColorBlendStateCreateInfo(1, &blendAttachmentState);
depthStencilState = vks::initializers::pipelineDepthStencilStateCreateInfo(VK_TRUE, VK_FALSE, VK_COMPARE_OP_LESS_OR_EQUAL);
viewportState = vks::initializers::pipelineViewportStateCreateInfo(1, 1, 0);
multisampleState = vks::initializers::pipelineMultisampleStateCreateInfo(VK_SAMPLE_COUNT_1_BIT, 0);
dynamicStateEnables = { VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR };
dynamicState = vks::initializers::pipelineDynamicStateCreateInfo(dynamicStateEnables);
// This pipeline has no geometry and is rendered as a full-screen covering triangle with the vertex positions generted in the composition.vert shader
VkPipelineVertexInputStateCreateInfo emptyInputState = vks::initializers::pipelineVertexInputStateCreateInfo();
pipelineCI = vks::initializers::pipelineCreateInfo(pipelineLayouts.composition, renderPass, 0);
// This pipeline will be used in the second subpass
pipelineCI.subpass = 1;
pipelineCI.pVertexInputState = &emptyInputState;
pipelineCI.pInputAssemblyState = &inputAssemblyState;
pipelineCI.pRasterizationState = &rasterizationState;
pipelineCI.pColorBlendState = &colorBlendState;
pipelineCI.pMultisampleState = &multisampleState;
pipelineCI.pViewportState = &viewportState;
pipelineCI.pDepthStencilState = &depthStencilState;
pipelineCI.pDynamicState = &dynamicState;
pipelineCI.stageCount = static_cast<uint32_t>(shaderStages.size());
pipelineCI.pStages = shaderStages.data();
shaderStages[0] = loadShader(getShadersPath() + "subpasses/composition.vert.spv", VK_SHADER_STAGE_VERTEX_BIT);
shaderStages[1] = loadShader(getShadersPath() + "subpasses/composition.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT);
// Use specialization constants to pass number of lights to the shader
VkSpecializationMapEntry specializationEntry{};
specializationEntry.constantID = 0;
specializationEntry.offset = 0;
specializationEntry.size = sizeof(uint32_t);
uint32_t specializationData = NUM_LIGHTS;
VkSpecializationInfo specializationInfo;
specializationInfo.mapEntryCount = 1;
specializationInfo.pMapEntries = &specializationEntry;
specializationInfo.dataSize = sizeof(specializationData);
specializationInfo.pData = &specializationData;
shaderStages[1].pSpecializationInfo = &specializationInfo;
VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCI, nullptr, &pipelines.composition));
// Pipeline for the transparent forward-rendering pipeline
// Enable blending
blendAttachmentState.blendEnable = VK_TRUE;
blendAttachmentState.srcColorBlendFactor = VK_BLEND_FACTOR_SRC_ALPHA;
blendAttachmentState.dstColorBlendFactor = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA;
blendAttachmentState.colorBlendOp = VK_BLEND_OP_ADD;
blendAttachmentState.srcAlphaBlendFactor = VK_BLEND_FACTOR_ONE;
blendAttachmentState.dstAlphaBlendFactor = VK_BLEND_FACTOR_ZERO;
blendAttachmentState.alphaBlendOp = VK_BLEND_OP_ADD;
blendAttachmentState.colorWriteMask = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | VK_COLOR_COMPONENT_B_BIT | VK_COLOR_COMPONENT_A_BIT;
// This pipeline will be used in the third subpass
pipelineCI.subpass = 2;
pipelineCI.pVertexInputState = vkglTF::Vertex::getPipelineVertexInputState({ vkglTF::VertexComponent::Position, vkglTF::VertexComponent::Color, vkglTF::VertexComponent::Normal, vkglTF::VertexComponent::UV });
pipelineCI.layout = pipelineLayouts.transparent;
shaderStages[0] = loadShader(getShadersPath() + "subpasses/transparent.vert.spv", VK_SHADER_STAGE_VERTEX_BIT);
shaderStages[1] = loadShader(getShadersPath() + "subpasses/transparent.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT);
VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCI, nullptr, &pipelines.transparent));
}
// Initialize the scene lights with random colors and positions
void initLights()
{
const std::vector<glm::vec3> colors = {
glm::vec3(1.0f, 1.0f, 1.0f),
glm::vec3(1.0f, 0.0f, 0.0f),
glm::vec3(0.0f, 1.0f, 0.0f),
glm::vec3(0.0f, 0.0f, 1.0f),
glm::vec3(1.0f, 1.0f, 0.0f),
};
std::default_random_engine rndGen(benchmark.active ? 0 : (unsigned)time(nullptr));
std::uniform_real_distribution<float> rndDist(-1.0f, 1.0f);
std::uniform_int_distribution<uint32_t> rndCol(0, static_cast<uint32_t>(colors.size()-1));
for (auto& light : uniformData.lights) {
light.position = glm::vec4(rndDist(rndGen) * 6.0f, 0.25f + std::abs(rndDist(rndGen)) * 4.0f, rndDist(rndGen) * 6.0f, 1.0f);
light.color = colors[rndCol(rndGen)];
light.radius = 1.0f + std::abs(rndDist(rndGen));
}
}
void prepare()
{
VulkanExampleBase::prepare();
// Prepare per-frame ressources
frameObjects.resize(getFrameCount());
for (FrameObjects& frame : frameObjects) {
createBaseFrameObjects(frame);
// Uniform buffers
VK_CHECK_RESULT(vulkanDevice->createAndMapBuffer(VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, &frame.uniformBuffer, sizeof(UniformData)));
}
loadAssets();
initLights();
createDescriptors();
createPipelines();
prepared = true;
}
virtual void render()
{
FrameObjects currentFrame = frameObjects[getCurrentFrameIndex()];
VulkanExampleBase::prepareFrame(currentFrame);
// Update uniform data for the next frame
uniformData.projection = camera.matrices.perspective;
uniformData.view = camera.matrices.view;
uniformData.model = glm::mat4(1.0f);
uniformData.viewPos = glm::vec4(camera.position, 0.0f) * glm::vec4(-1.0f, 1.0f, -1.0f, 1.0f);
memcpy(currentFrame.uniformBuffer.mapped, &uniformData, sizeof(uniformData));
// Build the command buffer
// The renderpass for this sample has 5 attachments (4 color, 1 depth), so we need 5 clear values
VkClearValue clearValues[5];
clearValues[0].color = { { 0.0f, 0.0f, 0.0f, 0.0f } };
clearValues[1].color = { { 0.0f, 0.0f, 0.0f, 0.0f } };
clearValues[2].color = { { 0.0f, 0.0f, 0.0f, 0.0f } };
clearValues[3].color = { { 0.0f, 0.0f, 0.0f, 0.0f } };
clearValues[4].depthStencil = { 1.0f, 0 };
const VkCommandBuffer commandBuffer = currentFrame.commandBuffer;
const VkCommandBufferBeginInfo commandBufferBeginInfo = getCommandBufferBeginInfo();
const VkRect2D renderArea = getRenderArea();
const VkViewport viewport = getViewport();
const VkRenderPassBeginInfo renderPassBeginInfo = getRenderPassBeginInfo(renderPass, clearValues, 5);
VK_CHECK_RESULT(vkBeginCommandBuffer(commandBuffer, &commandBufferBeginInfo));
vkCmdBeginRenderPass(commandBuffer, &renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE);
vkCmdSetViewport(commandBuffer, 0, 1, &viewport);
vkCmdSetScissor(commandBuffer, 0, 1, &renderArea);
// First sub pass fills the G-Buffer attachments
vks::debugmarker::beginRegion(commandBuffer, "Subpass 0: Deferred G-Buffer creation", glm::vec4(1.0f, 1.0f, 1.0f, 1.0f));
vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelines.gbuffer);
vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayouts.gbuffer, 0, 1, ¤tFrame.descriptorSet, 0, nullptr);
models.scene.draw(commandBuffer);
vks::debugmarker::endRegion(commandBuffer);
// Second sub pass will compose the scene using the information from the G-Buffer attachments and applies screen-space lighting
vks::debugmarker::beginRegion(commandBuffer, "Subpass 1: Deferred composition", glm::vec4(1.0f, 1.0f, 1.0f, 1.0f));
vkCmdNextSubpass(commandBuffer, VK_SUBPASS_CONTENTS_INLINE);
vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelines.composition);
vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayouts.composition, 0, 1, &descriptorSets.inputAttachments, 0, nullptr);
vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayouts.composition, 1, 1, ¤tFrame.descriptorSet, 0, nullptr);
vkCmdDraw(commandBuffer, 3, 1, 0, 0);
vks::debugmarker::endRegion(commandBuffer);
// Third subpass renders the transparent geometry using a forward pass that compares against depth stored in th G-Buffer attachments
vks::debugmarker::beginRegion(commandBuffer, "Subpass 2: Forward transparency", glm::vec4(1.0f, 1.0f, 1.0f, 1.0f));
vkCmdNextSubpass(commandBuffer, VK_SUBPASS_CONTENTS_INLINE);
vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelines.transparent);
vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayouts.transparent, 0, 1, &descriptorSets.inputAttachments, 0, nullptr);
vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayouts.transparent, 1, 1, &descriptorSets.texture, 0, nullptr);
vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayouts.transparent, 2, 1, ¤tFrame.descriptorSet, 0, nullptr);
models.transparent.draw(commandBuffer);
vks::debugmarker::endRegion(commandBuffer);
drawUI(commandBuffer);
vkCmdEndRenderPass(commandBuffer);
VK_CHECK_RESULT(vkEndCommandBuffer(commandBuffer));
VulkanExampleBase::submitFrame(currentFrame);
}
virtual void OnUpdateUIOverlay(vks::UIOverlay *overlay)
{
if (overlay->header("Subpasses")) {
overlay->text("0: Deferred G-Buffer creation");
overlay->text("1: Deferred composition");
overlay->text("2: Forward transparency");
}
if (overlay->header("Settings")) {
if (overlay->button("Randomize lights")) {
initLights();
}
}
}
};
VULKAN_EXAMPLE_MAIN()
| 54.705075 | 210 | 0.803235 | [
"geometry",
"render",
"vector",
"model"
] |
4766026fc2741d801078b6a28214c39dd98cb9a8 | 6,757 | cpp | C++ | tests/verify/verify_metric.cpp | Roboauto/spatial | fe652631eb5ec23a719bf1788c68cbd67060e12b | [
"BSL-1.0"
] | 7 | 2015-12-07T02:10:23.000Z | 2022-01-01T05:39:05.000Z | tests/verify/verify_metric.cpp | Roboauto/spatial | fe652631eb5ec23a719bf1788c68cbd67060e12b | [
"BSL-1.0"
] | 1 | 2021-01-28T15:07:42.000Z | 2021-01-28T15:07:42.000Z | tests/verify/verify_metric.cpp | Roboauto/spatial | fe652631eb5ec23a719bf1788c68cbd67060e12b | [
"BSL-1.0"
] | 2 | 2016-08-31T13:30:18.000Z | 2021-07-07T07:22:03.000Z | // -*- C++ -*-
//
// Copyright Sylvain Bougerel 2009 - 2012.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file COPYING or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_TEST_DYN_LINK
#define SPATIAL_ENABLE_ASSERT // detect interal issues that should not occur
#include <boost/test/unit_test.hpp>
#include "../../src/metric.hpp"
#include "spatial_test_fixtures.hpp"
BOOST_AUTO_TEST_CASE(test_difference_bracket)
{
bracket_minus<int2, int>
diff = details::with_builtin_difference<point_multiset<2, int2> >()
(point_multiset<2, int2>());
int2 p(0, 1);
int2 q(2, 0);
BOOST_CHECK_EQUAL(diff(0, p, q), -2);
BOOST_CHECK_EQUAL(diff(1, p, q), 1);
}
BOOST_AUTO_TEST_CASE(test_difference_paren)
{
typedef point_multiset<2, int2, paren_less<int2> > pointset_type;
paren_minus<int2, int>
diff = details::with_builtin_difference<pointset_type>()
(pointset_type());
int2 p(0, 1);
int2 q(2, 0);
BOOST_CHECK_EQUAL(diff(0, p, q), -2);
BOOST_CHECK_EQUAL(diff(1, p, q), 1);
}
BOOST_AUTO_TEST_CASE(test_difference_iterator)
{
typedef point_multiset<2, int2, iterator_less<int2> > pointset_type;
iterator_minus<int2, int>
diff = details::with_builtin_difference<pointset_type>()
(pointset_type());
int2 p(0, 1);
int2 q(2, 0);
BOOST_CHECK_EQUAL(diff(0, p, q), -2);
BOOST_CHECK_EQUAL(diff(1, p, q), 1);
}
BOOST_AUTO_TEST_CASE(test_difference_accessor)
{
typedef point_multiset<4, quad, accessor_less<quad_access, quad> > pointset_type;
accessor_minus<quad_access, quad, int>
diff = details::with_builtin_difference<pointset_type>()
(pointset_type());
quad p(0, 1, 0, 0);
quad q(2, 0, 0, 0);
BOOST_CHECK_EQUAL(diff(0, p, q), -2);
BOOST_CHECK_EQUAL(diff(1, p, q), 1);
}
BOOST_AUTO_TEST_CASE(test_euclid_distance_to_key)
{
{
// distance between 2 points at the same position should be null.
double6 x; std::fill(x.begin(), x.end(), .0);
double r = math::euclid_distance_to_key
<double6, bracket_minus<double6, double>, double>
(6, x, x, bracket_minus<double6, double>());
BOOST_CHECK_CLOSE(r, .0, .000000000001);
std::fill(x.begin(), x.end(), -1.);
r = math::euclid_distance_to_key
<double6, bracket_minus<double6, double>, double>
(6, x, x, bracket_minus<double6, double>());
BOOST_CHECK_CLOSE(r, .0, .000000000001);
std::fill(x.begin(), x.end(), 1.);
r = math::euclid_distance_to_key
<double6, bracket_minus<double6, double>, double>
(6, x, x, bracket_minus<double6, double>());
BOOST_CHECK_CLOSE(r, .0, .000000000001);
}
{
// Distance between 2 points at different positions in 3D
for (int i=0; i<100; ++i)
{
double6 p = make_double6(drand(), drand(), drand(),
drand(), drand(), drand());
double6 q = make_double6(drand(), drand(), drand(),
drand(), drand(), drand());
double dist = math::euclid_distance_to_key
<double6, bracket_minus<double6, double>, double>
(6, p, q, bracket_minus<double6, double>());
using namespace ::std;
double other_dist = sqrt((p[0] - q[0]) * (p[0] - q[0])
+ (p[1] - q[1]) * (p[1] - q[1])
+ (p[2] - q[2]) * (p[2] - q[2])
+ (p[3] - q[3]) * (p[3] - q[3])
+ (p[4] - q[4]) * (p[4] - q[4])
+ (p[5] - q[5]) * (p[5] - q[5]));
BOOST_CHECK_CLOSE(dist, other_dist, .000000000001);
}
}
}
BOOST_AUTO_TEST_CASE( test_euclidian_square_distance_to_key )
{
{
// distance between 2 points at the same position should be null.
quad x(0, 0, 0, 0);
int r = math::square_euclid_distance_to_key
<quad, accessor_minus<quad_access, quad, int>, int>
(4, x, x, accessor_minus<quad_access, quad, int>());
BOOST_CHECK_EQUAL(r, 0);
x = quad(1, 1, 1, 1);
r = math::square_euclid_distance_to_key
<quad, accessor_minus<quad_access, quad, int>, int>
(4, x, x, accessor_minus<quad_access, quad, int>());
BOOST_CHECK_EQUAL(r, 0);
x = quad(-1, -1, -1, -1);
r = math::square_euclid_distance_to_key
<quad, accessor_minus<quad_access, quad, int>, int>
(4, x, x, accessor_minus<quad_access, quad, int>());
BOOST_CHECK_EQUAL(r, 0);
}
{
// Distance between 2 points at different positions in 3D
for (int i=0; i<100; ++i)
{
quad p, q;
p.x = std::rand() % 80 - 40;
p.y = std::rand() % 80 - 40;
p.z = std::rand() % 80 - 40;
p.w = std::rand() % 80 - 40;
q.x = std::rand() % 80 - 40;
q.y = std::rand() % 80 - 40;
q.z = std::rand() % 80 - 40;
q.w = std::rand() % 80 - 40;
int dist = math::square_euclid_distance_to_key
<quad, accessor_minus<quad_access, quad, int>, int>
(4, p, q, accessor_minus<quad_access, quad, int>());
int other_dist = (p.x-q.x)*(p.x-q.x) + (p.y-q.y)*(p.y-q.y)
+ (p.z-q.z)*(p.z-q.z) + (p.w-q.w)*(p.w-q.w);
BOOST_CHECK_EQUAL(dist, other_dist);
}
}
}
BOOST_AUTO_TEST_CASE( test_manhattan_distance_to_key )
{
{
// distance between 2 points at the same position should be null.
quad x(0, 0, 0, 0);
int r = math::manhattan_distance_to_key
<quad, accessor_minus<quad_access, quad, int>, int>
(4, x, x, accessor_minus<quad_access, quad, int>());
BOOST_CHECK_EQUAL(r, 0);
x = quad(1, 1, 1, 1);
r = math::manhattan_distance_to_key
<quad, accessor_minus<quad_access, quad, int>, int>
(4, x, x, accessor_minus<quad_access, quad, int>());
BOOST_CHECK_EQUAL(r, 0);
x = quad(-1, -1, -1, -1);
r = math::manhattan_distance_to_key
<quad, accessor_minus<quad_access, quad, int>, int>
(4, x, x, accessor_minus<quad_access, quad, int>());
BOOST_CHECK_EQUAL(r, 0);
}
{
// Distance between 2 points at different positions in 3D
for (int i=0; i<100; ++i)
{
quad p, q;
p.x = std::rand() % 80 - 40;
p.y = std::rand() % 80 - 40;
p.z = std::rand() % 80 - 40;
p.w = std::rand() % 80 - 40;
q.x = std::rand() % 80 - 40;
q.y = std::rand() % 80 - 40;
q.z = std::rand() % 80 - 40;
q.w = std::rand() % 80 - 40;
int dist = math::manhattan_distance_to_key
<quad, accessor_minus<quad_access, quad, int>, int>
(4, p, q, accessor_minus<quad_access, quad, int>());
using namespace ::std;
int other_dist = abs(p.x-q.x) + abs(p.y-q.y)
+ abs(p.z-q.z) + abs(p.w-q.w);
BOOST_CHECK_EQUAL(dist, other_dist);
}
}
}
| 35.376963 | 83 | 0.583543 | [
"3d"
] |
477056bcde2dde09db044ac6ebfd791bc41bf571 | 3,005 | cpp | C++ | TxtAdv/TxtParser.cpp | doc97/TxtAdv | c74163548f5c68202a06d0ad320fbd5b687d6f1a | [
"MIT"
] | null | null | null | TxtAdv/TxtParser.cpp | doc97/TxtAdv | c74163548f5c68202a06d0ad320fbd5b687d6f1a | [
"MIT"
] | 31 | 2018-12-22T10:30:43.000Z | 2019-01-16T11:32:23.000Z | TxtAdv/TxtParser.cpp | doc97/TxtAdv | c74163548f5c68202a06d0ad320fbd5b687d6f1a | [
"MIT"
] | null | null | null | /**********************************************************
* License: The MIT License
* https://www.github.com/doc97/TxtAdv/blob/master/LICENSE
**********************************************************/
#include "TxtParser.h"
#include <regex>
#include <sstream>
#include <iomanip> // std::setprecision
namespace txt
{
TxtParser::TxtParser(GameState* state)
: m_state(state)
{
}
TxtParser::~TxtParser()
{
}
void TxtParser::AddExpression(const std::string& name, std::unique_ptr<Expression> expr)
{
m_expressions[name] = std::move(expr);
}
std::string TxtParser::ParseTextImpl(const std::string& text)
{
std::string prevResult;
std::string result = text;
size_t depth = 0;
while (result != prevResult && depth++ < TxtParser::DEPTH_MAX)
{
std::vector<std::string> vars = ParseVariables(result);
prevResult = result;
result = ReplaceVariables(result, vars);
}
return result;
}
std::vector<std::string> TxtParser::ParseVariables(const std::string& text) const
{
std::regex rgx("\\{([fisx]_\\w+)\\}");
std::sregex_iterator iter(text.begin(), text.end(), rgx);
std::sregex_iterator end;
std::vector<std::string> captures;
for (; iter != end; ++iter)
{
for (size_t i = 1; i < iter->size(); ++i)
captures.push_back((*iter)[i]);
}
return captures;
}
std::string TxtParser::ReplaceVariables(const std::string& text, const std::vector<std::string>& vars) const
{
std::string result = text;
for (const std::string& var : vars)
{
std::string type = var.substr(0, 2);
std::string name = var.substr(2, std::string::npos);
std::string value = GetVariableString(type, name);
std::regex rgx("\\{" + var + "\\}");
result = std::regex_replace(result, rgx, value);
}
return result;
}
std::string TxtParser::GetVariableString(const std::string& type, const std::string& name, bool throwError) const
{
try
{
if (type == "i_")
return std::to_string(m_state->GetInt(name));
else if (type == "f_")
return FloatToString(m_state->GetFloat(name), 2);
else if (type == "s_")
return m_state->GetString(name);
else if (type == "x_")
return ExprToString(name);
else
throw std::invalid_argument("type must either be i_, f_, s_ or x_");
}
catch (std::invalid_argument)
{
if (throwError)
throw;
else
return "<unknown>";
}
}
std::string TxtParser::FloatToString(float value, size_t precision) const
{
std::stringstream ss;
ss << std::fixed << std::setprecision(precision) << value;
return ss.str();
}
std::string TxtParser::ExprToString(const std::string& name) const
{
if (m_expressions.find(name) == m_expressions.end())
throw new std::invalid_argument("No expression found with the name: " + name);
return m_expressions.at(name)->Exec();
}
} // namespace txt
| 26.830357 | 113 | 0.590349 | [
"vector"
] |
4771548d8f79a93c034b196d4bed18a00866abab | 2,629 | hpp | C++ | include/codegen/include/NUnit/Framework/Internal/TestListener.hpp | Futuremappermydud/Naluluna-Modifier-Quest | bfda34370764b275d90324b3879f1a429a10a873 | [
"MIT"
] | 1 | 2021-11-12T09:29:31.000Z | 2021-11-12T09:29:31.000Z | include/codegen/include/NUnit/Framework/Internal/TestListener.hpp | Futuremappermydud/Naluluna-Modifier-Quest | bfda34370764b275d90324b3879f1a429a10a873 | [
"MIT"
] | null | null | null | include/codegen/include/NUnit/Framework/Internal/TestListener.hpp | Futuremappermydud/Naluluna-Modifier-Quest | bfda34370764b275d90324b3879f1a429a10a873 | [
"MIT"
] | 2 | 2021-10-03T02:14:20.000Z | 2021-11-12T09:29:36.000Z | // Autogenerated from CppHeaderCreator on 7/27/2020 3:09:56 PM
// Created by Sc2ad
// =========================================================================
#pragma once
#pragma pack(push, 8)
// Begin includes
#include "utils/typedefs.h"
// Including type: System.Object
#include "System/Object.hpp"
// Including type: NUnit.Framework.Interfaces.ITestListener
#include "NUnit/Framework/Interfaces/ITestListener.hpp"
#include "utils/il2cpp-utils.hpp"
// Completed includes
// Begin forward declares
// Forward declaring namespace: NUnit::Framework::Interfaces
namespace NUnit::Framework::Interfaces {
// Forward declaring type: ITest
class ITest;
// Forward declaring type: ITestResult
class ITestResult;
// Forward declaring type: TestOutput
class TestOutput;
}
// Completed forward declares
// Type namespace: NUnit.Framework.Internal
namespace NUnit::Framework::Internal {
// Autogenerated type: NUnit.Framework.Internal.TestListener
class TestListener : public ::Il2CppObject, public NUnit::Framework::Interfaces::ITestListener {
public:
// static public NUnit.Framework.Interfaces.ITestListener get_NULL()
// Offset: 0x18D91D8
static NUnit::Framework::Interfaces::ITestListener* get_NULL();
// public System.Void TestStarted(NUnit.Framework.Interfaces.ITest test)
// Offset: 0x18DA1C0
// Implemented from: NUnit.Framework.Interfaces.ITestListener
// Base method: System.Void ITestListener::TestStarted(NUnit.Framework.Interfaces.ITest test)
void TestStarted(NUnit::Framework::Interfaces::ITest* test);
// public System.Void TestFinished(NUnit.Framework.Interfaces.ITestResult result)
// Offset: 0x18DA1C4
// Implemented from: NUnit.Framework.Interfaces.ITestListener
// Base method: System.Void ITestListener::TestFinished(NUnit.Framework.Interfaces.ITestResult result)
void TestFinished(NUnit::Framework::Interfaces::ITestResult* result);
// public System.Void TestOutput(NUnit.Framework.Interfaces.TestOutput output)
// Offset: 0x18DA1C8
// Implemented from: NUnit.Framework.Interfaces.ITestListener
// Base method: System.Void ITestListener::TestOutput(NUnit.Framework.Interfaces.TestOutput output)
void TestOutput(NUnit::Framework::Interfaces::TestOutput* output);
// private System.Void .ctor()
// Offset: 0x18DA1CC
// Implemented from: System.Object
// Base method: System.Void Object::.ctor()
static TestListener* New_ctor();
}; // NUnit.Framework.Internal.TestListener
}
DEFINE_IL2CPP_ARG_TYPE(NUnit::Framework::Internal::TestListener*, "NUnit.Framework.Internal", "TestListener");
#pragma pack(pop)
| 46.122807 | 110 | 0.739064 | [
"object"
] |
4777df9846335528553b37c3c381dbbe1eab8239 | 1,875 | cpp | C++ | SuffixArray.cpp | neinsys/acmicpc_teamnote | 1eebc52b662accaea6795c7b875241829314df0b | [
"MIT"
] | null | null | null | SuffixArray.cpp | neinsys/acmicpc_teamnote | 1eebc52b662accaea6795c7b875241829314df0b | [
"MIT"
] | null | null | null | SuffixArray.cpp | neinsys/acmicpc_teamnote | 1eebc52b662accaea6795c7b875241829314df0b | [
"MIT"
] | null | null | null | #include<bits/stdc++.h>
using std::vector;
using std::string;
struct suffixArray {
string str;
vector<int> group;
vector<int> sa;
vector<int> tmp;
vector<int> cnt;
vector<int> cnt2;
int len;
suffixArray(string str) :str(str) {
len = str.size();
group.resize(len * 2+10, -1);
sa.resize(len,0);
tmp.resize(len,0);
cnt.resize(len, 0);
cnt2.resize(len, 0);
}
vector<int> getSA() {
int len = str.size();
int m = 255;
for (int i = 0; i < len; i++) {
sa[i] = i;
group[i] = str[i];
}
group[len] = -1;
for (int k = 1; k < len; k *= 2) {
for (int i = 0; i <= m; i++) { cnt[i] = 0; cnt2[i] = 0; }
for (int i = 0; i < len; i++) { cnt[group[sa[i] + k] + 1]++; }
for (int i = 1; i <= m; i++) { cnt[i] += cnt[i - 1]; }
for (int i = len - 1; i >= 0; i--) { tmp[--cnt[group[sa[i] + k] + 1]] = sa[i]; }
for (int i = 0; i < len; i++) { cnt2[group[tmp[i]]]++; }
for (int i = 1; i <= m; i++) { cnt2[i] += cnt2[i - 1]; }
for (int i = len - 1; i >= 0; i--) { sa[--cnt2[group[tmp[i]]]] = tmp[i]; }
tmp[sa[0]] = 0;
tmp[len] = -1;
for (int j = 1; j < len; j++) {
if (group[sa[j - 1]] == group[sa[j]] && group[sa[j - 1] + k] == group[sa[j] + k]) {
tmp[sa[j]] = tmp[sa[j - 1]];
}
else {
tmp[sa[j]] = tmp[sa[j - 1]] + 1;
}
}
int q = 0;
for (int j = 0; j < len; j++) {
group[j] = tmp[j];
q = std::max(q, tmp[j]);
}
m = q + 1;
}
return sa;
}
vector<int> getLCP() {
vector<int> pi(len, -1);
vector<int> plcp(len);
vector<int> lcp(len, -1);
for (int i = 1; i < len; i++) { pi[sa[i]] = sa[i - 1]; }
int k = 0;
for (int i = 0; i < len; i++) {
if (pi[i] == -1) {
plcp[i] = 0;
continue;
}
while (str[i + k] == str[pi[i] + k])k++;
plcp[i] = k;
k = std::max(k - 1, 0);
}
for (int i = 0; i < len; i++) {lcp[i] = plcp[sa[i]]; }
return lcp;
}
};
| 24.038462 | 87 | 0.4512 | [
"vector"
] |
4778eacbd39ee5e936195cb2f6369299294d2b60 | 1,623 | cpp | C++ | ANode/parser/src/LateParser.cpp | mpartio/ecflow | ea4b89399d1e7b897ff48c59b1e885e6d53cc8d6 | [
"Apache-2.0"
] | null | null | null | ANode/parser/src/LateParser.cpp | mpartio/ecflow | ea4b89399d1e7b897ff48c59b1e885e6d53cc8d6 | [
"Apache-2.0"
] | null | null | null | ANode/parser/src/LateParser.cpp | mpartio/ecflow | ea4b89399d1e7b897ff48c59b1e885e6d53cc8d6 | [
"Apache-2.0"
] | null | null | null | //============================================================================
// Name :
// Author : Avi
// Revision : $Revision: #13 $
//
// Copyright 2009- ECMWF.
// This software is licensed under the terms of the Apache Licence version 2.0
// which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
// In applying this licence, ECMWF does not waive the privileges and immunities
// granted to it by virtue of its status as an intergovernmental organisation
// nor does it submit to any jurisdiction.
//
// Description :
//============================================================================
#include <stdexcept>
#include "LateParser.hpp"
#include "LateAttr.hpp"
#include "DefsStructureParser.hpp"
#include "Node.hpp"
using namespace ecf;
using namespace std;
bool LateParser::doParse( const std::string& line, std::vector<std::string >& lineTokens )
{
if ( lineTokens.size() < 3 ) throw std::runtime_error( "LateParser::doParse: Invalid late :" + line );
// late -s +00:15 -a 20:00 -c +02:00 #The option can be in any order
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13
// late -s +00:15 -c +02:00 # not all options are needed
// 0 1 2 3 4 5
LateAttr lateAttr; // lateAttr.isNull() will return true;
size_t start_index = 1;
LateAttr::parse(lateAttr,line,lineTokens,start_index);
// state
if (rootParser()->get_file_type() != PrintStyle::DEFS && lineTokens[lineTokens.size()-1] == "late") {
lateAttr.setLate(true);
}
nodeStack_top()->addLate( lateAttr ) ;
return true;
}
| 35.282609 | 103 | 0.581023 | [
"vector"
] |
4779878f127ea424950bee16e56b1a47c8bd6bf6 | 1,128 | cpp | C++ | Code Chef/Code Chef - Tourist Translations.cpp | akash246/Competitive-Programming-Solutions | 68db69ba8a771a433e5338bc4e837a02d3f89823 | [
"MIT"
] | 28 | 2017-11-08T11:52:11.000Z | 2021-07-16T06:30:02.000Z | Code Chef/Code Chef - Tourist Translations.cpp | akash246/Competitive-Programming-Solutions | 68db69ba8a771a433e5338bc4e837a02d3f89823 | [
"MIT"
] | null | null | null | Code Chef/Code Chef - Tourist Translations.cpp | akash246/Competitive-Programming-Solutions | 68db69ba8a771a433e5338bc4e837a02d3f89823 | [
"MIT"
] | 30 | 2017-09-01T09:14:27.000Z | 2021-04-12T12:08:56.000Z | #include <bits/stdc++.h>
using namespace std;
namespace{
int CC_= 0;
#define sf scanf
#define pf printf
#define PP cin.get();
#define DD(x_) cout<<">>>>( "<<++CC_<<" ) "<<#x_<<": "<<x_<<endl;
#define SS printf(">_<LOOOOOK@MEEEEEEEEEEEEEEE<<( %d )>>\n",++CC_);
typedef long long LL;
typedef vector<int> vint;
typedef pair<int,int> pint;
typedef unsigned long long ULL;
//constants
const double EPS= 1E-9;
const double PI= 2*acos(0.0);
const long long MOD= 1000000007;
}
void solve() {
int n;
string s;
cin>> n >> s;
string q;
char mapped;
while(n--) {
cin >> q;
int len = q.size();
for(int i= 0; i<len; i++) {
char ch = q[i];
if(ch == '_') {
mapped = ' ';
}
else if(ch >= 'a' && ch <= 'z') {
mapped = s[ch-'a'];
}
else if(ch >= 'A' && ch <= 'Z') {
mapped = s[ch-'A']-32;
}
else {
mapped = ch;
}
cout<< mapped;
}
cout<<endl;
}
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
// freopen("./input.txt", "r", stdin);
solve();
return 0;
}
| 16.114286 | 69 | 0.499113 | [
"vector"
] |
4779cbc46177927ab500d98db57187a072ebbb48 | 2,080 | cpp | C++ | cpp/arrayMisc/permutations.cpp | locmpham/codingtests | 3805fc98c0fa0dbee52e12531f6205e77b52899e | [
"MIT"
] | null | null | null | cpp/arrayMisc/permutations.cpp | locmpham/codingtests | 3805fc98c0fa0dbee52e12531f6205e77b52899e | [
"MIT"
] | null | null | null | cpp/arrayMisc/permutations.cpp | locmpham/codingtests | 3805fc98c0fa0dbee52e12531f6205e77b52899e | [
"MIT"
] | 1 | 2021-07-09T19:13:11.000Z | 2021-07-09T19:13:11.000Z | /*
LEETCODE# 46
Given an array nums of distinct integers, return all the possible permutations.
You can return the answer in any order.
Example 1:
Input: nums = [1,2,3]
Output: [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
Example 2:
Input: nums = [0,1]
Output: [[0,1],[1,0]]
Example 3:
Input: nums = [1]
Output: [[1]]
Constraints:
1 <= nums.length <= 6
-10 <= nums[i] <= 10
All the integers of nums are unique.
*/
#include <iostream>
#include <vector>
using namespace std;
void helper(vector<int> nums, vector<bool> visited, vector<int> perm, vector<vector<int>> &result) {
if (perm.size() == nums.size()) {
result.push_back(perm);
return;
}
for (int i = 0; i < nums.size(); i++) {
// did we include this one in perm
if (visited[i]) {
// yes, dont do it again
continue;
}
visited[i] = true;
perm.push_back(nums[i]); // add num to perm
helper(nums, visited, perm, result);
perm.pop_back(); // unwind for next i
visited[i] = false;
}
}
vector<vector<int>> permute(vector<int> nums) {
vector<vector<int>> result{};
vector<int> perm{};
vector<bool> visited(nums.size(), false);
if (nums.size() == 1) {
// Only 1 permutation possible for 1 number
result.push_back(nums);
return result;
}
helper(nums, visited, perm, result);
return result;
}
void printSubsets(string heading, vector<vector<int>> subsets) {
cout << heading;
for (auto subset : subsets) {
cout << "[";
for (auto x : subset) {
cout << x << ",";
}
cout << "], ";
}
cout << endl;
}
int main() {
vector<vector<int>> result = permute({1, 2, 3});
printSubsets("[1, 2, 3] --> ", result);
result = permute({0, 1});
printSubsets("[0, 1] --> ", result);
result = permute({1});
printSubsets("[1] --> ", result);
return 0;
}
| 20.594059 | 100 | 0.518269 | [
"vector"
] |
47888307133e5502d04dd548dade9262a0d04311 | 32,782 | cpp | C++ | Engine/Source/Runtime/Renderer/Private/PlanarReflectionRendering.cpp | windystrife/UnrealEngine_NVIDIAGameWork | b50e6338a7c5b26374d66306ebc7807541ff815e | [
"MIT"
] | 1 | 2022-01-29T18:36:12.000Z | 2022-01-29T18:36:12.000Z | Engine/Source/Runtime/Renderer/Private/PlanarReflectionRendering.cpp | windystrife/UnrealEngine_NVIDIAGameWork | b50e6338a7c5b26374d66306ebc7807541ff815e | [
"MIT"
] | null | null | null | Engine/Source/Runtime/Renderer/Private/PlanarReflectionRendering.cpp | windystrife/UnrealEngine_NVIDIAGameWork | b50e6338a7c5b26374d66306ebc7807541ff815e | [
"MIT"
] | null | null | null | // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
/*=============================================================================
PlanarReflectionRendering.cpp
=============================================================================*/
#include "PlanarReflectionRendering.h"
#include "Engine/Scene.h"
#include "SceneInterface.h"
#include "RenderingThread.h"
#include "RHIStaticStates.h"
#include "RendererInterface.h"
#include "Camera/CameraTypes.h"
#include "Shader.h"
#include "TextureResource.h"
#include "StaticBoundShaderState.h"
#include "SceneUtils.h"
#include "ScenePrivateBase.h"
#include "PostProcess/SceneRenderTargets.h"
#include "GlobalShader.h"
#include "SceneRenderTargetParameters.h"
#include "SceneRendering.h"
#include "DeferredShadingRenderer.h"
#include "ScenePrivate.h"
#include "PostProcess/SceneFilterRendering.h"
#include "PostProcess/PostProcessing.h"
#include "LightRendering.h"
#include "Components/SceneCaptureComponent.h"
#include "Components/PlanarReflectionComponent.h"
#include "PlanarReflectionSceneProxy.h"
#include "Containers/ArrayView.h"
#include "PipelineStateCache.h"
#include "ClearQuad.h"
// WaveWorks Start
#include "Engine/TextureRenderTarget2D.h"
// WaveWorks End
template< bool bEnablePlanarReflectionPrefilter >
class FPrefilterPlanarReflectionPS : public FGlobalShader
{
DECLARE_SHADER_TYPE(FPrefilterPlanarReflectionPS, Global);
public:
static bool ShouldCache(EShaderPlatform Platform)
{
return bEnablePlanarReflectionPrefilter ? IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM4) : true;
}
static void ModifyCompilationEnvironment(EShaderPlatform Platform, FShaderCompilerEnvironment& OutEnvironment)
{
OutEnvironment.SetDefine(TEXT("ENABLE_PLANAR_REFLECTIONS_PREFILTER"), bEnablePlanarReflectionPrefilter);
FGlobalShader::ModifyCompilationEnvironment(Platform, OutEnvironment);
}
/** Default constructor. */
FPrefilterPlanarReflectionPS() {}
/** Initialization constructor. */
FPrefilterPlanarReflectionPS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
: FGlobalShader(Initializer)
{
KernelRadiusY.Bind(Initializer.ParameterMap, TEXT("KernelRadiusY"));
InvPrefilterRoughnessDistance.Bind(Initializer.ParameterMap, TEXT("InvPrefilterRoughnessDistance"));
SceneColorInputTexture.Bind(Initializer.ParameterMap, TEXT("SceneColorInputTexture"));
SceneColorInputSampler.Bind(Initializer.ParameterMap, TEXT("SceneColorInputSampler"));
DeferredParameters.Bind(Initializer.ParameterMap);
PlanarReflectionParameters.Bind(Initializer.ParameterMap);
}
void SetParameters(FRHICommandList& RHICmdList, const FSceneView& View, const FPlanarReflectionSceneProxy* ReflectionSceneProxy, FTextureRHIParamRef SceneColorInput)
{
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
FGlobalShader::SetParameters<FViewUniformShaderParameters>(RHICmdList, ShaderRHI, View.ViewUniformBuffer);
DeferredParameters.Set(RHICmdList, ShaderRHI, View, MD_PostProcess, ESceneRenderTargetsMode::SetTextures);
PlanarReflectionParameters.SetParameters(RHICmdList, ShaderRHI, View, ReflectionSceneProxy);
int32 RenderTargetSizeY = ReflectionSceneProxy->RenderTarget->GetSizeXY().Y;
const float KernelRadiusYValue = FMath::Clamp(ReflectionSceneProxy->PrefilterRoughness, 0.0f, 0.04f) * RenderTargetSizeY;
SetShaderValue(RHICmdList, ShaderRHI, KernelRadiusY, KernelRadiusYValue);
SetShaderValue(RHICmdList, ShaderRHI, InvPrefilterRoughnessDistance, 1.0f / FMath::Max(ReflectionSceneProxy->PrefilterRoughnessDistance, DELTA));
SetTextureParameter(RHICmdList, ShaderRHI, SceneColorInputTexture, SceneColorInputSampler, TStaticSamplerState<SF_Bilinear, AM_Clamp, AM_Clamp, AM_Clamp>::GetRHI(), SceneColorInput);
}
// FShader interface.
virtual bool Serialize(FArchive& Ar) override
{
bool bShaderHasOutdatedParameters = FGlobalShader::Serialize(Ar);
Ar << KernelRadiusY;
Ar << InvPrefilterRoughnessDistance;
Ar << SceneColorInputTexture;
Ar << SceneColorInputSampler;
Ar << PlanarReflectionParameters;
Ar << DeferredParameters;
return bShaderHasOutdatedParameters;
}
private:
FShaderParameter KernelRadiusY;
FShaderParameter InvPrefilterRoughnessDistance;
FShaderResourceParameter SceneColorInputTexture;
FShaderResourceParameter SceneColorInputSampler;
FPlanarReflectionParameters PlanarReflectionParameters;
FDeferredPixelShaderParameters DeferredParameters;
};
IMPLEMENT_SHADER_TYPE(template<>, FPrefilterPlanarReflectionPS<false>, TEXT("/Engine/Private/PlanarReflectionShaders.usf"), TEXT("PrefilterPlanarReflectionPS"), SF_Pixel);
IMPLEMENT_SHADER_TYPE(template<>, FPrefilterPlanarReflectionPS<true>, TEXT("/Engine/Private/PlanarReflectionShaders.usf"), TEXT("PrefilterPlanarReflectionPS"), SF_Pixel);
template<bool bEnablePlanarReflectionPrefilter>
void PrefilterPlanarReflection(FRHICommandListImmediate& RHICmdList, FViewInfo& View, const FPlanarReflectionSceneProxy* ReflectionSceneProxy, const FRenderTarget* Target)
{
FTextureRHIParamRef SceneColorInput = FSceneRenderTargets::Get(RHICmdList).GetSceneColorTexture();
if(View.FeatureLevel >= ERHIFeatureLevel::SM4)
{
// Note: null velocity buffer, so dynamic object temporal AA will not be correct
TRefCountPtr<IPooledRenderTarget> VelocityRT;
TRefCountPtr<IPooledRenderTarget> FilteredSceneColor;
GPostProcessing.ProcessPlanarReflection(RHICmdList, View, VelocityRT, FilteredSceneColor);
if (FilteredSceneColor)
{
SceneColorInput = FilteredSceneColor->GetRenderTargetItem().ShaderResourceTexture;
}
}
{
SCOPED_DRAW_EVENT(RHICmdList, PrefilterPlanarReflection);
// Workaround for a possible driver bug on S7 Adreno, missing planar reflections
ERenderTargetLoadAction RTLoadAction = IsVulkanMobilePlatform(View.GetShaderPlatform()) ? ERenderTargetLoadAction::EClear : ERenderTargetLoadAction::ENoAction;
FRHIRenderTargetView ColorView(Target->GetRenderTargetTexture(), 0, -1, RTLoadAction, ERenderTargetStoreAction::EStore);
FRHISetRenderTargetsInfo Info(1, &ColorView, FRHIDepthRenderTargetView());
RHICmdList.SetRenderTargetsAndClear(Info);
RHICmdList.SetViewport(View.ViewRect.Min.X, View.ViewRect.Min.Y, 0.0f, View.ViewRect.Max.X, View.ViewRect.Max.Y, 1.0f);
FGraphicsPipelineStateInitializer GraphicsPSOInit;
RHICmdList.ApplyCachedRenderTargets(GraphicsPSOInit);
GraphicsPSOInit.BlendState = TStaticBlendState<>::GetRHI();
GraphicsPSOInit.RasterizerState = TStaticRasterizerState<FM_Solid, CM_None>::GetRHI();
GraphicsPSOInit.DepthStencilState = TStaticDepthStencilState<false, CF_Always>::GetRHI();
TShaderMapRef<TDeferredLightVS<false> > VertexShader(View.ShaderMap);
TShaderMapRef<FPrefilterPlanarReflectionPS<bEnablePlanarReflectionPrefilter> > PixelShader(View.ShaderMap);
GraphicsPSOInit.BoundShaderState.VertexDeclarationRHI = GFilterVertexDeclaration.VertexDeclarationRHI;
GraphicsPSOInit.BoundShaderState.VertexShaderRHI = GETSAFERHISHADER_VERTEX(*VertexShader);
GraphicsPSOInit.BoundShaderState.PixelShaderRHI = GETSAFERHISHADER_PIXEL(*PixelShader);
GraphicsPSOInit.PrimitiveType = PT_TriangleList;
SetGraphicsPipelineState(RHICmdList, GraphicsPSOInit);
PixelShader->SetParameters(RHICmdList, View, ReflectionSceneProxy, SceneColorInput);
VertexShader->SetSimpleLightParameters(RHICmdList, View, FSphere(0));
FIntPoint UV = View.ViewRect.Min;
FIntPoint UVSize = View.ViewRect.Size();
if (RHINeedsToSwitchVerticalAxis(GShaderPlatformForFeatureLevel[View.FeatureLevel]) && !IsMobileHDR())
{
UV.Y = UV.Y + UVSize.Y;
UVSize.Y = -UVSize.Y;
}
DrawRectangle(
RHICmdList,
0, 0,
View.ViewRect.Width(), View.ViewRect.Height(),
UV.X, UV.Y,
UVSize.X, UVSize.Y,
View.ViewRect.Size(),
FSceneRenderTargets::Get(RHICmdList).GetBufferSizeXY(),
*VertexShader,
EDRF_UseTriangleOptimization);
}
}
extern float GetSceneColorClearAlpha();
static void UpdatePlanarReflectionContents_RenderThread(
FRHICommandListImmediate& RHICmdList,
FSceneRenderer* MainSceneRenderer,
FSceneRenderer* SceneRenderer,
const FPlanarReflectionSceneProxy* SceneProxy,
FRenderTarget* RenderTarget,
FTexture* RenderTargetTexture,
const FPlane& MirrorPlane,
const FName OwnerName,
const FResolveParams& ResolveParams,
bool bUseSceneColorTexture)
{
QUICK_SCOPE_CYCLE_COUNTER(STAT_RenderPlanarReflection);
FMemMark MemStackMark(FMemStack::Get());
FBox PlanarReflectionBounds = SceneProxy->WorldBounds;
bool bIsInAnyFrustum = false;
for (int32 ViewIndex = 0; ViewIndex < SceneRenderer->Views.Num(); ++ViewIndex)
{
FViewInfo& View = SceneRenderer->Views[ViewIndex];
// WaveWorks Start
#if WITH_WAVEWORKS
if (View.ViewFrustum.IntersectBox(PlanarReflectionBounds.GetCenter(), PlanarReflectionBounds.GetExtent()) || SceneProxy->bAlwaysVisible)
#else
// WaveWorks End
if (View.ViewFrustum.IntersectBox(PlanarReflectionBounds.GetCenter(), PlanarReflectionBounds.GetExtent()))
// WaveWorks Start
#endif
// WaveWorks End
{
bIsInAnyFrustum = true;
break;
}
}
if (bIsInAnyFrustum)
{
bool bIsVisibleInAnyView = true;
for (int32 ViewIndex = 0; ViewIndex < SceneRenderer->Views.Num(); ++ViewIndex)
{
FViewInfo& View = SceneRenderer->Views[ViewIndex];
FSceneViewState* ViewState = View.ViewState;
if (ViewState)
{
FIndividualOcclusionHistory& OcclusionHistory = ViewState->PlanarReflectionOcclusionHistories.FindOrAdd(SceneProxy->PlanarReflectionId);
// +1 to buffered frames because the query is submitted late into the main frame, but read at the beginning of a reflection capture frame
const int32 NumBufferedFrames = FOcclusionQueryHelpers::GetNumBufferedFrames() + 1;
// +1 to frame counter because we are operating before the main view's InitViews, which is where OcclusionFrameCounter is incremented
uint32 OcclusionFrameCounter = ViewState->OcclusionFrameCounter + 1;
FRenderQueryRHIRef& PastQuery = OcclusionHistory.GetPastQuery(OcclusionFrameCounter, NumBufferedFrames);
if (IsValidRef(PastQuery))
{
uint64 NumSamples = 0;
QUICK_SCOPE_CYCLE_COUNTER(STAT_PlanarReflectionOcclusionQueryResults);
if (RHIGetRenderQueryResult(PastQuery.GetReference(), NumSamples, true))
{
bIsVisibleInAnyView = NumSamples > 0;
if (bIsVisibleInAnyView)
{
break;
}
}
}
}
}
// WaveWorks Start
#if WITH_WAVEWORKS
if (bIsVisibleInAnyView || SceneProxy->bAlwaysVisible)
#else
// WaveWorks End
if (bIsVisibleInAnyView)
// WaveWorks Start
#endif
// WaveWorks End
{
// update any resources that needed a deferred update
FDeferredUpdateResource::UpdateResources(RHICmdList);
{
#if WANTS_DRAW_MESH_EVENTS
FString EventName;
OwnerName.ToString(EventName);
SCOPED_DRAW_EVENTF(RHICmdList, SceneCapture, TEXT("PlanarReflection %s"), *EventName);
#else
SCOPED_DRAW_EVENT(RHICmdList, UpdatePlanarReflectionContent_RenderThread);
#endif
const FRenderTarget* Target = SceneRenderer->ViewFamily.RenderTarget;
// Note: relying on GBuffer SceneColor alpha being cleared to 1 in the main scene rendering
check(GetSceneColorClearAlpha() == 1.0f);
if (ensure(Target->GetRenderTargetTexture()->GetClearColor() == FLinearColor::Black))
{
TransitionSetRenderTargetsHelper(RHICmdList, Target->GetRenderTargetTexture(), FTextureRHIParamRef(), FExclusiveDepthStencil::DepthWrite_StencilWrite);
FRHIRenderTargetView RtView = FRHIRenderTargetView(Target->GetRenderTargetTexture(), ERenderTargetLoadAction::EClear);
FRHISetRenderTargetsInfo Info(1, &RtView, FRHIDepthRenderTargetView());
RHICmdList.SetRenderTargetsAndClear(Info);
}
else
{
SetRenderTarget(RHICmdList, Target->GetRenderTargetTexture(), nullptr, true);
DrawClearQuad(RHICmdList, FLinearColor::Black);
}
// Reflection view late update
if (SceneRenderer->Views.Num() > 1)
{
const FMirrorMatrix MirrorMatrix(MirrorPlane);
for (int32 ViewIndex = 0; ViewIndex < SceneRenderer->Views.Num(); ++ViewIndex)
{
FViewInfo& ReflectionViewToUpdate = SceneRenderer->Views[ViewIndex];
const FViewInfo& UpdatedParentView = MainSceneRenderer->Views[ViewIndex];
ReflectionViewToUpdate.UpdatePlanarReflectionViewMatrix(UpdatedParentView, MirrorMatrix);
}
}
// Render the scene normally
{
SCOPED_DRAW_EVENT(RHICmdList, RenderScene);
SceneRenderer->Render(RHICmdList);
}
for (int32 ViewIndex = 0; ViewIndex < SceneRenderer->Views.Num(); ++ViewIndex)
{
FViewInfo& View = SceneRenderer->Views[ViewIndex];
if (MainSceneRenderer->Scene->GetShadingPath() == EShadingPath::Deferred)
{
PrefilterPlanarReflection<true>(RHICmdList, View, SceneProxy, Target);
}
else
{
PrefilterPlanarReflection<false>(RHICmdList, View, SceneProxy, Target);
}
}
RHICmdList.CopyToResolveTarget(RenderTarget->GetRenderTargetTexture(), RenderTargetTexture->TextureRHI, false, ResolveParams);
}
}
}
FSceneRenderer::WaitForTasksClearSnapshotsAndDeleteSceneRenderer(RHICmdList, SceneRenderer);
}
extern void BuildProjectionMatrix(FIntPoint RenderTargetSize, ECameraProjectionMode::Type ProjectionType, float FOV, float OrthoWidth, FMatrix& ProjectionMatrix);
extern FSceneRenderer* CreateSceneRendererForSceneCapture(
FScene* Scene,
USceneCaptureComponent* SceneCaptureComponent,
FRenderTarget* RenderTarget,
FIntPoint RenderTargetSize,
const TArrayView<const FSceneCaptureViewInfo> Views,
float MaxViewDistance,
bool bCaptureSceneColor,
bool bIsPlanarReflection,
FPostProcessSettings* PostProcessSettings,
float PostProcessBlendWeight,
const AActor* ViewActor);
void FScene::UpdatePlanarReflectionContents(UPlanarReflectionComponent* CaptureComponent, FSceneRenderer& MainSceneRenderer)
{
check(CaptureComponent);
{
// WaveWorks Start
#if WITH_WAVEWORKS
// add hidden waveworks actors
CaptureComponent->HiddenComponents.Reset(0);
for (int32 Index = 0, NumActors = CaptureComponent->HiddenActors.Num(); Index < NumActors; ++Index)
{
CaptureComponent->HideActorComponents(CaptureComponent->HiddenActors[Index]);
}
#endif
// WaveWorks End
FVector2D DesiredPlanarReflectionTextureSizeFloat = FVector2D(MainSceneRenderer.ViewFamily.FamilySizeX, MainSceneRenderer.ViewFamily.FamilySizeY) * .01f * FMath::Clamp(CaptureComponent->ScreenPercentage, 25, 100);
FIntPoint DesiredPlanarReflectionTextureSize;
DesiredPlanarReflectionTextureSize.X = FMath::Clamp(FMath::TruncToInt(DesiredPlanarReflectionTextureSizeFloat.X), 1, static_cast<int32>(MainSceneRenderer.ViewFamily.FamilySizeX));
DesiredPlanarReflectionTextureSize.Y = FMath::Clamp(FMath::TruncToInt(DesiredPlanarReflectionTextureSizeFloat.Y), 1, static_cast<int32>(MainSceneRenderer.ViewFamily.FamilySizeY));
if (CaptureComponent->RenderTarget != NULL && CaptureComponent->RenderTarget->GetSizeXY() != DesiredPlanarReflectionTextureSize)
{
ENQUEUE_UNIQUE_RENDER_COMMAND_ONEPARAMETER(
ReleaseRenderTargetCommand,
FPlanarReflectionRenderTarget*, RenderTarget, CaptureComponent->RenderTarget,
{
RenderTarget->ReleaseResource();
delete RenderTarget;
});
CaptureComponent->RenderTarget = NULL;
}
if (CaptureComponent->RenderTarget == NULL)
{
CaptureComponent->RenderTarget = new FPlanarReflectionRenderTarget(DesiredPlanarReflectionTextureSize);
// WaveWorks Start
#if WITH_WAVEWORKS
if (CaptureComponent->TextureTarget != NULL)
{
CaptureComponent->TextureTarget->InitCustomFormat(DesiredPlanarReflectionTextureSize.X, DesiredPlanarReflectionTextureSize.Y, PF_A16B16G16R16, false);
CaptureComponent->TextureTarget->ClearColor = FLinearColor::Black;
}
#endif
// WaveWorks End
ENQUEUE_UNIQUE_RENDER_COMMAND_TWOPARAMETER(
InitRenderTargetCommand,
FPlanarReflectionRenderTarget*, RenderTarget, CaptureComponent->RenderTarget,
FPlanarReflectionSceneProxy*, SceneProxy, CaptureComponent->SceneProxy,
{
RenderTarget->InitResource();
SceneProxy->RenderTarget = RenderTarget;
});
}
const FMatrix ComponentTransform = CaptureComponent->GetComponentTransform().ToMatrixWithScale();
const FPlane MirrorPlane = FPlane(ComponentTransform.TransformPosition(FVector::ZeroVector), ComponentTransform.TransformVector(FVector(0, 0, 1)));
TArray<FSceneCaptureViewInfo> SceneCaptureViewInfo;
for (int32 ViewIndex = 0; ViewIndex < MainSceneRenderer.Views.Num() && ViewIndex < GMaxPlanarReflectionViews; ++ViewIndex)
{
const FViewInfo& View = MainSceneRenderer.Views[ViewIndex];
FSceneCaptureViewInfo NewView;
FVector2D ViewRectMin = FVector2D(View.ViewRect.Min.X, View.ViewRect.Min.Y);
FVector2D ViewRectMax = FVector2D(View.ViewRect.Max.X, View.ViewRect.Max.Y);
ViewRectMin *= 0.01f * FMath::Clamp(CaptureComponent->ScreenPercentage, 25, 100);
ViewRectMax *= 0.01f * FMath::Clamp(CaptureComponent->ScreenPercentage, 25, 100);
NewView.ViewRect.Min.X = FMath::TruncToInt(ViewRectMin.X);
NewView.ViewRect.Min.Y = FMath::TruncToInt(ViewRectMin.Y);
NewView.ViewRect.Max.X = FMath::TruncToInt(ViewRectMax.X);
NewView.ViewRect.Max.Y = FMath::TruncToInt(ViewRectMax.Y);
// Create a mirror matrix and premultiply the view transform by it
const FMirrorMatrix MirrorMatrix(MirrorPlane);
const FMatrix ViewMatrix(MirrorMatrix * View.ViewMatrices.GetViewMatrix());
const FVector ViewLocation = ViewMatrix.InverseTransformPosition(FVector::ZeroVector);
const FMatrix ViewRotationMatrix = ViewMatrix.RemoveTranslation();
const float FOV = FMath::Atan(1.0f / View.ViewMatrices.GetProjectionMatrix().M[0][0]);
FMatrix ProjectionMatrix;
BuildProjectionMatrix(View.ViewRect.Size(), ECameraProjectionMode::Perspective, FOV + CaptureComponent->ExtraFOV * (float)PI / 180.0f, 1.0f, ProjectionMatrix);
NewView.ViewLocation = ViewLocation;
NewView.ViewRotationMatrix = ViewRotationMatrix;
NewView.ProjectionMatrix = ProjectionMatrix;
NewView.StereoPass = View.StereoPass;
SceneCaptureViewInfo.Add(NewView);
}
FPostProcessSettings PostProcessSettings;
// WaveWorks Start
#if WITH_WAVEWORKS
// WaveWorks End
FSceneRenderer* SceneRenderer = NULL;
if (CaptureComponent->TextureTarget != NULL)
SceneRenderer = CreateSceneRendererForSceneCapture(this, CaptureComponent, CaptureComponent->TextureTarget->GameThread_GetRenderTargetResource(), DesiredPlanarReflectionTextureSize, SceneCaptureViewInfo, CaptureComponent->MaxViewDistanceOverride, true, true, &PostProcessSettings, 1.0f, /*ViewActor =*/nullptr);
else
SceneRenderer = CreateSceneRendererForSceneCapture(this, CaptureComponent, CaptureComponent->RenderTarget, DesiredPlanarReflectionTextureSize, SceneCaptureViewInfo, CaptureComponent->MaxViewDistanceOverride, true, true, &PostProcessSettings, 1.0f, /*ViewActor =*/nullptr);
// WaveWorks Start
#else
FSceneRenderer* SceneRenderer = CreateSceneRendererForSceneCapture(this, CaptureComponent, CaptureComponent->RenderTarget, DesiredPlanarReflectionTextureSize, SceneCaptureViewInfo, CaptureComponent->MaxViewDistanceOverride, true, true, &PostProcessSettings, 1.0f, /*ViewActor =*/nullptr);
#endif
// WaveWorks End
for (int32 ViewIndex = 0; ViewIndex < SceneCaptureViewInfo.Num(); ++ViewIndex)
{
SceneRenderer->Views[ViewIndex].GlobalClippingPlane = MirrorPlane;
// Jitter can't be removed completely due to the clipping plane
// Also, this prevents the prefilter pass, which reads from jittered depth, from having to do special handling of it's depth-dependent input
SceneRenderer->Views[ViewIndex].bAllowTemporalJitter = false;
SceneRenderer->Views[ViewIndex].bRenderSceneTwoSided = CaptureComponent->bRenderSceneTwoSided;
CaptureComponent->ProjectionWithExtraFOV[ViewIndex] = SceneCaptureViewInfo[ViewIndex].ProjectionMatrix;
// Calculate the vector used by shaders to convert clip space coordinates to texture space.
const float InvBufferSizeX = 1.0f / DesiredPlanarReflectionTextureSize.X;
const float InvBufferSizeY = 1.0f / DesiredPlanarReflectionTextureSize.Y;
FIntRect ViewRect = SceneRenderer->Views[ViewIndex].ViewRect;
// to bring NDC (-1..1, 1..-1) into 0..1 UV for BufferSize textures
const FVector4 ScreenScaleBias(
ViewRect.Width() * InvBufferSizeX / +2.0f,
ViewRect.Height() * InvBufferSizeY / (-2.0f * GProjectionSignY),
(ViewRect.Width() / 2.0f + ViewRect.Min.X) * InvBufferSizeX,
(ViewRect.Height() / 2.0f + ViewRect.Min.Y) * InvBufferSizeY
);
CaptureComponent->ScreenScaleBias[ViewIndex] = ScreenScaleBias;
const bool bIsStereo = MainSceneRenderer.Views[0].StereoPass != EStereoscopicPass::eSSP_FULL;
const FMatrix ProjectionMatrix = SceneCaptureViewInfo[ViewIndex].ProjectionMatrix;
FPlanarReflectionSceneProxy* SceneProxy = CaptureComponent->SceneProxy;
ENQUEUE_RENDER_COMMAND(UpdateProxyCommand)(
[ProjectionMatrix, ScreenScaleBias, ViewIndex, bIsStereo, SceneProxy](FRHICommandList& RHICmdList)
{
SceneProxy->ProjectionWithExtraFOV[ViewIndex] = ProjectionMatrix;
SceneProxy->ScreenScaleBias[ViewIndex] = ScreenScaleBias;
SceneProxy->bIsStereo = bIsStereo;
});
}
const FName OwnerName = CaptureComponent->GetOwner() ? CaptureComponent->GetOwner()->GetFName() : NAME_None;
ENQUEUE_UNIQUE_RENDER_COMMAND_SIXPARAMETER(
CaptureCommand,
FSceneRenderer*, MainSceneRenderer, &MainSceneRenderer,
FSceneRenderer*, SceneRenderer, SceneRenderer,
FPlanarReflectionSceneProxy*, SceneProxy, CaptureComponent->SceneProxy,
FPlanarReflectionRenderTarget*, RenderTarget, CaptureComponent->RenderTarget,
FPlane, MirrorPlane, MirrorPlane,
FName, OwnerName, OwnerName,
{
UpdatePlanarReflectionContents_RenderThread(RHICmdList, MainSceneRenderer, SceneRenderer, SceneProxy, RenderTarget, RenderTarget, MirrorPlane, OwnerName, FResolveParams(), true);
});
}
}
void FScene::AddPlanarReflection(UPlanarReflectionComponent* Component)
{
check(Component->SceneProxy);
PlanarReflections_GameThread.Add(Component);
ENQUEUE_UNIQUE_RENDER_COMMAND_TWOPARAMETER(
FAddPlanarReflectionCommand,
FPlanarReflectionSceneProxy*,SceneProxy,Component->SceneProxy,
FScene*,Scene,this,
{
Scene->ReflectionSceneData.bRegisteredReflectionCapturesHasChanged = true;
Scene->PlanarReflections.Add(SceneProxy);
});
}
void FScene::RemovePlanarReflection(UPlanarReflectionComponent* Component)
{
check(Component->SceneProxy);
PlanarReflections_GameThread.Remove(Component);
ENQUEUE_UNIQUE_RENDER_COMMAND_TWOPARAMETER(
FRemovePlanarReflectionCommand,
FPlanarReflectionSceneProxy*,SceneProxy,Component->SceneProxy,
FScene*,Scene,this,
{
Scene->ReflectionSceneData.bRegisteredReflectionCapturesHasChanged = true;
Scene->PlanarReflections.Remove(SceneProxy);
});
}
void FScene::UpdatePlanarReflectionTransform(UPlanarReflectionComponent* Component)
{
check(Component->SceneProxy);
ENQUEUE_UNIQUE_RENDER_COMMAND_THREEPARAMETER(
FUpdatePlanarReflectionCommand,
FPlanarReflectionSceneProxy*,SceneProxy,Component->SceneProxy,
FMatrix,Transform,Component->GetComponentTransform().ToMatrixWithScale(),
FScene*,Scene,this,
{
Scene->ReflectionSceneData.bRegisteredReflectionCapturesHasChanged = true;
SceneProxy->UpdateTransform(Transform);
});
}
class FPlanarReflectionPS : public FGlobalShader
{
DECLARE_SHADER_TYPE(FPlanarReflectionPS, Global);
public:
static bool ShouldCache(EShaderPlatform Platform)
{
return IsFeatureLevelSupported(Platform, ERHIFeatureLevel::SM4);
}
static void ModifyCompilationEnvironment(EShaderPlatform Platform, FShaderCompilerEnvironment& OutEnvironment)
{
FGlobalShader::ModifyCompilationEnvironment(Platform, OutEnvironment);
}
/** Default constructor. */
FPlanarReflectionPS() {}
/** Initialization constructor. */
FPlanarReflectionPS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
: FGlobalShader(Initializer)
{
DeferredParameters.Bind(Initializer.ParameterMap);
PlanarReflectionParameters.Bind(Initializer.ParameterMap);
}
void SetParameters(FRHICommandList& RHICmdList, const FSceneView& View, FPlanarReflectionSceneProxy* ReflectionSceneProxy)
{
const FPixelShaderRHIParamRef ShaderRHI = GetPixelShader();
FGlobalShader::SetParameters<FViewUniformShaderParameters>(RHICmdList, ShaderRHI, View.ViewUniformBuffer);
DeferredParameters.Set(RHICmdList, ShaderRHI, View, MD_PostProcess);
PlanarReflectionParameters.SetParameters(RHICmdList, ShaderRHI, View, ReflectionSceneProxy);
}
// FShader interface.
virtual bool Serialize(FArchive& Ar) override
{
bool bShaderHasOutdatedParameters = FGlobalShader::Serialize(Ar);
Ar << PlanarReflectionParameters;
Ar << DeferredParameters;
return bShaderHasOutdatedParameters;
}
private:
FPlanarReflectionParameters PlanarReflectionParameters;
FDeferredPixelShaderParameters DeferredParameters;
};
IMPLEMENT_SHADER_TYPE(,FPlanarReflectionPS,TEXT("/Engine/Private/PlanarReflectionShaders.usf"),TEXT("PlanarReflectionPS"),SF_Pixel);
bool FDeferredShadingSceneRenderer::RenderDeferredPlanarReflections(FRHICommandListImmediate& RHICmdList, const FViewInfo& View, bool bLightAccumulationIsInUse, TRefCountPtr<IPooledRenderTarget>& Output)
{
// Prevent rendering unsupported views when ViewIndex >= GMaxPlanarReflectionViews
// Planar reflections in those views will fallback to other reflection methods
{
int32 ViewIndex = INDEX_NONE;
ViewFamily.Views.Find(&View, ViewIndex);
if (ViewIndex >= GMaxPlanarReflectionViews)
{
return false;
}
}
bool bAnyVisiblePlanarReflections = false;
for (int32 PlanarReflectionIndex = 0; PlanarReflectionIndex < Scene->PlanarReflections.Num(); PlanarReflectionIndex++)
{
FPlanarReflectionSceneProxy* ReflectionSceneProxy = Scene->PlanarReflections[PlanarReflectionIndex];
if (View.ViewFrustum.IntersectBox(ReflectionSceneProxy->WorldBounds.GetCenter(), ReflectionSceneProxy->WorldBounds.GetExtent()))
{
bAnyVisiblePlanarReflections = true;
}
}
bool bViewIsReflectionCapture = View.bIsPlanarReflection || View.bIsReflectionCapture;
// Prevent reflection recursion, or view-dependent planar reflections being seen in reflection captures
if (Scene->PlanarReflections.Num() > 0 && !bViewIsReflectionCapture && bAnyVisiblePlanarReflections)
{
SCOPED_DRAW_EVENT(RHICmdList, CompositePlanarReflections);
bool bSSRAsInput = true;
if (Output == GSystemTextures.BlackDummy)
{
bSSRAsInput = false;
FSceneRenderTargets& SceneContext = FSceneRenderTargets::Get(RHICmdList);
if (bLightAccumulationIsInUse)
{
FPooledRenderTargetDesc Desc(FPooledRenderTargetDesc::Create2DDesc(SceneContext.GetBufferSizeXY(), PF_FloatRGBA, FClearValueBinding::Black, TexCreate_None, TexCreate_RenderTargetable, false));
GRenderTargetPool.FindFreeElement(RHICmdList, Desc, Output, TEXT("PlanarReflectionComposite"));
}
else
{
Output = SceneContext.LightAccumulation;
}
}
SetRenderTarget(RHICmdList, Output->GetRenderTargetItem().TargetableTexture, nullptr);
if (!bSSRAsInput)
{
DrawClearQuad(RHICmdList, FLinearColor(0, 0, 0, 0));
}
{
RHICmdList.SetViewport(View.ViewRect.Min.X, View.ViewRect.Min.Y, 0.0f, View.ViewRect.Max.X, View.ViewRect.Max.Y, 1.0f);
FGraphicsPipelineStateInitializer GraphicsPSOInit;
RHICmdList.ApplyCachedRenderTargets(GraphicsPSOInit);
// Blend over previous reflections in the output target (SSR or planar reflections that have already been rendered)
// Planar reflections win over SSR and reflection environment
//@todo - this is order dependent blending, but ordering is coming from registration order
GraphicsPSOInit.BlendState = TStaticBlendState<CW_RGBA, BO_Add, BF_One, BF_InverseSourceAlpha, BO_Max, BF_One, BF_One>::GetRHI();
GraphicsPSOInit.RasterizerState = TStaticRasterizerState<FM_Solid, CM_None>::GetRHI();
GraphicsPSOInit.DepthStencilState = TStaticDepthStencilState<false, CF_Always>::GetRHI();
for (int32 PlanarReflectionIndex = 0; PlanarReflectionIndex < Scene->PlanarReflections.Num(); PlanarReflectionIndex++)
{
FPlanarReflectionSceneProxy* ReflectionSceneProxy = Scene->PlanarReflections[PlanarReflectionIndex];
if (View.ViewFrustum.IntersectBox(ReflectionSceneProxy->WorldBounds.GetCenter(), ReflectionSceneProxy->WorldBounds.GetExtent()))
{
SCOPED_DRAW_EVENTF(RHICmdList, PlanarReflection, *ReflectionSceneProxy->OwnerName.ToString());
TShaderMapRef<TDeferredLightVS<false> > VertexShader(View.ShaderMap);
TShaderMapRef<FPlanarReflectionPS> PixelShader(View.ShaderMap);
GraphicsPSOInit.BoundShaderState.VertexDeclarationRHI = GFilterVertexDeclaration.VertexDeclarationRHI;
GraphicsPSOInit.BoundShaderState.VertexShaderRHI = GETSAFERHISHADER_VERTEX(*VertexShader);
GraphicsPSOInit.BoundShaderState.PixelShaderRHI = GETSAFERHISHADER_PIXEL(*PixelShader);
GraphicsPSOInit.PrimitiveType = PT_TriangleList;
SetGraphicsPipelineState(RHICmdList, GraphicsPSOInit);
PixelShader->SetParameters(RHICmdList, View, ReflectionSceneProxy);
VertexShader->SetSimpleLightParameters(RHICmdList, View, FSphere(0));
DrawRectangle(
RHICmdList,
0, 0,
View.ViewRect.Width(), View.ViewRect.Height(),
View.ViewRect.Min.X, View.ViewRect.Min.Y,
View.ViewRect.Width(), View.ViewRect.Height(),
View.ViewRect.Size(),
FSceneRenderTargets::Get(RHICmdList).GetBufferSizeXY(),
*VertexShader,
EDRF_UseTriangleOptimization);
}
}
}
RHICmdList.CopyToResolveTarget(Output->GetRenderTargetItem().TargetableTexture, Output->GetRenderTargetItem().ShaderResourceTexture, false, FResolveParams());
return true;
}
return false;
}
void FPlanarReflectionParameters::SetParameters(FRHICommandList& RHICmdList, FPixelShaderRHIParamRef ShaderRHI, const FSceneView& View, const FPlanarReflectionSceneProxy* ReflectionSceneProxy)
{
// Degenerate plane causes shader to branch around the reflection lookup
FPlane ReflectionPlaneValue(FVector4(0, 0, 0, 0));
FTexture* PlanarReflectionTextureValue = GBlackTexture;
if (ReflectionSceneProxy && ReflectionSceneProxy->RenderTarget)
{
ReflectionPlaneValue = ReflectionSceneProxy->ReflectionPlane;
PlanarReflectionTextureValue = ReflectionSceneProxy->RenderTarget;
SetShaderValue(RHICmdList, ShaderRHI, PlanarReflectionOrigin, ReflectionSceneProxy->PlanarReflectionOrigin);
SetShaderValue(RHICmdList, ShaderRHI, PlanarReflectionXAxis, ReflectionSceneProxy->PlanarReflectionXAxis);
SetShaderValue(RHICmdList, ShaderRHI, PlanarReflectionYAxis, ReflectionSceneProxy->PlanarReflectionYAxis);
SetShaderValue(RHICmdList, ShaderRHI, InverseTransposeMirrorMatrix, ReflectionSceneProxy->InverseTransposeMirrorMatrix);
SetShaderValue(RHICmdList, ShaderRHI, PlanarReflectionParameters, ReflectionSceneProxy->PlanarReflectionParameters);
SetShaderValue(RHICmdList, ShaderRHI, PlanarReflectionParameters2, ReflectionSceneProxy->PlanarReflectionParameters2);
SetShaderValue(RHICmdList, ShaderRHI, IsStereoParameter, ReflectionSceneProxy->bIsStereo);
// WaveWorks Start
SetShaderValue(RHICmdList, ShaderRHI, PlanarReflectionWaveWorksParameters, ReflectionSceneProxy->PlanarReflectionWaveWorksParameters);
// WaveWorks End
// Instanced stereo needs both view's values available at once
if (ReflectionSceneProxy->bIsStereo || View.Family->Views.Num() == 1)
{
SetShaderValueArray(RHICmdList, ShaderRHI, ProjectionWithExtraFOV, ReflectionSceneProxy->ProjectionWithExtraFOV, 2);
SetShaderValueArray(RHICmdList, ShaderRHI, PlanarReflectionScreenScaleBias, ReflectionSceneProxy->ScreenScaleBias, 2);
}
else
{
int32 ViewIndex = 0;
for (int32 i = 0; i < View.Family->Views.Num(); i++)
{
if (&View == View.Family->Views[i])
{
ViewIndex = i;
break;
}
}
FMatrix ProjectionWithExtraFOVValue[2];
FVector4 ScreenScaleBiasValue[2];
// Make sure the current view's value is at index 0
ProjectionWithExtraFOVValue[0] = ReflectionSceneProxy->ProjectionWithExtraFOV[ViewIndex];
ProjectionWithExtraFOVValue[1] = FMatrix::Identity;
ScreenScaleBiasValue[0] = ReflectionSceneProxy->ScreenScaleBias[ViewIndex];
ScreenScaleBiasValue[1] = FVector4(0, 0, 0, 0);
SetShaderValueArray(RHICmdList, ShaderRHI, ProjectionWithExtraFOV, ProjectionWithExtraFOVValue, 2);
SetShaderValueArray(RHICmdList, ShaderRHI, PlanarReflectionScreenScaleBias, ScreenScaleBiasValue, 2);
}
}
else // Metal needs the IsStereoParameter set always otherwise the access in the shader may be invalid.
{
SetShaderValue(RHICmdList, ShaderRHI, IsStereoParameter, false);
}
SetShaderValue(RHICmdList, ShaderRHI, ReflectionPlane, ReflectionPlaneValue);
SetTextureParameter(RHICmdList, ShaderRHI, PlanarReflectionTexture, PlanarReflectionSampler, PlanarReflectionTextureValue);
}
| 41.339218 | 314 | 0.790983 | [
"render",
"object",
"vector",
"transform"
] |
478bc8c6fa3e2f52aee7aac6acf972960ae3b28b | 14,409 | cc | C++ | bess/core/traffic_class.cc | JackKuo-tw/BESSGreatFirewall | 5a2d814df8ce508263eba1fcd4a2641c8f625402 | [
"BSD-3-Clause"
] | 1 | 2020-06-22T13:21:43.000Z | 2020-06-22T13:21:43.000Z | bess/core/traffic_class.cc | JackKuo-tw/BESSGreatFirewall | 5a2d814df8ce508263eba1fcd4a2641c8f625402 | [
"BSD-3-Clause"
] | null | null | null | bess/core/traffic_class.cc | JackKuo-tw/BESSGreatFirewall | 5a2d814df8ce508263eba1fcd4a2641c8f625402 | [
"BSD-3-Clause"
] | null | null | null | // Copyright (c) 2016-2017, Nefeli Networks, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * Neither the names of the copyright holders nor the names of their
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
#include "traffic_class.h"
#include <algorithm>
#include <cinttypes>
#include <string>
#include "opts.h"
#include "scheduler.h"
#include "utils/common.h"
#include "utils/time.h"
#include "worker.h"
namespace bess {
size_t TrafficClass::Size() const {
size_t ret = 1; // itself
for (const auto *child : Children()) {
ret += child->Size();
};
return ret;
}
int TrafficClass::WorkerId() const {
for (int wid = 0; wid < Worker::kMaxWorkers; wid++) {
if (!is_worker_active(wid))
continue;
if (workers[wid]->scheduler()->root() == Root()) {
return wid;
}
}
// Orphan TC
return Worker::kAnyWorker;
}
PriorityTrafficClass::~PriorityTrafficClass() {
for (auto &c : children_) {
delete c.c_;
}
TrafficClassBuilder::Clear(this);
}
std::vector<TrafficClass *> PriorityTrafficClass::Children() const {
std::vector<TrafficClass *> ret;
for (const auto &child : children_) {
ret.push_back(child.c_);
}
return ret;
}
bool PriorityTrafficClass::AddChild(TrafficClass *child, priority_t priority) {
if (child->parent_) {
return false;
}
// Ensure that no child already has the given priority.
// FIXME: Allow having multiple TCs with the same priority.
// (However, who gets scheduled first among them is not guaranteed)
for (const auto &c : children_) {
if (c.priority_ == priority) {
return false;
}
}
ChildData d{priority, child};
InsertSorted(children_, d);
child->parent_ = this;
UnblockTowardsRoot(rdtsc());
return true;
}
bool PriorityTrafficClass::RemoveChild(TrafficClass *child) {
if (child->parent_ != this) {
return false;
}
for (size_t i = 0; i < children_.size(); i++) {
if (children_[i].c_ == child) {
children_.erase(children_.begin() + i);
child->parent_ = nullptr;
if (first_runnable_ > i) {
first_runnable_--;
}
BlockTowardsRoot();
return true;
}
}
return false;
}
TrafficClass *PriorityTrafficClass::PickNextChild() {
return children_[first_runnable_].c_;
}
void PriorityTrafficClass::UnblockTowardsRoot(uint64_t tsc) {
size_t num_children = children_.size();
for (first_runnable_ = 0; first_runnable_ < num_children; ++first_runnable_) {
if (!children_[first_runnable_].c_->blocked_) {
break;
}
}
TrafficClass::UnblockTowardsRootSetBlocked(tsc,
first_runnable_ >= num_children);
}
void PriorityTrafficClass::BlockTowardsRoot() {
size_t num_children = children_.size();
while (first_runnable_ < num_children &&
children_[first_runnable_].c_->blocked_) {
++first_runnable_;
}
TrafficClass::BlockTowardsRootSetBlocked(first_runnable_ == num_children);
}
void PriorityTrafficClass::FinishAndAccountTowardsRoot(
SchedWakeupQueue *wakeup_queue, TrafficClass *child, resource_arr_t usage,
uint64_t tsc) {
ACCUMULATE(stats_.usage, usage);
if (child->blocked_) {
// Find the next child that isn't blocked, if there is one.
size_t num_children = children_.size();
while (first_runnable_ < num_children &&
children_[first_runnable_].c_->blocked_) {
++first_runnable_;
}
blocked_ = (first_runnable_ == num_children);
}
if (!parent_) {
return;
}
parent_->FinishAndAccountTowardsRoot(wakeup_queue, this, usage, tsc);
}
WeightedFairTrafficClass::~WeightedFairTrafficClass() {
while (!runnable_children_.empty()) {
delete runnable_children_.top().c;
runnable_children_.pop();
}
for (auto &c : blocked_children_) {
delete c.c;
}
TrafficClassBuilder::Clear(this);
}
std::vector<TrafficClass *> WeightedFairTrafficClass::Children() const {
std::vector<TrafficClass *> ret;
for (const auto &child : all_children_) {
ret.push_back(child.first);
}
return ret;
}
bool WeightedFairTrafficClass::AddChild(TrafficClass *child,
resource_share_t share) {
if (child->parent_ || share == 0) {
return false;
}
child->parent_ = this;
ChildData child_data{STRIDE1 / (double)share, {NextPass()}, child};
if (child->blocked_) {
blocked_children_.push_back(child_data);
} else {
runnable_children_.push(child_data);
UnblockTowardsRoot(rdtsc());
}
all_children_.emplace_back(child, share);
return true;
}
bool WeightedFairTrafficClass::RemoveChild(TrafficClass *child) {
if (child->parent_ != this) {
return false;
}
for (auto it = all_children_.begin(); it != all_children_.end(); it++) {
if (it->first == child) {
all_children_.erase(it);
break;
}
}
for (auto it = blocked_children_.begin(); it != blocked_children_.end();
it++) {
if (it->c == child) {
blocked_children_.erase(it);
child->parent_ = nullptr;
return true;
}
}
bool ret = runnable_children_.delete_single_element(
[=](const ChildData &x) { return x.c == child; });
if (ret) {
child->parent_ = nullptr;
BlockTowardsRoot();
return true;
}
return false;
}
TrafficClass *WeightedFairTrafficClass::PickNextChild() {
return runnable_children_.top().c;
}
void WeightedFairTrafficClass::UnblockTowardsRoot(uint64_t tsc) {
// TODO(barath): Optimize this unblocking behavior.
for (auto it = blocked_children_.begin(); it != blocked_children_.end();) {
if (!it->c->blocked_) {
it->pass = NextPass() + it->remain;
runnable_children_.push(*it);
blocked_children_.erase(it++);
} else {
++it;
}
}
TrafficClass::UnblockTowardsRootSetBlocked(tsc, runnable_children_.empty());
}
void WeightedFairTrafficClass::BlockTowardsRoot() {
runnable_children_.delete_single_element([&](const ChildData &x) {
if (x.c->blocked_) {
blocked_children_.push_back(x);
return true;
}
return false;
});
TrafficClass::BlockTowardsRootSetBlocked(runnable_children_.empty());
}
void WeightedFairTrafficClass::FinishAndAccountTowardsRoot(
SchedWakeupQueue *wakeup_queue, TrafficClass *child, resource_arr_t usage,
uint64_t tsc) {
ACCUMULATE(stats_.usage, usage);
auto &item = runnable_children_.mutable_top();
uint64_t consumed = usage[resource_];
double pass_delta = item.stride * consumed / QUANTUM;
// DCHECK_EQ(item.c, child) << "Child that we picked should be at the front
// of priority queue.";
if (child->blocked_) {
// The blocked child will be penalized when unblocked, by the amount of the
// resource usage (pass_delta) not accounted for this round.
item.remain = pass_delta;
blocked_children_.emplace_back(std::move(item));
runnable_children_.pop();
blocked_ = runnable_children_.empty();
} else {
item.pass += pass_delta;
runnable_children_.decrease_key_top();
}
if (!parent_) {
return;
}
parent_->FinishAndAccountTowardsRoot(wakeup_queue, this, usage, tsc);
}
RoundRobinTrafficClass::~RoundRobinTrafficClass() {
for (TrafficClass *c : runnable_children_) {
delete c;
}
for (TrafficClass *c : blocked_children_) {
delete c;
}
TrafficClassBuilder::Clear(this);
}
bool RoundRobinTrafficClass::AddChild(TrafficClass *child) {
if (child->parent_) {
return false;
}
child->parent_ = this;
if (child->blocked_) {
blocked_children_.push_back(child);
} else {
runnable_children_.push_back(child);
}
UnblockTowardsRoot(rdtsc());
all_children_.push_back(child);
return true;
}
bool RoundRobinTrafficClass::RemoveChild(TrafficClass *child) {
if (child->parent_ != this) {
return false;
}
for (auto it = all_children_.begin(); it != all_children_.end(); it++) {
if (*it == child) {
all_children_.erase(it);
break;
}
}
for (auto it = blocked_children_.begin(); it != blocked_children_.end();
it++) {
if (*it == child) {
blocked_children_.erase(it);
child->parent_ = nullptr;
return true;
}
}
for (size_t i = 0; i < runnable_children_.size(); i++) {
if (runnable_children_[i] == child) {
runnable_children_.erase(runnable_children_.begin() + i);
child->parent_ = nullptr;
if (next_child_ > i) {
next_child_--;
}
// Wrap around for round robin.
if (next_child_ >= runnable_children_.size()) {
next_child_ = 0;
}
BlockTowardsRoot();
return true;
}
}
return false;
}
TrafficClass *RoundRobinTrafficClass::PickNextChild() {
return runnable_children_[next_child_];
}
void RoundRobinTrafficClass::UnblockTowardsRoot(uint64_t tsc) {
// TODO(barath): Optimize this unblocking behavior.
for (auto it = blocked_children_.begin(); it != blocked_children_.end();) {
if (!(*it)->blocked_) {
runnable_children_.push_back(*it);
it = blocked_children_.erase(it);
} else {
++it;
}
}
TrafficClass::UnblockTowardsRootSetBlocked(tsc, runnable_children_.empty());
}
void RoundRobinTrafficClass::BlockTowardsRoot() {
for (size_t i = 0; i < runnable_children_.size();) {
if (runnable_children_[i]->blocked_) {
blocked_children_.push_back(runnable_children_[i]);
runnable_children_.erase(runnable_children_.begin() + i);
if (next_child_ > i) {
next_child_--;
}
// Wrap around for round robin.
if (next_child_ >= runnable_children_.size()) {
next_child_ = 0;
}
} else {
++i;
}
}
TrafficClass::BlockTowardsRootSetBlocked(runnable_children_.empty());
}
void RoundRobinTrafficClass::FinishAndAccountTowardsRoot(
SchedWakeupQueue *wakeup_queue, TrafficClass *child, resource_arr_t usage,
uint64_t tsc) {
ACCUMULATE(stats_.usage, usage);
if (child->blocked_) {
runnable_children_.erase(runnable_children_.begin() + next_child_);
blocked_children_.push_back(child);
blocked_ = runnable_children_.empty();
} else {
next_child_ += usage[RESOURCE_COUNT];
}
// Wrap around for round robin.
if (next_child_ >= runnable_children_.size()) {
next_child_ = 0;
}
if (!parent_) {
return;
}
parent_->FinishAndAccountTowardsRoot(wakeup_queue, this, usage, tsc);
}
RateLimitTrafficClass::~RateLimitTrafficClass() {
// TODO(barath): Ensure that when this destructor is called this instance is
// also cleared out of the wakeup_queue_ in Scheduler if it is present
// there.
delete child_;
TrafficClassBuilder::Clear(this);
}
std::vector<TrafficClass *> RateLimitTrafficClass::Children() const {
if (child_ == nullptr) {
return {};
} else {
return {child_};
}
}
bool RateLimitTrafficClass::AddChild(TrafficClass *child) {
if (child->parent_ || child_ != nullptr) {
return false;
}
child_ = child;
child->parent_ = this;
UnblockTowardsRoot(rdtsc());
return true;
}
bool RateLimitTrafficClass::RemoveChild(TrafficClass *child) {
if (child->parent_ != this || child != child_) {
return false;
}
child_->parent_ = nullptr;
child_ = nullptr;
BlockTowardsRoot();
return true;
}
TrafficClass *RateLimitTrafficClass::PickNextChild() {
return child_;
}
void RateLimitTrafficClass::UnblockTowardsRoot(uint64_t tsc) {
last_tsc_ = tsc;
bool blocked = wakeup_time_ || !child_ || child_->blocked_;
TrafficClass::UnblockTowardsRootSetBlocked(tsc, blocked);
}
void RateLimitTrafficClass::BlockTowardsRoot() {
bool blocked = !child_ || child_->blocked_;
TrafficClass::BlockTowardsRootSetBlocked(blocked);
}
void RateLimitTrafficClass::FinishAndAccountTowardsRoot(
SchedWakeupQueue *wakeup_queue, TrafficClass *child, resource_arr_t usage,
uint64_t tsc) {
ACCUMULATE(stats_.usage, usage);
uint64_t elapsed_cycles = tsc - last_tsc_;
last_tsc_ = tsc;
uint64_t tokens = tokens_ + limit_ * elapsed_cycles;
uint64_t consumed = to_work_units(usage[resource_]);
if (tokens < consumed) {
// Exceeded limit, throttled.
tokens_ = 0;
blocked_ = true;
++stats_.cnt_throttled;
if (limit_) {
uint64_t wait_tsc = (consumed - tokens) / limit_;
wakeup_time_ = tsc + wait_tsc;
wakeup_queue->Add(this);
}
} else {
// Still has some tokens, unthrottled.
tokens_ = std::min(tokens - consumed, max_burst_);
}
// Can still become blocked if the child was blocked, even if we haven't hit
// the rate limit.
blocked_ |= child->blocked_;
if (!parent_) {
return;
}
parent_->FinishAndAccountTowardsRoot(wakeup_queue, this, usage, tsc);
}
LeafTrafficClass::~LeafTrafficClass() {
TrafficClassBuilder::Clear(this);
task_->Detach();
delete task_;
}
std::unordered_map<std::string, TrafficClass *> TrafficClassBuilder::all_tcs_;
bool TrafficClassBuilder::ClearAll() {
all_tcs_.clear();
return true;
}
bool TrafficClassBuilder::Clear(TrafficClass *c) {
bool ret = all_tcs_.erase(c->name());
return ret;
}
} // namespace bess
| 26.584871 | 80 | 0.683531 | [
"vector"
] |
4794e89c40cb3e444a56e25c43ff30bf2cfcce68 | 1,409 | cc | C++ | ideep4py/py/mm/basic.cc | mingxiaoh/chainer_for_rebase | 8c5ba24bf81d648402d388dac1df7591b2557712 | [
"MIT"
] | 1 | 2020-05-28T10:07:25.000Z | 2020-05-28T10:07:25.000Z | ideep4py/py/mm/basic.cc | mingxiaoh/chainer_for_rebase | 8c5ba24bf81d648402d388dac1df7591b2557712 | [
"MIT"
] | null | null | null | ideep4py/py/mm/basic.cc | mingxiaoh/chainer_for_rebase | 8c5ba24bf81d648402d388dac1df7591b2557712 | [
"MIT"
] | null | null | null | #include "basic.h"
#include "tensor.h"
PyObject *basic::copyto(mdarray *dst, mdarray *src)
{
Tensor *tdst = dst->get()->tensor();
Tensor *tsrc = src->get()->tensor();
if (tdst->copyto(tsrc) == true)
Py_RETURN_NONE;
return nullptr;
}
PyObject *basic::copyto(mdarray *dst, Py_buffer *src_view)
{
// Validate it in ideepy code
Tensor *tdst = dst->get()->tensor();
if (tdst->len() != (size_t)src_view->len) {
return nullptr;
}
tdst->copyto((char *)src_view->buf);
Py_RETURN_NONE;
}
mdarray basic::acc_sum(vector<mdarray *> arrays)
{
vector<shared_ptr<memory>> srcs_memory;
vector<memory::primitive_desc> srcs_pd;
vector<primitive::at> inputs;
vector<float> scales;
for (vector<mdarray *>::iterator it = arrays.begin();
it != arrays.end(); it++) {
Tensor *tensor = (*it)->get()->tensor();
scales.push_back(1.0);
srcs_pd.push_back(tensor->mkldnn_memory().get_primitive_desc());
inputs.push_back(tensor->mkldnn_memory());
}
auto sum_pd = sum::primitive_desc(scales, srcs_pd);
auto dst_pd = sum_pd.dst_primitive_desc();
Tensor *dst_tensor = new Tensor(dst_pd);
auto sum_p = sum(sum_pd, inputs, dst_tensor->mkldnn_memory());
mkldnn::stream s(mkldnn::stream::eager);
s.submit({sum_p}).wait();
mdarray dst_mdarray = mdarray(dst_tensor);
return dst_mdarray;
}
| 29.354167 | 72 | 0.635912 | [
"vector"
] |
4797543aaec4ae79175b0d11a4bb2bb33ae4105f | 6,413 | cpp | C++ | IProc/JPEGProcessor/JPEGProcessor.cpp | heshanera/IProc | 5e444038f46eec6f5d43e8d2fc169531aa8b68e5 | [
"MIT"
] | 3 | 2018-11-20T20:17:00.000Z | 2020-02-25T07:33:53.000Z | IProc/JPEGProcessor/JPEGProcessor.cpp | heshanera/IProc | 5e444038f46eec6f5d43e8d2fc169531aa8b68e5 | [
"MIT"
] | 2 | 2018-05-22T08:48:15.000Z | 2021-11-08T10:47:34.000Z | IProc/JPEGProcessor/JPEGProcessor.cpp | heshanera/IProc | 5e444038f46eec6f5d43e8d2fc169531aa8b68e5 | [
"MIT"
] | null | null | null | /*
* File: JPEGProcessor.cpp
* Author: heshan
*
* Created on October 5, 2017, 4:02 PM
*/
#include "JPEGProcessor.h"
JPEGProcessor::JPEGProcessor() { }
JPEGProcessor::JPEGProcessor(const JPEGProcessor& orig) { }
JPEGProcessor::~JPEGProcessor() { }
/**
* @param height of the image
* @return 1
*/
int JPEGProcessor::setHeight(int height) {
this->imgHeight = height;
return 1;
}
/**
* @param width of the image
* @return 1
*/
int JPEGProcessor::setWidth(int width) {
this->imgWidth = width;
return 1;
}
/**
* @return height of the image
*/
int JPEGProcessor::getHeight() {
return this->imgHeight;
}
/**
* @return width of the image
*/
int JPEGProcessor::getWidth() {
return this->imgWidth;
}
/**
* @param filename the path to the image
* @return 1 if read the image without any errors
*/
int JPEGProcessor::readImage(char * filename) {
struct jpeg_decompress_struct cinfo;
struct error_mgr jerr;
FILE * infile; /* source file */
JSAMPARRAY buffer; /* Output row buffer */
int row_stride; /* physical row width in output buffer */
if ((infile = fopen(filename, "rb")) == NULL) {
fprintf(stderr, "can't open %s\n", filename);
return 0;
}
/* set up the normal JPEG error routines, then override error_exit. */
cinfo.err = jpeg_std_error(&jerr.pub);
/* Establish the setjmp return context for error_exit to use. */
if (setjmp(jerr.setjmp_buffer)) {
jpeg_destroy_decompress(&cinfo);
fclose(infile);
return 0;
}
/* initialize the JPEG decompression object. */
jpeg_create_decompress(&cinfo);
/* specify data source (eg, a file) */
jpeg_stdio_src(&cinfo, infile);
/* read file parameters with jpeg_read_header() */
(void) jpeg_read_header(&cinfo, TRUE);
/* set parameters for decompression */
/* Start decompressor */
(void) jpeg_start_decompress(&cinfo);
setWidth(cinfo.output_width);
setHeight(cinfo.output_height);
/* JSAMPLEs per row in output buffer */
row_stride = cinfo.output_width * cinfo.output_components;
/* Make a one-row-high sample array that will go away when done with image */
buffer = (*cinfo.mem->alloc_sarray)((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1);
imgDataStruct.imgPixArray = new RGBApixel[imgHeight*imgWidth];
imgDataStruct.imgHeight = imgHeight;
imgDataStruct.imgWidth = imgWidth;
int pixPos = 0;
while (cinfo.output_scanline < cinfo.output_height) {
(void) jpeg_read_scanlines(&cinfo, buffer, 1);
fillRGBApixelArray(buffer, pixPos, row_stride);
pixPos+=cinfo.output_width;
}
/* Finish decompression */
(void) jpeg_finish_decompress(&cinfo);
jpeg_destroy_decompress(&cinfo);
fclose(infile);
return 1;
}
/**
* @param filename target fie path
* @param imageDataStruct pixel array of the image to be written
* @return 1 if write the image without any errors
*/
int JPEGProcessor::writeImage (char * filename, ImageDataStruct imageDataStruct) {
int quality = 100;
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
FILE * outfile; /* target file */
JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */
JSAMPLE * buffer; /* array with JSAMPLEs */
int row_stride; /* physical row width in image buffer */
/* allocate and initialize JPEG compression object */
cinfo.err = jpeg_std_error(&jerr);
/* initialize the JPEG compression object. */
jpeg_create_compress(&cinfo);
/* specify data destination */
if ((outfile = fopen(filename, "wb")) == NULL) {
fprintf(stderr, "can't open %s\n", filename);
exit(1);
}
jpeg_stdio_dest(&cinfo, outfile);
/* set parameters for compression */
cinfo.image_width = imageDataStruct.imgWidth; /* image width and height, in pixels */
cinfo.image_height = imageDataStruct.imgHeight;
cinfo.input_components = 3; /* # of color components per pixel */
cinfo.in_color_space = JCS_RGB; /* colorspace of input image */
jpeg_set_defaults(&cinfo);
jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */);
/* Start compressor */
jpeg_start_compress(&cinfo, TRUE);
row_stride = imageDataStruct.imgWidth * 3; /* JSAMPLEs per row in buffer */
int RGBpixels = imageDataStruct.imgHeight * imageDataStruct.imgWidth;
buffer = new JSAMPLE[RGBpixels * 3];
int bufferPos = 0;
for(int pixPos = 0; pixPos < RGBpixels; pixPos++){
buffer[bufferPos] = imageDataStruct.imgPixArray[pixPos].r;
buffer[bufferPos+1] = imageDataStruct.imgPixArray[pixPos].g;
buffer[bufferPos+2] = imageDataStruct.imgPixArray[pixPos].b;
bufferPos += 3;
}
while (cinfo.next_scanline < cinfo.image_height) {
row_pointer[0] = & buffer[cinfo.next_scanline * row_stride];
(void) jpeg_write_scanlines(&cinfo, row_pointer, 1);
}
/* Finish compression */
jpeg_finish_compress(&cinfo);
/* close the output file. */
fclose(outfile);
/* release JPEG compression object */
jpeg_destroy_compress(&cinfo);
delete imageDataStruct.imgPixArray;
return 1;
}
/**
* @param cinfo
*/
void JPEGProcessor::error_exit (j_common_ptr cinfo) {
(*cinfo->err->output_message) (cinfo);
/* Return control to the setjmp point */
longjmp(error_ptr->setjmp_buffer, 1);
}
/**
* @return ImageDataStruct that contains pixel array and image meta data
*/
ImageDataStruct JPEGProcessor::getImageDataStruct(){
return this->imgDataStruct;
}
/**
* @param buffer that contains decompressed image pixels
* @param pixPos pixel position
* @param row_stride physical row width in image buffer
* @return 1
*/
int JPEGProcessor::fillRGBApixelArray(JSAMPARRAY buffer, int pixPos, int row_stride){
for(int i = 0; i < row_stride; i+=3){
imgDataStruct.imgPixArray[pixPos].r = (int)buffer[0][i];
imgDataStruct.imgPixArray[pixPos].g = (int)buffer[0][i+1];
imgDataStruct.imgPixArray[pixPos].b = (int)buffer[0][i+2];
imgDataStruct.imgPixArray[pixPos].a = 255;
pixPos++;
}
return 1;
}
/**
* free the pixel array in imageDataStruct
* @return 1
*/
int JPEGProcessor::freeImageData(){
imgDataStruct.imgPixArray = NULL;
return 1;
}
| 27.642241 | 91 | 0.660845 | [
"object"
] |
479ef423003876c3919ec3570ef44ce31d23f8ca | 6,785 | cpp | C++ | src/mongo/db/write_concern_options_test.cpp | SunguckLee/real-mongodb | fef0e44fafc6d3709a84101327e7d2f54dd18d88 | [
"Apache-2.0"
] | 4 | 2018-02-06T01:53:12.000Z | 2018-02-20T01:47:36.000Z | src/mongo/db/write_concern_options_test.cpp | SunguckLee/real-mongodb | fef0e44fafc6d3709a84101327e7d2f54dd18d88 | [
"Apache-2.0"
] | null | null | null | src/mongo/db/write_concern_options_test.cpp | SunguckLee/real-mongodb | fef0e44fafc6d3709a84101327e7d2f54dd18d88 | [
"Apache-2.0"
] | 3 | 2018-02-06T01:53:18.000Z | 2021-07-28T09:48:15.000Z | /**
* Copyright 2016 MongoDB Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, the copyright holders give permission to link the
* code of portions of this program with the OpenSSL library under certain
* conditions as described in each individual source file and distribute
* linked combinations including the program with the OpenSSL library. You
* must comply with the GNU Affero General Public License in all respects for
* all of the code used other than as permitted herein. If you modify file(s)
* with this exception, you may extend this exception to your version of the
* file(s), but you are not obligated to do so. If you do not wish to do so,
* delete this exception statement from your version. If you delete this
* exception statement from all source files in the program, then also delete
* it in the license file.
*/
#include "mongo/platform/basic.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/write_concern_options.h"
#include "mongo/unittest/unittest.h"
namespace mongo {
namespace {
TEST(WriteConcernOptionsTest, ParseReturnsFailedToParseOnEmptyDocument) {
auto status = WriteConcernOptions().parse({});
ASSERT_EQUALS(ErrorCodes::FailedToParse, status);
ASSERT_EQUALS("write concern object cannot be empty", status.reason());
}
TEST(WriteConcernOptionsTest, ParseReturnsFailedToParseOnInvalidJValue) {
auto status = WriteConcernOptions().parse(BSON("j"
<< "abc"));
ASSERT_EQUALS(ErrorCodes::FailedToParse, status);
ASSERT_EQUALS("j must be numeric or a boolean value", status.reason());
}
TEST(WriteConcernOptionsTest, ParseReturnsFailedToParseOnInvalidFSyncValue) {
auto status = WriteConcernOptions().parse(BSON("fsync"
<< "abc"));
ASSERT_EQUALS(ErrorCodes::FailedToParse, status);
ASSERT_EQUALS("fsync must be numeric or a boolean value", status.reason());
}
TEST(WriteConcernOptionsTest, ParseReturnsFailedToParseIfBothJAndFSyncAreTrue) {
auto status = WriteConcernOptions().parse(BSON("j" << true << "fsync" << true));
ASSERT_EQUALS(ErrorCodes::FailedToParse, status);
ASSERT_EQUALS("fsync and j options cannot be used together", status.reason());
}
TEST(WriteConcernOptionsTest, ParseSetsSyncModeToJournelIfJIsTrue) {
WriteConcernOptions options;
ASSERT_OK(options.parse(BSON("j" << true)));
ASSERT_TRUE(WriteConcernOptions::SyncMode::JOURNAL == options.syncMode);
ASSERT_EQUALS(1, options.wNumNodes);
ASSERT_EQUALS("", options.wMode);
ASSERT_EQUALS(0, options.wTimeout);
}
TEST(WriteConcernOptionsTest, ParseSetsSyncModeToFSyncIfFSyncIsTrue) {
WriteConcernOptions options;
ASSERT_OK(options.parse(BSON("fsync" << true)));
ASSERT_TRUE(WriteConcernOptions::SyncMode::FSYNC == options.syncMode);
ASSERT_EQUALS(1, options.wNumNodes);
ASSERT_EQUALS("", options.wMode);
ASSERT_EQUALS(0, options.wTimeout);
}
TEST(WriteConcernOptionsTest, ParseSetsSyncModeToNoneIfJIsFalse) {
WriteConcernOptions options;
ASSERT_OK(options.parse(BSON("j" << false)));
ASSERT_TRUE(WriteConcernOptions::SyncMode::NONE == options.syncMode);
ASSERT_EQUALS(1, options.wNumNodes);
ASSERT_EQUALS("", options.wMode);
ASSERT_EQUALS(0, options.wTimeout);
}
TEST(WriteConcernOptionsTest, ParseLeavesSyncModeAsUnsetIfFSyncIsFalse) {
WriteConcernOptions options;
ASSERT_OK(options.parse(BSON("fsync" << false)));
ASSERT_TRUE(WriteConcernOptions::SyncMode::UNSET == options.syncMode);
ASSERT_EQUALS(1, options.wNumNodes);
ASSERT_EQUALS("", options.wMode);
ASSERT_EQUALS(0, options.wTimeout);
}
TEST(WriteConcernOptionsTest, ParseReturnsFailedToParseIfWIsNotNumberOrString) {
auto status = WriteConcernOptions().parse(BSON("w" << BSONObj()));
ASSERT_EQUALS(ErrorCodes::FailedToParse, status);
ASSERT_EQUALS("w has to be a number or a string", status.reason());
}
TEST(WriteConcernOptionsTest, ParseSetsWNumNodesIfWIsANumber) {
WriteConcernOptions options;
ASSERT_OK(options.parse(BSON("w" << 3)));
ASSERT_TRUE(WriteConcernOptions::SyncMode::UNSET == options.syncMode);
ASSERT_EQUALS(3, options.wNumNodes);
ASSERT_EQUALS("", options.wMode);
ASSERT_EQUALS(0, options.wTimeout);
}
TEST(WriteConcernOptionsTest, ParseSetsWTimeoutToZeroIfWTimeoutIsNotANumber) {
WriteConcernOptions options;
ASSERT_OK(options.parse(BSON("wtimeout"
<< "abc")));
ASSERT_TRUE(WriteConcernOptions::SyncMode::UNSET == options.syncMode);
ASSERT_EQUALS("", options.wMode);
ASSERT_EQUALS(1, options.wNumNodes);
ASSERT_EQUALS(0, options.wTimeout);
}
TEST(WriteConcernOptionsTest, ParseWTimeoutAsNumber) {
WriteConcernOptions options;
ASSERT_OK(options.parse(BSON("wtimeout" << 123)));
ASSERT_TRUE(WriteConcernOptions::SyncMode::UNSET == options.syncMode);
ASSERT_EQUALS("", options.wMode);
ASSERT_EQUALS(1, options.wNumNodes);
ASSERT_EQUALS(123, options.wTimeout);
}
TEST(WriteConcernOptionsTest, ParseReturnsFailedToParseOnUnknownField) {
auto status = WriteConcernOptions().parse(BSON("x" << 123));
ASSERT_EQUALS(ErrorCodes::FailedToParse, status);
ASSERT_EQUALS("unrecognized write concern field: x", status.reason());
}
void _testIgnoreWriteConcernField(const char* fieldName) {
WriteConcernOptions options;
ASSERT_OK(options.parse(BSON(fieldName << 1)));
ASSERT_TRUE(WriteConcernOptions::SyncMode::UNSET == options.syncMode);
ASSERT_EQUALS("", options.wMode);
ASSERT_EQUALS(1, options.wNumNodes);
ASSERT_EQUALS(0, options.wTimeout);
}
TEST(WriteConcernOptionsTest, ParseIgnoresSpecialFields) {
_testIgnoreWriteConcernField("wElectionId");
_testIgnoreWriteConcernField("wOpTime");
_testIgnoreWriteConcernField("getLastError");
_testIgnoreWriteConcernField("getlasterror");
_testIgnoreWriteConcernField("GETLastErrOR");
}
} // namespace
} // namespace mongo
| 42.943038 | 85 | 0.715107 | [
"object"
] |
47b126ac515839682fe5c594c1ed39087df2cef1 | 850 | hpp | C++ | src/MqttController.hpp | kvoit/MqttController | 7a290e40238c1a9359ba6cc1aa164e3e44b50dc9 | [
"Apache-2.0"
] | null | null | null | src/MqttController.hpp | kvoit/MqttController | 7a290e40238c1a9359ba6cc1aa164e3e44b50dc9 | [
"Apache-2.0"
] | null | null | null | src/MqttController.hpp | kvoit/MqttController | 7a290e40238c1a9359ba6cc1aa164e3e44b50dc9 | [
"Apache-2.0"
] | null | null | null | #pragma once
#include <Arduino.h>
#include <PubSubClient.h>
#include <MqttListener.hpp>
#include <Messenger.hpp>
#include <vector>
class MqttListener;
class MqttController : public Messenger{
public:
MqttController(PubSubClient &psc, const char* mqttName, const char* mqttUser, const char* mqttPassword)
: psc(psc), mqttName(mqttName), mqttUser(mqttUser), mqttPassword(mqttPassword) {};
void reg(MqttListener* ml);
void begin(void);
void handle(void);
void callback(const char* topic, const byte* payload, unsigned int length);
bool sendMessage(const char* topic, const char* msg, bool retain=true);
void subscribe();
protected:
bool reconnect();
std::vector<MqttListener*> listener;
PubSubClient& psc;
const char* mqttName;
const char* mqttUser;
const char* mqttPassword;
};
| 27.419355 | 108 | 0.703529 | [
"vector"
] |
47b2ee81acc52e79e89a1d38206ef2bb2cf34099 | 12,356 | cpp | C++ | Turtlebot_Car4D_Car1D_Intersection/Reachability Computation/fourway_intersection.cpp | karenl7/stlhj | c3f35aefe81e2f6c721e4723ba4d07930b2661e7 | [
"MIT"
] | 6 | 2019-01-30T00:11:55.000Z | 2022-03-09T02:44:51.000Z | Turtlebot_Car4D_Car1D_Intersection/Reachability Computation/fourway_intersection.cpp | StanfordASL/stlhj | c3f35aefe81e2f6c721e4723ba4d07930b2661e7 | [
"MIT"
] | null | null | null | Turtlebot_Car4D_Car1D_Intersection/Reachability Computation/fourway_intersection.cpp | StanfordASL/stlhj | c3f35aefe81e2f6c721e4723ba4d07930b2661e7 | [
"MIT"
] | 4 | 2018-09-08T00:16:55.000Z | 2022-03-09T02:44:54.000Z | #include "theta_diff.cpp"
#include "add_lane.cpp"
#include "get_subvector.cpp"
#include "update_lane.cpp"
#include "add_lane_disturbance_v2.cpp"
#include "add_lane_initial_final.cpp"
#include "add_sq.cpp"
#include "add_lane_plain.cpp"
void fourway_intersection(
beacls::FloatVec& lane,
levelset::HJI_Grid* g,
beacls::FloatVec gmin,
beacls::FloatVec gmax,
beacls::FloatVec vrange,
beacls::FloatVec y2range,
int Command)
{
FLOAT_TYPE square_width;
FLOAT_TYPE vehicle_width = 0.05; //for car 1
FLOAT_TYPE vehicle_width2 = 0.138; //for car 2
FLOAT_TYPE lane_width = 0.4;
const size_t numel = g->get_numel();
const size_t num_dim = g->get_num_of_dimensions();
const std::vector<size_t> shape = g->get_shape();
beacls::FloatVec lane_temp;
beacls::FloatVec lane_temp_calc;
lane.assign(numel, -10.);
//lane_temp.assign(numel, -20.);
//lane_temp_calc.assign(numel,0.);
beacls::FloatVec xs_temp, xs_temp0, xs_temp1, xs_temp2;
beacls::FloatVec range;
beacls::FloatVec theta_range;
FLOAT_TYPE theta_offset;
FLOAT_TYPE lane_offset;
FLOAT_TYPE sq_offset;
FLOAT_TYPE theta_min;
FLOAT_TYPE theta_max;
FLOAT_TYPE dim_long_offset;
FLOAT_TYPE xg, yg, x0, y0;
int position;
int dim_long; //longitudinal dimension of lane
xg = -0.4;
yg = 0.2;
x0 = 0.2;
y0 = -0.4;
position = 0; //1-enhance value function
for (size_t dim = 0; dim < 5; ++dim) {
// Assign values for the vertical lanes.
if (dim == 0 || dim == 1 || dim == 2 || dim == 3 || dim == 4){
const beacls::FloatVec &xs = g->get_xs(dim);
if (Command == 0){ //0-Green; 1-Red
if (dim != 1){
theta_offset = M_PI/2;
dim_long = 1;
range = {0.,0.4,-0.6,-0.4}; //{xmin,xmax,ymin,ymax}
dim_long_offset = range[3];
lane_offset = (range[1]+range[0])/2.;
get_subvector(lane_temp,lane,shape,range,gmin,gmax,dim);
get_subvector(xs_temp,xs,shape,range,gmin,gmax,dim);
//lane_temp.assign(lane_temp.size(), 100.);
add_lane(lane_temp,xs_temp,lane_offset,lane_width,theta_offset,vehicle_width,dim,vrange,y2range);
update_lane(lane_temp,lane,shape,range,gmin,gmax,dim);
range = {0.,0.4,0.4,0.6}; //{xmin,xmax,ymin,ymax}
lane_offset = (range[1]+range[0])/2.;
get_subvector(lane_temp,lane,shape,range,gmin,gmax,dim);
get_subvector(xs_temp,xs,shape,range,gmin,gmax,dim);
//lane_temp.assign(lane_temp.size(), 100.);
add_lane(lane_temp,xs_temp,lane_offset,lane_width,theta_offset,vehicle_width,dim,vrange,y2range);
update_lane(lane_temp,lane,shape,range,gmin,gmax,dim);
theta_offset = 3.*M_PI/2.;
range = {-0.4,0.,-0.6,-0.4}; //{xmin,xmax,ymin,ymax}
lane_offset = (range[1]+range[0])/2.;
get_subvector(lane_temp,lane,shape,range,gmin,gmax,dim);
get_subvector(xs_temp,xs,shape,range,gmin,gmax,dim);
//lane_temp.assign(lane_temp.size(), 100.);
add_lane(lane_temp,xs_temp,lane_offset,lane_width,theta_offset,vehicle_width,dim,vrange,y2range);
update_lane(lane_temp,lane,shape,range,gmin,gmax,dim);
range = {-0.4,0.,0.4,0.6}; //{xmin,xmax,ymin,ymax}
lane_offset = (range[1]+range[0])/2.;
get_subvector(lane_temp,lane,shape,range,gmin,gmax,dim);
get_subvector(xs_temp,xs,shape,range,gmin,gmax,dim);
//lane_temp.assign(lane_temp.size(), 100.);
add_lane(lane_temp,xs_temp,lane_offset,lane_width,theta_offset,vehicle_width,dim,vrange,y2range);
update_lane(lane_temp,lane,shape,range,gmin,gmax,dim);
}
}
if (Command == 1){ //0-Green; 1-Red
theta_offset = M_PI/2;
dim_long = 1;
range = {0.,0.4,-0.6,-0.4}; //{xmin,xmax,ymin,ymax}
dim_long_offset = range[3];
lane_offset = (range[1]+range[0])/2.;
get_subvector(lane_temp,lane,shape,range,gmin,gmax,dim);
get_subvector(xs_temp,xs,shape,range,gmin,gmax,dim);
//lane_temp.assign(lane_temp.size(), 10.);
add_lane_initial_final(lane_temp,xs_temp,lane_offset,lane_width,theta_offset,vehicle_width,dim_long,dim_long_offset,dim,vrange,y2range,position);
update_lane(lane_temp,lane,shape,range,gmin,gmax,dim);
}
}
// Assign values for the horizontal lanes.
if (dim == 0 || dim == 1 || dim == 2 || dim == 3 || dim == 4){
const beacls::FloatVec &xs = g->get_xs(dim);
if (Command == 0){ //0-Green; 1-Red
if (dim != 0){
position = 1;
dim_long = 0;
theta_offset = M_PI;
range = {-0.6,-0.4,0.,0.4}; //{xmin,xmax,ymin,ymax}
dim_long_offset = range[1];
lane_offset = (range[3]+range[2])/2.;
get_subvector(lane_temp,lane,shape,range,gmin,gmax,dim);
get_subvector(xs_temp,xs,shape,range,gmin,gmax,dim);
//lane_temp.assign(lane_temp.size(), 100.);
add_lane(lane_temp,xs_temp,lane_offset,lane_width,theta_offset,vehicle_width,dim,vrange,y2range);
update_lane(lane_temp,lane,shape,range,gmin,gmax,dim);
position = 0;
range = {0.4,0.6,0.,0.4}; //{xmin,xmax,ymin,ymax}
lane_offset = (range[3]+range[2])/2.;
get_subvector(lane_temp,lane,shape,range,gmin,gmax,dim);
get_subvector(xs_temp,xs,shape,range,gmin,gmax,dim);
//lane_temp.assign(lane_temp.size(), 100.);
add_lane(lane_temp,xs_temp,lane_offset,lane_width,theta_offset,vehicle_width,dim,vrange,y2range);
update_lane(lane_temp,lane,shape,range,gmin,gmax,dim);
theta_offset = 0.;
range = {-0.6,-0.4,-0.4,0.}; //{xmin,xmax,ymin,ymax}
lane_offset = (range[3]+range[2])/2.;
get_subvector(lane_temp,lane,shape,range,gmin,gmax,dim);
get_subvector(xs_temp,xs,shape,range,gmin,gmax,dim);
//lane_temp.assign(lane_temp.size(), 100.);
add_lane(lane_temp,xs_temp,lane_offset,lane_width,theta_offset,vehicle_width,dim,vrange,y2range);
update_lane(lane_temp,lane,shape,range,gmin,gmax,dim);
range = {0.4,0.6,-0.4,0.}; //{xmin,xmax,ymin,ymax}
lane_offset = (range[3]+range[2])/2.;
get_subvector(lane_temp,lane,shape,range,gmin,gmax,dim);
get_subvector(xs_temp,xs,shape,range,gmin,gmax,dim);
//lane_temp.assign(lane_temp.size(), 100.);
add_lane(lane_temp,xs_temp,lane_offset,lane_width,theta_offset,vehicle_width,dim,vrange,y2range);
update_lane(lane_temp,lane,shape,range,gmin,gmax,dim);
}
}
if (Command == 1){ //0-Green; 1-Red
// position = 1;
// dim_long = 0;
// theta_offset = M_PI;
// range = {-0.6,-0.4,0.,0.4}; //{xmin,xmax,ymin,ymax}
// dim_long_offset = range[1];
// lane_offset = (range[3]+range[2])/2.;
// get_subvector(lane_temp,lane,shape,range,gmin,gmax,dim);
// get_subvector(xs_temp,xs,shape,range,gmin,gmax,dim);
// //lane_temp.assign(lane_temp.size(), 10.);
// add_lane_initial_final(lane_temp,xs_temp,lane_offset,lane_width,theta_offset,vehicle_width,dim_long,dim_long_offset,dim,vrange,y2range,position);
// update_lane(lane_temp,lane,shape,range,gmin,gmax,dim);
// position = 0;
}
}
}
const beacls::FloatVec &xs0 = g->get_xs(0);
const beacls::FloatVec &xs1 = g->get_xs(1);
const beacls::FloatVec &xs2 = g->get_xs(2);
for (size_t dim = 0; dim < 5; ++dim) {
//Assign values for the Intersection Square
if (Command==0 && (dim == 0 || dim == 2 || dim == 3 || dim == 4)){ //0-Green; 1-Red
const beacls::FloatVec &xs = g->get_xs(dim);
theta_min = 0.; //right turn
theta_max = M_PI/2; //forwards
theta_range = {theta_min,theta_max};
range = {0.,0.4,-0.4,0}; //{xmin,xmax,ymin,ymax}
// if (dim==0){lane_offset = (range[1]+range[0])/2.;}
// else if (dim==1){lane_offset = (range[3]+range[2])/2.;}
get_subvector(lane_temp,lane,shape,range,gmin,gmax,dim);
get_subvector(xs_temp,xs,shape,range,gmin,gmax,dim);
if (dim==0 || dim==2){
get_subvector(xs_temp0,xs0,shape,range,gmin,gmax,dim);
get_subvector(xs_temp1,xs1,shape,range,gmin,gmax,dim);
get_subvector(xs_temp2,xs2,shape,range,gmin,gmax,dim);
}
add_lane_plain(lane_temp,lane_width,xs_temp,xs_temp0,xs_temp1,xs_temp2,dim,vrange,y2range,theta_range,range);
update_lane(lane_temp,lane,shape,range,gmin,gmax,dim);
theta_min = M_PI/2; //forwards
theta_max = M_PI; //left turn
theta_range = {theta_min,theta_max};
range = {0.,0.4,0.,0.4}; //{xmin,xmax,ymin,ymax}
// if (dim==0){lane_offset = (range[1]+range[0])/2.;}
// else if (dim==1){lane_offset = (range[3]+range[2])/2.;}
get_subvector(lane_temp,lane,shape,range,gmin,gmax,dim);
get_subvector(xs_temp,xs,shape,range,gmin,gmax,dim);
if (dim==0 || dim==2){
get_subvector(xs_temp0,xs0,shape,range,gmin,gmax,dim);
get_subvector(xs_temp1,xs1,shape,range,gmin,gmax,dim);
get_subvector(xs_temp2,xs2,shape,range,gmin,gmax,dim);
}
add_lane_plain(lane_temp,lane_width,xs_temp,xs_temp0,xs_temp1,xs_temp2,dim,vrange,y2range,theta_range,range);
update_lane(lane_temp,lane,shape,range,gmin,gmax,dim);
theta_min = M_PI; //left turn
theta_max = M_PI*3/2; //backwards
theta_range = {theta_min,theta_max};
range = {-0.4,0.,0.,0.4}; //{xmin,xmax,ymin,ymax}
// if (dim==0){lane_offset = (range[1]+range[0])/2.;}
// else if (dim==1){lane_offset = (range[3]+range[2])/2.;}
get_subvector(lane_temp,lane,shape,range,gmin,gmax,dim);
get_subvector(xs_temp,xs,shape,range,gmin,gmax,dim);
if (dim==0 || dim==2){
get_subvector(xs_temp0,xs0,shape,range,gmin,gmax,dim);
get_subvector(xs_temp1,xs1,shape,range,gmin,gmax,dim);
get_subvector(xs_temp2,xs2,shape,range,gmin,gmax,dim);
}
add_lane_plain(lane_temp,lane_width,xs_temp,xs_temp0,xs_temp1,xs_temp2,dim,vrange,y2range,theta_range,range);
update_lane(lane_temp,lane,shape,range,gmin,gmax,dim);
theta_min = M_PI*3/2; //backwards
theta_max = 2.*M_PI; //right turn
theta_range = {theta_min,theta_max};
range = {-0.4,0.,-0.4,0.}; //{xmin,xmax,ymin,ymax}
// if (dim==0){lane_offset = (range[1]+range[0])/2.;}
// else if (dim==1){lane_offset = (range[3]+range[2])/2.;}
get_subvector(lane_temp,lane,shape,range,gmin,gmax,dim);
get_subvector(xs_temp,xs,shape,range,gmin,gmax,dim);
if (dim==0 || dim==2){
get_subvector(xs_temp0,xs0,shape,range,gmin,gmax,dim);
get_subvector(xs_temp1,xs1,shape,range,gmin,gmax,dim);
get_subvector(xs_temp2,xs2,shape,range,gmin,gmax,dim);
}
add_lane_plain(lane_temp,lane_width,xs_temp,xs_temp0,xs_temp1,xs_temp2,dim,vrange,y2range,theta_range,range);
update_lane(lane_temp,lane,shape,range,gmin,gmax,dim);
// Create barriers at the relevant sections of the intersection.
if(dim==3){
if (Command==0){
range = {0.4,0.4,0.,0.4};
get_subvector(lane_temp,lane,shape,range,gmin,gmax,dim);
lane_temp.assign(lane_temp.size(), -5.);
update_lane(lane_temp,lane,shape,range,gmin,gmax,dim);
range = {-0.4,-0.4,-0.4,0.};
get_subvector(lane_temp,lane,shape,range,gmin,gmax,dim);
lane_temp.assign(lane_temp.size(), -5.);
update_lane(lane_temp,lane,shape,range,gmin,gmax,dim);
}
}
}
}
//Account for 2nd Car's position
if (Command == 0){
size_t dim = 4;
range = {-0.4,0.,-0.6,0.6};
get_subvector(lane_temp,lane,shape,range,gmin,gmax,dim);
add_lane_disturbance_v2(lane_temp,shape,range,gmin,gmax,vehicle_width2,dim);
update_lane(lane_temp,lane,shape,range,gmin,gmax,dim);
}
}
| 43.507042 | 158 | 0.613062 | [
"shape",
"vector"
] |
47b70d8681db70cd2de59cd1313b13a8192e67ab | 674 | cpp | C++ | Sandbox/sandboxecs.cpp | imefGames/Poplin | 932c4896b0da3f06f95ef30944d4df584ad8f7c5 | [
"MIT"
] | null | null | null | Sandbox/sandboxecs.cpp | imefGames/Poplin | 932c4896b0da3f06f95ef30944d4df584ad8f7c5 | [
"MIT"
] | null | null | null | Sandbox/sandboxecs.cpp | imefGames/Poplin | 932c4896b0da3f06f95ef30944d4df584ad8f7c5 | [
"MIT"
] | null | null | null | #include "sandboxecs.h"
#include "debugtoolssystem.h"
#include "playerbehaviorcomponent.h"
#include "scrollmessagecomponent.h"
namespace Poplin
{
void RegisterExternalComponents(std::vector<ComponentDescriptor*>& components)
{
components.push_back(ComponentDescriptorUtils::CreateLogicBehaviorDescriptor<PlayerBehaviorComponent>("PlayerBehavior"));
components.push_back(ComponentDescriptorUtils::CreateLogicBehaviorDescriptor<ScrollMessageComponent>("ScrollMessage"));
}
void RegisterExternalSystems(std::vector<System*>& systems, SystemUpdater& systemUpdater)
{
systems.push_back(new DebugToolsSystem{ systemUpdater });
}
} | 37.444444 | 129 | 0.778932 | [
"vector"
] |
47c24e78d166ca1305e4f4e600597009803fda4d | 13,082 | cpp | C++ | src/linux_parser.cpp | karthikpakala/CppND-System-Monitor | b7b75b9268ec42f8ad549d78c2388a299af53304 | [
"MIT"
] | null | null | null | src/linux_parser.cpp | karthikpakala/CppND-System-Monitor | b7b75b9268ec42f8ad549d78c2388a299af53304 | [
"MIT"
] | null | null | null | src/linux_parser.cpp | karthikpakala/CppND-System-Monitor | b7b75b9268ec42f8ad549d78c2388a299af53304 | [
"MIT"
] | null | null | null | #include <dirent.h>
#include <unistd.h>
#include <string>
#include <vector>
#include <unistd.h>
#include <sys/time.h>
#include <sstream>
#include <fstream>
#include "linux_parser.h"
using std::stof;
using std::string;
using std::to_string;
using std::vector;
// DONE: An example of how to read data from the filesystem
string LinuxParser::OperatingSystem() {
string line;
string key;
string value;
std::ifstream filestream(kOSPath);
if (filestream.is_open()) {
while (std::getline(filestream, line)) {
std::replace(line.begin(), line.end(), ' ', '_');
std::replace(line.begin(), line.end(), '=', ' ');
std::replace(line.begin(), line.end(), '"', ' ');
std::istringstream linestream(line);
while (linestream >> key >> value) {
if (key == "PRETTY_NAME") {
std::replace(value.begin(), value.end(), '_', ' ');
return value;
}
}
}
}
return value;
}
// DONE: An example of how to read data from the filesystem
string LinuxParser::Kernel() {
string os, kernel;
string line;
string version;
std::ifstream stream(kProcDirectory + kVersionFilename);
if (stream.is_open()) {
std::getline(stream, line);
std::istringstream linestream(line);
linestream >> os >> version >> kernel;
}
return kernel;
}
// BONUS: Update this to use std::filesystem
vector<int> LinuxParser::Pids() {
vector<int> pids;
DIR* directory = opendir(kProcDirectory.c_str());
struct dirent* file;
while ((file = readdir(directory)) != nullptr) {
// Is this a directory?
if (file->d_type == DT_DIR) {
// Is every character of the name a digit?
string filename(file->d_name);
if (std::all_of(filename.begin(), filename.end(), isdigit)) {
int pid = stoi(filename);
pids.push_back(pid);
}
}
}
closedir(directory);
return pids;
}
// TODO: Read and return the system memory utilization
float LinuxParser::MemoryUtilization() {
string line {""};
string key {""};
long memValue {0};
float memTotalGB {0.0};
float memFreeGB {0.0};
float memPerc {0.0};
string unit {""};
string arr[4];
arr[0] = "MemTotal:";
arr[1] = "MemFree:";
arr[2] = "MemAvailable:";
arr[3] = "Buffers:";
long outarr[4];
std::ifstream filestream(kProcDirectory + kMeminfoFilename);
if(filestream.is_open()){
int count {0};
for (count = 0; count < 4; count ++){
std::getline(filestream, line);
std::istringstream linestream(line);
linestream>>key>>memValue>>unit;
if(key == arr[count]){
outarr[count] = memValue;
}
}
memTotalGB = outarr[0]/(1024*1024);
memFreeGB = outarr[1]/(1024*1024);
memPerc = ((memTotalGB - memFreeGB)/memTotalGB);
}
return memPerc;
}
// TODO: Read and return the system uptime
long LinuxParser::UpTime() {
long uptime = 0;
long idletime = 0;
string line;
std::ifstream filestream(kProcDirectory + kUptimeFilename);
std::getline(filestream, line);
std::istringstream linestream(line);
linestream>>uptime>>idletime;
return uptime;
}
// TODO: Read and return the number of jiffies for the system
long LinuxParser::Jiffies() {
std::ifstream filestream(kProcDirectory + kStatFilename);
std::string line;
std::string cpu{"cpu"};
long user, nice, system, idle, iowait, irq, softirq, steal, guess, guessnice;
long jiffies {0};
if(filestream.is_open()){
std::getline(filestream, line);
std::istringstream linestream(line);
linestream>>cpu>>user>>nice>>system>>idle>>iowait>>irq>>softirq>>steal>>guess>>guessnice;
long totalUserTime = user - guess;
long totalNiceTime = nice - guessnice;
long totalIdleTime = idle + iowait;
long totalSystem = system + irq + softirq;
long totalVirtualTime = guess + guessnice;
jiffies = totalUserTime + totalNiceTime + totalIdleTime + totalSystem + totalVirtualTime;
return jiffies;
}
return jiffies; }
// TODO: Read and return the number of active jiffies for a PID
// REMOVE: [[maybe_unused]] once you define the function
long LinuxParser::ActiveJiffies(int pid) {
std::stringstream filename;
filename << kProcDirectory << "/" << pid << "/" << kStatFilename;
std::ifstream filestream(filename.str());
long jiffies {0};
if (filestream.is_open()) {
std::string line;
std::getline(filestream, line);
std::istringstream linestream(line);
std::string notNeeded;
long utime;
long stime;
long cutime;
long cstime;
long starttime;
for(int i = 0; i < 13; i++){
linestream >> notNeeded;
}
linestream >> utime >> stime >> cutime >> cstime ;
for(int i = 0; i < 4; i++) {
linestream >> notNeeded;
}
linestream >> starttime;
jiffies = utime + stime + cutime + cstime +starttime;
return jiffies;
}
return jiffies;
}
// TODO: Read and return the number of active jiffies for the system
long LinuxParser::ActiveJiffies() {
std::ifstream filestream(kProcDirectory + kUptimeFilename);
long upTime = 0;
long idleTime = 0;
if(filestream.is_open()){
std::string line;
std::getline(filestream, line);
std::istringstream linestream(line);
linestream>>upTime>>idleTime;
return upTime;
}
return 0;
}
// TODO: Read and return the number of idle jiffies for the system
long LinuxParser::IdleJiffies() {
std::ifstream filestream(kProcDirectory + kUptimeFilename);
long idleTime = 0;
long upTime = 0;
if(filestream.is_open()){
std::string line;
std::getline(filestream, line);
std::istringstream linestream(line);
linestream>>upTime>>idleTime;
return idleTime;
}
return idleTime;
}
// TODO: Read and return CPU utilization
float LinuxParser::CpuUtilization() {
std::ifstream filestream(kProcDirectory + kStatFilename);
long prevuser{0}, prevnice{0}, prevsystem{0}, previdle{0}, previowait{0}, previrq{0}, prevsoftirq{0},
prevsteal{0}, prevguest{0}, prevguestnice{0};
std::string cpu {"cpu"};
float cpuPerc{0.0};
long Idle{0}, NonIdle{0}, Total{0}, System {0},
PrevIdle{0}, PrevNonIdle{0}, PrevTotal{0}, PrevSystem {0};
if(filestream.is_open()){
std::string line{""};
std::getline(filestream, line);
std::istringstream linestream(line);
linestream>>cpu>>prevuser>>prevnice>>prevsystem>>previdle>>previowait>>previrq>>prevsoftirq>>prevsteal>>prevguest>>prevguestnice;
PrevIdle = previdle + previowait;
PrevSystem = prevsystem + previrq + prevsoftirq;
//PrevVirtual = prevguest + prevguestnice;
PrevNonIdle = prevuser + prevnice + PrevSystem + prevsteal;
PrevTotal = PrevIdle + PrevNonIdle;
filestream.close();
}
sleep(1);
long user{0}, nice{0}, system{0}, idle{0}, iowait{0}, irq{0}, softirq{0}, steal{0}, guest{0}, guestnice{0};
std::ifstream filestream1(kProcDirectory + kStatFilename);
if(filestream1.is_open()){
std::string line1 {""};
std::getline(filestream1, line1);
std::istringstream linestream1(line1);
linestream1>>cpu>>user>>nice>>system>>idle>>iowait>>irq>>softirq>>steal>>guest>>guestnice;
Idle = idle + iowait;
System = system + irq + softirq;
//Virtual = guest + guestnice;
NonIdle = user + nice + System + steal;
Total = Idle + NonIdle;
filestream1.close();
}
float totalCpu = Total - PrevTotal;
float totalCpuIdle = Idle - PrevIdle;
cpuPerc = (totalCpu - totalCpuIdle)/totalCpu;
return cpuPerc;
}
//float LinuxParser::CpuUtilization(int pid){};
float LinuxParser::CpuUtilization(int pid){
std::stringstream filename;
filename << kProcDirectory << "/" << pid << "/" << kStatFilename;
std::ifstream filestream(filename.str());
float cputime{0.0};
if (filestream.is_open()) {
std::string line;
std::getline(filestream, line);
std::istringstream linestream(line);
std::string ignore;
long utime{0};
long stime{0};
long cutime{0};
long cstime{0};
long starttime{0};
std::string temp;
vector <long> values;
for (int i = 0; i < 13; i++){
linestream>>temp;
}
linestream>>utime>>stime>>cutime>>cstime;
for(int i = 1; i<4; i++){
linestream >> temp;
}
linestream>>starttime;
long total_time = utime + stime + cutime + cstime;
long uptime = LinuxParser::UpTime();
float Hertz = sysconf(_SC_CLK_TCK);
//long Hertz = 1;
float seconds = uptime - (starttime / Hertz);
cputime = ((total_time / Hertz) / seconds);
}
return cputime;
}
// TODO: Read and return the total number of processes
int LinuxParser::TotalProcesses() {
std::ifstream filestream(kProcDirectory + kStatFilename);
int totalProc {0};
std::string key {""};
//bool processFound = false;
if(filestream.is_open()){
std::string line;
while(std::getline(filestream, line)){
std::istringstream linestream(line);
linestream>>key;
if (key == "processes")
{
linestream >> totalProc;
// return totalProc;
}
}
}
return totalProc;
}
// TODO: Read and return the number of running processes
int LinuxParser::RunningProcesses() {
std::ifstream filestream(kProcDirectory + kStatFilename);
int Proc {0};
std::string key {""};
if(filestream.is_open()){
std::string line;
while(std::getline(filestream, line)){
std::istringstream linestream(line);
linestream>>key;
if (key == "procs_running")
{
linestream >> Proc;
}
}
}
return Proc;
}
// TODO: Read and return the command associated with a process
// REMOVE: [[maybe_unused]] once you define the function
string LinuxParser::Command(int pid) {
std::stringstream filename;
filename << kProcDirectory << "/" << pid << "/" << kCmdlineFilename;
std::ifstream filestream(filename.str());
std::string cmdLine;
if (filestream.is_open()) {
std::string line;
std::getline(filestream, line);
std::istringstream linestream(line);
linestream>>cmdLine;
}
return cmdLine;
}
// TODO: Read and return the memory used by a process
// REMOVE: [[maybe_unused]] once you define the function
string LinuxParser::Ram(int pid) {
std::stringstream filename;
filename << kProcDirectory << "/" << pid << "/" << kStatusFilename;
std::ifstream filestream(filename.str());
long memoryRam ;
std::string unitRam;
if (filestream.is_open()) {
std::string line;
bool foundRamMemory = false;
while (!foundRamMemory && std::getline(filestream, line)) {
std::istringstream linestream(line);
std::string key;
linestream >> key;
if (key == "VmSize:") {
linestream >> memoryRam >> unitRam;
foundRamMemory = true;
}
}
}
std::ostringstream ostream;
ostream << memoryRam/1024 ;
return ostream.str();
}
// TODO: Read and return the user ID associated with a process
// REMOVE: [[maybe_unused]] once you define the function
string LinuxParser::Uid(int pid) {
std::stringstream filename;
filename << kProcDirectory << "/" << pid << "/" << kStatusFilename;
std::ifstream filestream(filename.str());
string uid ;
if (filestream.is_open()) {
std::string line;
bool foundId = false;
while (!foundId && std::getline(filestream, line)) {
std::istringstream linestream(line);
std::string key;
linestream >> key;
if (key == "Uid:") {
linestream >> uid;
foundId = true;
}
}
}
return uid;
}
// TODO: Read and return the user associated with a process
// REMOVE: [[maybe_unused]] once you define the function
string LinuxParser::User(int pid) {
std::string uid = Uid(pid);
std::string userName;
std::ifstream filestream(kPasswordPath);
// long runningProcesses = 0;
if (filestream.is_open()) {
std::string line;
bool uidFound = false;
while (std::getline(filestream, line) && !uidFound) {
std::replace(line.begin(), line.end(), ' ', '_');
std::replace(line.begin(), line.end(), ':', ' ');
std::istringstream linestream(line);
std::string pwd;
std::string currentUid;
linestream >> userName >> pwd >> currentUid;
if (currentUid == uid)
{
uidFound = true;
}
}
}
return userName;
}
// TODO: Read and return the uptime of a process
// REMOVE: [[maybe_unused]] once you define the function
long LinuxParser::UpTime(int pid) {
std::stringstream filename;
filename << kProcDirectory << "/" << pid << "/" << kStatFilename;
std::ifstream filestream(filename.str());
long starttime = 0;
long UpTime {0};
if (filestream.is_open()) {
std::string line;
std::getline(filestream, line);
std::istringstream linestream(line);
std::string ignore;
for(int i = 0; i < 21; i++) linestream >> ignore;
linestream >> starttime;
std::time_t UpTime = LinuxParser::UpTime() - (starttime/sysconf(_SC_CLK_TCK));
return UpTime;
}
return UpTime;
} | 29.530474 | 133 | 0.6353 | [
"vector"
] |
47cb000ba566accd4ce7e7418212223d4fde3cb3 | 57,400 | cpp | C++ | cppcrypto/kupyna.cpp | crashdemons/kerukuro-cppcrypto | 090d0e97280c0c34267ab50b72a2ffa5b991110b | [
"BSD-2-Clause"
] | null | null | null | cppcrypto/kupyna.cpp | crashdemons/kerukuro-cppcrypto | 090d0e97280c0c34267ab50b72a2ffa5b991110b | [
"BSD-2-Clause"
] | null | null | null | cppcrypto/kupyna.cpp | crashdemons/kerukuro-cppcrypto | 090d0e97280c0c34267ab50b72a2ffa5b991110b | [
"BSD-2-Clause"
] | null | null | null | /*
This code is written by kerukuro for cppcrypto library (http://cppcrypto.sourceforge.net/)
and released into public domain.
*/
#include "cpuinfo.h"
#include "kupyna.h"
#include "portability.h"
#include <memory.h>
//#define CPPCRYPTO_DEBUG
namespace cppcrypto
{
#ifdef CPPCRYPTO_DEBUG
void dump_state(const char* name, uint64_t* y, int elements = 8)
{
printf("%s: ", name);
for (int i = 0; i < elements; i++)
printf("%016llx\n", y[i]);
printf("\n");
}
#endif
extern const uint64_t KUPYNA_T[8][256] = {
{
0xa832a829d77f9aa8, 0x4352432297d41143, 0x5f3e5fc2df80615f, 0x061e063014121806,
0x6bda6b7f670cb16b, 0x75bc758f2356c975, 0x6cc16c477519ad6c, 0x592059f2cb927959,
0x71a871af3b4ad971, 0xdf84dfb6f8275bdf, 0x87a1874c35b22687, 0x95fb95dc59cc6e95,
0x174b17b872655c17, 0xf017f0d31aeae7f0, 0xd89fd88eea3247d8, 0x092d0948363f2409,
0x6dc46d4f731ea96d, 0xf318f3cb10e3ebf3, 0x1d691de84e53741d, 0xcbc0cb16804b0bcb,
0xc9cac9068c4503c9, 0x4d644d52b3fe294d, 0x2c9c2c7de8c4b02c, 0xaf29af11c56a86af,
0x798079ef0b72f979, 0xe047e0537a9aa7e0, 0x97f197cc55c26697, 0xfd2efdbb34c9d3fd,
0x6fce6f5f7f10a16f, 0x4b7a4b62a7ec314b, 0x454c451283c60945, 0x39dd39d596afe439,
0x3ec63eed84baf83e, 0xdd8edda6f42953dd, 0xa315a371ed4eb6a3, 0x4f6e4f42bff0214f,
0xb45eb4c99f2beab4, 0xb654b6d99325e2b6, 0x9ac89aa47be1529a, 0x0e360e70242a380e,
0x1f631ff8425d7c1f, 0xbf79bf91a51ac6bf, 0x154115a87e6b5415, 0xe142e15b7c9da3e1,
0x49704972abe23949, 0xd2bdd2ded6046fd2, 0x93e593ec4dde7693, 0xc6f9c67eae683fc6,
0x92e092e44bd97292, 0x72a772b73143d572, 0x9edc9e8463fd429e, 0x61f8612f5b3a9961,
0xd1b2d1c6dc0d63d1, 0x63f2633f57349163, 0xfa35fa8326dccffa, 0xee71ee235eb09fee,
0xf403f4f302f6f7f4, 0x197d19c8564f6419, 0xd5a6d5e6c41173d5, 0xad23ad01c9648ead,
0x582558facd957d58, 0xa40ea449ff5baaa4, 0xbb6dbbb1bd06d6bb, 0xa11fa161e140bea1,
0xdc8bdcaef22e57dc, 0xf21df2c316e4eff2, 0x83b5836c2dae3683, 0x37eb37a5b285dc37,
0x4257422a91d31542, 0xe453e4736286b7e4, 0x7a8f7af7017bf57a, 0x32fa328dac9ec832,
0x9cd69c946ff34a9c, 0xccdbcc2e925e17cc, 0xab3dab31dd7696ab, 0x4a7f4a6aa1eb354a,
0x8f898f0c058a068f, 0x6ecb6e577917a56e, 0x04140420181c1004, 0x27bb2725d2f59c27,
0x2e962e6de4cab82e, 0xe75ce76b688fbbe7, 0xe24de2437694afe2, 0x5a2f5aeac19b755a,
0x96f496c453c56296, 0x164e16b074625816, 0x23af2305cae98c23, 0x2b872b45fad1ac2b,
0xc2edc25eb6742fc2, 0x65ec650f43268965, 0x66e36617492f8566, 0x0f330f78222d3c0f,
0xbc76bc89af13cabc, 0xa937a921d1789ea9, 0x474647028fc80147, 0x415841329bda1941,
0x34e434bdb88cd034, 0x4875487aade53d48, 0xfc2bfcb332ced7fc, 0xb751b7d19522e6b7,
0x6adf6a77610bb56a, 0x88928834179f1a88, 0xa50ba541f95caea5, 0x530253a2f7a45153,
0x86a4864433b52286, 0xf93af99b2cd5c3f9, 0x5b2a5be2c79c715b, 0xdb90db96e03b4bdb,
0x38d838dd90a8e038, 0x7b8a7bff077cf17b, 0xc3e8c356b0732bc3, 0x1e661ef0445a781e,
0x22aa220dccee8822, 0x33ff3385aa99cc33, 0x24b4243dd8fc9024, 0x2888285df0d8a028,
0x36ee36adb482d836, 0xc7fcc776a86f3bc7, 0xb240b2f98b39f2b2, 0x3bd73bc59aa1ec3b,
0x8e8c8e04038d028e, 0x77b6779f2f58c177, 0xba68bab9bb01d2ba, 0xf506f5fb04f1f3f5,
0x144414a0786c5014, 0x9fd99f8c65fa469f, 0x0828084030382008, 0x551c5592e3b64955,
0x9bcd9bac7de6569b, 0x4c614c5ab5f92d4c, 0xfe21fea33ec0dffe, 0x60fd60275d3d9d60,
0x5c315cdad5896d5c, 0xda95da9ee63c4fda, 0x187818c050486018, 0x4643460a89cf0546,
0xcddecd26945913cd, 0x7d947dcf136ee97d, 0x21a52115c6e78421, 0xb04ab0e98737fab0,
0x3fc33fe582bdfc3f, 0x1b771bd85a416c1b, 0x8997893c11981e89, 0xff24ffab38c7dbff,
0xeb60eb0b40ab8beb, 0x84ae84543fbb2a84, 0x69d0696f6b02b969, 0x3ad23acd9ca6e83a,
0x9dd39d9c69f44e9d, 0xd7acd7f6c81f7bd7, 0xd3b8d3d6d0036bd3, 0x70ad70a73d4ddd70,
0x67e6671f4f288167, 0x405d403a9ddd1d40, 0xb55bb5c1992ceeb5, 0xde81debefe205fde,
0x5d345dd2d38e695d, 0x30f0309da090c030, 0x91ef91fc41d07e91, 0xb14fb1e18130feb1,
0x788578e70d75fd78, 0x1155118866774411, 0x0105010806070401, 0xe556e57b6481b3e5,
0x0000000000000000, 0x68d568676d05bd68, 0x98c298b477ef5a98, 0xa01aa069e747baa0,
0xc5f6c566a46133c5, 0x020a02100c0e0802, 0xa604a659f355a2a6, 0x74b974872551cd74,
0x2d992d75eec3b42d, 0x0b270b583a312c0b, 0xa210a279eb49b2a2, 0x76b37697295fc576,
0xb345b3f18d3ef6b3, 0xbe7cbe99a31dc2be, 0xced1ce3e9e501fce, 0xbd73bd81a914cebd,
0xae2cae19c36d82ae, 0xe96ae91b4ca583e9, 0x8a988a241b91128a, 0x31f53195a697c431,
0x1c6c1ce04854701c, 0xec7bec3352be97ec, 0xf112f1db1cede3f1, 0x99c799bc71e85e99,
0x94fe94d45fcb6a94, 0xaa38aa39db7192aa, 0xf609f6e30ef8fff6, 0x26be262dd4f29826,
0x2f932f65e2cdbc2f, 0xef74ef2b58b79bef, 0xe86fe8134aa287e8, 0x8c868c140f830a8c,
0x35e135b5be8bd435, 0x030f03180a090c03, 0xd4a3d4eec21677d4, 0x7f9e7fdf1f60e17f,
0xfb30fb8b20dbcbfb, 0x051105281e1b1405, 0xc1e2c146bc7d23c1, 0x5e3b5ecad987655e,
0x90ea90f447d77a90, 0x20a0201dc0e08020, 0x3dc93df58eb3f43d, 0x82b082642ba93282,
0xf70cf7eb08fffbf7, 0xea65ea0346ac8fea, 0x0a220a503c36280a, 0x0d390d682e23340d,
0x7e9b7ed71967e57e, 0xf83ff8932ad2c7f8, 0x500d50bafdad5d50, 0x1a721ad05c46681a,
0xc4f3c46ea26637c4, 0x071b073812151c07, 0x57165782efb84157, 0xb862b8a9b70fdab8,
0x3ccc3cfd88b4f03c, 0x62f7623751339562, 0xe348e34b7093abe3, 0xc8cfc80e8a4207c8,
0xac26ac09cf638aac, 0x520752aaf1a35552, 0x64e9640745218d64, 0x1050108060704010,
0xd0b7d0ceda0a67d0, 0xd99ad986ec3543d9, 0x135f13986a794c13, 0x0c3c0c602824300c,
0x125a12906c7e4812, 0x298d2955f6dfa429, 0x510851b2fbaa5951, 0xb967b9a1b108deb9,
0xcfd4cf3698571bcf, 0xd6a9d6fece187fd6, 0x73a273bf3744d173, 0x8d838d1c09840e8d,
0x81bf817c21a03e81, 0x5419549ae5b14d54, 0xc0e7c04eba7a27c0, 0xed7eed3b54b993ed,
0x4e6b4e4ab9f7254e, 0x4449441a85c10d44, 0xa701a751f552a6a7, 0x2a822a4dfcd6a82a,
0x85ab855c39bc2e85, 0x25b12535defb9425, 0xe659e6636e88bfe6, 0xcac5ca1e864c0fca,
0x7c917cc71569ed7c, 0x8b9d8b2c1d96168b, 0x5613568ae9bf4556, 0x80ba807427a73a80
},
{
0xd1ce3e9e501fcece, 0x6dbbb1bd06d6bbbb, 0x60eb0b40ab8bebeb, 0xe092e44bd9729292,
0x65ea0346ac8feaea, 0xc0cb16804b0bcbcb, 0x5f13986a794c1313, 0xe2c146bc7d23c1c1,
0x6ae91b4ca583e9e9, 0xd23acd9ca6e83a3a, 0xa9d6fece187fd6d6, 0x40b2f98b39f2b2b2,
0xbdd2ded6046fd2d2, 0xea90f447d77a9090, 0x4b17b872655c1717, 0x3ff8932ad2c7f8f8,
0x57422a91d3154242, 0x4115a87e6b541515, 0x13568ae9bf455656, 0x5eb4c99f2beab4b4,
0xec650f4326896565, 0x6c1ce04854701c1c, 0x928834179f1a8888, 0x52432297d4114343,
0xf6c566a46133c5c5, 0x315cdad5896d5c5c, 0xee36adb482d83636, 0x68bab9bb01d2baba,
0x06f5fb04f1f3f5f5, 0x165782efb8415757, 0xe6671f4f28816767, 0x838d1c09840e8d8d,
0xf53195a697c43131, 0x09f6e30ef8fff6f6, 0xe9640745218d6464, 0x2558facd957d5858,
0xdc9e8463fd429e9e, 0x03f4f302f6f7f4f4, 0xaa220dccee882222, 0x38aa39db7192aaaa,
0xbc758f2356c97575, 0x330f78222d3c0f0f, 0x0a02100c0e080202, 0x4fb1e18130feb1b1,
0x84dfb6f8275bdfdf, 0xc46d4f731ea96d6d, 0xa273bf3744d17373, 0x644d52b3fe294d4d,
0x917cc71569ed7c7c, 0xbe262dd4f2982626, 0x962e6de4cab82e2e, 0x0cf7eb08fffbf7f7,
0x2808403038200808, 0x345dd2d38e695d5d, 0x49441a85c10d4444, 0xc63eed84baf83e3e,
0xd99f8c65fa469f9f, 0x4414a0786c501414, 0xcfc80e8a4207c8c8, 0x2cae19c36d82aeae,
0x19549ae5b14d5454, 0x5010806070401010, 0x9fd88eea3247d8d8, 0x76bc89af13cabcbc,
0x721ad05c46681a1a, 0xda6b7f670cb16b6b, 0xd0696f6b02b96969, 0x18f3cb10e3ebf3f3,
0x73bd81a914cebdbd, 0xff3385aa99cc3333, 0x3dab31dd7696abab, 0x35fa8326dccffafa,
0xb2d1c6dc0d63d1d1, 0xcd9bac7de6569b9b, 0xd568676d05bd6868, 0x6b4e4ab9f7254e4e,
0x4e16b07462581616, 0xfb95dc59cc6e9595, 0xef91fc41d07e9191, 0x71ee235eb09feeee,
0x614c5ab5f92d4c4c, 0xf2633f5734916363, 0x8c8e04038d028e8e, 0x2a5be2c79c715b5b,
0xdbcc2e925e17cccc, 0xcc3cfd88b4f03c3c, 0x7d19c8564f641919, 0x1fa161e140bea1a1,
0xbf817c21a03e8181, 0x704972abe2394949, 0x8a7bff077cf17b7b, 0x9ad986ec3543d9d9,
0xce6f5f7f10a16f6f, 0xeb37a5b285dc3737, 0xfd60275d3d9d6060, 0xc5ca1e864c0fcaca,
0x5ce76b688fbbe7e7, 0x872b45fad1ac2b2b, 0x75487aade53d4848, 0x2efdbb34c9d3fdfd,
0xf496c453c5629696, 0x4c451283c6094545, 0x2bfcb332ced7fcfc, 0x5841329bda194141,
0x5a12906c7e481212, 0x390d682e23340d0d, 0x8079ef0b72f97979, 0x56e57b6481b3e5e5,
0x97893c11981e8989, 0x868c140f830a8c8c, 0x48e34b7093abe3e3, 0xa0201dc0e0802020,
0xf0309da090c03030, 0x8bdcaef22e57dcdc, 0x51b7d19522e6b7b7, 0xc16c477519ad6c6c,
0x7f4a6aa1eb354a4a, 0x5bb5c1992ceeb5b5, 0xc33fe582bdfc3f3f, 0xf197cc55c2669797,
0xa3d4eec21677d4d4, 0xf762375133956262, 0x992d75eec3b42d2d, 0x1e06301412180606,
0x0ea449ff5baaa4a4, 0x0ba541f95caea5a5, 0xb5836c2dae368383, 0x3e5fc2df80615f5f,
0x822a4dfcd6a82a2a, 0x95da9ee63c4fdada, 0xcac9068c4503c9c9, 0x0000000000000000,
0x9b7ed71967e57e7e, 0x10a279eb49b2a2a2, 0x1c5592e3b6495555, 0x79bf91a51ac6bfbf,
0x5511886677441111, 0xa6d5e6c41173d5d5, 0xd69c946ff34a9c9c, 0xd4cf3698571bcfcf,
0x360e70242a380e0e, 0x220a503c36280a0a, 0xc93df58eb3f43d3d, 0x0851b2fbaa595151,
0x947dcf136ee97d7d, 0xe593ec4dde769393, 0x771bd85a416c1b1b, 0x21fea33ec0dffefe,
0xf3c46ea26637c4c4, 0x4647028fc8014747, 0x2d0948363f240909, 0xa4864433b5228686,
0x270b583a312c0b0b, 0x898f0c058a068f8f, 0xd39d9c69f44e9d9d, 0xdf6a77610bb56a6a,
0x1b073812151c0707, 0x67b9a1b108deb9b9, 0x4ab0e98737fab0b0, 0xc298b477ef5a9898,
0x7818c05048601818, 0xfa328dac9ec83232, 0xa871af3b4ad97171, 0x7a4b62a7ec314b4b,
0x74ef2b58b79befef, 0xd73bc59aa1ec3b3b, 0xad70a73d4ddd7070, 0x1aa069e747baa0a0,
0x53e4736286b7e4e4, 0x5d403a9ddd1d4040, 0x24ffab38c7dbffff, 0xe8c356b0732bc3c3,
0x37a921d1789ea9a9, 0x59e6636e88bfe6e6, 0x8578e70d75fd7878, 0x3af99b2cd5c3f9f9,
0x9d8b2c1d96168b8b, 0x43460a89cf054646, 0xba807427a73a8080, 0x661ef0445a781e1e,
0xd838dd90a8e03838, 0x42e15b7c9da3e1e1, 0x62b8a9b70fdab8b8, 0x32a829d77f9aa8a8,
0x47e0537a9aa7e0e0, 0x3c0c602824300c0c, 0xaf2305cae98c2323, 0xb37697295fc57676,
0x691de84e53741d1d, 0xb12535defb942525, 0xb4243dd8fc902424, 0x1105281e1b140505,
0x12f1db1cede3f1f1, 0xcb6e577917a56e6e, 0xfe94d45fcb6a9494, 0x88285df0d8a02828,
0xc89aa47be1529a9a, 0xae84543fbb2a8484, 0x6fe8134aa287e8e8, 0x15a371ed4eb6a3a3,
0x6e4f42bff0214f4f, 0xb6779f2f58c17777, 0xb8d3d6d0036bd3d3, 0xab855c39bc2e8585,
0x4de2437694afe2e2, 0x0752aaf1a3555252, 0x1df2c316e4eff2f2, 0xb082642ba9328282,
0x0d50bafdad5d5050, 0x8f7af7017bf57a7a, 0x932f65e2cdbc2f2f, 0xb974872551cd7474,
0x0253a2f7a4515353, 0x45b3f18d3ef6b3b3, 0xf8612f5b3a996161, 0x29af11c56a86afaf,
0xdd39d596afe43939, 0xe135b5be8bd43535, 0x81debefe205fdede, 0xdecd26945913cdcd,
0x631ff8425d7c1f1f, 0xc799bc71e85e9999, 0x26ac09cf638aacac, 0x23ad01c9648eadad,
0xa772b73143d57272, 0x9c2c7de8c4b02c2c, 0x8edda6f42953dddd, 0xb7d0ceda0a67d0d0,
0xa1874c35b2268787, 0x7cbe99a31dc2bebe, 0x3b5ecad987655e5e, 0x04a659f355a2a6a6,
0x7bec3352be97ecec, 0x140420181c100404, 0xf9c67eae683fc6c6, 0x0f03180a090c0303,
0xe434bdb88cd03434, 0x30fb8b20dbcbfbfb, 0x90db96e03b4bdbdb, 0x2059f2cb92795959,
0x54b6d99325e2b6b6, 0xedc25eb6742fc2c2, 0x0501080607040101, 0x17f0d31aeae7f0f0,
0x2f5aeac19b755a5a, 0x7eed3b54b993eded, 0x01a751f552a6a7a7, 0xe36617492f856666,
0xa52115c6e7842121, 0x9e7fdf1f60e17f7f, 0x988a241b91128a8a, 0xbb2725d2f59c2727,
0xfcc776a86f3bc7c7, 0xe7c04eba7a27c0c0, 0x8d2955f6dfa42929, 0xacd7f6c81f7bd7d7
},
{
0x93ec4dde769393e5, 0xd986ec3543d9d99a, 0x9aa47be1529a9ac8, 0xb5c1992ceeb5b55b,
0x98b477ef5a9898c2, 0x220dccee882222aa, 0x451283c60945454c, 0xfcb332ced7fcfc2b,
0xbab9bb01d2baba68, 0x6a77610bb56a6adf, 0xdfb6f8275bdfdf84, 0x02100c0e0802020a,
0x9f8c65fa469f9fd9, 0xdcaef22e57dcdc8b, 0x51b2fbaa59515108, 0x59f2cb9279595920,
0x4a6aa1eb354a4a7f, 0x17b872655c17174b, 0x2b45fad1ac2b2b87, 0xc25eb6742fc2c2ed,
0x94d45fcb6a9494fe, 0xf4f302f6f7f4f403, 0xbbb1bd06d6bbbb6d, 0xa371ed4eb6a3a315,
0x62375133956262f7, 0xe4736286b7e4e453, 0x71af3b4ad97171a8, 0xd4eec21677d4d4a3,
0xcd26945913cdcdde, 0x70a73d4ddd7070ad, 0x16b074625816164e, 0xe15b7c9da3e1e142,
0x4972abe239494970, 0x3cfd88b4f03c3ccc, 0xc04eba7a27c0c0e7, 0xd88eea3247d8d89f,
0x5cdad5896d5c5c31, 0x9bac7de6569b9bcd, 0xad01c9648eadad23, 0x855c39bc2e8585ab,
0x53a2f7a451535302, 0xa161e140bea1a11f, 0x7af7017bf57a7a8f, 0xc80e8a4207c8c8cf,
0x2d75eec3b42d2d99, 0xe0537a9aa7e0e047, 0xd1c6dc0d63d1d1b2, 0x72b73143d57272a7,
0xa659f355a2a6a604, 0x2c7de8c4b02c2c9c, 0xc46ea26637c4c4f3, 0xe34b7093abe3e348,
0x7697295fc57676b3, 0x78e70d75fd787885, 0xb7d19522e6b7b751, 0xb4c99f2beab4b45e,
0x0948363f2409092d, 0x3bc59aa1ec3b3bd7, 0x0e70242a380e0e36, 0x41329bda19414158,
0x4c5ab5f92d4c4c61, 0xdebefe205fdede81, 0xb2f98b39f2b2b240, 0x90f447d77a9090ea,
0x2535defb942525b1, 0xa541f95caea5a50b, 0xd7f6c81f7bd7d7ac, 0x03180a090c03030f,
0x1188667744111155, 0x0000000000000000, 0xc356b0732bc3c3e8, 0x2e6de4cab82e2e96,
0x92e44bd9729292e0, 0xef2b58b79befef74, 0x4e4ab9f7254e4e6b, 0x12906c7e4812125a,
0x9d9c69f44e9d9dd3, 0x7dcf136ee97d7d94, 0xcb16804b0bcbcbc0, 0x35b5be8bd43535e1,
0x1080607040101050, 0xd5e6c41173d5d5a6, 0x4f42bff0214f4f6e, 0x9e8463fd429e9edc,
0x4d52b3fe294d4d64, 0xa921d1789ea9a937, 0x5592e3b64955551c, 0xc67eae683fc6c6f9,
0xd0ceda0a67d0d0b7, 0x7bff077cf17b7b8a, 0x18c0504860181878, 0x97cc55c2669797f1,
0xd3d6d0036bd3d3b8, 0x36adb482d83636ee, 0xe6636e88bfe6e659, 0x487aade53d484875,
0x568ae9bf45565613, 0x817c21a03e8181bf, 0x8f0c058a068f8f89, 0x779f2f58c17777b6,
0xcc2e925e17ccccdb, 0x9c946ff34a9c9cd6, 0xb9a1b108deb9b967, 0xe2437694afe2e24d,
0xac09cf638aacac26, 0xb8a9b70fdab8b862, 0x2f65e2cdbc2f2f93, 0x15a87e6b54151541,
0xa449ff5baaa4a40e, 0x7cc71569ed7c7c91, 0xda9ee63c4fdada95, 0x38dd90a8e03838d8,
0x1ef0445a781e1e66, 0x0b583a312c0b0b27, 0x05281e1b14050511, 0xd6fece187fd6d6a9,
0x14a0786c50141444, 0x6e577917a56e6ecb, 0x6c477519ad6c6cc1, 0x7ed71967e57e7e9b,
0x6617492f856666e3, 0xfdbb34c9d3fdfd2e, 0xb1e18130feb1b14f, 0xe57b6481b3e5e556,
0x60275d3d9d6060fd, 0xaf11c56a86afaf29, 0x5ecad987655e5e3b, 0x3385aa99cc3333ff,
0x874c35b2268787a1, 0xc9068c4503c9c9ca, 0xf0d31aeae7f0f017, 0x5dd2d38e695d5d34,
0x6d4f731ea96d6dc4, 0x3fe582bdfc3f3fc3, 0x8834179f1a888892, 0x8d1c09840e8d8d83,
0xc776a86f3bc7c7fc, 0xf7eb08fffbf7f70c, 0x1de84e53741d1d69, 0xe91b4ca583e9e96a,
0xec3352be97ecec7b, 0xed3b54b993eded7e, 0x807427a73a8080ba, 0x2955f6dfa429298d,
0x2725d2f59c2727bb, 0xcf3698571bcfcfd4, 0x99bc71e85e9999c7, 0xa829d77f9aa8a832,
0x50bafdad5d50500d, 0x0f78222d3c0f0f33, 0x37a5b285dc3737eb, 0x243dd8fc902424b4,
0x285df0d8a0282888, 0x309da090c03030f0, 0x95dc59cc6e9595fb, 0xd2ded6046fd2d2bd,
0x3eed84baf83e3ec6, 0x5be2c79c715b5b2a, 0x403a9ddd1d40405d, 0x836c2dae368383b5,
0xb3f18d3ef6b3b345, 0x696f6b02b96969d0, 0x5782efb841575716, 0x1ff8425d7c1f1f63,
0x073812151c07071b, 0x1ce04854701c1c6c, 0x8a241b91128a8a98, 0xbc89af13cabcbc76,
0x201dc0e0802020a0, 0xeb0b40ab8bebeb60, 0xce3e9e501fceced1, 0x8e04038d028e8e8c,
0xab31dd7696abab3d, 0xee235eb09feeee71, 0x3195a697c43131f5, 0xa279eb49b2a2a210,
0x73bf3744d17373a2, 0xf99b2cd5c3f9f93a, 0xca1e864c0fcacac5, 0x3acd9ca6e83a3ad2,
0x1ad05c46681a1a72, 0xfb8b20dbcbfbfb30, 0x0d682e23340d0d39, 0xc146bc7d23c1c1e2,
0xfea33ec0dffefe21, 0xfa8326dccffafa35, 0xf2c316e4eff2f21d, 0x6f5f7f10a16f6fce,
0xbd81a914cebdbd73, 0x96c453c5629696f4, 0xdda6f42953dddd8e, 0x432297d411434352,
0x52aaf1a355525207, 0xb6d99325e2b6b654, 0x0840303820080828, 0xf3cb10e3ebf3f318,
0xae19c36d82aeae2c, 0xbe99a31dc2bebe7c, 0x19c8564f6419197d, 0x893c11981e898997,
0x328dac9ec83232fa, 0x262dd4f2982626be, 0xb0e98737fab0b04a, 0xea0346ac8feaea65,
0x4b62a7ec314b4b7a, 0x640745218d6464e9, 0x84543fbb2a8484ae, 0x82642ba9328282b0,
0x6b7f670cb16b6bda, 0xf5fb04f1f3f5f506, 0x79ef0b72f9797980, 0xbf91a51ac6bfbf79,
0x0108060704010105, 0x5fc2df80615f5f3e, 0x758f2356c97575bc, 0x633f5734916363f2,
0x1bd85a416c1b1b77, 0x2305cae98c2323af, 0x3df58eb3f43d3dc9, 0x68676d05bd6868d5,
0x2a4dfcd6a82a2a82, 0x650f4326896565ec, 0xe8134aa287e8e86f, 0x91fc41d07e9191ef,
0xf6e30ef8fff6f609, 0xffab38c7dbffff24, 0x13986a794c13135f, 0x58facd957d585825,
0xf1db1cede3f1f112, 0x47028fc801474746, 0x0a503c36280a0a22, 0x7fdf1f60e17f7f9e,
0xc566a46133c5c5f6, 0xa751f552a6a7a701, 0xe76b688fbbe7e75c, 0x612f5b3a996161f8,
0x5aeac19b755a5a2f, 0x063014121806061e, 0x460a89cf05464643, 0x441a85c10d444449,
0x422a91d315424257, 0x0420181c10040414, 0xa069e747baa0a01a, 0xdb96e03b4bdbdb90,
0x39d596afe43939dd, 0x864433b5228686a4, 0x549ae5b14d545419, 0xaa39db7192aaaa38,
0x8c140f830a8c8c86, 0x34bdb88cd03434e4, 0x2115c6e7842121a5, 0x8b2c1d96168b8b9d,
0xf8932ad2c7f8f83f, 0x0c602824300c0c3c, 0x74872551cd7474b9, 0x671f4f28816767e6
},
{
0x676d05bd6868d568, 0x1c09840e8d8d838d, 0x1e864c0fcacac5ca, 0x52b3fe294d4d644d,
0xbf3744d17373a273, 0x62a7ec314b4b7a4b, 0x4ab9f7254e4e6b4e, 0x4dfcd6a82a2a822a,
0xeec21677d4d4a3d4, 0xaaf1a35552520752, 0x2dd4f2982626be26, 0xf18d3ef6b3b345b3,
0x9ae5b14d54541954, 0xf0445a781e1e661e, 0xc8564f6419197d19, 0xf8425d7c1f1f631f,
0x0dccee882222aa22, 0x180a090c03030f03, 0x0a89cf0546464346, 0xf58eb3f43d3dc93d,
0x75eec3b42d2d992d, 0x6aa1eb354a4a7f4a, 0xa2f7a45153530253, 0x6c2dae368383b583,
0x986a794c13135f13, 0x241b91128a8a988a, 0xd19522e6b7b751b7, 0xe6c41173d5d5a6d5,
0x35defb942525b125, 0xef0b72f979798079, 0xfb04f1f3f5f506f5, 0x81a914cebdbd73bd,
0xfacd957d58582558, 0x65e2cdbc2f2f932f, 0x682e23340d0d390d, 0x100c0e0802020a02,
0x3b54b993eded7eed, 0xb2fbaa5951510851, 0x8463fd429e9edc9e, 0x8866774411115511,
0xc316e4eff2f21df2, 0xed84baf83e3ec63e, 0x92e3b64955551c55, 0xcad987655e5e3b5e,
0xc6dc0d63d1d1b2d1, 0xb074625816164e16, 0xfd88b4f03c3ccc3c, 0x17492f856666e366,
0xa73d4ddd7070ad70, 0xd2d38e695d5d345d, 0xcb10e3ebf3f318f3, 0x1283c60945454c45,
0x3a9ddd1d40405d40, 0x2e925e17ccccdbcc, 0x134aa287e8e86fe8, 0xd45fcb6a9494fe94,
0x8ae9bf4556561356, 0x4030382008082808, 0x3e9e501fceced1ce, 0xd05c46681a1a721a,
0xcd9ca6e83a3ad23a, 0xded6046fd2d2bdd2, 0x5b7c9da3e1e142e1, 0xb6f8275bdfdf84df,
0xc1992ceeb5b55bb5, 0xdd90a8e03838d838, 0x577917a56e6ecb6e, 0x70242a380e0e360e,
0x7b6481b3e5e556e5, 0xf302f6f7f4f403f4, 0x9b2cd5c3f9f93af9, 0x4433b5228686a486,
0x1b4ca583e9e96ae9, 0x42bff0214f4f6e4f, 0xfece187fd6d6a9d6, 0x5c39bc2e8585ab85,
0x05cae98c2323af23, 0x3698571bcfcfd4cf, 0x8dac9ec83232fa32, 0xbc71e85e9999c799,
0x95a697c43131f531, 0xa0786c5014144414, 0x19c36d82aeae2cae, 0x235eb09feeee71ee,
0x0e8a4207c8c8cfc8, 0x7aade53d48487548, 0xd6d0036bd3d3b8d3, 0x9da090c03030f030,
0x61e140bea1a11fa1, 0xe44bd9729292e092, 0x329bda1941415841, 0xe18130feb1b14fb1,
0xc050486018187818, 0x6ea26637c4c4f3c4, 0x7de8c4b02c2c9c2c, 0xaf3b4ad97171a871,
0xb73143d57272a772, 0x1a85c10d44444944, 0xa87e6b5415154115, 0xbb34c9d3fdfd2efd,
0xa5b285dc3737eb37, 0x99a31dc2bebe7cbe, 0xc2df80615f5f3e5f, 0x39db7192aaaa38aa,
0xac7de6569b9bcd9b, 0x34179f1a88889288, 0x8eea3247d8d89fd8, 0x31dd7696abab3dab,
0x3c11981e89899789, 0x946ff34a9c9cd69c, 0x8326dccffafa35fa, 0x275d3d9d6060fd60,
0x0346ac8feaea65ea, 0x89af13cabcbc76bc, 0x375133956262f762, 0x602824300c0c3c0c,
0x3dd8fc902424b424, 0x59f355a2a6a604a6, 0x29d77f9aa8a832a8, 0x3352be97ecec7bec,
0x1f4f28816767e667, 0x1dc0e0802020a020, 0x96e03b4bdbdb90db, 0xc71569ed7c7c917c,
0x5df0d8a028288828, 0xa6f42953dddd8edd, 0x09cf638aacac26ac, 0xe2c79c715b5b2a5b,
0xbdb88cd03434e434, 0xd71967e57e7e9b7e, 0x8060704010105010, 0xdb1cede3f1f112f1,
0xff077cf17b7b8a7b, 0x0c058a068f8f898f, 0x3f5734916363f263, 0x69e747baa0a01aa0,
0x281e1b1405051105, 0xa47be1529a9ac89a, 0x2297d41143435243, 0x9f2f58c17777b677,
0x15c6e7842121a521, 0x91a51ac6bfbf79bf, 0x25d2f59c2727bb27, 0x48363f2409092d09,
0x56b0732bc3c3e8c3, 0x8c65fa469f9fd99f, 0xd99325e2b6b654b6, 0xf6c81f7bd7d7acd7,
0x55f6dfa429298d29, 0x5eb6742fc2c2edc2, 0x0b40ab8bebeb60eb, 0x4eba7a27c0c0e7c0,
0x49ff5baaa4a40ea4, 0x2c1d96168b8b9d8b, 0x140f830a8c8c868c, 0xe84e53741d1d691d,
0x8b20dbcbfbfb30fb, 0xab38c7dbffff24ff, 0x46bc7d23c1c1e2c1, 0xf98b39f2b2b240b2,
0xcc55c2669797f197, 0x6de4cab82e2e962e, 0x932ad2c7f8f83ff8, 0x0f4326896565ec65,
0xe30ef8fff6f609f6, 0x8f2356c97575bc75, 0x3812151c07071b07, 0x20181c1004041404,
0x72abe23949497049, 0x85aa99cc3333ff33, 0x736286b7e4e453e4, 0x86ec3543d9d99ad9,
0xa1b108deb9b967b9, 0xceda0a67d0d0b7d0, 0x2a91d31542425742, 0x76a86f3bc7c7fcc7,
0x477519ad6c6cc16c, 0xf447d77a9090ea90, 0x0000000000000000, 0x04038d028e8e8c8e,
0x5f7f10a16f6fce6f, 0xbafdad5d50500d50, 0x0806070401010501, 0x66a46133c5c5f6c5,
0x9ee63c4fdada95da, 0x028fc80147474647, 0xe582bdfc3f3fc33f, 0x26945913cdcddecd,
0x6f6b02b96969d069, 0x79eb49b2a2a210a2, 0x437694afe2e24de2, 0xf7017bf57a7a8f7a,
0x51f552a6a7a701a7, 0x7eae683fc6c6f9c6, 0xec4dde769393e593, 0x78222d3c0f0f330f,
0x503c36280a0a220a, 0x3014121806061e06, 0x636e88bfe6e659e6, 0x45fad1ac2b2b872b,
0xc453c5629696f496, 0x71ed4eb6a3a315a3, 0xe04854701c1c6c1c, 0x11c56a86afaf29af,
0x77610bb56a6adf6a, 0x906c7e4812125a12, 0x543fbb2a8484ae84, 0xd596afe43939dd39,
0x6b688fbbe7e75ce7, 0xe98737fab0b04ab0, 0x642ba9328282b082, 0xeb08fffbf7f70cf7,
0xa33ec0dffefe21fe, 0x9c69f44e9d9dd39d, 0x4c35b2268787a187, 0xdad5896d5c5c315c,
0x7c21a03e8181bf81, 0xb5be8bd43535e135, 0xbefe205fdede81de, 0xc99f2beab4b45eb4,
0x41f95caea5a50ba5, 0xb332ced7fcfc2bfc, 0x7427a73a8080ba80, 0x2b58b79befef74ef,
0x16804b0bcbcbc0cb, 0xb1bd06d6bbbb6dbb, 0x7f670cb16b6bda6b, 0x97295fc57676b376,
0xb9bb01d2baba68ba, 0xeac19b755a5a2f5a, 0xcf136ee97d7d947d, 0xe70d75fd78788578,
0x583a312c0b0b270b, 0xdc59cc6e9595fb95, 0x4b7093abe3e348e3, 0x01c9648eadad23ad,
0x872551cd7474b974, 0xb477ef5a9898c298, 0xc59aa1ec3b3bd73b, 0xadb482d83636ee36,
0x0745218d6464e964, 0x4f731ea96d6dc46d, 0xaef22e57dcdc8bdc, 0xd31aeae7f0f017f0,
0xf2cb927959592059, 0x21d1789ea9a937a9, 0x5ab5f92d4c4c614c, 0xb872655c17174b17,
0xdf1f60e17f7f9e7f, 0xfc41d07e9191ef91, 0xa9b70fdab8b862b8, 0x068c4503c9c9cac9,
0x82efb84157571657, 0xd85a416c1b1b771b, 0x537a9aa7e0e047e0, 0x2f5b3a996161f861
},
{
0xd77f9aa8a832a829, 0x97d4114343524322, 0xdf80615f5f3e5fc2, 0x14121806061e0630,
0x670cb16b6bda6b7f, 0x2356c97575bc758f, 0x7519ad6c6cc16c47, 0xcb927959592059f2,
0x3b4ad97171a871af, 0xf8275bdfdf84dfb6, 0x35b2268787a1874c, 0x59cc6e9595fb95dc,
0x72655c17174b17b8, 0x1aeae7f0f017f0d3, 0xea3247d8d89fd88e, 0x363f2409092d0948,
0x731ea96d6dc46d4f, 0x10e3ebf3f318f3cb, 0x4e53741d1d691de8, 0x804b0bcbcbc0cb16,
0x8c4503c9c9cac906, 0xb3fe294d4d644d52, 0xe8c4b02c2c9c2c7d, 0xc56a86afaf29af11,
0x0b72f979798079ef, 0x7a9aa7e0e047e053, 0x55c2669797f197cc, 0x34c9d3fdfd2efdbb,
0x7f10a16f6fce6f5f, 0xa7ec314b4b7a4b62, 0x83c60945454c4512, 0x96afe43939dd39d5,
0x84baf83e3ec63eed, 0xf42953dddd8edda6, 0xed4eb6a3a315a371, 0xbff0214f4f6e4f42,
0x9f2beab4b45eb4c9, 0x9325e2b6b654b6d9, 0x7be1529a9ac89aa4, 0x242a380e0e360e70,
0x425d7c1f1f631ff8, 0xa51ac6bfbf79bf91, 0x7e6b5415154115a8, 0x7c9da3e1e142e15b,
0xabe2394949704972, 0xd6046fd2d2bdd2de, 0x4dde769393e593ec, 0xae683fc6c6f9c67e,
0x4bd9729292e092e4, 0x3143d57272a772b7, 0x63fd429e9edc9e84, 0x5b3a996161f8612f,
0xdc0d63d1d1b2d1c6, 0x5734916363f2633f, 0x26dccffafa35fa83, 0x5eb09feeee71ee23,
0x02f6f7f4f403f4f3, 0x564f6419197d19c8, 0xc41173d5d5a6d5e6, 0xc9648eadad23ad01,
0xcd957d58582558fa, 0xff5baaa4a40ea449, 0xbd06d6bbbb6dbbb1, 0xe140bea1a11fa161,
0xf22e57dcdc8bdcae, 0x16e4eff2f21df2c3, 0x2dae368383b5836c, 0xb285dc3737eb37a5,
0x91d315424257422a, 0x6286b7e4e453e473, 0x017bf57a7a8f7af7, 0xac9ec83232fa328d,
0x6ff34a9c9cd69c94, 0x925e17ccccdbcc2e, 0xdd7696abab3dab31, 0xa1eb354a4a7f4a6a,
0x058a068f8f898f0c, 0x7917a56e6ecb6e57, 0x181c100404140420, 0xd2f59c2727bb2725,
0xe4cab82e2e962e6d, 0x688fbbe7e75ce76b, 0x7694afe2e24de243, 0xc19b755a5a2f5aea,
0x53c5629696f496c4, 0x74625816164e16b0, 0xcae98c2323af2305, 0xfad1ac2b2b872b45,
0xb6742fc2c2edc25e, 0x4326896565ec650f, 0x492f856666e36617, 0x222d3c0f0f330f78,
0xaf13cabcbc76bc89, 0xd1789ea9a937a921, 0x8fc8014747464702, 0x9bda194141584132,
0xb88cd03434e434bd, 0xade53d484875487a, 0x32ced7fcfc2bfcb3, 0x9522e6b7b751b7d1,
0x610bb56a6adf6a77, 0x179f1a8888928834, 0xf95caea5a50ba541, 0xf7a45153530253a2,
0x33b5228686a48644, 0x2cd5c3f9f93af99b, 0xc79c715b5b2a5be2, 0xe03b4bdbdb90db96,
0x90a8e03838d838dd, 0x077cf17b7b8a7bff, 0xb0732bc3c3e8c356, 0x445a781e1e661ef0,
0xccee882222aa220d, 0xaa99cc3333ff3385, 0xd8fc902424b4243d, 0xf0d8a0282888285d,
0xb482d83636ee36ad, 0xa86f3bc7c7fcc776, 0x8b39f2b2b240b2f9, 0x9aa1ec3b3bd73bc5,
0x038d028e8e8c8e04, 0x2f58c17777b6779f, 0xbb01d2baba68bab9, 0x04f1f3f5f506f5fb,
0x786c5014144414a0, 0x65fa469f9fd99f8c, 0x3038200808280840, 0xe3b64955551c5592,
0x7de6569b9bcd9bac, 0xb5f92d4c4c614c5a, 0x3ec0dffefe21fea3, 0x5d3d9d6060fd6027,
0xd5896d5c5c315cda, 0xe63c4fdada95da9e, 0x50486018187818c0, 0x89cf05464643460a,
0x945913cdcddecd26, 0x136ee97d7d947dcf, 0xc6e7842121a52115, 0x8737fab0b04ab0e9,
0x82bdfc3f3fc33fe5, 0x5a416c1b1b771bd8, 0x11981e898997893c, 0x38c7dbffff24ffab,
0x40ab8bebeb60eb0b, 0x3fbb2a8484ae8454, 0x6b02b96969d0696f, 0x9ca6e83a3ad23acd,
0x69f44e9d9dd39d9c, 0xc81f7bd7d7acd7f6, 0xd0036bd3d3b8d3d6, 0x3d4ddd7070ad70a7,
0x4f28816767e6671f, 0x9ddd1d40405d403a, 0x992ceeb5b55bb5c1, 0xfe205fdede81debe,
0xd38e695d5d345dd2, 0xa090c03030f0309d, 0x41d07e9191ef91fc, 0x8130feb1b14fb1e1,
0x0d75fd78788578e7, 0x6677441111551188, 0x0607040101050108, 0x6481b3e5e556e57b,
0x0000000000000000, 0x6d05bd6868d56867, 0x77ef5a9898c298b4, 0xe747baa0a01aa069,
0xa46133c5c5f6c566, 0x0c0e0802020a0210, 0xf355a2a6a604a659, 0x2551cd7474b97487,
0xeec3b42d2d992d75, 0x3a312c0b0b270b58, 0xeb49b2a2a210a279, 0x295fc57676b37697,
0x8d3ef6b3b345b3f1, 0xa31dc2bebe7cbe99, 0x9e501fceced1ce3e, 0xa914cebdbd73bd81,
0xc36d82aeae2cae19, 0x4ca583e9e96ae91b, 0x1b91128a8a988a24, 0xa697c43131f53195,
0x4854701c1c6c1ce0, 0x52be97ecec7bec33, 0x1cede3f1f112f1db, 0x71e85e9999c799bc,
0x5fcb6a9494fe94d4, 0xdb7192aaaa38aa39, 0x0ef8fff6f609f6e3, 0xd4f2982626be262d,
0xe2cdbc2f2f932f65, 0x58b79befef74ef2b, 0x4aa287e8e86fe813, 0x0f830a8c8c868c14,
0xbe8bd43535e135b5, 0x0a090c03030f0318, 0xc21677d4d4a3d4ee, 0x1f60e17f7f9e7fdf,
0x20dbcbfbfb30fb8b, 0x1e1b140505110528, 0xbc7d23c1c1e2c146, 0xd987655e5e3b5eca,
0x47d77a9090ea90f4, 0xc0e0802020a0201d, 0x8eb3f43d3dc93df5, 0x2ba9328282b08264,
0x08fffbf7f70cf7eb, 0x46ac8feaea65ea03, 0x3c36280a0a220a50, 0x2e23340d0d390d68,
0x1967e57e7e9b7ed7, 0x2ad2c7f8f83ff893, 0xfdad5d50500d50ba, 0x5c46681a1a721ad0,
0xa26637c4c4f3c46e, 0x12151c07071b0738, 0xefb8415757165782, 0xb70fdab8b862b8a9,
0x88b4f03c3ccc3cfd, 0x5133956262f76237, 0x7093abe3e348e34b, 0x8a4207c8c8cfc80e,
0xcf638aacac26ac09, 0xf1a35552520752aa, 0x45218d6464e96407, 0x6070401010501080,
0xda0a67d0d0b7d0ce, 0xec3543d9d99ad986, 0x6a794c13135f1398, 0x2824300c0c3c0c60,
0x6c7e4812125a1290, 0xf6dfa429298d2955, 0xfbaa5951510851b2, 0xb108deb9b967b9a1,
0x98571bcfcfd4cf36, 0xce187fd6d6a9d6fe, 0x3744d17373a273bf, 0x09840e8d8d838d1c,
0x21a03e8181bf817c, 0xe5b14d545419549a, 0xba7a27c0c0e7c04e, 0x54b993eded7eed3b,
0xb9f7254e4e6b4e4a, 0x85c10d444449441a, 0xf552a6a7a701a751, 0xfcd6a82a2a822a4d,
0x39bc2e8585ab855c, 0xdefb942525b12535, 0x6e88bfe6e659e663, 0x864c0fcacac5ca1e,
0x1569ed7c7c917cc7, 0x1d96168b8b9d8b2c, 0xe9bf45565613568a, 0x27a73a8080ba8074
},
{
0x501fceced1ce3e9e, 0x06d6bbbb6dbbb1bd, 0xab8bebeb60eb0b40, 0xd9729292e092e44b,
0xac8feaea65ea0346, 0x4b0bcbcbc0cb1680, 0x794c13135f13986a, 0x7d23c1c1e2c146bc,
0xa583e9e96ae91b4c, 0xa6e83a3ad23acd9c, 0x187fd6d6a9d6fece, 0x39f2b2b240b2f98b,
0x046fd2d2bdd2ded6, 0xd77a9090ea90f447, 0x655c17174b17b872, 0xd2c7f8f83ff8932a,
0xd315424257422a91, 0x6b5415154115a87e, 0xbf45565613568ae9, 0x2beab4b45eb4c99f,
0x26896565ec650f43, 0x54701c1c6c1ce048, 0x9f1a888892883417, 0xd411434352432297,
0x6133c5c5f6c566a4, 0x896d5c5c315cdad5, 0x82d83636ee36adb4, 0x01d2baba68bab9bb,
0xf1f3f5f506f5fb04, 0xb8415757165782ef, 0x28816767e6671f4f, 0x840e8d8d838d1c09,
0x97c43131f53195a6, 0xf8fff6f609f6e30e, 0x218d6464e9640745, 0x957d58582558facd,
0xfd429e9edc9e8463, 0xf6f7f4f403f4f302, 0xee882222aa220dcc, 0x7192aaaa38aa39db,
0x56c97575bc758f23, 0x2d3c0f0f330f7822, 0x0e0802020a02100c, 0x30feb1b14fb1e181,
0x275bdfdf84dfb6f8, 0x1ea96d6dc46d4f73, 0x44d17373a273bf37, 0xfe294d4d644d52b3,
0x69ed7c7c917cc715, 0xf2982626be262dd4, 0xcab82e2e962e6de4, 0xfffbf7f70cf7eb08,
0x3820080828084030, 0x8e695d5d345dd2d3, 0xc10d444449441a85, 0xbaf83e3ec63eed84,
0xfa469f9fd99f8c65, 0x6c5014144414a078, 0x4207c8c8cfc80e8a, 0x6d82aeae2cae19c3,
0xb14d545419549ae5, 0x7040101050108060, 0x3247d8d89fd88eea, 0x13cabcbc76bc89af,
0x46681a1a721ad05c, 0x0cb16b6bda6b7f67, 0x02b96969d0696f6b, 0xe3ebf3f318f3cb10,
0x14cebdbd73bd81a9, 0x99cc3333ff3385aa, 0x7696abab3dab31dd, 0xdccffafa35fa8326,
0x0d63d1d1b2d1c6dc, 0xe6569b9bcd9bac7d, 0x05bd6868d568676d, 0xf7254e4e6b4e4ab9,
0x625816164e16b074, 0xcc6e9595fb95dc59, 0xd07e9191ef91fc41, 0xb09feeee71ee235e,
0xf92d4c4c614c5ab5, 0x34916363f2633f57, 0x8d028e8e8c8e0403, 0x9c715b5b2a5be2c7,
0x5e17ccccdbcc2e92, 0xb4f03c3ccc3cfd88, 0x4f6419197d19c856, 0x40bea1a11fa161e1,
0xa03e8181bf817c21, 0xe2394949704972ab, 0x7cf17b7b8a7bff07, 0x3543d9d99ad986ec,
0x10a16f6fce6f5f7f, 0x85dc3737eb37a5b2, 0x3d9d6060fd60275d, 0x4c0fcacac5ca1e86,
0x8fbbe7e75ce76b68, 0xd1ac2b2b872b45fa, 0xe53d484875487aad, 0xc9d3fdfd2efdbb34,
0xc5629696f496c453, 0xc60945454c451283, 0xced7fcfc2bfcb332, 0xda1941415841329b,
0x7e4812125a12906c, 0x23340d0d390d682e, 0x72f979798079ef0b, 0x81b3e5e556e57b64,
0x981e898997893c11, 0x830a8c8c868c140f, 0x93abe3e348e34b70, 0xe0802020a0201dc0,
0x90c03030f0309da0, 0x2e57dcdc8bdcaef2, 0x22e6b7b751b7d195, 0x19ad6c6cc16c4775,
0xeb354a4a7f4a6aa1, 0x2ceeb5b55bb5c199, 0xbdfc3f3fc33fe582, 0xc2669797f197cc55,
0x1677d4d4a3d4eec2, 0x33956262f7623751, 0xc3b42d2d992d75ee, 0x121806061e063014,
0x5baaa4a40ea449ff, 0x5caea5a50ba541f9, 0xae368383b5836c2d, 0x80615f5f3e5fc2df,
0xd6a82a2a822a4dfc, 0x3c4fdada95da9ee6, 0x4503c9c9cac9068c, 0x0000000000000000,
0x67e57e7e9b7ed719, 0x49b2a2a210a279eb, 0xb64955551c5592e3, 0x1ac6bfbf79bf91a5,
0x7744111155118866, 0x1173d5d5a6d5e6c4, 0xf34a9c9cd69c946f, 0x571bcfcfd4cf3698,
0x2a380e0e360e7024, 0x36280a0a220a503c, 0xb3f43d3dc93df58e, 0xaa5951510851b2fb,
0x6ee97d7d947dcf13, 0xde769393e593ec4d, 0x416c1b1b771bd85a, 0xc0dffefe21fea33e,
0x6637c4c4f3c46ea2, 0xc80147474647028f, 0x3f2409092d094836, 0xb5228686a4864433,
0x312c0b0b270b583a, 0x8a068f8f898f0c05, 0xf44e9d9dd39d9c69, 0x0bb56a6adf6a7761,
0x151c07071b073812, 0x08deb9b967b9a1b1, 0x37fab0b04ab0e987, 0xef5a9898c298b477,
0x486018187818c050, 0x9ec83232fa328dac, 0x4ad97171a871af3b, 0xec314b4b7a4b62a7,
0xb79befef74ef2b58, 0xa1ec3b3bd73bc59a, 0x4ddd7070ad70a73d, 0x47baa0a01aa069e7,
0x86b7e4e453e47362, 0xdd1d40405d403a9d, 0xc7dbffff24ffab38, 0x732bc3c3e8c356b0,
0x789ea9a937a921d1, 0x88bfe6e659e6636e, 0x75fd78788578e70d, 0xd5c3f9f93af99b2c,
0x96168b8b9d8b2c1d, 0xcf05464643460a89, 0xa73a8080ba807427, 0x5a781e1e661ef044,
0xa8e03838d838dd90, 0x9da3e1e142e15b7c, 0x0fdab8b862b8a9b7, 0x7f9aa8a832a829d7,
0x9aa7e0e047e0537a, 0x24300c0c3c0c6028, 0xe98c2323af2305ca, 0x5fc57676b3769729,
0x53741d1d691de84e, 0xfb942525b12535de, 0xfc902424b4243dd8, 0x1b1405051105281e,
0xede3f1f112f1db1c, 0x17a56e6ecb6e5779, 0xcb6a9494fe94d45f, 0xd8a0282888285df0,
0xe1529a9ac89aa47b, 0xbb2a8484ae84543f, 0xa287e8e86fe8134a, 0x4eb6a3a315a371ed,
0xf0214f4f6e4f42bf, 0x58c17777b6779f2f, 0x036bd3d3b8d3d6d0, 0xbc2e8585ab855c39,
0x94afe2e24de24376, 0xa35552520752aaf1, 0xe4eff2f21df2c316, 0xa9328282b082642b,
0xad5d50500d50bafd, 0x7bf57a7a8f7af701, 0xcdbc2f2f932f65e2, 0x51cd7474b9748725,
0xa45153530253a2f7, 0x3ef6b3b345b3f18d, 0x3a996161f8612f5b, 0x6a86afaf29af11c5,
0xafe43939dd39d596, 0x8bd43535e135b5be, 0x205fdede81debefe, 0x5913cdcddecd2694,
0x5d7c1f1f631ff842, 0xe85e9999c799bc71, 0x638aacac26ac09cf, 0x648eadad23ad01c9,
0x43d57272a772b731, 0xc4b02c2c9c2c7de8, 0x2953dddd8edda6f4, 0x0a67d0d0b7d0ceda,
0xb2268787a1874c35, 0x1dc2bebe7cbe99a3, 0x87655e5e3b5ecad9, 0x55a2a6a604a659f3,
0xbe97ecec7bec3352, 0x1c10040414042018, 0x683fc6c6f9c67eae, 0x090c03030f03180a,
0x8cd03434e434bdb8, 0xdbcbfbfb30fb8b20, 0x3b4bdbdb90db96e0, 0x927959592059f2cb,
0x25e2b6b654b6d993, 0x742fc2c2edc25eb6, 0x0704010105010806, 0xeae7f0f017f0d31a,
0x9b755a5a2f5aeac1, 0xb993eded7eed3b54, 0x52a6a7a701a751f5, 0x2f856666e3661749,
0xe7842121a52115c6, 0x60e17f7f9e7fdf1f, 0x91128a8a988a241b, 0xf59c2727bb2725d2,
0x6f3bc7c7fcc776a8, 0x7a27c0c0e7c04eba, 0xdfa429298d2955f6, 0x1f7bd7d7acd7f6c8
},
{
0x769393e593ec4dde, 0x43d9d99ad986ec35, 0x529a9ac89aa47be1, 0xeeb5b55bb5c1992c,
0x5a9898c298b477ef, 0x882222aa220dccee, 0x0945454c451283c6, 0xd7fcfc2bfcb332ce,
0xd2baba68bab9bb01, 0xb56a6adf6a77610b, 0x5bdfdf84dfb6f827, 0x0802020a02100c0e,
0x469f9fd99f8c65fa, 0x57dcdc8bdcaef22e, 0x5951510851b2fbaa, 0x7959592059f2cb92,
0x354a4a7f4a6aa1eb, 0x5c17174b17b87265, 0xac2b2b872b45fad1, 0x2fc2c2edc25eb674,
0x6a9494fe94d45fcb, 0xf7f4f403f4f302f6, 0xd6bbbb6dbbb1bd06, 0xb6a3a315a371ed4e,
0x956262f762375133, 0xb7e4e453e4736286, 0xd97171a871af3b4a, 0x77d4d4a3d4eec216,
0x13cdcddecd269459, 0xdd7070ad70a73d4d, 0x5816164e16b07462, 0xa3e1e142e15b7c9d,
0x394949704972abe2, 0xf03c3ccc3cfd88b4, 0x27c0c0e7c04eba7a, 0x47d8d89fd88eea32,
0x6d5c5c315cdad589, 0x569b9bcd9bac7de6, 0x8eadad23ad01c964, 0x2e8585ab855c39bc,
0x5153530253a2f7a4, 0xbea1a11fa161e140, 0xf57a7a8f7af7017b, 0x07c8c8cfc80e8a42,
0xb42d2d992d75eec3, 0xa7e0e047e0537a9a, 0x63d1d1b2d1c6dc0d, 0xd57272a772b73143,
0xa2a6a604a659f355, 0xb02c2c9c2c7de8c4, 0x37c4c4f3c46ea266, 0xabe3e348e34b7093,
0xc57676b37697295f, 0xfd78788578e70d75, 0xe6b7b751b7d19522, 0xeab4b45eb4c99f2b,
0x2409092d0948363f, 0xec3b3bd73bc59aa1, 0x380e0e360e70242a, 0x1941415841329bda,
0x2d4c4c614c5ab5f9, 0x5fdede81debefe20, 0xf2b2b240b2f98b39, 0x7a9090ea90f447d7,
0x942525b12535defb, 0xaea5a50ba541f95c, 0x7bd7d7acd7f6c81f, 0x0c03030f03180a09,
0x4411115511886677, 0x0000000000000000, 0x2bc3c3e8c356b073, 0xb82e2e962e6de4ca,
0x729292e092e44bd9, 0x9befef74ef2b58b7, 0x254e4e6b4e4ab9f7, 0x4812125a12906c7e,
0x4e9d9dd39d9c69f4, 0xe97d7d947dcf136e, 0x0bcbcbc0cb16804b, 0xd43535e135b5be8b,
0x4010105010806070, 0x73d5d5a6d5e6c411, 0x214f4f6e4f42bff0, 0x429e9edc9e8463fd,
0x294d4d644d52b3fe, 0x9ea9a937a921d178, 0x4955551c5592e3b6, 0x3fc6c6f9c67eae68,
0x67d0d0b7d0ceda0a, 0xf17b7b8a7bff077c, 0x6018187818c05048, 0x669797f197cc55c2,
0x6bd3d3b8d3d6d003, 0xd83636ee36adb482, 0xbfe6e659e6636e88, 0x3d484875487aade5,
0x45565613568ae9bf, 0x3e8181bf817c21a0, 0x068f8f898f0c058a, 0xc17777b6779f2f58,
0x17ccccdbcc2e925e, 0x4a9c9cd69c946ff3, 0xdeb9b967b9a1b108, 0xafe2e24de2437694,
0x8aacac26ac09cf63, 0xdab8b862b8a9b70f, 0xbc2f2f932f65e2cd, 0x5415154115a87e6b,
0xaaa4a40ea449ff5b, 0xed7c7c917cc71569, 0x4fdada95da9ee63c, 0xe03838d838dd90a8,
0x781e1e661ef0445a, 0x2c0b0b270b583a31, 0x1405051105281e1b, 0x7fd6d6a9d6fece18,
0x5014144414a0786c, 0xa56e6ecb6e577917, 0xad6c6cc16c477519, 0xe57e7e9b7ed71967,
0x856666e36617492f, 0xd3fdfd2efdbb34c9, 0xfeb1b14fb1e18130, 0xb3e5e556e57b6481,
0x9d6060fd60275d3d, 0x86afaf29af11c56a, 0x655e5e3b5ecad987, 0xcc3333ff3385aa99,
0x268787a1874c35b2, 0x03c9c9cac9068c45, 0xe7f0f017f0d31aea, 0x695d5d345dd2d38e,
0xa96d6dc46d4f731e, 0xfc3f3fc33fe582bd, 0x1a8888928834179f, 0x0e8d8d838d1c0984,
0x3bc7c7fcc776a86f, 0xfbf7f70cf7eb08ff, 0x741d1d691de84e53, 0x83e9e96ae91b4ca5,
0x97ecec7bec3352be, 0x93eded7eed3b54b9, 0x3a8080ba807427a7, 0xa429298d2955f6df,
0x9c2727bb2725d2f5, 0x1bcfcfd4cf369857, 0x5e9999c799bc71e8, 0x9aa8a832a829d77f,
0x5d50500d50bafdad, 0x3c0f0f330f78222d, 0xdc3737eb37a5b285, 0x902424b4243dd8fc,
0xa0282888285df0d8, 0xc03030f0309da090, 0x6e9595fb95dc59cc, 0x6fd2d2bdd2ded604,
0xf83e3ec63eed84ba, 0x715b5b2a5be2c79c, 0x1d40405d403a9ddd, 0x368383b5836c2dae,
0xf6b3b345b3f18d3e, 0xb96969d0696f6b02, 0x415757165782efb8, 0x7c1f1f631ff8425d,
0x1c07071b07381215, 0x701c1c6c1ce04854, 0x128a8a988a241b91, 0xcabcbc76bc89af13,
0x802020a0201dc0e0, 0x8bebeb60eb0b40ab, 0x1fceced1ce3e9e50, 0x028e8e8c8e04038d,
0x96abab3dab31dd76, 0x9feeee71ee235eb0, 0xc43131f53195a697, 0xb2a2a210a279eb49,
0xd17373a273bf3744, 0xc3f9f93af99b2cd5, 0x0fcacac5ca1e864c, 0xe83a3ad23acd9ca6,
0x681a1a721ad05c46, 0xcbfbfb30fb8b20db, 0x340d0d390d682e23, 0x23c1c1e2c146bc7d,
0xdffefe21fea33ec0, 0xcffafa35fa8326dc, 0xeff2f21df2c316e4, 0xa16f6fce6f5f7f10,
0xcebdbd73bd81a914, 0x629696f496c453c5, 0x53dddd8edda6f429, 0x11434352432297d4,
0x5552520752aaf1a3, 0xe2b6b654b6d99325, 0x2008082808403038, 0xebf3f318f3cb10e3,
0x82aeae2cae19c36d, 0xc2bebe7cbe99a31d, 0x6419197d19c8564f, 0x1e898997893c1198,
0xc83232fa328dac9e, 0x982626be262dd4f2, 0xfab0b04ab0e98737, 0x8feaea65ea0346ac,
0x314b4b7a4b62a7ec, 0x8d6464e964074521, 0x2a8484ae84543fbb, 0x328282b082642ba9,
0xb16b6bda6b7f670c, 0xf3f5f506f5fb04f1, 0xf979798079ef0b72, 0xc6bfbf79bf91a51a,
0x0401010501080607, 0x615f5f3e5fc2df80, 0xc97575bc758f2356, 0x916363f2633f5734,
0x6c1b1b771bd85a41, 0x8c2323af2305cae9, 0xf43d3dc93df58eb3, 0xbd6868d568676d05,
0xa82a2a822a4dfcd6, 0x896565ec650f4326, 0x87e8e86fe8134aa2, 0x7e9191ef91fc41d0,
0xfff6f609f6e30ef8, 0xdbffff24ffab38c7, 0x4c13135f13986a79, 0x7d58582558facd95,
0xe3f1f112f1db1ced, 0x0147474647028fc8, 0x280a0a220a503c36, 0xe17f7f9e7fdf1f60,
0x33c5c5f6c566a461, 0xa6a7a701a751f552, 0xbbe7e75ce76b688f, 0x996161f8612f5b3a,
0x755a5a2f5aeac19b, 0x1806061e06301412, 0x05464643460a89cf, 0x0d444449441a85c1,
0x15424257422a91d3, 0x100404140420181c, 0xbaa0a01aa069e747, 0x4bdbdb90db96e03b,
0xe43939dd39d596af, 0x228686a4864433b5, 0x4d545419549ae5b1, 0x92aaaa38aa39db71,
0x0a8c8c868c140f83, 0xd03434e434bdb88c, 0x842121a52115c6e7, 0x168b8b9d8b2c1d96,
0xc7f8f83ff8932ad2, 0x300c0c3c0c602824, 0xcd7474b974872551, 0x816767e6671f4f28
},
{
0x6868d568676d05bd, 0x8d8d838d1c09840e, 0xcacac5ca1e864c0f, 0x4d4d644d52b3fe29,
0x7373a273bf3744d1, 0x4b4b7a4b62a7ec31, 0x4e4e6b4e4ab9f725, 0x2a2a822a4dfcd6a8,
0xd4d4a3d4eec21677, 0x52520752aaf1a355, 0x2626be262dd4f298, 0xb3b345b3f18d3ef6,
0x545419549ae5b14d, 0x1e1e661ef0445a78, 0x19197d19c8564f64, 0x1f1f631ff8425d7c,
0x2222aa220dccee88, 0x03030f03180a090c, 0x464643460a89cf05, 0x3d3dc93df58eb3f4,
0x2d2d992d75eec3b4, 0x4a4a7f4a6aa1eb35, 0x53530253a2f7a451, 0x8383b5836c2dae36,
0x13135f13986a794c, 0x8a8a988a241b9112, 0xb7b751b7d19522e6, 0xd5d5a6d5e6c41173,
0x2525b12535defb94, 0x79798079ef0b72f9, 0xf5f506f5fb04f1f3, 0xbdbd73bd81a914ce,
0x58582558facd957d, 0x2f2f932f65e2cdbc, 0x0d0d390d682e2334, 0x02020a02100c0e08,
0xeded7eed3b54b993, 0x51510851b2fbaa59, 0x9e9edc9e8463fd42, 0x1111551188667744,
0xf2f21df2c316e4ef, 0x3e3ec63eed84baf8, 0x55551c5592e3b649, 0x5e5e3b5ecad98765,
0xd1d1b2d1c6dc0d63, 0x16164e16b0746258, 0x3c3ccc3cfd88b4f0, 0x6666e36617492f85,
0x7070ad70a73d4ddd, 0x5d5d345dd2d38e69, 0xf3f318f3cb10e3eb, 0x45454c451283c609,
0x40405d403a9ddd1d, 0xccccdbcc2e925e17, 0xe8e86fe8134aa287, 0x9494fe94d45fcb6a,
0x565613568ae9bf45, 0x0808280840303820, 0xceced1ce3e9e501f, 0x1a1a721ad05c4668,
0x3a3ad23acd9ca6e8, 0xd2d2bdd2ded6046f, 0xe1e142e15b7c9da3, 0xdfdf84dfb6f8275b,
0xb5b55bb5c1992cee, 0x3838d838dd90a8e0, 0x6e6ecb6e577917a5, 0x0e0e360e70242a38,
0xe5e556e57b6481b3, 0xf4f403f4f302f6f7, 0xf9f93af99b2cd5c3, 0x8686a4864433b522,
0xe9e96ae91b4ca583, 0x4f4f6e4f42bff021, 0xd6d6a9d6fece187f, 0x8585ab855c39bc2e,
0x2323af2305cae98c, 0xcfcfd4cf3698571b, 0x3232fa328dac9ec8, 0x9999c799bc71e85e,
0x3131f53195a697c4, 0x14144414a0786c50, 0xaeae2cae19c36d82, 0xeeee71ee235eb09f,
0xc8c8cfc80e8a4207, 0x484875487aade53d, 0xd3d3b8d3d6d0036b, 0x3030f0309da090c0,
0xa1a11fa161e140be, 0x9292e092e44bd972, 0x41415841329bda19, 0xb1b14fb1e18130fe,
0x18187818c0504860, 0xc4c4f3c46ea26637, 0x2c2c9c2c7de8c4b0, 0x7171a871af3b4ad9,
0x7272a772b73143d5, 0x444449441a85c10d, 0x15154115a87e6b54, 0xfdfd2efdbb34c9d3,
0x3737eb37a5b285dc, 0xbebe7cbe99a31dc2, 0x5f5f3e5fc2df8061, 0xaaaa38aa39db7192,
0x9b9bcd9bac7de656, 0x8888928834179f1a, 0xd8d89fd88eea3247, 0xabab3dab31dd7696,
0x898997893c11981e, 0x9c9cd69c946ff34a, 0xfafa35fa8326dccf, 0x6060fd60275d3d9d,
0xeaea65ea0346ac8f, 0xbcbc76bc89af13ca, 0x6262f76237513395, 0x0c0c3c0c60282430,
0x2424b4243dd8fc90, 0xa6a604a659f355a2, 0xa8a832a829d77f9a, 0xecec7bec3352be97,
0x6767e6671f4f2881, 0x2020a0201dc0e080, 0xdbdb90db96e03b4b, 0x7c7c917cc71569ed,
0x282888285df0d8a0, 0xdddd8edda6f42953, 0xacac26ac09cf638a, 0x5b5b2a5be2c79c71,
0x3434e434bdb88cd0, 0x7e7e9b7ed71967e5, 0x1010501080607040, 0xf1f112f1db1cede3,
0x7b7b8a7bff077cf1, 0x8f8f898f0c058a06, 0x6363f2633f573491, 0xa0a01aa069e747ba,
0x05051105281e1b14, 0x9a9ac89aa47be152, 0x434352432297d411, 0x7777b6779f2f58c1,
0x2121a52115c6e784, 0xbfbf79bf91a51ac6, 0x2727bb2725d2f59c, 0x09092d0948363f24,
0xc3c3e8c356b0732b, 0x9f9fd99f8c65fa46, 0xb6b654b6d99325e2, 0xd7d7acd7f6c81f7b,
0x29298d2955f6dfa4, 0xc2c2edc25eb6742f, 0xebeb60eb0b40ab8b, 0xc0c0e7c04eba7a27,
0xa4a40ea449ff5baa, 0x8b8b9d8b2c1d9616, 0x8c8c868c140f830a, 0x1d1d691de84e5374,
0xfbfb30fb8b20dbcb, 0xffff24ffab38c7db, 0xc1c1e2c146bc7d23, 0xb2b240b2f98b39f2,
0x9797f197cc55c266, 0x2e2e962e6de4cab8, 0xf8f83ff8932ad2c7, 0x6565ec650f432689,
0xf6f609f6e30ef8ff, 0x7575bc758f2356c9, 0x07071b073812151c, 0x0404140420181c10,
0x4949704972abe239, 0x3333ff3385aa99cc, 0xe4e453e4736286b7, 0xd9d99ad986ec3543,
0xb9b967b9a1b108de, 0xd0d0b7d0ceda0a67, 0x424257422a91d315, 0xc7c7fcc776a86f3b,
0x6c6cc16c477519ad, 0x9090ea90f447d77a, 0x0000000000000000, 0x8e8e8c8e04038d02,
0x6f6fce6f5f7f10a1, 0x50500d50bafdad5d, 0x0101050108060704, 0xc5c5f6c566a46133,
0xdada95da9ee63c4f, 0x47474647028fc801, 0x3f3fc33fe582bdfc, 0xcdcddecd26945913,
0x6969d0696f6b02b9, 0xa2a210a279eb49b2, 0xe2e24de2437694af, 0x7a7a8f7af7017bf5,
0xa7a701a751f552a6, 0xc6c6f9c67eae683f, 0x9393e593ec4dde76, 0x0f0f330f78222d3c,
0x0a0a220a503c3628, 0x06061e0630141218, 0xe6e659e6636e88bf, 0x2b2b872b45fad1ac,
0x9696f496c453c562, 0xa3a315a371ed4eb6, 0x1c1c6c1ce0485470, 0xafaf29af11c56a86,
0x6a6adf6a77610bb5, 0x12125a12906c7e48, 0x8484ae84543fbb2a, 0x3939dd39d596afe4,
0xe7e75ce76b688fbb, 0xb0b04ab0e98737fa, 0x8282b082642ba932, 0xf7f70cf7eb08fffb,
0xfefe21fea33ec0df, 0x9d9dd39d9c69f44e, 0x8787a1874c35b226, 0x5c5c315cdad5896d,
0x8181bf817c21a03e, 0x3535e135b5be8bd4, 0xdede81debefe205f, 0xb4b45eb4c99f2bea,
0xa5a50ba541f95cae, 0xfcfc2bfcb332ced7, 0x8080ba807427a73a, 0xefef74ef2b58b79b,
0xcbcbc0cb16804b0b, 0xbbbb6dbbb1bd06d6, 0x6b6bda6b7f670cb1, 0x7676b37697295fc5,
0xbaba68bab9bb01d2, 0x5a5a2f5aeac19b75, 0x7d7d947dcf136ee9, 0x78788578e70d75fd,
0x0b0b270b583a312c, 0x9595fb95dc59cc6e, 0xe3e348e34b7093ab, 0xadad23ad01c9648e,
0x7474b974872551cd, 0x9898c298b477ef5a, 0x3b3bd73bc59aa1ec, 0x3636ee36adb482d8,
0x6464e9640745218d, 0x6d6dc46d4f731ea9, 0xdcdc8bdcaef22e57, 0xf0f017f0d31aeae7,
0x59592059f2cb9279, 0xa9a937a921d1789e, 0x4c4c614c5ab5f92d, 0x17174b17b872655c,
0x7f7f9e7fdf1f60e1, 0x9191ef91fc41d07e, 0xb8b862b8a9b70fda, 0xc9c9cac9068c4503,
0x5757165782efb841, 0x1b1b771bd85a416c, 0xe0e047e0537a9aa7, 0x6161f8612f5b3a99
}
};
static inline void G(uint64_t* x, uint64_t* y)
{
y[0] = KUPYNA_T[0][(unsigned char)x[0]] ^ KUPYNA_T[1][(unsigned char)(x[7] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[6] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[5] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[4] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[3] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[2] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[1] >> 56)];
y[1] = KUPYNA_T[0][(unsigned char)x[1]] ^ KUPYNA_T[1][(unsigned char)(x[0] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[7] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[6] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[5] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[4] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[3] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[2] >> 56)];
y[2] = KUPYNA_T[0][(unsigned char)x[2]] ^ KUPYNA_T[1][(unsigned char)(x[1] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[0] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[7] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[6] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[5] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[4] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[3] >> 56)];
y[3] = KUPYNA_T[0][(unsigned char)x[3]] ^ KUPYNA_T[1][(unsigned char)(x[2] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[1] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[0] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[7] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[6] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[5] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[4] >> 56)];
y[4] = KUPYNA_T[0][(unsigned char)x[4]] ^ KUPYNA_T[1][(unsigned char)(x[3] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[2] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[1] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[0] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[7] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[6] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[5] >> 56)];
y[5] = KUPYNA_T[0][(unsigned char)x[5]] ^ KUPYNA_T[1][(unsigned char)(x[4] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[3] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[2] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[1] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[0] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[7] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[6] >> 56)];
y[6] = KUPYNA_T[0][(unsigned char)x[6]] ^ KUPYNA_T[1][(unsigned char)(x[5] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[4] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[3] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[2] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[1] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[0] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[7] >> 56)];
y[7] = KUPYNA_T[0][(unsigned char)x[7]] ^ KUPYNA_T[1][(unsigned char)(x[6] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[5] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[4] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[3] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[2] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[1] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[0] >> 56)];
}
static inline void roundP_256(uint64_t* x, uint64_t* y, uint64_t i)
{
for (int idx = 0; idx < 8; idx++)
x[idx] ^= ((uint64_t)idx << 4) ^ i;
#ifdef CPPCRYPTO_DEBUG
dump_state("in roundP after xor with x: ", x);
#endif
G(x, y);
}
static inline void roundQ_256(uint64_t* x, uint64_t* y, uint64_t i)
{
#ifdef CPPCRYPTO_DEBUG
dump_state("in roundQ before xor with x: ", x);
#endif
for (int j = 0; j < 8; ++j)
x[j] += (0x00F0F0F0F0F0F0F3ULL ^ (((uint64_t)(((7 - j) * 0x10) ^ (unsigned char)i)) << (7 * 8)));
#ifdef CPPCRYPTO_DEBUG
dump_state("in roundQ after xor with x: ", x);
#endif
G(x, y);
}
static inline void outputTransform256(uint64_t* h)
{
uint64_t t1[8];
uint64_t t2[8];
for (int column = 0; column < 8; column++) {
t1[column] = h[column];
}
for (uint64_t r = 0; r < 10; r += 2)
{
roundP_256(t1, t2, r);
roundP_256(t2, t1, r + 1);
}
for (int column = 0; column < 8; column++) {
h[column] ^= t1[column];
}
}
static inline void transform256(uint64_t* h, uint64_t* m)
{
uint64_t AQ1[8], AQ2[8], AP1[8], AP2[8];
for (int column = 0; column < 8; column++)
{
AP1[column] = h[column] ^ m[column];
AQ1[column] = m[column];
}
#ifdef CPPCRYPTO_DEBUG
dump_state("before P: ", (uint64_t*)AP1);
#endif
#ifdef CPPCRYPTO_DEBUG
dump_state("before Q: ", (uint64_t*)AQ1);
#endif
for (uint64_t r = 0; r < 10; r += 2)
{
roundP_256(AP1, AP2, r);
#ifdef CPPCRYPTO_DEBUG
dump_state("P after round r: ", (uint64_t*)AP2);
#endif
roundP_256(AP2, AP1, r + 1);
#ifdef CPPCRYPTO_DEBUG
dump_state("P after round r+1: ", (uint64_t*)AP1);
#endif
roundQ_256(AQ1, AQ2, r);
#ifdef CPPCRYPTO_DEBUG
dump_state("Q after round r: ", (uint64_t*)AQ2);
#endif
roundQ_256(AQ2, AQ1, r + 1);
#ifdef CPPCRYPTO_DEBUG
dump_state("Q after round r+1: ", (uint64_t*)AQ1);
#endif
}
for (int column = 0; column < 8; column++)
{
h[column] = AP1[column] ^ AQ1[column] ^ h[column];
}
#ifdef CPPCRYPTO_DEBUG
dump_state("transform", h);
#endif
}
static inline void G_512(uint64_t* x, uint64_t* y)
{
y[0] = KUPYNA_T[0][(unsigned char)x[0]] ^ KUPYNA_T[1][(unsigned char)(x[15] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[14] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[13] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[12] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[11] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[10] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[5] >> 56)];
y[1] = KUPYNA_T[0][(unsigned char)x[1]] ^ KUPYNA_T[1][(unsigned char)(x[0] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[15] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[14] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[13] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[12] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[11] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[6] >> 56)];
y[2] = KUPYNA_T[0][(unsigned char)x[2]] ^ KUPYNA_T[1][(unsigned char)(x[1] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[0] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[15] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[14] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[13] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[12] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[7] >> 56)];
y[3] = KUPYNA_T[0][(unsigned char)x[3]] ^ KUPYNA_T[1][(unsigned char)(x[2] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[1] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[0] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[15] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[14] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[13] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[8] >> 56)];
y[4] = KUPYNA_T[0][(unsigned char)x[4]] ^ KUPYNA_T[1][(unsigned char)(x[3] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[2] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[1] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[0] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[15] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[14] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[9] >> 56)];
y[5] = KUPYNA_T[0][(unsigned char)x[5]] ^ KUPYNA_T[1][(unsigned char)(x[4] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[3] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[2] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[1] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[0] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[15] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[10] >> 56)];
y[6] = KUPYNA_T[0][(unsigned char)x[6]] ^ KUPYNA_T[1][(unsigned char)(x[5] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[4] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[3] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[2] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[1] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[0] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[11] >> 56)];
y[7] = KUPYNA_T[0][(unsigned char)x[7]] ^ KUPYNA_T[1][(unsigned char)(x[6] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[5] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[4] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[3] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[2] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[1] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[12] >> 56)];
y[8] = KUPYNA_T[0][(unsigned char)x[8]] ^ KUPYNA_T[1][(unsigned char)(x[7] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[6] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[5] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[4] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[3] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[2] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[13] >> 56)];
y[9] = KUPYNA_T[0][(unsigned char)x[9]] ^ KUPYNA_T[1][(unsigned char)(x[8] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[7] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[6] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[5] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[4] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[3] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[14] >> 56)];
y[10] = KUPYNA_T[0][(unsigned char)x[10]] ^ KUPYNA_T[1][(unsigned char)(x[9] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[8] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[7] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[6] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[5] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[4] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[15] >> 56)];
y[11] = KUPYNA_T[0][(unsigned char)x[11]] ^ KUPYNA_T[1][(unsigned char)(x[10] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[9] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[8] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[7] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[6] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[5] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[0] >> 56)];
y[12] = KUPYNA_T[0][(unsigned char)x[12]] ^ KUPYNA_T[1][(unsigned char)(x[11] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[10] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[9] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[8] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[7] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[6] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[1] >> 56)];
y[13] = KUPYNA_T[0][(unsigned char)x[13]] ^ KUPYNA_T[1][(unsigned char)(x[12] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[11] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[10] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[9] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[8] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[7] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[2] >> 56)];
y[14] = KUPYNA_T[0][(unsigned char)x[14]] ^ KUPYNA_T[1][(unsigned char)(x[13] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[12] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[11] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[10] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[9] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[8] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[3] >> 56)];
y[15] = KUPYNA_T[0][(unsigned char)x[15]] ^ KUPYNA_T[1][(unsigned char)(x[14] >> 8)] ^ KUPYNA_T[2][(unsigned char)(x[13] >> 16)] ^ KUPYNA_T[3][(unsigned char)(x[12] >> 24)] ^
KUPYNA_T[4][(unsigned char)(x[11] >> 32)] ^ KUPYNA_T[5][(unsigned char)(x[10] >> 40)] ^ KUPYNA_T[6][(unsigned char)(x[9] >> 48)] ^ KUPYNA_T[7][(unsigned char)(x[4] >> 56)];
}
static inline void roundP_512(uint64_t* x, uint64_t* y, uint64_t i)
{
for (int idx = 0; idx < 16; idx++)
x[idx] ^= ((uint64_t)idx << 4) ^ i;
#ifdef CPPCRYPTO_DEBUG
dump_state("in roundP after xor with x: ", x);
#endif
G_512(x, y);
}
static inline void roundQ_512(uint64_t* x, uint64_t* y, uint64_t i)
{
#ifdef CPPCRYPTO_DEBUG
dump_state("in roundQ before xor with x: ", x);
#endif
for (int j = 0; j < 16; ++j)
x[j] += (0x00F0F0F0F0F0F0F3ULL ^ (((uint64_t)(((15 - j) * 0x10) ^ (unsigned char)i)) << 56));
#ifdef CPPCRYPTO_DEBUG
dump_state("in roundQ after xor with x: ", x);
#endif
G_512(x, y);
}
static inline void outputTransform512(uint64_t* h)
{
uint64_t t1[16];
uint64_t t2[16];
for (int column = 0; column < 16; column++) {
t1[column] = h[column];
}
for (uint64_t r = 0; r < 14; r += 2)
{
roundP_512(t1, t2, r);
roundP_512(t2, t1, r + 1);
}
for (int column = 0; column < 16; column++) {
h[column] ^= t1[column];
}
}
static inline void transform512(uint64_t* h, uint64_t* m)
{
uint64_t AQ1[16], AQ2[16], AP1[16], AP2[16];
for (int column = 0; column < 16; column++)
{
AP1[column] = h[column] ^ m[column];
AQ1[column] = m[column];
}
#ifdef CPPCRYPTO_DEBUG
dump_state("before P: ", (uint64_t*)AP1);
#endif
#ifdef CPPCRYPTO_DEBUG
dump_state("before Q: ", (uint64_t*)AQ1);
#endif
for (uint64_t r = 0; r < 14; r += 2)
{
roundP_512(AP1, AP2, r);
#ifdef CPPCRYPTO_DEBUG
dump_state("P after round r: ", (uint64_t*)AP2);
#endif
roundP_512(AP2, AP1, r + 1);
#ifdef CPPCRYPTO_DEBUG
dump_state("P after round r+1: ", (uint64_t*)AP1);
#endif
roundQ_512(AQ1, AQ2, r);
#ifdef CPPCRYPTO_DEBUG
dump_state("Q after round r: ", (uint64_t*)AQ2);
#endif
roundQ_512(AQ2, AQ1, r + 1);
#ifdef CPPCRYPTO_DEBUG
dump_state("Q after round r+1: ", (uint64_t*)AQ1);
#endif
}
for (int column = 0; column < 16; column++)
{
h[column] = AP1[column] ^ AQ1[column] ^ h[column];
}
#ifdef CPPCRYPTO_DEBUG
dump_state("transform", h);
#endif
}
void kupyna::update(const unsigned char* data, size_t len)
{
size_t b = blocksize() / 8;
while (pos + len >= b)
{
memcpy(m + pos, data, b - pos);
if (hs > 256)
transform512(h, (uint64_t*)m.get());
else
transform256(h, (uint64_t*)m.get());
len -= b - pos;
total += (b - pos) * 8;
data += b - pos;
pos = 0;
}
memcpy(m+pos, data, len);
pos += len;
total += len * 8;
}
void kupyna::final(unsigned char* hash)
{
size_t b = blocksize() / 8;
#ifdef CPPCRYPTO_DEBUG
dump_state("pre-final", h);
#endif
m[pos++] = 0x80;
if (pos > b - 12)
{
memset(m + pos, 0, b - pos);
#ifdef CPPCRYPTO_DEBUG
dump_state("padded message (1)", (uint64_t*)m);
#endif
if (b == 64)
transform256(h, (uint64_t*)m.get());
else
transform512(h, (uint64_t*)m.get());
pos = 0;
}
memset(m + pos, 0, b - 12 - pos);
memcpy(m + b - 12, &total, sizeof(uint64_t));
memset(m + b - 4, 0, 4);
#ifdef CPPCRYPTO_DEBUG
dump_state("padded message (2)", (uint64_t*)m);
#endif
if (b == 64)
{
transform256(h, (uint64_t*)m.get());
outputTransform256(h);
}
else
{
transform512(h, (uint64_t*)m.get());
outputTransform512(h);
}
memcpy(hash, (unsigned char*)h.get() + b - hashsize() / 8, hashsize() / 8);
#ifdef CPPCRYPTO_DEBUG
dump_state("post-final", h);
#endif
}
void kupyna::init()
{
pos = 0;
total = 0;
memset(h, 0, sizeof(uint64_t) * 16);
h[0] = blocksize() / 8; // state in bytes
#ifdef CPPCRYPTO_DEBUG
dump_state("init", h);
#endif
};
kupyna::kupyna(size_t hashsize)
: hs(hashsize)
{
validate_hash_size(hashsize, {256, 512});
}
kupyna::~kupyna()
{
clear();
}
void kupyna::clear()
{
zero_memory(h.get(), h.bytes());
zero_memory(m.get(), m.bytes());
}
}
| 63.706992 | 176 | 0.795226 | [
"transform"
] |
47cc9c1b434e2eaaa730fa8c620ae782cbd438c5 | 15,314 | cpp | C++ | c/lib/miscl/AsyncQ.cpp | knowm/nSpace | 1e5380a8778e013f7e8c44c130ba32e9668755ed | [
"BSD-3-Clause"
] | 2 | 2020-05-06T21:45:13.000Z | 2020-06-14T11:48:03.000Z | c/lib/miscl/AsyncQ.cpp | knowm/nSpace | 1e5380a8778e013f7e8c44c130ba32e9668755ed | [
"BSD-3-Clause"
] | null | null | null | c/lib/miscl/AsyncQ.cpp | knowm/nSpace | 1e5380a8778e013f7e8c44c130ba32e9668755ed | [
"BSD-3-Clause"
] | 3 | 2017-09-18T14:46:03.000Z | 2021-09-26T17:10:36.000Z | ////////////////////////////////////////////////////////////////////////
//
// ASYNCQ.CPP
//
// Implementation of the asynchronous queue node
//
////////////////////////////////////////////////////////////////////////
#include "miscl_.h"
#include <stdio.h>
AsyncQ :: AsyncQ ( void )
{
////////////////////////////////////////////////////////////////////////
//
// PURPOSE
// - Constructor for the CD Player node
//
////////////////////////////////////////////////////////////////////////
pThrd = NULL;
bRun = false;
pQw = NULL;
pQwIt = NULL;
pQs = NULL;
pQvs = NULL;
iMaxSz = 0;
bBlock = false;
uIn = 0;
uOut = 0;
// Default Id in case node is being used in single queue mode
adtValue::copy ( adtInt(0), vQId );
} // AsyncQ
void AsyncQ :: destruct ( void )
{
////////////////////////////////////////////////////////////////////////
//
// OVERLOAD
// FROM CCLObject
//
// PURPOSE
// - Called when the object is being destroyed
//
////////////////////////////////////////////////////////////////////////
onAttach(false);
} // destruct
HRESULT AsyncQ :: getQ ( const adtValue &vId, IList **ppQ )
{
////////////////////////////////////////////////////////////////////////
//
// PURPOSE
// - Retrieve/create a queue with the specified Id.
//
// PARAMETERS
// - pr is the receptor
// - v is the value
//
// RETURN VALUE
// S_OK if successful
//
////////////////////////////////////////////////////////////////////////
HRESULT hr = S_OK;
// Access queue
if (hr == S_OK && pQs->load ( vId, vQ ) != S_OK)
{
// First time accessing queue
CCLTRY ( COCREATE ( L"Adt.Queue", IID_IList, ppQ ) );
CCLTRY ( pQs->store ( vId, (unkV=(*ppQ)) ) );
} // if
else
hr = _QISAFE((unkV = vQ),IID_IList,ppQ);
return hr;
} // getQ
HRESULT AsyncQ :: onAttach ( bool bAttach )
{
////////////////////////////////////////////////////////////////////////
//
//! \brief Called when a behaviour is attached/detached to a location.
//! \param bAttach is true on attachment, false on detachment
//! \return S_OK if successful
//
////////////////////////////////////////////////////////////////////////
HRESULT hr = S_OK;
// Attach
if (bAttach)
{
adtValue v;
// Create work queue
CCLTRY ( COCREATE ( L"Adt.Queue", IID_IList, &pQw ) );
CCLTRY ( pQw->iterate ( &pQwIt ) );
// Create dictionary for queues and queue values
CCLTRY ( COCREATE ( L"Adt.Dictionary", IID_IDictionary, &pQs ) );
CCLTRY ( COCREATE ( L"Adt.Dictionary", IID_IDictionary, &pQvs ) );
// Resources
CCLTRYE ( evWork.init() == true, GetLastError() );
// Default states
if (pnDesc->load ( adtString(L"Size"), v ) == S_OK)
iMaxSz = v;
if ( pnDesc->load ( adtString(L"Block"),v ) == S_OK)
bBlock = v;
} // if
// Detach
else if (!bAttach)
{
// Shutdown thread
if (pThrd != NULL)
{
pThrd->threadStop(10000);
pThrd->Release();
pThrd = NULL;
} // if
// Clean up
_RELEASE(pQw);
_RELEASE(pQwIt);
_RELEASE(pQs);
_RELEASE(pQvs);
} // else if
return hr;
} // onAttach
HRESULT AsyncQ :: onReceive ( IReceptor *pr, const ADTVALUE &v )
{
////////////////////////////////////////////////////////////////////////
//
//! \brief A location has received a value on the specified receptor.
//! \param pr is a ptr. to the receptor that received the value
//! \param v is the received value
//! \return S_OK if successful
//
////////////////////////////////////////////////////////////////////////
HRESULT hr = S_OK;
// Start
if (_RCP(Start))
{
// Already started ?
CCLTRYE ( bRun == false && pThrd == NULL, E_UNEXPECTED );
// Start timed emissions
CCLTRY(COCREATE(L"Sys.Thread", IID_IThread, &pThrd ));
CCLOK (bRun = true;)
CCLTRY(pThrd->threadStart ( this, 5000 ));
// dbgprintf ( L"AsyncQ::receive:Start:0x%x\r\n", hr );
} // else if
// Stop
else if (_RCP(Stop))
{
// Shutdown thread
if (pThrd != NULL)
{
// Make a copy so pThrd can be NULL. This stops pontentially
// mulitple 'receiveStop' messages from entering at once
IThread *pTmp = pThrd;
pThrd = NULL;
// Timeout is tricky since output may be busy
// pTmp->threadStop(10000);
pTmp->threadStop(0);
pTmp->Release();
} // if
} // else if
// Queue value
else if (_RCP(Fire))
{
// dbgprintf ( L"Misc:::AsyncQ::receive:Fire {\r\n" );
// Attempt to queue value
if (hr == S_OK && csWork.enter())
{
IList *pQ = NULL;
U32 sz;
// Access queue with current Id
CCLTRY ( getQ ( vQId, &pQ ) );
// Add to queue if there is room
if (iMaxSz == 0 || (pQ->size ( &sz ) == S_OK && sz < iMaxSz))
{
// Add value to queue
// dbgprintf ( L"AsyncQ::receive:Size %d\r\n", sz );
CCLTRY ( pQ->write ( v ) );
CCLOK ( uIn++; )
// If there is no active value, signal thread to emit it.
if (hr == S_OK && pQvs->load ( vQId, vQ ) != S_OK)
{
// Set active value
CCLTRY ( pQvs->store ( vQId, v ) );
// Queue work
CCLTRY ( pQw->write ( vQId ) );
CCLOK ( evWork.signal(); )
} // if
} // if
// TODO: Implement blocking option ?
else
dbgprintf ( L"AsyncQ::receive:WARNING Queue full\r\n" );
// Clean up
_RELEASE(pQ);
csWork.leave();
} // if
// dbgprintf ( L"} Misc:::AsyncQ::receive:Fire\r\n" );
} // else if
// Next
else if (_RCP(Next))
{
// Proceed to the next value in the queue (if present)
if (hr == S_OK && csWork.enter())
{
IList *pQ = NULL;
IIt *pQIt = NULL;
U32 sz;
// Access queue with current Id
CCLTRY ( getQ ( vQId, &pQ ) );
// Current value is no longer valid
CCLOK ( pQvs->remove ( vQId ); )
// Is there another value available ?
if ( pQ->size ( &sz ) == S_OK &&
sz > 0 &&
pQ->iterate ( &pQIt ) == S_OK &&
pQIt->next() == S_OK &&
pQIt->read ( vQ ) == S_OK)
{
// Set active value
CCLTRY ( pQvs->store ( vQId, vQ ) );
// Queue work
CCLTRY ( pQw->write ( vQId ) );
CCLOK ( evWork.signal(); )
} // if
// Clean up
_RELEASE(pQIt);
_RELEASE(pQ);
csWork.leave();
} // if
} // else if
// Retry
else if (_RCP(Retry))
{
// Re-emit the current value
if (hr == S_OK && csWork.enter())
{
// Signal only if there is a valid value
if (pQvs->load ( vQId, vQ ) == S_OK)
{
// Queue work
CCLTRY ( pQw->write ( vQId ) );
CCLOK ( evWork.signal(); )
} // if
// Clean up
csWork.leave();
} // if
} // else if
// State
else if (_RCP(Id))
{
// Set new Id
if (csWork.enter())
{
adtValue::copy ( v, vQId );
csWork.leave();
} // if
} // else if
else
hr = ERROR_NO_MATCH;
return hr;
} // receive
HRESULT AsyncQ :: tick ( void )
{
////////////////////////////////////////////////////////////////////////
//
//! \brief Perform one 'tick's worth of work.
//! \return S_OK if ticking should continue
//
////////////////////////////////////////////////////////////////////////
HRESULT hr = S_OK;
bool bEmit;
// dbgprintf ( L"AsyncQ::tick {\r\n" );
// Keep running ?
CCLTRYE ( bRun == true, S_FALSE );
// Process queued work
while (hr == S_OK && pQwIt->read ( vIdE ) == S_OK)
{
// Work for current queue
bEmit = false;
if (csWork.enter())
{
// Valid value ?
bEmit = (pQvs->load ( vIdE, vQE ) == S_OK);
csWork.leave();
} // if
// Emit current value if valid
if (bEmit)
{
// Debug
++uOut;
// lprintf ( LOG_DBG, L"%d/%d", uIn, uOut );
// Emit current Id and value
// dbgprintf ( L"AsyncQ::tick:emit\r\n" );
_EMT(Id,vIdE);
_EMT(Fire,vQE);
} // if
// Still running ?
CCLTRYE ( bRun == true, S_FALSE );
// Clean up
CCLOK ( pQwIt->next(); )
} // while
// Wait for additional work
CCLTRYE ( evWork.wait ( -1 ), ERROR_TIMEOUT );
// dbgprintf ( L"} AsyncQ::tick\r\n" );
return hr;
} // tick
HRESULT AsyncQ :: tickAbort ( void )
{
////////////////////////////////////////////////////////////////////////
//
//! \brief Notifies the object that 'ticking' should stop.
//! \return S_OK if successful
//
////////////////////////////////////////////////////////////////////////
bRun = false;
evWork.signal();
return S_OK;
} // tickAbort
HRESULT AsyncQ:: tickBegin ( void )
{
////////////////////////////////////////////////////////////////////////
//
//! \brief Notifies the object that it should prepare to 'tick'.
//! \return S_OK if successful
//
////////////////////////////////////////////////////////////////////////
return S_OK;
} // tickBegin
HRESULT AsyncQ:: tickEnd ( void )
{
////////////////////////////////////////////////////////////////////////
//
//! \brief Notifies the object that 'ticking' has stopped.
//! \return S_OK if successful
//
////////////////////////////////////////////////////////////////////////
return S_OK;
} // tickEnd
/*
AsyncQ :: AsyncQ ( void )
{
////////////////////////////////////////////////////////////////////////
//
// PURPOSE
// - Constructor for the CD Player node
//
////////////////////////////////////////////////////////////////////////
pThrd = NULL;
bRun = false;
pQ = NULL;
pQIt = NULL;
iSzMax = 0;
bBlock = false;
iTo = -1;
} // AsyncQ
void AsyncQ :: destruct ( void )
{
////////////////////////////////////////////////////////////////////////
//
// OVERLOAD
// FROM CCLObject
//
// PURPOSE
// - Called when the object is being destroyed
//
////////////////////////////////////////////////////////////////////////
onAttach(false);
} // destruct
HRESULT AsyncQ :: onAttach ( bool bAttach )
{
////////////////////////////////////////////////////////////////////////
//
// PURPOSE
// - Called when this behaviour is assigned to a node
//
// PARAMETERS
// - bAttach is true for attachment, false for detachment.
//
// RETURN VALUE
// S_OK if successful
//
////////////////////////////////////////////////////////////////////////
HRESULT hr = S_OK;
// Attach
if (bAttach)
{
adtValue v;
// Create value queue
CCLTRY ( COCREATE ( L"Adt.Queue", IID_IList, &pQ ) );
CCLTRY ( pQ->iterate ( &pQIt ) );
// Manual reset events
CCLTRYE ( evNotEmpty.init(true) == true, GetLastError() );
CCLTRYE ( evNotFull.init(true) == true, GetLastError() );
// Default states
if (pnDesc->load ( adtString(L"Size"), v ) == S_OK)
iSzMax = v;
if ( pnDesc->load ( adtString(L"Block"),v ) == S_OK)
bBlock = v;
if ( pnDesc->load ( adtString(L"Timeout"),v ) == S_OK)
iTo = v;
} // if
// Detach
else if (!bAttach)
{
// Shutdown thread
if (pThrd != NULL)
{
pThrd->threadStop(10000);
pThrd->Release();
pThrd = NULL;
} // if
// Clean up
_RELEASE(pQ);
_RELEASE(pQIt);
} // else if
return hr;
} // onAttach
HRESULT AsyncQ :: qValue ( const ADTVALUE &v )
{
////////////////////////////////////////////////////////////////////////
//
// PURPOSE
// - Place a value into the queue.
//
// RETURN VALUE
// S_OK if successful
//
////////////////////////////////////////////////////////////////////////
HRESULT hr = S_OK;
// Add to queue
hr = pQ->write ( v );
// Queue no longer empty
evNotEmpty.signal();
return hr;
} // qValue
HRESULT AsyncQ :: onReceive ( IReceptor *pr, const ADTVALUE &v )
{
////////////////////////////////////////////////////////////////////////
//
// PURPOSE
// - The node has received a value on the specified receptor.
//
// PARAMETERS
// - pr is the receptor
// - v is the value
//
// RETURN VALUE
// S_OK if successful
//
////////////////////////////////////////////////////////////////////////
HRESULT hr = S_OK;
// Start
if (_RCP(Start))
{
// Already started ?
CCLTRYE ( bRun == false && pThrd == NULL, E_UNEXPECTED );
// Empty queue
CCLTRY( pQ->clear() );
CCLOK ( evNotEmpty.reset(); )
CCLOK ( evNotFull.signal(); )
// Start timed emissions
CCLTRY(COCREATE(L"Sys.Thread", IID_IThread, &pThrd ));
CCLOK (bRun = true;)
CCLTRY(pThrd->threadStart ( this, 5000 ));
// dbgprintf ( L"AsyncQ::receive:Start:0x%x\r\n", hr );
} // else if
// Stop
else if (_RCP(Stop))
{
// Shutdown thread
if (pThrd != NULL)
{
// Make a copy so pThrd can be NULL. This stops pontentially
// mulitple 'receiveStop' messages from entering at once
IThread *pTmp = pThrd;
pThrd = NULL;
pTmp->threadStop(10000);
pTmp->Release();
// Should not happen but empty queue just in case
pQ->clear();
} // if
} // else if
// Queue value
else if (_RCP(Fire))
{
bool bRoom = true;
// dbgprintf ( L"Misc:::AsyncQ::receive:Fire {\r\n" );
// Attempt to queue value
if (hr == S_OK && csWork.enter())
{
U32 sz;
// Room in queue for another item ?
bRoom = (iSzMax == 0 || (pQ->size ( &sz ) == S_OK && sz < iSzMax));
// Add value if room
if (bRoom) hr = qValue(v);
// Otherwise queue is full (not 'not full')
else evNotFull.reset();
// Clean up
csWork.leave();
} // if
// Check if caller blocks on full queue
if (hr == S_OK && bRoom == false && bBlock == true)
{
// Wait for queue to be 'not full' and then add the value
if (evNotFull.wait(iTo) && csWork.enter())
{
// Queue value while protecting state
CCLTRY ( qValue(v) );
csWork.leave();
} // if
else
{
// Debug
dbgprintf ( L"AsyncQ::receive:Fire:Blocked queue timed out when queueing value\r\n" );
hr = S_FALSE;
} // if
} // if
// dbgprintf ( L"} Misc:::AsyncQ::receive:Fire\r\n" );
} // else if
// State
else if (_RCP(Block))
bBlock = adtBool(v);
else if (_RCP(Size))
iSzMax = adtInt(v);
else if (_RCP(Timeout))
iTo = adtInt(v);
else
hr = ERROR_NO_MATCH;
return hr;
} // receive
HRESULT AsyncQ :: tick ( void )
{
////////////////////////////////////////////////////////////////////////
//
// OVERLOAD
// FROM ITickable
//
// PURPOSE
// - Perform one 'tick's worth of work.
//
// RETURN VALUE
// S_OK if successful
//
////////////////////////////////////////////////////////////////////////
HRESULT hr = S_OK;
bool bEmit = false;
// dbgprintf ( L"AsyncQ::tick {\r\n" );
// Wait for a queue to be not empty
CCLTRYE ( evNotEmpty.wait ( -1 ), ERROR_TIMEOUT );
// Keep running ?
CCLTRYE ( bRun == true, S_FALSE );
// Emit next item from queue
if (csWork.enter())
{
// Next item
CCLTRY ( pQIt->begin() );
if (hr == S_OK && pQIt->read ( vQe ) == S_OK)
{
// Will emit value
bEmit = true;
// Queue cannot be full now
evNotFull.signal();
// Is queue empty now ?
if (pQIt->next() != S_OK)
evNotEmpty.reset();
} // if
// Clean up
csWork.leave();
} // if
// Emit value
if (hr == S_OK && bEmit)
_EMT(Fire,vQe);
// dbgprintf ( L"} AsyncQ::tick\r\n" );
return hr;
} // tick
HRESULT AsyncQ :: tickAbort ( void )
{
////////////////////////////////////////////////////////////////////////
//
// OVERLOAD
// FROM ITickable
//
// PURPOSE
// - Notifies the object that 'ticking' should abort.
//
// RETURN VALUE
// S_OK if successful
//
////////////////////////////////////////////////////////////////////////
bRun = false;
// Make sure all events are signalled so any waits are satisfied.
evNotEmpty.signal();
evNotFull.signal();
return S_OK;
} // tickAbort
*/
| 22.162084 | 90 | 0.483806 | [
"object"
] |
47d3f1c9bd6652e57a2ea519f30743c228d27af9 | 5,213 | cpp | C++ | src/AddOns/Skippy widget copy/SQI-skippy.cpp | clasqm/Squirrel99 | 09fb4cf9c26433b5bc1915dee1b31178222d9e81 | [
"MIT"
] | 2 | 2019-01-26T14:35:33.000Z | 2020-03-31T10:39:39.000Z | src/AddOns/Skippy widget copy/SQI-skippy.cpp | clasqm/Squirrel99 | 09fb4cf9c26433b5bc1915dee1b31178222d9e81 | [
"MIT"
] | 1 | 2018-12-12T17:04:17.000Z | 2018-12-12T17:04:17.000Z | src/AddOns/Skippy widget copy/SQI-skippy.cpp | clasqm/Squirrel99 | 09fb4cf9c26433b5bc1915dee1b31178222d9e81 | [
"MIT"
] | 1 | 2020-10-26T08:56:12.000Z | 2020-10-26T08:56:12.000Z | /*
* Squirrel project
*
* file ? SQI-skippy.cpp
* what ? Skippy builtin predicates
* who ? jlv
* when ? 02/18/00
* last ? 01/24/01
*
*
* (c) Kirilla 2000-2001
*/
// First the needed header
#include "SQI-AddOn.h"
#include "SQI-font.h"
#include "SQI-utils.h"
#include "SQI-widget.h"
#include "SQI-bwidget.h"
#include "SQI-bsheet.h"
#include "SQI-brender.h"
#include "Skippy.h"
// now some infos on the package
char *Skippy_Pkg_name = "Skippy";
char *Skippy_Pkg_purpose = "Skippy widget";
char *Skippy_Pkg_author = "Kirilla";
char *Skippy_Pkg_version = "0.11";
char *Skippy_Pkg_date = "01/24/01";
/*
* function : SQI_Skippy_Skippy
* purpose : Builtin predicate "Sheet"
* input :
*
* list<SQI_Object *> *args, List of the argument
* SQI_Squirrel *squirrel, Squirrel executing the code
* SQI_Interp *interp, Interpreter
*
* output : SQI_Object *, an object returned by the function
* side effect : none
*/
SQI_Object *SQI_Skippy_Sheet(SQI_Args *args,SQI_Squirrel *squirrel,SQI_Interp *interp)
{
if(args->Length()!=1)
throw(new SQI_Exception(SQI_EX_BADARGSNUM,"Sheet","need one input"));
else
{
SQI_List *size = IsList((*args)[0]);
if(size)
{
int width = -1;
int height = -1;
List2Size(size,&width,&height);
return new SQI_BSheet(squirrel,width,height,B_WILL_DRAW|B_PULSE_NEEDED|B_FRAME_EVENTS);
}
else
throw(new SQI_Exception(SQI_EX_INVALIDE,"Sheet","input must be a list"));
}
}
/*
* function : SQI_GUI_IsSheet
* purpose : Builtin predicate "is.sheet"
* input :
*
* list<SQI_Object *> *args, List of the argument
* SQI_Squirrel *squirrel, Squirrel executing the code
* SQI_Interp *interp, Interpreter
*
* output : SQI_Object *, an object returned by the function
* side effect : none
*/
SQI_Object *SQI_Skippy_IsSheet(SQI_Args *args,SQI_Squirrel *squirrel,SQI_Interp *interp)
{
if(args->Length()==1)
{
if(IsSheet((*args)[0]))
return interp->True;
else
return interp->False;
}
else
throw(new SQI_Exception(SQI_EX_BADARGSNUM,"is.sheet","need one input"));
}
/*
* function : SQI_Skippy_Skippy
* purpose : Builtin predicate "Skippy"
* input :
*
* list<SQI_Object *> *args, List of the argument
* SQI_Squirrel *squirrel, Squirrel executing the code
* SQI_Interp *interp, Interpreter
*
* output : SQI_Object *, an object returned by the function
* side effect : none
*/
SQI_Object *SQI_Skippy_Skippy(SQI_Args *args,SQI_Squirrel *squirrel,SQI_Interp *interp)
{
if(args->Length()!=1)
throw(new SQI_Exception(SQI_EX_BADARGSNUM,"Skippy","need one input"));
else
{
SQI_BSheet *sheet = IsSheet((*args)[0]);
if(sheet)
return new Skippy(squirrel,sheet);
else
{
SQI_Image *img = IsImage((*args)[0]);
if(img)
{
SQI_BRender *render = new SQI_BRender(img);
return new Skippy(squirrel,render);
}
else
throw(new SQI_Exception(SQI_EX_INVALIDE,"Skippy","input must be a Sheet widget or an image"));
}
}
}
/*
* function : SQI_Skippy_IsSkippy
* purpose : Builtin predicate "is.skippy"
* input :
*
* list<SQI_Object *> *args, List of the argument
* SQI_Squirrel *squirrel, Squirrel executing the code
* SQI_Interp *interp, Interpreter
*
* output : SQI_Object *, an object returned by the function
* side effect : none
*/
SQI_Object *SQI_Skippy_IsSkippy(SQI_Args *args,SQI_Squirrel *squirrel,SQI_Interp *interp)
{
if(args->Length()==1)
{
if(IsSkippy((*args)[0]))
return interp->True;
else
return interp->False;
}
else
throw(new SQI_Exception(SQI_EX_BADARGSNUM,"is.skippy","need one input"));
}
/*
* function : SQI_Skippy_Remove
* purpose : Remove all the function of the addon from the builtinmap
* input :
*
* SQI_BuiltInMap *Map, Map where the functions are
*
* output : none
* side effect : none
*/
void SQI_Skippy_Remove(SQI_BuiltInMap *Map)
{
Map->RemoveFunc("Sheet");
Map->RemoveFunc("is.sheet");
Map->RemoveFunc("Skippy");
Map->RemoveFunc("is.skippy");
}
/*
* function : SQI_AddOn_Init
* purpose : Add in the function Map the function definied in this package
* input :
*
* SQI_BuiltInMap *Map, Map to add the functions in
* image_id addon_id, AddOn ID
*
* output : none
* side effect : none
*/
void SQI_AddOn_Init(SQI_BuiltInMap *Map,image_id addon_id)
{
InitBSheet();
InitSkippy();
Map->AddAddOn(addon_id,Skippy_Pkg_name,Skippy_Pkg_purpose,Skippy_Pkg_author,Skippy_Pkg_version,Skippy_Pkg_date,SQI_Skippy_Remove);
Map->AddFunc("Sheet",
Skippy_Pkg_name,
"Create a new Sheet widget",
"Sheet size",
SQI_Skippy_Sheet
);
Map->AddFunc("is.sheet",
Skippy_Pkg_name,
"Output true if the input is a Sheet widget",
"is.sheet thing",
SQI_Skippy_IsSheet
);
Map->AddFunc("Skippy",
Skippy_Pkg_name,
"Create a new Skippy widget",
"Sheet sheet",
SQI_Skippy_Skippy
);
Map->AddFunc("is.skippy",
Skippy_Pkg_name,
"Output true if the input is a Skippy object",
"is.skippy thing",
SQI_Skippy_IsSkippy
);
}
| 24.023041 | 133 | 0.658354 | [
"render",
"object"
] |
47d9cc44fe314b0e6ba9798d484975314c91363c | 2,217 | cpp | C++ | HDU/37 - 39/hdu3784.cpp | bilibiliShen/CodeBank | 49a69b2b2c3603bf105140a9d924946ed3193457 | [
"MIT"
] | 1 | 2017-08-19T16:02:15.000Z | 2017-08-19T16:02:15.000Z | HDU/37 - 39/hdu3784.cpp | bilibiliShen/CodeBank | 49a69b2b2c3603bf105140a9d924946ed3193457 | [
"MIT"
] | null | null | null | HDU/37 - 39/hdu3784.cpp | bilibiliShen/CodeBank | 49a69b2b2c3603bf105140a9d924946ed3193457 | [
"MIT"
] | 1 | 2018-01-05T23:37:23.000Z | 2018-01-05T23:37:23.000Z | // <!-- encoding UTF-8 --!>
/*****************************************************************************
* ----Stay Hungry Stay Foolish---- *
* @author : Shen *
* @name : hdu 3784 *
*****************************************************************************/
//#pragma GCC optimize ("O2")
//#pragma comment(linker, "/STACK:1024000000,1024000000")
//#include <bits/stdc++.h>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <vector>
#include <string>
#include <limits>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long int64;
template<class T>inline bool updateMin(T& a, T b){ return a > b ? a = b, 1: 0; }
template<class T>inline bool updateMax(T& a, T b){ return a < b ? a = b, 1: 0; }
inline int nextInt() { int x; scanf("%d", &x); return x; }
inline int64 nextI64() { int64 d; cin >> d; return d; }
inline char nextChr() { scanf(" "); return getchar(); }
inline string nextStr() { string s; cin >> s; return s; }
inline double nextDbf() { double x; scanf("%lf", &x); return x; }
inline int64 nextlld() { int64 d; scanf("%lld", &d); return d; }
inline int64 next64d() { int64 d; scanf("%I64d",&d); return d; }
int a[1005];
bool flag[1005];
int main(){
int n;
while (cin>>n && n){
memset(flag,0,sizeof(flag));
for (int i=0;i<n;i++)
{
scanf("%d",&a[i]);
flag[a[i]]=1;
}
for (int i=0;i<n;i++)
{
int t;
t=a[i];
if (!flag[t])continue;
while (t>1)
{
if (t&1){ t=t*3+1; t/=2; }
else t/=2;
if (t<=1000) flag[t]=0;
}
}
bool blkflag=1;
for(int i=n-1;i>=0;i--) if (flag[a[i]])
{
if (blkflag==1)
{
printf("%d",a[i]);
blkflag = 0;
}
else printf(" %d",a[i]);
}
printf("\n");
}
return 0;
} | 29.959459 | 80 | 0.424899 | [
"vector"
] |
c5230b07fab815a12c8ed5501820e46f90542a6f | 13,584 | cpp | C++ | applications/physbam/physbam-lib/Public_Library/PhysBAM_Fluids/PhysBAM_Incompressible/Incompressible_Flows/VORTEX_PARTICLE_EVOLUTION_3D.cpp | schinmayee/nimbus | 170cd15e24a7a88243a6ea80aabadc0fc0e6e177 | [
"BSD-3-Clause"
] | 20 | 2017-07-03T19:09:09.000Z | 2021-09-10T02:53:56.000Z | applications/physbam/physbam-lib/Public_Library/PhysBAM_Fluids/PhysBAM_Incompressible/Incompressible_Flows/VORTEX_PARTICLE_EVOLUTION_3D.cpp | schinmayee/nimbus | 170cd15e24a7a88243a6ea80aabadc0fc0e6e177 | [
"BSD-3-Clause"
] | null | null | null | applications/physbam/physbam-lib/Public_Library/PhysBAM_Fluids/PhysBAM_Incompressible/Incompressible_Flows/VORTEX_PARTICLE_EVOLUTION_3D.cpp | schinmayee/nimbus | 170cd15e24a7a88243a6ea80aabadc0fc0e6e177 | [
"BSD-3-Clause"
] | 9 | 2017-09-17T02:05:06.000Z | 2020-01-31T00:12:01.000Z | //#####################################################################
// Copyright 2004-2005, Ron Fedkiw, Frank Losasso, Andrew Selle.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#####################################################################
#include <PhysBAM_Tools/Arrays_Computations/ARRAY_MIN_MAX.h>
#include <PhysBAM_Tools/Grids_Uniform/UNIFORM_GRID_ITERATOR_CELL.h>
#include <PhysBAM_Tools/Grids_Uniform/UNIFORM_GRID_ITERATOR_FACE.h>
#include <PhysBAM_Tools/Grids_Uniform_Arrays/FACE_ARRAYS.h>
#include <PhysBAM_Tools/Grids_Uniform_Computations/VORTICITY_UNIFORM.h>
#include <PhysBAM_Tools/Grids_Uniform_Interpolation/FACE_LOOKUP_UNIFORM.h>
#include <PhysBAM_Tools/Grids_Uniform_Interpolation/LINEAR_INTERPOLATION_UNIFORM.h>
#include <PhysBAM_Tools/Log/LOG.h>
#include <PhysBAM_Tools/Math_Tools/cube.h>
#include <PhysBAM_Tools/Matrices/MATRIX_3X3.h>
#include <PhysBAM_Tools/Ordinary_Differential_Equations/EULER_STEP_PARTICLES.h>
#include <PhysBAM_Tools/Read_Write/Grids_Uniform_Arrays/READ_WRITE_ARRAYS.h>
#include <PhysBAM_Tools/Read_Write/Point_Clouds/READ_WRITE_POINT_CLOUD.h>
#include <PhysBAM_Tools/Read_Write/Utilities/FILE_UTILITIES.h>
#include <PhysBAM_Tools/Read_Write/Vectors/READ_WRITE_VECTOR_3D.h>
#include <PhysBAM_Fluids/PhysBAM_Incompressible/Incompressible_Flows/VORTEX_PARTICLE_EVOLUTION_3D.h>
#include <PhysBAM_Dynamics/Parallel_Computation/MPI_UNIFORM_PARTICLES.h>
using namespace PhysBAM;
//#####################################################################
// Function Set_Radius
//#####################################################################
template<class T> inline T VORTEX_PARTICLE_EVOLUTION_3D<T>::
Gaussian_Kernel(const T distance_squared)
{
// const T normalization=1/(T)pow(2*pi,1.5);
// return one_over_radius_cubed*normalization*exp(-(T).5*one_over_radius_squared*distance_squared);
return exp(-distance_squared*4); // returns 1 when distance=0 and almost 0 when distance=1
}
//#####################################################################
// Function Set_Radius
//#####################################################################
/*template<class T> void VORTEX_PARTICLE_EVOLUTION_3D<T>::
Set_Radius(const T radius_input)
{
radius=radius_input;radius_squared=sqr(radius);one_over_radius_squared=(T)1/sqr(radius);one_over_radius_cubed=(T)1/cube(radius);scattered_interpolation.Set_Radius_Of_Influence(radius);
}*/
//#####################################################################
// Function Compute_Body_Force
//#####################################################################
template<class T> void VORTEX_PARTICLE_EVOLUTION_3D<T>::
Compute_Body_Force(const T_FACE_ARRAYS_SCALAR& face_velocities_ghost,ARRAY<VECTOR<T,3> ,VECTOR<int,3> >& force,const T dt,const T time)
{
ARRAY<T,VECTOR<int,3> > grid_vorticity_magnitude(grid.Domain_Indices(2),false);
VORTICITY_UNIFORM<TV>::Vorticity(grid,FACE_LOOKUP_UNIFORM<GRID<TV> >(face_velocities_ghost),grid_vorticity,grid_vorticity_magnitude);
if(apply_individual_particle_forces){
// compute missing vorticity per particle
VORTICITY_PARTICLES<VECTOR<T,3> > missing_vorticity_particles;missing_vorticity_particles.array_collection->Add_Elements(vorticity_particles.array_collection->Size());
LINEAR_INTERPOLATION_UNIFORM<GRID<TV>,VECTOR<T,3> > vorticity_interpolation;
for(int p=1;p<=vorticity_particles.array_collection->Size();p++){
// find missing vorticity
VECTOR<T,3> local_grid_vorticity=vorticity_interpolation.Clamped_To_Array(grid,grid_vorticity,vorticity_particles.X(p));
VECTOR<T,3> missing_vorticity=vorticity_particles.vorticity(p)-local_grid_vorticity;
VECTOR<T,3> sign_check=missing_vorticity*vorticity_particles.vorticity(p);
for(int a=1;a<=3;a++) if(sign_check[a]<0) missing_vorticity[a]=0;
missing_vorticity_particles.X(p)=vorticity_particles.X(p);
missing_vorticity_particles.vorticity(p)=missing_vorticity;
missing_vorticity_particles.radius(p)=vorticity_particles.radius(p);}
if(mpi_grid){
T max_radius = (T)0;
if(vorticity_particles.array_collection->Size()>=1) max_radius=ARRAYS_COMPUTATIONS::Max(vorticity_particles.radius);
Exchange_Boundary_Particles_Flat(*mpi_grid,missing_vorticity_particles,max_radius);}
T small_number=(T)1e-4*grid.min_dX;
for(int p=1;p<=missing_vorticity_particles.array_collection->Size();p++){
T radius=missing_vorticity_particles.radius(p);
VECTOR<int,3> box_radius((int)(radius/grid.dX.x)+1,(int)(radius/grid.dX.y)+1,(int)(radius/grid.dX.z)+1);
VECTOR<int,3> index=grid.Clamped_Index(missing_vorticity_particles.X(p));
VECTOR<int,3> lower=clamp_min(index-box_radius,VECTOR<int,3>(1,1,1)),upper=clamp_max(index+box_radius,grid.counts);
for(int i=lower.x;i<=upper.x;i++) for(int j=lower.y;j<=upper.y;j++) for(int ij=lower.z;ij<=upper.z;ij++){
VECTOR<T,3> X_minus_Xp=grid.X(i,j,ij)-missing_vorticity_particles.X(p);T distance_squared=X_minus_Xp.Magnitude_Squared();
if(distance_squared>small_number&&distance_squared<=sqr(radius)) {
// force(i,j,ij)-=(T)(force_scaling*Gaussian_Kernel(distance_squared)/sqrt(distance_squared))*VECTOR<T,3>::Cross_Product(X_minus_Xp,missing_vorticity_particles.vorticity(p));}}}
T distance=sqrt(distance_squared);
force(i,j,ij)-=(T)(force_scaling*Gaussian_Kernel(sqr(distance/radius))/distance)*VECTOR<T,3>::Cross_Product(X_minus_Xp,missing_vorticity_particles.vorticity(p));}}}}
else{
if(mpi_grid) PHYSBAM_NOT_IMPLEMENTED(); // this has not been mpi'd yet
ARRAY<T,VECTOR<int,3> > grid_vorticity_particles_magnitude(grid.Domain_Indices(2),false);
// form grid vorticity from vortex particles
scattered_interpolation.Transfer_To_Grid(vorticity_particles.X,vorticity_particles.vorticity,grid,grid_vorticity_particles);
if(remove_grid_vorticity_from_particle_vorticity) for(int i=0;i<=grid.counts.x+1;i++) for(int j=0;j<=grid.counts.y+1;j++) for(int ij=0;ij<=grid.counts.z+1;ij++)
grid_vorticity_particles(i,j,ij)-=grid_vorticity(i,j,ij);
// find vorticity magnitudes
for(int i=grid_vorticity.domain.min_corner.x;i<=grid_vorticity.domain.max_corner.x;i++)for(int j=grid_vorticity.domain.min_corner.y;j<=grid_vorticity.domain.max_corner.y;j++)for(int ij=grid_vorticity.domain.min_corner.z;ij<=grid_vorticity.domain.max_corner.z;ij++)
grid_vorticity_magnitude(i,j,ij)=grid_vorticity(i,j,ij).Magnitude();
for(int i=0;i<=grid.counts.x+1;i++) for(int j=0;j<=grid.counts.y+1;j++) for(int ij=0;ij<=grid.counts.z+1;ij++)
grid_vorticity_particles_magnitude(i,j,ij)=grid_vorticity_particles(i,j,ij).Magnitude();
// compute confinement force
T one_over_two_dx=1/(2*grid.dX.x),one_over_two_dy=1/(2*grid.dX.y),one_over_two_dz=1/(2*grid.dX.z);
for(int i=force.domain.min_corner.x;i<=force.domain.max_corner.x;i++) for(int j=force.domain.min_corner.y;j<=force.domain.max_corner.y;j++) for(int ij=force.domain.min_corner.z;ij<=force.domain.max_corner.z;ij++){
VECTOR<T,3> vortex_normal_vector((grid_vorticity_magnitude(i+1,j,ij)-grid_vorticity_magnitude(i-1,j,ij))*one_over_two_dx,
(grid_vorticity_magnitude(i,j+1,ij)-grid_vorticity_magnitude(i,j-1,ij))*one_over_two_dy,
(grid_vorticity_magnitude(i,j,ij+1)-grid_vorticity_magnitude(i,j,ij-1))*one_over_two_dz);
VECTOR<T,3> particle_vortex_normal_vector((grid_vorticity_particles_magnitude(i+1,j,ij)-grid_vorticity_particles_magnitude(i-1,j,ij))*one_over_two_dx,
(grid_vorticity_particles_magnitude(i,j+1,ij)-grid_vorticity_particles_magnitude(i,j-1,ij))*one_over_two_dy,
(grid_vorticity_particles_magnitude(i,j,ij+1)-grid_vorticity_particles_magnitude(i,j,ij-1))*one_over_two_dz);
vortex_normal_vector.Normalize();particle_vortex_normal_vector.Normalize();
force(i,j,ij)=grid_confinement_parameter*VECTOR<T,3>::Cross_Product(vortex_normal_vector,grid_vorticity(i,j,ij))
+particle_confinement_parameter*VECTOR<T,3>::Cross_Product(particle_vortex_normal_vector,grid_vorticity_particles(i,j,ij));}}
}
//#####################################################################
// Function Compute_Body_Force
//#####################################################################
template<class T> void VORTEX_PARTICLE_EVOLUTION_3D<T>::
Compute_Body_Force(const T_FACE_ARRAYS_SCALAR& face_velocities_ghost,T_FACE_ARRAYS_SCALAR& force,const T dt,const T time)
{
ARRAY<VECTOR<T,3> ,VECTOR<int,3> > cell_force(grid.Domain_Indices(1),false);
Compute_Body_Force(face_velocities_ghost,cell_force,dt,time);
for(T_FACE_ITERATOR iterator(grid);iterator.Valid();iterator.Next()){int axis=iterator.Axis();
force.Component(axis)(iterator.Face_Index())+=(T).5*(cell_force(iterator.First_Cell_Index())[axis]+cell_force(iterator.Second_Cell_Index())[axis]);}
}
//#####################################################################
// Function Euler_Step
//#####################################################################
template<class T> void VORTEX_PARTICLE_EVOLUTION_3D<T>::
Euler_Step(const T_FACE_ARRAYS_SCALAR& face_velocities_ghost,const T dt,const T time)
{
LOG::Time("Advancing vorticity particles");
ARRAY<VECTOR<T,3> ,VECTOR<int,3> > two_times_V_ghost(grid.Domain_Indices(2));
for(int i=-1;i<=grid.counts.x+2;i++) for(int j=-1;j<=grid.counts.y+2;j++) for(int ij=-1;ij<=grid.counts.z+2;ij++){
two_times_V_ghost(i,j,ij).x=face_velocities_ghost.Component(1)(i,j,ij)+face_velocities_ghost.Component(1)(i+1,j,ij);
two_times_V_ghost(i,j,ij).y=face_velocities_ghost.Component(2)(i,j,ij)+face_velocities_ghost.Component(2)(i,j+1,ij);
two_times_V_ghost(i,j,ij).z=face_velocities_ghost.Component(3)(i,j,ij)+face_velocities_ghost.Component(3)(i,j,ij+1);}
// vortex stretching/tilting term - omega dot grad V
ARRAY<MATRIX<T,3> ,VECTOR<int,3> > VX(grid.Domain_Indices(1),false);LINEAR_INTERPOLATION_UNIFORM<GRID<TV>,MATRIX<T,3> > VX_interpolation;
T one_over_four_dx=1/(4*grid.dX.x),one_over_four_dy=1/(4*grid.dX.y),one_over_four_dz=1/(4*grid.dX.z);
for(int i=0;i<=grid.counts.x+1;i++) for(int j=0;j<=grid.counts.y+1;j++) for(int ij=0;ij<=grid.counts.z+1;ij++)
VX(i,j,ij)=MATRIX<T,3>(one_over_four_dx*(two_times_V_ghost(i+1,j,ij)-two_times_V_ghost(i-1,j,ij)),
one_over_four_dy*(two_times_V_ghost(i,j+1,ij)-two_times_V_ghost(i,j-1,ij)),
one_over_four_dz*(two_times_V_ghost(i,j,ij+1)-two_times_V_ghost(i,j,ij-1)));
if(renormalize_vorticity_after_stretching_tilting) for(int p=1;p<=vorticity_particles.array_collection->Size();p++){
T old_magnitude=vorticity_particles.vorticity(p).Magnitude();
vorticity_particles.vorticity(p)+=dt*VX_interpolation.Clamped_To_Array(grid,VX,vorticity_particles.X(p))*vorticity_particles.vorticity(p);
vorticity_particles.vorticity(p).Normalize();vorticity_particles.vorticity(p)*=old_magnitude;}
else for(int p=1;p<=vorticity_particles.array_collection->Size();p++){
vorticity_particles.vorticity(p)+=dt*VX_interpolation.Clamped_To_Array(grid,VX,vorticity_particles.X(p))*vorticity_particles.vorticity(p);}
// advance vortex particle position
EULER_STEP_PARTICLES<GRID<TV> >::Euler_Step_Face(vorticity_particles.X,grid,face_velocities_ghost,dt);
if(mpi_grid) Exchange_Boundary_Particles_Flat(*mpi_grid,vorticity_particles);
}
//#####################################################################
// Function Write_Output_Files
//#####################################################################
template<class T> void VORTEX_PARTICLE_EVOLUTION_3D<T>::
Write_Output_Files(const STREAM_TYPE stream_type,const std::string& output_directory,const int frame) const
{
LOG::Time("Writing Vortex Specific Data");
FILE_UTILITIES::Write_To_File(stream_type,STRING_UTILITIES::string_sprintf("%s/%d/vorticity_particles",output_directory.c_str(),frame),vorticity_particles);
FILE_UTILITIES::Write_To_File(stream_type,STRING_UTILITIES::string_sprintf("%s/%d/grid_vorticity",output_directory.c_str(),frame),grid_vorticity);
FILE_UTILITIES::Write_To_File(stream_type,STRING_UTILITIES::string_sprintf("%s/%d/grid_vorticity_particles",output_directory.c_str(),frame),grid_vorticity_particles);
LOG::Stop_Time();
}
//#####################################################################
// Function Read_Output_Files
//#####################################################################
template<class T> void VORTEX_PARTICLE_EVOLUTION_3D<T>::
Read_Output_Files(const STREAM_TYPE stream_type,const std::string& input_directory,const int frame)
{
FILE_UTILITIES::Read_From_File(stream_type,STRING_UTILITIES::string_sprintf("%s/%d/vorticity_particles",input_directory.c_str(),frame),vorticity_particles);
}
//#####################################################################
template class VORTEX_PARTICLE_EVOLUTION_3D<float>;
#ifndef COMPILE_WITHOUT_DOUBLE_SUPPORT
template class VORTEX_PARTICLE_EVOLUTION_3D<double>;
#endif
| 76.314607 | 272 | 0.679402 | [
"vector"
] |
c523b2089df63e3495b80f1d428f23dbe452c0d3 | 792 | cpp | C++ | DS and Algo/15. Heatmaps/3. remove duplicates.cpp | tausiq2003/C-with-DS | 3ec324b180456116b03aec58f2a85025180af9aa | [
"Apache-2.0"
] | 7 | 2020-10-01T13:31:02.000Z | 2021-11-06T16:22:31.000Z | DS and Algo/15. Heatmaps/3. remove duplicates.cpp | tausiq2003/C-with-DS | 3ec324b180456116b03aec58f2a85025180af9aa | [
"Apache-2.0"
] | 9 | 2020-10-01T10:35:59.000Z | 2021-10-03T15:00:18.000Z | DS and Algo/15. Heatmaps/3. remove duplicates.cpp | tausiq2003/C-with-DS | 3ec324b180456116b03aec58f2a85025180af9aa | [
"Apache-2.0"
] | 44 | 2020-10-01T08:49:30.000Z | 2021-10-31T18:19:48.000Z | #include <iostream>
#include <unordered_map> //created using hashtable
#include <vector>
using namespace std;
vector<int> removeDuplicates(int *a, int size){
vector<int> output;
unordered_map<int, bool> map;
for(int i=0;i<size;i++){
if (map.count(a[i])) {
continue;
}/*else{
map[a[i]]=true;
output.push_back(a[i]); //this is also correct
}*/
map[a[i]]=true; // O(1)
output.push_back(a[i]);
}
// whole T.C is O(n); i.e 1*n.
return output;
}
int main(){
int a[]={1,4,3,2,4,5,6,7,8,5,3,2,4,1};
vector<int> filterd=removeDuplicates(a, 13);
for(int i=0;i<filterd.size();i++){
cout<<filterd[i]<<" ";
}
return 0;
}
| 20.842105 | 66 | 0.5 | [
"vector"
] |
c528d21873124e39a8ff4311abda9bef62fb2c14 | 4,356 | cc | C++ | chrome/browser/ui/font_access/font_access_chooser_controller_unittest.cc | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | chrome/browser/ui/font_access/font_access_chooser_controller_unittest.cc | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 86 | 2015-10-21T13:02:42.000Z | 2022-03-14T07:50:50.000Z | chrome/browser/ui/font_access/font_access_chooser_controller_unittest.cc | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/font_access/font_access_chooser_controller.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "components/permissions/mock_chooser_controller_view.h"
#include "content/public/test/test_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
class FontAccessChooserControllerTest : public ChromeRenderViewHostTestHarness {
public:
FontAccessChooserControllerTest() {
scoped_feature_list_.InitAndEnableFeature(blink::features::kFontAccess);
}
void SetUp() override {
ChromeRenderViewHostTestHarness::SetUp();
mock_font_chooser_view_ =
std::make_unique<permissions::MockChooserControllerView>();
}
protected:
std::unique_ptr<permissions::MockChooserControllerView>
mock_font_chooser_view_;
base::test::ScopedFeatureList scoped_feature_list_;
};
TEST_F(FontAccessChooserControllerTest, MultiSelectTest) {
base::RunLoop run_loop;
FontAccessChooserController controller(
main_rfh(), /*selection=*/std::vector<std::string>(),
base::BindLambdaForTesting(
[&](blink::mojom::FontEnumerationStatus status,
std::vector<blink::mojom::FontMetadataPtr> items) {
EXPECT_EQ(status, blink::mojom::FontEnumerationStatus::kOk);
EXPECT_EQ(items.size(), 2u);
run_loop.Quit();
}));
base::RunLoop readiness_loop;
controller.SetReadyCallbackForTesting(readiness_loop.QuitClosure());
readiness_loop.Run();
controller.set_view(mock_font_chooser_view_.get());
EXPECT_GT(controller.NumOptions(), 1u)
<< "FontAccessChooserController has more than 2 options";
controller.Select(std::vector<size_t>({0, 1}));
run_loop.Run();
}
TEST_F(FontAccessChooserControllerTest, CancelTest) {
base::RunLoop run_loop;
FontAccessChooserController controller(
main_rfh(),
/*selection=*/std::vector<std::string>(),
base::BindLambdaForTesting(
[&](blink::mojom::FontEnumerationStatus status,
std::vector<blink::mojom::FontMetadataPtr> items) {
EXPECT_EQ(status, blink::mojom::FontEnumerationStatus::kCanceled);
EXPECT_EQ(items.size(), 0u);
run_loop.Quit();
}));
base::RunLoop readiness_loop;
controller.SetReadyCallbackForTesting(readiness_loop.QuitClosure());
readiness_loop.Run();
controller.set_view(mock_font_chooser_view_.get());
controller.Cancel();
run_loop.Run();
}
TEST_F(FontAccessChooserControllerTest, CloseTest) {
base::RunLoop run_loop;
FontAccessChooserController controller(
main_rfh(),
/*selection=*/std::vector<std::string>(),
base::BindLambdaForTesting(
[&](blink::mojom::FontEnumerationStatus status,
std::vector<blink::mojom::FontMetadataPtr> items) {
EXPECT_EQ(status, blink::mojom::FontEnumerationStatus::kCanceled);
EXPECT_EQ(items.size(), 0u);
run_loop.Quit();
}));
base::RunLoop readiness_loop;
controller.SetReadyCallbackForTesting(readiness_loop.QuitClosure());
readiness_loop.Run();
controller.set_view(mock_font_chooser_view_.get());
controller.Close();
run_loop.Run();
}
TEST_F(FontAccessChooserControllerTest, DestructorTest) {
base::RunLoop run_loop;
std::unique_ptr<FontAccessChooserController> controller =
std::make_unique<FontAccessChooserController>(
main_rfh(),
/*selection=*/std::vector<std::string>(),
base::BindLambdaForTesting(
[&](blink::mojom::FontEnumerationStatus status,
std::vector<blink::mojom::FontMetadataPtr> items) {
EXPECT_EQ(
status,
blink::mojom::FontEnumerationStatus::kUnexpectedError);
EXPECT_EQ(items.size(), 0u);
run_loop.Quit();
}));
base::RunLoop readiness_loop;
controller->SetReadyCallbackForTesting(readiness_loop.QuitClosure());
readiness_loop.Run();
controller.reset();
run_loop.Run();
}
| 35.129032 | 80 | 0.699036 | [
"vector"
] |
c52c08e2c60780a7afca7aec1445175dfc8aa547 | 5,510 | cpp | C++ | sp/hdf52vtk/hdf52vtk.cpp | Devaraj-G/volna | f4a25c19ae041c81442fc0461ea3ff2d7d8f95ba | [
"BSD-2-Clause"
] | null | null | null | sp/hdf52vtk/hdf52vtk.cpp | Devaraj-G/volna | f4a25c19ae041c81442fc0461ea3ff2d7d8f95ba | [
"BSD-2-Clause"
] | null | null | null | sp/hdf52vtk/hdf52vtk.cpp | Devaraj-G/volna | f4a25c19ae041c81442fc0461ea3ff2d7d8f95ba | [
"BSD-2-Clause"
] | null | null | null | #include"../volna_common.h" // macro definitions
#include<math.h>
#include "../volna_writeVTK.h"
//
// Checks if error occured during hdf5 process and prints error message
//
void __check_hdf5_error(herr_t err, const char *file, const int line){
if (err < 0) {
printf("%s(%i) : OP2_HDF5_error() Runtime API error %d.\n", file,
line, (int) err);
exit(-1);
}
}
void print_info() {
printf("Wrong parameters! Please specify the OP2 HDF5 data filenames. \n"
"Syntax: hdf52vtk geometry_filename.h5 sim_result.h5 [0,1] output.vtk\n\n"
" geometry_filename.h5 - Contains the geometric data that is used by the simulation.\n"
" Created by: ./volna2hdf5 script_filename.vln\n"
" sim_result.h5 - Contains the simulation results.\n"
" Created by: ./volna geometry_filename.h5\n\n"
" 0,1 - 0(default) - write data to ASCII VTK; 1 - write data to Binary VTK.\n"
" output.vtk - The name of the output VTK file. By default output.vtk\n"
"The data of the two files (geometry_filename and sim_result) are combined and are put into *.vtk files\n");
// printf("Wrong parameters! Please specify the OP2 HDF5 data filenames. \n"
// "Syntax: hdf52vtk geometry_filename.h5 sim_result.h5 [sim_diff.h5] \n\n"
// " geometry_filename.h5 - contains the geometric data that is used by the simulation.\n"
// " Created by: ./volna2hdf5 script_filename.vln\n"
// " sim_result.h5 - contains the simulation results.\n"
// " Created by: ./volna geometry_filename.h5\n\n"
// " sim_diff.h5 - [Optional] Used to calculate differences along the 4 dimesions."
// " Contains simulation results.\n"
// " Created by: ./volna geometry_filename.h5\n\n"
// "The data of the two files (geometry_filename and sim_result) are combined and are put into *.vtk files\n");
}
int main(int argc, char **argv) {
if (argc < 3) {
print_info();
exit(-1);
}
op_init(argc, argv, 2);
hid_t file_geo;
hid_t file_sim;
const char *filename_geo_h5 = argv[1];
const char *filename_sim_h5 = argv[2];
file_geo = H5Fopen(filename_geo_h5, H5F_ACC_RDONLY, H5P_DEFAULT);
file_sim = H5Fopen(filename_sim_h5, H5F_ACC_RDONLY, H5P_DEFAULT);
// Define OP2 sets - Read mesh and geometry data from HDF5
op_set nodes = op_decl_set_hdf5(filename_geo_h5, "nodes");
op_set cells = op_decl_set_hdf5(filename_geo_h5, "cells");
// Define OP2 set maps
op_map cellsToNodes = op_decl_map_hdf5(cells, nodes, N_NODESPERCELL,
filename_geo_h5,
"cellsToNodes");
// Define OP2 set dats
op_dat nodeCoords = op_decl_dat_hdf5(nodes, MESH_DIM, "float",
filename_geo_h5,
"nodeCoords");
op_dat values = op_decl_dat_hdf5(cells, N_STATEVAR, "float",
filename_sim_h5,
"values");
int nnode = nodeCoords->set->size;
int ncell = cellsToNodes->from->size;
// if(argc==4) {
// if(argv[3] != NULL) {
// const char *filename_sim_diff_h5 = argv[3];
// hid_t file_sim_diff;
// file_sim_diff = H5Fopen(filename_sim_diff_h5, H5F_ACC_RDONLY, H5P_DEFAULT);
// op_dat values_diff = op_decl_dat_hdf5(cells, N_STATEVAR, "float",
// filename_sim_diff_h5,
// "values");
//
//// op_printf(" aaaaaaaaaaaaaaaaaaaaa = %d \n\n", values->set->size);
//// op_printf(" aaaaaaaaaaaaaaaaaaaaa = %d \n\n", values_diff->set->size);
//
// if(values->set->size == values_diff->set->size) {
// float sum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
// int dim = 4;
// float *val = (float*) values->data;
// float *val_diff = (float*) values_diff->data;
//
// for(int i=0; i<values->set->size; i++){
// sum[0] += fabs( val[i*dim ] - val_diff[i*dim ] );
// sum[1] += fabs( val[i*dim+1] - val_diff[i*dim+1] );
// sum[2] += fabs( val[i*dim+2] - val_diff[i*dim+2] );
// sum[3] += fabs( val[i*dim+3] - val_diff[i*dim+3] );
//// op_printf(" H = %g %g %g \n", val[i*dim ], val_diff[i*dim ], fabs( val[i*dim ] - val_diff[i*dim ] ));
// }
// op_printf("Sum of absolute difference: \n");
// op_printf(" diff H = %g \n", sum[0]);
// op_printf(" diff U = %g \n", sum[1]);
// op_printf(" diff V = %g \n", sum[2]);
// op_printf(" diff Z = %g \n\n", sum[3]);
// }
// else {
// op_printf("Dimension missmatch between the two simulation result files.\n");
// exit(-1);
// }
// }
// }
// Set output filename
char filename[255];
if(argc == 5) {
sprintf(filename, "%s", argv[4]);
} else {
sprintf(filename, "%s", filename_sim_h5);
const char* substituteIndexPattern = ".h5";
char* pos;
pos = strstr(filename, substituteIndexPattern);
char substituteIndex[255];
sprintf(substituteIndex, ".vtk");
strcpy(pos, substituteIndex);
}
// Choose file type
if(argc == 4) {
switch( atoi(argv[3]) ) {
case 0:
WriteMeshToVTKAscii(filename, nodeCoords, nnode, cellsToNodes, ncell, values);
break;
case 1:
WriteMeshToVTKBinary(filename, nodeCoords, nnode, cellsToNodes, ncell, values);
break;
default:
print_info();
exit(-1);
break;
}
}
else {
WriteMeshToVTKAscii(filename, nodeCoords, nnode, cellsToNodes, ncell, values);
}
check_hdf5_error( H5Fclose(file_geo) );
check_hdf5_error( H5Fclose(file_sim) );
op_exit();
return 0;
}
| 36.979866 | 119 | 0.611615 | [
"mesh",
"geometry"
] |
c52cc7aa1083a2e5384bf2f11717408bbef00ba1 | 12,802 | hpp | C++ | vitamin-k/render/vikSwapChainVK.hpp | patchedsoul/xrgears | 1ac9460a3fe49c9a47bc6d8262e124fd3d369758 | [
"MIT"
] | null | null | null | vitamin-k/render/vikSwapChainVK.hpp | patchedsoul/xrgears | 1ac9460a3fe49c9a47bc6d8262e124fd3d369758 | [
"MIT"
] | null | null | null | vitamin-k/render/vikSwapChainVK.hpp | patchedsoul/xrgears | 1ac9460a3fe49c9a47bc6d8262e124fd3d369758 | [
"MIT"
] | null | null | null | /*
* vitamin-k
*
* Copyright 2016 Sascha Willems - www.saschawillems.de
* Copyright 2017-2018 Collabora Ltd.
*
* Authors: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
* SPDX-License-Identifier: MIT
*
* Based on Vulkan Examples written by Sascha Willems
*/
#pragma once
#include <vulkan/vulkan.h>
#include <vector>
#include <map>
#include <utility>
#include "vikSwapChain.hpp"
namespace vik {
class SwapChainVK : public SwapChain {
public:
/** @brief Handle to the current swap chain, required for recreation */
VkSwapchainKHR swap_chain = VK_NULL_HANDLE;
VkSurfaceKHR surface;
SwapChainVK() {}
~SwapChainVK() {}
std::function<void(uint32_t width, uint32_t height)> dimension_cb;
void set_dimension_cb(std::function<void(uint32_t width, uint32_t height)> cb) {
dimension_cb = cb;
}
/**
* Create the swapchain and get it's images with given width and height
*
* @param width Pointer to the width of the swapchain (may be adjusted to fit the requirements of the swapchain)
* @param height Pointer to the height of the swapchain (may be adjusted to fit the requirements of the swapchain)
* @param vsync (Optional) Can be used to force vsync'd rendering (by using VK_PRESENT_MODE_FIFO_KHR as presentation mode)
*/
void create(uint32_t width, uint32_t height) {
// Get physical device surface properties and formats
VkBool32 supported;
vkGetPhysicalDeviceSurfaceSupportKHR(physical_device, 0, surface, &supported);
assert(supported);
VkSurfaceCapabilitiesKHR surfCaps;
vik_log_check(vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physical_device, surface, &surfCaps));
VkSwapchainKHR oldSwapchain = swap_chain;
VkExtent2D swapchainExtent = select_extent(surfCaps, width, height);
VkSwapchainCreateInfoKHR swap_chain_info = {
.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR,
.surface = surface,
.minImageCount = select_image_count(surfCaps),
.imageFormat = surface_format.format,
.imageColorSpace = surface_format.colorSpace,
.imageExtent = {
.width = swapchainExtent.width,
.height = swapchainExtent.height
},
.imageArrayLayers = 1,
.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,
.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE,
.queueFamilyIndexCount = 0,
.preTransform = select_transform_flags(surfCaps),
.compositeAlpha = select_composite_alpha(surfCaps),
.presentMode = select_present_mode(),
// Setting clipped to VK_TRUE allows the implementation
// to discard rendering outside of the surface area
.clipped = VK_TRUE,
.oldSwapchain = oldSwapchain
};
// Set additional usage flag for blitting from the swapchain images if supported
if (is_blit_supported())
swap_chain_info.imageUsage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
vik_log_check(vkCreateSwapchainKHR(device, &swap_chain_info,
nullptr, &swap_chain));
// If an existing swap chain is re-created, destroy the old swap chain
// This also cleans up all the presentable images
if (oldSwapchain != VK_NULL_HANDLE)
destroy_old(oldSwapchain);
create_image_views();
}
VkExtent2D select_extent(const VkSurfaceCapabilitiesKHR &caps,
uint32_t width, uint32_t height) {
VkExtent2D extent = {};
// If width (and height) equals the special value 0xFFFFFFFF,
// the size of the surface will be set by the swapchain
if (caps.currentExtent.width == (uint32_t)-1) {
// If the surface size is undefined, the size is set to
// the size of the images requested.
extent.width = width;
extent.height = height;
} else {
extent = caps.currentExtent;
if (caps.currentExtent.width != width || caps.currentExtent.height != height) {
vik_log_w("Swap chain extent dimensions differ from requested: %dx%d vs %dx%d",
caps.currentExtent.width, caps.currentExtent.height,
width, height);
dimension_cb(caps.currentExtent.width, caps.currentExtent.height);
}
}
return extent;
}
// Determine the number of swapchain images
uint32_t select_image_count(const VkSurfaceCapabilitiesKHR &surfCaps) {
uint32_t count = surfCaps.minImageCount + 1;
if ((surfCaps.maxImageCount > 0) && (count > surfCaps.maxImageCount))
count = surfCaps.maxImageCount;
return count;
}
// Find the transformation of the surface
VkSurfaceTransformFlagBitsKHR select_transform_flags(const VkSurfaceCapabilitiesKHR &surfCaps) {
if (surfCaps.supportedTransforms & VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR)
// We prefer a non-rotated transform
return VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
else
return surfCaps.currentTransform;
}
// Find a supported composite alpha format (not all devices support alpha opaque)
VkCompositeAlphaFlagBitsKHR select_composite_alpha(const VkSurfaceCapabilitiesKHR &surfCaps) {
// Simply select the first composite alpha format available
std::vector<VkCompositeAlphaFlagBitsKHR> compositeAlphaFlags = {
VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR,
VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR,
VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR,
VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR,
};
for (auto& compositeAlphaFlag : compositeAlphaFlags)
if (surfCaps.supportedCompositeAlpha & compositeAlphaFlag)
return compositeAlphaFlag;
return VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
}
bool is_blit_supported() {
VkFormatProperties formatProps;
vkGetPhysicalDeviceFormatProperties(physical_device, surface_format.format, &formatProps);
return formatProps.optimalTilingFeatures & VK_FORMAT_FEATURE_BLIT_DST_BIT;
}
void recreate(uint32_t width, uint32_t height) {
destroy();
create(width, height);
create_image_views();
}
void destroy() {
if (image_count > 0) {
vkDestroySwapchainKHR(device, swap_chain, NULL);
image_count = 0;
}
}
void destroy_old(const VkSwapchainKHR &sc) {
for (uint32_t i = 0; i < image_count; i++)
vkDestroyImageView(device, buffers[i].view, nullptr);
vkDestroySwapchainKHR(device, sc, nullptr);
}
/**
* Acquires the next image in the swap chain
*
* @param presentCompleteSemaphore (Optional) Semaphore that is signaled when the image is ready for use
* @param imageIndex Pointer to the image index that will be increased if the next image could be acquired
*
* @note The function will always wait until the next image has been acquired by setting timeout to UINT64_MAX
*
* @return VkResult of the image acquisition
*/
VkResult acquire_next_image(VkSemaphore semaphore, uint32_t *index) {
// By setting timeout to UINT64_MAX we will always
// wait until the next image has been acquired or an actual error is thrown
// With that we don't have to handle VK_NOT_READY
return vkAcquireNextImageKHR(device, swap_chain, UINT64_MAX,
semaphore, VK_NULL_HANDLE, index);
}
/**
* Queue an image for presentation
*
* @param queue Presentation queue for presenting the image
* @param imageIndex Index of the swapchain image to queue for presentation
* @param waitSemaphore (Optional) Semaphore that is waited on before the image is presented (only used if != VK_NULL_HANDLE)
*
* @return VkResult of the queue presentation
*/
VkResult present(VkQueue queue, uint32_t index,
VkSemaphore semaphore = VK_NULL_HANDLE) {
VkPresentInfoKHR presentInfo = {
.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR,
.swapchainCount = 1,
.pSwapchains = &swap_chain,
.pImageIndices = &index,
};
// Check if a wait semaphore has been specified to wait for before presenting the image
if (semaphore != VK_NULL_HANDLE) {
presentInfo.pWaitSemaphores = &semaphore;
presentInfo.waitSemaphoreCount = 1;
}
return vkQueuePresentKHR(queue, &presentInfo);
}
void print_available_formats() {
std::vector<VkSurfaceFormatKHR> formats
= get_surface_formats(physical_device, surface);
vik_log_i_short("Available formats:");
for (VkSurfaceFormatKHR format : formats)
vik_log_i_short("%s (%s)",
Log::color_format_string(format.format).c_str(),
Log::color_space_string(format.colorSpace).c_str());
}
static std::vector<VkSurfaceFormatKHR>
get_surface_formats(VkPhysicalDevice d, VkSurfaceKHR s) {
uint32_t count = 0;
vkGetPhysicalDeviceSurfaceFormatsKHR(d, s, &count, NULL);
assert(count > 0);
std::vector<VkSurfaceFormatKHR> formats(count);
vik_log_check(vkGetPhysicalDeviceSurfaceFormatsKHR(
d, s, &count, formats.data()));
return formats;
}
virtual void select_surface_format() {
if (settings->list_formats_and_exit) {
print_available_formats();
exit(0);
}
std::vector<VkSurfaceFormatKHR> formats
= get_surface_formats(physical_device, surface);
std::map<VkFormat, VkSurfaceFormatKHR> format_map;
for (auto format : formats)
format_map.insert(
std::pair<VkFormat, VkSurfaceFormatKHR>(format.format, format));
auto search = format_map.find(settings->color_format);
if (search != format_map.end()) {
surface_format = search->second;
vik_log_i("Using color format %s (%s)",
Log::color_format_string(surface_format.format).c_str(),
Log::color_space_string(surface_format.colorSpace).c_str());
} else {
vik_log_w("Selected format %s not found, falling back to default.",
Log::color_format_string(settings->color_format).c_str());
auto search2 = format_map.find(VK_FORMAT_B8G8R8A8_UNORM);
if(search2 != format_map.end()) {
surface_format = search2->second;
} else {
vik_log_e("VK_FORMAT_B8G8R8A8_UNORM format not found.");
print_available_formats();
vik_log_f("No usable format set.");
}
}
assert(surface_format.format != VK_FORMAT_UNDEFINED);
}
void create_image_views() {
vkGetSwapchainImagesKHR(device, swap_chain, &image_count, NULL);
assert(image_count > 0);
vik_log_d("Creating %d image views.", image_count);
std::vector<VkImage> images(image_count);
vkGetSwapchainImagesKHR(device, swap_chain, &image_count, images.data());
buffers.resize(image_count);
for (uint32_t i = 0; i < image_count; i++) {
buffers[i].image = images[i];
create_image_view(device, buffers[i].image,
surface_format.format, &buffers[i].view);
}
}
void print_available_present_modes() {
std::vector<VkPresentModeKHR> present_modes =
get_present_modes(physical_device, surface);
vik_log_i_short("Available present modes:");
for (auto mode : present_modes)
vik_log_i_short("%s", Log::present_mode_string(mode).c_str());
}
static std::vector<VkPresentModeKHR>
get_present_modes(VkPhysicalDevice d, VkSurfaceKHR s) {
uint32_t count;
vkGetPhysicalDeviceSurfacePresentModesKHR(d, s, &count, NULL);
assert(count > 0);
std::vector<VkPresentModeKHR> present_modes(count);
vkGetPhysicalDeviceSurfacePresentModesKHR(
d, s, &count, present_modes.data());
return present_modes;
}
VkPresentModeKHR select_present_mode() {
if (settings->list_present_modes_and_exit) {
print_available_present_modes();
exit(0);
}
std::vector<VkPresentModeKHR> present_modes =
get_present_modes(physical_device, surface);
if(std::find(present_modes.begin(),
present_modes.end(),
settings->present_mode) != present_modes.end()) {
vik_log_i("Using present mode %s",
Log::present_mode_string(settings->present_mode).c_str());
return settings->present_mode;
} else {
vik_log_w("Present mode %s not available",
Log::present_mode_string(settings->present_mode).c_str());
print_available_present_modes();
vik_log_w("Using %s", Log::present_mode_string(present_modes[0]).c_str());
return present_modes[0];
}
}
/**
* Destroy and free Vulkan resources used for the swapchain
*/
void cleanup() {
if (swap_chain != VK_NULL_HANDLE) {
for (uint32_t i = 0; i < image_count; i++)
vkDestroyImageView(device, buffers[i].view, nullptr);
}
if (surface != VK_NULL_HANDLE) {
vkDestroySwapchainKHR(device, swap_chain, nullptr);
vkDestroySurfaceKHR(instance, surface, nullptr);
}
surface = VK_NULL_HANDLE;
swap_chain = VK_NULL_HANDLE;
}
};
} // namespace vik
| 35.267218 | 126 | 0.694813 | [
"vector",
"transform"
] |
c52dcd44f99607787ac601095a062e925004d31e | 13,758 | cpp | C++ | src/graphics/material.cpp | ugozapad/hackathon | c2ab92c0564709107ef960840958643235326096 | [
"BSD-2-Clause"
] | 2 | 2021-11-26T15:11:00.000Z | 2022-03-30T15:26:39.000Z | src/graphics/material.cpp | ugozapad/hackathon | c2ab92c0564709107ef960840958643235326096 | [
"BSD-2-Clause"
] | null | null | null | src/graphics/material.cpp | ugozapad/hackathon | c2ab92c0564709107ef960840958643235326096 | [
"BSD-2-Clause"
] | null | null | null | #include "pch.h"
#include "graphics/material.h"
#include "graphics/texturemap.h"
#include "graphics/shader.h"
#include "graphics/shadermanager.h"
#include "graphics/graphicsdevice.h"
#include "graphics/rendercontext.h"
#include "graphics/shaderconstantmanager.h"
#include "common/parse.h"
#include "file/filedevice.h"
#include "engine/camera.h"
#include "engine/content/contentmanager.h"
#include <sstream>
namespace engine
{
Shader* getEngineShaderFromMaterialName(const std::string& shaderName)
{
if (shaderName == "diffuse")
return ShaderManager::getInstance()->createShader("def_geom");
else if (shaderName == "skybox")
return ShaderManager::getInstance()->createShader("forw_geom");
return nullptr;
}
void Material::createMaterialFromImport(const char* name, const char* diffuseName, const char* normalName)
{
std::string materiaName;
materiaName += "materials/";
materiaName += name;
materiaName += ".material";
File* file = FileDevice::instance()->openFile(materiaName, FileAccess::Write);
char buffer[256];
int len = sprintf(buffer, "material \"%s\"\n", name);
file->write(buffer, len);
len = sprintf(buffer, "{\n");
file->write(buffer, len);
len = sprintf(buffer, "\tshader diffuse\n");
file->write(buffer, len);
const char* newAlbedoName;
if (diffuseName && diffuseName[0] == '\0')
newAlbedoName = "notexture.png";
else
newAlbedoName = diffuseName;
len = sprintf(buffer, "\talbedo \"%s\"\n", newAlbedoName);
file->write(buffer, len);
if (normalName && normalName[0] != '\0')
{
len = sprintf(buffer, "\tnormalmap \"%s\"\n", normalName);
file->write(buffer, len);
}
len = sprintf(buffer, "}\n");
file->write(buffer, len);
FileDevice::instance()->closeFile(file);
}
Material::Material()
{
m_shader = nullptr;
m_albedoTexture = nullptr;
m_normalTexture = nullptr;
m_detailTexture = nullptr;
m_depthWrite = true;
m_selfillum = false;
m_clampToEdge = false;
m_skipmips = false;
}
Material::Material(const std::string& filename) : Content(filename)
{
//Material();
m_shader = nullptr;
m_albedoTexture = nullptr;
m_normalTexture = nullptr;
m_detailTexture = nullptr;
m_depthWrite = true;
m_selfillum = false;
m_clampToEdge = false;
m_skipmips = false;
}
Material::~Material()
{
//m_shader = nullptr;
//m_diffuseTexture = nullptr;
//m_normalTexture = nullptr;
//m_detailTexture = nullptr;
//mem_delete(*g_sysAllocator, m_detailTexture);
//mem_delete(*g_sysAllocator, m_normalTexture);
//mem_delete(*g_sysAllocator, m_albedoTexture);
}
void Material::load(const std::shared_ptr<DataStream>& dataStream)
{
dataStream->seek(FileSeek::End, 0);
size_t length = dataStream->tell();
dataStream->seek(FileSeek::Begin, 0);
char* data = new char[length + 1];
dataStream->read((void*)data, length);
data[length] = '\0';
parse(data, length);
delete[] data;
}
#if 0
const char* albedoTextureName = NULL;
const char* normalTextureName = NULL;
const char* detailTextureName = NULL;
const char* shaderName = NULL;
bool disableMipMapping = false;
const char* tokenizerStr = ",\"\n\r\t ";
char* token = strtok(buf, tokenizerStr);
bool hasMaterialOnBegin = (strcmp(token, "material") == 0);
if (!hasMaterialOnBegin)
Core::error("Material::parse: no \"material\" key in material %s", m_filename.c_str());
char* materialName = strtok(NULL, tokenizerStr);
m_materialName = strdup(materialName);
token = strtok(NULL, tokenizerStr);
while (1)
{
token = strtok(NULL, tokenizerStr);
if (!token)
break;
if (!token[0])
{
Core::error("Material::parse: no concluding '}' in material %s\n", m_filename.c_str());
}
if (token[0] == '{' /*|| token[0] == '}'*/)
continue;
if (strcmp(token, "shader") == 0)
{
char* shader = strtok(NULL, tokenizerStr);
m_shader = getEngineShaderFromMaterialName(shader);
shaderName = strdup(shader);
continue;
}
else if (strcmp(token, "albedo") == 0)
{
char* albedoName = 0;
char* nextTextureTok = strtok(NULL, tokenizerStr);
if (nextTextureTok[0] == '{')
{
nextTextureTok = strtok(NULL, tokenizerStr);
if (nextTextureTok && strcmp(nextTextureTok, "skipmips") == 0)
{
disableMipMapping = true;
albedoName = strtok(NULL, tokenizerStr);
}
else if (nextTextureTok && strcmp(nextTextureTok, "clampedge") == 0)
{
m_clampToEdge = true;
albedoName = strtok(NULL, tokenizerStr);
}
else
{
nextTextureTok = strtok(NULL, tokenizerStr);
}
}
else // using albedo texture filename without any parameter
{
albedoTextureName = strdup(nextTextureTok);
}
if (!albedoTextureName)
albedoTextureName = strdup(albedoName);
continue;
}
else if (strcmp(token, "normalmap") == 0)
{
char* normalname = strtok(NULL, tokenizerStr);
normalTextureName = strdup(normalname);
continue;
}
else if (strcmp(token, "detail") == 0)
{
char* detailname = strtok(NULL, tokenizerStr);
detailTextureName = strdup(detailname);
continue;
}
else if (strcmp(token, "depth_write") == 0)
{
char* depthWriteValue = strtok(NULL, tokenizerStr);
if (strcmp(depthWriteValue, "true") == 0)
m_depthWrite = true;
else if (strcmp(depthWriteValue, "false") == 0)
m_depthWrite = false;
continue;
}
else if (strcmp(token, "skipmips") == 0)
{
char* skipmipsValue = strtok(NULL, tokenizerStr);
if (strcmp(skipmipsValue, "true") == 0)
m_skipmips = true;
else if (strcmp(skipmipsValue, "false") == 0)
m_skipmips = false;
continue;
}
else if (strcmp(token, "selfillum") == 0)
{
char* selfillumValue = strtok(NULL, tokenizerStr);
if (strcmp(selfillumValue, "true") == 0)
m_selfillum = true;
else if (strcmp(selfillumValue, "false") == 0)
m_selfillum = false;
continue;
}
else
{
Core::error("Material::parse: unknown material parameter '%s' in '%s'\n", token, m_filename.c_str());
}
}
//TextureCreationDesc desc;
//desc.m_mipmapping = !disableMipMapping;
m_albedoTextureName += "textures/";
m_albedoTextureName += albedoTextureName;
if (normalTextureName)
{
m_normalTextureName += "textures/";
m_normalTextureName += normalTextureName;
}
if (detailTextureName)
{
m_detailTextureName += "textures/";
m_detailTextureName += detailTextureName;
}
#endif
const char* tokenizerStr = "{},\"\n\r\t ";
void Material::parse(char* buf, int size)
{
const char* albedoTextureName = NULL;
const char* normalTextureName = NULL;
const char* detailTextureName = NULL;
const char* shaderName = NULL;
bool disableMipMapping = false;
char* token = strtok(buf, tokenizerStr);
while (token)
{
if (strcmp(token, "material") == 0)
{
char* materialName = strtok(NULL, tokenizerStr);
m_materialName = strdup(materialName);
token = strtok(NULL, tokenizerStr);
continue;
}
else if (strcmp(token, "shader") == 0)
{
char* shader = strtok(NULL, tokenizerStr);
m_shader = getEngineShaderFromMaterialName(shader);
shaderName = strdup(shader);
token = strtok(NULL, tokenizerStr);
continue;
}
else if (strcmp(token, "albedo") == 0)
{
//albedoTextureName = strdup(albedoName);
albedoTextureName = parseTextureStage(token);
token = strtok(NULL, tokenizerStr);
continue;
}
else if (strcmp(token, "normalmap") == 0)
{
//char* normalname = strtok(NULL, tokenizerStr);
//normalTextureName = strdup(normalname);
normalTextureName = parseTextureStage(token);
token = strtok(NULL, tokenizerStr);
continue;
}
else if (strcmp(token, "detail") == 0)
{
char* detailname = strtok(NULL, tokenizerStr);
detailTextureName = strdup(detailname);
token = strtok(NULL, tokenizerStr);
continue;
}
else if (strcmp(token, "depth_write") == 0)
{
char* depthWriteValue = strtok(NULL, tokenizerStr);
if (strcmp(depthWriteValue, "true") == 0)
m_depthWrite = true;
else if (strcmp(depthWriteValue, "false") == 0)
m_depthWrite = false;
token = strtok(NULL, tokenizerStr);
continue;
}
else if (strcmp(token, "skipmips") == 0)
{
char* skipmipsValue = strtok(NULL, tokenizerStr);
if (strcmp(skipmipsValue, "true") == 0)
m_skipmips = true;
else if (strcmp(skipmipsValue, "false") == 0)
m_skipmips = false;
token = strtok(NULL, tokenizerStr);
continue;
}
else if (strcmp(token, "selfillum") == 0)
{
char* selfillumValue = strtok(NULL, tokenizerStr);
if (strcmp(selfillumValue, "true") == 0)
m_selfillum = true;
else if (strcmp(selfillumValue, "false") == 0)
m_selfillum = false;
token = strtok(NULL, tokenizerStr);
continue;
}
else
{
Core::error("Material::Load: get unknowed token '%s' while reading '%s' file.",
token, m_filename.c_str());
}
token = strtok(NULL, tokenizerStr);
}
//TextureCreationDesc desc;
//desc.m_mipmapping = !disableMipMapping;
m_albedoTextureName += "textures/";
m_albedoTextureName += albedoTextureName;
if (normalTextureName)
{
m_normalTextureName += "textures/";
m_normalTextureName += normalTextureName;
}
if (detailTextureName)
{
m_detailTextureName += "textures/";
m_detailTextureName += detailTextureName;
}
}
const char* Material::parseTextureStage(char* buf)
{
char* albedoName = 0;
char* nextTextureTok = strtok(NULL, tokenizerStr);
if (nextTextureTok && strcmp(nextTextureTok, "skipmips") == 0)
{
m_skipmips = true;
albedoName = strtok(NULL, tokenizerStr);
}
else if (nextTextureTok && strcmp(nextTextureTok, "clampedge") == 0)
{
m_clampToEdge = true;
albedoName = strtok(NULL, tokenizerStr);
}
else
{
albedoName = nextTextureTok;
}
return strdup(albedoName);
}
void Material::createHwTextures()
{
ContentManager* contentManager = ContentManager::getInstance();
m_albedoTexture = contentManager->loadTexture(m_albedoTextureName);
if (m_albedoTexture && !m_skipmips)
{
GraphicsDevice::instance()->setTexture2D(0, m_albedoTexture->getHWTexture());
m_albedoTexture->gen_mipmaps();
GraphicsDevice::instance()->setTexture2D(0, 0);
}
if (!m_normalTextureName.empty())
m_normalTexture = contentManager->loadTexture(m_normalTextureName);
if (!m_detailTextureName.empty())
m_detailTexture = contentManager->loadTexture(m_detailTextureName);
}
void Material::bind()
{
GraphicsDevice* device = GraphicsDevice::getInstance();
// reset all
device->depthMask(false);
device->depthTest(true);
device->depthTest(true);
if (!m_depthWrite)
device->depthTest(false);
device->depthMask(m_depthWrite);
assert(m_shader);
m_shader->bind();
// activate diffuse texture as 0
device->setTexture2D(0, m_albedoTexture->getHWTexture());
// if clamp to edge is enable
if (m_clampToEdge)
{
m_albedoTexture->setWrapS(TextureWrap::ClampToEdge);
m_albedoTexture->setWrapT(TextureWrap::ClampToEdge);
}
else
{
m_albedoTexture->setWrapS(TextureWrap::Repeat);
m_albedoTexture->setWrapT(TextureWrap::Repeat);
}
if (m_skipmips)
{
m_albedoTexture->setMin(TextureFilter::Nearest);
m_albedoTexture->setMag(TextureFilter::Linear);
}
else
{
m_albedoTexture->setMin(TextureFilter::LinearMipmapLinear);
m_albedoTexture->setMag(TextureFilter::Linear);
}
m_shader->setInteger("u_albedoTexture", 0);
// Set up normal texture as 1
if (m_normalTexture)
{
device->setTexture2D(1, m_normalTexture->getHWTexture());
m_shader->setInteger("u_normalTexture", 1);
}
// Set up detail texture as 5
if (m_detailTexture)
{
device->setTexture2D(5, m_detailTexture->getHWTexture());
m_shader->setInteger("u_detailTexture", 5);
}
m_shader->setFloat("u_znear", CameraProxy::getInstance()->getView()->m_znear);
m_shader->setFloat("u_zfar", CameraProxy::getInstance()->getView()->m_zfar);
m_shader->setInteger("u_selfillum", m_selfillum);
// Set default shader constants
ShaderConstantManager::getInstance()->setDefaultContants(m_shader);
#if 0
// apply constants here !!!
RenderContext& renderContext = RenderContext::getContext();
m_shader->setMatrix("u_model", renderContext.model);
m_shader->setMatrix("u_view", renderContext.view);
m_shader->setMatrix("u_proj", renderContext.proj);
// compute mvp matrix
glm::mat4 mvp = glm::mat4(1.0f);
mvp = renderContext.proj * renderContext.view * renderContext.model;
m_shader->setMatrix("u_mvp", mvp);
m_shader->setMatrix("u_modelViewProjection", mvp);
#endif
}
void Material::resetAllStates()
{
GraphicsDevice::getInstance()->setTexture2D(0, nullptr);
m_shader->setInteger("u_albedoTexture", 0);
GraphicsDevice::getInstance()->setTexture2D(1, nullptr);
m_shader->setInteger("u_normalTexture", 1);
GraphicsDevice::getInstance()->setTexture2D(5, nullptr);
m_shader->setInteger("u_detailTexture", 5);
}
TextureMap* Material::getTexture(MAT_TEX tex)
{
switch (tex)
{
case MAT_TEX_DIFFUSE: return m_albedoTexture.get();
case MAT_TEX_NORMALMAP: return m_normalTexture.get();
case MAT_TEX_DETAIL: return m_detailTexture.get();
}
return nullptr;
}
}
| 25.909605 | 108 | 0.653801 | [
"model"
] |
c531fba5a206cd0c195f873fb9a03887e818c087 | 1,019 | cpp | C++ | libs/fontbitmap/impl/src/font/bitmap/impl/char_metric.cpp | cpreh/spacegameengine | 313a1c34160b42a5135f8223ffaa3a31bc075a01 | [
"BSL-1.0"
] | 2 | 2016-01-27T13:18:14.000Z | 2018-05-11T01:11:32.000Z | libs/fontbitmap/impl/src/font/bitmap/impl/char_metric.cpp | cpreh/spacegameengine | 313a1c34160b42a5135f8223ffaa3a31bc075a01 | [
"BSL-1.0"
] | null | null | null | libs/fontbitmap/impl/src/font/bitmap/impl/char_metric.cpp | cpreh/spacegameengine | 313a1c34160b42a5135f8223ffaa3a31bc075a01 | [
"BSL-1.0"
] | 3 | 2018-05-11T01:11:34.000Z | 2021-04-24T19:47:45.000Z | // Copyright Carl Philipp Reh 2006 - 2019.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <sge/font/unit.hpp>
#include <sge/font/vector.hpp>
#include <sge/font/bitmap/impl/char_metric.hpp>
#include <sge/font/bitmap/impl/const_view.hpp>
#include <fcppt/config/external_begin.hpp>
#include <utility>
#include <fcppt/config/external_end.hpp>
sge::font::bitmap::impl::char_metric::char_metric(
sge::font::bitmap::impl::const_view _view,
sge::font::vector _offset,
sge::font::unit const _x_advance)
: view_(std::move(_view)), offset_(_offset), x_advance_(_x_advance)
{
}
sge::font::bitmap::impl::const_view sge::font::bitmap::impl::char_metric::view() const
{
return view_;
}
sge::font::vector sge::font::bitmap::impl::char_metric::offset() const { return offset_; }
sge::font::unit sge::font::bitmap::impl::char_metric::x_advance() const { return x_advance_; }
| 33.966667 | 94 | 0.713445 | [
"vector"
] |
c543767a4fc1c9f9135b384264451b02d5e8ea69 | 318 | cpp | C++ | DMOJ/ccc07j1.cpp | LV/ProjectEuler | 601274670d7e241f2daa4747df426613c9b87de6 | [
"MIT"
] | null | null | null | DMOJ/ccc07j1.cpp | LV/ProjectEuler | 601274670d7e241f2daa4747df426613c9b87de6 | [
"MIT"
] | null | null | null | DMOJ/ccc07j1.cpp | LV/ProjectEuler | 601274670d7e241f2daa4747df426613c9b87de6 | [
"MIT"
] | null | null | null | #include <iostream>
#include <vector>
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int a, b, c;
cin >> a >> b >> c;
vector<int> list;
list.push_back(a);
list.push_back(b);
list.push_back(c);
sort(list.begin(), list.end());
cout << list.at(1) << endl;
}
| 15.142857 | 32 | 0.616352 | [
"vector"
] |
c544ac13d3f9209d8b427eec0aaf289d56bd2700 | 2,005 | cc | C++ | Codeforces/Zepto Code Rush 2014/Problem E/E.cc | VastoLorde95/Competitive-Programming | 6c990656178fb0cd33354cbe5508164207012f24 | [
"MIT"
] | 170 | 2017-07-25T14:47:29.000Z | 2022-01-26T19:16:31.000Z | Codeforces/Zepto Code Rush 2014/Problem E/E.cc | navodit15/Competitive-Programming | 6c990656178fb0cd33354cbe5508164207012f24 | [
"MIT"
] | null | null | null | Codeforces/Zepto Code Rush 2014/Problem E/E.cc | navodit15/Competitive-Programming | 6c990656178fb0cd33354cbe5508164207012f24 | [
"MIT"
] | 55 | 2017-07-28T06:17:33.000Z | 2021-10-31T03:06:22.000Z | #include<cstdio>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<map>
#include<set>
#include<vector>
#include<utility>
#include<queue>
#include<stack>
#define sd(x) scanf("%d",&x)
#define sd2(x,y) scanf("%d%d",&x,&y)
#define sd3(x,y,z) scanf("%d%d%d",&x,&y,&z)
#define fi first
#define se second
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
#define LET(x, a) __typeof(a) x(a)
#define foreach(it, v) for(LET(it, v.begin()); it != v.end(); it++)
#define _ ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define __ freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
#define tr(x) cout<<x<<endl;
#define tr2(x,y) cout<<x<<" "<<y<<endl;
#define tr3(x,y,z) cout<<x<<" "<<y<<" "<<z<<endl;
#define tr4(w,x,y,z) cout<<w<<" "<<x<<" "<<y<<" "<<z<<endl;
using namespace std;
int n, w, used[300100], a[300100], b[300100];
long long cost;
set<pair<int, int> > s1, s2;
void one(){
pair<int, int> p = *s1.begin();
s1.erase(s1.begin());
if(used[p.se] == 0){
s2.erase(mp(b[p.se], p.se));
s1.insert(mp(b[p.se]-a[p.se], p.se));
}
w--, cost += p.fi, used[p.se]++;
return;
}
void two(){
pair<int, int> p = *s2.begin();
s2.erase(s2.begin());
s1.erase(mp(a[p.se], p.se));
w -= 2, cost += p.fi, used[p.se] = 2;
return;
}
int main(){
sd2(n,w);
for(int i = 0; i < n; i++){
sd2(a[i],b[i]);
s1.insert(mp(a[i],i));
s2.insert(mp(b[i],i));
}
while(w){
if(w%2 == 1 or s1.size() == 1 or s2.size() == 0){
// if there are an odd number of elements to be taken or s1 has less than 2 elements or s2 has no elements then our only
//optimal option is to complete a level with one star
one();
}
else{
set<pair<int, int> >::iterator it = s1.begin();
int c1 = it->fi; it++;
int c2 = it->fi;
int c3 = s2.begin()->fi;
if(c1+c2 < c3){
one();
one();
}
else{
two();
}
}
}
printf("%I64d\n", cost);
for(int i = 0; i < n; i++) printf("%d", used[i]);
printf("\n");
return 0;
}
| 22.277778 | 124 | 0.571072 | [
"vector"
] |
c54b96be49e6873b6bbd53155718662bae1446d6 | 1,967 | cpp | C++ | engine/engine/gems/geometry/tests/transform_to_plane.cpp | ddr95070/RMIsaac | ee3918f685f0a88563248ddea11d089581077973 | [
"FSFAP"
] | 1 | 2020-04-14T13:55:16.000Z | 2020-04-14T13:55:16.000Z | engine/engine/gems/geometry/tests/transform_to_plane.cpp | ddr95070/RMIsaac | ee3918f685f0a88563248ddea11d089581077973 | [
"FSFAP"
] | 4 | 2020-09-25T22:34:29.000Z | 2022-02-09T23:45:12.000Z | engine/engine/gems/geometry/tests/transform_to_plane.cpp | ddr95070/RMIsaac | ee3918f685f0a88563248ddea11d089581077973 | [
"FSFAP"
] | 1 | 2020-07-02T11:51:17.000Z | 2020-07-02T11:51:17.000Z | /*
Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
*/
#include "engine/gems/geometry/transform_to_plane.hpp"
#include "engine/core/math/pose3.hpp"
#include "engine/core/math/types.hpp"
#include "engine/core/math/utils.hpp"
#include "engine/gems/geometry/pinhole.hpp"
#include "gtest/gtest.h"
namespace isaac {
namespace geometry {
TEST(TransformToPlane, 2d_pose_pinhole) {
const int N_test = 3;
// 2d pixel points
Matrix<double, N_test, 2> pixels;
pixels << 150, 150,
100, 150,
50, 150;
// construct the pinhole camera and the pose
const auto& pinhole = Pinhole<double>::FromHorizontalFieldOfView(
200, 300, DegToRad(90.0));
const Pose3d pose{
SO3d::FromAngleAxis(-Pi<double> / 180.0 * 90.0, {1.0, 0.0, 0.0}),
Vector3d(0.0, 0.0, 1.0)
};
// correct output points
Matrix<double, N_test, 3> correct;
correct << 0.0, 1.5, 0.0,
0.0, 0.0, 0.0, // we will not check this row as there is no projection
0.0, -1.5, 0.0;
// correct optional returns
const bool correct_optionals[3] = {true, false, false};
// test against the correct output
for(int i = 0; i < N_test; i ++) {
const auto& pixel = pixels.block(i, 0, 1, 2);
if (const auto res = TransformToPlane<double>(pixel.transpose(), pinhole, pose, 0.5)) {
ASSERT(correct_optionals[i], "Fail to detect the error");
for(int j = 0; j < 2; j ++)
EXPECT_NEAR((*res)(j), correct(i, j), 1e-6);
} else {
ASSERT(!correct_optionals[i], "Fail to detect the error");
}
}
}
} // namespace geometry
} // namespace isaac
| 30.734375 | 91 | 0.670056 | [
"geometry"
] |
c54bb0d4db7130e623080a09ea834c357775d503 | 951 | cc | C++ | leetcode/1275-validate-binary-tree-nodes.cc | Magic07/online-judge-solutions | 02a289dd7eb52d7eafabc97bd1a043213b65f70a | [
"MIT"
] | null | null | null | leetcode/1275-validate-binary-tree-nodes.cc | Magic07/online-judge-solutions | 02a289dd7eb52d7eafabc97bd1a043213b65f70a | [
"MIT"
] | null | null | null | leetcode/1275-validate-binary-tree-nodes.cc | Magic07/online-judge-solutions | 02a289dd7eb52d7eafabc97bd1a043213b65f70a | [
"MIT"
] | null | null | null | class Solution {
public:
struct Node{
int left;
int right;
Node(int left, int right):left(left), right(right){ }
};
bool visitNodes(vector<Node*>& nodes, int index, vector<bool>& visited){
if(index==-1){
return true;
}
if(visited[index]){
return false;
}
visited[index]=true;
return (visitNodes(nodes, nodes[index]->left, visited)&&visitNodes(nodes, nodes[index]->right, visited));
}
bool validateBinaryTreeNodes(int n, vector<int>& leftChild, vector<int>& rightChild) {
vector<Node*> nodes(leftChild.size());
vector<bool> visited(leftChild.size(), false);
for(int i=0;i<leftChild.size();i++){
nodes[i]=new Node(leftChild[i], rightChild[i]);
}
if(!visitNodes(nodes, 0, visited)){
return false;
}
for(bool v: visited){
if(!v){
return false;
}
}
return true;
}
}; | 27.970588 | 111 | 0.563617 | [
"vector"
] |
c55045aae01738d063724878d26f6df4df661ede | 1,269 | cpp | C++ | CoolProp/Spline.cpp | perrante/coolprop | c67ecc570e545d624c18feaf2a01e48b63ae1501 | [
"MIT"
] | 12 | 2015-04-21T07:43:09.000Z | 2021-11-09T08:35:58.000Z | CoolProp/Spline.cpp | perrante/coolprop | c67ecc570e545d624c18feaf2a01e48b63ae1501 | [
"MIT"
] | 32 | 2015-01-04T05:05:05.000Z | 2017-12-13T18:03:29.000Z | CoolProp/Spline.cpp | perrante/coolprop | c67ecc570e545d624c18feaf2a01e48b63ae1501 | [
"MIT"
] | 8 | 2015-01-01T21:15:37.000Z | 2020-08-05T13:31:50.000Z |
#include "Spline.h"
#include "MatrixMath.h"
#include "CPExceptions.h"
#include "CoolPropTools.h"
SplineClass::SplineClass()
{
Nconstraints = 0;
A.resize(4, std::vector<double>(4, 0));
B.resize(4,0);
}
bool SplineClass::build()
{
if (Nconstraints == 4)
{
std::vector<double> abcd = linsolve(A,B);
a = abcd[0];
b = abcd[1];
c = abcd[2];
d = abcd[3];
return true;
}
else
{
throw ValueError(format("Number of constraints[%d] is not equal to 4",Nconstraints));
}
}
bool SplineClass::add_value_constraint(double x, double y)
{
int i = Nconstraints;
if (i == 4)
return false;
A[i][0] = x*x*x;
A[i][1] = x*x;
A[i][2] = x;
A[i][3] = 1;
B[i] = y;
Nconstraints++;
return true;
}
void SplineClass::add_4value_constraints(double x1, double x2, double x3, double x4, double y1, double y2, double y3, double y4)
{
add_value_constraint(x1, y1);
add_value_constraint(x2, y2);
add_value_constraint(x3, y3);
add_value_constraint(x4, y4);
}
bool SplineClass::add_derivative_constraint(double x, double dydx)
{
int i = Nconstraints;
if (i == 4)
return false;
A[i][0] = 3*x*x;
A[i][1] = 2*x;
A[i][2] = 1;
A[i][3] = 0;
B[i] = dydx;
Nconstraints++;
return true;
}
double SplineClass::evaluate(double x)
{
return a*x*x*x+b*x*x+c*x+d;
}
| 19.227273 | 128 | 0.64145 | [
"vector"
] |
c552aa74549333917a3d3f800c8c5e3cc0ce0de8 | 2,482 | cc | C++ | test/main_test.cc | Wjc1999/Data_structure_touring_simulator | a794518e33311563fc58df9f7f6c65e17ced5a2a | [
"MIT"
] | null | null | null | test/main_test.cc | Wjc1999/Data_structure_touring_simulator | a794518e33311563fc58df9f7f6c65e17ced5a2a | [
"MIT"
] | 1 | 2019-03-30T10:50:48.000Z | 2019-03-30T10:50:48.000Z | test/main_test.cc | L-Jay1999/Data_structure_touring_simulator | 0553338bc1c42732c3a8251f02d3c2ca6b159487 | [
"MIT"
] | null | null | null | #ifndef TEST_MAIN
#define TEST_MAIN
#include <iostream>
#include "../src/io.h"
#include "../src/id_map.h"
#include "../src/city_graph.h"
#include "../src/traveller.h"
#include "../src/time_format.h"
#include "../src/log.h"
#include "../src/path.h"
#include "../src/simulation.h"
#include "../src/save_at_exit.h"
int main()
{
IDMap id_map;
CityGraph city_graph;
Traveller traveller;
Path path;
std::vector<City_id> plan;
Strategy strategy;
Time limit_time;
Time init_time;
eSettings settings_option;
ClearScreen();
int account_name_line = Welcome(traveller);
ClearScreen();
traveller.LoadData(account_name_line, city_graph);
setTravellerPtr(&traveller);
setSignalHandlers();
while (1)
{
int opcode = Menu(id_map, traveller);
std::this_thread::sleep_for(std::chrono::milliseconds(50));
switch (opcode)
{
case SCHEDULE:
plan = Request(id_map);
traveller.set_plan(plan);
// traveller.ShowPlan();
strategy = InputStrategy(init_time, limit_time);
path = traveller.SchedulePath(city_graph, strategy, init_time, limit_time);
// path.Show();
PrintPath(city_graph, id_map, path);
if (PathConfirm())
traveller.set_path(path);
ClearScreen();
break;
case INQUIRE_STATE:
std::cout << "用户名: " <<traveller.get_ID() << std::endl;
PrintTravellerInfo(city_graph, id_map, traveller.get_init_time(), traveller);
break;
case INQUIRE_PATH:
//PrintPath(city_graph, id_map, path, 0);
PrintRoutes(city_graph, id_map);
break;
case SIMULATE:
traveller.InitState(city_graph);
InitializeSimulator(traveller.get_init_time());
Simulate(traveller, city_graph, id_map);
break;
case SETTINGS:
ClearScreen();
settings_option = SettingsMenu();
switch (settings_option)
{
case SIMULATION_SPEED:
setSleepMillsecs(getSimulateSpeed());
break;
case CONSOLE_FONT_SIZE:
SetConsoleFontSize();
}
break;
case EXIT:
std::exit(0);
break;
default:
break;
}
}
return 0;
}
/*
*/
#endif // TEST_MAIN | 25.854167 | 89 | 0.561644 | [
"vector"
] |
c55940dfb2f36fdf3a1310141bb72c3fd178feb1 | 1,452 | cpp | C++ | Saturn/src/Graphics/FrameBuffer.cpp | Tackwin/BossRoom | ecad5853e591b9edc54e75448547e20e14964f72 | [
"MIT"
] | null | null | null | Saturn/src/Graphics/FrameBuffer.cpp | Tackwin/BossRoom | ecad5853e591b9edc54e75448547e20e14964f72 | [
"MIT"
] | null | null | null | Saturn/src/Graphics/FrameBuffer.cpp | Tackwin/BossRoom | ecad5853e591b9edc54e75448547e20e14964f72 | [
"MIT"
] | null | null | null | #include "Graphics/FrameBuffer.hpp"
FrameBuffer::FrameBuffer(Vector2u size) {
glGenFramebuffers(1, &_info.id);
bind();
_info.color_texture.bind();
glTexImage2D(
GL_TEXTURE_2D, 0, GL_RGB, size.x , size.y, 0,
GL_RGB, GL_UNSIGNED_BYTE, nullptr
);
_info.color_texture.set_parameteri(GL_TEXTURE_MIN_FILTER, GL_NEAREST);
_info.color_texture.set_parameteri(GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glFramebufferTexture2D(
GL_FRAMEBUFFER,
GL_COLOR_ATTACHMENT0,
GL_TEXTURE_2D,
_info.color_texture.get_texture_id(),
0
);
glGenRenderbuffers(1, &_info.rbo);
glBindRenderbuffer(GL_RENDERBUFFER, _info.rbo);
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, size.x, size.y);
glFramebufferRenderbuffer(
GL_RENDERBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, _info.rbo
);
_info.quad = VAO::create_quad({ (float)size.y, (float)size.x });
if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
throw std::runtime_error("Couldn't create framebuffer.");
}
}
void FrameBuffer::bind() const {
glBindFramebuffer(GL_FRAMEBUFFER, _info.id);
glViewport(0, 0, _info.size.x, _info.size.y);
}
void FrameBuffer::clear(Vector4f color) const {
glClearColor(COLOR_UNROLL(color));
clear_buffer(GL_COLOR_BUFFER_BIT);
}
void FrameBuffer::clear_buffer(u32 bitfield) const {
glClear(bitfield);
}
void FrameBuffer::render_texture() const {
_info.quad.bind();
_info.color_texture.bind();
_info.quad.render(6);
}
| 26.4 | 76 | 0.767218 | [
"render"
] |
c559773a3cae059b5553b2b20e48417f2412e4d6 | 1,516 | hpp | C++ | src/org/apache/poi/ss/format/CellDateFormatter.hpp | pebble2015/cpoi | 6dcc0c5e13e3e722b4ef9fd0baffbf62bf71ead6 | [
"Apache-2.0"
] | null | null | null | src/org/apache/poi/ss/format/CellDateFormatter.hpp | pebble2015/cpoi | 6dcc0c5e13e3e722b4ef9fd0baffbf62bf71ead6 | [
"Apache-2.0"
] | null | null | null | src/org/apache/poi/ss/format/CellDateFormatter.hpp | pebble2015/cpoi | 6dcc0c5e13e3e722b4ef9fd0baffbf62bf71ead6 | [
"Apache-2.0"
] | null | null | null | // Generated from /POI/java/org/apache/poi/ss/format/CellDateFormatter.java
#pragma once
#include <fwd-POI.hpp>
#include <java/lang/fwd-POI.hpp>
#include <java/text/fwd-POI.hpp>
#include <java/util/fwd-POI.hpp>
#include <org/apache/poi/ss/format/fwd-POI.hpp>
#include <org/apache/poi/ss/format/CellFormatter.hpp>
struct default_init_tag;
class poi::ss::format::CellDateFormatter
: public CellFormatter
{
public:
typedef CellFormatter super;
private:
bool amPmUpper { };
bool showM { };
bool showAmPm { };
::java::text::DateFormat* dateFmt { };
::java::lang::String* sFmt { };
::java::util::Calendar* EXCEL_EPOCH_CAL { };
static CellDateFormatter* SIMPLE_DATE_;
protected:
void ctor(::java::lang::String* format);
void ctor(::java::util::Locale* locale, ::java::lang::String* format);
public:
void formatValue(::java::lang::StringBuffer* toAppendTo, ::java::lang::Object* value) override;
void simpleValue(::java::lang::StringBuffer* toAppendTo, ::java::lang::Object* value) override;
// Generated
CellDateFormatter(::java::lang::String* format);
CellDateFormatter(::java::util::Locale* locale, ::java::lang::String* format);
protected:
CellDateFormatter(const ::default_init_tag&);
public:
static ::java::lang::Class *class_();
static void clinit();
private:
void init();
static CellDateFormatter*& SIMPLE_DATE();
virtual ::java::lang::Class* getClass0();
friend class CellDateFormatter_DatePartHandler;
};
| 28.074074 | 99 | 0.690633 | [
"object"
] |
c55acb77bcbd82bdc185061471cf93de3f23013d | 8,091 | cc | C++ | src/porcupine.cc | vauxel/pv-porcupine | 0a51571c954e55d1f798f577698f42f56cd2c809 | [
"Apache-2.0"
] | 5 | 2019-01-21T22:38:55.000Z | 2019-12-31T22:46:32.000Z | src/porcupine.cc | vauxel/pv-porcupine | 0a51571c954e55d1f798f577698f42f56cd2c809 | [
"Apache-2.0"
] | 6 | 2018-10-31T01:49:31.000Z | 2020-08-15T12:54:26.000Z | src/porcupine.cc | vauxel/pv-porcupine | 0a51571c954e55d1f798f577698f42f56cd2c809 | [
"Apache-2.0"
] | 10 | 2019-06-05T16:02:44.000Z | 2020-11-03T22:42:05.000Z | #include <nan.h>
#include <string>
#include <pv_porcupine.h>
namespace node_porcupine
{
void HandlePicovoiceStatus(pv_status_t status)
{
switch (status)
{
case PV_STATUS_SUCCESS:
break;
case PV_STATUS_OUT_OF_MEMORY:
Nan::ThrowError("Porcupine out of memory");
break;
case PV_STATUS_IO_ERROR:
Nan::ThrowError("Porcupine IO error");
break;
case PV_STATUS_INVALID_ARGUMENT:
Nan::ThrowError("Porcupine invalid argument");
break;
default:
Nan::ThrowError("Porcupine error");
}
}
class Porcupine : public Nan::ObjectWrap
{
public:
static size_t FRAME_SIZE;
static NAN_MODULE_INIT(Init);
Porcupine(pv_porcupine_object_t *object, bool multipleKeywords) : m_object(object), m_multipleKeywords(multipleKeywords)
{
}
~Porcupine() throw()
{
destroy();
}
void destroy()
{
if (m_object)
{
pv_porcupine_delete(m_object);
m_object = NULL;
}
}
v8::Local<v8::Value> process(const int16_t *pcm)
{
v8::Local<v8::Value> result;
pv_status_t status;
if (m_multipleKeywords)
{
int keyword_index;
status = pv_porcupine_multiple_keywords_process(m_object, pcm, &keyword_index);
if (status == PV_STATUS_SUCCESS)
{
result = Nan::New<v8::Int32>(keyword_index);
}
}
else
{
bool r;
status = pv_porcupine_process(m_object, pcm, &r);
if (status == PV_STATUS_SUCCESS)
{
result = Nan::New(r);
}
}
HandlePicovoiceStatus(status);
return result;
}
private:
static NAN_METHOD(New);
static NAN_METHOD(Destroy);
static NAN_METHOD(Process);
pv_porcupine_object_t *m_object;
bool m_multipleKeywords;
};
size_t Porcupine::FRAME_SIZE;
static inline Nan::Persistent<v8::Function> &constructor()
{
static Nan::Persistent<v8::Function> my_constructor;
return my_constructor;
}
NAN_MODULE_INIT(Porcupine::Init)
{
Porcupine::FRAME_SIZE = sizeof(int16_t) * pv_porcupine_frame_length();
v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);
tpl->SetClassName(Nan::New("Porcupine").ToLocalChecked());
tpl->InstanceTemplate()->SetInternalFieldCount(1);
SetPrototypeMethod(tpl, "destroy", Destroy);
SetPrototypeMethod(tpl, "process", Process);
constructor().Reset(Nan::GetFunction(tpl).ToLocalChecked());
Nan::Set(target, Nan::New("Porcupine").ToLocalChecked(),
Nan::GetFunction(tpl).ToLocalChecked());
}
static bool parseKeyword(v8::Local<v8::Value> keyword, std::string &keyword_file_path, float &sensitivity)
{
if (keyword->IsString())
{
keyword_file_path = *Nan::Utf8String(Nan::To<v8::String>(keyword).ToLocalChecked());
sensitivity = 0.5;
return true;
}
else if (keyword->IsObject())
{
v8::Local<v8::Object> keywordObject = Nan::To<v8::Object>(keyword).ToLocalChecked();
v8::Local<v8::String> filePathKeyStr = Nan::New<v8::String>("filePath").ToLocalChecked();
v8::Local<v8::String> sensitivityKeyStr = Nan::New<v8::String>("sensitivity").ToLocalChecked();
if (!Nan::Has(keywordObject, filePathKeyStr).FromJust())
{
return false;
}
v8::MaybeLocal<v8::String> filePathVal = Nan::To<v8::String>(Nan::Get(keywordObject, filePathKeyStr).ToLocalChecked());
v8::Maybe<double> sensitivityVal = Nan::To<double>(Nan::Get(keywordObject, sensitivityKeyStr).ToLocalChecked());
if (filePathVal.IsEmpty() || sensitivityVal.IsNothing())
{
return false;
}
keyword_file_path = *Nan::Utf8String(filePathVal.ToLocalChecked());
sensitivity = sensitivityVal.FromMaybe(0.5);
return true;
}
else
{
return false;
}
}
// type Keyword = { file_path: string, sensitivity: number }
// new Porcupine(model_file_path: string, keywords: Keyword | Keyword[])
NAN_METHOD(Porcupine::New)
{
if (info.IsConstructCall())
{
if ((info.Length() < 2) || !info[0]->IsString())
{
return Nan::ThrowError("Porcupine constructor requires a model file path and one or more keyword specifications as arguments");
}
const char *model_file_path = *Nan::Utf8String(info[0]);
pv_porcupine_object_t *object;
pv_status_t status;
bool multiple_keywords = info[1]->IsArray();
if (multiple_keywords)
{
v8::Local<v8::Array> array = v8::Local<v8::Array>::Cast(info[1]);
uint32_t length = array->Length();
std::unique_ptr<std::string, std::default_delete<std::string[]>> keyword_file_path_strings(new std::string[length]);
std::unique_ptr<const char *, std::default_delete<const char *[]>> keyword_file_paths(new const char *[length]);
std::unique_ptr<float, std::default_delete<float[]>> sensitivities(new float[length]);
for (uint32_t i = 0; i < length; i++)
{
if (!parseKeyword(Nan::Get(array, i).ToLocalChecked(), keyword_file_path_strings.get()[i], sensitivities.get()[i]))
{
return Nan::ThrowError("Invalid keyword specification for Porcupine constructor");
}
else
{
keyword_file_paths.get()[i] = keyword_file_path_strings.get()[i].c_str();
}
}
status = pv_porcupine_multiple_keywords_init(model_file_path, length, keyword_file_paths.get(), sensitivities.get(), &object);
}
else
{
std::string keyword_file_path;
float sensitivity;
if (!parseKeyword(info[1], keyword_file_path, sensitivity))
{
return Nan::ThrowError("Invalid keyword specification for Porcupine constructor");
}
status = pv_porcupine_init(model_file_path, keyword_file_path.c_str(), sensitivity, &object);
}
HandlePicovoiceStatus(status);
Porcupine *obj = new Porcupine(object, multiple_keywords);
obj->Wrap(info.This());
info.GetReturnValue().Set(info.This());
}
else
{
const int argc = 1;
v8::Local<v8::Value> argv[] = {info[0]};
v8::Local<v8::Function> cons = Nan::New(constructor());
info.GetReturnValue().Set(cons->NewInstance(Nan::GetCurrentContext(), argc, argv).ToLocalChecked());
}
}
NAN_METHOD(Porcupine::Destroy)
{
Porcupine *obj = Nan::ObjectWrap::Unwrap<Porcupine>(info.Holder());
obj->destroy();
info.GetReturnValue().SetUndefined();
}
NAN_METHOD(Porcupine::Process)
{
if (info.Length() < 1 || !info[0]->IsArrayBufferView())
{
return Nan::ThrowError("Porcupine::process requires a Buffer argument");
}
if (node::Buffer::Length(info[0]) != FRAME_SIZE) {
return Nan::ThrowError("Porcupine::process Buffer size must match frameLength()");
}
Porcupine *obj = Nan::ObjectWrap::Unwrap<Porcupine>(info.Holder());
v8::Local<v8::Value> result = obj->process(reinterpret_cast<const int16_t*>(node::Buffer::Data(info[0])));
info.GetReturnValue().Set(result);
}
NAN_METHOD(sampleRate)
{
v8::Local<v8::Int32> result = Nan::New<v8::Int32>(pv_sample_rate());
info.GetReturnValue().Set(result);
}
NAN_METHOD(version)
{
v8::Local<v8::String> result = Nan::New<v8::String>(pv_porcupine_version()).ToLocalChecked();
info.GetReturnValue().Set(result);
}
NAN_METHOD(frameLength)
{
v8::Local<v8::Int32> result = Nan::New<v8::Int32>(pv_porcupine_frame_length());
info.GetReturnValue().Set(result);
}
NAN_MODULE_INIT(ModuleInit)
{
Porcupine::Init(target);
NAN_EXPORT(target, sampleRate);
NAN_EXPORT(target, version);
NAN_EXPORT(target, frameLength);
}
NODE_MODULE(NODE_GYP_MODULE_NAME, ModuleInit)
} // namespace node_porcupine
| 31.239382 | 139 | 0.623162 | [
"object",
"model"
] |
c55cb2d12699188ed5c6d3772931ae434a2b1eb4 | 19,135 | cpp | C++ | src/appleseed/renderer/modeling/environmentedf/oslenvironmentedf.cpp | joelbarmettlerUZH/appleseed | 6da8ff684aa33648a247a4d4005bb4595862e0b3 | [
"MIT"
] | 1,907 | 2015-01-04T00:13:22.000Z | 2022-03-30T15:14:00.000Z | src/appleseed/renderer/modeling/environmentedf/oslenvironmentedf.cpp | joelbarmettlerUZH/appleseed | 6da8ff684aa33648a247a4d4005bb4595862e0b3 | [
"MIT"
] | 1,196 | 2015-01-04T10:50:01.000Z | 2022-03-04T09:18:22.000Z | src/appleseed/renderer/modeling/environmentedf/oslenvironmentedf.cpp | joelbarmettlerUZH/appleseed | 6da8ff684aa33648a247a4d4005bb4595862e0b3 | [
"MIT"
] | 373 | 2015-01-06T10:08:53.000Z | 2022-03-12T10:25:57.000Z |
//
// This source file is part of appleseed.
// Visit https://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2015-2018 Esteban Tovagliari, The appleseedhq Organization
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
// Interface header.
#include "oslenvironmentedf.h"
// appleseed.renderer headers.
#include "renderer/global/globallogger.h"
#include "renderer/global/globaltypes.h"
#include "renderer/kernel/rendering/rendererservices.h"
#include "renderer/kernel/shading/closures.h"
#include "renderer/kernel/shading/oslshadergroupexec.h"
#include "renderer/kernel/shading/oslshadingsystem.h"
#include "renderer/kernel/shading/shadingcontext.h"
#include "renderer/kernel/texturing/oiiotexturesystem.h"
#include "renderer/modeling/color/colorspace.h"
#include "renderer/modeling/environmentedf/environmentedf.h"
#include "renderer/modeling/environmentedf/sphericalcoordinates.h"
#include "renderer/modeling/input/inputarray.h"
#include "renderer/modeling/input/source.h"
#include "renderer/modeling/project/project.h"
#include "renderer/modeling/scene/scene.h"
#include "renderer/modeling/scene/visibilityflags.h"
#include "renderer/modeling/shadergroup/shadergroup.h"
#include "renderer/utility/transformsequence.h"
// appleseed.foundation headers.
#include "foundation/containers/dictionary.h"
#include "foundation/core/concepts/noncopyable.h"
#include "foundation/math/cdf.h"
#include "foundation/math/matrix.h"
#include "foundation/math/sampling/imageimportancesampler.h"
#include "foundation/math/sampling/mappings.h"
#include "foundation/math/scalar.h"
#include "foundation/math/transform.h"
#include "foundation/math/vector.h"
#include "foundation/platform/compiler.h"
#include "foundation/platform/defaulttimers.h"
#include "foundation/utility/api/apistring.h"
#include "foundation/utility/api/specializedapiarrays.h"
#include "foundation/memory/arena.h"
#include "foundation/containers/dictionary.h"
#include "foundation/utility/job/abortswitch.h"
#include "foundation/utility/stopwatch.h"
#include "foundation/utility/version.h"
// Standard headers.
#include <cassert>
#include <cstring>
#include <memory>
#include <string>
// Forward declarations.
namespace foundation { class IAbortSwitch; }
namespace renderer { class Project; }
using namespace foundation;
namespace renderer
{
namespace
{
typedef ImageImportanceSampler<Color3f, float> ImageImportanceSamplerType;
//
// OSL environment sampler.
//
class OSLEnvironmentSampler
{
public:
OSLEnvironmentSampler(
const ShaderGroup* shader_group,
const OSLShaderGroupExec& osl_shadergroup_exec,
const std::size_t width,
const std::size_t height)
: m_shader_group(shader_group)
, m_osl_shadergroup_exec(osl_shadergroup_exec)
, m_rcp_width(1.0f / width)
, m_rcp_height(1.0f / height)
{
}
void sample(const std::size_t x, const std::size_t y, Color3f& payload, float& importance)
{
// Compute the spherical coordinates of the sample.
float theta, phi;
unit_square_to_angles(
(x + 0.5f) * m_rcp_width,
1.0f - (y + 0.5f) * m_rcp_height,
theta,
phi);
// Compute the local space emission direction.
const float cos_theta = std::cos(theta);
const float sin_theta = std::sin(theta);
const float cos_phi = std::cos(phi);
const float sin_phi = std::sin(phi);
const Vector3f local_outgoing =
Vector3f::make_unit_vector(cos_theta, sin_theta, cos_phi, sin_phi);
// OSL exectute system.
payload = m_osl_shadergroup_exec.execute_background(*m_shader_group, local_outgoing);
importance = luminance(payload);
}
private:
const ShaderGroup* m_shader_group;
const OSLShaderGroupExec& m_osl_shadergroup_exec;
const float m_rcp_width;
const float m_rcp_height;
};
//
// OSL environment EDF.
//
const char* Model = "osl_environment_edf";
class OSLEnvironmentEDF
: public EnvironmentEDF
{
public:
OSLEnvironmentEDF(
const char* name,
const ParamArray& params)
: EnvironmentEDF(name, params)
, m_importance_map_size(0)
, m_probability_scale(0.0f)
{
m_inputs.declare("osl_background", InputFormat::Entity, "");
}
void release() override
{
delete this;
}
const char* get_model() const override
{
return Model;
}
bool on_render_begin(
const Project& project,
const BaseGroup* parent,
OnRenderBeginRecorder& recorder,
IAbortSwitch* abort_switch) override
{
if (!EnvironmentEDF::on_render_begin(project, parent, recorder, abort_switch))
return false;
m_importance_map_size = m_params.get_optional<std::size_t>("importance_map_size", 1024);
m_shader_group =
static_cast<ShaderGroup*>(m_inputs.get_entity("osl_background"));
if (!m_importance_sampler || m_shader_group->get_version_id() != m_shader_group_version_id)
{
m_shader_group_version_id = m_shader_group->get_version_id();
// Build importance map only if this environment EDF is the active one.
if (project.get_scene()->get_environment()->get_uncached_environment_edf() == this)
build_importance_map(project, abort_switch);
}
return true;
}
void sample(
const ShadingContext& shading_context,
const Vector2f& s,
Vector3f& outgoing,
Spectrum& value,
float& probability) const override
{
if (!m_importance_sampler)
{
RENDERER_LOG_WARNING(
"cannot sample osl environment edf \"%s\" because it is not bound to the environment.",
get_path().c_str());
value.set(0.0f);
probability = 0.0f;
return;
}
// Sample the importance map.
std::size_t x, y;
Color3f payload;
float prob_xy;
m_importance_sampler->sample(s, x, y, payload, prob_xy);
assert(prob_xy >= 0.0f);
// Compute the coordinates in [0,1)^2 of the sample.
const std::size_t importance_map_width = m_importance_map_size;
const std::size_t importance_map_height = m_importance_map_size / 2;
const float jitter_x = frac(s[0] * importance_map_width);
const float jitter_y = frac(s[1] * importance_map_height);
const float u = (x + jitter_x) * m_rcp_importance_map_width;
const float v = (y + jitter_y) * m_rcp_importance_map_height;
assert(u >= 0.0f && u < 1.0f);
assert(v >= 0.0f && v < 1.0f);
// Compute the spherical coordinates of the sample.
float theta, phi;
unit_square_to_angles(u, v, theta, phi);
// Compute the local space emission direction.
const float cos_theta = std::cos(theta);
const float sin_theta = std::sin(theta);
const float cos_phi = std::cos(phi);
const float sin_phi = std::sin(phi);
const Vector3f local_outgoing =
Vector3f::make_unit_vector(cos_theta, sin_theta, cos_phi, sin_phi);
// Transform the emission direction to world space.
Transformd scratch;
const Transformd& transform = m_transform_sequence.evaluate(0.0f, scratch);
outgoing = transform.vector_to_parent(local_outgoing);
// Return the emitted radiance.
value.set(payload, g_std_lighting_conditions, Spectrum::Illuminance);
// Compute the probability density of this direction.
probability = prob_xy * m_probability_scale / sin_theta;
assert(probability >= 0.0f);
}
void evaluate(
const ShadingContext& shading_context,
const Vector3f& outgoing,
Spectrum& value) const override
{
assert(is_normalized(outgoing));
// Transform the emission direction to local space.
Transformd scratch;
const Transformd& transform = m_transform_sequence.evaluate(0.0f, scratch);
const Vector3f local_outgoing = transform.vector_to_local(outgoing);
evaluate_osl_background(shading_context, local_outgoing, value);
}
void evaluate(
const ShadingContext& shading_context,
const Vector3f& outgoing,
Spectrum& value,
float& probability) const override
{
assert(is_normalized(outgoing));
// Calculates value and probability, therefore importance map is needed.
if (!m_importance_sampler)
{
RENDERER_LOG_WARNING(
"cannot compute pdf for osl environment edf \"%s\" because it is not bound to the environment.",
get_path().c_str());
value.set(0.0f);
probability = 0.0f;
return;
}
// Transform the emission direction to local space.
Transformd scratch;
const Transformd& transform = m_transform_sequence.evaluate(0.0f, scratch);
const Vector3f local_outgoing = transform.vector_to_local(outgoing);
// Compute the spherical coordinates of the outgoing direction.
float theta, phi;
unit_vector_to_angles(local_outgoing, theta, phi);
// Convert the spherical coordinates to [0,1]^2.
float u, v;
angles_to_unit_square(theta, phi, u, v);
// Compute value.
evaluate_osl_background(shading_context, local_outgoing, value);
// Compute probability.
probability = compute_pdf(u, v, theta);
assert(probability >= 0.0f);
}
float evaluate_pdf(const Vector3f& outgoing) const override
{
assert(is_normalized(outgoing));
if (!m_importance_sampler)
{
RENDERER_LOG_WARNING(
"cannot compute pdf for osl environment edf \"%s\" because it is not bound to the environment.",
get_path().c_str());
return 0.0f;
}
// Transform the emission direction to local space.
Transformd scratch;
const Transformd& transform = m_transform_sequence.evaluate(0.0f, scratch);
const Vector3f local_outgoing = transform.vector_to_local(outgoing);
// Compute the spherical coordinates of the outgoing direction.
float theta, phi;
unit_vector_to_angles(local_outgoing, theta, phi);
// Convert the spherical coordinates to [0,1]^2.
float u, v;
angles_to_unit_square(theta, phi, u, v);
// Compute and return the PDF value.
return compute_pdf(u, v, theta);
}
private:
ShaderGroup* m_shader_group;
VersionID m_shader_group_version_id;
std::size_t m_importance_map_size;
float m_rcp_importance_map_width;
float m_rcp_importance_map_height;
float m_probability_scale;
std::unique_ptr<ImageImportanceSamplerType> m_importance_sampler;
void evaluate_osl_background(
const ShadingContext& shading_context,
const Vector3f& local_outgoing,
Spectrum& value) const
{
if (m_shader_group)
shading_context.execute_osl_background(*m_shader_group, local_outgoing, value);
else value.set(0.0f);
}
float compute_pdf(
const float u,
const float v,
const float theta) const
{
assert(u >= 0.0f && u < 1.0f);
assert(v >= 0.0f && v < 1.0f);
assert(m_importance_sampler);
// Compute the probability density of this sample in the importance map.
const std::size_t importance_map_width = m_importance_map_size;
const std::size_t importance_map_height = m_importance_map_size / 2;
const std::size_t x = truncate<std::size_t>(importance_map_width * u);
const std::size_t y = truncate<std::size_t>(importance_map_height * v);
const float prob_xy = m_importance_sampler->get_pdf(x, y);
assert(prob_xy >= 0.0f);
// Compute the probability density of the emission direction.
const float pdf = prob_xy > 0.0f ? prob_xy * m_probability_scale / std::sin(theta) : 0.0f;
assert(pdf >= 0.0f);
return pdf;
}
void build_importance_map(const Project& project, IAbortSwitch* abort_switch)
{
Stopwatch<DefaultWallclockTimer> stopwatch;
stopwatch.start();
const std::size_t importance_map_width = m_importance_map_size;
const std::size_t importance_map_height = m_importance_map_size / 2;
m_rcp_importance_map_width = 1.0f / importance_map_width;
m_rcp_importance_map_height = 1.0f / importance_map_height;
const std::size_t texel_count = importance_map_width * importance_map_height;
m_probability_scale = texel_count / (2.0f * PiSquare<float>());
// Create OSL shading system.
auto_release_ptr<OIIOTextureSystem> texture_system(
OIIOTextureSystemFactory().create());
RendererServices renderer_services(project, texture_system.ref());
auto_release_ptr<OSLShadingSystem> osl_shading_system(
OSLShadingSystemFactory().create(
&renderer_services,
texture_system.get()));
// Create OSL shadergroup exec.
Arena arena;
OSLShaderGroupExec osl_shadergroup_exec(
osl_shading_system.ref(),
arena);
// Create OSL environment sampler.
OSLEnvironmentSampler osl_environment_sampler(
m_shader_group,
osl_shadergroup_exec,
importance_map_width,
importance_map_height);
// Create OSL environment EDF importance sampler.
m_importance_sampler.reset(
new ImageImportanceSamplerType(
importance_map_width,
importance_map_height));
RENDERER_LOG_INFO(
"building " FMT_SIZE_T "x" FMT_SIZE_T " importance map "
"for osl environment edf \"%s\"...",
importance_map_width,
importance_map_height,
get_path().c_str());
m_importance_sampler->rebuild(osl_environment_sampler, abort_switch);
if (is_aborted(abort_switch))
m_importance_sampler.reset();
else
{
stopwatch.measure();
RENDERER_LOG_INFO(
"built importance map for osl environment edf \"%s\" in %s.",
get_path().c_str(),
pretty_time(stopwatch.get_seconds()).c_str());
}
}
};
}
//
// OSLEnvironmentEDFFactory class implementation.
//
void OSLEnvironmentEDFFactory::release()
{
delete this;
}
const char* OSLEnvironmentEDFFactory::get_model() const
{
return Model;
}
Dictionary OSLEnvironmentEDFFactory::get_model_metadata() const
{
return
Dictionary()
.insert("name", Model)
.insert("label", "OSL Environment EDF");
}
DictionaryArray OSLEnvironmentEDFFactory::get_input_metadata() const
{
DictionaryArray metadata;
metadata.push_back(
Dictionary()
.insert("name", "osl_background")
.insert("label", "OSL Background")
.insert("type", "entity")
.insert("entity_types",
Dictionary()
.insert("shader_group", "Shader Groups"))
.insert("use", "optional"));
metadata.push_back(
Dictionary()
.insert("name", "importance_map_size")
.insert("label", "Importance Map size")
.insert("type", "numeric")
.insert("min",
Dictionary()
.insert("value", "1")
.insert("type", "soft"))
.insert("max",
Dictionary()
.insert("value", "65536")
.insert("type", "soft"))
.insert("default", "1024")
.insert("use", "optional")
.insert("help", "Importance map size: width = size, height = size/2"));
add_common_input_metadata(metadata);
return metadata;
}
auto_release_ptr<EnvironmentEDF> OSLEnvironmentEDFFactory::create(
const char* name,
const ParamArray& params) const
{
return
auto_release_ptr<EnvironmentEDF>(
new OSLEnvironmentEDF(name, params));
}
} // namespace renderer
| 36.868979 | 116 | 0.599059 | [
"vector",
"model",
"transform"
] |
c55fae0d945eba7470215bea7bff7f373597eb97 | 5,590 | hpp | C++ | src/libraries/turbulenceModels/compressible/RAS/realizableKE/compressibleRealizableKE.hpp | MrAwesomeRocks/caelus-cml | 55b6dc5ba47d0e95c07412d9446ac72ac11d7fd7 | [
"mpich2"
] | null | null | null | src/libraries/turbulenceModels/compressible/RAS/realizableKE/compressibleRealizableKE.hpp | MrAwesomeRocks/caelus-cml | 55b6dc5ba47d0e95c07412d9446ac72ac11d7fd7 | [
"mpich2"
] | null | null | null | src/libraries/turbulenceModels/compressible/RAS/realizableKE/compressibleRealizableKE.hpp | MrAwesomeRocks/caelus-cml | 55b6dc5ba47d0e95c07412d9446ac72ac11d7fd7 | [
"mpich2"
] | null | null | null | /*---------------------------------------------------------------------------*\
Copyright (C) 2011 OpenFOAM Foundation
-------------------------------------------------------------------------------
License
This file is part of Caelus.
Caelus is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Caelus is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with Caelus. If not, see <http://www.gnu.org/licenses/>.
Class
CML::compressible::RASModels::realizableKE
Description
Realizable k-epsilon turbulence model for compressible flows.
Model described in the paper:
\verbatim
"A New k-epsilon Eddy Viscosity Model for High Reynolds Number
Turbulent Flows"
Tsan-Hsing Shih, William W. Liou, Aamir Shabbir, Zhigang Tang and
Jiang Zhu
Computers and Fluids Vol. 24, No. 3, pp. 227-238, 1995
\endverbatim
The default model coefficients correspond to the following:
\verbatim
realizableKECoeffs
{
Cmu 0.09;
A0 4.0;
C2 1.9;
sigmak 1.0;
sigmaEps 1.2;
Prt 1.0; // only for compressible
}
\endverbatim
SourceFiles
compressibleRealizableKE.cpp
\*---------------------------------------------------------------------------*/
#ifndef compressibleRealizableKE_H
#define compressibleRealizableKE_H
#include "compressibleRASModel.hpp"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace CML
{
namespace compressible
{
namespace RASModels
{
/*---------------------------------------------------------------------------*\
Class realizableKE Declaration
\*---------------------------------------------------------------------------*/
class realizableKE
:
public RASModel
{
protected:
// Protected data
// Model coefficients
dimensionedScalar Cmu_;
dimensionedScalar A0_;
dimensionedScalar C2_;
dimensionedScalar sigmak_;
dimensionedScalar sigmaEps_;
dimensionedScalar Prt_;
// Fields
volScalarField k_;
volScalarField epsilon_;
volScalarField mut_;
volScalarField alphat_;
// Protected Member Functions
tmp<volScalarField> rCmu
(
const volTensorField& gradU,
const volScalarField& S2,
const volScalarField& magS
);
tmp<volScalarField> rCmu(const volTensorField& gradU);
public:
//- Runtime type information
TypeName("realizableKE");
// Constructors
//- Construct from components
realizableKE
(
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& phi,
const fluidThermo& thermophysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName,
const word& modelName = typeName
);
//- Destructor
virtual ~realizableKE()
{}
// Member Functions
//- Return the effective diffusivity for k
tmp<volScalarField> DkEff() const
{
return tmp<volScalarField>
(
new volScalarField("DkEff", mut_/sigmak_ + mu())
);
}
//- Return the effective diffusivity for epsilon
tmp<volScalarField> DepsilonEff() const
{
return tmp<volScalarField>
(
new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu())
);
}
//- Return the turbulence viscosity
virtual tmp<volScalarField> mut() const
{
return mut_;
}
//- Return the turbulence thermal diffusivity
virtual tmp<volScalarField> alphat() const
{
return alphat_;
}
//- Return the turbulence kinetic energy
virtual tmp<volScalarField> k() const
{
return k_;
}
//- Return the turbulence kinetic energy dissipation rate
virtual tmp<volScalarField> epsilon() const
{
return epsilon_;
}
//- Return the Reynolds stress tensor
virtual tmp<volSymmTensorField> R() const;
//- Return the effective stress tensor including the laminar stress
virtual tmp<volSymmTensorField> devRhoReff() const;
//- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();
//- Read RASProperties dictionary
virtual bool read();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace RASModels
} // End namespace compressible
} // End namespace CML
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
| 26.875 | 79 | 0.533095 | [
"model"
] |
c56b475d9f5f73dbe85935077f5823851d6e1971 | 36,488 | cpp | C++ | src/rendering/utility/CreateGLObjects.cpp | halfmvsq/histolozee | c624c0d7c3a70bcc0d6aac87b4f24677e064b6a5 | [
"Apache-2.0"
] | null | null | null | src/rendering/utility/CreateGLObjects.cpp | halfmvsq/histolozee | c624c0d7c3a70bcc0d6aac87b4f24677e064b6a5 | [
"Apache-2.0"
] | null | null | null | src/rendering/utility/CreateGLObjects.cpp | halfmvsq/histolozee | c624c0d7c3a70bcc0d6aac87b4f24677e064b6a5 | [
"Apache-2.0"
] | null | null | null | #include "rendering/utility/CreateGLObjects.h"
#include "rendering/utility/vtk/PolyDataConversion.h"
#include "rendering/utility/vtk/PolyDataGenerator.h"
#include "common/HZeeException.hpp"
#include "logic/annotation/Polygon.h"
#include <glm/glm.hpp>
#include <glm/gtc/packing.hpp>
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtx/component_wise.hpp>
#include <glm/gtx/string_cast.hpp>
#include <array>
#include <iostream>
#include <sstream>
namespace
{
std::shared_ptr<GLTexture> createTexture2d( const glm::i64vec2& size, const void* data )
{
auto texture = std::make_shared<GLTexture>( tex::Target::Texture2D );
texture->generate();
texture->setSize( glm::uvec3{ size.x, size.y, 1 } );
texture->setData( 0,
tex::SizedInternalFormat::RGBA8_UNorm,
tex::BufferPixelFormat::BGRA,
tex::BufferPixelDataType::UInt8,
data );
// static const glm::vec4 sk_transparentBlack{ 0.0f, 0.0f, 0.0f, 0.0f };
// texture->setBorderColor( sk_transparentBlack );
// texture->setWrapMode( tex::WrapMode::ClampToBorder );
// Clamp to edge, since clamping to black border will change the color of the slide edges
texture->setWrapMode( tex::WrapMode::ClampToEdge );
texture->setAutoGenerateMipmaps( true );
texture->setMinificationFilter( tex::MinificationFilter::Linear );
texture->setMagnificationFilter( tex::MagnificationFilter::Linear );
return texture;
}
/// @todo Remove this, as it is redundant with createMeshGpuRecordFromVtkPolyData
std::unique_ptr<MeshGpuRecord> convertPolyDataToMeshGpuRecord(
vtkSmartPointer<vtkPolyData> polyData )
{
const auto positionsArrayBuffer = vtkconvert::extractPointsToFloatArrayBuffer( polyData );
const auto normalsArrayBuffer = vtkconvert::extractNormalsToUIntArrayBuffer( polyData );
const auto indicesArrayBuffer = vtkconvert::extractIndicesToUIntArrayBuffer( polyData );
if ( ! positionsArrayBuffer->buffer() ||
! normalsArrayBuffer->buffer() ||
! indicesArrayBuffer->buffer() )
{
std::cerr << "Null mesh buffer data for Crosshair" << std::endl;
return nullptr;
}
if ( positionsArrayBuffer->vectorCount() != normalsArrayBuffer->vectorCount() )
{
std::cerr << "Point and normal vector arrays for crosshair have different lengths" << std::endl;
return nullptr;
}
VertexAttributeInfo positionsInfo(
BufferComponentType::Float, BufferNormalizeValues::False,
3, 3 * sizeof(float), 0, positionsArrayBuffer->vectorCount() );
VertexAttributeInfo normalsInfo(
BufferComponentType::Int_2_10_10_10, BufferNormalizeValues::True,
4, sizeof(uint32_t), 0, positionsArrayBuffer->vectorCount() );
VertexIndicesInfo indexInfo(
IndexType::UInt32, PrimitiveMode::Triangles,
indicesArrayBuffer->length(), 0 );
GLBufferObject positionsObject( BufferType::VertexArray, BufferUsagePattern::StaticDraw );
GLBufferObject normalsObject( BufferType::VertexArray, BufferUsagePattern::StaticDraw );
GLBufferObject indicesObject( BufferType::Index, BufferUsagePattern::StaticDraw );
positionsObject.generate();
normalsObject.generate();
indicesObject.generate();
positionsObject.allocate( positionsArrayBuffer->byteCount(), positionsArrayBuffer->buffer() );
normalsObject.allocate( normalsArrayBuffer->byteCount(), normalsArrayBuffer->buffer() );
indicesObject.allocate( indicesArrayBuffer->byteCount(), indicesArrayBuffer->buffer() );
// Note: We are not storing the polyData in the CPU record,
// since it is never needed again and just takes up space.
auto gpuRecord = std::make_unique<MeshGpuRecord>(
std::move( positionsObject ),
std::move( indicesObject ),
positionsInfo, indexInfo );
gpuRecord->setNormals( std::move( normalsObject ), normalsInfo );
return gpuRecord;
}
} // anonymous
namespace gpuhelper
{
std::unique_ptr<ImageGpuRecord> createImageGpuRecord(
const imageio::ImageCpuRecord* imageCpuRecord,
const uint32_t componentIndex,
const tex::MinificationFilter& minFilter,
const tex::MagnificationFilter& magFilter,
bool useNormalizedIntegers )
{
static constexpr GLint sk_alignment = 1;
static const tex::WrapMode sk_wrapMode = tex::WrapMode::ClampToEdge;
// static const glm::vec4 sk_borderColor( 0.0f, 0.0f, 0.0f, 0.0f );
if ( ! imageCpuRecord || ! imageCpuRecord->imageBaseData() )
{
std::stringstream ss;
ss << "Null imageCpuRecord" << std::ends;
std::cerr << ss.str() << std::endl;
return nullptr;
}
const imageio::ImageHeader& header = imageCpuRecord->header();
const imageio::ComponentType componentType = header.m_bufferComponentType;
GLTexture::PixelStoreSettings pixelPackSettings;
pixelPackSettings.m_alignment = sk_alignment;
GLTexture::PixelStoreSettings pixelUnpackSettings = pixelPackSettings;
auto texture = std::make_shared<GLTexture>(
tex::Target::Texture3D,
GLTexture::MultisampleSettings(),
pixelPackSettings,
pixelUnpackSettings );
texture->generate();
texture->setMinificationFilter( minFilter );
texture->setMagnificationFilter( magFilter );
texture->setWrapMode( sk_wrapMode );
static const glm::u64vec3 sk_maxDims( std::numeric_limits<uint32_t>::max() );
if ( glm::any( glm::greaterThan( header.m_pixelDimensions, sk_maxDims ) ) )
{
std::stringstream ss;
ss << "Error: Cannot create 3D texture: The pixel dimensions of image "
<< header.m_fileName << " exceed the uint32_t limit." << std::ends;
std::cerr << ss.str() << std::endl;
return nullptr;
}
texture->setSize( glm::u32vec3{ header.m_pixelDimensions } );
texture->setAutoGenerateMipmaps( true );
// Load data in for the first mipmap level of the texture
static constexpr GLint sk_mipmapLevel = 0;
if ( useNormalizedIntegers )
{
texture->setData( sk_mipmapLevel,
GLTexture::getSizedInternalNormalizedRedFormat( componentType ),
GLTexture::getBufferPixelNormalizedRedFormat( componentType ),
GLTexture::getBufferPixelDataType( componentType ),
imageCpuRecord->imageBaseData()->bufferPointer( componentIndex ) );
}
else
{
texture->setData( sk_mipmapLevel,
GLTexture::getSizedInternalRedFormat( componentType ),
GLTexture::getBufferPixelRedFormat( componentType ),
GLTexture::getBufferPixelDataType( componentType ),
imageCpuRecord->imageBaseData()->bufferPointer( componentIndex ) );
}
return std::make_unique<ImageGpuRecord>( texture );
}
std::unique_ptr<MeshGpuRecord> createSliceMeshGpuRecord(
const BufferUsagePattern& bufferUsagePattern )
{
static constexpr int sk_numCoords = 3;
static constexpr int sk_numVerts = 7;
static constexpr int sk_numIndices = 8;
// Indices for a triangle fan defining a hexagon:
// the first vertex is the central hub;
// the second vertex is repeated to close the hexagon.
static const std::array< uint32_t, sk_numIndices > sk_sliceIndices =
{
{ 6, 0, 1, 2, 3, 4, 5, 0 }
};
static constexpr int sk_offset = 0;
using PositionType = glm::vec3;
using NormalType = uint32_t;
using TexCoord2DType = glm::vec2;
using VertexIndexType = uint32_t;
VertexAttributeInfo positionsInfo(
BufferComponentType::Float,
BufferNormalizeValues::False,
sk_numCoords, sizeof( PositionType ),
sk_offset, sk_numVerts );
VertexAttributeInfo normalsInfo(
BufferComponentType::Int_2_10_10_10,
BufferNormalizeValues::True,
4, sizeof( NormalType ),
sk_offset, sk_numVerts );
VertexAttributeInfo texCoordsInfo(
BufferComponentType::Float,
BufferNormalizeValues::False,
2, sizeof( TexCoord2DType ),
sk_offset, sk_numVerts );
VertexIndicesInfo indexInfo(
IndexType::UInt32,
PrimitiveMode::TriangleFan,
sk_numIndices, 0 );
GLBufferObject positionsObject( BufferType::VertexArray, bufferUsagePattern );
GLBufferObject normalsObject( BufferType::VertexArray, bufferUsagePattern );
GLBufferObject texCoordsObject( BufferType::VertexArray, bufferUsagePattern );
GLBufferObject indicesObject( BufferType::Index, BufferUsagePattern::StaticDraw );
positionsObject.generate();
normalsObject.generate();
texCoordsObject.generate();
indicesObject.generate();
positionsObject.allocate( sk_numVerts * sizeof( PositionType ), nullptr );
normalsObject.allocate( sk_numVerts * sizeof( NormalType ), nullptr );
texCoordsObject.allocate( sk_numVerts * sizeof( TexCoord2DType ), nullptr );
indicesObject.allocate( sk_numIndices * sizeof( VertexIndexType ), sk_sliceIndices.data() );
return std::make_unique<MeshGpuRecord>(
std::move( positionsObject ),
std::move( normalsObject ),
std::move( texCoordsObject ),
std::move( indicesObject ),
std::move( positionsInfo ),
std::move( normalsInfo ),
std::move( texCoordsInfo ),
std::move( indexInfo ) );
}
std::unique_ptr<MeshGpuRecord> createSphereMeshGpuRecord()
{
vtkSmartPointer<vtkPolyData> polyData = vtkutils::generateSphere();
if ( ! polyData )
{
std::cerr << "Null mesh polygon data for sphere" << std::endl;
return nullptr;
}
return convertPolyDataToMeshGpuRecord( polyData );
}
std::unique_ptr<MeshGpuRecord> createCylinderMeshGpuRecord(
const glm::dvec3& center, double radius, double height )
{
vtkSmartPointer<vtkPolyData> polyData = vtkutils::generateCylinder( center, radius, height );
if ( ! polyData )
{
std::cerr << "Null mesh polygon data for cylinder" << std::endl;
return nullptr;
}
return convertPolyDataToMeshGpuRecord( polyData );
}
std::unique_ptr<MeshGpuRecord> createCrosshairMeshGpuRecord( double coneToCylinderRatio )
{
if ( coneToCylinderRatio < 0.0 )
{
std::cerr << "Invalid cone-to-cylinder ratio of "
<< coneToCylinderRatio << " for crosshairs" << std::endl;
return nullptr;
}
vtkSmartPointer<vtkPolyData> polyData =
vtkutils::generatePointyCylinders( coneToCylinderRatio );
if ( ! polyData )
{
std::cerr << "Null mesh polygon data for Crosshair" << std::endl;
return nullptr;
}
return convertPolyDataToMeshGpuRecord( polyData );
}
std::unique_ptr<MeshGpuRecord> createMeshGpuRecord(
size_t vertexCount, size_t indexCount,
const PrimitiveMode& primitiveMode,
const BufferUsagePattern& bufferUsagePattern )
{
static constexpr int sk_numCoords = 3;
static constexpr int sk_offset = 0;
using PositionType = glm::vec3;
using NormalType = uint32_t;
using VertexIndexType = uint32_t;
VertexAttributeInfo positionsInfo(
BufferComponentType::Float,
BufferNormalizeValues::False,
sk_numCoords, sizeof( PositionType ),
sk_offset, vertexCount );
VertexAttributeInfo normalsInfo(
BufferComponentType::Int_2_10_10_10,
BufferNormalizeValues::True,
4, sizeof( NormalType ),
sk_offset, vertexCount );
VertexIndicesInfo indexInfo(
IndexType::UInt32,
primitiveMode,
indexCount, 0 );
GLBufferObject positionsObject( BufferType::VertexArray, bufferUsagePattern );
GLBufferObject normalsObject( BufferType::VertexArray, bufferUsagePattern );
GLBufferObject texCoordsObject( BufferType::VertexArray, bufferUsagePattern );
GLBufferObject indicesObject( BufferType::Index, BufferUsagePattern::StaticDraw );
positionsObject.generate();
normalsObject.generate();
texCoordsObject.generate();
indicesObject.generate();
positionsObject.allocate( vertexCount * sizeof( PositionType ), nullptr );
normalsObject.allocate( vertexCount * sizeof( NormalType ), nullptr );
indicesObject.allocate( indexCount * sizeof( VertexIndexType ), nullptr );
auto meshGpuRecord = std::make_unique<MeshGpuRecord>(
std::move( positionsObject ),
std::move( indicesObject ),
std::move( positionsInfo ),
std::move( indexInfo ) );
meshGpuRecord->setNormals( std::move( normalsObject ),
std::move( normalsInfo ) );
return meshGpuRecord;
}
std::unique_ptr<MeshGpuRecord> createMeshGpuRecordFromVtkPolyData(
vtkSmartPointer<vtkPolyData> polyData,
const MeshPrimitiveType& primitiveType,
const BufferUsagePattern& bufferUsagePattern )
{
if ( ! polyData )
{
std::cerr << "Null mesh polygon data" << std::endl;
return nullptr;
}
PrimitiveMode primitiveMode;
switch ( primitiveType )
{
case MeshPrimitiveType::Triangles:
{
primitiveMode = PrimitiveMode::Triangles;
break;
}
case MeshPrimitiveType::TriangleFan:
{
primitiveMode = PrimitiveMode::TriangleFan;
break;
}
case MeshPrimitiveType::TriangleStrip:
{
primitiveMode = PrimitiveMode::TriangleStrip;
break;
}
}
/// @todo It is possible to extract different formats of ArrayBuffer from the vtkPolyData.
/// Pass in arguments describing the formats to use.
const auto positionsArrayBuffer = vtkconvert::extractPointsToFloatArrayBuffer( polyData );
const auto normalsArrayBuffer = vtkconvert::extractNormalsToUIntArrayBuffer( polyData );
const auto texCoordsArrayBuffer = vtkconvert::extractTexCoordsToFloatArrayBuffer( polyData );
const auto indicesArrayBuffer = vtkconvert::extractIndicesToUIntArrayBuffer( polyData );
if ( ! positionsArrayBuffer || ! positionsArrayBuffer->buffer() ||
! normalsArrayBuffer || ! normalsArrayBuffer->buffer() ||
! indicesArrayBuffer || ! indicesArrayBuffer->buffer() )
{
std::cerr << "Null array data extracted from PolyData" << std::endl;
return nullptr;
}
if ( positionsArrayBuffer->vectorCount() != normalsArrayBuffer->vectorCount() )
{
std::cerr << "Vector arrays of normals extracted from "
<< "PolyData has incorrect length" << std::endl;
return nullptr;
}
std::cout << "Creating GPU record for mesh with "
<< positionsArrayBuffer->vectorCount() << " vertices and "
<< indicesArrayBuffer->vectorCount() << " indices" << std::endl;
VertexAttributeInfo positionsInfo(
BufferComponentType::Float,
BufferNormalizeValues::False,
3, 3 * sizeof( float ), 0,
positionsArrayBuffer->vectorCount() );
VertexAttributeInfo normalsInfo(
BufferComponentType::Int_2_10_10_10,
BufferNormalizeValues::True,
4, sizeof( uint32_t ), 0,
normalsArrayBuffer->vectorCount() );
VertexIndicesInfo indexInfo(
IndexType::UInt32,
primitiveMode,
indicesArrayBuffer->length(), 0 );
GLBufferObject positionsObject( BufferType::VertexArray, bufferUsagePattern );
GLBufferObject normalsObject( BufferType::VertexArray, bufferUsagePattern );
GLBufferObject indicesObject( BufferType::Index, BufferUsagePattern::StaticDraw );
positionsObject.generate();
normalsObject.generate();
indicesObject.generate();
positionsObject.allocate( positionsArrayBuffer->byteCount(), positionsArrayBuffer->buffer() );
normalsObject.allocate( normalsArrayBuffer->byteCount(), normalsArrayBuffer->buffer() );
indicesObject.allocate( indicesArrayBuffer->byteCount(), indicesArrayBuffer->buffer() );
auto gpuRecord = std::make_unique<MeshGpuRecord>(
std::move( positionsObject ),
std::move( indicesObject ),
std::move( positionsInfo ),
std::move( indexInfo ) );
gpuRecord->setNormals( std::move( normalsObject ), std::move( normalsInfo ) );
if ( texCoordsArrayBuffer && texCoordsArrayBuffer->buffer() )
{
if ( positionsArrayBuffer->vectorCount() != texCoordsArrayBuffer->vectorCount() )
{
std::cerr << "Vector array of texture coordinates extracted from "
<< "PolyData has incorrect length" << std::endl;
return nullptr;
}
VertexAttributeInfo texCoordsInfo(
BufferComponentType::Float,
BufferNormalizeValues::False,
2, sizeof( float ), 0,
texCoordsArrayBuffer->vectorCount() );
GLBufferObject texCoordsObject( BufferType::VertexArray, bufferUsagePattern );
texCoordsObject.generate();
texCoordsObject.allocate( texCoordsArrayBuffer->byteCount(), texCoordsArrayBuffer->buffer() );
gpuRecord->setTexCoords( std::move( texCoordsObject ), std::move( texCoordsInfo ) );
}
return gpuRecord;
}
std::unique_ptr<MeshGpuRecord> createBoxMeshGpuRecord(
const BufferUsagePattern& bufferUsagePattern )
{
using PositionType = glm::vec3;
using NormalType = uint32_t;
using TexCoordType = glm::vec2;
using IndexedTriangleType = glm::u8vec3;
static constexpr int sk_numPoints = 24;
static constexpr int sk_numTriangles = 12;
static const PositionType p000{ 0.0, 0.0, 0.0 };
static const PositionType p001{ 0.0, 0.0, 1.0 };
static const PositionType p010{ 0.0, 1.0, 0.0 };
static const PositionType p011{ 0.0, 1.0, 1.0 };
static const PositionType p100{ 1.0, 0.0, 0.0 };
static const PositionType p101{ 1.0, 0.0, 1.0 };
static const PositionType p110{ 1.0, 1.0, 0.0 };
static const PositionType p111{ 1.0, 1.0, 1.0 };
static const NormalType nx0 = glm::packSnorm3x10_1x2( { -1, 0, 0, 0 } );
static const NormalType nx1 = glm::packSnorm3x10_1x2( { 1, 0, 0, 0 } );
static const NormalType ny0 = glm::packSnorm3x10_1x2( { 0, -1, 0, 0 } );
static const NormalType ny1 = glm::packSnorm3x10_1x2( { 0, 1, 0, 0 } );
static const NormalType nz0 = glm::packSnorm3x10_1x2( { 0, 0, -1, 0 } );
static const NormalType nz1 = glm::packSnorm3x10_1x2( { 0, 0, 1, 0 } );
static const TexCoordType t00{ 0, 0 };
static const TexCoordType t01{ 0, 1 };
static const TexCoordType t10{ 1, 0 };
static const TexCoordType t11{ 1, 1 };
static const std::array< PositionType, sk_numPoints > sk_pointsArray =
{ { p000, p001, p010, p011,
p100, p110, p101, p111,
p000, p000, p001, p001,
p010, p010, p011, p011,
p100, p100, p110, p110,
p101, p101, p111, p111 } };
static const std::array< NormalType, sk_numPoints > sk_normalsArray =
{ { nx0, nx0, nx0, nx0,
nx1, nx1, nx1, nx1,
ny0, nz0, ny0, nz1,
ny1, nz0, ny1, nz1,
ny0, nz0, ny1, nz0,
ny0, nz1, ny1, nz1 } };
static const std::array< TexCoordType, sk_numPoints > sk_texCoordsArray =
{ { t00, t00, t01, t01,
t10, t11, t10, t11,
t00, t00, t00, t00,
t01, t01, t01, t01,
t10, t10, t11, t11,
t10, t10, t11, t11 } };
static const std::array< IndexedTriangleType, sk_numTriangles > sk_indexArray =
{ { { 0, 1, 2 }, { 3, 2, 1 },
{ 4, 5, 6 }, { 7, 6, 5 },
{ 8, 16, 10 }, { 20, 10, 16 },
{ 12, 14, 18 }, { 22, 18, 14 },
{ 9, 13, 17 }, { 19, 17, 13 },
{ 11, 21, 15 }, { 23, 15, 21 } } };
VertexAttributeInfo positionsInfo(
BufferComponentType::Float,
BufferNormalizeValues::False,
3, sizeof( PositionType ), 0, sk_numPoints );
VertexAttributeInfo normalsInfo(
BufferComponentType::Int_2_10_10_10,
BufferNormalizeValues::True,
4, sizeof( NormalType ), 0, sk_numPoints );
VertexAttributeInfo texCoordsInfo(
BufferComponentType::Float,
BufferNormalizeValues::False,
2, sizeof( TexCoordType ), 0, sk_numPoints );
VertexIndicesInfo indexInfo(
IndexType::UInt8,
PrimitiveMode::Triangles,
3 * sk_numTriangles, 0 );
GLBufferObject positionsObject( BufferType::VertexArray, bufferUsagePattern );
GLBufferObject normalsObject( BufferType::VertexArray, bufferUsagePattern );
GLBufferObject texCoordsObject( BufferType::VertexArray, bufferUsagePattern );
GLBufferObject indicesObject( BufferType::Index, BufferUsagePattern::StaticDraw );
positionsObject.generate();
normalsObject.generate();
texCoordsObject.generate();
indicesObject.generate();
positionsObject.allocate( sk_numPoints * sizeof( PositionType ), sk_pointsArray.data() );
normalsObject.allocate( sk_numPoints * sizeof( NormalType ), sk_normalsArray.data() );
texCoordsObject.allocate( sk_numPoints * sizeof( TexCoordType ), sk_texCoordsArray.data() );
indicesObject.allocate( sk_numTriangles * sizeof( IndexedTriangleType ), sk_indexArray.data() );
return std::make_unique<MeshGpuRecord>(
std::move( positionsObject ),
std::move( normalsObject ),
std::move( texCoordsObject ),
std::move( indicesObject ),
std::move( positionsInfo ),
std::move( normalsInfo ),
std::move( texCoordsInfo ),
std::move( indexInfo ) );
}
void createTestColorBuffer( MeshRecord& meshRecord )
{
MeshCpuRecord* cpuRecord = meshRecord.cpuData();
MeshGpuRecord* gpuRecord = meshRecord.gpuData();
if ( ! cpuRecord || ! gpuRecord )
{
std::stringstream ss;
ss << "Null record" << std::ends;
std::cerr << ss.str() << std::endl;
return;
}
vtkSmartPointer<vtkPolyData> polyData = meshRecord.cpuData()->polyData();
if ( ! polyData )
{
std::stringstream ss;
ss << "Null vtkPolyData in MeshCPURecord" << std::ends;
std::cerr << ss.str() << std::endl;
return;
}
const auto& positionsInfo = gpuRecord->positionsInfo();
const auto vertexCount = positionsInfo.vertexCount();
VertexAttributeInfo colorsInfo(
BufferComponentType::UByte,
BufferNormalizeValues::True,
4, 4 * sizeof( uint8_t ), 0, vertexCount );
GLBufferObject colorsBuffer( BufferType::VertexArray, BufferUsagePattern::StaticDraw );
colorsBuffer.generate();
const auto normalsArrayBuffer = vtkconvert::extractNormalsToUIntArrayBuffer( polyData );
if ( ! normalsArrayBuffer )
{
std::cerr << "Null normalsArrayBuffer" << std::endl;
return;
}
const uint32_t* normalsBuffer = static_cast<const uint32_t*>( normalsArrayBuffer->buffer() );
const size_t byteCount = 4 * vertexCount;
auto colorBuffer = std::make_unique< uint8_t[] >( byteCount );
for ( size_t i = 0; i < vertexCount; ++i )
{
const glm::vec3 normal = glm::abs( glm::vec3{ glm::unpackSnorm3x10_1x2( normalsBuffer[i] ) } );
const float max = glm::compMax( normal );
const glm::u8vec3 N = glm::u8vec3{ (255.0f / max) * normal };
colorBuffer[4*i + 0] = N.x;
colorBuffer[4*i + 1] = N.y;
colorBuffer[4*i + 2] = N.z;
colorBuffer[4*i + 3] = 255;
}
colorsBuffer.allocate( byteCount, colorBuffer.get() );
gpuRecord->setColors( std::move( colorsBuffer ), std::move( colorsInfo ) );
}
std::unique_ptr<SlideGpuRecord> createSlideGpuRecord( const slideio::SlideCpuRecord* cpuRecord )
{
if ( ! cpuRecord )
{
std::ostringstream ss;
ss << "Null SlideCpuRecord" << std::ends;
std::cerr << ss.str() << std::endl;
return nullptr;
}
// Create the GPU texture from the smallest among all levels
const slideio::SlideLevel* smallestLevel = nullptr;
const size_t numCreatedLevels = cpuRecord->numCreatedLevels();
const size_t numFileLevels = cpuRecord->numFileLevels();
// Check created levels first
if ( numCreatedLevels > 0 )
{
smallestLevel = &( cpuRecord->createdLevel( numCreatedLevels - 1 ) );
}
else if ( numFileLevels > 0 )
{
smallestLevel = &( cpuRecord->fileLevel( numFileLevels - 1 ) );
}
else
{
std::ostringstream ss;
ss << "No level data" << std::ends;
std::cerr << ss.str() << std::endl;
return nullptr;
}
if ( ! smallestLevel || ! smallestLevel->m_data ||
smallestLevel->m_dims.x <= 0 || smallestLevel->m_dims.y <= 0 )
{
std::ostringstream ss;
ss << "Null level data" << std::ends;
std::cerr << ss.str() << std::endl;
return nullptr;
}
auto texture = createTexture2d(
smallestLevel->m_dims,
const_cast< const uint32_t* >( smallestLevel->m_data.get() ) );
return std::make_unique<SlideGpuRecord>( texture );
}
std::unique_ptr<SlideAnnotationGpuRecord> createSlideAnnotationGpuRecord( const Polygon& polygon )
{
static const uint32_t sk_upNormal = glm::packSnorm3x10_1x2( glm::vec4{ 0.0f, 0.0f, 1.0f, 0.0f } );
static const uint32_t sk_downNormal = glm::packSnorm3x10_1x2( glm::vec4{ 0.0f, 0.0f, -1.0f, 0.0f } );
// The first polygon is the outer boundary; subsequent polygons define holes inside of it.
if ( polygon.numBoundaries() < 1 )
{
std::cerr << "Error: Annotation must contain at least an outer boundary." << std::endl;
return nullptr;
}
std::vector< glm::vec3 > vertices;
// Add vertices for the bottom face (z = 0) of the mesh:
for ( const auto& boundary : polygon.getAllVertices() )
{
if ( boundary.size() < 3 )
{
std::cerr << "Error: Polygon must have at least 3 vertices" << std::endl;
return nullptr;
}
for ( const Polygon::PointType& v : boundary )
{
vertices.emplace_back( glm::vec3{ v.x, v.y, 0.0f } );
}
}
// Number of bottom/top face vertices is equal, since vertices are duplicated for bottom/top:
const uint32_t N = static_cast<uint32_t>( vertices.size() );
// Normals for bottom face:
std::vector< uint32_t > normals( N, sk_downNormal );
// Duplicate the vertices for the top face (z = 1) of the mesh:
for ( size_t i = 0; i < N; ++i )
{
vertices.emplace_back( glm::vec3{ vertices[i].x, vertices[i].y, 1.0f } );
}
// Normals for top face:
normals.insert( std::end( normals ), N, sk_upNormal );
// Add indices for bottom face, flipping orientation from clockwise to counter-clockwise:
std::vector< Polygon::IndexType > indices;
for ( size_t i = 0; i < polygon.numTriangles(); ++i )
{
const auto triangle = polygon.getTriangle( i );
indices.emplace_back( std::get<2>( triangle ) );
indices.emplace_back( std::get<1>( triangle ) );
indices.emplace_back( std::get<0>( triangle ) );
}
// Duplicate the indices for the top face, preserving the clockwise orientation,
// which is correct for the top face:
for ( size_t i = 0; i < polygon.numTriangles(); ++i )
{
const auto triangle = polygon.getTriangle( i );
indices.emplace_back( std::get<0>( triangle ) + N );
indices.emplace_back( std::get<1>( triangle ) + N );
indices.emplace_back( std::get<2>( triangle ) + N );
}
// Create side faces:
uint32_t offset = 0;
// Total number of vertices added thus far:
uint32_t vCount = 2 * N;
// Flag for whether sides are being added for the outside boundary (true)
// or for the holes on the inside (false):
bool outside = true;
for ( const auto& boundary : polygon.getAllVertices() )
{
for ( uint32_t i = 0; i < boundary.size(); ++i )
{
const uint32_t aBot = offset + i;
const uint32_t aTop = offset + i + N;
const uint32_t bBot = offset + (i + 1) % boundary.size();
const uint32_t bTop = offset + (i + 1) % boundary.size() + N;
const glm::vec3 aBotV = vertices[ aBot ];
const glm::vec3 aTopV = vertices[ aTop ];
const glm::vec3 bBotV = vertices[ bBot ];
const glm::vec3 bTopV = vertices[ bTop ];
// Add new vertices with new face normal:
vertices.push_back( aBotV ); // M + 0
vertices.push_back( aTopV ); // M + 1
vertices.push_back( bBotV ); // M + 2
vertices.push_back( bTopV ); // M + 3
// Add one normal per vertex:
const glm::vec3 faceNormal = glm::normalize( glm::cross( bBotV - aBotV, aTopV - aBotV ) );
const uint32_t packedNormal = glm::packSnorm3x10_1x2( glm::vec4{ faceNormal, 0.0f } );
normals.insert( std::end( normals ), 4, packedNormal );
// Flip face orientations based on whether the side belongs to the outside boundary
// or to the interior holes:
if ( outside )
{
indices.emplace_back( vCount + 0 ); // aBot
indices.emplace_back( vCount + 2 ); // bBot
indices.emplace_back( vCount + 3 ); // bTop
indices.emplace_back( vCount + 3 ); // bTop
indices.emplace_back( vCount + 1 ); // aTop
indices.emplace_back( vCount + 0 ); // aBot
}
else
{
indices.emplace_back( vCount + 3 ); // bTop
indices.emplace_back( vCount + 2 ); // bBot
indices.emplace_back( vCount + 0 ); // aBot
indices.emplace_back( vCount + 0 ); // aBot
indices.emplace_back( vCount + 1 ); // aTop
indices.emplace_back( vCount + 3 ); // bTop
}
// Increment total vertex count:
vCount += 4;
}
offset += boundary.size();
outside = false;
}
VertexAttributeInfo positionsInfo(
BufferComponentType::Float, BufferNormalizeValues::False,
3, sizeof( glm::vec3 ), 0, vertices.size() );
VertexAttributeInfo normalsInfo(
BufferComponentType::Int_2_10_10_10, BufferNormalizeValues::True,
4, sizeof( uint32_t ), 0, normals.size() );
VertexIndicesInfo indexInfo(
IndexType::UInt32, PrimitiveMode::Triangles,
indices.size(), 0 );
GLBufferObject positionsObject( BufferType::VertexArray, BufferUsagePattern::StaticDraw );
GLBufferObject normalsObject( BufferType::VertexArray, BufferUsagePattern::StaticDraw );
GLBufferObject indicesObject( BufferType::Index, BufferUsagePattern::StaticDraw );
positionsObject.generate();
normalsObject.generate();
indicesObject.generate();
positionsObject.allocate( sizeof( glm::vec3 ) * vertices.size() , vertices.data() );
normalsObject.allocate( sizeof( uint32_t ) * normals.size(), normals.data() );
indicesObject.allocate( sizeof( uint32_t ) * indices.size(), indices.data() );
auto gpuRecord = std::make_shared<MeshGpuRecord>(
std::move( positionsObject ),
std::move( indicesObject ),
positionsInfo, indexInfo );
gpuRecord->setNormals( std::move( normalsObject ), normalsInfo );
return std::make_unique<SlideAnnotationGpuRecord>( gpuRecord );
}
std::unique_ptr<GLTexture> createImageColorMapTexture( const ImageColorMap* colorMap )
{
if ( ! colorMap )
{
return nullptr;
}
auto texture = std::make_unique<GLTexture>( tex::Target::Texture1D );
texture->generate();
texture->setSize( glm::uvec3{ colorMap->numColors(), 1, 1 } );
texture->setData( 0, // level 0
ImageColorMap::textureFormat_RGBA_F32(),
tex::BufferPixelFormat::RGBA,
tex::BufferPixelDataType::Float32,
colorMap->data_RGBA_F32() );
// We should never sample outside the texture coordinate range [0.0, 1.0], anyway
texture->setWrapMode( tex::WrapMode::ClampToEdge );
// All sampling of color maps uses linearly interpolation
texture->setAutoGenerateMipmaps( false );
texture->setMinificationFilter( tex::MinificationFilter::Linear );
texture->setMagnificationFilter( tex::MagnificationFilter::Linear );
return texture;
}
std::unique_ptr<GLBufferTexture> createLabelColorTableTextureBuffer(
const ParcellationLabelTable* labels )
{
if ( ! labels )
{
return nullptr;
}
// Buffer contents will be modified once and used many times
auto colorMapTexture = std::make_unique<GLBufferTexture>(
labels->bufferTextureFormat_RGBA_F32(),
BufferUsagePattern::StaticDraw );
colorMapTexture->generate();
colorMapTexture->allocate( labels->numColorBytes_RGBA_F32(), labels->colorData_RGBA_premult_F32() );
colorMapTexture->attachBufferToTexture();
return colorMapTexture;
}
GLTexture createBlankRGBATexture(
const imageio::ComponentType& componentType,
const tex::Target& target )
{
using namespace imageio;
static std::array< int8_t, 4 > sk_data_I8 = { 0, 0, 0, 0 };
static std::array< uint8_t, 4 > sk_data_U8 = { 0, 0, 0, 0 };
static std::array< int16_t, 4 > sk_data_I16 = { 0, 0, 0, 0 };
static std::array< uint16_t, 4 > sk_data_U16 = { 0, 0, 0, 0 };
static std::array< int32_t, 4 > sk_data_I32 = { 0, 0, 0, 0 };
static std::array< uint32_t, 4 > sk_data_U32 = { 0, 0, 0, 0 };
static std::array< float, 4 > sk_data_F32 = { 0.0f, 0.0f, 0.0f, 0.0f };
static constexpr GLint sk_alignment = 1;
if ( tex::Target::TextureCubeMap == target ||
tex::Target::TextureBuffer == target )
{
throw_debug( "Invalid texture target type ");
}
GLTexture::PixelStoreSettings pixelPackSettings;
pixelPackSettings.m_alignment = sk_alignment;
GLTexture::PixelStoreSettings pixelUnpackSettings = pixelPackSettings;
GLTexture texture( target,
GLTexture::MultisampleSettings(),
pixelPackSettings,
pixelUnpackSettings );
texture.generate();
texture.setSize( glm::uvec3{ 1, 1, 1 } );
GLvoid* data;
switch ( componentType )
{
case ComponentType::Int8 : data = sk_data_I8.data(); break;
case ComponentType::UInt8 : data = sk_data_U8.data(); break;
case ComponentType::Int16 : data = sk_data_I16.data(); break;
case ComponentType::UInt16 : data = sk_data_U16.data(); break;
case ComponentType::Int32 : data = sk_data_I32.data(); break;
case ComponentType::UInt32 : data = sk_data_U32.data(); break;
case ComponentType::Int64 : throw_debug( "Int64 texture not supported" );
case ComponentType::UInt64 : throw_debug( "UInt64 texture not supported" );
case ComponentType::Float32 : data = sk_data_F32.data(); break;
case ComponentType::Double64 : throw_debug( "Double64 texture not supported" );
}
texture.setData( 0,
GLTexture::getSizedInternalRGBAFormat( componentType ),
GLTexture::getBufferPixelRGBAFormat( componentType ),
GLTexture::getBufferPixelDataType( componentType ),
data );
texture.setWrapMode( tex::WrapMode::ClampToEdge );
texture.setAutoGenerateMipmaps( false );
texture.setMinificationFilter( tex::MinificationFilter::Nearest );
texture.setMagnificationFilter( tex::MagnificationFilter::Nearest );
return texture;
}
}
| 35.702544 | 105 | 0.632756 | [
"mesh",
"vector",
"3d"
] |
c56d89cb9a67982128bc880d5f1d0eb938aece40 | 1,674 | cpp | C++ | modules/min_max/kernel.cpp | hxmhuang/OpenArray_Dev | 863866a6b7accf21fa253567b0e66143c7506cdf | [
"MIT"
] | 3 | 2020-09-08T05:01:56.000Z | 2020-11-23T13:11:25.000Z | modules/min_max/kernel.cpp | hxmhuang/OpenArray_Dev | 863866a6b7accf21fa253567b0e66143c7506cdf | [
"MIT"
] | null | null | null | modules/min_max/kernel.cpp | hxmhuang/OpenArray_Dev | 863866a6b7accf21fa253567b0e66143c7506cdf | [
"MIT"
] | 2 | 2019-08-16T08:32:30.000Z | 2020-02-10T08:44:04.000Z |
#include "kernel.hpp"
///:include "../../NodeType.fypp"
namespace oa{
namespace kernel{
///:for k in ['min', 'max', 'min_at', 'max_at', 'abs_max', 'abs_min', 'abs_max_at', 'abs_min_at']
///:set name = k
// crate kernel_${name}$
// A = ${name}$(A)
ArrayPtr kernel_${name}$(vector<ArrayPtr> &ops_ap) {
ArrayPtr u = ops_ap[0];
ArrayPtr ap;
int u_dt = u->get_data_type();
switch(u_dt) {
case DATA_INT:
ap = t_kernel_${name}$<int>(ops_ap);
break;
case DATA_FLOAT:
ap = t_kernel_${name}$<float>(ops_ap);
break;
case DATA_DOUBLE:
ap = t_kernel_${name}$<double>(ops_ap);
break;
}
return ap;
}
///:endfor
///:for k in [i for i in L if i[3] == 'I']
///:set name = k[1]
///:set kernel_name = k[2]
ArrayPtr kernel_${name}$(vector<ArrayPtr> &ops_ap) {
static bool has_init = false;
static KernelPtr kernel_table[27];
if (!has_init) {
///:mute
///:set i = 0
///:include "../../kernel_type.fypp"
///:endmute
///:for i in T
///:set id = i[0]
kernel_table[${id}$] =
t_kernel_${name}$<${i[1]}$, ${i[2]}$, ${i[3]}$>;
///:endfor
has_init = true;
}
const ArrayPtr& u = ops_ap[0];
const ArrayPtr& v = ops_ap[1];
const int u_dt = u->get_data_type();
const int v_dt = u->get_data_type();
const int r_dt = oa::utils::cast_data_type(u_dt, v_dt);
int case_num = r_dt * 9 + u_dt * 3 + v_dt;
ArrayPtr ap = kernel_table[case_num](ops_ap);
return ap;
}
///:endfor
}
}
| 24.26087 | 102 | 0.507766 | [
"vector"
] |
c56fda41a3a045f2e2ed5b74c852c7b68caca226 | 2,779 | cpp | C++ | TP3_Prog_SpaceSim/projectile.cpp | Arganancer/S3_TP3_Prog_SpaceSim | 43364f6613ad690f81c94f8a027ee3708fa58d3d | [
"MIT"
] | null | null | null | TP3_Prog_SpaceSim/projectile.cpp | Arganancer/S3_TP3_Prog_SpaceSim | 43364f6613ad690f81c94f8a027ee3708fa58d3d | [
"MIT"
] | null | null | null | TP3_Prog_SpaceSim/projectile.cpp | Arganancer/S3_TP3_Prog_SpaceSim | 43364f6613ad690f81c94f8a027ee3708fa58d3d | [
"MIT"
] | null | null | null | #include "projectile.h"
#include "tools.hpp"
projectile::projectile(Vector2f position, float mass, Vector2f direction, float angle):
collidable(position, mass),
owner_(npc),
max_time_(0),
projectile_scale_(0)
{
direction_ = direction;
projectile_damage_ = 0;
percentage_time_elapsed_ = 0;
time_since_created_ = 0;
}
projectile::~projectile()
{
}
void projectile::update(float delta_t)
{
calculate_velocity(delta_t);
shape_projectile_.setPosition(position_);
shape_projectile_.setRotation(rotation_angle_);
}
int projectile::get_damage() const
{
return projectile_damage_;
}
void projectile::set_owner(faction owner)
{
owner_ = owner;
}
projectile::faction projectile::get_owner() const
{
return owner_;
}
void projectile::draw(RenderWindow& main_win)
{
main_win.draw(shape_projectile_);
}
FloatRect projectile::get_global_bounds() const
{
return shape_projectile_.getGlobalBounds();
}
vector<Vector2f> projectile::get_axes()
{
vector<Vector2f> axes;
for (size_t i = 0; i < shape_projectile_.getPointCount(); i++)
{
Transform shape_transform = shape_projectile_.getTransform();
const auto point1 = shape_transform.transformPoint(
shape_projectile_.getPoint(i));
const auto point2 = shape_transform.transformPoint(
shape_projectile_.getPoint(i + 1 == shape_projectile_.getPointCount() ? 0 : i + 1));
const auto edge = point1 - point2;
/* The normal of an edge can obtained by
flipping the coordinates and negating one. */
const auto unit_normal = tools::vec_util::direction_normal(edge);
/* When evaluating collisions using the SAT method,
* there is no need to verify axes that are parallel. */
auto parallel_axis_exists = false;
for (auto axes_it = axes.begin(); axes_it != axes.end(); ++axes_it)
{
if (tools::vec_util::dot(*axes_it, unit_normal))
{
parallel_axis_exists = true;
break;
}
}
if (!parallel_axis_exists)
{
axes.push_back(unit_normal);
}
}
return axes;
}
vector<ConvexShape> projectile::get_shapes()
{
vector<ConvexShape> shape;
shape.push_back(shape_projectile_);
return shape;
}
void projectile::set_shape_points(ConvexShape& shape, float size)
{
shape.setPointCount(4);
shape.setPoint(0, Vector2f(0, 0));
shape.setPoint(1, Vector2f(size, 0));
shape.setPoint(2, Vector2f(size, size));
shape.setPoint(3, Vector2f(0, size));
shape.setOrigin(size * 0.5f, size * 0.5f);
}
void projectile::set_shape_points(ConvexShape& shape, float width, float height)
{
shape.setPointCount(4);
shape.setPoint(0, Vector2f(0, 0));
shape.setPoint(1, Vector2f(width, 0));
shape.setPoint(2, Vector2f(width, height));
shape.setPoint(3, Vector2f(0, height));
shape.setOrigin(width * 0.5f, height * 0.5f);
}
bool projectile::is_emp() const
{
return emp;
}
| 23.752137 | 88 | 0.725441 | [
"shape",
"vector",
"transform"
] |
c5711d084f257f355e7dcb1f7881f9b0d2f1f05e | 34,196 | cpp | C++ | released_plugins/v3d_plugins/bigneuron_chingwei_ENT/ENT_plugin.cpp | zzhmark/vaa3d_tools | 3ca418add85a59ac7e805d55a600b78330d7e53d | [
"MIT"
] | 1 | 2021-12-27T19:14:03.000Z | 2021-12-27T19:14:03.000Z | released_plugins/v3d_plugins/bigneuron_chingwei_ENT/ENT_plugin.cpp | zzhmark/vaa3d_tools | 3ca418add85a59ac7e805d55a600b78330d7e53d | [
"MIT"
] | 1 | 2016-12-03T05:33:13.000Z | 2016-12-03T05:33:13.000Z | released_plugins/v3d_plugins/bigneuron_chingwei_ENT/ENT_plugin.cpp | zzhmark/vaa3d_tools | 3ca418add85a59ac7e805d55a600b78330d7e53d | [
"MIT"
] | null | null | null | /* ENT_plugin.cpp
* The plugin is called ensemble neuron tracer.
* Developers: Ching-Wei Wang, Hilmil Pradana, Cheng-Ta Huang
* Institution: National Taiwan University of Science and Technology
* Website: http://www-o.ntust.edu.tw/~cweiwang/
* Email: cweiwang@mail.ntust.edu.tw
* Release date: 2016-1-8
*/
#include "v3d_message.h"
#include <vector>
#include <math.h>
#include "basic_surf_objs.h"
#include "ENT_plugin.h"
#include "vn_imgpreprocess.h"
#include "fastmarching_dt.h"
#include "fastmarching_tree.h"
#include "hierarchy_prune.h"
#include "marker_radius.h"
Q_EXPORT_PLUGIN2(APP2_ported, APP2_ported);
using namespace std;
struct input_PARA
{
QString inimg_file;
V3DLONG channel;
};
struct saveData
{
int x;
int y;
int z;
int parent;
int child;
int blockX;
int blockY;
};
void reconstruction_func(V3DPluginCallback2 &callback, QWidget *parent, input_PARA &PARA, bool bmenu);
const vector<MyMarker*> APP2(unsigned char* data1d, V3DLONG N, V3DLONG M, V3DLONG P, V3DLONG sc);
unsigned char*** Convert1D3D (unsigned char* inimg1d, V3DLONG x, V3DLONG y, V3DLONG z);
unsigned char* Convert3D1D (unsigned char*** inimg1d, V3DLONG x, V3DLONG y, V3DLONG z);
unsigned char*** Erotion (unsigned char*** data1d, V3DLONG x, V3DLONG y, V3DLONG z);
unsigned char*** Dilation (unsigned char*** data1d, V3DLONG x, V3DLONG y, V3DLONG z);
vector<MyMarker*> Combining(vector<MyMarker*> main, vector<MyMarker*> adding);
unsigned char *BVersion(unsigned char *inimg1d, V3DLONG size);
unsigned char* NVersion (unsigned char* inimg1d, V3DLONG size);
unsigned char* SVersion (unsigned char* inimg1d, V3DLONG size);
double Learning(unsigned char* img1D, V3DLONG x, V3DLONG y, V3DLONG z, V3DLONG blockX, V3DLONG blockY);
void Partition(unsigned char* data1d, V3DLONG x, V3DLONG y, V3DLONG z, int &numLocationBlockX, int &numLocationBlockY, int &blockX, int &blockY);
unsigned char* cubeLocation(unsigned char* inimg1d, V3DLONG x, V3DLONG y, V3DLONG z, int numLocationBlockX, int numLocationBlockY);
vector<MyMarker*> BaseTracer(unsigned char* img1D, V3DLONG X, V3DLONG Y, V3DLONG Z, V3DLONG sc);
unsigned char *data1d_1ch;
Image4DSimple *p4dImageNew = 0;
QStringList APP2_ported::menulist() const
{
return QStringList()
<<tr("tracing_menu")
<<tr("about");
}
QStringList APP2_ported::funclist() const
{
return QStringList()
<<tr("tracing_func")
<<tr("help");
}
void APP2_ported::domenu(const QString &menu_name, V3DPluginCallback2 &callback, QWidget *parent)
{
if (menu_name == tr("tracing_menu"))
{
bool bmenu = true;
input_PARA PARA;
reconstruction_func(callback,parent,PARA,bmenu);
}
else
{
v3d_msg(tr("The plugin is called ensemble neuron tracer."
"Developed by Ching-Wei Wang(cweiwang@mail.ntust.edu.tw) email: cweiwang@mail.ntust.edu.tw, Hilmil Pradana, Cheng-Ta Huang, National Taiwan University of Science and Technology, 2016-1-8"));
}
}
bool APP2_ported::dofunc(const QString & func_name, const V3DPluginArgList & input, V3DPluginArgList & output, V3DPluginCallback2 & callback, QWidget * parent)
{
if (func_name == tr("tracing_func"))
{
bool bmenu = false;
input_PARA PARA;
vector<char*> * pinfiles = (input.size() >= 1) ? (vector<char*> *) input[0].p : 0;
vector<char*> * pparas = (input.size() >= 2) ? (vector<char*> *) input[1].p : 0;
vector<char*> infiles = (pinfiles != 0) ? * pinfiles : vector<char*>();
vector<char*> paras = (pparas != 0) ? * pparas : vector<char*>();
if(infiles.empty())
{
fprintf (stderr, "Need input image. \n");
return false;
}
else
PARA.inimg_file = infiles[0];
int k=0;
PARA.channel = (paras.size() >= k+1) ? atoi(paras[k]) : 1; k++;
reconstruction_func(callback,parent,PARA,bmenu);
}
else if (func_name == tr("help"))
{
////HERE IS WHERE THE DEVELOPERS SHOULD UPDATE THE USAGE OF THE PLUGIN
printf("**** Usage of APP2_ported tracing **** \n");
printf("vaa3d -x APP2_ported -f tracing_func -i <inimg_file> -p <channel> <other parameters>\n");
printf("inimg_file The input image\n");
printf("channel Data channel for tracing. Start from 1 (default 1).\n");
printf("outswc_file Will be named automatically based on the input image file name, so you don't have to specify it.\n\n");
}
else return false;
return true;
}
void reconstruction_func(V3DPluginCallback2 &callback, QWidget *parent, input_PARA &PARA, bool bmenu)
{
unsigned char* data1d = 0;
V3DLONG N,M,P,sc,c;
V3DLONG in_sz[4];
if(bmenu)
{
v3dhandle curwin = callback.currentImageWindow();
if (!curwin)
{
QMessageBox::information(0, "", "You don't have any image open in the main window.");
return;
}
Image4DSimple* p4DImage = callback.getImage(curwin);
if (!p4DImage)
{
QMessageBox::information(0, "", "The image pointer is invalid. Ensure your data is valid and try again!");
return;
}
if(p4DImage->getDatatype()!=V3D_UINT8)
{
QMessageBox::information(0, "", "Please convert the image to be UINT8 and try again!");
return;
}
data1d = p4DImage->getRawData();
N = p4DImage->getXDim();
M = p4DImage->getYDim();
P = p4DImage->getZDim();
sc = p4DImage->getCDim();
bool ok1;
if(sc==1)
{
c=1;
ok1=true;
}
else
{
c = QInputDialog::getInteger(parent, "Channel",
"Enter channel NO:",
1, 1, sc, 1, &ok1);
}
if(!ok1)
return;
in_sz[0] = N;
in_sz[1] = M;
in_sz[2] = P;
in_sz[3] = sc;
PARA.inimg_file = p4DImage->getFileName();
}
else
{
int datatype = 0;
if (!simple_loadimage_wrapper(callback,PARA.inimg_file.toStdString().c_str(), data1d, in_sz, datatype))
{
fprintf (stderr, "Error happens in reading the subject file [%s]. Exit. \n",PARA.inimg_file.toStdString().c_str());
return;
}
if(PARA.channel < 1 || PARA.channel > in_sz[3])
{
fprintf (stderr, "Invalid channel number. \n");
return;
}
if(datatype !=1)
{
fprintf (stderr, "Please convert the image to be UINT8 and try again!\n");
return;
}
N = in_sz[0];
M = in_sz[1];
P = in_sz[2];
sc = in_sz[3];
c = PARA.channel;
}
//main neuron reconstruction code
//// THIS IS WHERE THE DEVELOPERS SHOULD ADD THEIR OWN NEURON TRACING CODE
/*****************************************************************************************/
/** inisialization **/
// vector<MyMarker*> Tracer1, Tracer2, Tracer3, Result;
unsigned char* img1D1 = new unsigned char[(in_sz[0]*in_sz[1]*in_sz[2])];
unsigned char* img1D2 = new unsigned char[(in_sz[0]*in_sz[1]*in_sz[2])];
unsigned char* img1D3 = new unsigned char[(in_sz[0]*in_sz[1]*in_sz[2])];
/* for (V3DLONG i=0;i<(in_sz[0]*in_sz[1]*in_sz[2]);i++)
{
img1D1[i] = data1d[i];
img1D2[i] = data1d[i];
img1D3[i] = data1d[i];
}*/
memcpy(img1D1, data1d, (in_sz[0]*in_sz[1]*in_sz[2]));
memcpy(img1D2, data1d, (in_sz[0]*in_sz[1]*in_sz[2]));
memcpy(img1D3, data1d, (in_sz[0]*in_sz[1]*in_sz[2]));
/* unsigned char*** img3D;
img3D = new unsigned char**[in_sz[2]];
for(int i = 0; i < in_sz[2]; ++i)
{
img3D[i] = new unsigned char*[in_sz[1]];
for(int j = 0; j < in_sz[1]; ++j) img3D[i][j] = new unsigned char[in_sz[0]];
}*/
double val[3], maximumD, idx;
int topDown, leftRight, blockX, blockY, maximumI;
/** end of inisialization **/
/*****************************************************************************************/
/*****************************************************************************************/
/** function **/
/* img1D = Contrast(data1d, in_sz[0]*in_sz[1]*in_sz[2], PARA, 50);
Image4DSimple* p4DImageNew1 = 0;
p4DImageNew1 = new Image4DSimple;
v3dhandle newwin1 = callback.newImageWindow();
p4DImageNew1->setData(img1D, in_sz[0], in_sz[1], in_sz[2], 1, V3D_UINT8);
callback.setImage(newwin1, p4DImageNew1);
callback.setImageName(newwin1, QObject::tr("Image Partition"));*/
/*for (V3DLONG i=0;i<(in_sz[0]*in_sz[1]*in_sz[2]);i++)
{
if (data1d[i]>0) img1D[i] = 255;
else img1D[i] = 0;
}*/
Partition(data1d, in_sz[0], in_sz[1], in_sz[2], topDown, leftRight, blockX, blockY);
img1D1 = NVersion(img1D1, in_sz[0]*in_sz[1]*in_sz[2]);
val[0] = Learning(img1D1, in_sz[0], in_sz[1], in_sz[2], leftRight, topDown);
img1D2 = SVersion(img1D2, in_sz[0]*in_sz[1]*in_sz[2]);
val[1] = Learning(img1D2, in_sz[0], in_sz[1], in_sz[2], leftRight, topDown);
img1D3 = BVersion(img1D3, in_sz[0]*in_sz[1]*in_sz[2]);
val[2] = Learning(img1D3, in_sz[0], in_sz[1], in_sz[2], leftRight, topDown);
if (val[0] == 0 && val[1] == 0 && val[2] == 0)
{
// very clean
vector<MyMarker*> Result[3];
bool maxNode[3];
maxNode[0] = true;
maxNode[1] = true;
maxNode[2] = true;
int resultSize[3];
Result[0] = BaseTracer(img1D1, in_sz[0], in_sz[1], in_sz[2], sc);
Result[1] = BaseTracer(img1D2, in_sz[0], in_sz[1], in_sz[2], sc);
Result[2] = BaseTracer(img1D3, in_sz[0], in_sz[1], in_sz[2], sc);
resultSize[0] = Result[0].size();
resultSize[1] = Result[1].size();
resultSize[2] = Result[2].size();
if (resultSize[0]>11000) resultSize[0] = 0;
if (resultSize[1]>11000) resultSize[1] = 0;
if (resultSize[2]>11000) resultSize[2] = 0;
maximumI = max(resultSize[0], resultSize[1]);
maximumI = max(maximumI, resultSize[2]);
for (int i=0;i<3;i++)
{
if (maximumI == Result[i].size())
{
QString swc_name = PARA.inimg_file + "_ENT.swc";
saveSWC_file(swc_name.toStdString(), Result[i]);
}
}
}
else
{
// noise
vector<MyMarker*> Result1, Result2;
maximumD = max(val[0], val[1]);
maximumD = max(maximumD, val[2]);
for (int i=0;i<3;i++)
{
if (val[i]==maximumD) idx = i;
}
if (idx == 0)
{
Result1 = BaseTracer(img1D2, in_sz[0], in_sz[1], in_sz[2], sc);
Result2 = BaseTracer(img1D3, in_sz[0], in_sz[1], in_sz[2], sc);
}
else if (idx == 1)
{
Result1 = BaseTracer(img1D1, in_sz[0], in_sz[1], in_sz[2], sc);
Result2 = BaseTracer(img1D3, in_sz[0], in_sz[1], in_sz[2], sc);
}
else
{
Result1 = BaseTracer(img1D1, in_sz[0], in_sz[1], in_sz[2], sc);
Result2 = BaseTracer(img1D2, in_sz[0], in_sz[1], in_sz[2], sc);
}
if (Result1.size()>11000)
{
QString swc_name = PARA.inimg_file + "_ENT.swc";
saveSWC_file(swc_name.toStdString(), Result2);
}
else if (Result2.size()>11000)
{
QString swc_name = PARA.inimg_file + "_ENT.swc";
saveSWC_file(swc_name.toStdString(), Result1);
}
else
{
maximumI = max(Result1.size(), Result2.size());
if (maximumI == Result1.size())
{
QString swc_name = PARA.inimg_file + "_ENT.swc";
saveSWC_file(swc_name.toStdString(), Result1);
}
else
{
QString swc_name = PARA.inimg_file + "_ENT.swc";
saveSWC_file(swc_name.toStdString(), Result2);
}
}
}
/* QString swc_name1 = PARA.inimg_file + "NVersionNew.swc";
saveSWC_file(swc_name1.toStdString(), Result1);
QString swc_name2 = PARA.inimg_file + "SVersionNew.swc";
saveSWC_file(swc_name2.toStdString(), Result2);
QString swc_name3 = PARA.inimg_file + "BVersionNew.swc";
saveSWC_file(swc_name3.toStdString(), Result3);
cout << value1 << " " << value2 << " " << value3 << endl << endl;*/
/** end of function **/
/*****************************************************************************************/
/*****************************************************************************************/
/* Image4DSimple* p4DImageNew1 = 0;
p4DImageNew1 = new Image4DSimple;
v3dhandle newwin1 = callback.newImageWindow();
p4DImageNew1->setData(img1D1, in_sz[0], in_sz[1], in_sz[2], 1, V3D_UINT8);
callback.setImage(newwin1, p4DImageNew1);
callback.setImageName(newwin1, QObject::tr("NVersionNew"));
Image4DSimple* p4DImageNew2 = 0;
p4DImageNew2 = new Image4DSimple;
v3dhandle newwin2 = callback.newImageWindow();
p4DImageNew2->setData(img1D2, in_sz[0], in_sz[1], in_sz[2], 1, V3D_UINT8);
callback.setImage(newwin2, p4DImageNew2);
callback.setImageName(newwin2, QObject::tr("SVersionNew"));
Image4DSimple* p4DImageNew3 = 0;
p4DImageNew3 = new Image4DSimple;
v3dhandle newwin3 = callback.newImageWindow();
p4DImageNew3->setData(img1D3, in_sz[0], in_sz[1], in_sz[2], 1, V3D_UINT8);
callback.setImage(newwin3, p4DImageNew3);
callback.setImageName(newwin3, QObject::tr("BVersionNew"));*/
/*****************************************************************************************/
return;
}
vector<MyMarker*> BaseTracer(unsigned char* img1D, V3DLONG X, V3DLONG Y, V3DLONG Z, V3DLONG sc)
{
/*****************************************************************************************/
/** inisialization **/
V3DLONG in_sz[3];
in_sz[0] = X;
in_sz[1] = Y;
in_sz[2] = Z;
vector<MyMarker*> Tracer1, Tracer2, Tracer3, Result;
unsigned char*** img3D;
img3D = new unsigned char**[in_sz[2]];
for(int i = 0; i < in_sz[2]; ++i)
{
img3D[i] = new unsigned char*[in_sz[1]];
for(int j = 0; j < in_sz[1]; ++j) img3D[i][j] = new unsigned char[in_sz[0]];
}
/** end of inisialization **/
/*****************************************************************************************/
Tracer1 = APP2(img1D, in_sz[0], in_sz[1], in_sz[2], sc);
img3D = Convert1D3D (img1D, in_sz[0], in_sz[1], in_sz[2]);
delete[] img1D;
img3D = Erotion (img3D, in_sz[0], in_sz[1], in_sz[2]);
img1D = Convert3D1D (img3D, in_sz[0], in_sz[1], in_sz[2]);
Tracer2 = APP2(img1D, in_sz[0], in_sz[1], in_sz[2], sc);
delete[] img1D;
img3D = Dilation (img3D, in_sz[0], in_sz[1], in_sz[2]);
img1D = Convert3D1D (img3D, in_sz[0], in_sz[1], in_sz[2]);
Tracer3 = APP2(img1D, in_sz[0], in_sz[1], in_sz[2], sc);
delete[] img1D;
Result = Combining(Tracer2, Tracer1);
Result = Combining(Result, Tracer3);
Tracer1.clear();
Tracer2.clear();
Tracer3.clear();
cout << endl << endl << "End of Tracer." << endl << endl;
return Result;
}
unsigned char* cubeLocation(unsigned char* inimg1d, V3DLONG X, V3DLONG Y, V3DLONG Z, int numLocationBlockX, int numLocationBlockY)
{
/*********************************************************************************/
/****************************/
V3DLONG sz[3];
sz[0] = ((int)(X/8)) * 8;
sz[1] = ((int)(Y/8)) * 8;
sz[2] = Z;
unsigned char* imgPartition;
V3DLONG sizeImage = (sz[0]*sz[1]*sz[2])/64;
imgPartition = new unsigned char[sizeImage];
/****************************/
int countImgPartion = 0;
int count = 0;
int xx = sz[0]/8;
int yy = sz[1]/8;
/*********************************************************************************/
// separate 1D data to 64 seperate 1D data
/****************************/
for (V3DLONG k=0;k<sz[2];k++)
{
for (V3DLONG i=0;i<sz[0];i++)
{
for (V3DLONG j=0;j<sz[1];j++)
{
if (i>=(numLocationBlockX*xx) && i<((numLocationBlockX+1)*xx))
{
if (j>=(numLocationBlockY*yy) && j<((numLocationBlockY+1)*yy))
{
imgPartition[countImgPartion] = inimg1d[count];
countImgPartion = countImgPartion + 1;
}
}
count++;
}
}
}
return imgPartition;
}
double Learning(unsigned char* img1D, V3DLONG X, V3DLONG Y, V3DLONG Z, V3DLONG blockX, V3DLONG blockY)
{
V3DLONG sz[3];
sz[0] = ((int)(X/8)) * 8;
sz[1] = ((int)(Y/8)) * 8;
sz[2] = Z;
unsigned char* imgPartition;
V3DLONG sizeImage = (sz[0]*sz[1]*sz[2])/64;
imgPartition = new unsigned char[sizeImage];
imgPartition = cubeLocation(img1D, X, Y, Z, blockX, blockY);
V3DLONG numOfPixel = 0;
double probability;
for (V3DLONG i=0;i<sizeImage;i++)
{
if (imgPartition[i]!=0) numOfPixel++;
}
delete[] imgPartition;
probability = ((double)numOfPixel)/((double)sizeImage);
return probability;
}
void Partition(unsigned char* data1d, V3DLONG X, V3DLONG Y, V3DLONG Z, int &numLocationBlockX, int &numLocationBlockY, int &blockX, int &blockY)
{
/*********************************************************************************/
/****************************/
V3DLONG sz[3];
sz[0] = ((int)(X/8)) * 8;
sz[1] = ((int)(Y/8)) * 8;
sz[2] = Z;
/****************************/
unsigned char*** img3D;
img3D = new unsigned char**[sz[2]];
for(int x = 0; x < sz[2]; ++x)
{
img3D[x] = new unsigned char*[sz[1]];
for(int y = 0; y < sz[1]; ++y) img3D[x][y] = new unsigned char[sz[0]];
}
/****************************/
/****************************/
unsigned char ** img2D = new unsigned char*[sz[1]];
for(int i = 0; i < sz[1]; ++i)
img2D[i] = new unsigned char[sz[0]];
/****************************/
/****************************/
unsigned char* imgPartition;
V3DLONG sizeImage = (sz[0]*sz[1]*sz[2])/64;
imgPartition = new unsigned char[sizeImage];
/****************************/
unsigned char maxRow;
unsigned char maxValue = 0;
int maximumRow;
int maximumBlock = 0;
int count = 0, countPartition = 0;
int numOfPixel = 0;
/*********************************************************************************/
// convert 1D data to 3D data
/****************************/
for (int k=0;k<sz[2];k++)
{
for (int j=0;j<sz[1];j++)
{
for (int i=0;i<sz[0];i++)
{
img3D[k][j][i] = data1d[i+(j*X)+(k*X*Y)];
}
}
}
/****************************/
// convert 3D data to 2D data
/****************************/
for (int i=0;i<sz[1];i++)
{
for (int j=0;j<sz[0];j++)
{
//img2D[i][j] = img3D[0][i][j];
for (int k=1;k<sz[2];k++)
{
img2D[i][j] = max(img3D[0][i][j], img3D[k][i][j]);
}
}
}
delete[] img3D;
/****************************/
// maximum intensity in image 2D
/****************************/
for (int i=0;i<sz[1];i++)
{
maxRow = img2D[i][0];
for (int j=1;j<sz[0];j++)
{
maxRow = max(maxRow, img2D[i][j]);
}
maxValue = max(maxValue, maxRow);
}
/****************************/
// search block which has maxValue
/****************************/
for (int i=0;i<sz[1];i++)
{
for (int j=1;j<sz[0];j++)
{
if (img2D[i][j]<maxValue) img2D[i][j] = 0;
else img2D[i][j] = 1;
}
}
int blockCount[8][8];
int coordinateX, coordinateY;
for (int i=0;i<8;i++)
{
for (int j=0;j<8;j++)
{
blockCount[i][j] = 0;
}
}
for (int i=0;i<sz[1];i++)
{
for (int j=0;j<sz[0];j++)
{
if (img2D[i][j]==1)
{
coordinateX = (i*8)/sz[0];
coordinateY = (j*8)/sz[1];
blockCount[coordinateX][coordinateY] = blockCount[coordinateX][coordinateY]+1;
}
}
}
for (int i=0;i<8;i++)
{
maximumRow = blockCount[i][0];
for (int j=1;j<8;j++)
{
maximumRow = max(maximumRow, blockCount[i][j]);
}
maximumBlock = max(maximumBlock, maximumRow);
}
for (int i=0;i<8;i++)
{
for (int j=0;j<8;j++)
{
if (blockCount[i][j] == maximumBlock)
{
numLocationBlockX = i;
numLocationBlockY = j;
}
}
}
if (numLocationBlockX>=0 && numLocationBlockX<=3)
{
if (numLocationBlockY >=0 && numLocationBlockY <=3)
{
// pojok kanan bawah
blockX = 7;
blockY = 7;
}
else
{
// pojok kiri bawah
blockX = 7;
blockY = 0;
}
}
else
{
if (numLocationBlockY >=0 && numLocationBlockY <=3)
{
// pojok kanan atas
blockX = 0;
blockY = 7;
}
else
{
// pojok kiri atas
blockX = 0;
blockY = 0;
}
}
/***********************/
}
unsigned char*** Convert1D3D (unsigned char* inimg1d, V3DLONG x, V3DLONG y, V3DLONG z)
{
unsigned char*** img3D;
img3D = new unsigned char**[z];
for(int i = 0; i < z; ++i)
{
img3D[i] = new unsigned char*[y];
for(int j = 0; j < y; ++j) img3D[i][j] = new unsigned char[x];
}
for (int k=0;k<z;k++)
{
for (int j=0;j<y;j++)
{
for (int i=0;i<x;i++)
{
img3D[k][j][i] = inimg1d[i+(j*x)+(k*x*y)];
}
}
}
return img3D;
}
unsigned char* Convert3D1D (unsigned char*** inimg1d, V3DLONG x, V3DLONG y, V3DLONG z)
{
unsigned char* img1D = new unsigned char[x*y*z];
V3DLONG count = 0;
for (int k=0;k<z;k++)
{
for (int j=0;j<y;j++)
{
for (int i=0;i<x;i++)
{
img1D[count] = inimg1d[k][j][i];
count++;
}
}
}
return img1D;
}
unsigned char*** Erotion (unsigned char*** data1d, V3DLONG x, V3DLONG y, V3DLONG z)
{
unsigned char*** img3D;
img3D = new unsigned char**[z];
for(int i = 0; i < z; ++i)
{
img3D[i] = new unsigned char*[y];
for(int j = 0; j < y; ++j) img3D[i][j] = new unsigned char[x];
}
for (int k=0;k<z;k++)
{
for (int j=0;j<y;j++)
{
for (int i=0;i<x;i++)
{
img3D[k][j][i] = 0;
}
}
}
for (int k=1;k<z-1;k++)
{
for (int j=1;j<y-1;j++)
{
for (int i=1;i<x-1;i++)
{
if (data1d[k][j][i]==255)
{
img3D[k][j][i] = 255;
img3D[k][j][i+1] = 255;
img3D[k][j][i-1] = 255;
img3D[k][j-1][i] = 255;
img3D[k][j+1][i] = 255;
img3D[k+1][j][i] = 255;
img3D[k-1][j][i] = 255;
}
}
}
}
return img3D;
}
unsigned char*** Dilation (unsigned char*** data1d, V3DLONG x, V3DLONG y, V3DLONG z)
{
unsigned char*** img3D;
img3D = new unsigned char**[z];
for(int i = 0; i < z; ++i)
{
img3D[i] = new unsigned char*[y];
for(int j = 0; j < y; ++j) img3D[i][j] = new unsigned char[x];
}
for (int k=0;k<z;k++)
{
for (int j=0;j<y;j++)
{
for (int i=0;i<x;i++)
{
img3D[k][j][i] = 0;
}
}
}
for (int k=1;k<z-1;k++)
{
for (int j=1;j<y-1;j++)
{
for (int i=1;i<x-1;i++)
{
if (data1d[k][j][i]==255 && data1d[k][j][i+1]==255 && data1d[k][j][i-1]==255 && data1d[k][j-1][i]==255 && data1d[k][j+1][i]==255 && data1d[k+1][j][i]==255 && data1d[k-1][j][i]==255)
{
img3D[k][j][i] = 255;
}
}
}
}
return img3D;
}
const vector<MyMarker*> APP2(unsigned char* data1d, V3DLONG N, V3DLONG M, V3DLONG P, V3DLONG sc)
{
V3DLONG in_sz[4], c;
in_sz[0] = N;
in_sz[1] = M;
in_sz[2] = P;
in_sz[3] = sc;
c = 1;
vector<MyMarker*> outswc;
V3DLONG pagesz = N*M*P;
delete data1d_1ch;
try {data1d_1ch = new unsigned char [pagesz];}
catch(...)
{
v3d_msg("cannot allocate memory for data1d_1ch.");
return outswc;
}
for(V3DLONG i = 0; i < pagesz; i++)
data1d_1ch[i] = data1d[i+(c-1)*pagesz];
if (p4dImageNew)
{
delete p4dImageNew;
p4dImageNew=0;
}
//delete p4dImageNew;
p4dImageNew = new Image4DSimple;
if(!p4dImageNew->createImage(N,M,P,1, V3D_UINT8))
{
return outswc;
}
memcpy(p4dImageNew->getRawData(), data1d_1ch, pagesz);
unsigned char * indata1d;
indata1d = p4dImageNew->getRawDataAtChannel(0);
in_sz[3] = 1;
double dfactor_xy = 1, dfactor_z = 1;
if (in_sz[0]<=256 && in_sz[1]<=256 && in_sz[2]<=256)
{
dfactor_z = dfactor_xy = 1;
}
else if (in_sz[0] >= 2*in_sz[2] || in_sz[1] >= 2*in_sz[2])
{
if (in_sz[2]<=256)
{
double MM = in_sz[0];
if (MM<in_sz[1]) MM=in_sz[1];
dfactor_xy = MM / 256.0;
dfactor_z = 1;
}
else
{
double MM = in_sz[0];
if (MM<in_sz[1]) MM=in_sz[1];
if (MM<in_sz[2]) MM=in_sz[2];
dfactor_xy = dfactor_z = MM / 256.0;
}
}
else
{
double MM = in_sz[0];
if (MM<in_sz[1]) MM=in_sz[1];
if (MM<in_sz[2]) MM=in_sz[2];
dfactor_xy = dfactor_z = MM / 256.0;
}
printf("dfactor_xy=%5.3f\n", dfactor_xy);
printf("dfactor_z=%5.3f\n", dfactor_z);
if (dfactor_z>1 || dfactor_xy>1)
{
v3d_msg("enter ds code", 0);
V3DLONG out_sz[4];
unsigned char * outimg=0;
delete[] outimg;
if (!downsampling_img_xyz(indata1d, in_sz, dfactor_xy, dfactor_z, outimg, out_sz))
return outswc;
p4dImageNew->setData(outimg, out_sz[0], out_sz[1], out_sz[2], out_sz[3], V3D_UINT8);
indata1d = p4dImageNew->getRawDataAtChannel(0);
in_sz[0] = p4dImageNew->getXDim();
in_sz[1] = p4dImageNew->getYDim();
in_sz[2] = p4dImageNew->getZDim();
in_sz[3] = p4dImageNew->getCDim();
}
vector<MyMarker *> outtree;
cout<<"Start detecting cellbody"<<endl;
float * phi = 0;
vector<MyMarker> inmarkers;
fastmarching_dt_XY(indata1d, phi, in_sz[0], in_sz[1], in_sz[2],2, 10);
V3DLONG sz0 = in_sz[0];
V3DLONG sz1 = in_sz[1];
V3DLONG sz2 = in_sz[2];
V3DLONG sz01 = sz0 * sz1;
V3DLONG tol_sz = sz01 * sz2;
V3DLONG max_loc = 0;
double max_val = phi[0];
for(V3DLONG i = 0; i < tol_sz; i++)
{
if(phi[i] > max_val)
{
max_val = phi[i];
max_loc = i;
}
}
MyMarker max_marker(max_loc % sz0, max_loc % sz01 / sz0, max_loc / sz01);
inmarkers.push_back(max_marker);
cout<<"======================================="<<endl;
cout<<"Construct the neuron tree"<<endl;
v3d_msg("8bit", 0);
fastmarching_tree(inmarkers[0], indata1d, outtree, in_sz[0], in_sz[1], in_sz[2], 2, 10, false);
cout<<"======================================="<<endl;
//save a copy of the ini tree
cout<<"Save the initial unprunned tree"<<endl;
vector<MyMarker*> & inswc = outtree;
if (1)
{
V3DLONG tmpi;
vector<MyMarker*> tmpswc;
for (tmpi=0; tmpi<inswc.size(); tmpi++)
{
MyMarker * curp = new MyMarker(*(inswc[tmpi]));
tmpswc.push_back(curp);
if (dfactor_xy>1) inswc[tmpi]->x *= dfactor_xy;
inswc[tmpi]->x += (0);
if (dfactor_xy>1) inswc[tmpi]->x += dfactor_xy/2;
if (dfactor_xy>1) inswc[tmpi]->y *= dfactor_xy;
inswc[tmpi]->y += (0);
if (dfactor_xy>1) inswc[tmpi]->y += dfactor_xy/2;
if (dfactor_z>1) inswc[tmpi]->z *= dfactor_z;
inswc[tmpi]->z += (0);
if (dfactor_z>1) inswc[tmpi]->z += dfactor_z/2;
}
//saveSWC_file(QString(PARA.inimg_file).append("_ini.swc").toStdString(), inswc);
for (tmpi=0; tmpi<inswc.size(); tmpi++)
{
inswc[tmpi]->x = tmpswc[tmpi]->x;
inswc[tmpi]->y = tmpswc[tmpi]->y;
inswc[tmpi]->z = tmpswc[tmpi]->z;
}
for(tmpi = 0; tmpi < tmpswc.size(); tmpi++)
delete tmpswc[tmpi];
tmpswc.clear();
}
cout<<"Pruning neuron tree"<<endl;
v3d_msg("start to use happ.\n", 0);
happ(inswc, outswc, indata1d, in_sz[0], in_sz[1], in_sz[2],10, 5, 0.3333);
if (p4dImageNew) {delete p4dImageNew; p4dImageNew=0;} //free buffe
inmarkers[0].x *= dfactor_xy;
inmarkers[0].y *= dfactor_xy;
inmarkers[0].z *= dfactor_z;
for(V3DLONG i = 0; i < outswc.size(); i++)
{
if (dfactor_xy>1) outswc[i]->x *= dfactor_xy;
outswc[i]->x += 0;
if (dfactor_xy>1) outswc[i]->x += dfactor_xy/2;
if (dfactor_xy>1) outswc[i]->y *= dfactor_xy;
outswc[i]->y += 0;
if (dfactor_xy>1) outswc[i]->y += dfactor_xy/2;
if (dfactor_z>1) outswc[i]->z *= dfactor_z;
outswc[i]->z += 0;
if (dfactor_z>1) outswc[i]->z += dfactor_z/2;
outswc[i]->radius *= dfactor_xy; //use xy for now
}
//re-estimate the radius using the original image
double real_thres = 40;
V3DLONG szOriginalData[4] = {N,M,P, 1};
int method_radius_est = 2;
for(V3DLONG i = 0; i < outswc.size(); i++)
{
//printf(" node %ld of %ld.\n", i, outswc.size());
outswc[i]->radius = markerRadius(data1d_1ch, szOriginalData, *(outswc[i]), real_thres, method_radius_est);
}
return outswc;
}
struct location {
int x;
int y;
int z;
};
struct maps {
location main;
location adding;
};
vector<MyMarker*> Combining(vector<MyMarker*> main, vector<MyMarker*> adding)
{
vector<maps> dataLocation;
vector<MyMarker*> result;
vector<MyMarker*> root;
result = main;
maps insert;
MyMarker* addingCheck;
MyMarker* check;
location ins1;
location ins2;
V3DLONG size = result.size();
V3DLONG idx;
double minimum;
double temp;
double Threshold = 2;
int x, y, z;
bool flag;
for(V3DLONG i=0;i<adding.size();i++)
{
minimum = 1000.0;
for(V3DLONG j=0;j<main.size();j++)
{
temp = sqrt(double(((main[j]->x - adding[i]->x)*(main[j]->x - adding[i]->x))+((main[j]->y - adding[i]->y)*(main[j]->y - adding[i]->y))+((main[j]->z - adding[i]->z)*(main[j]->z - adding[i]->z))));
if (temp<minimum)
{
minimum = temp;
x = main[j]->x;
y = main[j]->y;
z = main[j]->z;
}
}
if (minimum<=Threshold)
{
ins1.x = x;
ins1.y = y;
ins1.z = z;
ins2.x = adding[i]->x;
ins2.y = adding[i]->y;
ins2.z = adding[i]->z;
insert.main = ins1;
insert.adding = ins2;
dataLocation.push_back(insert);
}
else
{
// gak ada di map
ins1.x = x;
ins1.y = y;
ins1.z = z;
ins2.x = adding[i]->x;
ins2.y = adding[i]->y;
ins2.z = adding[i]->z;
insert.main = ins1;
insert.adding = ins2;
dataLocation.push_back(insert);
result.push_back(adding[i]);
}
}
int count = 0;
for (V3DLONG i=size;i<result.size(); i++)
{
idx = 0;
flag = true;
for(V3DLONG j=0;j<result.size();j++)
{
if (result[i]->parent == result[j])
{
flag = false;
}
}
if (flag)
{
minimum = 1000.0;
for(V3DLONG j=0;j<result.size();j++)
{
if (i!=j)
{
temp = sqrt(double(((result[i]->x-result[j]->x)*(result[i]->x-result[j]->x)) + ((result[i]->y-result[j]->y)*(result[i]->y-result[j]->y)) + ((result[i]->z-result[j]->z)*(result[i]->z-result[j]->z))));
if (temp<minimum)
{
minimum = temp;
idx = j;
}
}
}
result[i]->parent = result[idx];
}
}
return result;
}
unsigned char *BVersion(unsigned char *img, V3DLONG size)
{
/* unsigned char* img;
img = new unsigned char[size];
for (V3DLONG i=0;i<size;i++)
{
img[i] = image[i];
}*/
int contrast_threshold = 15;
int maxV = img[0];
int minV = img[0];
int local_contrast;
int mid_gray;
for (V3DLONG i=1;i<size;i++)
{
maxV = int(max(double(maxV), double(img[i])));
minV = int(min(double(minV), double(img[i])));
}
local_contrast = maxV-minV;
mid_gray = int((maxV+minV)/2);
for (V3DLONG i=1;i<size;i++)
{
if (local_contrast<contrast_threshold)
{
if (mid_gray>=128)
{
img[i] = 255;
}
else
{
img[i] = 0;
}
}
else
{
if (img[i]>=mid_gray)
{
img[i] = 255;
}
else
{
img[i] = 0;
}
}
}
return img;
}
unsigned char* NVersion (unsigned char* img, V3DLONG size) //Niblack
{
/*unsigned char* img;
img = new unsigned char[size];
for (V3DLONG i=0;i<size;i++)
{
img[i] = image[i];
}*/
int distribution[256], pixelMin, pixelMax, temp2;
float histNormalized[256];
float nonzero = 0.1;
float w = 0;
float u = 0;
float uT = 0;
float work1, work2; // working variables
double work3 = 0.0;
int binary_threshold = 0;
float imagemean = 0.0;
for (int i=0;i<256;i++)
{
distribution[i] = 0;
histNormalized[i] = 0;
}
for (V3DLONG i=0;i<size;i++)
{
distribution[img[i]] = distribution[img[i]] + 1;
imagemean += img[i];
if (img[i] >0 )
nonzero = nonzero +1 ;
}
// Create normalised histogram values
// (size=image width * image height)
for (int i=1; i<256; i++)
histNormalized[i] = distribution[i]/(float)nonzero;
// Calculate total mean level
for (int i=1; i<256; i++)
uT+=((i+1)*histNormalized[i]);
for (int i=1; i<256; i++) {
w+=histNormalized[i];
u+=((i+1)*histNormalized[i]);
work1 = (uT * w - u);
work2 = (work1 * work1) / ( w * (1.0f-w) );
if (work2>work3) work3=work2;
}
// Convert the final value to an integer
imagemean = imagemean/(float)nonzero;
float sum_deviation=0.0, deviation = 0.0;
for(V3DLONG i=0;i<size;i++)
if (img[i]!=0) sum_deviation+=(img[i]-imagemean)*(img[i]-imagemean);
deviation = sqrt(sum_deviation/(float)nonzero);
float k = 0.2, c = 0;
binary_threshold = imagemean + k * deviation - c ;
for (int r = 0; r < size; r++)
{
if (img[r] > binary_threshold)
img[r] = 255;
else
img[r] = 0;
}
return img;
}
unsigned char* SVersion (unsigned char* img, V3DLONG size) //Sauvola
{
/* unsigned char* img;
img = new unsigned char[size];
for (V3DLONG i=0;i<size;i++)
{
img[i] = image[i];
}*/
int distribution[256], pixelMin, pixelMax, temp2;
float histNormalized[256];
float nonzero = 0.1;
float w = 0;
float u = 0;
float uT = 0;
float work1, work2; // working variables
double work3 = 0.0;
int binary_threshold = 0;
float imagemean = 0.0;
for (int i=0;i<256;i++)
{
distribution[i] = 0;
histNormalized[i] = 0;
}
for (V3DLONG i=0;i<size;i++)
{
distribution[img[i]] = distribution[img[i]] + 1;
imagemean += img[i];
if (img[i] >0 )
nonzero = nonzero +1 ;
}
// Create normalised histogram values
// (size=image width * image height)
for (int i=1; i<256; i++)
histNormalized[i] = distribution[i]/(float)nonzero;
// Calculate total mean level
for (int i=1; i<256; i++)
uT+=((i+1)*histNormalized[i]);
for (int i=1; i<256; i++) {
w+=histNormalized[i];
u+=((i+1)*histNormalized[i]);
work1 = (uT * w - u);
work2 = (work1 * work1) / ( w * (1.0f-w) );
if (work2>work3) work3=work2;
}
// Convert the final value to an integer
imagemean = imagemean/(float)nonzero;
float sum_deviation=0.0, deviation = 0.0;
for(V3DLONG i=0;i<size;i++)
if (img[i]!=0) sum_deviation+=(img[i]-imagemean)*(img[i]-imagemean);
deviation = sqrt(sum_deviation/(float)nonzero);
float k = 0.5, r = 128;
binary_threshold = imagemean * ( 1 + k * ( deviation / r - 1 ) ) ;
for (int r = 0; r < size; r++)
{
if (img[r] > binary_threshold)
img[r] = 255;
else
img[r] = 0;
}
return img;
}
| 25.691961 | 204 | 0.555211 | [
"vector",
"3d"
] |
c572d8354f684c8c05834fe6e2b02e8bd6d57dac | 1,064 | hpp | C++ | src/Client/RankCheck/CountryLookup.hpp | AlexWayfer/RankCheck | cf3005a2ba6f66bd66f27e0e42ca6b0ccb907014 | [
"Unlicense",
"MIT"
] | 10 | 2018-02-12T16:14:07.000Z | 2022-03-19T15:08:29.000Z | src/Client/RankCheck/CountryLookup.hpp | AlexWayfer/RankCheck | cf3005a2ba6f66bd66f27e0e42ca6b0ccb907014 | [
"Unlicense",
"MIT"
] | 11 | 2018-02-08T16:46:49.000Z | 2022-02-03T20:48:12.000Z | src/Client/RankCheck/CountryLookup.hpp | AlexWayfer/RankCheck | cf3005a2ba6f66bd66f27e0e42ca6b0ccb907014 | [
"Unlicense",
"MIT"
] | 3 | 2018-02-12T22:08:55.000Z | 2021-06-24T16:29:17.000Z | #ifndef SRC_CLIENT_RANKCHECK_COUNTRYLOOKUP_HPP_
#define SRC_CLIENT_RANKCHECK_COUNTRYLOOKUP_HPP_
#include <SFML/Network/IpAddress.hpp>
#include <atomic>
#include <functional>
#include <map>
#include <memory>
#include <string>
#include <thread>
#include <vector>
#include <mutex>
#include <thread>
#include <condition_variable>
class CountryLookup
{
public:
static const std::string invalidCountry;
CountryLookup();
~CountryLookup();
using Callback = std::function<void(std::string)>;
void setHost(std::string host, unsigned short port);
void setUriParameters(std::string prefix, std::string suffix);
void lookup(sf::IpAddress address, Callback callback);
void process();
private:
struct Connection
{
sf::IpAddress address;
std::atomic_bool done = ATOMIC_VAR_INIT(false);
std::thread thread;
std::string result;
Callback callback;
};
std::map<sf::IpAddress, std::string> cache;
std::vector<std::unique_ptr<Connection> > connections;
std::string host;
std::string uriPrefix;
std::string uriSuffix;
unsigned short port;
};
#endif
| 20.075472 | 63 | 0.75094 | [
"vector"
] |
c574793adba9b63bf5b46c9bc8cac387d9b61da3 | 4,161 | cc | C++ | osp/impl/discovery/mdns/domain_name.cc | gtalis/openscreen | 9b28b9695df98d310c2271eaa65d20cc6d224203 | [
"BSD-3-Clause"
] | 1 | 2020-09-22T05:59:36.000Z | 2020-09-22T05:59:36.000Z | osp/impl/discovery/mdns/domain_name.cc | gtalis/openscreen | 9b28b9695df98d310c2271eaa65d20cc6d224203 | [
"BSD-3-Clause"
] | null | null | null | osp/impl/discovery/mdns/domain_name.cc | gtalis/openscreen | 9b28b9695df98d310c2271eaa65d20cc6d224203 | [
"BSD-3-Clause"
] | 1 | 2022-02-03T11:05:44.000Z | 2022-02-03T11:05:44.000Z | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "osp/impl/discovery/mdns/domain_name.h"
#include <algorithm>
#include <iterator>
#include "util/stringprintf.h"
namespace openscreen {
namespace osp {
// static
DomainName DomainName::GetLocalDomain() {
return DomainName{{5, 'l', 'o', 'c', 'a', 'l', 0}};
}
// static
ErrorOr<DomainName> DomainName::Append(const DomainName& first,
const DomainName& second) {
OSP_CHECK(first.domain_name_.size());
OSP_CHECK(second.domain_name_.size());
// Both vectors should represent null terminated domain names.
OSP_DCHECK_EQ(first.domain_name_.back(), '\0');
OSP_DCHECK_EQ(second.domain_name_.back(), '\0');
if ((first.domain_name_.size() + second.domain_name_.size() - 1) >
kDomainNameMaxLength) {
return Error::Code::kDomainNameTooLong;
}
DomainName result;
result.domain_name_.clear();
result.domain_name_.insert(result.domain_name_.begin(),
first.domain_name_.begin(),
first.domain_name_.end());
result.domain_name_.insert(result.domain_name_.end() - 1,
second.domain_name_.begin(),
second.domain_name_.end() - 1);
return result;
}
DomainName::DomainName() : domain_name_{0u} {}
DomainName::DomainName(std::vector<uint8_t>&& domain_name)
: domain_name_(std::move(domain_name)) {
OSP_CHECK_LE(domain_name_.size(), kDomainNameMaxLength);
}
DomainName::DomainName(const DomainName&) = default;
DomainName::DomainName(DomainName&&) noexcept = default;
DomainName::~DomainName() = default;
DomainName& DomainName::operator=(const DomainName&) = default;
DomainName& DomainName::operator=(DomainName&&) noexcept = default;
bool DomainName::operator==(const DomainName& other) const {
if (domain_name_.size() != other.domain_name_.size()) {
return false;
}
for (size_t i = 0; i < domain_name_.size(); ++i) {
if (tolower(domain_name_[i]) != tolower(other.domain_name_[i])) {
return false;
}
}
return true;
}
bool DomainName::operator!=(const DomainName& other) const {
return !(*this == other);
}
bool DomainName::EndsWithLocalDomain() const {
const DomainName local_domain = GetLocalDomain();
if (domain_name_.size() < local_domain.domain_name_.size())
return false;
return std::equal(local_domain.domain_name_.begin(),
local_domain.domain_name_.end(),
domain_name_.end() - local_domain.domain_name_.size());
}
Error DomainName::Append(const DomainName& after) {
OSP_CHECK(after.domain_name_.size());
OSP_DCHECK_EQ(after.domain_name_.back(), 0u);
if ((domain_name_.size() + after.domain_name_.size() - 1) >
kDomainNameMaxLength) {
return Error::Code::kDomainNameTooLong;
}
domain_name_.insert(domain_name_.end() - 1, after.domain_name_.begin(),
after.domain_name_.end() - 1);
return Error::None();
}
std::vector<absl::string_view> DomainName::GetLabels() const {
OSP_DCHECK_GT(domain_name_.size(), 0u);
OSP_DCHECK_LT(domain_name_.size(), kDomainNameMaxLength);
std::vector<absl::string_view> result;
const uint8_t* data = domain_name_.data();
while (*data != 0) {
const size_t label_length = *data;
OSP_DCHECK_LT(label_length, kDomainNameMaxLabelLength);
++data;
result.emplace_back(reinterpret_cast<const char*>(data), label_length);
data += label_length;
}
return result;
}
bool DomainNameComparator::operator()(const DomainName& a,
const DomainName& b) const {
return a.domain_name() < b.domain_name();
}
std::ostream& operator<<(std::ostream& os, const DomainName& domain_name) {
const auto& data = domain_name.domain_name();
OSP_DCHECK_GT(data.size(), 0u);
auto it = data.begin();
while (*it != 0) {
size_t length = *it++;
PrettyPrintAsciiHex(os, it, it + length);
it += length;
os << ".";
}
return os;
}
} // namespace osp
} // namespace openscreen
| 31.285714 | 75 | 0.667388 | [
"vector"
] |
c574e4bd0fe38c0ea77fae8fae81498e090b36f7 | 89,446 | cpp | C++ | src/model/HeatExchangerDesiccantBalancedFlowPerformanceDataType1.cpp | muehleisen/OpenStudio | 3bfe89f6c441d1e61e50b8e94e92e7218b4555a0 | [
"blessing"
] | 354 | 2015-01-10T17:46:11.000Z | 2022-03-29T10:00:00.000Z | src/model/HeatExchangerDesiccantBalancedFlowPerformanceDataType1.cpp | muehleisen/OpenStudio | 3bfe89f6c441d1e61e50b8e94e92e7218b4555a0 | [
"blessing"
] | 3,243 | 2015-01-02T04:54:45.000Z | 2022-03-31T17:22:22.000Z | src/model/HeatExchangerDesiccantBalancedFlowPerformanceDataType1.cpp | muehleisen/OpenStudio | 3bfe89f6c441d1e61e50b8e94e92e7218b4555a0 | [
"blessing"
] | 157 | 2015-01-07T15:59:55.000Z | 2022-03-30T07:46:09.000Z | /***********************************************************************************************************************
* OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
* following conditions are met:
*
* (1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following
* disclaimer.
*
* (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided with the distribution.
*
* (3) Neither the name of the copyright holder nor the names of any contributors may be used to endorse or promote products
* derived from this software without specific prior written permission from the respective party.
*
* (4) Other than as required in clauses (1) and (2), distributions in any form of modifications or other derivative works
* may not use the "OpenStudio" trademark, "OS", "os", or any other confusingly similar designation without specific prior
* written permission from Alliance for Sustainable Energy, LLC.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED
* STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
***********************************************************************************************************************/
#include "HeatExchangerDesiccantBalancedFlowPerformanceDataType1.hpp"
#include "HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl.hpp"
#include "Model.hpp"
#include "Model_Impl.hpp"
#include "HeatExchangerDesiccantBalancedFlow.hpp"
#include "HeatExchangerDesiccantBalancedFlow_Impl.hpp"
#include <utilities/idd/IddFactory.hxx>
#include <utilities/idd/IddEnums.hxx>
#include <utilities/idd/OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1_FieldEnums.hxx>
#include "../utilities/units/Unit.hpp"
#include "../utilities/core/Assert.hpp"
namespace openstudio {
namespace model {
namespace detail {
HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl(
const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
: ResourceObject_Impl(idfObject, model, keepHandle) {
OS_ASSERT(idfObject.iddObject().type() == HeatExchangerDesiccantBalancedFlowPerformanceDataType1::iddObjectType());
}
HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl(
const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle)
: ResourceObject_Impl(other, model, keepHandle) {
OS_ASSERT(other.iddObject().type() == HeatExchangerDesiccantBalancedFlowPerformanceDataType1::iddObjectType());
}
HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl(
const HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl& other, Model_Impl* model, bool keepHandle)
: ResourceObject_Impl(other, model, keepHandle) {}
const std::vector<std::string>& HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::outputVariableNames() const {
static std::vector<std::string> result;
return result;
}
IddObjectType HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::iddObjectType() const {
return HeatExchangerDesiccantBalancedFlowPerformanceDataType1::iddObjectType();
}
ModelObject HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::clone(Model model) const {
// clone the operating modes is already handle in ModelObject_Impl::clone since they are ResourceObjects
// We don't do ParentObject_Impl::clone since it'll also CLONE the children...
return ModelObject_Impl::clone(model);
}
std::vector<IdfObject> HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::remove() {
if (!heatExchangerDesiccantBalancedFlows().empty()) {
LOG(Warn, "Cannot remove object because it is used by at least one heatExchangerDesiccantBalancedFlow as a required field");
return std::vector<IdfObject>();
}
return ResourceObject_Impl::remove();
}
std::vector<HeatExchangerDesiccantBalancedFlow>
HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::heatExchangerDesiccantBalancedFlows() const {
return getObject<ModelObject>().getModelObjectSources<HeatExchangerDesiccantBalancedFlow>(HeatExchangerDesiccantBalancedFlow::iddObjectType());
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::isNominalAirFlowRateAutosized() const {
bool result = false;
boost::optional<std::string> value = getString(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::NominalAirFlowRate, true);
if (value) {
result = openstudio::istringEqual(value.get(), "autosize");
}
return result;
}
boost::optional<double> HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::nominalAirFlowRate() const {
return getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::NominalAirFlowRate, true);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::isNominalAirFaceVelocityAutosized() const {
bool result = false;
boost::optional<std::string> value =
getString(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::NominalAirFaceVelocity, true);
if (value) {
result = openstudio::istringEqual(value.get(), "autosize");
}
return result;
}
boost::optional<double> HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::nominalAirFaceVelocity() const {
return getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::NominalAirFaceVelocity, true);
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::nominalElectricPower() const {
boost::optional<double> value = getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::NominalElectricPower, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::temperatureEquationCoefficient1() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::TemperatureEquationCoefficient1, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::temperatureEquationCoefficient2() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::TemperatureEquationCoefficient2, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::temperatureEquationCoefficient3() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::TemperatureEquationCoefficient3, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::temperatureEquationCoefficient4() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::TemperatureEquationCoefficient4, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::temperatureEquationCoefficient5() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::TemperatureEquationCoefficient5, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::temperatureEquationCoefficient6() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::TemperatureEquationCoefficient6, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::temperatureEquationCoefficient7() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::TemperatureEquationCoefficient7, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::temperatureEquationCoefficient8() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::TemperatureEquationCoefficient8, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::minimumRegenerationInletAirHumidityRatioforTemperatureEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationInletAirHumidityRatioforTemperatureEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::maximumRegenerationInletAirHumidityRatioforTemperatureEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationInletAirHumidityRatioforTemperatureEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::minimumRegenerationInletAirTemperatureforTemperatureEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationInletAirTemperatureforTemperatureEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::maximumRegenerationInletAirTemperatureforTemperatureEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationInletAirTemperatureforTemperatureEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::minimumProcessInletAirHumidityRatioforTemperatureEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumProcessInletAirHumidityRatioforTemperatureEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::maximumProcessInletAirHumidityRatioforTemperatureEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumProcessInletAirHumidityRatioforTemperatureEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::minimumProcessInletAirTemperatureforTemperatureEquation() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumProcessInletAirTemperatureforTemperatureEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::maximumProcessInletAirTemperatureforTemperatureEquation() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumProcessInletAirTemperatureforTemperatureEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::minimumRegenerationAirVelocityforTemperatureEquation() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationAirVelocityforTemperatureEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::maximumRegenerationAirVelocityforTemperatureEquation() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationAirVelocityforTemperatureEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::minimumRegenerationOutletAirTemperatureforTemperatureEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationOutletAirTemperatureforTemperatureEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::maximumRegenerationOutletAirTemperatureforTemperatureEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationOutletAirTemperatureforTemperatureEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::minimumRegenerationInletAirRelativeHumidityforTemperatureEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationInletAirRelativeHumidityforTemperatureEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::maximumRegenerationInletAirRelativeHumidityforTemperatureEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationInletAirRelativeHumidityforTemperatureEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::minimumProcessInletAirRelativeHumidityforTemperatureEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumProcessInletAirRelativeHumidityforTemperatureEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::maximumProcessInletAirRelativeHumidityforTemperatureEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumProcessInletAirRelativeHumidityforTemperatureEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::humidityRatioEquationCoefficient1() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::HumidityRatioEquationCoefficient1, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::humidityRatioEquationCoefficient2() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::HumidityRatioEquationCoefficient2, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::humidityRatioEquationCoefficient3() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::HumidityRatioEquationCoefficient3, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::humidityRatioEquationCoefficient4() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::HumidityRatioEquationCoefficient4, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::humidityRatioEquationCoefficient5() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::HumidityRatioEquationCoefficient5, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::humidityRatioEquationCoefficient6() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::HumidityRatioEquationCoefficient6, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::humidityRatioEquationCoefficient7() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::HumidityRatioEquationCoefficient7, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::humidityRatioEquationCoefficient8() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::HumidityRatioEquationCoefficient8, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::minimumRegenerationInletAirHumidityRatioforHumidityRatioEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationInletAirHumidityRatioforHumidityRatioEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::maximumRegenerationInletAirHumidityRatioforHumidityRatioEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationInletAirHumidityRatioforHumidityRatioEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::minimumRegenerationInletAirTemperatureforHumidityRatioEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationInletAirTemperatureforHumidityRatioEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::maximumRegenerationInletAirTemperatureforHumidityRatioEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationInletAirTemperatureforHumidityRatioEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::minimumProcessInletAirHumidityRatioforHumidityRatioEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumProcessInletAirHumidityRatioforHumidityRatioEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::maximumProcessInletAirHumidityRatioforHumidityRatioEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumProcessInletAirHumidityRatioforHumidityRatioEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::minimumProcessInletAirTemperatureforHumidityRatioEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumProcessInletAirTemperatureforHumidityRatioEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::maximumProcessInletAirTemperatureforHumidityRatioEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumProcessInletAirTemperatureforHumidityRatioEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::minimumRegenerationAirVelocityforHumidityRatioEquation() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationAirVelocityforHumidityRatioEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::maximumRegenerationAirVelocityforHumidityRatioEquation() const {
boost::optional<double> value =
getDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationAirVelocityforHumidityRatioEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::minimumRegenerationOutletAirHumidityRatioforHumidityRatioEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationOutletAirHumidityRatioforHumidityRatioEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::maximumRegenerationOutletAirHumidityRatioforHumidityRatioEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationOutletAirHumidityRatioforHumidityRatioEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::minimumRegenerationInletAirRelativeHumidityforHumidityRatioEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationInletAirRelativeHumidityforHumidityRatioEquation,
true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::maximumRegenerationInletAirRelativeHumidityforHumidityRatioEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationInletAirRelativeHumidityforHumidityRatioEquation,
true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::minimumProcessInletAirRelativeHumidityforHumidityRatioEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumProcessInletAirRelativeHumidityforHumidityRatioEquation, true);
OS_ASSERT(value);
return value.get();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::maximumProcessInletAirRelativeHumidityforHumidityRatioEquation() const {
boost::optional<double> value = getDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumProcessInletAirRelativeHumidityforHumidityRatioEquation, true);
OS_ASSERT(value);
return value.get();
}
void HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::autosizeNominalAirFlowRate() {
bool result = setString(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::NominalAirFlowRate, "autosize");
OS_ASSERT(result);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setNominalAirFlowRate(double nominalAirFlowRate) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::NominalAirFlowRate, nominalAirFlowRate);
return result;
}
void HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::autosizeNominalAirFaceVelocity() {
bool result = setString(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::NominalAirFaceVelocity, "autosize");
OS_ASSERT(result);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setNominalAirFaceVelocity(double nominalAirFaceVelocity) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::NominalAirFaceVelocity, nominalAirFaceVelocity);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setNominalElectricPower(double nominalElectricPower) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::NominalElectricPower, nominalElectricPower);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setTemperatureEquationCoefficient1(double temperatureEquationCoefficient1) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::TemperatureEquationCoefficient1,
temperatureEquationCoefficient1);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setTemperatureEquationCoefficient2(double temperatureEquationCoefficient2) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::TemperatureEquationCoefficient2,
temperatureEquationCoefficient2);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setTemperatureEquationCoefficient3(double temperatureEquationCoefficient3) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::TemperatureEquationCoefficient3,
temperatureEquationCoefficient3);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setTemperatureEquationCoefficient4(double temperatureEquationCoefficient4) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::TemperatureEquationCoefficient4,
temperatureEquationCoefficient4);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setTemperatureEquationCoefficient5(double temperatureEquationCoefficient5) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::TemperatureEquationCoefficient5,
temperatureEquationCoefficient5);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setTemperatureEquationCoefficient6(double temperatureEquationCoefficient6) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::TemperatureEquationCoefficient6,
temperatureEquationCoefficient6);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setTemperatureEquationCoefficient7(double temperatureEquationCoefficient7) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::TemperatureEquationCoefficient7,
temperatureEquationCoefficient7);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setTemperatureEquationCoefficient8(double temperatureEquationCoefficient8) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::TemperatureEquationCoefficient8,
temperatureEquationCoefficient8);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMinimumRegenerationInletAirHumidityRatioforTemperatureEquation(
double minimumRegenerationInletAirHumidityRatioforTemperatureEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationInletAirHumidityRatioforTemperatureEquation,
minimumRegenerationInletAirHumidityRatioforTemperatureEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMaximumRegenerationInletAirHumidityRatioforTemperatureEquation(
double maximumRegenerationInletAirHumidityRatioforTemperatureEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationInletAirHumidityRatioforTemperatureEquation,
maximumRegenerationInletAirHumidityRatioforTemperatureEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMinimumRegenerationInletAirTemperatureforTemperatureEquation(
double minimumRegenerationInletAirTemperatureforTemperatureEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationInletAirTemperatureforTemperatureEquation,
minimumRegenerationInletAirTemperatureforTemperatureEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMaximumRegenerationInletAirTemperatureforTemperatureEquation(
double maximumRegenerationInletAirTemperatureforTemperatureEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationInletAirTemperatureforTemperatureEquation,
maximumRegenerationInletAirTemperatureforTemperatureEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMinimumProcessInletAirHumidityRatioforTemperatureEquation(
double minimumProcessInletAirHumidityRatioforTemperatureEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumProcessInletAirHumidityRatioforTemperatureEquation,
minimumProcessInletAirHumidityRatioforTemperatureEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMaximumProcessInletAirHumidityRatioforTemperatureEquation(
double maximumProcessInletAirHumidityRatioforTemperatureEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumProcessInletAirHumidityRatioforTemperatureEquation,
maximumProcessInletAirHumidityRatioforTemperatureEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMinimumProcessInletAirTemperatureforTemperatureEquation(
double minimumProcessInletAirTemperatureforTemperatureEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumProcessInletAirTemperatureforTemperatureEquation,
minimumProcessInletAirTemperatureforTemperatureEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMaximumProcessInletAirTemperatureforTemperatureEquation(
double maximumProcessInletAirTemperatureforTemperatureEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumProcessInletAirTemperatureforTemperatureEquation,
maximumProcessInletAirTemperatureforTemperatureEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMinimumRegenerationAirVelocityforTemperatureEquation(
double minimumRegenerationAirVelocityforTemperatureEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationAirVelocityforTemperatureEquation,
minimumRegenerationAirVelocityforTemperatureEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMaximumRegenerationAirVelocityforTemperatureEquation(
double maximumRegenerationAirVelocityforTemperatureEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationAirVelocityforTemperatureEquation,
maximumRegenerationAirVelocityforTemperatureEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMinimumRegenerationOutletAirTemperatureforTemperatureEquation(
double minimumRegenerationOutletAirTemperatureforTemperatureEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationOutletAirTemperatureforTemperatureEquation,
minimumRegenerationOutletAirTemperatureforTemperatureEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMaximumRegenerationOutletAirTemperatureforTemperatureEquation(
double maximumRegenerationOutletAirTemperatureforTemperatureEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationOutletAirTemperatureforTemperatureEquation,
maximumRegenerationOutletAirTemperatureforTemperatureEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMinimumRegenerationInletAirRelativeHumidityforTemperatureEquation(
double minimumRegenerationInletAirRelativeHumidityforTemperatureEquation) {
bool result = setDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationInletAirRelativeHumidityforTemperatureEquation,
minimumRegenerationInletAirRelativeHumidityforTemperatureEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMaximumRegenerationInletAirRelativeHumidityforTemperatureEquation(
double maximumRegenerationInletAirRelativeHumidityforTemperatureEquation) {
bool result = setDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationInletAirRelativeHumidityforTemperatureEquation,
maximumRegenerationInletAirRelativeHumidityforTemperatureEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMinimumProcessInletAirRelativeHumidityforTemperatureEquation(
double minimumProcessInletAirRelativeHumidityforTemperatureEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumProcessInletAirRelativeHumidityforTemperatureEquation,
minimumProcessInletAirRelativeHumidityforTemperatureEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMaximumProcessInletAirRelativeHumidityforTemperatureEquation(
double maximumProcessInletAirRelativeHumidityforTemperatureEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumProcessInletAirRelativeHumidityforTemperatureEquation,
maximumProcessInletAirRelativeHumidityforTemperatureEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setHumidityRatioEquationCoefficient1(double humidityRatioEquationCoefficient1) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::HumidityRatioEquationCoefficient1,
humidityRatioEquationCoefficient1);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setHumidityRatioEquationCoefficient2(double humidityRatioEquationCoefficient2) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::HumidityRatioEquationCoefficient2,
humidityRatioEquationCoefficient2);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setHumidityRatioEquationCoefficient3(double humidityRatioEquationCoefficient3) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::HumidityRatioEquationCoefficient3,
humidityRatioEquationCoefficient3);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setHumidityRatioEquationCoefficient4(double humidityRatioEquationCoefficient4) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::HumidityRatioEquationCoefficient4,
humidityRatioEquationCoefficient4);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setHumidityRatioEquationCoefficient5(double humidityRatioEquationCoefficient5) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::HumidityRatioEquationCoefficient5,
humidityRatioEquationCoefficient5);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setHumidityRatioEquationCoefficient6(double humidityRatioEquationCoefficient6) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::HumidityRatioEquationCoefficient6,
humidityRatioEquationCoefficient6);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setHumidityRatioEquationCoefficient7(double humidityRatioEquationCoefficient7) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::HumidityRatioEquationCoefficient7,
humidityRatioEquationCoefficient7);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setHumidityRatioEquationCoefficient8(double humidityRatioEquationCoefficient8) {
bool result = setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::HumidityRatioEquationCoefficient8,
humidityRatioEquationCoefficient8);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMinimumRegenerationInletAirHumidityRatioforHumidityRatioEquation(
double minimumRegenerationInletAirHumidityRatioforHumidityRatioEquation) {
bool result = setDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationInletAirHumidityRatioforHumidityRatioEquation,
minimumRegenerationInletAirHumidityRatioforHumidityRatioEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMaximumRegenerationInletAirHumidityRatioforHumidityRatioEquation(
double maximumRegenerationInletAirHumidityRatioforHumidityRatioEquation) {
bool result = setDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationInletAirHumidityRatioforHumidityRatioEquation,
maximumRegenerationInletAirHumidityRatioforHumidityRatioEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMinimumRegenerationInletAirTemperatureforHumidityRatioEquation(
double minimumRegenerationInletAirTemperatureforHumidityRatioEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationInletAirTemperatureforHumidityRatioEquation,
minimumRegenerationInletAirTemperatureforHumidityRatioEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMaximumRegenerationInletAirTemperatureforHumidityRatioEquation(
double maximumRegenerationInletAirTemperatureforHumidityRatioEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationInletAirTemperatureforHumidityRatioEquation,
maximumRegenerationInletAirTemperatureforHumidityRatioEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMinimumProcessInletAirHumidityRatioforHumidityRatioEquation(
double minimumProcessInletAirHumidityRatioforHumidityRatioEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumProcessInletAirHumidityRatioforHumidityRatioEquation,
minimumProcessInletAirHumidityRatioforHumidityRatioEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMaximumProcessInletAirHumidityRatioforHumidityRatioEquation(
double maximumProcessInletAirHumidityRatioforHumidityRatioEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumProcessInletAirHumidityRatioforHumidityRatioEquation,
maximumProcessInletAirHumidityRatioforHumidityRatioEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMinimumProcessInletAirTemperatureforHumidityRatioEquation(
double minimumProcessInletAirTemperatureforHumidityRatioEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumProcessInletAirTemperatureforHumidityRatioEquation,
minimumProcessInletAirTemperatureforHumidityRatioEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMaximumProcessInletAirTemperatureforHumidityRatioEquation(
double maximumProcessInletAirTemperatureforHumidityRatioEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumProcessInletAirTemperatureforHumidityRatioEquation,
maximumProcessInletAirTemperatureforHumidityRatioEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMinimumRegenerationAirVelocityforHumidityRatioEquation(
double minimumRegenerationAirVelocityforHumidityRatioEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationAirVelocityforHumidityRatioEquation,
minimumRegenerationAirVelocityforHumidityRatioEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMaximumRegenerationAirVelocityforHumidityRatioEquation(
double maximumRegenerationAirVelocityforHumidityRatioEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationAirVelocityforHumidityRatioEquation,
maximumRegenerationAirVelocityforHumidityRatioEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMinimumRegenerationOutletAirHumidityRatioforHumidityRatioEquation(
double minimumRegenerationOutletAirHumidityRatioforHumidityRatioEquation) {
bool result = setDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationOutletAirHumidityRatioforHumidityRatioEquation,
minimumRegenerationOutletAirHumidityRatioforHumidityRatioEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMaximumRegenerationOutletAirHumidityRatioforHumidityRatioEquation(
double maximumRegenerationOutletAirHumidityRatioforHumidityRatioEquation) {
bool result = setDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationOutletAirHumidityRatioforHumidityRatioEquation,
maximumRegenerationOutletAirHumidityRatioforHumidityRatioEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMinimumRegenerationInletAirRelativeHumidityforHumidityRatioEquation(
double minimumRegenerationInletAirRelativeHumidityforHumidityRatioEquation) {
bool result = setDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumRegenerationInletAirRelativeHumidityforHumidityRatioEquation,
minimumRegenerationInletAirRelativeHumidityforHumidityRatioEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMaximumRegenerationInletAirRelativeHumidityforHumidityRatioEquation(
double maximumRegenerationInletAirRelativeHumidityforHumidityRatioEquation) {
bool result = setDouble(
OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumRegenerationInletAirRelativeHumidityforHumidityRatioEquation,
maximumRegenerationInletAirRelativeHumidityforHumidityRatioEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMinimumProcessInletAirRelativeHumidityforHumidityRatioEquation(
double minimumProcessInletAirRelativeHumidityforHumidityRatioEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MinimumProcessInletAirRelativeHumidityforHumidityRatioEquation,
minimumProcessInletAirRelativeHumidityforHumidityRatioEquation);
return result;
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::setMaximumProcessInletAirRelativeHumidityforHumidityRatioEquation(
double maximumProcessInletAirRelativeHumidityforHumidityRatioEquation) {
bool result =
setDouble(OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1Fields::MaximumProcessInletAirRelativeHumidityforHumidityRatioEquation,
maximumProcessInletAirRelativeHumidityforHumidityRatioEquation);
return result;
}
boost::optional<double> HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::autosizedNominalAirFlowRate() {
return getAutosizedValue("Design Size Nominal Air Flow Rate", "m3/s");
}
boost::optional<double> HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::autosizedNominalAirFaceVelocity() {
return getAutosizedValue("Design Size Nominal Air Face Velocity", "m/s");
}
void HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::autosize() {
autosizeNominalAirFlowRate();
autosizeNominalAirFaceVelocity();
}
void HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl::applySizingValues() {
boost::optional<double> val;
val = autosizedNominalAirFlowRate();
if (val) {
setNominalAirFlowRate(val.get());
}
val = autosizedNominalAirFaceVelocity();
if (val) {
setNominalAirFaceVelocity(val.get());
}
}
} // namespace detail
HeatExchangerDesiccantBalancedFlowPerformanceDataType1::HeatExchangerDesiccantBalancedFlowPerformanceDataType1(const Model& model)
: ResourceObject(HeatExchangerDesiccantBalancedFlowPerformanceDataType1::iddObjectType(), model) {
OS_ASSERT(getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>());
autosizeNominalAirFlowRate();
autosizeNominalAirFaceVelocity();
setNominalElectricPower(0);
// FurnaceWithDXSystem_CoolingHXAssisted.idf
setTemperatureEquationCoefficient1(-7.18302E+00);
setTemperatureEquationCoefficient2(-1.84967E+02);
setTemperatureEquationCoefficient3(1.00051E+00);
setTemperatureEquationCoefficient4(1.16033E+04);
setTemperatureEquationCoefficient5(-5.07550E+01);
setTemperatureEquationCoefficient6(-1.68467E-02);
setTemperatureEquationCoefficient7(5.82213E+01);
setTemperatureEquationCoefficient8(5.98863E-01);
setMinimumRegenerationInletAirHumidityRatioforTemperatureEquation(0.007143);
setMaximumRegenerationInletAirHumidityRatioforTemperatureEquation(0.024286);
setMinimumRegenerationInletAirTemperatureforTemperatureEquation(17.83333);
setMaximumRegenerationInletAirTemperatureforTemperatureEquation(48.88889);
setMinimumProcessInletAirHumidityRatioforTemperatureEquation(0.005000);
setMaximumProcessInletAirHumidityRatioforTemperatureEquation(0.015714);
setMinimumProcessInletAirTemperatureforTemperatureEquation(4.583333);
setMaximumProcessInletAirTemperatureforTemperatureEquation(21.83333);
setMinimumRegenerationAirVelocityforTemperatureEquation(2.286);
setMaximumRegenerationAirVelocityforTemperatureEquation(4.826);
setMinimumRegenerationOutletAirTemperatureforTemperatureEquation(16.66667);
setMaximumRegenerationOutletAirTemperatureforTemperatureEquation(46.11111);
setMinimumRegenerationInletAirRelativeHumidityforTemperatureEquation(10.0);
setMaximumRegenerationInletAirRelativeHumidityforTemperatureEquation(100.0);
setMinimumProcessInletAirRelativeHumidityforTemperatureEquation(80.0);
setMaximumProcessInletAirRelativeHumidityforTemperatureEquation(100.0);
setHumidityRatioEquationCoefficient1(3.13878E-03);
setHumidityRatioEquationCoefficient2(1.09689E+00);
setHumidityRatioEquationCoefficient3(-2.63341E-05);
setHumidityRatioEquationCoefficient4(-6.33885E+00);
setHumidityRatioEquationCoefficient5(9.38196E-03);
setHumidityRatioEquationCoefficient6(5.21186E-05);
setHumidityRatioEquationCoefficient7(6.70354E-02);
setHumidityRatioEquationCoefficient8(-1.60823E-04);
setMinimumRegenerationInletAirHumidityRatioforHumidityRatioEquation(0.007143);
setMaximumRegenerationInletAirHumidityRatioforHumidityRatioEquation(0.024286);
setMinimumRegenerationInletAirTemperatureforHumidityRatioEquation(17.83333);
setMaximumRegenerationInletAirTemperatureforHumidityRatioEquation(48.88889);
setMinimumProcessInletAirHumidityRatioforHumidityRatioEquation(0.005000);
setMaximumProcessInletAirHumidityRatioforHumidityRatioEquation(0.015714);
setMinimumProcessInletAirTemperatureforHumidityRatioEquation(4.583333);
setMaximumProcessInletAirTemperatureforHumidityRatioEquation(21.83333);
setMinimumRegenerationAirVelocityforHumidityRatioEquation(2.286);
setMaximumRegenerationAirVelocityforHumidityRatioEquation(4.826);
setMinimumRegenerationOutletAirHumidityRatioforHumidityRatioEquation(0.007811);
setMaximumRegenerationOutletAirHumidityRatioforHumidityRatioEquation(0.026707);
setMinimumRegenerationInletAirRelativeHumidityforHumidityRatioEquation(10.0);
setMaximumRegenerationInletAirRelativeHumidityforHumidityRatioEquation(100.0);
setMinimumProcessInletAirRelativeHumidityforHumidityRatioEquation(80.0);
setMaximumProcessInletAirRelativeHumidityforHumidityRatioEquation(100.0);
}
IddObjectType HeatExchangerDesiccantBalancedFlowPerformanceDataType1::iddObjectType() {
return IddObjectType(IddObjectType::OS_HeatExchanger_Desiccant_BalancedFlow_PerformanceDataType1);
}
std::vector<HeatExchangerDesiccantBalancedFlow>
HeatExchangerDesiccantBalancedFlowPerformanceDataType1::heatExchangerDesiccantBalancedFlows() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->heatExchangerDesiccantBalancedFlows();
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::isNominalAirFlowRateAutosized() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->isNominalAirFlowRateAutosized();
}
boost::optional<double> HeatExchangerDesiccantBalancedFlowPerformanceDataType1::nominalAirFlowRate() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->nominalAirFlowRate();
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::isNominalAirFaceVelocityAutosized() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->isNominalAirFlowRateAutosized();
}
boost::optional<double> HeatExchangerDesiccantBalancedFlowPerformanceDataType1::nominalAirFaceVelocity() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->nominalAirFaceVelocity();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::nominalElectricPower() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->nominalElectricPower();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::temperatureEquationCoefficient1() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->temperatureEquationCoefficient1();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::temperatureEquationCoefficient2() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->temperatureEquationCoefficient2();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::temperatureEquationCoefficient3() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->temperatureEquationCoefficient3();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::temperatureEquationCoefficient4() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->temperatureEquationCoefficient4();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::temperatureEquationCoefficient5() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->temperatureEquationCoefficient5();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::temperatureEquationCoefficient6() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->temperatureEquationCoefficient6();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::temperatureEquationCoefficient7() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->temperatureEquationCoefficient7();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::temperatureEquationCoefficient8() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->temperatureEquationCoefficient8();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::minimumRegenerationInletAirHumidityRatioforTemperatureEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->minimumRegenerationInletAirHumidityRatioforTemperatureEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::maximumRegenerationInletAirHumidityRatioforTemperatureEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->maximumRegenerationInletAirHumidityRatioforTemperatureEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::minimumRegenerationInletAirTemperatureforTemperatureEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->minimumRegenerationInletAirTemperatureforTemperatureEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::maximumRegenerationInletAirTemperatureforTemperatureEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->maximumRegenerationInletAirTemperatureforTemperatureEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::minimumProcessInletAirHumidityRatioforTemperatureEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->minimumProcessInletAirHumidityRatioforTemperatureEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::maximumProcessInletAirHumidityRatioforTemperatureEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->maximumProcessInletAirHumidityRatioforTemperatureEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::minimumProcessInletAirTemperatureforTemperatureEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->minimumProcessInletAirTemperatureforTemperatureEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::maximumProcessInletAirTemperatureforTemperatureEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->maximumProcessInletAirTemperatureforTemperatureEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::minimumRegenerationAirVelocityforTemperatureEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->minimumRegenerationAirVelocityforTemperatureEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::maximumRegenerationAirVelocityforTemperatureEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->maximumRegenerationAirVelocityforTemperatureEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::minimumRegenerationOutletAirTemperatureforTemperatureEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->minimumRegenerationOutletAirTemperatureforTemperatureEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::maximumRegenerationOutletAirTemperatureforTemperatureEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->maximumRegenerationOutletAirTemperatureforTemperatureEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::minimumRegenerationInletAirRelativeHumidityforTemperatureEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->minimumRegenerationInletAirRelativeHumidityforTemperatureEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::maximumRegenerationInletAirRelativeHumidityforTemperatureEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->maximumRegenerationInletAirRelativeHumidityforTemperatureEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::minimumProcessInletAirRelativeHumidityforTemperatureEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->minimumProcessInletAirRelativeHumidityforTemperatureEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::maximumProcessInletAirRelativeHumidityforTemperatureEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->maximumProcessInletAirRelativeHumidityforTemperatureEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::humidityRatioEquationCoefficient1() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->humidityRatioEquationCoefficient1();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::humidityRatioEquationCoefficient2() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->humidityRatioEquationCoefficient2();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::humidityRatioEquationCoefficient3() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->humidityRatioEquationCoefficient3();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::humidityRatioEquationCoefficient4() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->humidityRatioEquationCoefficient4();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::humidityRatioEquationCoefficient5() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->humidityRatioEquationCoefficient5();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::humidityRatioEquationCoefficient6() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->humidityRatioEquationCoefficient6();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::humidityRatioEquationCoefficient7() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->humidityRatioEquationCoefficient7();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::humidityRatioEquationCoefficient8() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->humidityRatioEquationCoefficient8();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::minimumRegenerationInletAirHumidityRatioforHumidityRatioEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->minimumRegenerationInletAirHumidityRatioforHumidityRatioEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::maximumRegenerationInletAirHumidityRatioforHumidityRatioEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->maximumRegenerationInletAirHumidityRatioforHumidityRatioEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::minimumRegenerationInletAirTemperatureforHumidityRatioEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->minimumRegenerationInletAirTemperatureforHumidityRatioEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::maximumRegenerationInletAirTemperatureforHumidityRatioEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->maximumRegenerationInletAirTemperatureforHumidityRatioEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::minimumProcessInletAirHumidityRatioforHumidityRatioEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->minimumProcessInletAirHumidityRatioforHumidityRatioEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::maximumProcessInletAirHumidityRatioforHumidityRatioEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->maximumProcessInletAirHumidityRatioforHumidityRatioEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::minimumProcessInletAirTemperatureforHumidityRatioEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->minimumProcessInletAirTemperatureforHumidityRatioEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::maximumProcessInletAirTemperatureforHumidityRatioEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->maximumProcessInletAirTemperatureforHumidityRatioEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::minimumRegenerationAirVelocityforHumidityRatioEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->minimumRegenerationAirVelocityforHumidityRatioEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::maximumRegenerationAirVelocityforHumidityRatioEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->maximumRegenerationAirVelocityforHumidityRatioEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::minimumRegenerationOutletAirHumidityRatioforHumidityRatioEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->minimumRegenerationOutletAirHumidityRatioforHumidityRatioEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::maximumRegenerationOutletAirHumidityRatioforHumidityRatioEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->maximumRegenerationOutletAirHumidityRatioforHumidityRatioEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::minimumRegenerationInletAirRelativeHumidityforHumidityRatioEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->minimumRegenerationInletAirRelativeHumidityforHumidityRatioEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::maximumRegenerationInletAirRelativeHumidityforHumidityRatioEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->maximumRegenerationInletAirRelativeHumidityforHumidityRatioEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::minimumProcessInletAirRelativeHumidityforHumidityRatioEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->minimumProcessInletAirRelativeHumidityforHumidityRatioEquation();
}
double HeatExchangerDesiccantBalancedFlowPerformanceDataType1::maximumProcessInletAirRelativeHumidityforHumidityRatioEquation() const {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->maximumProcessInletAirRelativeHumidityforHumidityRatioEquation();
}
void HeatExchangerDesiccantBalancedFlowPerformanceDataType1::autosizeNominalAirFlowRate() {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->autosizeNominalAirFlowRate();
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setNominalAirFlowRate(double nominalAirFlowRate) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setNominalAirFlowRate(nominalAirFlowRate);
}
void HeatExchangerDesiccantBalancedFlowPerformanceDataType1::autosizeNominalAirFaceVelocity() {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->autosizeNominalAirFaceVelocity();
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setNominalAirFaceVelocity(double nominalAirFaceVelocity) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setNominalAirFaceVelocity(nominalAirFaceVelocity);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setNominalElectricPower(double nominalElectricPower) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setNominalElectricPower(nominalElectricPower);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setTemperatureEquationCoefficient1(double temperatureEquationCoefficient1) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setTemperatureEquationCoefficient1(
temperatureEquationCoefficient1);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setTemperatureEquationCoefficient2(double temperatureEquationCoefficient2) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setTemperatureEquationCoefficient2(
temperatureEquationCoefficient2);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setTemperatureEquationCoefficient3(double temperatureEquationCoefficient3) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setTemperatureEquationCoefficient3(
temperatureEquationCoefficient3);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setTemperatureEquationCoefficient4(double temperatureEquationCoefficient4) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setTemperatureEquationCoefficient4(
temperatureEquationCoefficient4);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setTemperatureEquationCoefficient5(double temperatureEquationCoefficient5) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setTemperatureEquationCoefficient5(
temperatureEquationCoefficient5);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setTemperatureEquationCoefficient6(double temperatureEquationCoefficient6) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setTemperatureEquationCoefficient6(
temperatureEquationCoefficient6);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setTemperatureEquationCoefficient7(double temperatureEquationCoefficient7) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setTemperatureEquationCoefficient7(
temperatureEquationCoefficient7);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setTemperatureEquationCoefficient8(double temperatureEquationCoefficient8) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setTemperatureEquationCoefficient8(
temperatureEquationCoefficient8);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMinimumRegenerationInletAirHumidityRatioforTemperatureEquation(
double minimumRegenerationInletAirHumidityRatioforTemperatureEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMinimumRegenerationInletAirHumidityRatioforTemperatureEquation(minimumRegenerationInletAirHumidityRatioforTemperatureEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMaximumRegenerationInletAirHumidityRatioforTemperatureEquation(
double maximumRegenerationInletAirHumidityRatioforTemperatureEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMaximumRegenerationInletAirHumidityRatioforTemperatureEquation(maximumRegenerationInletAirHumidityRatioforTemperatureEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMinimumRegenerationInletAirTemperatureforTemperatureEquation(
double minimumRegenerationInletAirTemperatureforTemperatureEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMinimumRegenerationInletAirTemperatureforTemperatureEquation(minimumRegenerationInletAirTemperatureforTemperatureEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMaximumRegenerationInletAirTemperatureforTemperatureEquation(
double maximumRegenerationInletAirTemperatureforTemperatureEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMaximumRegenerationInletAirTemperatureforTemperatureEquation(maximumRegenerationInletAirTemperatureforTemperatureEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMinimumProcessInletAirHumidityRatioforTemperatureEquation(
double minimumProcessInletAirHumidityRatioforTemperatureEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMinimumProcessInletAirHumidityRatioforTemperatureEquation(minimumProcessInletAirHumidityRatioforTemperatureEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMaximumProcessInletAirHumidityRatioforTemperatureEquation(
double maximumProcessInletAirHumidityRatioforTemperatureEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMaximumProcessInletAirHumidityRatioforTemperatureEquation(maximumProcessInletAirHumidityRatioforTemperatureEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMinimumProcessInletAirTemperatureforTemperatureEquation(
double minimumProcessInletAirTemperatureforTemperatureEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setMinimumProcessInletAirTemperatureforTemperatureEquation(
minimumProcessInletAirTemperatureforTemperatureEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMaximumProcessInletAirTemperatureforTemperatureEquation(
double maximumProcessInletAirTemperatureforTemperatureEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setMaximumProcessInletAirTemperatureforTemperatureEquation(
maximumProcessInletAirTemperatureforTemperatureEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMinimumRegenerationAirVelocityforTemperatureEquation(
double minimumRegenerationAirVelocityforTemperatureEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setMinimumRegenerationAirVelocityforTemperatureEquation(
minimumRegenerationAirVelocityforTemperatureEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMaximumRegenerationAirVelocityforTemperatureEquation(
double maximumRegenerationAirVelocityforTemperatureEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setMaximumRegenerationAirVelocityforTemperatureEquation(
maximumRegenerationAirVelocityforTemperatureEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMinimumRegenerationOutletAirTemperatureforTemperatureEquation(
double minimumRegenerationOutletAirTemperatureforTemperatureEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMinimumRegenerationOutletAirTemperatureforTemperatureEquation(minimumRegenerationOutletAirTemperatureforTemperatureEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMaximumRegenerationOutletAirTemperatureforTemperatureEquation(
double maximumRegenerationOutletAirTemperatureforTemperatureEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMaximumRegenerationOutletAirTemperatureforTemperatureEquation(maximumRegenerationOutletAirTemperatureforTemperatureEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMinimumRegenerationInletAirRelativeHumidityforTemperatureEquation(
double minimumRegenerationInletAirRelativeHumidityforTemperatureEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMinimumRegenerationInletAirRelativeHumidityforTemperatureEquation(minimumRegenerationInletAirRelativeHumidityforTemperatureEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMaximumRegenerationInletAirRelativeHumidityforTemperatureEquation(
double maximumRegenerationInletAirRelativeHumidityforTemperatureEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMaximumRegenerationInletAirRelativeHumidityforTemperatureEquation(maximumRegenerationInletAirRelativeHumidityforTemperatureEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMinimumProcessInletAirRelativeHumidityforTemperatureEquation(
double minimumProcessInletAirRelativeHumidityforTemperatureEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMinimumProcessInletAirRelativeHumidityforTemperatureEquation(minimumProcessInletAirRelativeHumidityforTemperatureEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMaximumProcessInletAirRelativeHumidityforTemperatureEquation(
double maximumProcessInletAirRelativeHumidityforTemperatureEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMaximumProcessInletAirRelativeHumidityforTemperatureEquation(maximumProcessInletAirRelativeHumidityforTemperatureEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setHumidityRatioEquationCoefficient1(double humidityRatioEquationCoefficient1) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setHumidityRatioEquationCoefficient1(
humidityRatioEquationCoefficient1);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setHumidityRatioEquationCoefficient2(double humidityRatioEquationCoefficient2) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setHumidityRatioEquationCoefficient2(
humidityRatioEquationCoefficient2);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setHumidityRatioEquationCoefficient3(double humidityRatioEquationCoefficient3) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setHumidityRatioEquationCoefficient3(
humidityRatioEquationCoefficient3);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setHumidityRatioEquationCoefficient4(double humidityRatioEquationCoefficient4) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setHumidityRatioEquationCoefficient4(
humidityRatioEquationCoefficient4);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setHumidityRatioEquationCoefficient5(double humidityRatioEquationCoefficient5) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setHumidityRatioEquationCoefficient5(
humidityRatioEquationCoefficient5);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setHumidityRatioEquationCoefficient6(double humidityRatioEquationCoefficient6) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setHumidityRatioEquationCoefficient6(
humidityRatioEquationCoefficient6);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setHumidityRatioEquationCoefficient7(double humidityRatioEquationCoefficient7) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setHumidityRatioEquationCoefficient7(
humidityRatioEquationCoefficient7);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setHumidityRatioEquationCoefficient8(double humidityRatioEquationCoefficient8) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setHumidityRatioEquationCoefficient8(
humidityRatioEquationCoefficient8);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMinimumRegenerationInletAirHumidityRatioforHumidityRatioEquation(
double minimumRegenerationInletAirHumidityRatioforHumidityRatioEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMinimumRegenerationInletAirHumidityRatioforHumidityRatioEquation(minimumRegenerationInletAirHumidityRatioforHumidityRatioEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMaximumRegenerationInletAirHumidityRatioforHumidityRatioEquation(
double maximumRegenerationInletAirHumidityRatioforHumidityRatioEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMaximumRegenerationInletAirHumidityRatioforHumidityRatioEquation(maximumRegenerationInletAirHumidityRatioforHumidityRatioEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMinimumRegenerationInletAirTemperatureforHumidityRatioEquation(
double minimumRegenerationInletAirTemperatureforHumidityRatioEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMinimumRegenerationInletAirTemperatureforHumidityRatioEquation(minimumRegenerationInletAirTemperatureforHumidityRatioEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMaximumRegenerationInletAirTemperatureforHumidityRatioEquation(
double maximumRegenerationInletAirTemperatureforHumidityRatioEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMaximumRegenerationInletAirTemperatureforHumidityRatioEquation(maximumRegenerationInletAirTemperatureforHumidityRatioEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMinimumProcessInletAirHumidityRatioforHumidityRatioEquation(
double minimumProcessInletAirHumidityRatioforHumidityRatioEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMinimumProcessInletAirHumidityRatioforHumidityRatioEquation(minimumProcessInletAirHumidityRatioforHumidityRatioEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMaximumProcessInletAirHumidityRatioforHumidityRatioEquation(
double maximumProcessInletAirHumidityRatioforHumidityRatioEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMaximumProcessInletAirHumidityRatioforHumidityRatioEquation(maximumProcessInletAirHumidityRatioforHumidityRatioEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMinimumProcessInletAirTemperatureforHumidityRatioEquation(
double minimumProcessInletAirTemperatureforHumidityRatioEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMinimumProcessInletAirTemperatureforHumidityRatioEquation(minimumProcessInletAirTemperatureforHumidityRatioEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMaximumProcessInletAirTemperatureforHumidityRatioEquation(
double maximumProcessInletAirTemperatureforHumidityRatioEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMaximumProcessInletAirTemperatureforHumidityRatioEquation(maximumProcessInletAirTemperatureforHumidityRatioEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMinimumRegenerationAirVelocityforHumidityRatioEquation(
double minimumRegenerationAirVelocityforHumidityRatioEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setMinimumRegenerationAirVelocityforHumidityRatioEquation(
minimumRegenerationAirVelocityforHumidityRatioEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMaximumRegenerationAirVelocityforHumidityRatioEquation(
double maximumRegenerationAirVelocityforHumidityRatioEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->setMaximumRegenerationAirVelocityforHumidityRatioEquation(
maximumRegenerationAirVelocityforHumidityRatioEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMinimumRegenerationOutletAirHumidityRatioforHumidityRatioEquation(
double minimumRegenerationOutletAirHumidityRatioforHumidityRatioEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMinimumRegenerationOutletAirHumidityRatioforHumidityRatioEquation(minimumRegenerationOutletAirHumidityRatioforHumidityRatioEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMaximumRegenerationOutletAirHumidityRatioforHumidityRatioEquation(
double maximumRegenerationOutletAirHumidityRatioforHumidityRatioEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMaximumRegenerationOutletAirHumidityRatioforHumidityRatioEquation(maximumRegenerationOutletAirHumidityRatioforHumidityRatioEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMinimumRegenerationInletAirRelativeHumidityforHumidityRatioEquation(
double minimumRegenerationInletAirRelativeHumidityforHumidityRatioEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMinimumRegenerationInletAirRelativeHumidityforHumidityRatioEquation(minimumRegenerationInletAirRelativeHumidityforHumidityRatioEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMaximumRegenerationInletAirRelativeHumidityforHumidityRatioEquation(
double maximumRegenerationInletAirRelativeHumidityforHumidityRatioEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMaximumRegenerationInletAirRelativeHumidityforHumidityRatioEquation(maximumRegenerationInletAirRelativeHumidityforHumidityRatioEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMinimumProcessInletAirRelativeHumidityforHumidityRatioEquation(
double minimumProcessInletAirRelativeHumidityforHumidityRatioEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMinimumProcessInletAirRelativeHumidityforHumidityRatioEquation(minimumProcessInletAirRelativeHumidityforHumidityRatioEquation);
}
bool HeatExchangerDesiccantBalancedFlowPerformanceDataType1::setMaximumProcessInletAirRelativeHumidityforHumidityRatioEquation(
double maximumProcessInletAirRelativeHumidityforHumidityRatioEquation) {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()
->setMaximumProcessInletAirRelativeHumidityforHumidityRatioEquation(maximumProcessInletAirRelativeHumidityforHumidityRatioEquation);
}
boost::optional<double> HeatExchangerDesiccantBalancedFlowPerformanceDataType1::autosizedNominalAirFlowRate() {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->autosizedNominalAirFlowRate();
}
boost::optional<double> HeatExchangerDesiccantBalancedFlowPerformanceDataType1::autosizedNominalAirFaceVelocity() {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->autosizedNominalAirFaceVelocity();
}
void HeatExchangerDesiccantBalancedFlowPerformanceDataType1::autosize() {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->autosize();
}
void HeatExchangerDesiccantBalancedFlowPerformanceDataType1::applySizingValues() {
return getImpl<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl>()->applySizingValues();
}
/// @cond
HeatExchangerDesiccantBalancedFlowPerformanceDataType1::HeatExchangerDesiccantBalancedFlowPerformanceDataType1(
std::shared_ptr<detail::HeatExchangerDesiccantBalancedFlowPerformanceDataType1_Impl> impl)
: ResourceObject(impl) {}
/// @endcond
} // namespace model
} // namespace openstudio
| 60.030872 | 150 | 0.838998 | [
"object",
"vector",
"model"
] |
c5847a31165015bd7959debc9e1dbb3cdba29365 | 19,108 | cpp | C++ | source/polyvec/curve-tracer/curve_solver.cpp | dedoardo/polyfit | fea3bb9f28c2a44a55825529198e5c3796ac1fa6 | [
"MIT"
] | 27 | 2020-08-17T17:25:59.000Z | 2022-03-01T05:49:12.000Z | source/polyvec/curve-tracer/curve_solver.cpp | dedoardo/polyfit | fea3bb9f28c2a44a55825529198e5c3796ac1fa6 | [
"MIT"
] | 4 | 2020-08-26T13:54:59.000Z | 2020-09-21T07:19:22.000Z | source/polyvec/curve-tracer/curve_solver.cpp | dedoardo/polyfit | fea3bb9f28c2a44a55825529198e5c3796ac1fa6 | [
"MIT"
] | 5 | 2020-08-26T23:26:48.000Z | 2021-01-04T09:06:07.000Z | // Header
#include <polyvec/curve-tracer/curve_solver.hpp>
#include <polyvec/core/log.hpp>
// Eigen
#include <Eigen/Core>
#include <Eigen/Jacobi>
// Polyvec
#include <polyvec/api.hpp>
#include <polyvec/utils/union-find.hpp>
#include <nse/MathematicaFormatter.h>
#include <fstream>
#include <iostream>
#include <iomanip>
#define PRINT_JACOBIAN 0
#define PRINT_ITERATION_STATS 0
#define ENABLE_DERIVATIVE_CHECK 0
namespace polyvec {
// ============= EIGEN INTERFACE FOR MARQUART_LEVENBERG
int
GlobFitter::inputs() {
return n_parameters();
}
int
GlobFitter::values() {
return n_equations();
}
int
GlobFitter::operator() ( const Eigen::VectorXd& x, Eigen::VectorXd& fvec ) {
const double tol = 1e-10;
if ( ( _cached_params.size() ==0 ) || ( ( _cached_params - x ).norm() > tol ) ) {
set_variables ( x );
_cached_params = x;
compute_objective_and_jacobian ( _cached_objective, _cached_jacobian );
}
fvec = _cached_objective;
return 0;
}
int
GlobFitter::df ( const Eigen::VectorXd& x, Eigen::SparseMatrix<double>& fjac ) {
const double tol = 1e-10;
if ( ( _cached_params.size() ==0 ) || ( ( _cached_params - x ).norm() > tol ) ) {
set_variables ( x );
_cached_params = x;
compute_objective_and_jacobian ( _cached_objective, _cached_jacobian );
}
fjac = _cached_jacobian;
return 0;
}
// Separate file as it takes ages to compile.
int
GlobFitter::run_fitter ( FILE* log_file, std::function<void ( int ) > callback ) {
assert_break ( _is_setup ); //
Eigen::VectorXd x0 = get_variables();
set_variables(x0); //accomodate for fixed parameters
Eigen::VectorXd x = x0;
if (n_parameters() == 0 || n_equations() == 0)
return 0;
// Init Eigen
Eigen::LevenbergMarquardt<GlobFitter> lm ( *this );
lm.setGtol(1e-5);
lm.setXtol(1e-5);
lm.setFtol(1e-5);
using Eigen::LevenbergMarquardtSpace::Running;
using Eigen::LevenbergMarquardtSpace::Status;
Status status = lm.minimizeInit ( x );
int iter_id = 0;
if ( log_file ) {
fprintf ( log_file, " ==== MARQURT-LEVENBERG for Bezier Fitting ===== \n" );
fprintf(log_file, " %i equations, %i degrees of freedom\n", n_equations(), n_parameters());
fprintf ( log_file, " %10s %20s %20s \n", "ITER", "OBJ", "GRAD" );
fflush ( log_file );
}
#if PRINT_ITERATION_STATS
printf("------------------------\n");
#endif
bool keep_running = true;
while (keep_running && iter_id < _max_iterations) {
status = lm.minimizeOneStep ( x );
#if ENABLE_DERIVATIVE_CHECK
check_derivatives();
#endif
#if PRINT_ITERATION_STATS
std::cout << lm.gnorm() << " " << lm.fnorm() * lm.fnorm() << " " << status << std::endl;
#endif
if ( log_file ) {
if ( ( iter_id % 5 == 0 ) || ( status != Running ) ) {
fprintf ( log_file, " %10d %20.8e %20.8e \n",
iter_id,
_cached_objective.norm(),
( _cached_jacobian.transpose() * _cached_objective ).norm() );
fflush ( log_file );
}
}
++iter_id;
if ( callback ) {
callback ( iter_id );
}
if ( status != Running ) {
keep_running = false;
} else if ( iter_id >= _max_iterations ) {
if (log_file) {
fprintf(log_file, " %10d %20.8e %20.8e \n",
iter_id,
_cached_objective.norm(),
(_cached_jacobian.transpose() * _cached_objective).norm());
fflush(log_file);
}
}
}
if ( log_file ) {
switch ( status ) {
#define TAKECAREOF(XX) \
case(Eigen::LevenbergMarquardtSpace::XX): fprintf(log_file, "FINISHED, Status: %s \n", #XX); break
TAKECAREOF ( NotStarted );
TAKECAREOF ( Running );
TAKECAREOF ( ImproperInputParameters );
TAKECAREOF ( RelativeReductionTooSmall );
TAKECAREOF ( RelativeErrorTooSmall );
TAKECAREOF ( RelativeErrorAndReductionTooSmall );
TAKECAREOF ( CosinusTooSmall );
TAKECAREOF ( TooManyFunctionEvaluation );
TAKECAREOF ( FtolTooSmall );
TAKECAREOF ( XtolTooSmall );
TAKECAREOF ( GtolTooSmall );
TAKECAREOF ( UserAsked );
#undef TAKECAREOF
}
// Print the objectives
for(int i = 0 ; i < (int)_objectives.size() ; ++i)
{
fprintf ( log_file, "%s: %g \n",
globfitobjectivetype_as_string(_objectives[i]->get_type()).c_str(),
_cached_objective(i) );
}
fflush ( log_file );
}
set_variables(x);
#if PRINT_ITERATION_STATS
std::cout << "Energy per objective type:" << std::endl;
std::map<GlobFitObjectiveType, double> energy_per_type;
for (int i = 0; i < _objectives.size(); ++i)
{
energy_per_type[_objectives[i]->get_type()] += _cached_objective.segment(_xadj_equations[i], _xadj_equations[i + 1] - _xadj_equations[i]).squaredNorm();
}
for (auto& entry : energy_per_type)
{
std::cout << globfitobjectivetype_as_string(entry.first) << ": " << entry.second << std::endl;
}
#endif
return iter_id;
}
void GlobFitter::set_curves(const std::vector<GlobFitCurveParametrization*>& curves_in) {
_curves = curves_in;
_is_setup = false;
}
void GlobFitter::set_objectives(const std::vector<GlobFitObjective*>& objectives_in) {
_objectives = objectives_in;
_is_setup = false;
}
void GlobFitter::set_constraints(const std::vector<GlobFitConstraint*>& c) {
_constraints = c;
constraint_gradients.resize(c.size());
_is_setup = false;
}
void GlobFitter::setup(const int max_iterations) {
_max_iterations = max_iterations;
curve_to_index.clear();
for (int i = 0; i < _curves.size(); ++i)
curve_to_index[_curves[i]] = i;
//Assign a temporary index to each parameter
nextParameter = 0;
for (int i = 0; i < (int)_curves.size(); ++i) {
auto curve = _curves[i];
auto& info = curve->get_parameter_info();
for (auto& entry : info) {
entry.variable_id = nextParameter++;
entry.constraint_id = -1;
entry.fixedValuePropagated = std::numeric_limits<double>::quiet_NaN();
}
}
//Assign constraint information
for(int i = 0; i < _constraints.size(); ++i)
{
auto& target = _constraints[i]->get_target_param();
auto& param = target.curve->get_parameter_info()[target.internal_parameter];
assert_break_msg(param.constraint_id == -1, "Only one constraint is permitted per parameter.");
assert_break_msg(std::isnan(param.fixedValue), "A fixed parameter cannot have an additional constraint.");
param.constraint_id = i;
}
//Check if there are chained constraints
for (auto& c : _constraints)
{
for (auto& source : c->get_source_params())
{
assert_break_msg(source.curve->get_parameter_info()[source.internal_parameter].constraint_id == -1, "Chained constraints are not supported.");
}
}
//Find the coupled parameters with a union-find
struct EntryData
{
int variable_id;
double fixedValue = std::numeric_limits<double>::quiet_NaN();
bool is_constrained = false;
};
UnionFind<EntryData> uf(nextParameter);
for (int i = 0; i < (int)_curves.size(); ++i) {
auto curve = _curves[i];
auto& info = curve->get_parameter_info();
for (auto& entry : info) {
uf[entry.variable_id].is_constrained = entry.constraint_id != -1;
for (auto& c : entry.coupled_parameters) {
auto& param2 = c.curve->get_parameter_info()[c.internal_parameter];
auto coupledParamId = param2.variable_id;
uf.merge(entry.variable_id, coupledParamId);
assert_break_msg(entry.constraint_id == -1 && param2.constraint_id == -1, "Constraining coupled parameters is not supported.");
}
}
}
//set fixed values to parents
for (int i = 0; i < (int)_curves.size(); ++i) {
auto curve = _curves[i];
auto& info = curve->get_parameter_info();
for (auto& entry : info) {
if (!std::isnan(entry.fixedValue)) {
auto& parentFixed = uf[uf.getRepresentative(entry.variable_id)].fixedValue;
assert_break(std::isnan(parentFixed) || std::abs(parentFixed - entry.fixedValue) < 0.0001);
parentFixed = entry.fixedValue;
}
}
}
//assign actual parameter indices to parents
nextParameter = 0;
for (int i = 0; i < uf.size(); ++i)
if (uf[i].parent == i && std::isnan(uf[i].fixedValue) && !uf[i].is_constrained)
uf[i].variable_id = nextParameter++;
//assign parameter indices to children
for (int i = 0; i < (int)_curves.size(); ++i) {
auto curve = _curves[i];
auto& info = curve->get_parameter_info();
for (auto& entry : info) {
auto& parent = uf[uf.getRepresentative(entry.variable_id)];
// reset the variable id
entry.variable_id = -1;
if (!std::isnan(parent.fixedValue))
// this parameter is fixed
entry.fixedValuePropagated = parent.fixedValue;
else if (entry.constraint_id != -1)
// this parameter is constrained
;
else
// this parameter has a variable
entry.variable_id = parent.variable_id;
}
}
//
// Equation bookkeeping
//
_xadj_equations.resize(_objectives.size() + 1);
_xadj_equations[0] = 0;
variables_in_objective.clear();
variables_in_objective.resize(_objectives.size());
for (int i = 0; i < (int)_objectives.size(); ++i) {
_xadj_equations[i + 1] = _xadj_equations[i] + _objectives[i]->n_equations();
auto& o = _objectives[i];
for (auto c : o->get_curves()) {
for (auto& p : c->get_parameter_info()) {
if (p.variable_id != -1)
variables_in_objective[i].push_back(p.variable_id);
else if (p.constraint_id != -1)
for (auto& constraint_source : _constraints[p.constraint_id]->get_source_params())
{
auto& source_param = constraint_source.curve->get_parameter_info()[constraint_source.internal_parameter];
if (source_param.variable_id != -1)
variables_in_objective[i].push_back(source_param.variable_id);
}
}
}
}
//
// Initial params
//
_is_setup = true;
//check_derivatives();
}
int GlobFitter::n_parameters() {
assert_break(_is_setup);
return nextParameter;
}
int GlobFitter::n_equations() {
assert_break(_is_setup);
return _xadj_equations.back();
}
bool GlobFitter::is_setup() {
return _is_setup;
}
std::vector<GlobFitCurveParametrization*> GlobFitter::get_curves() {//
return _curves;
}
std::vector<GlobFitObjective*> GlobFitter::get_objectives() {//
return _objectives;
}
void GlobFitter::compute_objective_and_jacobian(Eigen::VectorXd& obj, Eigen::SparseMatrix<double>& jac) {//
assert_break(_is_setup);
obj.setZero(n_equations());
if (jac.isCompressed()) {
jac.resize(n_equations(), n_parameters());
//reserve space for jacobian, this is only done once
Eigen::VectorXi entriesPerColumn(n_parameters());
entriesPerColumn.setZero();
for (int i = 0; i < _objectives.size(); ++i)
{
for (auto variable : variables_in_objective[i])
entriesPerColumn(variable) += _objectives[i]->n_equations();
}
_cached_jacobian.reserve(entriesPerColumn);
}
Eigen::VectorXd sub_obj;
Eigen::MatrixXd sub_jac;
for (int objid = 0; objid < (int)_objectives.size(); ++objid) {
const int eq_beg = _xadj_equations[objid];
const int eq_len = _xadj_equations[objid + 1] - _xadj_equations[objid];
// Eval objective
_objectives[objid]->compute_objective_and_jacobian(sub_obj, sub_jac);
// Set obj
obj.segment(eq_beg, eq_len) = _objectives[objid]->get_sqrt_weight() * sub_obj;
// Set Jacobian
// Initialize to zero
for (auto variable : variables_in_objective[objid])
{
for (int i = _xadj_equations[objid]; i < _xadj_equations[objid + 1]; ++i)
jac.coeffRef(i, variable) = 0;
}
// Add the partial gradient contributions
int subParamId = 0;
for (auto curve : _objectives[objid]->get_curves()) {
auto& params = curve->get_parameter_info();
for (auto& p : params) {
if (p.variable_id != -1) {
//the parameter is a variable
for(int eq = eq_beg; eq != _xadj_equations[objid + 1]; ++eq)
jac.coeffRef(eq, p.variable_id) += _objectives[objid]->get_sqrt_weight() * sub_jac.coeff(eq - eq_beg, subParamId);
}
else if (p.constraint_id != -1) {
//the parameter is derived from other variables
auto& sources = _constraints[p.constraint_id]->get_source_params();
auto& dpdsources = constraint_gradients[p.constraint_id];
for (int iSource = 0; iSource < sources.size(); ++iSource)
{
auto& source = sources[iSource];
auto& psource = source.curve->get_parameter_info()[source.internal_parameter];
if (psource.variable_id != -1)
{
for (int eq = eq_beg; eq != _xadj_equations[objid + 1]; ++eq)
//apply chain rule d obj / d source = d obj / d target * d target / d source
jac.coeffRef(eq, psource.variable_id) += _objectives[objid]->get_sqrt_weight() * sub_jac.coeff(eq - eq_beg, subParamId) * dpdsources(iSource);
}
}
}
++subParamId;
}
} // end of curves_outline
} // end of objectives
#if PRINT_JACOBIAN
{
std::ofstream file("jacobian.txt", std::ios::trunc | std::ios::out);
file << "Variables: \n";
file << get_variables().transpose() << "\n\n";
file << "Obj | Jacobian: \n";
for (int i_obj = 0; i_obj < _objectives.size(); ++i_obj)
{
auto row_start = _xadj_equations[i_obj];
auto row_end = _xadj_equations[i_obj + 1];
for (int row = row_start; row < row_end; ++row)
{
std::string type = (row == row_start ? globfitobjectivetype_as_string(_objectives[i_obj]->get_type()) : "");
file << std::setw(40) << type << std::setw(12) << obj(row) << " | ";
for (int col = 0; col < jac.cols(); ++col)
file << std::setw(14) << jac.coeff(row, col);
file << '\n';
}
}
file << '\n';
file << "Curve parameters (variable id, fixed value, fixed value propagated): \n";
for (auto& c : get_curves()) {
for (auto& p : c->get_parameter_info())
file << "(" << p.variable_id << ", " << p.fixedValue << ", " << p.fixedValuePropagated << ") ";
file << '\n';
}
file << '\n';
//file << "Sparse Jacobian: \n";
//file << nse::util::FormatMathematica(jac);
file.close();
}
#endif
}
void GlobFitter::check_derivatives() {
auto x = get_variables();
Eigen::VectorXd obj;
Eigen::SparseMatrix<double> jac;
jac.resize(n_equations(), n_parameters());
_cached_jacobian.resize(n_equations(), n_parameters());
const double eps = 0.001;
Eigen::VectorXd objPlus, objMinus;
bool error = false;
compute_objective_and_jacobian(obj, jac);
for (int ip = 0; ip < n_parameters(); ++ip)
{
auto xCopy = x;
xCopy(ip) += eps;
set_variables(xCopy);
compute_objective_and_jacobian(objPlus, _cached_jacobian);
xCopy(ip) -= 2 * eps;
set_variables(xCopy);
compute_objective_and_jacobian(objMinus, _cached_jacobian);
Eigen::VectorXd expectedDeriv = (objPlus - objMinus) / (2 * eps);
for (int i = 0; i < n_equations(); ++i)
{
auto error = jac.coeff(i, ip) - expectedDeriv(i);
auto relativeError = error / std::max(std::abs(obj(i)), std::abs(jac.coeff(i, ip)));
if (std::abs(relativeError) > 0.001 && std::abs(error) > 1e-10)
{
error = true;
std::cout << "Wrong derivative at parameter " << ip << ", equation " << i << ". Numerical derivative: " << expectedDeriv(i) <<
", computed derivative: " << jac.coeff(i, ip) << ", objective value: " << obj(i) << ", parameter value: " << x(ip) << std::endl;
int obj_id = 0;
while (_xadj_equations[obj_id] <= i)
++obj_id;
--obj_id;
std::cout << "Equation belongs to objective " << obj_id << " (type " << globfitobjectivetype_as_string(_objectives[obj_id]->get_type()) << ", local equation " << i - _xadj_equations[obj_id] << ")" << std::endl;
std::cout << "Parameter belongs to the following curves: ";
for (int ic = 0; ic < _curves.size(); ++ic)
{
auto curve = _curves[ic];
auto& curve_params = curve->get_parameter_info();
for (int icp = 0; icp < curve_params.size(); ++icp)
{
if (curve_params[icp].variable_id == ip)
std::cout << "curve " << ic << " (type " << typeid(*curve).name() << ", local parameter " << icp << ") ";
}
}
std::cout << std::endl;
}
}
}
if (!error)
std::cout << "Derivatives seem good." << std::endl;
set_variables(x);
}
Eigen::VectorXd GlobFitter::get_variables() {//
assert_break(_is_setup);
Eigen::VectorXd ans(n_parameters());
for(auto curve : _curves) {
auto params = curve->get_params();
auto& pInfo = curve->get_parameter_info();
for (int i = 0; i < pInfo.size(); ++i) {
if (pInfo[i].variable_id != -1)
ans(pInfo[i].variable_id) = params(i);
}
}
return ans;
}
void GlobFitter::set_variables(const Eigen::VectorXd& params_in) { //
std::vector<Eigen::VectorXd> curve_params(_curves.size());
//Fill the variables into curve parameters, consider fixed and coupled parameters
for (int iCurve = 0; iCurve < _curves.size(); ++iCurve) {
auto curve = _curves[iCurve];
auto& pInfo = curve->get_parameter_info();
auto& params = curve_params[iCurve];
params.resize(pInfo.size());
for (int i = 0; i < pInfo.size(); ++i) {
if (pInfo[i].variable_id != -1)
params(i) = params_in(pInfo[i].variable_id);
else if (!std::isnan(pInfo[i].fixedValuePropagated))
params(i) = pInfo[i].fixedValuePropagated;
}
//at this point, the constrained parameters are not yet filled in
//set them anyway, so that the calculation of constraints can access them
curve->set_params(params);
}
std::vector<bool> curve_has_constrained_parameters(_curves.size(), false);
//Derive parameters from constraints
for (int iConstraint = 0; iConstraint < _constraints.size(); ++iConstraint) {
auto c = _constraints[iConstraint];
auto& target = c->get_target_param();
auto curve_id = curve_to_index.at(target.curve);
//We calculate the value of this constraint and assume the following:
// * all source parameters are set on the underlying parametrizations (no chained constraints)
std::tie(curve_params[curve_id](target.internal_parameter), constraint_gradients[iConstraint]) = c->f();
curve_has_constrained_parameters[curve_id] = true;
}
//Set the new curve parameters that are changed by constraints
for (int iCurve = 0; iCurve < _curves.size(); ++iCurve) {
if (!curve_has_constrained_parameters[iCurve])
continue;
auto curve = _curves[iCurve];
curve->set_params(curve_params[iCurve]);
}
}
void GlobFitter::report_errors(FILE* error_file) {
for (size_t i = 0; i < _curves.size(); ++i) {
fprintf(error_file, "curve id %d\n", (int)i);
fprintf(error_file, "----------------------------------------------\n");
for (size_t j = 0; j < _objectives.size(); ++j) {
GlobFitObjective* obj = _objectives[j];
Eigen::VectorXd res;
Eigen::MatrixXd jac;
obj->compute_objective_and_jacobian(res, jac);
auto type = globfitobjectivetype_as_string(obj->get_type());
fprintf(error_file, "objective: %s\n", type);
fprintf(error_file, "values: ");
for (Eigen::Index k = 0; k < res.size(); ++k) {
fprintf(error_file, "%f ", res(k));
}
fprintf(error_file, "\n");
}
}
}
} | 31.171289 | 214 | 0.644808 | [
"vector"
] |
c5965849b16a7a723d8c7af68cbfa2a64c662808 | 11,543 | cpp | C++ | Source/src/ezcard/io/scribe/binary_property_scribe.cpp | ProtonMail/cpp-openpgp | b47316c51357b8d15eb3bcc376ea5e59a6a9a108 | [
"MIT"
] | 5 | 2019-10-30T06:10:10.000Z | 2020-04-25T16:52:06.000Z | Source/src/ezcard/io/scribe/binary_property_scribe.cpp | ProtonMail/cpp-openpgp | b47316c51357b8d15eb3bcc376ea5e59a6a9a108 | [
"MIT"
] | null | null | null | Source/src/ezcard/io/scribe/binary_property_scribe.cpp | ProtonMail/cpp-openpgp | b47316c51357b8d15eb3bcc376ea5e59a6a9a108 | [
"MIT"
] | 2 | 2019-11-27T23:47:54.000Z | 2020-01-13T16:36:03.000Z | //
// binary_property_scribe.cpp
// OpenPGP
//
// Created by Yanfeng Zhang on 5/19/17.
//
// The MIT License
//
// Copyright (c) 2019 Proton Technologies AG
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#include "binary_property_scribe.hpp"
// public BinaryPropertyScribe(Class<T> clazz, String propertyName) {
// super(clazz, propertyName);
// }
// @Override
// protected void _prepareParameters(T property, VCardParameters copy, VCardVersion version, VCard vcard) {
// MediaTypeParameter contentType = property.getContentType();
// if (contentType == null) {
// contentType = new MediaTypeParameter(null, null, null);
// }
//
// if (property.getUrl() != null) {
// copy.setEncoding(null);
//
// switch (version) {
// case V2_1:
// copy.setType(contentType.getValue());
// copy.setMediaType(null);
// break;
// case V3_0:
// copy.setType(contentType.getValue());
// copy.setMediaType(null);
// break;
// case V4_0:
// copy.setMediaType(contentType.getMediaType());
// break;
// }
//
// return;
// }
//
// if (property.getData() != null) {
// copy.setMediaType(null);
//
// switch (version) {
// case V2_1:
// copy.setEncoding(Encoding.BASE64);
// copy.setType(contentType.getValue());
// break;
// case V3_0:
// copy.setEncoding(Encoding.B);
// copy.setType(contentType.getValue());
// break;
// case V4_0:
// copy.setEncoding(null);
// //don't null out TYPE, it could be set to "home", "work", etc
// break;
// }
//
// return;
// }
// }
//
// @Override
// protected String _writeText(T property, WriteContext context) {
// return write(property, context.getVersion());
// }
//
// @Override
// protected T _parseText(String value, VCardDataType dataType, VCardParameters parameters, ParseContext context) {
// value = VObjectPropertyValues.unescape(value);
// return parse(value, dataType, parameters, context.getVersion());
// }
//
// @Override
// protected void _writeXml(T property, XCardElement parent) {
// parent.append(VCardDataType.URI, write(property, parent.version()));
// }
//
// @Override
// protected T _parseXml(XCardElement element, VCardParameters parameters, ParseContext context) {
// String value = element.first(VCardDataType.URI);
// if (value != null) {
// return parse(value, VCardDataType.URI, parameters, element.version());
// }
//
// throw missingXmlElements(VCardDataType.URI);
// }
//
// @Override
// protected T _parseHtml(HCardElement element, ParseContext context) {
// String elementName = element.tagName();
// if (!"object".equals(elementName)) {
// throw new CannotParseException(1, elementName);
// }
//
// String data = element.absUrl("data");
// if (data.length() == 0) {
// throw new CannotParseException(2);
// }
//
// try {
// DataUri uri = DataUri.parse(data);
// U mediaType = _mediaTypeFromMediaTypeParameter(uri.getContentType());
//
// return _newInstance(uri.getData(), mediaType);
// } catch (IllegalArgumentException e) {
// //not a data URI
// U mediaType = null;
// String type = element.attr("type");
// if (type.length() > 0) {
// mediaType = _mediaTypeFromMediaTypeParameter(type);
// } else {
// String extension = getFileExtension(data);
// mediaType = (extension == null) ? null : _mediaTypeFromFileExtension(extension);
// }
//
// return _newInstance(data, mediaType);
// }
// }
//
// @Override
// protected JCardValue _writeJson(T property) {
// return JCardValue.single(write(property, VCardVersion.V4_0));
// }
//
// @Override
// protected T _parseJson(JCardValue value, VCardDataType dataType, VCardParameters parameters, ParseContext context) {
// String valueStr = value.asSingle();
// return parse(valueStr, dataType, parameters, VCardVersion.V4_0);
// }
//
// /**
// * Called if the unmarshalling code cannot determine how to unmarshal the
// * value.
// * @param value the value
// * @param version the version of the vCard
// * @param contentType the content type of the resource of null if unknown
// * @return the unmarshalled property object or null if it cannot be
// * unmarshalled
// */
// protected T cannotUnmarshalValue(String value, VCardVersion version, U contentType) {
// switch (version) {
// case V2_1:
// case V3_0:
// if (value.startsWith("http")) {
// return _newInstance(value, contentType);
// }
// return _newInstance(Base64.decodeBase64(value), contentType);
// case V4_0:
// return _newInstance(value, contentType);
// }
// return null;
// }
//
// /**
// * Builds a {@link MediaTypeParameter} object based on the information in
// * the MEDIATYPE parameter or data URI of 4.0 vCards.
// * @param mediaType the media type string (e.g. "image/jpeg")
// * @return the media type object
// */
// protected abstract U _mediaTypeFromMediaTypeParameter(String mediaType);
//
// /**
// * Builds a {@link MediaTypeParameter} object based on the value of the TYPE
// * parameter in 2.1/3.0 vCards.
// * @param type the TYPE value (e.g. "JPEG")
// * @return the media type object
// */
// protected abstract U _mediaTypeFromTypeParameter(String type);
//
// /**
// * Searches for a {@link MediaTypeParameter} object, given a file extension.
// * @param extension the file extension (e.g. "jpg")
// * @return the media type object or null if not found
// */
// protected abstract U _mediaTypeFromFileExtension(String extension);
//
// protected abstract T _newInstance(String uri, U contentType);
//
// protected abstract T _newInstance(byte data[], U contentType);
//
// private U parseContentType(String value, VCardParameters parameters, VCardVersion version) {
// switch (version) {
// case V2_1:
// case V3_0:
// //get the TYPE parameter
// String type = parameters.getType();
// if (type != null) {
// return _mediaTypeFromTypeParameter(type);
// }
// break;
// case V4_0:
// //get the MEDIATYPE parameter
// String mediaType = parameters.getMediaType();
// if (mediaType != null) {
// return _mediaTypeFromMediaTypeParameter(mediaType);
// }
// break;
// }
//
// //look for a file extension in the property value
// String extension = getFileExtension(value);
// return (extension == null) ? null : _mediaTypeFromFileExtension(extension);
// }
//
// private T parse(String value, VCardDataType dataType, VCardParameters parameters, VCardVersion version) {
// U contentType = parseContentType(value, parameters, version);
//
// switch (version) {
// case V2_1:
// case V3_0:
// //parse as URL
// if (dataType == VCardDataType.URL || dataType == VCardDataType.URI) {
// return _newInstance(value, contentType);
// }
//
// //parse as binary
// Encoding encodingSubType = parameters.getEncoding();
// if (encodingSubType == Encoding.BASE64 || encodingSubType == Encoding.B) {
// return _newInstance(Base64.decodeBase64(value), contentType);
// }
//
// break;
// case V4_0:
// try {
// //parse as data URI
// DataUri uri = DataUri.parse(value);
// contentType = _mediaTypeFromMediaTypeParameter(uri.getContentType());
// return _newInstance(uri.getData(), contentType);
// } catch (IllegalArgumentException e) {
// //not a data URI
// }
// break;
// }
//
// return cannotUnmarshalValue(value, version, contentType);
// }
//
// private String write(T property, VCardVersion version) {
// String url = property.getUrl();
// if (url != null) {
// return url;
// }
//
// byte data[] = property.getData();
// if (data != null) {
// switch (version) {
// case V2_1:
// case V3_0:
// return Base64.encodeBase64String(data);
// case V4_0:
// U contentType = property.getContentType();
// String mediaType = (contentType == null || contentType.getMediaType() == null) ? "application/octet-stream" : contentType.getMediaType();
// return new DataUri(mediaType, data).toString();
// }
// }
//
// return "";
// }
//
// /**
// * Gets the file extension from a URL.
// * @param url the URL
// * @return the file extension (e.g. "jpg") or null if not found
// */
// protected static String getFileExtension(String url) {
// int dotPos = url.lastIndexOf('.');
// if (dotPos < 0 || dotPos == url.length() - 1) {
// return null;
// }
//
// int slashPos = url.lastIndexOf('/');
// if (slashPos > dotPos) {
// return null;
// }
//
// return url.substring(dotPos + 1);
// }
//}
| 37.970395 | 159 | 0.545959 | [
"object"
] |
c5a6da180715f4007f906ebc8057e32658d0ed50 | 7,174 | cpp | C++ | Sources/Entry/Gameplay/Character.cpp | ace13/LD32 | 17bcaf4940ad3e3133764df0353d4f3b4afc8c0f | [
"MIT"
] | null | null | null | Sources/Entry/Gameplay/Character.cpp | ace13/LD32 | 17bcaf4940ad3e3133764df0353d4f3b4afc8c0f | [
"MIT"
] | 2 | 2015-04-18T10:56:46.000Z | 2015-04-18T13:22:56.000Z | Sources/Entry/Gameplay/Character.cpp | ace13/LD32 | 17bcaf4940ad3e3133764df0353d4f3b4afc8c0f | [
"MIT"
] | null | null | null | #include "Character.hpp"
#include "FallacyTime.hpp"
#include <Game/ScriptObject.hpp>
#include <SFML/Graphics/CircleShape.hpp>
#include <SFML/Graphics/RenderTarget.hpp>
#include <scriptarray/scriptarray.h>
#include <angelscript.h>
using namespace Gameplay;
namespace
{
void* getCharacter()
{
asIScriptObject* obj = reinterpret_cast<asIScriptObject*>(asGetActiveContext()->GetThisPointer());
Kunlaboro::Component* sobj = reinterpret_cast<Kunlaboro::Component*>(obj->GetObjectType()->GetUserData((uintptr_t)obj));
return sobj->getEntitySystem()->getAllComponentsOnEntity(sobj->getOwnerId(), "Fallacy.Character")[0];
}
CScriptArray* findInRadius(const Math::Vec2& pos, float radius)
{
std::list<Character*> list;
asIScriptObject* obj = reinterpret_cast<asIScriptObject*>(asGetActiveContext()->GetThisPointer());
Kunlaboro::Component* sobj = reinterpret_cast<Kunlaboro::Component*>(obj->GetObjectType()->GetUserData((uintptr_t)obj));
sobj->sendMessage<void, std::list<Character*>&>("Fallacy.GetEnemies", list);
auto ret = CScriptArray::Create(obj->GetEngine()->GetObjectTypeByDecl("array<Character@>"));
for (auto& val : list)
if (val->getPosition().getDistance(pos) < radius)
ret->InsertLast(val);
return ret;
}
CScriptArray* findInLine(const Math::Vec2& pos, const Math::Vec2& dir, float radius, float lineThickness)
{
std::list<Character*> list;
asIScriptObject* obj = reinterpret_cast<asIScriptObject*>(asGetActiveContext()->GetThisPointer());
Kunlaboro::Component* sobj = reinterpret_cast<Kunlaboro::Component*>(obj->GetObjectType()->GetUserData((uintptr_t)obj));
sobj->sendGlobalMessage<void, std::list<Character*>&>("Fallacy.GetEnemies", list);
auto ret = CScriptArray::Create(obj->GetEngine()->GetObjectTypeByDecl("array<Character@>"));
for (auto& val : list)
{
if (!val)
continue;
auto dirCopy = dir;
auto diff = (val->getPosition() - pos);
dirCopy.setLength(diff.getLength());
if (diff.getDistance(dirCopy) < val->getRadius() + lineThickness && diff.getLength() < radius)
ret->InsertLast(&val);
}
return ret;
}
#ifndef AS_SUPPORT_VALRET
void findInRadius_generic(asIScriptGeneric* gen)
{
Math::Vec2* v = reinterpret_cast<Math::Vec2*>(gen->GetArgObject(0));
float rad = gen->GetArgFloat(1);
gen->SetReturnObject(findInRadius(*v, rad));
}
void findInLine_generic(asIScriptGeneric* gen)
{
Math::Vec2* v = reinterpret_cast<Math::Vec2*>(gen->GetArgObject(0));
Math::Vec2* v2 = reinterpret_cast<Math::Vec2*>(gen->GetArgObject(1));
float rad = gen->GetArgFloat(2);
float lineThick = gen->GetArgFloat(3);
gen->SetReturnObject(findInLine(*v, *v2, rad, lineThick));
}
#endif
}
void Character::addScript(asIScriptEngine* eng)
{
eng->RegisterObjectType("Character", 0, asOBJ_REF | asOBJ_NOCOUNT);
eng->RegisterGlobalFunction("Character@ GetCharacter()", asFUNCTION(getCharacter), asCALL_CDECL);
eng->RegisterObjectMethod("Character", "const Vec2& get_AimVec() const", asMETHOD(Character, getAimVec), asCALL_THISCALL);
eng->RegisterObjectMethod("Character", "const Vec2& get_Position() const", asMETHOD(Character, getPosition), asCALL_THISCALL);
eng->RegisterObjectMethod("Character", "const Vec2& get_Velocity() const", asMETHOD(Character, getVelocity), asCALL_THISCALL);
eng->RegisterObjectMethod("Character", "void set_AimVec(Vec2&in) const", asMETHOD(Character, setAimVec), asCALL_THISCALL);
eng->RegisterObjectMethod("Character", "void set_Position(Vec2&in) const", asMETHOD(Character, setPosition), asCALL_THISCALL);
eng->RegisterObjectMethod("Character", "void set_Velocity(Vec2&in) const", asMETHOD(Character, setVelocity), asCALL_THISCALL);
eng->RegisterObjectMethod("Character", "float get_Radius() const", asMETHOD(Character, getRadius), asCALL_THISCALL);
eng->RegisterObjectMethod("Character", "void set_Radius(float) const", asMETHOD(Character, setRadius), asCALL_THISCALL);
eng->RegisterObjectMethod("Character", "void Damage(float, Vec2&in)", asMETHOD(Character, damage), asCALL_THISCALL);
eng->RegisterObjectMethod("Character", "void Kill()", asMETHOD(Character, kill), asCALL_THISCALL);
#ifdef AS_SUPPORT_VALRET
eng->RegisterGlobalFunction("array<Character@>@ FindInRadius(Vec2&in, float)", asFUNCTION(findInRadius), asCALL_CDECL);
eng->RegisterGlobalFunction("array<Character@>@ FindInLine(Vec2&in, Vec2&in, float, float = 0)", asFUNCTION(findInLine), asCALL_CDECL);
#else
eng->RegisterGlobalFunction("array<Character@>@ FindInRadius(Vec2&in, float)", asFUNCTION(findInRadius_generic), asCALL_GENERIC);
eng->RegisterGlobalFunction("array<Character@>@ FindInLine(Vec2&in, Vec2&in, float, float = 0)", asFUNCTION(findInLine_generic), asCALL_GENERIC);
#endif
}
Character::Character() : Kunlaboro::Component("Fallacy.Character"),
mRadius(0), mHealth(10), mSanity(10), mMaxSanity(10)
{
}
Character::~Character()
{
}
void Character::addedToEntity()
{
requestMessage("SetPosition", &Character::setPosition, true);
requestMessage("GetPosition", &Character::getPositionMsg, true);
requestMessage("SetRadius", &Character::setRadius, true);
requestMessage("GetRadius", &Character::getRadiusMsg , true);
requestMessage("Game.Draw", &Character::draw);
requestMessage("Game.Tick", &Character::tick);
}
void Character::damage(float dmg, const Math::Vec2& dir)
{
if (mSanity > 0)
{
float dmgC = dmg;
dmg -= mSanity;
mSanity -= dmgC;
if (mSanity < 0)
mSanity = 0;
}
if (dmg > 0)
mHealth -= dmg;
mPosition += dir.getRotated(Math::randomFloat(-Math::HALF_PI / 2, Math::HALF_PI / 2)) * mRadius;
if (mHealth < 0)
kill();
}
void Character::kill()
{
getEntitySystem()->destroyEntity(getOwnerId());
}
float Character::getRadius() const
{
return mRadius;
}
void Character::setRadius(float r)
{
mRadius = r;
}
const Math::Vec2& Character::getAimVec() const
{
return mAimVec;
}
const Math::Vec2& Character::getPosition() const
{
return mPosition;
}
const Math::Vec2& Character::getVelocity() const
{
return mVelocity;
}
void Character::setAimVec(const Math::Vec2& aim)
{
if (aim != Math::Vec2() && mAimVec == Math::Vec2())
{
sendMessage<void>("StartFiring");
}
else if (aim == Math::Vec2() && mAimVec != Math::Vec2())
{
sendMessage<void>("StopFiring");
}
mAimVec = aim;
}
void Character::setPosition(const Math::Vec2& pos)
{
mPosition = pos;
}
void Character::setVelocity(const Math::Vec2& v)
{
mVelocity = v;
}
void Character::draw(sf::RenderTarget& target)
{
sf::CircleShape shape(16);
shape.setOrigin(16, 16);
shape.setPosition(mPosition);
uint8_t a = 255;
uint8_t gb = 255;
if (mSanity < mMaxSanity)
gb *= (mSanity / mMaxSanity);
if (mHealth < 10)
a *= (mHealth / 10.0);
shape.setFillColor(sf::Color(255, gb, gb, a));
shape.setOutlineColor(sf::Color::White);
shape.setOutlineThickness(1);
target.draw(shape);
}
void Character::tick(const Util::Timespan& dt)
{
if (mSanity < mMaxSanity)
{
mSanity += std::min(mMaxSanity, std::chrono::duration<float>(dt).count() * FallacyTimeController::FallacyTime);
}
}
Kunlaboro::Optional<Math::Vec2> Character::getPositionMsg()
{
return mPosition;
}
Kunlaboro::Optional<float> Character::getRadiusMsg()
{
return mRadius;
}
| 29.891667 | 146 | 0.727209 | [
"shape"
] |
c5a9ebcd960f1298d2f969ca4835c6bf288c9e10 | 2,045 | cpp | C++ | Lambdas/Source.cpp | Arpitkm/Cpp_Notes | 790d722ceeff59d4a835459b20bb48c2a489bfaa | [
"MIT"
] | null | null | null | Lambdas/Source.cpp | Arpitkm/Cpp_Notes | 790d722ceeff59d4a835459b20bb48c2a489bfaa | [
"MIT"
] | null | null | null | Lambdas/Source.cpp | Arpitkm/Cpp_Notes | 790d722ceeff59d4a835459b20bb48c2a489bfaa | [
"MIT"
] | null | null | null | //A case on why not to use namespace std;
// whenever we are using the standard library
#include<iostream>
using namespace std; // This line can be used to just take out the 'std::' part from our code
// as mentioned above this is requried when we are accessing methods from the standard library
// to understand about what namespaces are checout 'Namespaces'
namespace first
{
void print(const std::string& text)
{
std::cout << text << std::endl;
}
}
namespace second
{
void print(const char* text)
{
std::string temp = text;
std::reverse(temp.begin(), temp.end());
std::cout << text << std::endl;
}
}
using namespace first;
using namespace second;
int main()
{
std::cout << "HellO" << std::endl;
print("Hello");
print("HellO");
std::cin.get();
}
// The things is that some times code is return such that the obects inside the standard library and the ones
// created by the writer of the code have same implementation, now this seems weird, but in actual code that can be easily found
// on github, you may come across a namespace that has a class 'vector', and without std::, it will be difficult to understand
// to which namespace vector belongs to
// similar thing is true for some of the methods provided by standard library, the names of user defined function and the ones in
// the lib may similar writing style making it difficult to understand what belongs to what
// and obviously this is true for user defined namespaces too
// The above example showing the two functions belonging to different namespaces which will called if we use namespaces?
//IMPORTANT
// The sort of problems discussed can cause silent run time error, a nightmare to resolve
// and NEVER EVER use 'using namespaces' in header files
//Tips
// use them inside smaller scopes, not throughout the project
// don't use them when there are discpencies, and same name functions exist, or when you need some sort of distinction between objects
// belonging to different namespaces; | 35.877193 | 135 | 0.723716 | [
"vector"
] |
c5b1af3ba0b493b58092ef916f13941dd29a59c0 | 9,897 | cpp | C++ | EScript/Objects/Values/String.cpp | antifermion/EScript | eca6765c28e319eb77b4da81125bdbb2510c9add | [
"MIT"
] | 3 | 2017-06-01T15:58:43.000Z | 2019-08-07T05:36:44.000Z | EScript/Objects/Values/String.cpp | antifermion/EScript | eca6765c28e319eb77b4da81125bdbb2510c9add | [
"MIT"
] | 4 | 2015-01-23T18:17:50.000Z | 2019-02-10T11:48:55.000Z | EScript/Objects/Values/String.cpp | antifermion/EScript | eca6765c28e319eb77b4da81125bdbb2510c9add | [
"MIT"
] | 12 | 2015-01-04T16:07:45.000Z | 2020-10-06T15:42:46.000Z | // String.cpp
// This file is part of the EScript programming language (https://github.com/EScript)
//
// Copyright (C) 2011-2013 Claudius Jähn <ClaudiusJ@live.de>
// Copyright (C) 2012-2013 Benjamin Eikel <benjamin@eikel.org>
//
// Licensed under the MIT License. See LICENSE file for details.
// ---------------------------------------------------------------------------------
#include "String.h"
#include "../../Basics.h"
#include "../../StdObjects.h"
#include "../../Utils/StringUtils.h"
#include <iostream>
#include <sstream>
#include <stack>
namespace EScript{
//! static, internal
StringData String::objToStringData(Object * obj){
String * strObj = dynamic_cast<String*>(obj);
return strObj==nullptr ? StringData(obj->toString()) : strObj->sData;
}
/*!
* Try to cast the given object to the specified type.
* If the object is not of the appropriate type, a runtime error is thrown.
*/
template<> String * assertType<String>(Runtime & runtime, const ObjPtr & obj) {
if(obj.isNull()||obj->_getInternalTypeId()!=_TypeIds::TYPE_STRING)
_Internals::assertType_throwError(runtime, obj, String::getClassName());
return static_cast<String*>(obj.get());
}
//---
//! (static)
Type * String::getTypeObject(){
static Type * typeObject = new Type(Object::getTypeObject()); // ---|> Object
return typeObject;
}
//! initMembers
void String::init(EScript::Namespace & globals) {
Type * typeObject = getTypeObject();
typeObject->setFlag(Type::FLAG_CALL_BY_VALUE,true);
initPrintableName(typeObject,getClassName());
declareConstant(&globals,getClassName(),typeObject);
//! [ESMF] String new String((String)Obj)
ES_CTOR(typeObject,0,1,String::create(parameter[0].toString("")))
//! [ESMF] String String[(Number)position ]
ES_MFUNCTION(typeObject,const String,"_get",1,1, {
const std::string s = thisObj->sData.getSubStr( parameter[0].to<uint32_t>(rt), 1 );
if(s.empty())
return nullptr;
return s;
})
//! [ESF] String String._createFromByteArray( [byte*] )
ES_FUNCTION(typeObject,"_createFromByteArray",1,1,{
auto& arr = *parameter[0].to<Array*>(rt);
std::string str;
str.resize(arr.size());
size_t i = 0;
for(const auto& obj : arr)
str.at(i++) = static_cast<int8_t>(obj?obj->toUInt():0);
return str;
})
// ---
//! [ESMF] Bool String.beginsWith( (String)search[,(Number)startIndex] )
ES_MFUN(typeObject,const String,"beginsWith",1,2, thisObj->sData.beginsWith(parameter[0].toString(), parameter[1].to<uint32_t>(rt,0)))
//! [ESMF] Bool String.contains (String)search [,(Number)startIndex] )
ES_MFUN(typeObject,const String,"contains",1,2,
thisObj->getString().find(
parameter[0].toString(),
thisObj->sData.codePointToBytePos( parameter[1].toUInt(0) )) != std::string::npos )
//! [ESMF] Number String.dataSize()
ES_MFUN(typeObject,const String,"dataSize",0,0, static_cast<uint32_t>(thisObj->getDataSize()))
//! [ESMF] Bool String.empty()
ES_MFUN(typeObject,const String,"empty",0,0,thisObj->getString().empty())
//! [ESMF] Bool String.endsWith( (String)search )
ES_MFUNCTION(typeObject,const String,"endsWith",1,1, {
const std::string search = parameter[0].toString();
return thisObj->getString().size()>=search.size() && thisObj->getString().compare(thisObj->getString().length()-search.length(),search.length(),search)==0;
})
//! [ESMF] String String.fillUp(length[, string fill=" ")
ES_MFUNCTION(typeObject,const String,"fillUp",1,2,{
size_t length = thisObj->length();
const size_t targetLength = parameter[0].to<uint32_t>(rt);
if(targetLength<=length)
return thisEObj;
const std::string fillStr = parameter[1].toString(" ");
const size_t fillLength = StringData(fillStr).getNumCodepoints();
if(fillLength==0)
return thisEObj;
std::ostringstream sprinter;
sprinter<<thisObj->getString();
while( length<targetLength ){
sprinter<<fillStr;
length += fillLength;
}
return sprinter.str();
})
//! [ESMF] Number|false String.find( (String)search [,(Number)startIndex] )
ES_MFUNCTION(typeObject,const String,"find",1,2, {
const size_t pos = thisObj->sData.find(parameter[0].toString(),parameter[1].toUInt(0));
if(pos==std::string::npos ) {
return false;
} else {
return static_cast<uint32_t>(pos);
}
})
//! [ESMF] Number String.length()
ES_MFUN(typeObject,const String,"length",0,0, static_cast<uint32_t>(thisObj->sData.getNumCodepoints()))
//! [ESMF] String String.ltrim()
ES_MFUN(typeObject,const String,"lTrim",0,0,StringUtils::lTrim(thisObj->getString()))
//! [ESMF] String String.rTrim()
ES_MFUN(typeObject,const String,"rTrim",0,0,StringUtils::rTrim(thisObj->getString()))
//! [ESMF] String String.substr( (Number)begin [,(Number)length] )
ES_MFUNCTION(typeObject,const String,"substr",1,2, {
int start = parameter[0].to<int>(rt);
const int length = thisObj->sData.getNumCodepoints();
if(start>=length) return create("");
if(start<0) start = std::max(0, length+start);
int substrLength = length-start;
if(parameter.count()>1) {
const int i = parameter[1].to<int>(rt);
if(i<substrLength) {
if(i<0) {
substrLength+=i;
} else {
substrLength = i;
}
}
}
return thisObj->sData.getSubStr( static_cast<size_t>(start), static_cast<size_t>(substrLength) );
})
//! [ESMF] String String.trim()
ES_MFUN(typeObject,const String,"trim",0,0,StringUtils::trim(thisObj->getString()))
//! [ESMF] String String.replace((String)search,(String)replace)
ES_MFUN(typeObject,const String,"replace",2,2,
StringUtils::replaceAll(thisObj->getString(),parameter[0].toString(),parameter[1]->toString(),1))
typedef std::pair<std::string,std::string> keyValuePair_t;
//! [ESMF] String.replaceAll( (Map | ((String)search,(String)replace)) [,(Number)max])
ES_MFUNCTION(typeObject,const String,"replaceAll",1,3,{
const std::string & subject(thisObj->getString());
//Map * m
if( Map * m = parameter[0].castTo<Map>()) {
assertParamCount(rt,parameter.count(),1,2);
std::vector<keyValuePair_t> rules;
for(const auto & it : *m)
rules.emplace_back(it.first,it.second.value->toString());
return StringUtils::replaceMultiple(subject,rules,parameter[1].toInt(-1));
}else{
assertParamCount(rt,parameter.count(),2,3);
return StringUtils::replaceAll(subject,parameter[0].toString(),parameter[1].toString(),parameter[2].toInt(-1));
}
})
//! [ESMF] Number|false String.rFind( (String)search [,(Number)startIndex] )
ES_MFUNCTION(typeObject,const String,"rFind",1,2, {
const size_t pos = parameter.count() == 1 ?
thisObj->sData.rFind(parameter[0].toString()) :
thisObj->sData.rFind(parameter[0].toString(),parameter[1].toUInt());
if(pos==std::string::npos ) {
return false;
} else {
return static_cast<uint32_t>(pos);
}
})
//! [ESMF] Array String.split((String)search[,(Number)max])
ES_MFUNCTION(typeObject,const String,"split",1,2, {
return Array::create( StringUtils::split( thisObj->getString(), parameter[0].toString(), parameter[1].to<int>(rt,-1) ) );
})
//! [ESMF] String String.toLower()
ES_MFUNCTION(typeObject,const String,"toLower",0,0,{
std::string str = thisObj->getString();
for(size_t i=0;i<str.length();++i){
const char c = str[i];
if(c>='A' && c<='Z')
str[i] = c-'A'+'a';
}
return str;
})
//! [ESMF] String String.toUpper()
ES_MFUNCTION(typeObject,const String,"toUpper",0,0,{
std::string str = thisObj->getString();
for(size_t i=0;i<str.length();++i){
const char c = str[i];
if(c>='a' && c<='z')
str[i] = c-'a'+'A';
}
return str;
})
//- Operators
//! [ESMF] String String+(String)Obj
ES_MFUN(typeObject,const String,"+",1,1,thisObj->getString() + parameter[0].toString())
//! [ESMF] String String*(Number)Obj
ES_MFUNCTION(typeObject,const String,"*",1,1,{
std::string s;
const std::string s2( thisObj->getString() );
for(int i = parameter[0].to<int>(rt);i>0;--i)
s+=s2;
return s;
})
//! [ESMF] thisObj String+=(String)Obj
ES_MFUN(typeObject,String,"+=",1,1,(thisObj->appendString(parameter[0].toString()),thisEObj))
//! [ESMF] thisObj String*=(Number)Obj
ES_MFUNCTION(typeObject,String,"*=",1,1,{
std::ostringstream s;
const std::string s2( thisObj->getString() );
for(int i = parameter[0].to<int>(rt);i>0;--i)
s<<s2;
thisObj->setString(s.str());
return thisEObj;
})
//! [ESMF] bool String>(String)Obj
ES_MFUN(typeObject,const String,">",1,1,thisObj->getString() > parameter[0].toString())
//! [ESMF] bool String>=(String)Obj
ES_MFUN(typeObject,const String,">=",1,1,thisObj->getString() >= parameter[0].toString())
//! [ESMF] bool String<(String)Obj
ES_MFUN(typeObject,const String,"<",1,1,thisObj->getString() < parameter[0].toString())
//! [ESMF] bool String<=(String)Obj
ES_MFUN(typeObject,const String,"<=",1,1,thisObj->getString() <= parameter[0].toString())
}
//---
static std::stack<String *> pool;
String * String::create(const StringData & sData){
#ifdef ES_DEBUG_MEMORY
return new String(sData);
#endif
if(pool.empty()){
return new String (sData);
}else{
String * o = pool.top();
pool.pop();
o->setString(sData);
return o;
}
}
void String::release(String * o){
#ifdef ES_DEBUG_MEMORY
delete o;
return;
#endif
if(o->getType()!=getTypeObject()){
delete o;
std::cout << "(internal) String::release: Invalid StringType\n";
}else{
pool.push(o);
}
}
//---
//! ---|> [Object]
std::string String::toDbgString()const{
return std::string("\"")+sData.str()+"\"";
}
//! ---|> [Object]
double String::toDouble() const {
std::size_t to = 0;
return StringUtils::readNumber(sData.str().c_str(), to, true);
}
//! ---|> [Object]
int String::toInt() const {
std::size_t to = 0;
return static_cast<int>(StringUtils::readNumber(sData.str().c_str(), to, true));
}
//! ---|> [Object]
bool String::rt_isEqual(Runtime &, const ObjPtr & o){
return o.isNull()?false:sData==objToStringData(o.get());
}
}
| 31.122642 | 157 | 0.667273 | [
"object",
"vector"
] |
c5b6290e26b0b77eabe5948f474eb2e8a5475e9c | 6,038 | cpp | C++ | JanuaEngine/tgcviewer-cpp/TgcViewer/TgcGeometry/TgcBoundingBox.cpp | gigc/Janua | cbcc8ad0e9501e1faef5b37a964769970aa3d236 | [
"MIT",
"Unlicense"
] | 98 | 2015-01-13T16:23:23.000Z | 2022-02-14T21:51:07.000Z | JanuaEngine/tgcviewer-cpp/TgcViewer/TgcGeometry/TgcBoundingBox.cpp | gigc/Janua | cbcc8ad0e9501e1faef5b37a964769970aa3d236 | [
"MIT",
"Unlicense"
] | 1 | 2016-06-30T22:07:54.000Z | 2016-06-30T22:07:54.000Z | JanuaEngine/tgcviewer-cpp/TgcViewer/TgcGeometry/TgcBoundingBox.cpp | gigc/Janua | cbcc8ad0e9501e1faef5b37a964769970aa3d236 | [
"MIT",
"Unlicense"
] | 13 | 2015-08-26T11:19:08.000Z | 2021-07-12T03:41:50.000Z | /////////////////////////////////////////////////////////////////////////////////
// TgcViewer-cpp
//
// Author: Matias Leone
//
/////////////////////////////////////////////////////////////////////////////////
#include "TgcViewer/TgcGeometry/TgcBoundingBox.h"
#include "TgcViewer/GuiController.h" //required by forward declaration
using namespace TgcViewer;
TgcBoundingBox* TgcBoundingBox::computeFromBoundingBoxes(const vector<TgcBoundingBox*> &boundingBoxes)
{
vector<Vector3> points;
for (unsigned int i = 0; i < boundingBoxes.size(); i++)
{
points.push_back(boundingBoxes[i]->pMin);
points.push_back(boundingBoxes[i]->pMax);
}
return computeFromPoints(points);
}
TgcBoundingBox* TgcBoundingBox::computeFromPoints(const vector<Vector3> &points)
{
Vector3 min = Vector3(FastMath::MAX_FLOAT, FastMath::MAX_FLOAT, FastMath::MAX_FLOAT);
Vector3 max = Vector3(FastMath::MIN_FLOAT, FastMath::MIN_FLOAT, FastMath::MIN_FLOAT);
for(unsigned int i = 0; i < points.size(); i++)
{
Vector3 p = points[i];
//min
if (p.X < min.X)
{
min.X = p.X;
}
if (p.Y < min.Y)
{
min.Y = p.Y;
}
if (p.Z < min.Z)
{
min.Z = p.Z;
}
//max
if (p.X > max.X)
{
max.X = p.X;
}
if (p.Y > max.Y)
{
max.Y = p.Y;
}
if (p.Z > max.Z)
{
max.Z = p.Z;
}
}
return new TgcBoundingBox(min, max);
}
TgcBoundingBox::TgcBoundingBox()
{
this->renderColor = Color::Yellow;
this->dirtyValues = true;
this->vertexBuffer = NULL;
}
TgcBoundingBox::TgcBoundingBox(Vector3 pMin, Vector3 pMax)
{
this->renderColor = Color::Yellow;
this->dirtyValues = true;
this->vertexBuffer = NULL;
this->setExtremes(pMin, pMax);
}
TgcBoundingBox::TgcBoundingBox(const TgcBoundingBox& other)
{
}
TgcBoundingBox::~TgcBoundingBox()
{
}
void TgcBoundingBox::setExtremes(Vector3 pMin, Vector3 pMax)
{
this->pMin = pMin;
this->pMax = pMax;
this->pMinOriginal = pMin;
this->pMaxOriginal = pMax;
this->dirtyValues = true;
}
void TgcBoundingBox::updateValues()
{
//Create renderer data
if(this->vertexBuffer == NULL)
{
//input layout
TgcInputLayout* inputLayout = GuiController::Instance->renderer->createTgcInputLayoutInstance();
inputLayout->elements.push_back(InputElement::Element(InputElement::Position, InputElement::Float3, 0));
inputLayout->elements.push_back(InputElement::Element(InputElement::Color, InputElement::Float4, 0));
inputLayout->create();
//Vertex buffer
vertexBuffer = GuiController::Instance->renderer->createTgcVertexBufferInstance();
vertexBuffer->create(VERTEX_COUNT, inputLayout, this->vertices, BufferUsage::Dynamic);
//Index data
unsigned int indexData[INDEX_COUNT];
//Bottom face
indexData[0] = 0;
indexData[1] = 1;
indexData[2] = 1;
indexData[3] = 3;
indexData[4] = 3;
indexData[5] = 2;
indexData[6] = 2;
indexData[7] = 0;
//Top face
indexData[8] = 4;
indexData[9] = 6;
indexData[10] = 6;
indexData[11] = 7;
indexData[12] = 7;
indexData[13] = 5;
indexData[14] = 5;
indexData[15] = 4;
//Front face
indexData[16] = 0;
indexData[17] = 4;
indexData[18] = 1;
indexData[19] = 5;
//Back face
indexData[20] = 2;
indexData[21] = 6;
indexData[22] = 3;
indexData[23] = 7;
//Index buffer
indexBuffer = GuiController::Instance->renderer->createTgcIndexBufferInstance();
indexBuffer->create(INDEX_COUNT, indexData);
//Effect
effect = GuiController::Instance->shaders->generalPositionColor;
effect->init(vertexBuffer);
}
//Update vertex values
this->vertices[0] = VertexFormat::PositionColor(pMin, renderColor);
this->vertices[1] = VertexFormat::PositionColor(Vector3(pMax.X, pMin.Y, pMin.Z), renderColor);
this->vertices[2] = VertexFormat::PositionColor(Vector3(pMin.X, pMin.Y, pMax.Z), renderColor);
this->vertices[3] = VertexFormat::PositionColor(Vector3(pMax.X, pMin.Y, pMax.Z), renderColor);
this->vertices[4] = VertexFormat::PositionColor(Vector3(pMin.X, pMax.Y, pMin.Z), renderColor);
this->vertices[5] = VertexFormat::PositionColor(Vector3(pMax.X, pMax.Y, pMin.Z), renderColor);
this->vertices[6] = VertexFormat::PositionColor(Vector3(pMin.X, pMax.Y, pMax.Z), renderColor);
this->vertices[7] = VertexFormat::PositionColor(pMax, renderColor);
this->vertexBuffer->update(this->vertices);
this->dirtyValues = false;
}
void TgcBoundingBox::render()
{
TgcRenderer* renderer = GuiController::Instance->renderer;
//Auto update values
if (dirtyValues)
{
updateValues();
}
GuiController::Instance->shaders->setShaderMatrixIdentity(this->effect);
renderer->setVertexBuffer(this->vertexBuffer);
renderer->setIndexBuffer(this->indexBuffer);
effect->begin();
renderer->drawIndexed(PrimitiveTopology::LineList, INDEX_COUNT);
effect->end();
}
void TgcBoundingBox::dispose()
{
if(this->vertexBuffer != NULL)
{
this->vertexBuffer->dispose();
this->indexBuffer->dispose();
}
}
void TgcBoundingBox::scaleTranslate(Vector3 position, Vector3 scale)
{
pMin.X = pMinOriginal.X * scale.X + position.X;
pMin.Y = pMinOriginal.Y * scale.Y + position.Y;
pMin.Z = pMinOriginal.Z * scale.Z + position.Z;
pMax.X = pMaxOriginal.X * scale.X + position.X;
pMax.Y = pMaxOriginal.Y * scale.Y + position.Y;
pMax.Z = pMaxOriginal.Z * scale.Z + position.Z;
dirtyValues = true;
}
float TgcBoundingBox::computeBoxRadiusSquare()
{
return Vector3((pMax - pMin) * 0.5f).lengthSq();
}
float TgcBoundingBox::computeBoxRadius()
{
return FastMath::sqrt(this->computeBoxRadiusSquare());
}
Vector3 TgcBoundingBox::computeBoxCenter()
{
return pMin + computeExtents();
}
Vector3 TgcBoundingBox::computeSize()
{
return pMax - pMin;
}
Vector3 TgcBoundingBox::computeExtents()
{
return computeSize() * 0.5f;
}
void TgcBoundingBox::move(Vector3 movement)
{
pMin += movement;
pMax += movement;
dirtyValues = true;
} | 24.346774 | 106 | 0.652203 | [
"render",
"vector"
] |
c5baa027b5364618bb567718ff7766c508cbb87f | 1,286 | cpp | C++ | 23/02_unordered_map.cpp | philipplenk/adventofcode20 | 5a9d8b42c4c43bfa32d4f43c4c6ba6de357e7a81 | [
"BSD-2-Clause"
] | null | null | null | 23/02_unordered_map.cpp | philipplenk/adventofcode20 | 5a9d8b42c4c43bfa32d4f43c4c6ba6de357e7a81 | [
"BSD-2-Clause"
] | null | null | null | 23/02_unordered_map.cpp | philipplenk/adventofcode20 | 5a9d8b42c4c43bfa32d4f43c4c6ba6de357e7a81 | [
"BSD-2-Clause"
] | null | null | null | #include <algorithm>
#include <iostream>
#include <numeric>
#include <unordered_map>
#include <vector>
#include <cstddef>
int main(int argc, char* argv[])
{
std::vector<int> cups;
char c;
while(std::cin>>c)
cups.push_back(c-'0');
cups.resize(1000000);
std::iota(std::begin(cups)+9, std::end(cups),10);
std::unordered_map<long,long> next, prev;
for(std::size_t i=0;i<cups.size();++i)
{
next[cups[i]]=cups[(i+1)%cups.size()];
prev[cups[i]]=cups[i==0?(cups.size()-1):(i-1)];
}
const auto move = [&](int original_value)
{
auto target_value = original_value-1;
if(target_value==0) target_value = cups.size();
std::array<long,3> taken;
taken[0]=next[original_value];
taken[1]=next[taken[0]];
taken[2]=next[taken[1]];
prev[next[taken[2]]] = original_value;
next[original_value] = next[taken[2]];
while(std::find(std::begin(taken),std::end(taken),target_value)!=std::end(taken))
target_value = target_value==1?cups.size():(target_value-1);
next[taken[2]] = next[target_value];
next[target_value] = taken[0];
prev[taken[0]] = target_value;
return next[original_value];
};
int current = cups[0];
for(std::size_t i=0;i<10000000;++i)
current = move(current);
std::cout<<next[1]*next[next[1]]<<'\n';
return 0;
}
| 21.433333 | 83 | 0.643079 | [
"vector"
] |
c5befc519bc4f321748daa0e1139d218f867f3b9 | 6,102 | cpp | C++ | DataStructure/assign1/assignment1.cpp | wbjeon2k/uni06_archive | 5c37716d5c011f2aa23675778b0947c064882856 | [
"MIT"
] | null | null | null | DataStructure/assign1/assignment1.cpp | wbjeon2k/uni06_archive | 5c37716d5c011f2aa23675778b0947c064882856 | [
"MIT"
] | null | null | null | DataStructure/assign1/assignment1.cpp | wbjeon2k/uni06_archive | 5c37716d5c011f2aa23675778b0947c064882856 | [
"MIT"
] | null | null | null | //
// assignment1.cpp (Version 1.0)
//
// Please write your name, your student ID, and your email address here.
// Moreover, please describe the implementation of your functions here.
// You will have to submit this file.
/*
20161248 Jeon Woongbae
Email : wbjeon2k@gmail.com || woongbae@unist.ac.kr
description is written in some kind of pseudocode.
getpriority(Token){
return priority(icp in textbook) of operators
( : return 0
*,/ : return 1
+,- : return 2
otherwise : throw runtime error
}
getinstackpriority(Token){
return in-stack priority(isp in textbook) of operators
*./ : return 1
+,- : return 2
( : return 3
otherwise : runtime error
}
postfix(expression){
for all tokens in the expression: starting from front{
if token is a number : add it to result
if token is a closed paranthesis : pop stack until it reaches to open paranthesis
otherwise : push it to stack
}
}
eval(expression){
push tokens into the stack.
when it reaches to an operator, pop two tokens, and evaluate with the proper operator
if it fails to pop two tokens, then throw runtime error, because of mismatch in operator & operand.
when the result overflows, then throw runtime error
push the result back in the stack
}
*/
//
// include header filers here
#include <iostream>
#include <vector>
#include <cstdlib>
#include <climits>
#include "LinkedStack.h"
#include "Token.h"
#include "tokenizer.h"
using namespace std;
int getPriority(Token token) {
//priority:
//0 : (
//1 : *,/
//2 : +,-
//etc : runtime error
Token::TokenType Toktype = token.getTokenType();
Token::Operator Opertype = token.getOperator();
int prior = 0;
if (Toktype == Token::CONSTANT_TOKEN) {
throw runtime_error("token is not an operator");
}
else if (Opertype == Token::CLOSE_PARENTHESIS_OPERATOR) {
throw runtime_error("token is a CLOSE_PARANTHESIS_OPERATOR");
}
else if (Opertype == Token::OPEN_PARENTHESIS_OPERATOR) {
prior = 0;
return prior;
}
else if (Opertype == Token::MULTIPLICATION_OPERATOR || Opertype == Token::DIVISION_OPERATOR) {
prior = 1;
return prior;
}
else if (Opertype == Token::ADDITION_OPERATOR || Opertype == Token::SUBTRACTION_OPERATOR) {
prior = 2;
return prior;
}
}
int getInStackPriority(Token token) {
//priority:
//0 : *,/
//1 : +,-
//2 : (
//etc : runtime error
int prior=0;
Token::Operator Opertype = token.getOperator();
Token::TokenType Toktype = token.getTokenType();
if (Toktype == Token::CONSTANT_TOKEN) {
throw runtime_error("token is a CONSTANT_OPERATOR");
}
else if (Opertype == Token::CLOSE_PARENTHESIS_OPERATOR) {
throw runtime_error("token is a CLOSE_PARANTHESIS_OPERATOR");
}
else if (Opertype == Token::OPEN_PARENTHESIS_OPERATOR) {
prior = 3;
return prior;
}
else if (Opertype == Token::MULTIPLICATION_OPERATOR || Opertype == Token::DIVISION_OPERATOR) {
prior = 1;
return prior;
}
else if (Opertype == Token::ADDITION_OPERATOR || Opertype == Token::SUBTRACTION_OPERATOR) {
prior = 2;
return prior;
}
}
vector<Token> postfix(const vector<Token>& expression) {
LinkedStack<Token> stack;
vector<Token> postprocess ;
for (vector<Token>::const_iterator iter = expression.begin(); iter != expression.end(); iter++) {
if ((*iter).isConstant()) {
//cout << (*iter).getConstant();
(postprocess).push_back((*iter));
}
else if ((*iter).getOperator() == Token::CLOSE_PARENTHESIS_OPERATOR) {
while (stack.empty() == false && stack.top().getOperator() != Token::OPEN_PARENTHESIS_OPERATOR) {
(postprocess).push_back(stack.top());
stack.pop();
}
//for (; stack.top().getOperator() != Token::OPEN_PARENTHESIS_OPERATOR; stack.pop()) {
// (postprocess).push_back(stack.top());
//}
stack.pop();
}
else {
while (stack.empty() == false && getInStackPriority(stack.top()) <= getPriority(*iter) ) {
//cout << "instack priority: " << getInStackPriority(stack.top()) << endl;
//cout << "ic priority: " << getPriority(*iter) << endl;
(postprocess).push_back(stack.top());
stack.pop();
}
//for (; getInStackPriority(stack.top()) <= getPriority(*iter); stack.pop()) {
// (postprocess).push_back(stack.top());
//}
stack.push(*iter);
}
}
while (stack.empty() == false) {
(postprocess).push_back(stack.top());
stack.pop();
}
//for (; stack.empty() != true; (postprocess).push_back(stack.top()), stack.pop());
return postprocess;
}
int eval(const vector<Token>& expression) {
LinkedStack<Token> stack;
int result;
for (vector<Token>::const_iterator iter = expression.begin(); iter != expression.end(); iter++) {
if ((*iter).isConstant()) {
stack.push(*iter);
}
else {
Token::Operator oper = (*iter).getOperator();
int a = 0, b = 0;
long long c = 0;
if (stack.empty() == true) {
throw runtime_error("Operator and operand does not match");
}
b = stack.top().getConstant();
(stack.empty() != true ? stack.pop() : throw runtime_error("Operator and operand does not match"));
a = stack.top().getConstant();
(stack.empty() != true ? stack.pop() : throw runtime_error("Operator and operand does not match"));
if (oper == Token::ADDITION_OPERATOR) {
c = (long long)a + (long long)b;
if (c > INT_MAX || c < INT_MIN) {
throw runtime_error("Overflow at addition");
}
else {
stack.push(Token( (int)c ));
}
}
else if (oper == Token::SUBTRACTION_OPERATOR) {
c = (long long)a - (long long)b;
if (c > INT_MAX || c < INT_MIN) {
throw runtime_error("Overflow at subtraction");
}
else {
stack.push(Token((int)c));
}
}
else if (oper == Token::MULTIPLICATION_OPERATOR) {
c = (long long)a*(long long)b;
if (c > INT_MAX || c < INT_MIN) {
throw runtime_error("Overflow at multiplication");
}
else {
stack.push(Token((int)c));
}
}
else if (oper == Token::DIVISION_OPERATOR) {
if (b == 0) {
throw runtime_error("Cannot divide by 0");
}
else {
c = a / b;
stack.push( Token((int)c) );
}
}
}
}
//2147483647
return (stack.top().getConstant());
}
| 25.008197 | 102 | 0.651917 | [
"vector"
] |
c5c289ef2af5094b10693da6f7e753390362f367 | 2,098 | cpp | C++ | src/gps/Gps.cpp | EliasVerstappe/smart_campus_LoRaWAN | 2c4d895724bc53b1dfa37231d447bc81cde1ee00 | [
"MIT"
] | null | null | null | src/gps/Gps.cpp | EliasVerstappe/smart_campus_LoRaWAN | 2c4d895724bc53b1dfa37231d447bc81cde1ee00 | [
"MIT"
] | null | null | null | src/gps/Gps.cpp | EliasVerstappe/smart_campus_LoRaWAN | 2c4d895724bc53b1dfa37231d447bc81cde1ee00 | [
"MIT"
] | 1 | 2018-11-23T09:17:12.000Z | 2018-11-23T09:17:12.000Z | #include "Gps.h"
#include "mbed.h"
//required for fmod()
#include <math.h>
Gps::Gps(Serial* serial) : Adafruit_GPS(serial)
{
//gps = new Adafruit_GPS(serial); //object of Adafruit's GPS class
begin(9600); //sets baud rate for GPS communication; note this may be changed via Adafruit_GPS::sendCommand(char *)
//a list of GPS commands is available at http://www.adafruit.com/datasheets/PMTK_A08.pdf
sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA); //these commands are defined in MBed_Adafruit_GPS.h; a link is provided there for command creation
sendCommand(PMTK_SET_NMEA_UPDATE_1HZ);
sendCommand(PGCMD_ANTENNA);
}
Gps::~Gps()
{
}
void Gps::debug(Serial* serial)
{
serial->printf("Time: %d:%d:%d.%u\n", hour, minute, seconds, milliseconds);
serial->printf("Date: %d/%d/20%d\n", day, month, year);
serial->printf("Fix: %d\n", (int) fix);
serial->printf("Quality: %d\n", (int) fixquality);
if (fix) {
serial->printf("Location: %5.6f%c, %5.6f%c\n", latitude_in_degrees(), lat, longitude_in_degrees(), lon);
serial->printf("HDOP: %5.2f\n", HDOP);
serial->printf("Speed: %5.2f knots\n", speed);
serial->printf("Angle: %5.2f\n", angle);
serial->printf("Altitude: %5.2f\n", altitude);
serial->printf("Satellites: %d\n", satellites);
}
}
void Gps::run()
{
read(); //queries the GPS
//check if we recieved a new message from GPS, if so, attempt to parse it,
if ( newNMEAreceived() ) {
parse(lastNMEA());
}
}
// converts lat/long from Adafruit
// degree-minute format to decimal-degrees
double Gps::convertDegMinToDecDeg (float degMin) {
double min = 0.0;
double decDeg = 0.0;
//get the minutes, fmod() requires double
min = fmod((double)degMin, 100.0);
//rebuild coordinates in decimal degrees
degMin = (int) ( degMin / 100 );
decDeg = degMin + ( min / 60 );
return decDeg;
}
double Gps::latitude_in_degrees()
{
return convertDegMinToDecDeg(latitude);
}
double Gps::longitude_in_degrees()
{
return convertDegMinToDecDeg(longitude);
}
| 28.351351 | 144 | 0.653956 | [
"object"
] |
c5c8e183f8748c614d9dcc94339e1e5e03b7b368 | 39,085 | cpp | C++ | net/localplayer.cpp | NixonSiagian/samp-client | 7a10dfeddc806e199688c645b12f3bf37eaa4f61 | [
"FSFAP"
] | null | null | null | net/localplayer.cpp | NixonSiagian/samp-client | 7a10dfeddc806e199688c645b12f3bf37eaa4f61 | [
"FSFAP"
] | null | null | null | net/localplayer.cpp | NixonSiagian/samp-client | 7a10dfeddc806e199688c645b12f3bf37eaa4f61 | [
"FSFAP"
] | null | null | null | #include "../main.h"
#include "../game/game.h"
#include "netgame.h"
#include "../spawnscreen.h"
#include "../extrakeyboard.h"
#include "../util/armhook.h"
#include "../chatwindow.h"
// voice
#include "../voice/MicroIcon.h"
#include "../voice/SpeakerList.h"
extern CGame *pGame;
extern CNetGame *pNetGame;
extern CSpawnScreen *pSpawnScreen;
extern CExtraKeyBoard *pExtraKeyBoard;
extern CChatWindow *pChatWindow;
bool bFirstSpawn = true;
extern int iNetModeNormalOnFootSendRate;
extern int iNetModeNormalInCarSendRate;
extern int iNetModeFiringSendRate;
extern int iNetModeSendMultiplier;
extern bool bUsedPlayerSlots[];
CLocalPlayer::CLocalPlayer()
{
ResetAllSyncAttributes();
m_selectionClassData.m_iSelectedClass = 0;
m_selectionClassData.m_bHasSpawnInfo = false;
m_selectionClassData.m_bWaitingForSpawnRequestReply = false;
m_selectionClassData.m_bWantsAnotherClass = false;
m_tickData.m_dwLastSendTick = GetTickCount();
m_tickData.m_dwLastSendAimTick = GetTickCount();
m_tickData.m_dwLastSendSpecTick = GetTickCount();
m_tickData.m_dwLastUpdateOnFootData = GetTickCount();
m_tickData.m_dwLastUpdateInCarData = GetTickCount();
m_tickData.m_dwLastUpdatePassengerData = GetTickCount();
m_tickData.m_dwPassengerEnterExit = GetTickCount();
m_tickData.m_dwLastStatsUpdateTick = GetTickCount();
m_spectateData.m_bIsSpectating = false;
m_spectateData.m_byteSpectateType = SPECTATING_TYPE_NONE;
m_spectateData.m_dwSpectateId = 0xFFFFFFFF;
m_statsData.dwLastMoney = 0;
m_statsData.byteLastDrunkLevel = 0;
for(int i; i < 13; i++)
{
m_weaponData.m_byteLastWeapon[i] = 0;
m_weaponData.m_dwLastAmmo[i] = 0;
}
m_damageVehicle.m_VehicleUpdating = INVALID_VEHICLE_ID;
}
CLocalPlayer::~CLocalPlayer()
{
// ~
}
void CLocalPlayer::ResetAllSyncAttributes()
{
memset(&m_SpawnInfo, 0, sizeof(PLAYER_SPAWN_INFO));
memset(&m_OnFootData, 0, sizeof(ONFOOT_SYNC_DATA));
memset(&m_InCarData, 0, sizeof(INCAR_SYNC_DATA));
memset(&m_TrailerData, 0, sizeof(TRAILER_SYNC_DATA));
memset(&m_PassengerData, 0, sizeof(PASSENGER_SYNC_DATA));
memset(&m_aimSync, 0, sizeof(AIM_SYNC_DATA));
memset(&m_BulletData, 0, sizeof(BULLET_SYNC_DATA));
m_pPlayerPed = pGame->FindPlayerPed();
m_bIsActive = false;
m_bIsWasted = false;
m_bInRCMode = false;
m_byteCurInterior = 0;
m_CurrentVehicle = INVALID_VEHICLE_ID;
m_LastVehicle = INVALID_VEHICLE_ID;
}
bool CLocalPlayer::Process()
{
uint32_t dwThisTick = GetTickCount();
if(m_bIsActive && m_pPlayerPed)
{
// handle dead
if(!m_bIsWasted && m_pPlayerPed->GetActionTrigger() == ACTION_DEATH || m_pPlayerPed->IsDead())
{
ToggleSpectating(false);
if(m_pPlayerPed->IsDancing() || m_pPlayerPed->HasHandsUp()) {
m_pPlayerPed->StopDancing(); // there's no need to dance when you're dead
}
if(m_pPlayerPed->IsCellphoneEnabled()) {
m_pPlayerPed->ToggleCellphone(0);
}
// reset tasks/anims
m_pPlayerPed->TogglePlayerControllable(true);
if(m_pPlayerPed->IsInVehicle() && !m_pPlayerPed->IsAPassenger())
{
SendInCarFullSyncData();
m_LastVehicle = pNetGame->GetVehiclePool()->FindIDFromGtaPtr(m_pPlayerPed->GetGtaVehicle());
}
SendWastedNotification();
m_bIsActive = false;
m_bIsWasted = true;
if(m_pPlayerPed->IsHaveAttachedObject())
m_pPlayerPed->RemoveAllAttachedObjects();
return true;
}
if(m_pPlayerPed->IsInVehicle() && (m_pPlayerPed->IsDancing() || m_pPlayerPed->HasHandsUp()))
m_pPlayerPed->StopDancing(); // can't dance in vehicle
if(m_pPlayerPed->HasHandsUp() && LocalPlayerKeys.bKeys[KEY_FIRE])
m_pPlayerPed->TogglePlayerControllable(1);
// server checkpoints update
pGame->UpdateCheckpoints();
// check weapons
UpdateWeapons();
// handle interior changing
uint8_t byteInterior = pGame->GetActiveInterior();
if(byteInterior != m_byteCurInterior)
UpdateRemoteInterior(byteInterior);
// The regime for adjusting sendrates is based on the number
// of players that will be effected by this update. The more players
// there are within a small radius, the more we must scale back
// the number of sends.
int iNumberOfPlayersInLocalRange = DetermineNumberOfPlayersInLocalRange();
if(!iNumberOfPlayersInLocalRange) iNumberOfPlayersInLocalRange = 20;
// SPECTATING
if(m_spectateData.m_bIsSpectating)
{
ProcessSpectating();
}
// DRIVER
else if(m_pPlayerPed->IsInVehicle() && !m_pPlayerPed->IsAPassenger())
{
CVehiclePool *pVehiclePool = pNetGame->GetVehiclePool();
if(pVehiclePool)
{
m_CurrentVehicle = pVehiclePool->FindIDFromGtaPtr(m_pPlayerPed->GetGtaVehicle());
CVehicle *pVehicle = pVehiclePool->GetAt(m_CurrentVehicle);
if(pVehicle)
{
if((dwThisTick - m_tickData.m_dwLastSendTick) > (unsigned int)GetOptimumInCarSendRate(iNumberOfPlayersInLocalRange))
{
m_tickData.m_dwLastSendTick = GetTickCount();
SendInCarFullSyncData();
}
ProcessVehicleDamageUpdates(m_CurrentVehicle);
}
}
}
// ONFOOT
else if(m_pPlayerPed->GetActionTrigger() == ACTION_NORMAL || m_pPlayerPed->GetActionTrigger() == ACTION_SCOPE)
{
UpdateSurfing();
if(m_CurrentVehicle != INVALID_VEHICLE_ID)
{
m_LastVehicle = m_CurrentVehicle;
m_CurrentVehicle = INVALID_VEHICLE_ID;
}
if((dwThisTick - m_tickData.m_dwLastSendTick) > (unsigned int)GetOptimumOnFootSendRate() || LocalPlayerKeys.bKeys[ePadKeys::KEY_YES] || LocalPlayerKeys.bKeys[ePadKeys::KEY_NO] || LocalPlayerKeys.bKeys[ePadKeys::KEY_CTRL_BACK])
{
m_tickData.m_dwLastSendTick = GetTickCount();
SendOnFootFullSyncData();
}
// TIMING FOR ONFOOT AIM SENDS
uint16_t lrAnalog, udAnalog;
uint8_t additionalKey = 0;
uint16_t wKeys = m_pPlayerPed->GetKeys(&lrAnalog, &udAnalog, &additionalKey);
// Not targeting or firing. We need a very slow rate to sync the head.
if (!IS_TARGETING(wKeys) && !IS_FIRING(wKeys))
{
if ((dwThisTick - m_tickData.m_dwLastSendAimTick) > NETMODE_HEADSYNC_SENDRATE)
{
m_tickData.m_dwLastSendAimTick = dwThisTick;
SendAimSyncData();
}
}
// Targeting only. Just synced for show really, so use a slower rate
else if (IS_TARGETING(wKeys) && !IS_FIRING(wKeys))
{
if ((dwThisTick - m_tickData.m_dwLastSendAimTick) > (uint32_t)NETMODE_AIM_SENDRATE + (iNumberOfPlayersInLocalRange))
{
m_tickData.m_dwLastSendAimTick = dwThisTick;
SendAimSyncData();
}
}
// Targeting and Firing. Needs a very accurate send rate.
else if (IS_TARGETING(wKeys) && IS_FIRING(wKeys))
{
if ((dwThisTick - m_tickData.m_dwLastSendAimTick) > (uint32_t)NETMODE_FIRING_SENDRATE + (iNumberOfPlayersInLocalRange))
{
m_tickData.m_dwLastSendAimTick = dwThisTick;
SendAimSyncData();
}
}
// Firing without targeting. Needs a normal onfoot sendrate.
else if (!IS_TARGETING(wKeys) && IS_FIRING(wKeys))
{
if ((dwThisTick - m_tickData.m_dwLastSendAimTick) > (uint32_t)GetOptimumOnFootSendRate())
{
m_tickData.m_dwLastSendAimTick = dwThisTick;
SendAimSyncData();
}
}
}
// PASSENGER
else if(m_pPlayerPed->IsInVehicle() && m_pPlayerPed->IsAPassenger())
{
if((dwThisTick - m_tickData.m_dwLastSendTick) > (unsigned int)GetOptimumInCarSendRate(iNumberOfPlayersInLocalRange))
{
m_tickData.m_dwLastSendTick = GetTickCount();
SendPassengerFullSyncData();
}
}
}
// handle !IsActive spectating
if(m_spectateData.m_bIsSpectating && !m_bIsActive)
{
ProcessSpectating();
return true;
}
// handle needs to respawn
if(m_bIsWasted && (m_pPlayerPed->GetActionTrigger() != ACTION_WASTED) &&
(m_pPlayerPed->GetActionTrigger() != ACTION_DEATH) )
{
if(m_selectionClassData.m_bClearedToSpawn && !m_selectionClassData.m_bWantsAnotherClass &&
pNetGame->GetGameState() == GAMESTATE_CONNECTED)
{
if(m_pPlayerPed->GetHealth() > 0.0f)
Spawn();
}
else
{
m_bIsWasted = false;
HandleClassSelection();
m_selectionClassData.m_bWantsAnotherClass = false;
}
return true;
}
return true;
}
void CLocalPlayer::SendWastedNotification()
{
RakNet::BitStream bsPlayerDeath;
PLAYERID WhoWasResponsible = INVALID_PLAYER_ID;
uint8_t byteDeathReason = m_pPlayerPed->FindDeathReasonAndResponsiblePlayer(&WhoWasResponsible);
bsPlayerDeath.Write(byteDeathReason);
bsPlayerDeath.Write(WhoWasResponsible);
pNetGame->GetRakClient()->RPC(&RPC_Death, &bsPlayerDeath, HIGH_PRIORITY, RELIABLE_ORDERED, 0, false, UNASSIGNED_NETWORK_ID, nullptr);
}
void CLocalPlayer::HandleClassSelection()
{
m_selectionClassData.m_bClearedToSpawn = false;
if(m_pPlayerPed)
{
m_pPlayerPed->SetInitialState();
m_pPlayerPed->SetHealth(100.0f);
m_pPlayerPed->TogglePlayerControllable(0);
}
RequestClass(m_selectionClassData.m_iSelectedClass);
pSpawnScreen->Show(true);
return;
}
void CLocalPlayer::HandleClassSelectionOutcome()
{
if(m_pPlayerPed)
{
m_pPlayerPed->ClearAllWeapons();
m_pPlayerPed->SetModelIndex(m_SpawnInfo.iSkin);
}
m_selectionClassData.m_bClearedToSpawn = true;
}
void CLocalPlayer::RequestClass(int iClass)
{
RakNet::BitStream bsSpawnRequest;
bsSpawnRequest.Write(iClass);
pNetGame->GetRakClient()->RPC(&RPC_RequestClass, &bsSpawnRequest, HIGH_PRIORITY, RELIABLE, 0, false, UNASSIGNED_NETWORK_ID, 0);
}
void CLocalPlayer::SendNextClass()
{
MATRIX4X4 matPlayer;
m_pPlayerPed->GetMatrix(&matPlayer);
if(m_selectionClassData.m_iSelectedClass == (pNetGame->m_iSpawnsAvailable - 1)) m_selectionClassData.m_iSelectedClass = 0;
else m_selectionClassData.m_iSelectedClass++;
pGame->PlaySound(1052, matPlayer.pos.X, matPlayer.pos.Y, matPlayer.pos.Z);
RequestClass(m_selectionClassData.m_iSelectedClass);
}
void CLocalPlayer::SendPrevClass()
{
MATRIX4X4 matPlayer;
m_pPlayerPed->GetMatrix(&matPlayer);
if(m_selectionClassData.m_iSelectedClass == 0) m_selectionClassData.m_iSelectedClass = (pNetGame->m_iSpawnsAvailable - 1);
else m_selectionClassData.m_iSelectedClass--;
pGame->PlaySound(1053, matPlayer.pos.X, matPlayer.pos.Y, matPlayer.pos.Z);
RequestClass(m_selectionClassData.m_iSelectedClass);
}
uint32_t CLocalPlayer::GetPlayerColor()
{
return TranslateColorCodeToRGBA(pNetGame->GetPlayerPool()->GetLocalPlayerID());
}
uint32_t CLocalPlayer::GetPlayerColorAsARGB()
{
return (TranslateColorCodeToRGBA(pNetGame->GetPlayerPool()->GetLocalPlayerID()) >> 8) | 0xFF000000;
}
void CLocalPlayer::SetPlayerColor(uint32_t dwColor)
{
SetRadarColor(pNetGame->GetPlayerPool()->GetLocalPlayerID(), dwColor);
}
void CLocalPlayer::SetSpawnInfo(PLAYER_SPAWN_INFO *pSpawn)
{
memcpy(&m_SpawnInfo, pSpawn, sizeof(PLAYER_SPAWN_INFO));
m_selectionClassData.m_bHasSpawnInfo = true;
}
void CLocalPlayer::RequestSpawn()
{
RakNet::BitStream bsSpawnRequest;
pNetGame->GetRakClient()->RPC(&RPC_RequestSpawn, &bsSpawnRequest, HIGH_PRIORITY, RELIABLE, 0, false, UNASSIGNED_NETWORK_ID, 0);
}
void CLocalPlayer::SendSpawn()
{
RequestSpawn();
m_selectionClassData.m_bWaitingForSpawnRequestReply = true;
}
bool CLocalPlayer::Spawn()
{
if(!m_selectionClassData.m_bHasSpawnInfo) return false;
// voice
SpeakerList::Show();
MicroIcon::Show();
pSpawnScreen->Show(false);
pExtraKeyBoard->Show(true);
CCamera *pGameCamera;
pGameCamera = pGame->GetCamera();
pGameCamera->Restore();
pGameCamera->SetBehindPlayer();
pGame->DisplayWidgets(true);
pGame->DisplayHUD(true);
m_pPlayerPed->TogglePlayerControllable(true);
if(!bFirstSpawn)
m_pPlayerPed->SetInitialState();
else bFirstSpawn = false;
pGame->RefreshStreamingAt(m_SpawnInfo.vecPos.X,m_SpawnInfo.vecPos.Y);
m_pPlayerPed->RestartIfWastedAt(&m_SpawnInfo.vecPos, m_SpawnInfo.fRotation);
m_pPlayerPed->SetModelIndex(m_SpawnInfo.iSkin);
m_pPlayerPed->ClearAllWeapons();
m_pPlayerPed->ResetDamageEntity();
pGame->DisableTrainTraffic();
// CCamera::Fade
WriteMemory(g_libGTASA+0x36EA2C, (uintptr_t)"\x70\x47", 2); // bx lr
m_pPlayerPed->TeleportTo(m_SpawnInfo.vecPos.X, m_SpawnInfo.vecPos.Y, (m_SpawnInfo.vecPos.Z + 0.5f));
m_pPlayerPed->ForceTargetRotation(m_SpawnInfo.fRotation);
m_bIsWasted = false;
m_bIsActive = true;
m_selectionClassData.m_bWaitingForSpawnRequestReply = false;
RakNet::BitStream bsSendSpawn;
pNetGame->GetRakClient()->RPC(&RPC_Spawn, &bsSendSpawn, HIGH_PRIORITY, RELIABLE_SEQUENCED, 0, false, UNASSIGNED_NETWORK_ID, NULL);
return true;
}
void CLocalPlayer::UpdateSurfing()
{
VEHICLE_TYPE *Contact = m_pPlayerPed->GetGtaContactVehicle();
if(!Contact) {
m_bSurfingMode = false;
m_SurfingID = INVALID_VEHICLE_ID;
return;
}
VEHICLEID vehID = pNetGame->GetVehiclePool()->FindIDFromGtaPtr(Contact);
if(vehID && vehID != INVALID_VEHICLE_ID) {
CVehicle *pVehicle = pNetGame->GetVehiclePool()->GetAt(vehID);
if( pVehicle && pVehicle->IsOccupied() &&
pVehicle->GetDistanceFromLocalPlayerPed() < 5.0f ) {
VECTOR vecSpeed;
VECTOR vecTurn;
MATRIX4X4 matPlayer;
MATRIX4X4 matVehicle;
VECTOR vecVehiclePlane;
WORD lr, ud;
pVehicle->GetMatrix(&matVehicle);
m_pPlayerPed->GetMatrix(&matPlayer);
m_bSurfingMode = true;
m_SurfingID = vehID;
m_vecLockedSurfingOffsets.X = matPlayer.pos.X - matVehicle.pos.X;
m_vecLockedSurfingOffsets.Y = matPlayer.pos.Y - matVehicle.pos.Y;
m_vecLockedSurfingOffsets.Z = matPlayer.pos.Z - matVehicle.pos.Z;
vecSpeed = Contact->entity.vecMoveSpeed;
vecTurn = Contact->entity.vecTurnSpeed;
uint16_t lrAnalog, udAnalog;
uint8_t additionalKey = 0;
m_pPlayerPed->GetKeys(&lrAnalog, &udAnalog, &additionalKey);
if(&lrAnalog, &udAnalog, &additionalKey) {
// if they're not trying to translate, keep their
// move and turn speeds identical to the surfing vehicle
m_pPlayerPed->SetMoveSpeedVector(vecSpeed);
m_pPlayerPed->SetTurnSpeedVector(vecTurn);
}
return;
}
}
m_bSurfingMode = false;
m_SurfingID = INVALID_VEHICLE_ID;
}
bool CLocalPlayer::HandlePassengerEntry()
{
if(GetTickCount() - m_tickData.m_dwPassengerEnterExit < 1000)
return true;
CVehiclePool *pVehiclePool = pNetGame->GetVehiclePool();
// CTouchInterface::IsHoldDown
int isHoldDown = (( int (*)(int, int, int))(g_libGTASA+0x270818+1))(0, 1, 1);
if(isHoldDown)
{
VEHICLEID ClosetVehicleID = pVehiclePool->FindNearestToLocalPlayerPed();
if(ClosetVehicleID < MAX_VEHICLES && pVehiclePool->GetSlotState(ClosetVehicleID))
{
CVehicle* pVehicle = pVehiclePool->GetAt(ClosetVehicleID);
if(pVehicle->GetDistanceFromLocalPlayerPed() < 4.0f)
{
m_pPlayerPed->EnterVehicle(pVehicle->m_dwGTAId, true);
SendEnterVehicleNotification(ClosetVehicleID, true);
m_tickData.m_dwPassengerEnterExit = GetTickCount();
return true;
}
}
}
return false;
}
bool CLocalPlayer::HandlePassengerEntryByCommand()
{
if(GetTickCount() - m_tickData.m_dwPassengerEnterExit < 1000)
return true;
CVehiclePool *pVehiclePool = pNetGame->GetVehiclePool();
VEHICLEID ClosetVehicleID = pVehiclePool->FindNearestToLocalPlayerPed();
if(ClosetVehicleID < MAX_VEHICLES && pVehiclePool->GetSlotState(ClosetVehicleID))
{
CVehicle* pVehicle = pVehiclePool->GetAt(ClosetVehicleID);
if(pVehicle->GetDistanceFromLocalPlayerPed() < 4.0f)
{
m_pPlayerPed->EnterVehicle(pVehicle->m_dwGTAId, true);
SendEnterVehicleNotification(ClosetVehicleID, true);
m_tickData.m_dwPassengerEnterExit = GetTickCount();
return true;
}
}
return false;
}
void CLocalPlayer::SendEnterVehicleNotification(VEHICLEID VehicleID, bool bPassenger)
{
RakNet::BitStream bsSend;
bsSend.Write(VehicleID);
bsSend.Write(bPassenger);
pNetGame->GetRakClient()->RPC(&RPC_EnterVehicle, &bsSend, HIGH_PRIORITY, RELIABLE_SEQUENCED, 0, false, UNASSIGNED_NETWORK_ID, nullptr);
CVehiclePool *pVehiclePool = pNetGame->GetVehiclePool();
if(pVehiclePool)
{
CVehicle* pVehicle = pVehiclePool->GetAt(VehicleID);
if(pVehicle && pVehicle->IsATrainPart())
{
uint32_t dwVehicle = pVehicle->m_dwGTAId;
ScriptCommand(&camera_on_vehicle, dwVehicle, 3, 2);
}
}
}
void CLocalPlayer::SendExitVehicleNotification(VEHICLEID VehicleID)
{
CVehiclePool *pVehiclePool = pNetGame->GetVehiclePool();
if(pVehiclePool)
{
CVehicle* pVehicle = pVehiclePool->GetAt(VehicleID);
if(pVehicle)
{
if(!m_pPlayerPed->IsAPassenger()) m_LastVehicle = VehicleID;
if(pVehicle->IsATrainPart()) pGame->GetCamera()->SetBehindPlayer();
RakNet::BitStream bsSend;
bsSend.Write(VehicleID);
pNetGame->GetRakClient()->RPC(&RPC_ExitVehicle, &bsSend, HIGH_PRIORITY,RELIABLE_SEQUENCED, 0, false, UNASSIGNED_NETWORK_ID, NULL);
}
}
}
void CLocalPlayer::UpdateRemoteInterior(uint8_t byteInterior)
{
m_byteCurInterior = byteInterior;
RakNet::BitStream bsUpdateInterior;
bsUpdateInterior.Write(byteInterior);
pNetGame->GetRakClient()->RPC(&RPC_SetInteriorId, &bsUpdateInterior, HIGH_PRIORITY, RELIABLE, 0, false, UNASSIGNED_NETWORK_ID, NULL);
}
void CLocalPlayer::ApplySpecialAction(uint8_t byteSpecialAction)
{
switch(byteSpecialAction)
{
default:
case SPECIAL_ACTION_NONE:
// ~
break;
case SPECIAL_ACTION_USECELLPHONE:
if(!m_pPlayerPed->IsInVehicle()) m_pPlayerPed->ToggleCellphone(1);
break;
case SPECIAL_ACTION_STOPUSECELLPHONE:
if(m_pPlayerPed->IsCellphoneEnabled()) m_pPlayerPed->ToggleCellphone(0);
break;
case SPECIAL_ACTION_USEJETPACK:
if(!m_pPlayerPed->IsInJetpackMode()) m_pPlayerPed->StartJetpack();
break;
case SPECIAL_ACTION_HANDSUP:
if(!m_pPlayerPed->HasHandsUp()) m_pPlayerPed->HandsUp();
break;
case SPECIAL_ACTION_DANCE1:
m_pPlayerPed->PlayDance(1);
break;
case SPECIAL_ACTION_DANCE2:
m_pPlayerPed->PlayDance(2);
break;
case SPECIAL_ACTION_DANCE3:
m_pPlayerPed->PlayDance(3);
break;
case SPECIAL_ACTION_DANCE4:
m_pPlayerPed->PlayDance(4);
break;
}
}
uint8_t CLocalPlayer::GetSpecialAction()
{
if(GetPlayerPed()->IsCrouching())
{
return SPECIAL_ACTION_DUCK;
}
if(m_pPlayerPed->IsInJetpackMode())
return SPECIAL_ACTION_USEJETPACK;
if(m_pPlayerPed->IsDancing())
{
switch(m_pPlayerPed->m_iDanceStyle)
{
case 0:
return SPECIAL_ACTION_DANCE1;
case 1:
return SPECIAL_ACTION_DANCE2;
case 2:
return SPECIAL_ACTION_DANCE3;
case 3:
return SPECIAL_ACTION_DANCE4;
}
}
if(m_pPlayerPed->HasHandsUp())
return SPECIAL_ACTION_HANDSUP;
if(m_pPlayerPed->IsCellphoneEnabled())
return SPECIAL_ACTION_USECELLPHONE;
return SPECIAL_ACTION_NONE;
}
int CLocalPlayer::GetOptimumOnFootSendRate()
{
if(!m_pPlayerPed) return 1000;
return (iNetModeNormalOnFootSendRate + DetermineNumberOfPlayersInLocalRange());
}
int CLocalPlayer::GetOptimumInCarSendRate(uint8_t iPlayersEffected)
{
if(!m_pPlayerPed) return 1000;
//return (iNetModeNormalInCarSendRate + DetermineNumberOfPlayersInLocalRange());
CVehiclePool *pVehiclePool = pNetGame->GetVehiclePool();
if(pVehiclePool)
{
VEHICLEID VehicleID = pVehiclePool->FindIDFromGtaPtr(m_pPlayerPed->GetGtaVehicle());
if(VehicleID != INVALID_VEHICLE_ID)
{
CVehicle *pVehicle = pVehiclePool->GetAt(VehicleID);
if(pVehicle)
{
VECTOR vecMoveSpeed;
pVehicle->GetMoveSpeedVector(&vecMoveSpeed);
if( (vecMoveSpeed.X == 0.0f) &&
(vecMoveSpeed.Y == 0.0f) &&
(vecMoveSpeed.Z == 0.0f) ) {
if(pNetGame->m_bLanMode) return LANMODE_IDLE_INCAR_SENDRATE;
else return (iNetModeNormalInCarSendRate + (int)iPlayersEffected * iNetModeSendMultiplier);
}
else {
if(pNetGame->m_bLanMode) return LANMODE_NORMAL_INCAR_SENDRATE;
else return (iNetModeNormalInCarSendRate + (int)iPlayersEffected * iNetModeSendMultiplier);
}
}
}
}
}
int iNumPlayersInRange = 0;
int iCyclesUntilNextCount = 0;
uint8_t CLocalPlayer::DetermineNumberOfPlayersInLocalRange()
{
/*int iNumPlayersInRange = 0;
for(int i = 2; i < PLAYER_PED_SLOTS; i++)
if(bUsedPlayerSlots[i]) iNumPlayersInRange++;
return iNumPlayersInRange;*/
int iRet = 0;
PLAYERID x = 0;
// We only want to perform this operation
// once every few cycles. Doing it every frame
// would be a little bit too CPU intensive.
if(iCyclesUntilNextCount)
{
iCyclesUntilNextCount--;
return iNumPlayersInRange;
}
// This part is only processed when iCyclesUntilNextCount is 0
iCyclesUntilNextCount = 30;
iNumPlayersInRange = 0;
CPlayerPool *pPlayerPool = pNetGame->GetPlayerPool();
if(pPlayerPool)
{
while(x != MAX_PLAYERS)
{
if(pPlayerPool->GetSlotState(x))
{
if(pPlayerPool->GetAt(x)->IsActive())
{
iNumPlayersInRange++;
}
}
x++;
}
}
return iNumPlayersInRange;
}
void CLocalPlayer::SendOnFootFullSyncData()
{
RakNet::BitStream bsPlayerSync;
MATRIX4X4 matPlayer;
VECTOR vecMoveSpeed;
uint16_t lrAnalog, udAnalog;
uint8_t additionalKey = 0;
uint16_t wKeys = m_pPlayerPed->GetKeys(&lrAnalog, &udAnalog, &additionalKey);
ONFOOT_SYNC_DATA ofSync;
m_pPlayerPed->GetMatrix(&matPlayer);
m_pPlayerPed->GetMoveSpeedVector(&vecMoveSpeed);
ofSync.lrAnalog = lrAnalog;
ofSync.udAnalog = udAnalog;
ofSync.wKeys = wKeys;
ofSync.vecPos.X = matPlayer.pos.X;
ofSync.vecPos.Y = matPlayer.pos.Y;
ofSync.vecPos.Z = matPlayer.pos.Z;
ofSync.quat.SetFromMatrix(matPlayer);
ofSync.quat.Normalize();
if( FloatOffset(ofSync.quat.w, m_OnFootData.quat.w) < 0.00001 &&
FloatOffset(ofSync.quat.x, m_OnFootData.quat.x) < 0.00001 &&
FloatOffset(ofSync.quat.y, m_OnFootData.quat.y) < 0.00001 &&
FloatOffset(ofSync.quat.z, m_OnFootData.quat.z) < 0.00001)
{
ofSync.quat.Set(m_OnFootData.quat);
}
ofSync.byteHealth = (uint8_t)m_pPlayerPed->GetHealth();
ofSync.byteArmour = (uint8_t)m_pPlayerPed->GetArmour();
uint8_t exKeys = GetPlayerPed()->GetExtendedKeys();
ofSync.byteCurrentWeapon = (additionalKey << 6) | ofSync.byteCurrentWeapon & 0x3F;
ofSync.byteCurrentWeapon ^= (ofSync.byteCurrentWeapon ^ GetPlayerPed()->GetCurrentWeapon()) & 0x3F;
ofSync.byteSpecialAction = GetSpecialAction();
ofSync.vecMoveSpeed.X = vecMoveSpeed.X;
ofSync.vecMoveSpeed.Y = vecMoveSpeed.Y;
ofSync.vecMoveSpeed.Z = vecMoveSpeed.Z;
ofSync.vecSurfOffsets.X = 0.0f;
ofSync.vecSurfOffsets.Y = 0.0f;
ofSync.vecSurfOffsets.Z = 0.0f;
ofSync.wSurfInfo = 0;
ofSync.dwAnimation = 0;
if( (GetTickCount() - m_tickData.m_dwLastUpdateOnFootData) > 500 || memcmp(&m_OnFootData, &ofSync, sizeof(ONFOOT_SYNC_DATA)))
{
m_tickData.m_dwLastUpdateOnFootData = GetTickCount();
bsPlayerSync.Write((uint8_t)ID_PLAYER_SYNC);
bsPlayerSync.Write((char*)&ofSync, sizeof(ONFOOT_SYNC_DATA));
pNetGame->GetRakClient()->Send(&bsPlayerSync, HIGH_PRIORITY, UNRELIABLE_SEQUENCED, 0);
memcpy(&m_OnFootData, &ofSync, sizeof(ONFOOT_SYNC_DATA));
}
}
void CLocalPlayer::SendInCarFullSyncData()
{
RakNet::BitStream bsVehicleSync;
CVehiclePool *pVehiclePool = pNetGame->GetVehiclePool();
if(!pVehiclePool) return;
MATRIX4X4 matPlayer;
VECTOR vecMoveSpeed;
uint16_t lrAnalog, udAnalog;
uint8_t additionalKey = 0;
uint16_t wKeys = m_pPlayerPed->GetKeys(&lrAnalog, &udAnalog, &additionalKey);
CVehicle *pVehicle;
INCAR_SYNC_DATA icSync;
memset(&icSync, 0, sizeof(INCAR_SYNC_DATA));
if(m_pPlayerPed)
{
icSync.VehicleID = pVehiclePool->FindIDFromGtaPtr(m_pPlayerPed->GetGtaVehicle());
if(icSync.VehicleID == INVALID_VEHICLE_ID) return;
icSync.lrAnalog = lrAnalog;
icSync.udAnalog = udAnalog;
icSync.wKeys = wKeys;
pVehicle = pVehiclePool->GetAt(icSync.VehicleID);
if(!pVehicle) return;
pVehicle->GetMatrix(&matPlayer);
pVehicle->GetMoveSpeedVector(&vecMoveSpeed);
icSync.quat.SetFromMatrix(matPlayer);
icSync.quat.Normalize();
if( FloatOffset(icSync.quat.w, m_InCarData.quat.w) < 0.00001 &&
FloatOffset(icSync.quat.x, m_InCarData.quat.x) < 0.00001 &&
FloatOffset(icSync.quat.y, m_InCarData.quat.y) < 0.00001 &&
FloatOffset(icSync.quat.z, m_InCarData.quat.z) < 0.00001)
{
icSync.quat.Set(m_InCarData.quat);
}
// pos
icSync.vecPos.X = matPlayer.pos.X;
icSync.vecPos.Y = matPlayer.pos.Y;
icSync.vecPos.Z = matPlayer.pos.Z;
// move speed
icSync.vecMoveSpeed.X = vecMoveSpeed.X;
icSync.vecMoveSpeed.Y = vecMoveSpeed.Y;
icSync.vecMoveSpeed.Z = vecMoveSpeed.Z;
icSync.fCarHealth = pVehicle->GetHealth();
icSync.bytePlayerHealth = (uint8_t)m_pPlayerPed->GetHealth();
icSync.bytePlayerArmour = (uint8_t)m_pPlayerPed->GetArmour();
uint8_t exKeys = GetPlayerPed()->GetExtendedKeys();
icSync.byteCurrentWeapon = (exKeys << 6) | icSync.byteCurrentWeapon & 0x3F;
icSync.byteCurrentWeapon ^= (icSync.byteCurrentWeapon ^ GetPlayerPed()->GetCurrentWeapon()) & 0x3F;
icSync.byteSirenOn = pVehicle->IsSirenOn();
//icSync.byteLandingGearState = pVehicle->GetLandingGearState();
/*icSync.TrailerID = 0;
VEHICLE_TYPE* vehTrailer = (VEHICLE_TYPE*)pVehicle->m_pVehicle->dwTrailer;
if(vehTrailer != NULL)
{
if(ScriptCommand(&is_trailer_on_cab, pVehiclePool->FindIDFromGtaPtr(vehTrailer), pVehicle->m_dwGTAId))
icSync.TrailerID = pVehiclePool->FindIDFromGtaPtr(vehTrailer);
else icSync.TrailerID = 0;
}*/
// Note: Train Speed and Tire Popping values are mutually exclusive, which means
// if one is set, the other one will be affected.
if( pVehicle->GetModelIndex() != TRAIN_PASSENGER_LOCO ||
pVehicle->GetModelIndex() != TRAIN_FREIGHT_LOCO ||
pVehicle->GetModelIndex() != TRAIN_TRAM) {
if( pVehicle->GetVehicleSubtype() != 2 && pVehicle->GetVehicleSubtype() != 6) {
if( pVehicle->GetModelIndex() == HYDRA)
{
icSync.fTrainSpeed = (float)pVehicle->GetHydraThrusters();
} else {
icSync.fTrainSpeed = 0;
}
} else {
icSync.fTrainSpeed = (float)pVehicle->GetBikeLean();
}
} else {
icSync.fTrainSpeed = (float)pVehicle->GetTrainSpeed();
}
icSync.TrailerID = 0;
VEHICLE_TYPE* vehTrailer = (VEHICLE_TYPE*)pVehicle->m_pVehicle->dwTrailer;
CVehicle* pTrailer = pVehicle->GetTrailer();
if (pTrailer == NULL && vehTrailer == NULL)
{
pVehicle->SetTrailer(NULL);
}
else
{
pVehicle->SetTrailer(pTrailer);
icSync.TrailerID = pVehiclePool->FindIDFromGtaPtr(vehTrailer);
}
// SPECIAL STUFF
/*if(pGameVehicle->GetModelIndex() == HYDRA)
icSync.dwHydraThrustAngle = pVehicle->GetHydraThrusters();
else icSync.dwHydraThrustAngle = 0;*/
// send
if( (GetTickCount() - m_tickData.m_dwLastUpdateInCarData) > 500 || memcmp(&m_InCarData, &icSync, sizeof(INCAR_SYNC_DATA)))
{
m_tickData.m_dwLastUpdateInCarData = GetTickCount();
bsVehicleSync.Write((uint8_t)ID_VEHICLE_SYNC);
bsVehicleSync.Write((char*)&icSync, sizeof(INCAR_SYNC_DATA));
pNetGame->GetRakClient()->Send(&bsVehicleSync, HIGH_PRIORITY, UNRELIABLE_SEQUENCED, 0);
memcpy(&m_InCarData, &icSync, sizeof(INCAR_SYNC_DATA));
// For the tank/firetruck, we need some info on aiming
if (pVehicle->HasTurret()) SendAimSyncData();
}
/*if(icSync.TrailerID && icSync.TrailerID < MAX_VEHICLES)
{
MATRIX4X4 matTrailer;
TRAILER_SYNC_DATA trSync;
CVehicle* pTrailer = pVehiclePool->GetAt(icSync.TrailerID);
if(pTrailer)
{
pTrailer->GetMatrix(&matTrailer);
trSync.quat.SetFromMatrix(matTrailer);
trSync.quat.Normalize();
if( FloatOffset(trSync.quat.w, m_TrailerData.quat.w) < 0.00001 &&
FloatOffset(trSync.quat.x, m_TrailerData.quat.x) < 0.00001 &&
FloatOffset(trSync.quat.y, m_TrailerData.quat.y) < 0.00001 &&
FloatOffset(trSync.quat.z, m_TrailerData.quat.z) < 0.00001)
{
trSync.quat.Set(m_TrailerData.quat);
}
trSync.vecPos.X = matTrailer.pos.X;
trSync.vecPos.Y = matTrailer.pos.Y;
trSync.vecPos.Z = matTrailer.pos.Z;
pTrailer->GetMoveSpeedVector(&trSync.vecMoveSpeed);
pTrailer->GetTurnSpeedVector(&trSync.vecTurnSpeed);
RakNet::BitStream bsTrailerSync;
bsTrailerSync.Write((uint8_t)ID_TRAILER_SYNC);
bsTrailerSync.Write((char*)&trSync, sizeof (TRAILER_SYNC_DATA));
pNetGame->GetRakClient()->Send(&bsTrailerSync,HIGH_PRIORITY,UNRELIABLE_SEQUENCED,0);
memcpy(&m_TrailerData, &trSync, sizeof(TRAILER_SYNC_DATA));
}
}*/
}
}
void CLocalPlayer::SendPassengerFullSyncData()
{
RakNet::BitStream bsPassengerSync;
CVehiclePool *pVehiclePool = pNetGame->GetVehiclePool();
uint16_t lrAnalog, udAnalog;
uint8_t additionalKey = 0;
uint16_t wKeys = m_pPlayerPed->GetKeys(&lrAnalog, &udAnalog, &additionalKey);
PASSENGER_SYNC_DATA psSync;
MATRIX4X4 mat;
psSync.VehicleID = pVehiclePool->FindIDFromGtaPtr(m_pPlayerPed->GetGtaVehicle());
if(psSync.VehicleID == INVALID_VEHICLE_ID) return;
psSync.lrAnalog = lrAnalog;
psSync.udAnalog = udAnalog;
psSync.wKeys = wKeys;
psSync.bytePlayerHealth = (uint8_t)m_pPlayerPed->GetHealth();
psSync.bytePlayerArmour = (uint8_t)m_pPlayerPed->GetArmour();
psSync.byteDriveBy = 0;//m_bPassengerDriveByMode;
psSync.byteSeatFlags = m_pPlayerPed->GetVehicleSeatID();
uint8_t exKeys = GetPlayerPed()->GetExtendedKeys();
psSync.byteCurrentWeapon = (exKeys << 6) | psSync.byteCurrentWeapon & 0x3F;
psSync.byteCurrentWeapon ^= (psSync.byteCurrentWeapon ^ GetPlayerPed()->GetCurrentWeapon()) & 0x3F;
m_pPlayerPed->GetMatrix(&mat);
psSync.vecPos.X = mat.pos.X;
psSync.vecPos.Y = mat.pos.Y;
psSync.vecPos.Z = mat.pos.Z;
// send
if((GetTickCount() - m_tickData.m_dwLastUpdatePassengerData) > 500 || memcmp(&m_PassengerData, &psSync, sizeof(PASSENGER_SYNC_DATA)))
{
m_tickData.m_dwLastUpdatePassengerData = GetTickCount();
bsPassengerSync.Write((uint8_t)ID_PASSENGER_SYNC);
bsPassengerSync.Write((char*)&psSync, sizeof(PASSENGER_SYNC_DATA));
pNetGame->GetRakClient()->Send(&bsPassengerSync, HIGH_PRIORITY, UNRELIABLE_SEQUENCED, 0);
memcpy(&m_PassengerData, &psSync, sizeof(PASSENGER_SYNC_DATA));
}
}
void CLocalPlayer::SendAimSyncData()
{
AIM_SYNC_DATA aimSync;
CAMERA_AIM* caAim = m_pPlayerPed->GetCurrentAim();
aimSync.byteCamMode = m_pPlayerPed->GetCameraMode();
aimSync.vecAimf.X = caAim->f1x;
aimSync.vecAimf.Y = caAim->f1y;
aimSync.vecAimf.Z = caAim->f1z;
aimSync.vecAimPos.X = caAim->pos1x;
aimSync.vecAimPos.Y = caAim->pos1y;
aimSync.vecAimPos.Z = caAim->pos1z;
aimSync.fAimZ = m_pPlayerPed->GetAimZ();
aimSync.aspect_ratio = GameGetAspectRatio() * 255.0;
aimSync.byteCamExtZoom = (uint8_t)(m_pPlayerPed->GetCameraExtendedZoom() * 63.0f);
WEAPON_SLOT_TYPE* pwstWeapon = m_pPlayerPed->GetCurrentWeaponSlot();
if (pwstWeapon->dwState == 2) {
aimSync.byteWeaponState = WS_RELOADING;
} else {
aimSync.byteWeaponState = (pwstWeapon->dwAmmoInClip > 1) ? WS_MORE_BULLETS : pwstWeapon->dwAmmoInClip;
}
if ((GetTickCount() - m_dwLastSendSyncTick) > 500 || memcmp(&m_aimSync, &aimSync, sizeof(AIM_SYNC_DATA)))
{
m_dwLastSendSyncTick = GetTickCount();
RakNet::BitStream bsAimSync;
bsAimSync.Write((char)ID_AIM_SYNC);
bsAimSync.Write((char*)&aimSync, sizeof(AIM_SYNC_DATA));
pNetGame->GetRakClient()->Send(&bsAimSync, HIGH_PRIORITY, UNRELIABLE_SEQUENCED, 1);
memcpy(&m_aimSync, &aimSync, sizeof(AIM_SYNC_DATA));
}
}
void CLocalPlayer::ProcessSpectating()
{
RakNet::BitStream bsSpectatorSync;
SPECTATOR_SYNC_DATA spSync;
MATRIX4X4 matPos;
uint16_t lrAnalog, udAnalog;
uint8_t additionalKey = 0;
uint16_t wKeys = m_pPlayerPed->GetKeys(&lrAnalog, &udAnalog, &additionalKey);
pGame->GetCamera()->GetMatrix(&matPos);
CPlayerPool *pPlayerPool = pNetGame->GetPlayerPool();
CVehiclePool *pVehiclePool = pNetGame->GetVehiclePool();
if(!pPlayerPool || !pVehiclePool) return;
spSync.vecPos.X = matPos.pos.X;
spSync.vecPos.Y = matPos.pos.Y;
spSync.vecPos.Z = matPos.pos.Z;
spSync.lrAnalog = lrAnalog;
spSync.udAnalog = udAnalog;
spSync.wKeys = wKeys;
if((GetTickCount() - m_tickData.m_dwLastSendSpecTick) > 200)
{
m_tickData.m_dwLastSendSpecTick = GetTickCount();
bsSpectatorSync.Write((uint8_t)ID_SPECTATOR_SYNC);
bsSpectatorSync.Write((char*)&spSync, sizeof(SPECTATOR_SYNC_DATA));
pNetGame->GetRakClient()->Send(&bsSpectatorSync, HIGH_PRIORITY, UNRELIABLE, 0);
if((GetTickCount() - m_tickData.m_dwLastSendAimTick) > 400)
{
m_tickData.m_dwLastSendAimTick = GetTickCount();
SendAimSyncData();
}
}
pGame->DisplayHUD(false);
m_pPlayerPed->SetHealth(100.0f);
GetPlayerPed()->TeleportTo(spSync.vecPos.X, spSync.vecPos.Y, spSync.vecPos.Z + 20.0f);
// handle spectate player left the server
if(m_spectateData.m_byteSpectateType == SPECTATING_TYPE_PLAYER &&
!pPlayerPool->GetSlotState(m_spectateData.m_dwSpectateId))
{
m_spectateData.m_byteSpectateType = SPECTATING_TYPE_NONE;
m_spectateData.m_bSpectateProcessed = false;
}
// handle spectate player is no longer active (ie Died)
if(m_spectateData.m_byteSpectateType == SPECTATING_TYPE_PLAYER &&
pPlayerPool->GetSlotState(m_spectateData.m_dwSpectateId) &&
(!pPlayerPool->GetAt(m_spectateData.m_dwSpectateId)->IsActive() ||
pPlayerPool->GetAt(m_spectateData.m_dwSpectateId)->GetState() == PLAYER_STATE_WASTED))
{
m_spectateData.m_byteSpectateType = SPECTATING_TYPE_NONE;
m_spectateData.m_bSpectateProcessed = false;
}
if(m_spectateData.m_bSpectateProcessed) return;
if(m_spectateData.m_byteSpectateType == SPECTATING_TYPE_NONE)
{
GetPlayerPed()->RemoveFromVehicleAndPutAt(0.0f, 0.0f, 10.0f);
pGame->GetCamera()->SetPosition(50.0f, 50.0f, 50.0f, 0.0f, 0.0f, 0.0f);
pGame->GetCamera()->LookAtPoint(60.0f, 60.0f, 50.0f, 2);
m_spectateData.m_bSpectateProcessed = true;
}
else if(m_spectateData.m_byteSpectateType == SPECTATING_TYPE_PLAYER)
{
uint32_t dwGTAId = 0;
CPlayerPed *pPlayerPed = 0;
if(pPlayerPool->GetSlotState(m_spectateData.m_dwSpectateId))
{
pPlayerPed = pPlayerPool->GetAt(m_spectateData.m_dwSpectateId)->GetPlayerPed();
if(pPlayerPed)
{
dwGTAId = pPlayerPed->m_dwGTAId;
ScriptCommand(&camera_on_actor, dwGTAId, m_spectateData.m_byteSpectateMode, 2);
m_spectateData.m_bSpectateProcessed = true;
}
}
}
else if(m_spectateData.m_byteSpectateType == SPECTATING_TYPE_VEHICLE)
{
CVehicle *pVehicle = nullptr;
uint32_t dwGTAId = 0;
if (pVehiclePool->GetSlotState((VEHICLEID)m_spectateData.m_dwSpectateId))
{
pVehicle = pVehiclePool->GetAt((VEHICLEID)m_spectateData.m_dwSpectateId);
if(pVehicle)
{
dwGTAId = pVehicle->m_dwGTAId;
ScriptCommand(&camera_on_vehicle, dwGTAId, m_spectateData.m_byteSpectateMode, 2);
m_spectateData.m_bSpectateProcessed = true;
}
}
}
}
void CLocalPlayer::ToggleSpectating(bool bToggle)
{
if(m_spectateData.m_bIsSpectating && !bToggle)
Spawn();
m_spectateData.m_bIsSpectating = bToggle;
m_spectateData.m_byteSpectateType = SPECTATING_TYPE_NONE;
m_spectateData.m_dwSpectateId = 0xFFFFFFFF;
m_spectateData.m_bSpectateProcessed = false;
}
void CLocalPlayer::SpectatePlayer(PLAYERID playerId)
{
CPlayerPool *pPlayerPool = pNetGame->GetPlayerPool();
if(pPlayerPool && pPlayerPool->GetSlotState(playerId))
{
if(pPlayerPool->GetAt(playerId)->GetState() != PLAYER_STATE_NONE &&
pPlayerPool->GetAt(playerId)->GetState() != PLAYER_STATE_WASTED)
{
m_spectateData.m_byteSpectateType = SPECTATING_TYPE_PLAYER;
m_spectateData.m_dwSpectateId = playerId;
m_spectateData.m_bSpectateProcessed = false;
}
}
}
void CLocalPlayer::SpectateVehicle(VEHICLEID VehicleID)
{
CVehiclePool *pVehiclePool = pNetGame->GetVehiclePool();
if(pVehiclePool && pVehiclePool->GetSlotState(VehicleID))
{
m_spectateData.m_byteSpectateType = SPECTATING_TYPE_VEHICLE;
m_spectateData.m_dwSpectateId = VehicleID;
m_spectateData.m_bSpectateProcessed = false;
}
}
void CLocalPlayer::GiveTakeDamage(bool bGiveOrTake, uint16_t wPlayerID, float damage_amount, uint32_t weapon_id, uint32_t bodypart)
{
RakNet::BitStream bitStream;
bitStream.Write((bool)bGiveOrTake);
bitStream.Write((uint16_t)wPlayerID);
bitStream.Write((float)damage_amount);
bitStream.Write((uint32_t)weapon_id);
bitStream.Write((uint32_t)bodypart);
pNetGame->GetRakClient()->RPC(&RPC_PlayerGiveTakeDamage, &bitStream, HIGH_PRIORITY, RELIABLE_ORDERED, 0, false, UNASSIGNED_NETWORK_ID, nullptr);
}
void CLocalPlayer::ProcessVehicleDamageUpdates(uint16_t CurrentVehicle)
{
CVehicle *pVehicle = pNetGame->GetVehiclePool()->GetAt(CurrentVehicle);
if(!pVehicle)
return;
// If this isn't the vehicle we were last monitoring for damage changes
// update our stored data and return.
if(CurrentVehicle != m_damageVehicle.m_VehicleUpdating)
{
m_damageVehicle.m_dwLastPanelStatus = pVehicle->GetPanelDamageStatus();
m_damageVehicle.m_dwLastDoorStatus = pVehicle->GetDoorDamageStatus();
m_damageVehicle.m_byteLastLightsStatus = pVehicle->GetLightDamageStatus();
m_damageVehicle.m_byteLastTireStatus = pVehicle->GetWheelPoppedStatus();
m_damageVehicle.m_VehicleUpdating = CurrentVehicle;
return;
}
if(m_damageVehicle.m_dwLastPanelStatus != pVehicle->GetPanelDamageStatus() ||
m_damageVehicle.m_dwLastDoorStatus != pVehicle->GetDoorDamageStatus() ||
m_damageVehicle.m_byteLastLightsStatus != pVehicle->GetLightDamageStatus() ||
m_damageVehicle.m_byteLastTireStatus != pVehicle->GetWheelPoppedStatus())
{
m_damageVehicle.m_dwLastPanelStatus = pVehicle->GetPanelDamageStatus();
m_damageVehicle.m_dwLastDoorStatus = pVehicle->GetDoorDamageStatus();
m_damageVehicle.m_byteLastLightsStatus = pVehicle->GetLightDamageStatus();
m_damageVehicle.m_byteLastTireStatus = pVehicle->GetWheelPoppedStatus();
// We need to update the server that the vehicle we're driving
// has had its damage model modified.
//pChatWindow->AddDebugMessage("Local::DamageModelChanged");
RakNet::BitStream bsData;
bsData.Write(m_damageVehicle.m_VehicleUpdating);
bsData.Write(m_damageVehicle.m_dwLastPanelStatus);
bsData.Write(m_damageVehicle.m_dwLastDoorStatus);
bsData.Write(m_damageVehicle.m_byteLastLightsStatus);
bsData.Write(m_damageVehicle.m_byteLastTireStatus);
pNetGame->GetRakClient()->RPC(&RPC_DamageVehicle, &bsData, HIGH_PRIORITY, RELIABLE_ORDERED, 0, false, UNASSIGNED_NETWORK_ID, NULL);
}
}
void CLocalPlayer::UpdateStats()
{
if(m_statsData.dwLastMoney != pGame->GetLocalMoney() ||
m_statsData.byteLastDrunkLevel != pGame->GetDrunkBlur())
{
m_statsData.dwLastMoney = pGame->GetLocalMoney();
m_statsData.byteLastDrunkLevel = pGame->GetDrunkBlur();
RakNet::BitStream bsStats;
bsStats.Write((uint8_t)ID_STATS_UPDATE);
bsStats.Write(m_statsData.dwLastMoney);
bsStats.Write(m_statsData.byteLastDrunkLevel);
pNetGame->GetRakClient()->Send(&bsStats, HIGH_PRIORITY, UNRELIABLE, 0);
}
}
void CLocalPlayer::UpdateWeapons()
{
if(m_pPlayerPed->IsInVehicle())
return;
bool bSend = false;
for (uint8_t i = 0; i <= 12; i++)
{
if(m_weaponData.m_byteLastWeapon[i] != m_pPlayerPed->m_pPed->WeaponSlots[i].dwType)
{
m_weaponData.m_byteLastWeapon[i] = m_pPlayerPed->m_pPed->WeaponSlots[i].dwType;
bSend = true;
}
if(m_weaponData.m_dwLastAmmo[i] != m_pPlayerPed->m_pPed->WeaponSlots[i].dwAmmo)
{
m_weaponData.m_dwLastAmmo[i] = m_pPlayerPed->m_pPed->WeaponSlots[i].dwAmmo;
bSend = true;
}
}
if(bSend)
{
RakNet::BitStream bsWeapons;
bsWeapons.Write((uint8_t)ID_WEAPONS_UPDATE);
for(uint8_t i = 0; i <= 12; ++i)
{
bsWeapons.Write((uint8_t)i);
bsWeapons.Write((uint8_t)m_weaponData.m_byteLastWeapon[i]);
bsWeapons.Write((uint16_t)m_weaponData.m_dwLastAmmo[i]);
}
pNetGame->GetRakClient()->Send(&bsWeapons, HIGH_PRIORITY, UNRELIABLE, 0);
}
} | 29.81312 | 229 | 0.74865 | [
"vector",
"model"
] |
c5d08f248ca9e943e3b302d524be4ea464324f56 | 5,745 | cc | C++ | similarity_search/src/space/space_l2sqr_sift.cc | GuilhemN/nmslib | 9c464c077a9dd7e3d453b44e9a1b39829034d68e | [
"Apache-2.0"
] | 2,031 | 2018-03-29T00:59:55.000Z | 2022-03-31T23:54:33.000Z | similarity_search/src/space/space_l2sqr_sift.cc | GuilhemN/nmslib | 9c464c077a9dd7e3d453b44e9a1b39829034d68e | [
"Apache-2.0"
] | 262 | 2018-03-29T17:44:53.000Z | 2022-03-31T02:56:40.000Z | similarity_search/src/space/space_l2sqr_sift.cc | GuilhemN/nmslib | 9c464c077a9dd7e3d453b44e9a1b39829034d68e | [
"Apache-2.0"
] | 281 | 2018-03-29T13:12:50.000Z | 2022-03-28T15:18:31.000Z | /**
* Non-metric Space Library
*
* Main developers: Bilegsaikhan Naidan, Leonid Boytsov, Yury Malkov, Ben Frederickson, David Novak
*
* For the complete list of contributors and further details see:
* https://github.com/nmslib/nmslib
*
* Copyright (c) 2013-2018
*
* This code is released under the
* Apache License Version 2.0 http://www.apache.org/licenses/.
*
*/
#include <cmath>
#include <fstream>
#include <sstream>
#include <string>
#include <sstream>
#include <memory>
#include <iomanip>
#include <limits>
#include <cstdio>
#include <cstdint>
#include "object.h"
#include "utils.h"
#include "logging.h"
#include "distcomp.h"
#include "experimentconf.h"
#include "space/space_l2sqr_sift.h"
#include "read_data.h"
namespace similarity {
using namespace std;
/** Standard functions to read/write/create objects */
unique_ptr<DataFileInputState> SpaceL2SqrSift::OpenReadFileHeader(const string& inpFileName) const {
return unique_ptr<DataFileInputState>(new DataFileInputStateVec(inpFileName));
}
unique_ptr<DataFileOutputState> SpaceL2SqrSift::OpenWriteFileHeader(const ObjectVector& dataset,
const string& outFileName) const {
return unique_ptr<DataFileOutputState>(new DataFileOutputState(outFileName));
}
unique_ptr<Object>
SpaceL2SqrSift::CreateObjFromStr(IdType id, LabelType label, const string& s,
DataFileInputState* pInpStateBase) const {
DataFileInputStateVec* pInpState = NULL;
if (pInpStateBase != NULL) {
pInpState = dynamic_cast<DataFileInputStateVec*>(pInpStateBase);
if (NULL == pInpState) {
PREPARE_RUNTIME_ERR(err) << "Bug: unexpected pointer type";
THROW_RUNTIME_ERR(err);
}
}
vector<uint8_t> vec;
ReadUint8Vec(s, label, vec);
if (pInpState != NULL) {
if (pInpState->dim_ == 0) pInpState->dim_ = vec.size();
else if (vec.size() != pInpState->dim_) {
stringstream lineStr;
if (pInpStateBase != NULL) lineStr << " line:" << pInpState->line_num_ << " ";
PREPARE_RUNTIME_ERR(err) << "The # of vector elements (" << vec.size() << ")" << lineStr.str() <<
" doesn't match the # of elements in previous lines. (" << pInpState->dim_ << " )";
THROW_RUNTIME_ERR(err);
}
}
return unique_ptr<Object>(CreateObjFromUint8Vect(id, label, vec));
}
string SpaceL2SqrSift::CreateStrFromObj(const Object* pObj, const string& externId /* ignored */) const {
stringstream out;
const uint8_t* p = reinterpret_cast<const uint8_t*>(pObj->data());
for (size_t i = 0; i < SIFT_DIM; ++i) {
if (i) out << " ";
// Clear all previous flags & set to the maximum precision available
out << p[i];
}
return out.str();
}
bool SpaceL2SqrSift::ReadNextObjStr(DataFileInputState &inpStateBase, string& strObj, LabelType& label, string& externId) const {
externId.clear();
DataFileInputStateOneFile* pInpState = dynamic_cast<DataFileInputStateOneFile*>(&inpStateBase);
CHECK_MSG(pInpState != NULL, "Bug: unexpected pointer type");
if (!pInpState->inp_file_) return false;
if (!getline(pInpState->inp_file_, strObj)) return false;
pInpState->line_num_++;
return true;
}
/** End of standard functions to read/write/create objects */
void SpaceL2SqrSift::ReadUint8Vec(string line, LabelType& label, vector<uint8_t>& v)
{
v.clear();
label = Object::extractLabel(line);
vector<float> vtmp;
if (!ReadVecDataEfficiently(line, vtmp)) {
PREPARE_RUNTIME_ERR(err) << "Failed to parse the line: '" << line << "'";
LOG(LIB_ERROR) << err.stream().str();
THROW_RUNTIME_ERR(err);
}
if (vtmp.size() != SIFT_DIM) {
PREPARE_RUNTIME_ERR(err) << "Wrong number of vector elements "
<< "(expected " << SIFT_DIM << " but got " << vtmp.size() << ")"
<< " in line: '" << line << "'";
LOG(LIB_ERROR) << err.stream().str();
THROW_RUNTIME_ERR(err);
}
v.resize(SIFT_DIM);
for (unsigned i = 0; i < SIFT_DIM; ++i) {
float fval = vtmp[i];
if (fval < 0 || fval > numeric_limits<uint8_t>::max()) {
PREPARE_RUNTIME_ERR(err) << "Out-of range integer values (for SIFT) in the line: '" << line << "'";
LOG(LIB_ERROR) << err.stream().str();
THROW_RUNTIME_ERR(err);
}
v[i] = static_cast<uint8_t>(fval);
if (fabs(v[i] - fval) > numeric_limits<float>::min()) {
PREPARE_RUNTIME_ERR(err) << "Non-integer values (for SIFT) in the line: '" << line << "'";
LOG(LIB_ERROR) << err.stream().str();
THROW_RUNTIME_ERR(err);
}
}
}
Object*
SpaceL2SqrSift::CreateObjFromUint8Vect(IdType id, LabelType label, const vector<uint8_t>& InpVect) const {
CHECK_MSG(InpVect.size() == SIFT_DIM,
"Bug or internal error, SIFT vectors dim " + ConvertToString(InpVect.size()) +
" isn't == " + ConvertToString(SIFT_DIM));
DistTypeSIFT sum = 0;
// We precompute and memorize the sum
for (DistTypeSIFT e : InpVect)
sum += e * e;
unique_ptr<Object> res(new Object(id, label, SIFT_DIM + sizeof(DistTypeSIFT),
&InpVect[0]));
*reinterpret_cast<DistTypeSIFT*>(res->data() + SIFT_DIM) = sum;
return res.release();
}
void
SpaceL2SqrSift::CreateDenseVectFromObj(const Object* obj, DistTypeSIFT* pVect, size_t nElem) const {
const uint8_t* p = reinterpret_cast<const uint8_t*>(obj->data());
for (unsigned i = 0; i < min<size_t>(nElem, SIFT_DIM); ++i) {
pVect[i] = p[i];
}
}
// This approximate comparison is actually an exact one
bool SpaceL2SqrSift::ApproxEqual(const Object& obj1, const Object& obj2) const {
return HiddenDistance(&obj1, &obj2) == 0;
}
} // namespace similarity
| 34.608434 | 129 | 0.652393 | [
"object",
"vector"
] |
c5d68714aebef5fecdd48600f2b4429be57d3121 | 2,979 | cc | C++ | src/ast/ast_type.cc | sunnyps/tint | 22daca166bbc412345fc60d4f60646d6d2f3ada0 | [
"Apache-2.0"
] | null | null | null | src/ast/ast_type.cc | sunnyps/tint | 22daca166bbc412345fc60d4f60646d6d2f3ada0 | [
"Apache-2.0"
] | null | null | null | src/ast/ast_type.cc | sunnyps/tint | 22daca166bbc412345fc60d4f60646d6d2f3ada0 | [
"Apache-2.0"
] | null | null | null | // Copyright 2020 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/ast/type.h"
#include "src/ast/alias.h"
#include "src/ast/bool.h"
#include "src/ast/f32.h"
#include "src/ast/i32.h"
#include "src/ast/matrix.h"
#include "src/ast/pointer.h"
#include "src/ast/sampler.h"
#include "src/ast/texture.h"
#include "src/ast/u32.h"
#include "src/ast/vector.h"
TINT_INSTANTIATE_TYPEINFO(tint::ast::Type);
namespace tint {
namespace ast {
Type::Type(ProgramID program_id, const Source& source)
: Base(program_id, source) {}
Type::Type(Type&&) = default;
Type::~Type() = default;
Type* Type::UnwrapAll() {
auto* type = this;
while (true) {
if (auto* ptr = type->As<Pointer>()) {
type = ptr->type();
} else {
break;
}
}
return type;
}
bool Type::is_scalar() const {
return IsAnyOf<F32, U32, I32, Bool>();
}
bool Type::is_float_scalar() const {
return Is<F32>();
}
bool Type::is_float_matrix() const {
return Is([](const Matrix* m) { return m->type()->is_float_scalar(); });
}
bool Type::is_float_vector() const {
return Is([](const Vector* v) { return v->type()->is_float_scalar(); });
}
bool Type::is_float_scalar_or_vector() const {
return is_float_scalar() || is_float_vector();
}
bool Type::is_float_scalar_or_vector_or_matrix() const {
return is_float_scalar() || is_float_vector() || is_float_matrix();
}
bool Type::is_integer_scalar() const {
return IsAnyOf<U32, I32>();
}
bool Type::is_unsigned_integer_vector() const {
return Is([](const Vector* v) { return v->type()->Is<U32>(); });
}
bool Type::is_signed_integer_vector() const {
return Is([](const Vector* v) { return v->type()->Is<I32>(); });
}
bool Type::is_unsigned_scalar_or_vector() const {
return Is<U32>() || is_unsigned_integer_vector();
}
bool Type::is_signed_scalar_or_vector() const {
return Is<I32>() || is_signed_integer_vector();
}
bool Type::is_integer_scalar_or_vector() const {
return is_unsigned_scalar_or_vector() || is_signed_scalar_or_vector();
}
bool Type::is_bool_vector() const {
return Is([](const Vector* v) { return v->type()->Is<Bool>(); });
}
bool Type::is_bool_scalar_or_vector() const {
return Is<Bool>() || is_bool_vector();
}
bool Type::is_handle() const {
return IsAnyOf<Sampler, Texture>();
}
void Type::to_str(const sem::Info&, std::ostream& out, size_t indent) const {
make_indent(out, indent);
out << type_name();
}
} // namespace ast
} // namespace tint
| 25.033613 | 77 | 0.687143 | [
"vector"
] |
c5e2bb4cc22481b374f1de8bb0d213fb3df46213 | 926 | cpp | C++ | Modules/REPlatform/Sources/REPlatform/Commands/Private/InspMemberModifyCommand.cpp | stinvi/dava.engine | 2b396ca49cdf10cdc98ad8a9ffcf7768a05e285e | [
"BSD-3-Clause"
] | 26 | 2018-09-03T08:48:22.000Z | 2022-02-14T05:14:50.000Z | Modules/REPlatform/Sources/REPlatform/Commands/Private/InspMemberModifyCommand.cpp | ANHELL-blitz/dava.engine | ed83624326f000866e29166c7f4cccfed1bb41d4 | [
"BSD-3-Clause"
] | null | null | null | Modules/REPlatform/Sources/REPlatform/Commands/Private/InspMemberModifyCommand.cpp | ANHELL-blitz/dava.engine | ed83624326f000866e29166c7f4cccfed1bb41d4 | [
"BSD-3-Clause"
] | 45 | 2018-05-11T06:47:17.000Z | 2022-02-03T11:30:55.000Z | #include "REPlatform/Commands/InspMemberModifyCommand.h"
#include <Base/Introspection.h>
#include <Reflection/ReflectionRegistrator.h>
namespace DAVA
{
InspMemberModifyCommand::InspMemberModifyCommand(const InspMember* _member, void* _object, const VariantType& _newValue)
: RECommand("Modify value")
, member(_member)
, object(_object)
, newValue(_newValue)
{
if (nullptr != member && nullptr != object)
{
oldValue = member->Value(object);
}
}
void InspMemberModifyCommand::Undo()
{
if (nullptr != member && nullptr != object)
{
member->SetValue(object, oldValue);
}
}
void InspMemberModifyCommand::Redo()
{
if (nullptr != member && nullptr != object)
{
member->SetValue(object, newValue);
}
}
DAVA_VIRTUAL_REFLECTION_IMPL(InspMemberModifyCommand)
{
ReflectionRegistrator<InspMemberModifyCommand>::Begin()
.End();
}
} // namespace DAVA
| 22.047619 | 120 | 0.686825 | [
"object"
] |
c5e3e8524ae53f4c43db104c257796434ed2ea02 | 3,752 | cc | C++ | samgraph/common/run_config.cc | SJTU-IPADS/fgnn-artifacts | c96e7ec8204d767152958dc63a764466e90424fd | [
"Apache-2.0"
] | 23 | 2022-01-25T13:28:51.000Z | 2022-03-23T07:05:47.000Z | samgraph/common/run_config.cc | SJTU-IPADS/gnnlab | 5c73564e4a9bd5deeff7eed0b923c115ccba34d7 | [
"Apache-2.0"
] | null | null | null | samgraph/common/run_config.cc | SJTU-IPADS/gnnlab | 5c73564e4a9bd5deeff7eed0b923c115ccba34d7 | [
"Apache-2.0"
] | 1 | 2022-02-28T18:48:56.000Z | 2022-02-28T18:48:56.000Z | /*
* Copyright 2022 Institute of Parallel and Distributed Systems, Shanghai Jiao Tong University
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#include "run_config.h"
#include "constant.h"
#include "logging.h"
namespace samgraph {
namespace common {
std::unordered_map<std::string, std::string> RunConfig::raw_configs;
// clang-format off
std::string RunConfig::dataset_path;
RunArch RunConfig::run_arch;
SampleType RunConfig::sample_type;
size_t RunConfig::batch_size;
size_t RunConfig::num_epoch;
Context RunConfig::sampler_ctx;
Context RunConfig::trainer_ctx;
CachePolicy RunConfig::cache_policy;
double RunConfig::cache_percentage = 0.0f;
size_t RunConfig::max_sampling_jobs = 10;
size_t RunConfig::max_copying_jobs = 10;
std::vector<size_t> RunConfig::fanout;
size_t RunConfig::random_walk_length;
double RunConfig::random_walk_restart_prob;
size_t RunConfig::num_random_walk;
size_t RunConfig::num_neighbor;
size_t RunConfig::num_layer;
bool RunConfig::is_configured = false;
// CPUHash2 now is the best parallel hash remapping
cpu::CPUHashType RunConfig::cpu_hash_type = cpu::kCPUHash2;
size_t RunConfig::num_sample_worker;
size_t RunConfig::num_train_worker;
bool RunConfig::have_switcher = false;
// For arch7
size_t RunConfig::worker_id = false;
size_t RunConfig::num_worker = false;
bool RunConfig::option_profile_cuda = false;
bool RunConfig::option_log_node_access = false;
bool RunConfig::option_log_node_access_simple = false;
bool RunConfig::option_sanity_check = false;
// env key: on -1, all epochs; on 0: no barrier; on other: which epoch to barrier
int RunConfig::barriered_epoch;
int RunConfig::presample_epoch;
bool RunConfig::option_dump_trace = false;
size_t RunConfig::option_empty_feat = 0;
int RunConfig::omp_thread_num = 40;
std::string RunConfig::shared_meta_path = "/shared_meta_data";
// clang-format on
void RunConfig::LoadConfigFromEnv() {
if (IsEnvSet(Constant::kEnvProfileCuda)) {
RunConfig::option_profile_cuda = true;
}
if (IsEnvSet(Constant::kEnvLogNodeAccessSimple)) {
RunConfig::option_log_node_access_simple = true;
}
if (IsEnvSet(Constant::kEnvLogNodeAccess)) {
RunConfig::option_log_node_access = true;
}
if (IsEnvSet(Constant::kEnvSanityCheck)) {
RunConfig::option_sanity_check = true;
}
if (IsEnvSet(Constant::kEnvDumpTrace)) {
RunConfig::option_dump_trace = true;
}
if (GetEnv(Constant::kEnvEmptyFeat) != "") {
RunConfig::option_empty_feat = std::stoul(GetEnv(Constant::kEnvEmptyFeat));
}
}
} // namespace common
} // namespace samgraph
| 35.396226 | 94 | 0.627399 | [
"vector"
] |
c5f2c544852054d4f74930b05e9785d15d134a9a | 6,830 | cpp | C++ | examples/pines2/openglwindow.cpp | tamirislira/abcg | 059a5da06c37670dde208e73a13f51fff9e6c086 | [
"MIT"
] | null | null | null | examples/pines2/openglwindow.cpp | tamirislira/abcg | 059a5da06c37670dde208e73a13f51fff9e6c086 | [
"MIT"
] | null | null | null | examples/pines2/openglwindow.cpp | tamirislira/abcg | 059a5da06c37670dde208e73a13f51fff9e6c086 | [
"MIT"
] | null | null | null | #include "openglwindow.hpp"
#include <fmt/core.h>
#include <imgui.h>
#include <tiny_obj_loader.h>
#include <cppitertools/itertools.hpp>
#include <glm/gtx/fast_trigonometry.hpp>
#include <glm/gtx/hash.hpp>
#include <unordered_map>
#include <glm/gtc/matrix_inverse.hpp>
// Explicit specialization of std::hash for Vertex
namespace std {
template <>
struct hash<Vertex> {
size_t operator()(Vertex const& vertex) const noexcept {
const std::size_t h1{std::hash<glm::vec3>()(vertex.position)};
return h1;
}
};
} // namespace std
void OpenGLWindow::handleEvent(SDL_Event& ev) {
if (ev.type == SDL_KEYDOWN) {
if (ev.key.keysym.sym == SDLK_LEFT || ev.key.keysym.sym == SDLK_a)
m_panSpeed = -1.0f;
if (ev.key.keysym.sym == SDLK_RIGHT || ev.key.keysym.sym == SDLK_d)
m_panSpeed = 1.0f;
if (ev.key.keysym.sym == SDLK_q) m_truckSpeed = -1.0f;
if (ev.key.keysym.sym == SDLK_e) m_truckSpeed = 1.0f;
}
if (ev.type == SDL_KEYUP) {
if ((ev.key.keysym.sym == SDLK_LEFT || ev.key.keysym.sym == SDLK_a) &&
m_panSpeed < 0)
m_panSpeed = 0.0f;
if ((ev.key.keysym.sym == SDLK_RIGHT || ev.key.keysym.sym == SDLK_d) &&
m_panSpeed > 0)
m_panSpeed = 0.0f;
if (ev.key.keysym.sym == SDLK_q && m_truckSpeed < 0) m_truckSpeed = 0.0f;
if (ev.key.keysym.sym == SDLK_e && m_truckSpeed > 0) m_truckSpeed = 0.0f;
}
}
void OpenGLWindow::loadModel(std::string_view path) {
m_model.terminateGL();
m_model.loadDiffuseTexture(getAssetsPath() + "maps/pattern.png");
m_model.loadObj(path, false);
m_model.setupVAO(m_program);
m_trianglesToDraw = m_model.getNumTriangles();
// Use material properties from the loaded model
m_Ka = m_model.getKa();
m_Kd = m_model.getKd();
m_Ks = m_model.getKs();
m_shininess = m_model.getShininess();
}
void OpenGLWindow::initializeGL() {
abcg::glClearColor(0.06, 0.14, 0.26, 1);
// Enable depth buffering
abcg::glEnable(GL_DEPTH_TEST);
// Create program
m_program = createProgramFromFile(getAssetsPath() + "texture.vert",
getAssetsPath() + "texture.frag");
// Load model
loadModel(getAssetsPath() + "pine.obj");
m_mappingMode = 3; // "From mesh" option
m_ground.initializeGL(m_program);
}
void OpenGLWindow::paintGL() {
update();
// Clear color buffer and depth buffer
abcg::glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
abcg::glViewport(0, 0, m_viewportWidth, m_viewportHeight);
abcg::glUseProgram(m_program);
// Get location of uniform variables (could be precomputed)
const GLint viewMatrixLoc{abcg::glGetUniformLocation(m_program, "viewMatrix")};
const GLint projMatrixLoc{abcg::glGetUniformLocation(m_program, "projMatrix")};
const GLint modelMatrixLoc{abcg::glGetUniformLocation(m_program, "modelMatrix")};
const GLint shininessLoc{abcg::glGetUniformLocation(m_program, "shininess")};
const GLint IaLoc{abcg::glGetUniformLocation(m_program, "Ia")};
const GLint IdLoc{abcg::glGetUniformLocation(m_program, "Id")};
const GLint IsLoc{abcg::glGetUniformLocation(m_program, "Is")};
const GLint KaLoc{abcg::glGetUniformLocation(m_program, "Ka")};
const GLint KdLoc{abcg::glGetUniformLocation(m_program, "Kd")};
const GLint KsLoc{abcg::glGetUniformLocation(m_program, "Ks")};
const GLint diffuseTexLoc{abcg::glGetUniformLocation(m_program, "diffuseTex")};
const GLint mappingModeLoc{abcg::glGetUniformLocation(m_program, "mappingMode")};
// Set uniform variables for viewMatrix and projMatrix
// These matrices are used for every scene object
abcg::glUniformMatrix4fv(viewMatrixLoc, 1, GL_FALSE,
&m_camera.m_viewMatrix[0][0]);
abcg::glUniformMatrix4fv(projMatrixLoc, 1, GL_FALSE,
&m_camera.m_projMatrix[0][0]);
abcg::glUniform1i(diffuseTexLoc, 0);
abcg::glUniform1i(mappingModeLoc, m_mappingMode);
abcg::glUniform4fv(IaLoc, 1, &m_Ia.x);
abcg::glUniform4fv(IdLoc, 1, &m_Id.x);
abcg::glUniform4fv(IsLoc, 1, &m_Is.x);
// Draw pines
glm::mat4 model{1.0f};
for(float i = -5.0; i<5.0; i++){
for(float j = -5.0; j<5.0; j++){
model = glm::mat4(1.0);
model = glm::translate(model, glm::vec3(i, 0.0f, j));
model = glm::scale(model, glm::vec3(0.002f));
abcg::glUniformMatrix4fv(modelMatrixLoc, 1, GL_FALSE, &model[0][0]);
abcg::glUniform1f(shininessLoc, m_shininess);
abcg::glUniform4fv(KaLoc, 1, &m_Ka.x);
abcg::glUniform4fv(KdLoc, 1, &m_Kd.x);
abcg::glUniform4fv(KsLoc, 1, &m_Ks.x);
m_model.render(m_trianglesToDraw);
model = glm::mat4(1.0);
model = glm::translate(model, glm::vec3(i+0.5, 0.0f, j+0.5));
model = glm::scale(model, glm::vec3(0.0018f));
abcg::glUniformMatrix4fv(modelMatrixLoc, 1, GL_FALSE, &model[0][0]);
abcg::glUniform1f(shininessLoc, m_shininess);
abcg::glUniform4fv(KaLoc, 1, &m_Ka.x);
abcg::glUniform4fv(KdLoc, 1, &m_Kd.x);
abcg::glUniform4fv(KsLoc, 1, &m_Ks.x);
m_model.render(m_trianglesToDraw);
}
}
abcg::glBindVertexArray(0);
// Draw ground
m_ground.paintGL();
abcg::glUseProgram(0);
}
void OpenGLWindow::paintUI() {
// Parent class will show fullscreen button and FPS meter
abcg::OpenGLWindow::paintUI();
ImGui::Begin("Properties");
// Slider from 0.5f to 1.5f to control top view
ImGui::PushItemWidth(220);
ImGui::SliderFloat("Top View", &topView, 0.5f, 1.5f);
ImGui::PopItemWidth();
ImGui::Spacing();
ImGui::Text("Light properties");
ImGui::PushItemWidth(260);
ImGui::ColorEdit3("Ia", &m_Ia.x, ImGuiColorEditFlags_Float);
ImGui::ColorEdit3("Id", &m_Id.x, ImGuiColorEditFlags_Float);
ImGui::ColorEdit3("Is", &m_Is.x, ImGuiColorEditFlags_Float);
ImGui::PopItemWidth();
ImGui::Spacing();
ImGui::Text("Material properties");
// Slider to control material properties
ImGui::PushItemWidth(260);
ImGui::ColorEdit3("Ka", &m_Ka.x, ImGuiColorEditFlags_Float);
ImGui::ColorEdit3("Kd", &m_Kd.x, ImGuiColorEditFlags_Float);
ImGui::ColorEdit3("Ks", &m_Ks.x, ImGuiColorEditFlags_Float);
ImGui::PopItemWidth();
// Slider to control the specular shininess
ImGui::PushItemWidth(260);
ImGui::SliderFloat("", &m_shininess, 0.0f, 200.0f, "shininess: %.1f");
ImGui::PopItemWidth();
ImGui::End();
}
void OpenGLWindow::resizeGL(int width, int height) {
m_viewportWidth = width;
m_viewportHeight = height;
m_camera.computeProjectionMatrix(width, height);
}
void OpenGLWindow::terminateGL() {
m_ground.terminateGL();
m_model.terminateGL();
abcg::glDeleteProgram(m_program);
}
void OpenGLWindow::update() {
const float deltaTime{static_cast<float>(getDeltaTime())};
// Update LookAt camera
m_camera.truck(m_truckSpeed * deltaTime);
m_camera.pan(m_panSpeed * deltaTime);
m_camera.view(topView);
} | 30.355556 | 83 | 0.683748 | [
"mesh",
"render",
"object",
"model"
] |
c5faa571653ff90519d65225a6820d1552f0afce | 50,682 | cpp | C++ | Source Code/NEXTA-GUI/Dlg_ImportNetwork.cpp | OSADP/DTALite-AMS | 0779e0b3f1a423823b825b88237226a3216db960 | [
"Apache-2.0"
] | 1 | 2020-12-02T05:50:34.000Z | 2020-12-02T05:50:34.000Z | Source Code/NEXTA-GUI/Dlg_ImportNetwork.cpp | OSADP/DTALite-AMS | 0779e0b3f1a423823b825b88237226a3216db960 | [
"Apache-2.0"
] | null | null | null | Source Code/NEXTA-GUI/Dlg_ImportNetwork.cpp | OSADP/DTALite-AMS | 0779e0b3f1a423823b825b88237226a3216db960 | [
"Apache-2.0"
] | 2 | 2020-10-16T09:26:08.000Z | 2021-11-17T06:59:51.000Z | // TLiteDoc.h : interface of the CTLiteDoc class
//
// Portions Copyright 2010 Xuesong Zhou (xzhou99@gmail.com)
// If you help write or modify the code, please also list your names here.
// The reason of having Copyright info here is to ensure all the modified version, as a whole, under the GPL
// and further prevent a violation of the GPL.
// More about "How to use GNU licenses for your own software"
// http://www.gnu.org/licenses/gpl-howto.html
// This file is part of NeXTA Version 3 (Open-source).
// NEXTA is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// NEXTA is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with NEXTA. If not, see <http://www.gnu.org/licenses/>.
// Dlg_ImportNetwork.cpp : implementation file
//
#include "stdafx.h"
#include "TLite.h"
#include "Dlg_ImportNetwork.h"
#include "DlgSensorDataLoading.h"
#include "MainFrm.h"
#include "Shellapi.h"
#include "Data-Interface\\XLEzAutomation.h"
// CDlg_ImportNetwork dialog
IMPLEMENT_DYNAMIC(CDlg_ImportNetwork, CDialog)
CDlg_ImportNetwork::CDlg_ImportNetwork(CWnd* pParent /*=NULL*/)
: CDialog(CDlg_ImportNetwork::IDD, pParent)
, m_Edit_Excel_File(_T(""))
, m_Edit_Demand_CSV_File(_T(""))
, m_Sensor_File(_T(""))
, m_bRemoveConnectors(FALSE)
, m_AutogenerateNodeFlag(FALSE)
, m_ImportZoneData(TRUE)
, m_bAddConnectorsForIsolatedNodes(TRUE)
, m_bUseLinkTypeForDefaultValues(FALSE)
, m_bLinkMOECheck(TRUE)
, m_TMCSpeedCheck(TRUE)
, m_SensorCountCheck(TRUE)
{
m_bImportNetworkOnly = false;
}
CDlg_ImportNetwork::~CDlg_ImportNetwork()
{
}
void CDlg_ImportNetwork::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Text(pDX, IDC_EDIT_ExcelFile, m_Edit_Excel_File);
DDX_Control(pDX, IDC_LIST1, m_MessageList);
DDX_Check(pDX, IDC_CHECK_ZONE_DATA, m_ImportZoneData);
DDX_Check(pDX, IDC_CHECK_LINKMOE, m_bLinkMOECheck);
DDX_Check(pDX, IDC_CHECK_TMC_SPEED, m_TMCSpeedCheck);
DDX_Check(pDX, IDC_CHECK_SENSOR_COUNT, m_SensorCountCheck);
}
BEGIN_MESSAGE_MAP(CDlg_ImportNetwork, CDialog)
ON_BN_CLICKED(IDC_BUTTON_Find_Exel_File, &CDlg_ImportNetwork::OnBnClickedButtonFindExelFile)
ON_BN_CLICKED(IDC_BUTTON_Find_Demand_CSV_File, &CDlg_ImportNetwork::OnBnClickedButtonFindDemandCsvFile)
ON_BN_CLICKED(ID_IMPORT, &CDlg_ImportNetwork::OnBnClickedImport)
ON_BN_CLICKED(ID_IMPORT_Network_Only, &CDlg_ImportNetwork::OnBnClickedImportNetworkOnly)
ON_LBN_SELCHANGE(IDC_LIST1, &CDlg_ImportNetwork::OnLbnSelchangeList1)
ON_BN_CLICKED(ID_EXPORT_DATA, &CDlg_ImportNetwork::OnBnClickedExportData)
ON_BN_CLICKED(IDC_BUTTON_View_Sample_File, &CDlg_ImportNetwork::OnBnClickedButtonViewSampleFile)
ON_BN_CLICKED(IDC_BUTTON_Load_Sample_File, &CDlg_ImportNetwork::OnBnClickedButtonLoadSampleFile)
ON_BN_CLICKED(IDC_BUTTON_View_Sample_CSV_File, &CDlg_ImportNetwork::OnBnClickedButtonViewSampleCsvFile)
ON_BN_CLICKED(ID_IMPORT2, &CDlg_ImportNetwork::OnBnClickedImport2)
END_MESSAGE_MAP()
// CDlg_ImportNetwork message handlers
void CDlg_ImportNetwork::OnBnClickedButtonFindExelFile()
{
static char BASED_CODE szFilter[] = "Excel File (*.xlsx)|*.xlsx||";
CFileDialog dlg(TRUE, 0, 0, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
szFilter);
if(dlg.DoModal() == IDOK)
{
UpdateData(true);
m_Edit_Excel_File = dlg.GetPathName();
UpdateData(false);
}
}
void CDlg_ImportNetwork::OnBnClickedButtonFindDemandCsvFile()
{
static char BASED_CODE szFilter[] = "Demand CSV file (*.csv)|*.csv||";
CFileDialog dlg(TRUE, 0, 0, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
szFilter);
if(dlg.DoModal() == IDOK)
{
m_Edit_Demand_CSV_File = dlg.GetPathName();
UpdateData(false);
}
}
void CDlg_ImportNetwork::OnBnClickedButtonFindSensorFile()
{
}
void CDlg_ImportNetwork::OnBnClickedImport()
{
g_Simulation_Time_Horizon = 1440;
CWaitCursor cursor;
// Make sure the network is empty
m_pDoc->ClearNetworkData();
m_MessageList.ResetContent ();
UpdateData(true);
bool bExist=true;
CString str_msg;
UpdateData(true);
if(m_Edit_Excel_File.GetLength () ==0)
{
AfxMessageBox("Please first provide Excel file to be imported.");
return;
}
// Open the EXCEL file
std::string itsErrorMessage;
int aggregation_time_interval_in_min = 1;
CXLEzAutomation rsConfiguration;
if(rsConfiguration.OpenFile(m_Edit_Excel_File, "Configuration", 1))
{
int i = 1;
while(rsConfiguration.ReadRecord())
{
CString category= rsConfiguration.GetCString("category");
CString str_key= rsConfiguration.GetCString("key");
CString str_value= rsConfiguration.GetCString("value");
if(category.GetLength () == 0 ) // no category value being assigned
break;
if(category == "parameter")
{
if(str_key == "length_unit")
{
if(str_value.MakeLower()== "km")
{
m_pDoc->m_bUseMileVsKMFlag = false;
m_MessageList.AddString ("Unit of link length: km");
}
else //mile
{
m_pDoc->m_bUseMileVsKMFlag = true;
m_MessageList.AddString ("Unit of link length: mile");
}
}
if(str_key == "aggregation_time_interval_in_min")
{
aggregation_time_interval_in_min = max(1,atoi(str_value));
CString str;
str.Format("aggregation_time_interval_in_min=%d",aggregation_time_interval_in_min );
m_MessageList.AddString (str);
}
}
}
rsConfiguration.Close();
}
// detetect if nodes will be automatically generated.
CXLEzAutomation rsNode;
if(rsNode.OpenFile(m_Edit_Excel_File, "Node", 2))
{
int i = 0;
while(rsNode.ReadRecord())
{
int id = rsNode.GetLong("node_id",bExist,false);
if(!bExist)
{
m_MessageList.AddString ("Field node_id cannot be found in the node table.");
rsNode.Close();
return;
}
if(id < 0)
{
str_msg.Format ( "node_id: %d at row %d is invalid. Please check node table.", id, i+1);
m_MessageList.AddString (str_msg);
rsNode.Close();
return;
}
if(id == 0) // reading empty line
break;
double x;
double y;
int control_type = 0;
std::vector<CCoordinate> CoordinateVector;
CString geometry_str;
geometry_str= rsNode.GetCString("geometry");
if(geometry_str.GetLength () > 0 )
{
CT2CA pszConvertedAnsiString (geometry_str);
// construct a std::string using the LPCSTR input
std::string geo_string (pszConvertedAnsiString);
CGeometry geometry(geo_string);
CoordinateVector = geometry.GetCoordinateList();
if(CoordinateVector.size() >=1)
{
x = CoordinateVector[0].X;
y = CoordinateVector[0].Y;
}else
{
AfxMessageBox("Processing error in parsing geometry string in 1_node data sheet.");
return;
}
}else
{
x = rsNode.GetDouble("x",bExist,false);
if(!bExist)
{
m_MessageList.AddString ("Field x cannot be found in the node table.");
rsNode.Close();
return;
}
y = rsNode.GetDouble("y",bExist,false);
if(!bExist)
{
m_MessageList.AddString ("Field y cannot be found in the node table.");
rsNode.Close();
return;
}
}
// Create and insert the node
DTANode* pNode = new DTANode;
pNode->pt.x = x;
pNode->pt.y = y;
pNode->m_NodeNumber = id;
pNode->m_NodeNo = i;
pNode->m_ZoneID = 0;
pNode->m_ControlType = control_type;
m_pDoc->m_NodeSet.push_back(pNode);
m_pDoc->m_NodeNoMap[i] = pNode;
m_pDoc->m_NodeNotoNumberMap[i] = id;
m_pDoc->m_NodeNumberMap[id] = pNode;
m_pDoc->m_NodeNumbertoNodeNoMap[id] = i;
i++;
} // end of while
rsNode.Close();
}else
{
str_msg.Format ( "Worksheet node cannot be found in the given Excel file");
m_MessageList.AddString (str_msg);
return;
}
int connector_link_type = 0 ;
//// Read record
// CXLEzAutomation rsLinkType;
// rsLinkType.Open(dbOpenDynaset, strSQL);
// while(!rsLinkType.ReadRecord())
// {
// DTALinkType element;
// int link_type_number = rsLinkType.GetLong("link_type",bExist,false);
// if(!bExist)
// {
// CString Message;
// Message.Format("Field link_type cannot be found in the link-type sheeet.");
// m_MessageList.AddString (Message);
// return;
// }
// if(link_type_number ==0)
// break;
// element.link_type = link_type_number;
// element.link_type_name = rsLinkType.GetCString("link_type_name"));
// element.type_code = rsLinkType.GetCString ("type_code"));
// if(element.type_code.find("c") != string::npos)
// connector_link_type = element.link_type;
// element.default_lane_capacity = rsLinkType.GetLong("default_lane_capacity",bExist,false);
// element.default_speed = rsLinkType.GetFloat ("default_speed_limit"));
// element.default_number_of_lanes = rsLinkType.GetLong ("default_number_of_lanes",bExist,false);
// m_pDoc->m_LinkTypeMap[element.link_type] = element;
// rsLinkType.MoveNext ();
// }
// rsLinkType.Close();
// str_msg.Format ("%d link type definitions imported.",m_pDoc->m_LinkTypeMap.size());
// m_MessageList.AddString(str_msg);
//}else
//{
// str_msg.Format ( "Worksheet 2-1-link-type cannot be found in the given Excel file");
// m_MessageList.AddString (str_msg);
// return;
//}
//if(m_pDoc->m_NodeSet.size() == 0 && m_AutogenerateNodeFlag == true)
//{
// str_msg.Format ( "Worksheet 1-node contain 0 node.");
// m_MessageList.AddString (str_msg);
// str_msg.Format ( "The geometry field in the link table is used to generate node info.");
// m_MessageList.AddString (str_msg);
//}else
//{
// str_msg.Format ( "%d nodes have been successfully imported.",m_pDoc->m_NodeSet.size());
// m_MessageList.AddString (str_msg);
//}
/////////////////////////////////////////////////////////////////////
// // Read record to obtain the overall max and min x and y;
//double min_x = 0;
//double max_x = 0;
//double min_y = 0;
//double max_y = 0;
//bool b_RectangleInitialized = false;
//if(m_AutogenerateNodeFlag)
//{
// CXLEzAutomation rsLink;
// rsLink.Open(dbOpenDynaset, strSQL);
// int from_node_id;
// int to_node_id ;
// while(!rsLink.ReadRecord())
// {
// std::vector<CCoordinate> CoordinateVector;
// CString geometry_str;
// geometry_str= rsLink.GetCString("geometry",false);
// if(m_AutogenerateNodeFlag && geometry_str.GetLength () ==0)
// {
// m_MessageList.AddString("Field geometry cannot be found in the link table. This is required when no node info is given.");
// rsLink.Close();
// return;
// }
// if(geometry_str.GetLength () > 0)
// {
// CT2CA pszConvertedAnsiString (geometry_str);
// // construct a std::string using the LPCSTR input
// std::string geo_string (pszConvertedAnsiString);
// CGeometry geometry(geo_string);
// CoordinateVector = geometry.GetCoordinateList();
// if(b_RectangleInitialized==false && CoordinateVector.size()>=1)
// {
//
// min_x = max_x = CoordinateVector[0].X;
// min_y = max_y = CoordinateVector[0].Y;
// b_RectangleInitialized = true;
// }else
// {
// min_x= min(min_x,CoordinateVector[0].X);
// min_x= min(min_x,CoordinateVector[CoordinateVector.size()-1].X);
// min_y= min(min_y,CoordinateVector[0].Y);
// min_y= min(min_y,CoordinateVector[CoordinateVector.size()-1].Y);
// max_x= max(max_x,CoordinateVector[0].X);
// max_x= max(max_x,CoordinateVector[CoordinateVector.size()-1].X);
// max_y= max(max_y,CoordinateVector[0].Y);
// max_y= max(max_y,CoordinateVector[CoordinateVector.size()-1].Y);
//
// }
// }
//
// // TRACE("reading line %d\n", line_no);
// }
// rsLink.Close();
// }
//}
// double min_distance_threadshold_for_overlapping_nodes = ((max_y- min_y) + (max_x - min_x))/100000.0;
double min_distance_threadshold_for_overlapping_nodes = 0.0001;
/////////////////////////////////////////////////////////////////////
// Read record
bool b_default_number_of_lanes_used = false;
bool b_default_lane_capacity_used = false;
int number_of_records_read = 0;
int line_no = 2;
m_pDoc->m_bLinkToBeShifted = true;
CXLEzAutomation rsLink;
if(rsLink.OpenFile(m_Edit_Excel_File, "Link", 3))
{
int i = 0;
float default_distance_sum = 0;
float length_sum = 0;
int from_node_id;
int to_node_id ;
while(rsLink.ReadRecord())
{
if(m_AutogenerateNodeFlag == false)
{
from_node_id = rsLink.GetLong("from_node_id",bExist,false);
if(!bExist )
{
if(m_pDoc->m_LinkSet.size() ==0)
{
// no link has been loaded
m_MessageList.AddString ("Field from_node_id cannot be found in the link table.");
rsLink.Close();
return;
}else
{
break;
// moveon
}
}else
{
if(from_node_id == 0 && m_pDoc->m_LinkSet.size() ==0)
{
m_MessageList.AddString ("Field from_node_id has no valid data in the link table.");
AfxMessageBox("Field from_node_id has no valid data in the link table.\n");
rsLink.Close();
break;
}
}
to_node_id = rsLink.GetLong("to_node_id",bExist,false);
if(!bExist)
{
m_MessageList.AddString("Field to_node_id cannot be found in the link table.");
rsLink.Close();
return;
}
if(from_node_id==0 && to_node_id ==0) // test twice here for from and to nodes
break;
}
long link_id = rsLink.GetLong("link_id",bExist,false);
if(!bExist)
link_id = 0;
int type = rsLink.GetLong("link_type",bExist,false);
if(!bExist)
{
str_msg.Format("Field link_type cannot be found or has no value at row %d in the link sheet. Skip record.", line_no);
m_MessageList.AddString(str_msg);
continue;
}
if(m_AutogenerateNodeFlag == false && m_pDoc->m_NodeNumbertoNodeNoMap.find(from_node_id)== m_pDoc->m_NodeNumbertoNodeNoMap.end())
{
str_msg.Format("from_node_id %d at row %d cannot be found in the link sheet!",from_node_id, line_no);
m_MessageList.AddString(str_msg);
continue;
}
if(m_AutogenerateNodeFlag == false && m_pDoc->m_NodeNumbertoNodeNoMap.find(to_node_id)== m_pDoc->m_NodeNumbertoNodeNoMap.end())
{
str_msg.Format("to_node_id %d at row %d cannot be found in the link sheet!",to_node_id, line_no);
m_MessageList.AddString(str_msg);
continue;
}
CString SpeedSensorID_str;
SpeedSensorID_str= rsLink.GetCString("speed_sensor_id");
CString CountSensorID_str;
CountSensorID_str= rsLink.GetCString("count_sensor_id");
CString link_key_str;
link_key_str= rsLink.GetCString("link_key");
std::vector<CCoordinate> CoordinateVector;
CString geometry_str;
geometry_str= rsLink.GetCString("geometry");
if(m_AutogenerateNodeFlag && geometry_str.GetLength () ==0)
{
m_MessageList.AddString("Field geometry cannot be found in the link table. This is required when no node info is given.");
rsLink.Close();
return;
}
if(geometry_str.GetLength () > 0)
{
CT2CA pszConvertedAnsiString (geometry_str);
// construct a std::string using the LPCSTR input
std::string geo_string (pszConvertedAnsiString);
CGeometry geometry(geo_string);
CoordinateVector = geometry.GetCoordinateList();
if(m_AutogenerateNodeFlag&& CoordinateVector.size() > 0) // add nodes
{
from_node_id = m_pDoc->FindNodeNumberWithCoordinate(CoordinateVector[0].X,CoordinateVector[0].Y,min_distance_threadshold_for_overlapping_nodes);
// from node
if(from_node_id == 0)
{
GDPoint pt;
pt.x = CoordinateVector[0].X;
pt.y = CoordinateVector[0].Y;
bool ActivityLocationFlag = false;
if(m_pDoc->m_LinkTypeMap[type ].IsConnector ()) // adjacent node of connectors
ActivityLocationFlag = true;
DTANode* pNode = m_pDoc->AddNewNode(pt, from_node_id, 0,ActivityLocationFlag);
from_node_id = pNode->m_NodeNumber; // update to_node_id after creating new node
pNode->m_bCreatedbyNEXTA = true;
}
// to node
to_node_id = m_pDoc->FindNodeNumberWithCoordinate(CoordinateVector[CoordinateVector.size()-1].X,CoordinateVector[CoordinateVector.size()-1].Y,min_distance_threadshold_for_overlapping_nodes);
// from node
if(to_node_id==0)
{
GDPoint pt;
pt.x = CoordinateVector[CoordinateVector.size()-1].X;
pt.y = CoordinateVector[CoordinateVector.size()-1].Y;
bool ActivityLocationFlag = false;
if(m_pDoc->m_LinkTypeMap[type ].IsConnector ()) // adjacent node of connectors
ActivityLocationFlag = true;
DTANode* pNode = m_pDoc->AddNewNode(pt, to_node_id, 0,ActivityLocationFlag);
to_node_id = pNode->m_NodeNumber; // update to_node_id after creating new node
pNode->m_bCreatedbyNEXTA = true;
}
}
}
if(m_bRemoveConnectors && m_pDoc->m_LinkTypeMap[type ].IsConnector())
{ // skip connectors
continue;
}
DTALink* pExistingLink = m_pDoc->FindLinkWithNodeIDs(m_pDoc->m_NodeNumbertoNodeNoMap[from_node_id],m_pDoc->m_NodeNumbertoNodeNoMap[to_node_id]);
if(pExistingLink)
{
str_msg.Format ("Link %d-> %d at row %d is duplicated with the previous link at row %d.\n", from_node_id,to_node_id, line_no, pExistingLink->input_line_no);
if(m_MessageList.GetCount () < 3000) // not adding and showing too many links
{
m_MessageList.AddString (str_msg);
continue;
}
}
float length = rsLink.GetDouble("length",bExist,false);
if(!bExist)
{
m_MessageList.AddString ("Field length cannot be found in the link table.");
rsLink.Close();
return;
}
if(length > 100)
{
str_msg.Format("The length of link %d -> %d is longer than 100 miles, please ensure the unit of link length in the link sheet is mile.",from_node_id,to_node_id);
m_MessageList.AddString(str_msg);
rsLink.Close();
return;
}
int number_of_lanes = rsLink.GetLong("number_of_lanes",bExist,false);
if(m_bUseLinkTypeForDefaultValues)
{
if(number_of_lanes<1)
{
if(m_pDoc->m_LinkTypeMap.find(type) != m_pDoc->m_LinkTypeMap.end())
{
number_of_lanes = m_pDoc->m_LinkTypeMap[type].default_number_of_lanes;
if(b_default_number_of_lanes_used)
{
m_MessageList.AddString("Field number_of_lanes cannot be found in the link table.");
m_MessageList.AddString("default_number_of_lanes from 2-link-type table is used.");
b_default_number_of_lanes_used =true;
}
}else
{
CString link_type_str = rsLink.GetCString("link_type");
if(m_pDoc->m_LinkTypeMap.size()>0)
{
std::map<int, DTALinkType>::iterator iter = m_pDoc->m_LinkTypeMap.begin ();
type = iter->first;
}
CString link_type_message;
link_type_message.Format ("link type %s for link %->%d is invald.", link_type_str);
m_MessageList.AddString(link_type_message);
}
}else
{
m_MessageList.AddString("Field number_of_lanes cannot be found in the link table.");
m_MessageList.AddString("default_number_of_lanes for this link type has not been defined in link_type table.");
rsLink.Close();
return;
}
}
if(number_of_lanes <=0)
{
str_msg.Format ("number of lanes for link %d -> %d <= 0. Skip.",from_node_id,to_node_id);
m_MessageList.AddString(str_msg);
continue;
}
float grade= 0;
float speed_limit_in_mph= rsLink.GetLong("speed_limit",bExist,false);
if(speed_limit_in_mph <1 && m_bUseLinkTypeForDefaultValues)
{
if(m_pDoc->m_LinkTypeMap.find(type) != m_pDoc->m_LinkTypeMap.end())
{
speed_limit_in_mph = m_pDoc->m_LinkTypeMap[type].default_speed ;
bExist = true;
}
}
if(!bExist)
{
AfxMessageBox("Field speed_limit_in_mph cannot be found in the link table.");
rsLink.Close();
return;
}
if(speed_limit_in_mph ==0)
{
str_msg.Format ("Link %d -> %d has a speed limit of 0. Skip.",from_node_id,to_node_id);
m_MessageList.AddString(str_msg);
continue;
}
float capacity_in_pcphpl= rsLink.GetDouble("lane_capacity_per_hour",bExist,false);
if(capacity_in_pcphpl<0.1 && m_bUseLinkTypeForDefaultValues)
{
if(m_pDoc->m_LinkTypeMap.find(type) != m_pDoc->m_LinkTypeMap.end())
{
capacity_in_pcphpl = m_pDoc->m_LinkTypeMap[type].default_lane_capacity ;
if(b_default_lane_capacity_used)
{
m_MessageList.AddString("Field capacity_in_veh_per_hour_per_lane cannot be found in the link table.");
m_MessageList.AddString("default_lane_capacity from 2-link-type table is used.");
b_default_lane_capacity_used =true;
}
}
}
if(capacity_in_pcphpl<0)
{
str_msg.Format ( "Link %d -> %d has a negative capacity, please sort the link table by capacity_in_veh_per_hour_per_lane and re-check it!",from_node_id,to_node_id);
AfxMessageBox(str_msg, MB_ICONINFORMATION);
rsLink.Close();
return;
}
int direction = rsLink.GetLong("direction",bExist,false);
if(!bExist)
{
m_MessageList.AddString("Field direction cannot be found in the link table.");
rsLink.Close();
return;
}
CString name = rsLink.GetCString("name");
float k_jam, wave_speed_in_mph;
if(type==1)
{
k_jam = 220;
}else
{
k_jam = 190;
}
wave_speed_in_mph = 12;
int m_SimulationHorizon = 1;
int link_code_start = 1;
int link_code_end = 1;
if (direction == -1) // reversed
{
link_code_start = 2; link_code_end = 2;
}
if (direction == 0 || direction ==2) // two-directional link
{
link_code_start = 1; link_code_end = 2;
}
if(m_AutogenerateNodeFlag == false)
{
// no geometry information
CCoordinate cc_from, cc_to;
cc_from.X = m_pDoc->m_NodeNoMap[m_pDoc->m_NodeNumbertoNodeNoMap[from_node_id]]->pt.x;
cc_from.Y = m_pDoc->m_NodeNoMap[m_pDoc->m_NodeNumbertoNodeNoMap[from_node_id]]->pt.y;
cc_to.X = m_pDoc->m_NodeNoMap[m_pDoc->m_NodeNumbertoNodeNoMap[to_node_id]]->pt.x;
cc_to.Y = m_pDoc->m_NodeNoMap[m_pDoc->m_NodeNumbertoNodeNoMap[to_node_id]]->pt.y;
CoordinateVector.push_back(cc_from);
CoordinateVector.push_back(cc_to);
}
for(int link_code = link_code_start; link_code <=link_code_end; link_code++)
{
bool bNodeNonExistError = false;
int m_SimulationHorizon = 1;
DTALink* pLink = new DTALink(m_SimulationHorizon);
pLink->m_LinkNo = i;
pLink->m_Name = name;
pLink->m_OrgDir = direction;
pLink->m_LinkID = link_id;
pLink->m_SpeedSensorID = m_pDoc->CString2StdString(SpeedSensorID_str);
pLink->m_LinkKey = link_key_str;
pLink->m_CountSensorID = m_pDoc->CString2StdString(CountSensorID_str);
m_pDoc->m_LinkKeyMap[link_key_str] = pLink;
m_pDoc->m_SpeedSensorIDMap[pLink->m_SpeedSensorID ] = pLink;
m_pDoc->m_CountSensorIDMap[pLink->m_CountSensorID ] = pLink;
pLink->ResetMOEAry(g_Simulation_Time_Horizon); // use one day horizon as the default value
if(link_code == 1) //AB link
{
pLink->m_FromNodeNumber = from_node_id;
pLink->m_ToNodeNumber = to_node_id;
pLink->m_Direction = 1;
pLink->m_FromNodeID = m_pDoc->m_NodeNumbertoNodeNoMap[from_node_id];
pLink->m_ToNodeID= m_pDoc->m_NodeNumbertoNodeNoMap[to_node_id];
for(unsigned si = 0; si < CoordinateVector.size(); si++)
{
GDPoint pt;
pt.x = CoordinateVector[si].X;
pt.y = CoordinateVector[si].Y;
pLink->m_ShapePoints .push_back (pt);
}
}
if(link_code == 2) //BA link
{
pLink->m_FromNodeNumber = to_node_id;
pLink->m_ToNodeNumber = from_node_id;
pLink->m_Direction = 1;
pLink->m_FromNodeID = m_pDoc->m_NodeNumbertoNodeNoMap[to_node_id];
pLink->m_ToNodeID= m_pDoc->m_NodeNumbertoNodeNoMap[from_node_id];
for(int si = CoordinateVector.size()-1; si >=0; si--) // we need to put int here as si can be -1.
{
GDPoint pt;
pt.x = CoordinateVector[si].X;
pt.y = CoordinateVector[si].Y;
pLink->m_ShapePoints .push_back (pt);
}
}
pLink->m_NumberOfLanes= number_of_lanes;
pLink->m_SpeedLimit= speed_limit_in_mph;
pLink->m_avg_simulated_speed = pLink->m_SpeedLimit;
pLink->m_Length= length; // minimum distance
if(length < 0.00001) // zero value in length field, we consider no length info.
{
float distance_in_mile = g_CalculateP2PDistanceInMileFromLatitudeLongitude(pLink->m_ShapePoints[0], pLink->m_ShapePoints[pLink->m_ShapePoints.size()-1]);
pLink->m_Length = distance_in_mile;
}
default_distance_sum+= pLink->DefaultDistance();
length_sum += pLink ->m_Length;
pLink->m_FreeFlowTravelTime = pLink->m_Length / max(1,pLink->m_SpeedLimit) *60.0f;
pLink->m_StaticTravelTime = pLink->m_FreeFlowTravelTime;
pLink->m_MaximumServiceFlowRatePHPL= capacity_in_pcphpl;
pLink->m_LaneCapacity = pLink->m_MaximumServiceFlowRatePHPL;
pLink->m_link_type= type;
pLink->m_Grade = grade;
if(link_code == 2) //BA link
{
int R_number_of_lanes = number_of_lanes;
float R_speed_limit_in_mph= speed_limit_in_mph;
float R_lane_capacity_in_vhc_per_hour= capacity_in_pcphpl;
float R_grade= grade;
pLink->m_NumberOfLanes= R_number_of_lanes;
pLink->m_SpeedLimit= R_speed_limit_in_mph;
pLink->m_MaximumServiceFlowRatePHPL= R_lane_capacity_in_vhc_per_hour;
pLink->m_Grade = R_grade;
pLink->m_avg_simulated_speed = pLink->m_SpeedLimit;
pLink->m_Length= max(length, pLink->m_SpeedLimit*0.1f/60.0f); // minimum distance
pLink->m_FreeFlowTravelTime = pLink->m_Length / max(1,pLink->m_SpeedLimit) *60.0f;
pLink->m_StaticTravelTime = pLink->m_FreeFlowTravelTime;
pLink->m_LaneCapacity = pLink->m_MaximumServiceFlowRatePHPL;
pLink->m_link_type= type;
}
double BPR_alpha_term = 0.15;
double BPR_beta_term = 4;
double transit_transfer_time_in_min = 1;
double transit_waiting_time_in_min = 3;
double transit_fare = 1;
BPR_alpha_term = rsLink.GetDouble("BPR_alpha_term",bExist,false);
if(BPR_alpha_term > 0.000001)
pLink->m_BPR_alpha_term = BPR_alpha_term;
BPR_beta_term = rsLink.GetDouble("BPR_beta_term",bExist,false);
if(BPR_beta_term > 0.00000001)
pLink->m_BPR_beta_term = BPR_beta_term;
pLink->m_total_link_volume = rsLink.GetDouble("static_volume_per_hour",bExist,false);
if(pLink->m_total_link_volume >=1)
{
pLink->m_avg_simulated_speed = rsLink.GetDouble("static_speed_per_hour",bExist,false);
}else
{
pLink->m_avg_simulated_speed = pLink->m_SpeedLimit ;
}
pLink->m_Kjam = k_jam;
pLink->m_Wave_speed_in_mph = wave_speed_in_mph;
m_pDoc->m_NodeNoMap[pLink->m_FromNodeID ]->m_TotalCapacity += (pLink->m_MaximumServiceFlowRatePHPL* pLink->m_NumberOfLanes);
pLink->m_FromPoint = m_pDoc->m_NodeNoMap[pLink->m_FromNodeID]->pt;
pLink->m_ToPoint = m_pDoc->m_NodeNoMap[pLink->m_ToNodeID]->pt;
// pLink->SetupMOE();
pLink->input_line_no = line_no;
m_pDoc->m_LinkSet.push_back (pLink);
m_pDoc->m_LinkNoMap[i] = pLink;
unsigned long LinkKey = m_pDoc->GetLinkKey( pLink->m_FromNodeID, pLink->m_ToNodeID);
m_pDoc->m_NodeNotoLinkMap[LinkKey] = pLink;
__int64 LinkKey2 = m_pDoc->GetLink64Key(pLink-> m_FromNodeNumber,pLink->m_ToNodeNumber);
m_pDoc->m_NodeNumbertoLinkMap[LinkKey2] = pLink;
m_pDoc->m_LinkNotoLinkMap[i] = pLink;
m_pDoc->m_LinkIDtoLinkMap[link_id] = pLink;
m_pDoc->m_NodeNoMap[pLink->m_FromNodeID ]->m_Connections+=1;
m_pDoc->m_NodeNoMap[pLink->m_ToNodeID ]->m_Connections+=1;
if(m_pDoc->m_LinkTypeMap[type ].IsConnector ()) // adjacent node of connectors
{
// mark them as activity location
m_pDoc->m_NodeNoMap[pLink->m_FromNodeID ]->m_bZoneActivityLocationFlag = true;
m_pDoc->m_NodeNoMap[pLink->m_ToNodeID ]->m_bZoneActivityLocationFlag = true;
}
m_pDoc->m_NodeNoMap[pLink->m_FromNodeID ]->m_OutgoingLinkVector.push_back(i);
m_pDoc->m_NodeNoMap[pLink->m_ToNodeID ]->m_IncomingLinkVector.push_back(i);
if(m_pDoc->m_LinkTypeMap[pLink->m_link_type].IsConnector () == false )
m_pDoc->m_NodeNoMap[pLink->m_ToNodeID ]->m_IncomingNonConnectors++;
i++;
}
// TRACE("reading line %d\n", line_no);
line_no ++;
number_of_records_read ++;
}
rsLink.Close();
m_pDoc->m_UnitMile = 1.0f;
if(length_sum>0.000001f)
m_pDoc->m_UnitMile= default_distance_sum /length_sum;
double AvgLinkLength = length_sum / max(1,m_pDoc->m_LinkSet.size());
if(m_pDoc->m_bUseMileVsKMFlag)
{
m_pDoc->m_UnitFeet = m_pDoc->m_UnitMile/5280.0f;
m_pDoc->m_NodeDisplaySize = max(100, AvgLinkLength*5280*0.05); // in feet
}
else
{
m_pDoc->m_UnitFeet = m_pDoc->m_UnitMile/1000*3.28084f; // meter to feet
m_pDoc->m_NodeDisplaySize = max(100, AvgLinkLength/1.61*5280*0.05); // in feet
}
m_pDoc->GenerateOffsetLinkBand();
/*
if(m_UnitMile>50) // long/lat must be very large and greater than 62!
{
if(AfxMessageBox("Is the long/lat coordinate system used in this data set?", MB_YESNO) == IDYES)
{
m_LongLatCoordinateFlag = true;
m_UnitFeet = m_UnitMile/62/5280.0f; // 62 is 1 long = 62 miles
}
}
*/
m_pDoc->OffsetLink();
}else
{
str_msg.Format ( "Worksheet Link cannot be found in the given Excel file");
m_MessageList.AddString (str_msg);
return;
}
str_msg.Format ( "%d nodes have been successfully imported.",m_pDoc->m_NodeSet.size());
m_MessageList.AddString (str_msg);
str_msg.Format ("%d links have been successfully imported from %d records.",m_pDoc->m_LinkSet.size(),number_of_records_read);
m_MessageList.AddString(str_msg);
// test if we need to add connectors for isolated nodes
m_bAddConnectorsForIsolatedNodes = false;
{
for (std::list<DTANode*>::iterator iNode = m_pDoc->m_NodeSet.begin(); iNode != m_pDoc->m_NodeSet.end(); iNode++)
{
if((*iNode)->m_bCreatedbyNEXTA == false)
{
if((*iNode)->m_Connections ==0)
{
m_bAddConnectorsForIsolatedNodes = true;
str_msg.Format ("There are isoluated nodes in node table. Connectors will be added automatically.");
m_MessageList.AddString(str_msg);
break;
}
}
}
}
if(m_bAddConnectorsForIsolatedNodes)
{
if(connector_link_type == 0)
{
AfxMessageBox("The link type for connectors has not been defined.");
return;
}
m_pDoc->m_DefaultSpeedLimit = 10;
m_pDoc->m_DefaultCapacity = 10000;
m_pDoc->m_DefaultLinkType = connector_link_type; //connector
int number_of_new_connectors = 0;
for (std::list<DTANode*>::iterator iNode = m_pDoc->m_NodeSet.begin(); iNode != m_pDoc->m_NodeSet.end(); iNode++)
{
if((*iNode)->m_Connections == 0)
{
int NodeNumber = m_pDoc->FindNonCentroidNodeNumberWithCoordinate((*iNode)->pt .x ,(*iNode)->pt .y , (*iNode)->m_NodeNumber);
m_pDoc->AddNewLinkWithNodeNumbers((*iNode)->m_NodeNumber , NodeNumber);
m_pDoc->AddNewLinkWithNodeNumbers(NodeNumber,(*iNode)->m_NodeNumber);
number_of_new_connectors ++;
}
}
str_msg.Format ("%d connectors have been successfully created",number_of_new_connectors);
m_MessageList.AddString(str_msg);
}
//test if activity location has been defined
// activity location table
//bool bNodeNonExistError = false;
m_pDoc->m_NodeNotoZoneNameMap.clear ();
bool bNodeNonExistError = false;
m_pDoc->m_NodeNotoZoneNameMap.clear ();
m_pDoc->m_ODSize = 0;
// Read record
int activity_location_count = 0;
CXLEzAutomation rsActivityLocation;
rsActivityLocation.OpenFile(m_Edit_Excel_File, "ActivityLocation", 5);
while(rsActivityLocation.ReadRecord())
{
int zone_number = rsActivityLocation.GetLong("zone_id",bExist,false);
if(zone_number <=0)
break;
int node_name = rsActivityLocation.GetLong("node_id",bExist,false);
map <int, int> :: const_iterator m_Iter = m_pDoc->m_NodeNumbertoNodeNoMap.find(node_name);
if(m_Iter == m_pDoc->m_NodeNumbertoNodeNoMap.end( ))
{
CString m_Warning;
m_Warning.Format("Node ID %d in the ActivityLocation sheet has not been defined in the Node sheet", node_name);
AfxMessageBox(m_Warning);
return;
}
m_pDoc->m_NodeNotoZoneNameMap[m_pDoc->m_NodeNumbertoNodeNoMap[node_name]] = zone_number;
m_pDoc->m_NodeNoMap [ m_pDoc->m_NodeNumbertoNodeNoMap[node_name] ] ->m_bZoneActivityLocationFlag = true;
m_pDoc->m_NodeNoMap [ m_pDoc->m_NodeNumbertoNodeNoMap[node_name] ] -> m_ZoneID = zone_number;
// if there are multiple nodes for a zone, the last node id is recorded.
DTAActivityLocation element;
element.ZoneID = zone_number;
element.NodeNumber = node_name;
element.External_OD_flag = rsActivityLocation.GetLong("external_OD_flag",bExist,false);
element.ActivityType = rsActivityLocation.GetCString ("activity_type");
m_pDoc->m_ZoneMap [zone_number].m_ActivityLocationVector .push_back (element);
if(m_pDoc->m_ODSize < zone_number)
m_pDoc->m_ODSize = zone_number;
activity_location_count++;
}
rsActivityLocation.Close();
str_msg.Format ( "%d activity location records imported.",activity_location_count);
m_MessageList.AddString (str_msg);
CXLEzAutomation rsZone;
int count = 0;
if(rsZone.OpenFile(m_Edit_Excel_File, "Zone", 4))
{
while(rsZone.ReadRecord())
{
int zone_number = rsZone.GetLong("zone_id",bExist,false);
if(!bExist)
{
AfxMessageBox("Field zone_id cannot be found in the zone table.");
return;
}
if(zone_number ==0)
break;
// if there are multiple nodes for a zone, the last node id is recorded.
std::vector<CCoordinate> CoordinateVector;
CString geometry_str = rsZone.GetCString("geometry");
if(geometry_str.GetLength () > 0)
{
CT2CA pszConvertedAnsiString (geometry_str);
// construct a std::string using the LPCSTR input
std::string geo_string (pszConvertedAnsiString);
CGeometry geometry(geo_string);
CoordinateVector = geometry.GetCoordinateList();
m_pDoc->m_ZoneMap [zone_number].m_ZoneID = zone_number;
for(unsigned int f = 0; f < CoordinateVector.size(); f++)
{
GDPoint pt;
pt.x = CoordinateVector[f].X;
pt.y = CoordinateVector[f].Y;
m_pDoc->m_ZoneMap [zone_number].m_ShapePoints.push_back (pt);
}
}
if(m_pDoc->m_ODSize < zone_number)
m_pDoc->m_ODSize = zone_number;
count++;
}
rsZone.Close();
str_msg.Format ( "%d zone boundary records are imported.",count);
m_MessageList.AddString (str_msg);
}
// assign zone numbers to connectors
if(count>=1) // with boundary
{
std::list<DTALink*>::iterator iLink;
for (iLink = m_pDoc->m_LinkSet.begin(); iLink != m_pDoc->m_LinkSet.end(); iLink++)
{
if(m_pDoc->m_LinkTypeMap[(*iLink)->m_link_type ].IsConnector ()) // connectors
{
GDPoint pt_from = (*iLink)->m_FromPoint ;
int ZoneID_from = m_pDoc->GetZoneID(pt_from);
// assign id according to upstream node zone number first
int ZoneID_to = 0;
if(ZoneID_from <=0)
{
GDPoint pt_to = (*iLink)->m_ToPoint ;
ZoneID_to = m_pDoc->GetZoneID(pt_to);
}
// assign id according to downstream node zone number second
int ZoneID = max(ZoneID_from, ZoneID_to); // get large zone id under two different zone numbers
if(ZoneID > 0)
(*iLink)->m_ConnectorZoneID = ZoneID;
}
}
}
// determine activity locations if no activity locations have been provided
if(activity_location_count == 0)
{
std::list<DTANode*>::iterator iNode;
for (iNode = m_pDoc->m_NodeSet.begin(); iNode != m_pDoc->m_NodeSet.end(); iNode++)
{
if((*iNode )->m_bZoneActivityLocationFlag)
{
int ZoneID = m_pDoc->GetZoneID((*iNode)->pt);
if(ZoneID>0)
{
(*iNode )->m_ZoneID = ZoneID;
DTAActivityLocation element;
element.ZoneID = ZoneID;
element.NodeNumber = (*iNode )->m_NodeNumber;
m_pDoc->m_ZoneMap [ZoneID].m_ActivityLocationVector .push_back (element );
}
}
}
str_msg.Format ( "%d activity locations identified",activity_location_count);
m_MessageList.AddString (str_msg);
}
if(m_bRemoveConnectors)
{
std::list<DTANode*>::iterator iNode;
std::vector <int> CentroidVector;
for (iNode = m_pDoc->m_NodeSet.begin(); iNode != m_pDoc->m_NodeSet.end(); iNode++)
{
if((*iNode )->m_bZoneActivityLocationFlag && (*iNode )->m_Connections ==0) // has been as activity location but no link connected
CentroidVector.push_back((*iNode )->m_NodeNo );
}
for(unsigned int i = 0; i < CentroidVector.size(); i++)
{
m_pDoc->DeleteNode (CentroidVector[i]);
}
str_msg.Format ( "%d centroids deleted",CentroidVector.size());
m_MessageList.AddString (str_msg);
}
//import demand
int demand_type = 0;
if(m_ImportZoneData)
{
m_pDoc->m_DemandMatrixMap .clear ();
CXLEzAutomation rsDemand;
if(rsDemand.OpenFile(m_Edit_Excel_File, "DemandMatrix", 6))
{
while(rsDemand.ReadRecord())
{
int from_zone_id = rsDemand.GetLong("zone_id",bExist,false);
if(from_zone_id==0)
{
break;
}
if(m_pDoc-> m_ZoneMap.find(from_zone_id)== m_pDoc->m_ZoneMap.end())
{
CString message;
message.Format("from_zone_id %d in the demand matrix has not been defined.", from_zone_id );
AfxMessageBox(message);
break;
}
int to_zone_id = 0;
std::map<int, DTAZone> :: const_iterator itr;
int to_zone_index = 1;
for(itr = m_pDoc->m_ZoneMap.begin(); itr != m_pDoc->m_ZoneMap.end(); itr++,to_zone_index++)
{
to_zone_id = itr->first;
CString str;
str.Format ("%d",to_zone_id);
std::string to_zone_str = m_pDoc->CString2StdString(str);
float number_of_vehicles = rsDemand.GetDouble(to_zone_str,bExist,false);
if(number_of_vehicles < -0.1)
{
CString message;
message.Format("number_of_vehicles %f in the demand matrix is invalid.", number_of_vehicles);
AfxMessageBox(message);
break;
}
m_pDoc->SetODDemandValue (1,from_zone_id,to_zone_id,number_of_vehicles);
} // for all to zone id
}
rsDemand.Close();
str_msg.Format ( "%d demand element records imported.", m_pDoc->m_DemandMatrixMap.size());
m_MessageList.AddString (str_msg);
}
}
/// simulation Link MOE
if(m_bLinkMOECheck)
{
CXLEzAutomation rsModelLinkMOE;
if(rsModelLinkMOE.OpenFile(m_Edit_Excel_File, "ModelLinkMOE", 7))
{
g_Simulation_Time_Horizon = 1440;
for (std::list<DTALink*>::iterator iLink = m_pDoc->m_LinkSet.begin(); iLink != m_pDoc->m_LinkSet.end(); iLink++)
{
(*iLink)->ResetMOEAry(g_Simulation_Time_Horizon); // use one day horizon as the default value
}
int count = 0;
while(rsModelLinkMOE.ReadRecord())
{
CString link_key = rsModelLinkMOE.GetCString("link_key");
if(link_key.GetLength ()==0)
{
break;
}
if(m_pDoc->m_LinkKeyMap.find(link_key)!= m_pDoc->m_LinkKeyMap.end())
{
int start_time_in_min = rsModelLinkMOE.GetLong("start_time_in_min",bExist,false);
int end_time_in_min = rsModelLinkMOE.GetLong("end_time_in_min",bExist,false);
if(start_time_in_min > end_time_in_min)
{
str_msg.Format ( "Error: simulation link MOE record No.%d, start_time_in_min > end_time_in_min", count);
m_MessageList.AddString (str_msg);
break;
}
if(start_time_in_min < m_pDoc->m_DemandLoadingStartTimeInMin)
m_pDoc->m_DemandLoadingStartTimeInMin = start_time_in_min;
if(end_time_in_min > m_pDoc->m_DemandLoadingEndTimeInMin)
m_pDoc->m_DemandLoadingEndTimeInMin = end_time_in_min ;
float link_hourly_volume = rsModelLinkMOE.GetDouble ("link_hourly_volume",bExist,false);
float density = rsModelLinkMOE.GetDouble ("density",bExist,false);
float speed_per_hour = rsModelLinkMOE.GetDouble ("speed_per_hour",bExist,false);
float queue_length_percentage = rsModelLinkMOE.GetDouble ("queue_length_percentage",bExist,false);
float cumulative_arrival_count = rsModelLinkMOE.GetDouble ("cumulative_arrival_count",bExist,false);
float cumulative_departure_count = rsModelLinkMOE.GetDouble ("cumulative_departure_count",bExist,false);
float inflow_count = rsModelLinkMOE.GetDouble ("inflow_count",bExist,false);
float outflow_count = rsModelLinkMOE.GetDouble ("outflow_count",bExist,false);
DTALink* pLink = m_pDoc->m_LinkKeyMap[link_key];
if(pLink!=NULL)
{
if(start_time_in_min >= g_Simulation_Time_Horizon)
start_time_in_min = g_Simulation_Time_Horizon -1;
if(end_time_in_min >= g_Simulation_Time_Horizon)
end_time_in_min = g_Simulation_Time_Horizon -1;
if(start_time_in_min<0)
start_time_in_min = 0;
if(end_time_in_min <0)
end_time_in_min = 0;
for(int t = start_time_in_min; t < end_time_in_min; t++)
{
pLink->m_LinkMOEAry[t].LinkFlow = link_hourly_volume;
pLink->m_LinkMOEAry[t].Density = density;
pLink->m_LinkMOEAry[t].Speed = speed_per_hour;
pLink->m_LinkMOEAry[t].QueueLength = queue_length_percentage;
float incount = inflow_count/max(1,end_time_in_min-start_time_in_min); // min count
float outcount = outflow_count/max(1,end_time_in_min-start_time_in_min); // min count
if(t>=1)
{
pLink->m_LinkMOEAry[t].ArrivalCumulativeFlow = pLink->m_LinkMOEAry[t-1].ArrivalCumulativeFlow + incount;
pLink->m_LinkMOEAry[t].DepartureCumulativeFlow = pLink->m_LinkMOEAry[t-1].DepartureCumulativeFlow + outflow_count;
}
pLink->m_LinkMOEAry[t].TravelTime = pLink->m_Length / max(0.01,speed_per_hour);
}
}
count ++;
if(count%5000 == 0)
{
str_msg.Format ( "importing %d simulation link MOE records...", count);
m_MessageList.AddString (str_msg);
}
}
}
rsModelLinkMOE.Close();
str_msg.Format ( "%d simulation link MOE records imported.", count);
m_MessageList.AddString (str_msg);
}
}
//--- TMC
for (std::list<DTALink*>::iterator iLink = m_pDoc->m_LinkSet.begin(); iLink != m_pDoc->m_LinkSet.end(); iLink++)
{
(*iLink)->m_LinkSensorMOEMap.clear (); // use one day horizon as the default value
}
if(m_TMCSpeedCheck)
{
CXLEzAutomation rsTMCSpeed;
if(rsTMCSpeed.OpenFile(m_Edit_Excel_File, "SensorSpeed", 8))
{
int speed_data_aggregation_interval = 15;
int count = 0;
while(rsTMCSpeed.ReadRecord())
{
CString TMC = rsTMCSpeed.GetCString("speed_sensor_id");
if(TMC.GetLength () ==0)
break;
int day_no = rsTMCSpeed.GetLong ("day_no",bExist,false);
if(day_no <1)
day_no = 1;
g_SensorDayDataMap[ day_no] = true;
g_SensorLastDayNo= max(g_SensorLastDayNo, day_no);
g_SensorDayNo = g_SensorLastDayNo;
DTALink* pLink = NULL;
if(m_pDoc->m_SpeedSensorIDMap.find(m_pDoc->CString2StdString(TMC))!=m_pDoc->m_SpeedSensorIDMap.end())
{
pLink = m_pDoc->m_SpeedSensorIDMap[m_pDoc->CString2StdString(TMC)];
pLink->m_bSensorData = true;
pLink->m_bSpeedSensorData = true;
float max_speed = 10;
float min_speed = 100;
for (int t = 0; t< 1440; t+= speed_data_aggregation_interval)
{
CString timestamp;
timestamp.Format ("Min_%d",t);
std::string StdString = m_pDoc->CString2StdString(timestamp);
float speed_in_mph = rsTMCSpeed.GetDouble (StdString,bExist,false);
//TRACE("speed = %f,\n",speed_in_mph);
if(min_speed > speed_in_mph)
min_speed = speed_in_mph;
if(max_speed < speed_in_mph)
max_speed = speed_in_mph;
for(int s= 0 ; s<speed_data_aggregation_interval; s++)
{
int time = day_no*1440 + t +s; // allow shift of start time
// day specific value-----
if(pLink->m_LinkSensorMOEMap.find(time) == pLink->m_LinkSensorMOEMap.end()) // no traffic count data
pLink->m_LinkSensorMOEMap[ time].LinkFlow = 1000;
pLink->m_LinkSensorMOEMap[ time].Speed = speed_in_mph;
}
}
count ++;
}
}
rsTMCSpeed.Close();
str_msg.Format ( "%d sensor speed records imported.", count);
m_MessageList.AddString (str_msg);
}
}
if(m_SensorCountCheck)
{
CXLEzAutomation rsSensorCount;
if(rsSensorCount.OpenFile(m_Edit_Excel_File, "SensorCount", 9))
{
std::list<DTALink*>::iterator iLink;
for (iLink = m_pDoc->m_LinkSet.begin(); iLink != m_pDoc->m_LinkSet.end(); iLink++)
{
(*iLink)->m_total_sensor_link_volume = 0;
}
int count = 0;
while(rsSensorCount.ReadRecord())
{
CString sensor_id = rsSensorCount.GetCString("count_sensor_id");
if(sensor_id.GetLength () ==0)
break;
int day_no = rsSensorCount.GetLong ("day_no",bExist,false);
if(day_no <1)
day_no = 1;
g_SensorDayDataMap[ day_no] = true;
g_SensorLastDayNo= max(g_SensorLastDayNo, day_no);
g_SensorDayNo = g_SensorLastDayNo;
DTALink* pLink = NULL;
if(m_pDoc->m_CountSensorIDMap .find(m_pDoc->CString2StdString(sensor_id))!=m_pDoc->m_CountSensorIDMap.end())
{
pLink = m_pDoc->m_CountSensorIDMap[m_pDoc->CString2StdString(sensor_id)];
pLink->m_bSensorData = true;
pLink->m_bCountSensorData = true;
float volume_count = rsSensorCount.GetLong ("count",bExist,false);
pLink->m_total_sensor_link_volume +=volume_count;
int start_time_in_min = rsSensorCount.GetLong("start_time_in_min",bExist,false);
int end_time_in_min = rsSensorCount.GetLong("end_time_in_min",bExist,false);
if(start_time_in_min > end_time_in_min)
{
str_msg.Format ( "Error: SensorCount record No.%d, start_time_in_min > end_time_in_min", count);
m_MessageList.AddString (str_msg);
break;
}
if(start_time_in_min < m_pDoc->m_DemandLoadingStartTimeInMin)
m_pDoc->m_DemandLoadingStartTimeInMin = start_time_in_min;
if(end_time_in_min > m_pDoc->m_DemandLoadingEndTimeInMin)
m_pDoc->m_DemandLoadingEndTimeInMin = end_time_in_min;
DTASensorData element;
element.start_time_in_min = start_time_in_min;
element.end_time_in_min = end_time_in_min;
element.count = volume_count;
CString second_count_sensor_id = rsSensorCount.GetCString("second_count_sensor_id");
if(second_count_sensor_id.GetLength () >0)
{
element.second_count_sensor_id = second_count_sensor_id;
}
pLink->m_SensorDataVector.push_back(element);
for(int t = max(0,start_time_in_min); t< min (1440,end_time_in_min); t++)
{
int time = day_no*1440 + t; // allow shift of start time
// day specific value
pLink->m_LinkSensorMOEMap[ time].LinkFlow = volume_count/(max(1.0,end_time_in_min-start_time_in_min)); // convert to per hour link flow
// overall value
pLink->m_LinkSensorMOEMap[ t].LinkFlow = volume_count/(max(1.0,end_time_in_min-start_time_in_min)); // convert to per hour link flow
}
count ++;
}
}
rsSensorCount.Close();
str_msg.Format ( "%d sensor count records imported.", count);
m_MessageList.AddString (str_msg);
}
}
m_MessageList.AddString ("Done.");
}
void CDlg_ImportNetwork::OnBnClickedImportNetworkOnly()
{
OnBnClickedImport();
m_bImportNetworkOnly = false; //reset flag
}
void CDlg_ImportNetwork::OnBnClickedImportSensorData()
{
}
void CDlg_ImportNetwork::OnLbnSelchangeList1()
{
// TODO: Add your control notification handler code here
}
void CDlg_ImportNetwork::OnBnClickedExportData()
{
CString m_CSV_FileName;
CFileDialog dlg (FALSE, "*.csv", "*.csv",OFN_HIDEREADONLY | OFN_NOREADONLYRETURN | OFN_LONGNAMES,
"(*.csv)|*.csv||", NULL);
if(dlg.DoModal() == IDOK)
{
FILE* st;
fopen_s(&st,dlg.GetPathName(),"w");
if(st!=NULL)
{
for(int i=0; i< m_MessageList.GetCount (); i++) // if one of "all" options is selected, we need to narrow down to OD pair
{
char m_Text[200];
m_MessageList.GetText (i, m_Text);
fprintf(st,"%s\n",m_Text);
}
fclose(st);
}else
{ CString str;
str.Format("The file %s could not be opened.\nPlease check if it is opened by Excel.", dlg.GetPathName());
AfxMessageBox(str);
}
m_pDoc->OpenCSVFileInExcel (dlg.GetPathName());
}
}
void CDlg_ImportNetwork::OnBnClickedButtonViewSampleFile()
{
CMainFrame* pMainFrame = (CMainFrame*) AfxGetMainWnd();
CString SampleExcelNetworkFile = pMainFrame->m_CurrentDirectory + m_pDoc->m_SampleExcelNetworkFile;
m_pDoc->OpenCSVFileInExcel (SampleExcelNetworkFile);
}
void CDlg_ImportNetwork::OnBnClickedButtonLoadSampleFile()
{
CMainFrame* pMainFrame = (CMainFrame*) AfxGetMainWnd();
CString SampleExcelNetworkFile = pMainFrame->m_CurrentDirectory + m_pDoc->m_SampleExcelNetworkFile;
static char BASED_CODE szFilter[] = "Excel File (*.xlsx)|*.xlsx||";
CFileDialog dlg(TRUE, 0, 0, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
szFilter);
dlg.m_ofn.lpstrInitialDir = SampleExcelNetworkFile;
if(dlg.DoModal() == IDOK)
{
UpdateData(true);
m_Edit_Excel_File = dlg.GetPathName();
UpdateData(false);
}
UpdateData(false);
}
void CDlg_ImportNetwork::OnBnClickedButtonViewSampleCsvFile()
{
CMainFrame* pMainFrame = (CMainFrame*) AfxGetMainWnd();
m_pDoc->m_ProjectFile.Format("%s%s", pMainFrame->m_CurrentDirectory,m_pDoc->m_SampleExcelNetworkFile);
CString str;
str.Format("The current project file is saved as %s", MB_ICONINFORMATION);
AfxMessageBox(str);
}
void CDlg_ImportNetwork::OnBnClickedButtonLoadSampleCsvFile()
{
// TODO: Add your control notification handler code here
}
void CDlg_ImportNetwork::OnBnClickedButtonViewSampleProjectFolder()
{
CMainFrame* pMainFrame = (CMainFrame*) AfxGetMainWnd();
CString SampleProjectFolder = "\\Sample-Portland-SHRP2-C05-subarea";
SampleProjectFolder = pMainFrame->m_CurrentDirectory + SampleProjectFolder;
ShellExecute( NULL, "explore", SampleProjectFolder, NULL, NULL, SW_SHOWNORMAL );
}
void CDlg_ImportNetwork::OnBnClickedImport2()
{
OnBnClickedImport();
}
BOOL CDlg_ImportNetwork::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
| 27.604575 | 196 | 0.690225 | [
"geometry",
"vector"
] |
c5fde054178bf3826f1379db65f2ae4234b7b570 | 759 | cpp | C++ | src/AdventOfCode2017/Day05-MazeOfTrampolines/test_Day05-MazeOfTrampolines.cpp | dbartok/advent-of-code-cpp | c8c2df7a21980f8f3e42128f7bc5df8288f18490 | [
"MIT"
] | null | null | null | src/AdventOfCode2017/Day05-MazeOfTrampolines/test_Day05-MazeOfTrampolines.cpp | dbartok/advent-of-code-cpp | c8c2df7a21980f8f3e42128f7bc5df8288f18490 | [
"MIT"
] | null | null | null | src/AdventOfCode2017/Day05-MazeOfTrampolines/test_Day05-MazeOfTrampolines.cpp | dbartok/advent-of-code-cpp | c8c2df7a21980f8f3e42128f7bc5df8288f18490 | [
"MIT"
] | null | null | null | #include "Day05-MazeOfTrampolines.h"
#include <AdventOfCodeCommon/DisableLibraryWarningsMacros.h>
__BEGIN_LIBRARIES_DISABLE_WARNINGS
#include "CppUnitTest.h"
__END_LIBRARIES_DISABLE_WARNINGS
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace CurrentDay = AdventOfCode::Year2017::Day05;
TEST_CLASS(Day05MazeOfTrampolines)
{
public:
TEST_METHOD(jumpInstructionsIncreasing_SimpleTests)
{
Assert::AreEqual(5u, CurrentDay::stepsInstructionsIncreasing(m_instructions));
}
TEST_METHOD(jumpInstructionsIncreasingDecreasing_SimpleTests)
{
Assert::AreEqual(10u, CurrentDay::stepsInstructionsIncreasingDecreasing(m_instructions));
}
private:
std::vector<int> m_instructions{0, 3, 0, 1, -3};
};
| 25.3 | 97 | 0.786561 | [
"vector"
] |
680016f2dd9defbe22d365ac39f1f48521e40c4f | 5,824 | cpp | C++ | ACS7xx_Allegro.cpp | sosandroid/ACS7XX_ALLEGRO | 3eb35cbc9f73defdf5c3789c896e8bf29387de00 | [
"BSD-3-Clause"
] | 6 | 2015-06-19T07:34:46.000Z | 2020-07-28T21:01:02.000Z | ACS7xx_Allegro.cpp | sosandroid/ACS7XX_ALLEGRO | 3eb35cbc9f73defdf5c3789c896e8bf29387de00 | [
"BSD-3-Clause"
] | 1 | 2017-01-17T12:42:15.000Z | 2017-01-17T13:11:52.000Z | ACS7xx_Allegro.cpp | sosandroid/ACS7XX_ALLEGRO | 3eb35cbc9f73defdf5c3789c896e8bf29387de00 | [
"BSD-3-Clause"
] | 3 | 2015-05-26T18:08:03.000Z | 2020-06-20T18:51:24.000Z | /**************************************************************************/
/*!
@file CurrentIC_ACS7xx_Allegro.cpp
@author SOSAndroid (E. Ha.)
@license BSD (see license.txt)
Set of methods to use measurements from ACS7xx sensors from Allegro Micro
All those methods are made to be called periodically
@section HISTORY
v1.0 - First release
V1.1 - Moving exponential average + robustness
v1.2 - Modify the constructor call to avoid some errors
v1.2.1 - Fix issue #1
*/
/**************************************************************************/
#include <stdlib.h>
#include "ACS7xx_Allegro.h"
/*========================================================================*/
/* CONSTRUCTORS */
/*========================================================================*/
/**************************************************************************/
/*!
Constructor
*/
/**************************************************************************/
ACS7XX_ALLEGRO::ACS7XX_ALLEGRO(void)
{
_bidir = ACS7XX_BIDIR_DEFAULT;
_pintoread = ACS7XX_PIN_DEFAULT;
_sensitivity = ACS7XX_SENSITIVITY_DEFAULT;
_voltage = BOARD_VOLTAGE_DEFAULT;
}
ACS7XX_ALLEGRO::ACS7XX_ALLEGRO(boolean bidir, int pintoread, double voltage, double sensitivity)
{
_bidir = bidir;
_pintoread = pintoread;
_sensitivity = sensitivity;
_voltage = voltage;
}
/*========================================================================*/
/* PUBLIC FUNCTIONS */
/*========================================================================*/
void ACS7XX_ALLEGRO::begin(void) {
if (_bidir) {
_voltage_offset = _voltage / 2.0;
}
else {
_voltage_offset = 0.0;
}
_resolution = (double) BOARD_ADC_DEPTH;
_adc_offset = (int) BOARD_MEASURED_OFFSET;
_factor_value = (double) ACS7XX_FACTOR_VALUE;
_lastMillis = 0; //need to add a function to start the counting by initializing lastmillis when starting a discharge / charge cycle
_lastCurrent = 0.0;
_AHCounter = 0.0;
_CoulombCounter = 0.0;
_movavgexp_alpha = 2.0 / (EXP_MOVAVG_N + 1.0);
_movavgexp_loop = 0;
_movavgexp_val = 0.0;
#ifdef SERIAL_DEBUG
if(!Serial) {
Serial.begin(9600);
}
#endif
return;
}
void ACS7XX_ALLEGRO::instantCurrent(double *current)
{
int readvalue = analogRead(_pintoread) + _adc_offset;
double readvolt = (((double) readvalue / _resolution) * _voltage) - _voltage_offset;
double readcur = readvolt * _factor_value / _sensitivity;
*current = readcur;
_lastCurrent = readcur;
ACS7XX_ALLEGRO::movingAvgExp(readcur);
#ifdef SERIAL_DEBUG
if (Serial){
Serial.print("Read value on pin including offset: ");
Serial.println(readvalue, DEC);
Serial.print("Current: ");
Serial.print(readcur, DEC);
Serial.println(" mA");
Serial.print("Moving average: ");
Serial.print(ACS7XX_ALLEGRO::getMovingAvgExp(), DEC);
Serial.println(" mA");
}
#endif
return;
}
void ACS7XX_ALLEGRO::ampereHourCount(double *mamperehc)
{
unsigned long currentmillis = millis();
double timeframehour = (double)(currentmillis - _lastMillis) / 3600000.0;
double readcurrent;
ACS7XX_ALLEGRO::instantCurrent(&readcurrent);
*mamperehc = readcurrent * timeframehour;
_lastMillis = currentmillis;
#ifdef SERIAL_DEBUG
if (Serial){
Serial.print("AmpHour: ");
Serial.print(*mamperehc, DEC);
Serial.println(" mAh");
Serial.print("timeframe ");
Serial.print(timeframehour, DEC);
Serial.println(" hour");
}
#endif
return;
}
void ACS7XX_ALLEGRO::updateCounters(void)
{
double amperehcTemp;
ACS7XX_ALLEGRO::ampereHourCount(&erehcTemp);
_lastAmperehour = amperehcTemp;
_AHCounter += amperehcTemp;
_lastCoulomb = amperehcTemp * 3.6;
_CoulombCounter += _lastCoulomb;
#ifdef SERIAL_DEBUG
if (Serial){
Serial.print("mAH counter ");
Serial.print(_AHCounter, DEC);
Serial.println(" mAH");
Serial.print("Coulomb counter ");
Serial.print(_CoulombCounter, DEC);
Serial.println(" C");
Serial.println("Counters updated");
}
#endif
return;
}
void ACS7XX_ALLEGRO::resetCounters(void)
{
_lastAmperehour = 0.0;
_AHCounter = 0.0;
_lastCoulomb = 0.0;
_CoulombCounter = 0.0;
#ifdef SERIAL_DEBUG
if (Serial){
Serial.println("Counters reseted");
}
#endif
return;
}
void ACS7XX_ALLEGRO::updateMillis(void)
{
_lastMillis = millis();
#ifdef SERIAL_DEBUG
if (Serial){
Serial.println("Millis updated");
}
#endif
return;
}
void ACS7XX_ALLEGRO::getAHCount(double *ahcount)
{
*ahcount = _AHCounter;
return;
}
void ACS7XX_ALLEGRO::getCoulombCount(double *ccount)
{
*ccount = _CoulombCounter;
return;
}
void ACS7XX_ALLEGRO::printDebugDeviceInit(void)
{
#ifdef SERIAL_DEBUG
if (Serial){
Serial.println("ACS7XX sensor object initialized");
Serial.print("PIN: ");
Serial.println(_pintoread, DEC);
Serial.print("Sensitivity: ");
Serial.print(_sensitivity, DEC);
Serial.println(" V/A");
Serial.print("device is ");
if(!_bidir) Serial.print("not ");
Serial.println("bidirectional");
Serial.println("...... ...... ......");
}
#endif
return;
}
void ACS7XX_ALLEGRO::movingAvgExp(double current) {
//init moving average exponetial with simple average of
if (_movavgexp_loop < EXP_MOVAVG_LOOP) {
_movavgexp_val += current;
if (_movavgexp_loop == (EXP_MOVAVG_LOOP - 1)) _movavgexp_val = _movavgexp_val / (double) EXP_MOVAVG_LOOP;
_movavgexp_loop ++;
}
else {
double movavgexp = _movavgexp_val + _movavgexp_alpha * (current - _movavgexp_val);
_movavgexp_val = movavgexp;
}
return;
}
double ACS7XX_ALLEGRO::getMovingAvgExp(void) {
return _movavgexp_val;
}
void ACS7XX_ALLEGRO::resetMovingAvgExp(void) {
_movavgexp_val = 0;
_movavgexp_loop = 0;
return;
} | 23.967078 | 132 | 0.619505 | [
"object"
] |
680adb4e2164e4442b9ac901c6860630fd942a0a | 9,395 | cpp | C++ | src/rayCaster.cpp | PSStefanov19/CBBA-6890 | 7e328e58033eaf2a6e9153c85d39d99b8a355249 | [
"MIT"
] | 3 | 2021-11-09T18:18:48.000Z | 2022-02-14T20:48:16.000Z | src/rayCaster.cpp | PSStefanov19/CBBA-6890 | 7e328e58033eaf2a6e9153c85d39d99b8a355249 | [
"MIT"
] | null | null | null | src/rayCaster.cpp | PSStefanov19/CBBA-6890 | 7e328e58033eaf2a6e9153c85d39d99b8a355249 | [
"MIT"
] | 1 | 2022-03-20T06:09:01.000Z | 2022-03-20T06:09:01.000Z | #include <ncurses.h>
#include <math.h>
#include "rayCaster.h"
/**
* @brief A function to check if player has won
*
* @param currectPosX The current X position of the player
* @param currentPosY The current Y position of the player
* @param exitX The X exit coordinate of the maze
* @param exitY The Y exit coordinate of the maze
* @return true The player has exited the maze
* @return false The player has not exited the maze
*/
bool checkIfWon(int currectPosX, int currentPosY, int exitX, int exitY)
{
if(currectPosX == exitX and currentPosY == exitY)
{
return true;
}
else
{
return false;
}
}
/**
* @brief Function handles user input
*
* @param maze The generated maze
* @param playerX The X coordinate of the player
* @param playerY The Y coordinate to the player
* @param playerAngle The angle player is looking at
*/
void handleInput(char** maze ,float& playerX, float& playerY, float& playerAngle)
{
//Declate speed of turning and walking
float walkSpeed = 0.1125f;
float turnSpeed = 0.015f;
//Switch that handles input
switch(getch())
{
//Move player forwards if he is pressing w,W or KEY_UP
case KEY_UP:
case 'W':
case 'w':
playerX += sinf(playerAngle) * walkSpeed;
playerY += cosf(playerAngle) * walkSpeed;
//If player is trying to walk into a wall retrn them to start coordinate
if(maze[(int)playerY][(int)playerX] == '#')
{
playerX -= sinf(playerAngle) * walkSpeed;
playerY -= cosf(playerAngle) * walkSpeed;
}
break;
//Move player backwards if he is pressing s,S or KEY_DOWN
case KEY_DOWN:
case 'S':
case 's':
playerX -= sinf(playerAngle) * walkSpeed;
playerY -= cosf(playerAngle) * walkSpeed;
//If player is trying to walk into a wall retrn them to start coordinate
if(maze[(int)playerY][(int)playerX] == '#')
{
playerX += sinf(playerAngle) * walkSpeed;
playerY += cosf(playerAngle) * walkSpeed;
}
break;
//Turn player left if he is pressing a,A or KEY_LEFT
case KEY_LEFT:
case 'A':
case 'a':
playerAngle -= turnSpeed;
break;
//Turn player right if he is pressing d,D or KEY_RIGHT
case KEY_RIGHT:
case 'D':
case 'd':
playerAngle += turnSpeed;
break;
}
}
/**
* @brief Function that calculates the distance to the wall
*
* @param maze The generated maze
* @param rayAngle The angle of the ray
* @param distanceToWall The uncalculated distance to the wall
* @param playerX The player X coordinate
* @param playerY The player Y coordinate
* @param size The size of the maze
*/
void findWallDistance(char **maze, float rayAngle, float& distanceToWall, float playerX, float playerY, int size)
{
//Create a flag that checks if a wall is hit
bool hitWall = false;
//Find the X and Y direction of the rayAngle vector
float eyeX = sinf(rayAngle);
float eyeY = cosf(rayAngle);
//Do this until a wall is hit and the distance to the wall is less than max render distance
while(!hitWall && distanceToWall < 10)
{
//Increment the distance to the wall with a small size
distanceToWall += 0.1f;
//Find the end coordinates of the vector
int testX = (int)(playerX + eyeX * distanceToWall);
int testY = (int)(playerY + eyeY * distanceToWall);
//If ray is OOB then the ray has hit
if(testX < 0 || testX > size || testY < 0 || testY > size)
{
hitWall = true;
//Set distance to wall to max render distance
distanceToWall = 10;
}
else
{
//Check if ray hit a wall
if(maze[testY][testX] == '#')
{
hitWall = true;
}
}
}
}
/**
* @brief Calculate the ending coordinate of the ceiling
*
* @param ceiling The ceiling coordinate
* @param consoleHeight The height of the console
* @param distanceToWall The calculated distance to the wall
*/
void calculateCeiling(int& ceiling ,int consoleHeight, float distanceToWall)
{
ceiling = (float)(consoleHeight/2.0) - consoleHeight / distanceToWall;
}
/**
* @brief Get the Shade object
*
* @param shade Character representing a shade
* @param distanceToWall Calculated distance to wall
*/
void getShade(char& shade, float distanceToWall)
{
//Switch that determines the shade based on the distance to wall
switch((int)distanceToWall)
{
case 0:
case 1:
shade = ' ';
break;
case 2:
shade = '.';
break;
case 3:
shade = ':';
break;
case 4:
shade = '-';
break;
case 5:
shade = '=';
break;
case 6:
shade = '+';
break;
case 7:
shade = '*';
break;
case 8:
shade = '#';
break;
case 9:
shade = '%';
break;
default:
shade = '@';
}
}
/**
* @brief Draws the raycasted image
*
* @param x The column currently being printed
* @param shade The shade of the wall based on distance to wall
* @param consoleHeight Height of the console
* @param endCeiling The ending coordinate of ceiling
* @param startFloor The starting coordinate of floors
* @param distanceToWall The distance to the wall
*/
void drawGame(int x, int shade, int consoleHeight, int endCeiling, int startFloor, int distanceToWall)
{
//For loow that goes over every row of a pixel colunm
for(int y = 0; y <= consoleHeight; y++)
{
//If Y is less than or equal to end of Ceiling - then that is a ceiling
if(y <= endCeiling)
{
attron(COLOR_PAIR(SKY));
mvaddch(y, x, ' ');
attroff(COLOR_PAIR(SKY));
}
//If Y is between the start of the floor, the end of the ceiling and less than max render distance- then that is a wall
else if(y > endCeiling and y < startFloor and distanceToWall != 10)
{
attron(COLOR_PAIR(WALLS));
mvaddch(y, x, shade);
attroff(COLOR_PAIR(WALLS));
}
//This is the floor
else
{
attron(COLOR_PAIR(FLOOR));
mvaddch(y, x, '.');
attroff(COLOR_PAIR(FLOOR));
}
}
}
/**
* @brief Function to draw the maze
*
* @param maze The generated maze
* @param size The size of the generated maze
* @param playerY The Y coordinate of the player
* @param playerX The X coordinate of the player
*/
void drawMap(char** maze, int size, int playerY, int playerX)
{
//For() loop that loops over the whole map and prints it
for(int y = 0; y < size; y++)
{
for(int x = 0; x < size; x++)
{
mvaddch(y, x, maze[y][x]);
}
}
//Add the player based on his position
mvaddch(playerY, playerX, 'P');
}
/**
* @brief Raycaster. This function is used as a game loop
*
* @param maze The generated maze
* @param size The size of the generated maze
* @param startY The starting coordinate of the player
* @param endY The exit coordinate of the maze
*/
void rayCaster(char **maze,int size, int startY, int endY)
{
//Get console dimenstions
int consoleHeight = getmaxy(stdscr);
int consoleWidth = getmaxx(stdscr);
//Initial player position and angle
float playerX = 1.0f;
float playerY = startY;
float playerAngle = 0.0f;
//Field of view of the player
float FOV = 3.14159 / 5.5;
//Color pairs needed to draw objects
start_color();
init_pair(SKY, COLOR_BLUE, COLOR_BLUE);
init_pair(WALLS, COLOR_BLACK, COLOR_WHITE);
init_pair(FLOOR, COLOR_YELLOW, COLOR_YELLOW);
//Main game loop
while (!(checkIfWon(int(playerX), int(playerY), size-1, endY)))
{
//Handle player's input
handleInput(maze, playerX, playerY, playerAngle);
//Start casting rays
for(int x = 0; x < consoleWidth; x++)
{
//Calculate the angle of ray at X screen column
float rayAngle = (playerAngle - FOV/2.0) + ((float)x / (float)consoleWidth) * FOV;
//Find distance to wall
float distanceToWall = 0.0f;
findWallDistance(maze, rayAngle, distanceToWall, playerX, playerY, size);
//Find ceiling end coordinates and floor start coordinates
int endCeiling;
calculateCeiling(endCeiling, consoleHeight, distanceToWall);
int startFloor = consoleHeight - endCeiling;
//Get the sade of the walls based on distance from player to wall
char shade = ' ';
getShade(shade, distanceToWall);
//Draw the game
drawGame(x, shade, consoleHeight, endCeiling, startFloor, distanceToWall);
}
//Draw the map
drawMap(maze, size, playerY, playerX);
refresh();
}
} | 29.731013 | 127 | 0.58148 | [
"render",
"object",
"vector"
] |
6810ba405065df250f89800b5fa57e6e544006c2 | 2,449 | cpp | C++ | pattern_search.cpp | TsimafeiKhatkevich/graph-pattern-search | 5a213e1caa036b47e16ca69cbb2cf3beabc02d2a | [
"MIT"
] | null | null | null | pattern_search.cpp | TsimafeiKhatkevich/graph-pattern-search | 5a213e1caa036b47e16ca69cbb2cf3beabc02d2a | [
"MIT"
] | null | null | null | pattern_search.cpp | TsimafeiKhatkevich/graph-pattern-search | 5a213e1caa036b47e16ca69cbb2cf3beabc02d2a | [
"MIT"
] | null | null | null | #include "pattern_search.h"
#include <sstream>
#include <algorithm>
std::vector<char> GetReasonableVertices(const TAdjMatrix& hostGraph, const TAdjMatrix& pattern) {
const auto pComps = FindConnectedComponents(pattern);
std::unordered_map<ui32, ui32> pCompSizes;
for (ui32 mark : pComps) {
++pCompSizes[mark];
}
ui32 minSize = pattern.size();
for (auto mark2size : pCompSizes) {
if (mark2size.second < minSize) {
minSize = mark2size.second;
}
}
std::vector<char> result(hostGraph.size(), FLAG_NOT_REASONABLE);
const auto hComps = FindConnectedComponents(hostGraph);
std::unordered_map<ui32, ui32> hCompSizes;
for (ui32 mark : hComps) {
++hCompSizes[mark];
}
for (ui32 vertex = 0; vertex < result.size(); ++vertex) {
const ui32 compId = hComps[vertex];
if (hCompSizes[compId] >= minSize) {
result[vertex] = FLAG_AVAILABLE;
}
}
return result;
}
TCanonicalSets CanonizeMatchedCycles(
const TAdjMatrix& hostGraph,
const TAdjMatrix& pattern,
const std::vector<TSearchProcessorBase::TMatch>& matches) {
TCanonicalSets result;
for (auto match : matches) {
// eliminate offset
auto minIt = match.begin();
ui32 min = *minIt;
for (auto it = minIt; it != match.end(); ++it) {
if (*it < min) {
minIt = it;
min = *it;
}
}
if (minIt != match.begin()) {
std::reverse(match.begin(), minIt);
std::reverse(minIt, match.end());
std::reverse(match.begin(), match.end());
}
// eliminate symmetry
if (match.back() < match[1]) {
std::reverse(match.begin() + 1, match.end());
}
// to string
std::ostringstream strout;
for (const auto i : match) {
strout << i << " ";
}
const std::string& cycleStr = strout.str();
if (result.All.count(cycleStr)) {
continue;
}
result.All.insert(cycleStr);
// check for induced
std::vector<char> vFlags(hostGraph.size(), FLAG_AVAILABLE);
for (const auto& m : match) {
vFlags[m] = FLAG_IN_PATTERN;
}
if (IsInducedPattern(hostGraph, pattern, match, vFlags)) {
result.Induced.insert(cycleStr);
}
}
return result;
}
| 30.234568 | 97 | 0.55737 | [
"vector"
] |
681b5eacd20a250cc0af5f7b9fd316e57ec0560d | 10,768 | cpp | C++ | source/renderer/passes/ShadowMapPass.cpp | DaSutt/VolumetricParticles | 6ec9bac4bec4a8757343bb770b23110ef2364dfd | [
"Apache-2.0"
] | 6 | 2017-06-26T11:42:26.000Z | 2018-09-10T17:53:53.000Z | source/renderer/passes/ShadowMapPass.cpp | DaSutt/VolumetricParticles | 6ec9bac4bec4a8757343bb770b23110ef2364dfd | [
"Apache-2.0"
] | 8 | 2017-06-24T20:25:42.000Z | 2017-08-09T10:50:40.000Z | source/renderer/passes/ShadowMapPass.cpp | DaSutt/VolumetricParticles | 6ec9bac4bec4a8757343bb770b23110ef2364dfd | [
"Apache-2.0"
] | null | null | null | /*
MIT License
Copyright(c) 2017 Daniel Suttor
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files(the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions :
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#include "ShadowMapPass.h"
#include "..\passResources\ShaderBindingManager.h"
#include "..\passResources\RenderPassManager.h"
#include "..\passResources\FrameBufferManager.h"
#include "..\passResources\ShaderManager.h"
#include "..\resources\ImageManager.h"
#include "..\resources\BufferManager.h"
#include "..\resources\QueueManager.h"
#include "..\wrapper\Surface.h"
#include "..\wrapper\Synchronization.h"
#include "..\MeshRenderable.h"
#include "..\pipelineState\PipelineState.h"
#include "..\ShadowMap.h"
#include "..\..\scene\Scene.h"
#include "GuiPass.h"
#include "..\scene\RenderScene.h"
#include "..\wrapper\QueryPool.h"
namespace Renderer
{
ShadowMapPass::ShadowMapPass(ShaderBindingManager* bindingManager, RenderPassManager* renderPassManager) :
Pass::Pass(bindingManager, renderPassManager)
{}
void ShadowMapPass::SetShadowMap(ShadowMap* shadowMap)
{
shadowMap_ = shadowMap;
}
void ShadowMapPass::SetRenderScene(RenderScene* renderScene)
{
renderScene_ = renderScene;
}
void ShadowMapPass::RequestResources(ImageManager* imageManager, BufferManager* bufferManager, int frameCount)
{
auto pass = SUBPASS_SHADOW_MAP;
const auto& meshData = renderScene_->GetMeshData();
ShaderBindingManager::BindingInfo bindingInfo = {};
bindingInfo.types = { VK_DESCRIPTOR_TYPE_STORAGE_BUFFER };
bindingInfo.stages = { VK_SHADER_STAGE_VERTEX_BIT };
bindingInfo.resourceIndex = { meshData.buffers_[MeshData::BUFFER_WORLD_VIEW_PROJ_LIGHT] };
bindingInfo.pass = pass;
bindingInfo.refactoring_ = { true };
bindingInfo.setCount = frameCount;
graphicPipelines_.push_back(bindingManager_->RequestShaderBinding(bindingInfo));
ShaderBindingManager::PushConstantInfo pushConstantInfo = {};
VkPushConstantRange objectIds = {};
objectIds.stageFlags = VK_SHADER_STAGE_VERTEX_BIT;
objectIds.offset = 0;
objectIds.size = sizeof(int);
pushConstantInfo.pushConstantRanges.push_back(objectIds);
pushConstantInfo.pass = pass;
perObjectPushConstantIndex_ = bindingManager_->RequestPushConstants(pushConstantInfo)[0];
}
bool ShadowMapPass::Create(VkDevice device, ShaderManager* shaderManager, FrameBufferManager* frameBufferManager,
Surface* surface, ImageManager* imageManager)
{
if (!CreateFrameBuffers(device, frameBufferManager, surface)) { return false; }
if (!CreateGraphicPipeline(device, shaderManager)) { return false; }
if (!CreateCommandBuffers(device, QueueManager::QUEUE_GRAPHICS, surface->GetImageCount())) { return false; }
if (!Wrapper::CreateVulkanSemaphore(device, &graphicPipelines_[GRAPHICS_SHADOW_DIR].passFinishedSemaphore)) { return false; }
return true;
}
void ShadowMapPass::UpdateBufferData(Scene* scene)
{
}
void ShadowMapPass::Render(Surface* surface, FrameBufferManager* frameBufferManager,
QueueManager* queueManager, BufferManager* bufferManager,
std::vector<VkImageMemoryBarrier>& memoryBarrier, VkSemaphore* startSemaphore, int frameIndex)
{
const auto pass = SUBPASS_SHADOW_MAP;
{
VkCommandBufferBeginInfo beginInfo = {};
beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
vkBeginCommandBuffer(commandBuffers_[frameIndex], &beginInfo);
auto& queryPool = Wrapper::QueryPool::GetInstance();
queryPool.Reset(commandBuffers_[frameIndex], frameIndex);
queryPool.TimestampStart(commandBuffers_[frameIndex],
Wrapper::TIMESTAMP_SHADOW_MAP, frameIndex);
shadowMap_->BindViewportScissor(commandBuffers_[frameIndex]);
const auto& meshData = renderScene_->GetMeshData();
const auto& currMeshIndices = renderScene_->GetMeshIndices(SUBPASS_SHADOW_MAP);
renderScene_->BindMeshData(bufferManager, commandBuffers_[frameIndex]);
int offset = 0;
for (size_t i = 0; i < shadowMap_->GetCascadeCount(); ++i)
{
{
//Begin rendering by clearing depth
VkRenderPassBeginInfo renderPassInfo = {};
renderPassInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
renderPassInfo.renderPass = renderPassManager_->GetRenderPass(GRAPHIC_PASS_SHADOW_MAP);
renderPassInfo.framebuffer = frameBufferManager->GetFrameBuffer(frameBufferIndices_[i]);
renderPassInfo.renderArea.offset = { 0,0 };
renderPassInfo.renderArea.extent = shadowMap_->GetSize();
VkClearValue clearValue = { 1.0f, 0 };
renderPassInfo.clearValueCount = 1;
renderPassInfo.pClearValues = &clearValue;
vkCmdBeginRenderPass(commandBuffers_[frameIndex], &renderPassInfo, VK_SUBPASS_CONTENTS_INLINE);
vkCmdBindPipeline(commandBuffers_[frameIndex], VK_PIPELINE_BIND_POINT_GRAPHICS, graphicPipelines_[GRAPHICS_SHADOW_DIR].pipeline);
vkCmdBindDescriptorSets(commandBuffers_[frameIndex],
VK_PIPELINE_BIND_POINT_GRAPHICS,
bindingManager_->GetPipelineLayout(pass), 0, 1,
&bindingManager_->GetDescriptorSet(graphicPipelines_[GRAPHICS_SHADOW_DIR].shaderBinding, frameIndex), 0, nullptr);
}
if (!currMeshIndices.empty() && meshData.vertexCount_ > 0)
{
const auto& pipelineLayout = bindingManager_->GetPipelineLayout(pass);
for (const auto i : currMeshIndices)
{
int index = i + offset;
vkCmdPushConstants(commandBuffers_[frameIndex], pipelineLayout,
VK_SHADER_STAGE_VERTEX_BIT, 0, sizeof(int), &index);
vkCmdDrawIndexed(commandBuffers_[frameIndex],
meshData.indexCounts_[i], 1, meshData.indexOffsets_[i],
meshData.vertexOffsets_[i], 0);
}
offset += static_cast<int>(currMeshIndices.size());
}
vkCmdEndRenderPass(commandBuffers_[frameIndex]);
}
queryPool.TimestampEnd(commandBuffers_[frameIndex],
Wrapper::TIMESTAMP_SHADOW_MAP, frameIndex);
vkEndCommandBuffer(commandBuffers_[frameIndex]);
{
VkSubmitInfo submitInfo = {};
submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
submitInfo.commandBufferCount = 1;
submitInfo.pCommandBuffers = &commandBuffers_[frameIndex];
const VkPipelineStageFlags waitDstStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
submitInfo.waitSemaphoreCount = 1;
submitInfo.pWaitSemaphores = startSemaphore;
submitInfo.pWaitDstStageMask = &waitDstStageMask;
submitInfo.signalSemaphoreCount = 1;
submitInfo.pSignalSemaphores = &graphicPipelines_[GRAPHICS_SHADOW_DIR].passFinishedSemaphore;
vkQueueSubmit(queueManager->GetQueue(QueueManager::QUEUE_GRAPHICS), 1, &submitInfo, VK_NULL_HANDLE);
}
}
}
void ShadowMapPass::OnReloadShaders(VkDevice device, ShaderManager* shaderManager)
{
Pass::OnReloadShaders(device, shaderManager);
CreateGraphicPipeline(device, shaderManager);
}
VkSemaphore* ShadowMapPass::GetFinishedSemaphore()
{
return &graphicPipelines_[GRAPHICS_SHADOW_DIR].passFinishedSemaphore;
}
bool ShadowMapPass::CreateFrameBuffers(VkDevice device, FrameBufferManager* frameBufferManager, Surface* surface)
{
FrameBufferManager::Info frameBufferInfo;
frameBufferInfo.pass = GRAPHIC_PASS_SHADOW_MAP;
const auto& size = shadowMap_->GetSize();
frameBufferInfo.width = size.width;
frameBufferInfo.height = size.height;
frameBufferInfo.resize = false;
frameBufferInfo.refactoring = true;
frameBufferInfo.layers = 1;
for (int i = 0; i < shadowMap_->GetCascadeCount(); ++i)
{
frameBufferInfo.imageAttachements =
{
{ shadowMap_->GetImageIndex(), FrameBufferManager::IMAGE_SOURCE_MANAGER, i, true }
};
const auto index = frameBufferManager->RequestFrameBuffer(device, frameBufferInfo);
if (index == -1)
{
return false;
}
frameBufferIndices_.push_back(index);
}
return true;
}
bool ShadowMapPass::CreateGraphicPipeline(VkDevice device, ShaderManager* shaderManager)
{
VkGraphicsPipelineCreateInfo pipelineInfo = {};
pipelineInfo.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO;
const auto shaderStageInfo = shaderManager->GetShaderStageInfo(Renderer::SUBPASS_SHADOW_MAP);
pipelineInfo.stageCount = static_cast<uint32_t>(shaderStageInfo.size());
pipelineInfo.pStages = shaderStageInfo.data();
const auto vertexInputState = MeshRenderable::GetVertexInputState();
pipelineInfo.pVertexInputState = &vertexInputState;
pipelineInfo.pInputAssemblyState = &g_inputAssemblyStates[ASSEMBLY_TRIANGLE_LIST];
pipelineInfo.pRasterizationState = &g_rasterizerState[RASTERIZER_SOLID];
pipelineInfo.pMultisampleState = &g_mulitsampleStates[MULTISAMPLE_DISABLED];
pipelineInfo.pDepthStencilState = &g_depthStencilStates[DEPTH_WRITE];
pipelineInfo.pViewportState = &ViewPortState::GetState(ViewPortState::VIEWPORT_STATE_UNDEFINED);
pipelineInfo.pDynamicState = DynamicState::GetCreateInfo(DynamicState::DYNAMIC_VIEWPORT_SCISSOR);
pipelineInfo.layout = bindingManager_->GetPipelineLayout(SUBPASS_SHADOW_MAP);
pipelineInfo.renderPass = renderPassManager_->GetRenderPass(GRAPHIC_PASS_SHADOW_MAP);
pipelineInfo.subpass = 0;
pipelineInfo.basePipelineHandle = VK_NULL_HANDLE;
pipelineInfo.basePipelineIndex = 0;
VkPipeline pipeline = VK_NULL_HANDLE;
const auto result = vkCreateGraphicsPipelines(device, VK_NULL_HANDLE,
1, &pipelineInfo,
nullptr, &pipeline);
if (result != VK_SUCCESS)
{
printf("Failed creating mesh pass pipeline, %d\n", result);
return false;
}
graphicPipelines_[GRAPHICS_SHADOW_DIR].pipeline = pipeline;
return true;
}
} | 39.443223 | 139 | 0.743499 | [
"mesh",
"render",
"vector"
] |
681d45fd1fd1f258161a16b93866043274ad7bbe | 6,940 | cc | C++ | util/text/text.cc | WinterW/crawler_cpp | e0c8dba77233005b1ab13731d1cbcce274b70778 | [
"Apache-2.0"
] | null | null | null | util/text/text.cc | WinterW/crawler_cpp | e0c8dba77233005b1ab13731d1cbcce274b70778 | [
"Apache-2.0"
] | null | null | null | util/text/text.cc | WinterW/crawler_cpp | e0c8dba77233005b1ab13731d1cbcce274b70778 | [
"Apache-2.0"
] | 2 | 2020-09-12T13:50:38.000Z | 2020-09-16T15:55:14.000Z | /**
* @Copyright 2009 Ganji Inc.
* @file ganji/util/text/text.cc
* @namespace ganji::util::text
* @version 1.0
* @author haohuang
* @date 2010-07-21
*
* 改动程序后, 请使用tools/cpplint/cpplint.py 检查代码是否符合编码规范!
* 遵循的编码规范请参考: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
* Change Log:
*/
#include "text.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdio.h>
using std::string;
using std::vector;
namespace ganji { namespace util { namespace text { namespace Text {
int32_t StrToInt(const string &str_value) {
return atoi(str_value.c_str());
}
int64_t StrToInt64(const string &str_value) {
return atoll(str_value.c_str());
}
double StrToDouble(const std::string &str_value) {
return atof(str_value.c_str());
}
string IntToStr(int32_t value) {
char sz_buf[20];
memset(sz_buf, 0, sizeof(sz_buf));
snprintf(sz_buf, sizeof(sz_buf), "%d", static_cast<int32_t>(value));
return sz_buf;
}
string UIntToStr(int32_t value) {
char sz_buf[20];
memset(sz_buf, 0, sizeof(sz_buf));
snprintf(sz_buf, sizeof(sz_buf), "%u", static_cast<int32_t>(value));
return sz_buf;
}
string Int64ToStr(int64_t value) {
char sz_buf[40];
memset(sz_buf, 0, sizeof(sz_buf));
snprintf(sz_buf, sizeof(sz_buf), "%ld", static_cast<int64_t>(value));
return sz_buf;
}
string UInt64ToStr(uint64_t value) {
char sz_buf[40];
memset(sz_buf, 0, sizeof(sz_buf));
snprintf(sz_buf, sizeof(sz_buf), "%lu", static_cast<uint64_t>(value));
return sz_buf;
}
string DoubleToStr(double value) {
char sz_buf[60];
memset(sz_buf, 0, sizeof(sz_buf));
snprintf(sz_buf, sizeof(sz_buf), "%f", static_cast<double>(value));
return sz_buf;
}
void Segment(const string &input, char seperator, vector<string> *segments) {
if (NULL == segments) {
return;
}
if (input.empty()) {
return;
}
segments->resize(0);
segments->reserve(input.size()/20);
size_t start_pos = 0;
size_t pos = string::npos;
for (pos = input.find(seperator, start_pos); pos != string::npos; start_pos = pos + 1, pos = input.find(seperator, start_pos)) {
segments->push_back(input.substr(start_pos, pos - start_pos));
}
segments->push_back(input.substr(start_pos));
}
void Segment(const string &input, const string &seperator, vector<string> *segments) {
if (NULL == segments) {
return;
}
if (input.empty()) {
return;
}
if (seperator.empty()) {
return;
}
segments->resize(0);
segments->reserve(input.size()/20);
size_t start_pos = 0;
size_t pos = string::npos;
for (pos = input.find(seperator, start_pos); pos != string::npos; start_pos = pos + seperator.size(), pos = input.find(seperator, start_pos)) {
segments->push_back(input.substr(start_pos, pos - start_pos));
}
segments->push_back(input.substr(start_pos));
}
/// no considering gbk yet!
void Trim(string *pstr) {
assert(pstr != NULL);
static const string kStrset = "\r\n\t ";
int start = pstr->find_first_not_of(kStrset);
if (start == string::npos) {
*pstr = "";
return;
}
int end = pstr->find_last_not_of(kStrset);
*pstr = pstr->substr(start, end - start + 1);
}
void Trim(const string &remstr, string *pstr) {
assert(pstr != NULL);
pstr->erase(0, pstr->find_first_not_of(remstr));
pstr->erase(pstr->find_last_not_of(remstr) + 1);
}
void LTrimAll(const string &all_str, string *pstr) {
assert(pstr != NULL);
string &str = *pstr;
if (str.empty()) {
return;
}
size_t begin_pos = 0;
while (begin_pos < str.length()) {
char ch = str[begin_pos];
if (all_str.find(ch) == string::npos) {
break;
}
++begin_pos;
}
str = str.substr(begin_pos);
}
void RTrimAll(const string &all_str, string *pstr) {
assert(pstr != NULL);
string & str = *pstr;
if (str.empty()) {
return;
}
size_t end_pos = str.length()-1;
while (end_pos>0) {
char ch = str[end_pos];
if (all_str.find(ch) == string::npos) {
break;
}
--end_pos;
};
if (end_pos == 0) {
if (all_str.find(str[end_pos]) != string::npos) {
str = "";
return;
}
}
str = str.substr(0, end_pos+1);
}
void TrimAll(const string & allstr, string *pstr) {
LTrimAll(allstr, pstr);
RTrimAll(allstr, pstr);
}
int ReplaceStrStrSameLen(const string &str_pattern, const string &str_replace, string *pstr) {
string &str = *pstr;
int num = 0;
size_t pos_start = 0;
while ((pos_start = str.find(str_pattern, pos_start)) != string::npos) {
str.replace(pos_start, str_pattern.length(), str_replace);
pos_start += str_replace.size();
++num;
}
return num;
}
int ReplaceStrStr(const string &str_pattern, const string &str_replace, string *pstr) {
assert(pstr != NULL);
string &str = *pstr;
if (str.empty() || str_pattern.empty())
return -1;
if (str_pattern.length() == str_replace.length())
return ReplaceStrStrSameLen(str_pattern, str_replace, pstr);
int num = 0;
string str2 = str;
str.clear();
size_t pos_start = 0, pos_find = 0;
while ((pos_find = str2.find(str_pattern, pos_start)) != string::npos) {
str += str2.substr(pos_start, pos_find - pos_start);
str += str_replace;
pos_start = pos_find + str_pattern.size();
++num;
}
if (pos_start < str2.size()) {
str += str2.substr(pos_start);
}
return num;
}
int ReplaceStrVec(const vector<std::string> &vec_pattern, const string &str_replace, string *pstr) {
assert(pstr != NULL);
int num = 0;
for (size_t i = 0; i < vec_pattern.size(); ++i) {
num += ReplaceStrStr(vec_pattern[i], str_replace, pstr);
}
return num;
}
int GetWordCount(const string &str_content, const string &str_word) {
if (str_word.empty())
return 0;
int word_count = 0;
size_t pos = 0;
while ((pos = str_content.find(str_word, pos)) != string::npos) {
++word_count;
pos += str_word.size();
}
return word_count;
}
/// Pre-condition: rotate_step <= p_str->size()
void LeftRotate(std::string *p_str, int rotate_step) {
if (p_str->empty())
return;
assert(rotate_step <= p_str->size());
ReverseStr(p_str);
int cut_pos = p_str->size() - rotate_step;
string str1 = p_str->substr(0, cut_pos);
string str2 = p_str->substr(cut_pos);
ReverseStr(&str1);
ReverseStr(&str2);
*p_str = str1 + str2;
}
void ReverseStr(std::string *p_str) {
int len = p_str->size();
for (int i = 0; i < len/2; i++) {
char temp = (*p_str)[i];
(*p_str)[i] = (*p_str)[len-i-1];
(*p_str)[len-i-1] = temp;
}
}
void ToLower(string *p_str) {
if (!p_str)
return;
string &str = *p_str;
for (size_t i = 0; i < str.size(); i++) {
if ((str[i] >= 'A') && (str[i] <= 'Z')) {
str[i] += 'a' - 'A';
}
}
}
void ToUpper(string *p_str) {
if (!p_str)
return;
string &str = *p_str;
for (size_t i = 0; i < str.size(); i++) {
if ((str[i] >= 'a') && (str[i] <= 'z')) {
str[i] += 'A' - 'a';
}
}
}
} } } } ///< end of namespace ganji::util::text::Text
| 24.350877 | 145 | 0.634726 | [
"vector"
] |
68234b64ad7e374ffd966b448063941275f884a0 | 1,464 | hpp | C++ | bia/tokenizer/token/parameter.hpp | bialang/bia | b54fff096b4fe91ddb0b1d509ea828daa11cee7e | [
"BSD-3-Clause"
] | 2 | 2017-09-09T17:03:18.000Z | 2018-03-02T20:02:02.000Z | bia/tokenizer/token/parameter.hpp | terrakuh/Bia | 412b7e8aeb259f4925c3b588f6025760a43cd0b7 | [
"BSD-3-Clause"
] | 7 | 2018-10-11T18:14:19.000Z | 2018-12-26T15:31:04.000Z | bia/tokenizer/token/parameter.hpp | terrakuh/Bia | 412b7e8aeb259f4925c3b588f6025760a43cd0b7 | [
"BSD-3-Clause"
] | null | null | null | #ifndef BIA_TOKENIZER_TOKEN_PARAMETER_HPP_
#define BIA_TOKENIZER_TOKEN_PARAMETER_HPP_
#include "../reader.hpp"
#include "token.hpp"
#include <bia/error/bia_error.hpp>
#include <bia/resource/manager.hpp>
#include <vector>
namespace bia {
namespace tokenizer {
namespace token {
struct Parameter
{
class Ranger
{
public:
error::Bia_range range() const noexcept
{
return { _start, _parent->reader.location() };
}
private:
friend class Parameter;
Parameter* _parent;
error::Bia_location _start;
Ranger(Parameter& parent) noexcept : _parent{ &parent }, _start{ parent.reader.location() }
{}
};
struct State
{
Reader::Backup reader_state;
resource::Manager::state_type rm_state;
std::size_t bundle_state;
};
Reader& reader;
resource::Manager& manager;
std::vector<Token>& bundle;
State backup() const
{
return { reader.backup(), manager.save_state(), bundle.size() };
}
/**
* Restores the state of all parameters.
*
* @param old the old states
*/
void restore(const State& old)
{
reader.restore(old.reader_state);
manager.restore_state(old.rm_state);
bundle.resize(old.bundle_state);
}
Ranger begin_range()
{
return { *this };
}
error::Bia make_error(error::Code code, error::Bia_range range)
{
error::Bia err{};
err.code = code;
err.range = range;
return err;
}
void set_optional_error(error::Bia err)
{}
};
} // namespace token
} // namespace tokenizer
} // namespace bia
#endif
| 18.3 | 93 | 0.698087 | [
"vector"
] |
683989734368501588442592fc9efc35fc3151c4 | 1,426 | cpp | C++ | aws-cpp-sdk-kms/source/model/UpdateCustomKeyStoreRequest.cpp | Neusoft-Technology-Solutions/aws-sdk-cpp | 88c041828b0dbee18a297c3cfe98c5ecd0706d0b | [
"Apache-2.0"
] | 1 | 2022-01-05T18:20:03.000Z | 2022-01-05T18:20:03.000Z | aws-cpp-sdk-kms/source/model/UpdateCustomKeyStoreRequest.cpp | Neusoft-Technology-Solutions/aws-sdk-cpp | 88c041828b0dbee18a297c3cfe98c5ecd0706d0b | [
"Apache-2.0"
] | 1 | 2022-01-03T23:59:37.000Z | 2022-01-03T23:59:37.000Z | aws-cpp-sdk-kms/source/model/UpdateCustomKeyStoreRequest.cpp | ravindra-wagh/aws-sdk-cpp | 7d5ff01b3c3b872f31ca98fb4ce868cd01e97696 | [
"Apache-2.0"
] | 1 | 2021-12-30T04:25:33.000Z | 2021-12-30T04:25:33.000Z | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/kms/model/UpdateCustomKeyStoreRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::KMS::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateCustomKeyStoreRequest::UpdateCustomKeyStoreRequest() :
m_customKeyStoreIdHasBeenSet(false),
m_newCustomKeyStoreNameHasBeenSet(false),
m_keyStorePasswordHasBeenSet(false),
m_cloudHsmClusterIdHasBeenSet(false)
{
}
Aws::String UpdateCustomKeyStoreRequest::SerializePayload() const
{
JsonValue payload;
if(m_customKeyStoreIdHasBeenSet)
{
payload.WithString("CustomKeyStoreId", m_customKeyStoreId);
}
if(m_newCustomKeyStoreNameHasBeenSet)
{
payload.WithString("NewCustomKeyStoreName", m_newCustomKeyStoreName);
}
if(m_keyStorePasswordHasBeenSet)
{
payload.WithString("KeyStorePassword", m_keyStorePassword);
}
if(m_cloudHsmClusterIdHasBeenSet)
{
payload.WithString("CloudHsmClusterId", m_cloudHsmClusterId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection UpdateCustomKeyStoreRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "TrentService.UpdateCustomKeyStore"));
return headers;
}
| 21.938462 | 98 | 0.771388 | [
"model"
] |
683a68772b46282c39a6f76a7cea6a9dda2be35e | 1,969 | cc | C++ | csb/src/model/FindInstanceNodeListRequest.cc | iamzken/aliyun-openapi-cpp-sdk | 3c991c9ca949b6003c8f498ce7a672ea88162bf1 | [
"Apache-2.0"
] | 89 | 2018-02-02T03:54:39.000Z | 2021-12-13T01:32:55.000Z | csb/src/model/FindInstanceNodeListRequest.cc | iamzken/aliyun-openapi-cpp-sdk | 3c991c9ca949b6003c8f498ce7a672ea88162bf1 | [
"Apache-2.0"
] | 89 | 2018-03-14T07:44:54.000Z | 2021-11-26T07:43:25.000Z | csb/src/model/FindInstanceNodeListRequest.cc | aliyun/aliyun-openapi-cpp-sdk | 0cf5861ece17dfb0bb251f13bf3fbdb39c0c6e36 | [
"Apache-2.0"
] | 69 | 2018-01-22T09:45:52.000Z | 2022-03-28T07:58:38.000Z | /*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/csb/model/FindInstanceNodeListRequest.h>
using AlibabaCloud::CSB::Model::FindInstanceNodeListRequest;
FindInstanceNodeListRequest::FindInstanceNodeListRequest() :
RpcServiceRequest("csb", "2017-11-18", "FindInstanceNodeList")
{
setMethod(HttpRequest::Method::Get);
}
FindInstanceNodeListRequest::~FindInstanceNodeListRequest()
{}
bool FindInstanceNodeListRequest::getOnlyImported()const
{
return onlyImported_;
}
void FindInstanceNodeListRequest::setOnlyImported(bool onlyImported)
{
onlyImported_ = onlyImported;
setParameter("OnlyImported", onlyImported ? "true" : "false");
}
int FindInstanceNodeListRequest::getPageNum()const
{
return pageNum_;
}
void FindInstanceNodeListRequest::setPageNum(int pageNum)
{
pageNum_ = pageNum;
setParameter("PageNum", std::to_string(pageNum));
}
std::string FindInstanceNodeListRequest::getInstanceName()const
{
return instanceName_;
}
void FindInstanceNodeListRequest::setInstanceName(const std::string& instanceName)
{
instanceName_ = instanceName;
setParameter("InstanceName", instanceName);
}
int FindInstanceNodeListRequest::getPageSize()const
{
return pageSize_;
}
void FindInstanceNodeListRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
| 26.608108 | 83 | 0.760792 | [
"model"
] |
683de09930a24eb93245612bad6af20a780cf1b1 | 1,825 | cpp | C++ | Miscellaneous/graph1p1.cpp | hardik0899/Competitive_Programming | 199039ad7a26a5f48152fe231a9ca5ac8685a707 | [
"MIT"
] | 1 | 2020-10-16T18:14:30.000Z | 2020-10-16T18:14:30.000Z | Miscellaneous/graph1p1.cpp | hardik0899/Competitive_Programming | 199039ad7a26a5f48152fe231a9ca5ac8685a707 | [
"MIT"
] | null | null | null | Miscellaneous/graph1p1.cpp | hardik0899/Competitive_Programming | 199039ad7a26a5f48152fe231a9ca5ac8685a707 | [
"MIT"
] | 1 | 2021-01-06T04:45:38.000Z | 2021-01-06T04:45:38.000Z | #define __USE_MINGW_ANSI_STDIO 0
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <stack>
#include <deque>
#include <string.h>
#include <math.h>
using namespace std;
#define PI 4.0*atan(1.0)
#define epsilon 0.000000001
#define INF 1000000000000000000
#define MOD 1000000007
int N, K, ori [110][110], ret [110][110], summy = 0;
void matrixMult(int a [110][110], int b [110][110], int c [110][110]){
for(int i = 0; i < N; i++)
for(int j = 0; j < N; j++)
for(int k = 0; k < N; k++)
c[i][j] += (a[i][k]*b[k][j]);
}
void matrixExpo(int expo){
int temp [110][110];
for(int i = 8; i > -1; i--){
memset(temp, 0, sizeof(temp));
matrixMult(ret, ret, temp);
for(int a = 0; a < N; a++)
for(int b = 0; b < N; b++)
ret[a][b] = temp[a][b];
if((expo&(1<<i)) > 0){
memset(temp, 0, sizeof(temp));
matrixMult(ret, ori, temp);
for(int a = 0; a < N; a++)
for(int b = 0; b < N; b++)
ret[a][b] = temp[a][b];
}
}
}
// Alternative Approach to the Above: http://wcipeg.com/submissions/src/327471
int main(){
//freopen("necklace.in", "r", stdin); freopen("necklace.out", "w", stdout);
scanf("%d %d", &N, &K); memset(ret, 0, sizeof(ret));
for(int i = 0; i < N; i++){
ret[i][i] = 1;
for(int j = 0; j < N; j++) scanf("%d", &ori[i][j]);
}
matrixExpo(K);
for(int i = 0; i < N; i++)
for(int j = 0; j < N; j++)
summy += ret[i][j];
cout << summy << '\n';
return 0;
}
// Fibonacci Q-Matrix
// F_2 F_1
// F_1 F_0
// 1 1
// 1 0
| 25 | 79 | 0.503014 | [
"vector"
] |
684180454a71c398cd7aa04bb1c7d7a09b68a0f1 | 1,416 | cpp | C++ | coj.uci.cu/Primality.cpp | facug91/OJ-Solutions | 9aa55be066ce5596e4e64737c28cd3ff84e092fe | [
"Apache-2.0"
] | 6 | 2016-09-10T03:16:34.000Z | 2020-04-07T14:45:32.000Z | coj.uci.cu/Primality.cpp | facug91/OJ-Solutions | 9aa55be066ce5596e4e64737c28cd3ff84e092fe | [
"Apache-2.0"
] | null | null | null | coj.uci.cu/Primality.cpp | facug91/OJ-Solutions | 9aa55be066ce5596e4e64737c28cd3ff84e092fe | [
"Apache-2.0"
] | 2 | 2018-08-11T20:55:35.000Z | 2020-01-15T23:23:11.000Z | /*
By: facug91
From: http://coj.uci.cu/24h/problem.xhtml?pid=2019
Name: Primality
Date: 07/04/2015
*/
#include <bits/stdc++.h>
#define EPS 1e-9
#define DEBUG(x) cerr << "#" << (#x) << ": " << (x) << endl
const double PI = 2.0*acos(0.0);
#define INF 1000000000
//#define MOD 1000000
//#define MAXN 1000005
using namespace std;
typedef long long ll;
typedef pair<int, int> ii; typedef pair<int, ii> iii;
typedef vector<int> vi; typedef vector<ii> vii;
int n, arr[15], size;
bool sieve[10500];
vi primes;
set<int> ans;
bool is_prime (int n) {
if (n == 1) return false;
int pi = 0, p = primes[pi];
while (p*p <= n) {
if (n % p == 0) return false;
p = primes[++pi];
}
return true;
}
int main () {
ios_base::sync_with_stdio(0); cin.tie(0);
//cout<<fixed<<setprecision(10); cerr<<fixed<<setprecision(10); //cout.ignore(INT_MAX, ' ');
int i, j;
for (i=3; i<150; i+=2)
if (!sieve[i])
for (j=i*i; j<10500; j+=i+i)
sieve[j] = true;
primes.push_back(2);
for (i=3; i<10500; i+=2)
if (!sieve[i])
primes.push_back(i);
cin>>n;
size = 0;
while (n) {
arr[size++] = n % 10;
n /= 10;
}
sort(arr, arr+size);
do {
n = 0;
for (i=0; i<size; i++) n = n * 10 + arr[i];
if (is_prime(n)) ans.insert(n);
} while (next_permutation(arr, arr+size));
cout<<ans.size()<<"\n";
return 0;
}
| 21.134328 | 94 | 0.547316 | [
"vector"
] |
969646ed2539df16bfed15e3008aa5429ad93880 | 12,282 | cc | C++ | flamingo/common/gramgen.cc | TsinghuaDatabaseGroup/Similarity-Search-and-Join | 0fba32f030ca9e466d1aed9d3c7dcf59ea3e88dc | [
"BSD-2-Clause"
] | 14 | 2018-01-29T06:54:06.000Z | 2021-07-09T18:18:51.000Z | flamingo/common/gramgen.cc | TsinghuaDatabaseGroup/similarity | 0fba32f030ca9e466d1aed9d3c7dcf59ea3e88dc | [
"BSD-2-Clause"
] | null | null | null | flamingo/common/gramgen.cc | TsinghuaDatabaseGroup/similarity | 0fba32f030ca9e466d1aed9d3c7dcf59ea3e88dc | [
"BSD-2-Clause"
] | 11 | 2018-04-11T04:56:40.000Z | 2021-12-17T04:00:22.000Z | /*
$Id: gramgen.h Tue Apr 05 10:20:24 PDT 2008 abehm$
Copyright (C) 2010 by The Regents of the University of California
Redistribution of this file is permitted under
the terms of the BSD license
Date: 04/05/2008
Author: Rares Vernica <rares (at) ics.uci.edu>
Alexander Behm <abehm (at) ics.uci.edu>
*/
#include "gramgen.h"
#include <iostream>
using namespace std;
#if _WIN32
const hash_win32 GramGen::hashString = hash_win32();
#else
const hash<string> GramGen::hashString = hash<string>();
#endif
unsigned GramGenFixedLen::getPrePostStrLen(unsigned origStrLen) const {
if(prePost) return origStrLen;
else return origStrLen + 2 * q - 2;
}
GramGen* GramGen::loadGramGenInstance(ifstream& fpIn)
{
GramGenType ggt = GGT_FIXED;
fpIn.read((char*)&ggt, sizeof(GramGenType));
switch(ggt) {
case GGT_FIXED: return new GramGenFixedLen(fpIn); break;
case GGT_WORDS: return new WordGen(fpIn); break;
default:
cout << "ERROR: unknown gramgentype loaded from file!" << endl;
return NULL; break;
}
}
GramGenFixedLen::GramGenFixedLen(ifstream& fpIn)
{
fpIn.read((char*)&q, sizeof(uint));
fpIn.read((char*)&noSpace, sizeof(bool));
fpIn.read((char*)&prePost, sizeof(bool));
}
bool GramGenFixedLen::containsSpace(string& s) const
{
string::size_type loc = s.find(' ', 0);
return !(loc == string::npos);
}
void GramGenFixedLen::decompose(
const string &s,
vector<string> &res,
uchar st,
uchar en)
const
{
if(prePost) {
const string sPad = string(q - 1, st) + s + string(q - 1, en);
for (uint i = 0; i < s.length() + q - 1; i++) {
string substring = sPad.substr(i, q);
if(!(noSpace && containsSpace(substring)))
res.push_back(sPad.substr(i, q));
}
}
else {
if(s.length() < q) {
res.push_back(s);
return;
}
for (uint i = 0; i < s.length() - q + 1; i++) {
string substring = s.substr(i, q);
if(!(noSpace && containsSpace(substring)))
res.push_back(substring);
}
}
}
void GramGenFixedLen::decompose(
const string &s,
vector<uint> &res,
uchar st,
uchar en)
const
{
if(prePost) {
string sPad = string(q - 1, st) + s + string(q - 1, en);
for(uint i = 0; i < s.length() + q - 1; i++) {
string substring = sPad.substr(i, q);
if(!(noSpace && containsSpace(substring)))
res.push_back(hashString(substring));
}
}
else {
if(s.length() < q) {
res.push_back(hashString(s));
return;
}
for (uint i = 0; i < s.length() - q + 1; i++) {
string substring = s.substr(i, q);
if(!(noSpace && containsSpace(substring)))
res.push_back(hashString(substring));
}
}
}
void GramGenFixedLen::decompose(
const string &s,
multiset<string> &res,
uchar st,
uchar en)
const
{
if(prePost) {
const string sPad = string(q - 1, st) + s + string(q - 1, en);
for (uint i = 0; i < s.length() + q - 1; i++) {
string substring = sPad.substr(i, q);
if(!(noSpace && containsSpace(substring)))
res.insert(substring);
}
}
else {
if(s.length() < q) {
res.insert(s);
return;
}
for (uint i = 0; i < s.length() - q + 1; i++) {
string substring = s.substr(i, q);
if(!(noSpace && containsSpace(substring)))
res.insert(substring);
}
}
}
void GramGenFixedLen::decompose(
const string &s,
multiset<uint> &res,
uchar st,
uchar en)
const
{
if(prePost) {
const string sPad = string(q - 1, st) + s + string(q - 1, en);
for (uint i = 0; i < s.length() + q - 1; i++) {
string substring = sPad.substr(i, q);
if(!(noSpace && containsSpace(substring)))
res.insert(hashString(substring));
}
}
else {
if(s.length() < q) {
res.insert(hashString(s));
return;
}
for (uint i = 0; i < s.length() - q + 1; i++) {
string substring = s.substr(i, q);
if(!(noSpace && containsSpace(substring)))
res.insert(hashString(substring));
}
}
}
void GramGenFixedLen::decompose(
const string &s,
set<string> &res,
uchar st,
uchar en)
const
{
if(prePost) {
const string sPad = string(q - 1, st) + s + string(q - 1, en);
for (uint i = 0; i < s.length() + q - 1; i++) {
string substring = sPad.substr(i, q);
if(!(noSpace && containsSpace(substring)))
res.insert(substring);
}
}
else {
if(s.length() < q) {
res.insert(s);
return;
}
for (uint i = 0; i < s.length() - q + 1; i++) {
string substring = s.substr(i, q);
if(!(noSpace && containsSpace(substring)))
res.insert(substring);
}
}
}
void GramGenFixedLen::decompose(
const string &s,
set<uint> &res,
uchar st,
uchar en)
const
{
if(prePost) {
const string sPad = string(q - 1, st) + s + string(q - 1, en);
for (uint i = 0; i < s.length() + q - 1; i++) {
string substring = sPad.substr(i, q);
if(!(noSpace && containsSpace(substring)))
res.insert(hashString(substring));
}
}
else {
if(s.length() < q) {
res.insert(hashString(s));
return;
}
for (uint i = 0; i < s.length() - q + 1; i++) {
string substring = s.substr(i, q);
if(!(noSpace && containsSpace(substring)))
res.insert(hashString(substring));
}
}
}
void GramGenFixedLen::decompose(
const string &s,
map<uint, uint> &res,
uchar st,
uchar en)
const
{
if(prePost) {
const string sPad = string(q - 1, st) + s + string(q - 1, en);
for (uint i = 0; i < s.length() + q - 1; i++) {
string substring = sPad.substr(i, q);
if(!(noSpace && containsSpace(substring)))
res[hashString(substring)]++;
}
}
else {
if(s.length() < q) {
res[hashString(s)]++;
return;
}
for (uint i = 0; i < s.length() - q + 1; i++) {
string substring = s.substr(i, q);
if(!(noSpace && containsSpace(substring)))
res[hashString(substring)]++;
}
}
}
uint GramGenFixedLen::getNumGrams(const string& s) const
{
if(prePost) return s.length() + q - 1;
else return (s.length() < q) ? s.length() : s.length() - q + 1;
}
void
GramGenFixedLen::
getPrePostString(const std::string& src, std::string& dest, uchar st, uchar en) const {
if(prePost) dest = string(q - 1, st) + src + string(q - 1, en);
else dest = src;
}
void GramGenFixedLen::saveGramGenInstance(ofstream& fpOut)
{
fpOut.write((const char*)&gramGenType, sizeof(gramGenType));
fpOut.write((const char*)&q, sizeof(uint));
fpOut.write((const char*)&noSpace, sizeof(bool));
fpOut.write((const char*)&prePost, sizeof(bool));
}
void WordGen::decompose(
const string &s,
vector<string> &res,
uchar st,
uchar en)
const
{
// Skip delimiter at beginning.
string::size_type lastPos = s.find_first_not_of(delimiter, 0);
// Find first "non-delimiter".
string::size_type pos = s.find_first_of(delimiter, lastPos);
while (string::npos != pos || string::npos != lastPos) {
// Found a token, add it to the vector.
res.push_back(s.substr(lastPos, pos - lastPos));
// Skip delimiter. Note the "not_of"
lastPos = s.find_first_not_of(delimiter, pos);
// Find next "non-delimiter"
pos = s.find_first_of(delimiter, lastPos);
}
}
void WordGen::decompose(
const string &s,
vector<uint> &res,
uchar st,
uchar en)
const
{
// Skip delimiter at beginning.
string::size_type lastPos = s.find_first_not_of(delimiter, 0);
// Find first "non-delimiter".
string::size_type pos = s.find_first_of(delimiter, lastPos);
while (string::npos != pos || string::npos != lastPos) {
// Found a token, add it to the vector.
res.push_back(hashString(s.substr(lastPos, pos - lastPos)));
// Skip delimiter. Note the "not_of"
lastPos = s.find_first_not_of(delimiter, pos);
// Find next "non-delimiter"
pos = s.find_first_of(delimiter, lastPos);
}
}
void WordGen::decompose(
const string &s,
multiset<string> &res,
uchar st,
uchar en)
const
{
// Skip delimiter at beginning.
string::size_type lastPos = s.find_first_not_of(delimiter, 0);
// Find first "non-delimiter".
string::size_type pos = s.find_first_of(delimiter, lastPos);
while (string::npos != pos || string::npos != lastPos) {
// Found a token, add it to the vector.
res.insert(s.substr(lastPos, pos - lastPos));
// Skip delimiter. Note the "not_of"
lastPos = s.find_first_not_of(delimiter, pos);
// Find next "non-delimiter"
pos = s.find_first_of(delimiter, lastPos);
}
}
void WordGen::decompose(
const string &s,
multiset<uint> &res,
uchar st,
uchar en)
const
{
// Skip delimiter at beginning.
string::size_type lastPos = s.find_first_not_of(delimiter, 0);
// Find first "non-delimiter".
string::size_type pos = s.find_first_of(delimiter, lastPos);
while (string::npos != pos || string::npos != lastPos) {
// Found a token, add it to the vector.
res.insert(hashString(s.substr(lastPos, pos - lastPos)));
// Skip delimiter. Note the "not_of"
lastPos = s.find_first_not_of(delimiter, pos);
// Find next "non-delimiter"
pos = s.find_first_of(delimiter, lastPos);
}
}
void WordGen::decompose(
const string &s,
set<string> &res,
uchar st,
uchar en)
const
{
// Skip delimiter at beginning.
string::size_type lastPos = s.find_first_not_of(delimiter, 0);
// Find first "non-delimiter".
string::size_type pos = s.find_first_of(delimiter, lastPos);
while (string::npos != pos || string::npos != lastPos) {
// Found a token, add it to the vector.
res.insert(s.substr(lastPos, pos - lastPos));
// Skip delimiter. Note the "not_of"
lastPos = s.find_first_not_of(delimiter, pos);
// Find next "non-delimiter"
pos = s.find_first_of(delimiter, lastPos);
}
}
void WordGen::decompose(
const string &s,
set<uint> &res,
uchar st,
uchar en)
const
{
// Skip delimiter at beginning.
string::size_type lastPos = s.find_first_not_of(delimiter, 0);
// Find first "non-delimiter".
string::size_type pos = s.find_first_of(delimiter, lastPos);
while (string::npos != pos || string::npos != lastPos) {
// Found a token, add it to the vector.
res.insert(hashString(s.substr(lastPos, pos - lastPos)));
// Skip delimiter. Note the "not_of"
lastPos = s.find_first_not_of(delimiter, pos);
// Find next "non-delimiter"
pos = s.find_first_of(delimiter, lastPos);
}
}
void WordGen::decompose(
const string &s,
map<uint, uint> &res,
uchar st,
uchar en)
const
{
// Skip delimiter at beginning.
string::size_type lastPos = s.find_first_not_of(delimiter, 0);
// Find first "non-delimiter".
string::size_type pos = s.find_first_of(delimiter, lastPos);
while (string::npos != pos || string::npos != lastPos) {
// Found a token, add it to the vector.
res[hashString(s.substr(lastPos, pos - lastPos))]++;
// Skip delimiter. Note the "not_of"
lastPos = s.find_first_not_of(delimiter, pos);
// Find next "non-delimiter"
pos = s.find_first_of(delimiter, lastPos);
}
}
uint WordGen::getNumGrams(const string& s) const
{
// Skip delimiter at beginning.
string::size_type lastPos = s.find_first_not_of(delimiter, 0);
// Find first "non-delimiter".
string::size_type pos = s.find_first_of(delimiter, lastPos);
unsigned count = 0;
while (string::npos != pos || string::npos != lastPos) {
count++;
// Skip delimiter. Note the "not_of"
lastPos = s.find_first_not_of(delimiter, pos);
// Find next "non-delimiter"
pos = s.find_first_of(delimiter, lastPos);
}
return count;
}
unsigned
WordGen::getPrePostStrLen(unsigned origStrLen) const {
return origStrLen;
}
void
WordGen::
getPrePostString(const std::string& src, std::string& dest, uchar st, uchar en) const {
dest = src;
}
WordGen::WordGen(ifstream& fpIn)
{
unsigned len;
fpIn.read((char*)&len, sizeof(uint));
char s[len];
fpIn.read(s, len);
delimiter.assign(s, len);
fpIn.read((char*)&gramGenType, sizeof(GramGenType));
fpIn.read((char*)&prePost, sizeof(bool));
}
void WordGen::saveGramGenInstance(ofstream& fpOut)
{
uint len = delimiter.length();
fpOut.write((const char*)&len, sizeof(uint));
fpOut.write((const char*)delimiter.c_str(), len);
fpOut.write((const char*)&gramGenType, sizeof(GramGenType));
fpOut.write((const char*)&prePost, sizeof(bool));
}
| 25.376033 | 87 | 0.630109 | [
"vector"
] |
96a2ef011f2394dfef29877849bd30f477308c2f | 264,761 | cpp | C++ | pj_loud_talking_detector/micro_features/model_5sec.cpp | iwatake2222/loud_talking_detector | 3b137877d227dc97810bebc7d712726aa374f47a | [
"Apache-2.0"
] | 16 | 2021-04-08T13:29:21.000Z | 2022-03-24T10:55:01.000Z | pj_loud_talking_detector/micro_features/model_5sec.cpp | iwatake2222/pico-loud_talking_detector | 3b137877d227dc97810bebc7d712726aa374f47a | [
"Apache-2.0"
] | null | null | null | pj_loud_talking_detector/micro_features/model_5sec.cpp | iwatake2222/pico-loud_talking_detector | 3b137877d227dc97810bebc7d712726aa374f47a | [
"Apache-2.0"
] | null | null | null | /* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
// This is a standard TensorFlow Lite FlatBuffer model file that has been
// converted into a C data array, so it can be easily compiled into a binary
// for devices that don't have a file system. It was created using the command:
// xxd -i model.tflite > model.cc
#include "micro_features/model.h"
// We need to keep the data array aligned on some architectures.
#ifdef __has_attribute
#define HAVE_ATTRIBUTE(x) __has_attribute(x)
#else
#define HAVE_ATTRIBUTE(x) 0
#endif
#if HAVE_ATTRIBUTE(aligned) || (defined(__GNUC__) && !defined(__clang__))
#define DATA_ALIGN_ATTRIBUTE __attribute__((aligned(4)))
#else
#define DATA_ALIGN_ATTRIBUTE
#endif
const unsigned char g_model_5sec[] DATA_ALIGN_ATTRIBUTE = {
0x20, 0x00, 0x00, 0x00, 0x54, 0x46, 0x4c, 0x33, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x12, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0c, 0x00,
0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x18, 0x00, 0x12, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x4c, 0xa6, 0x00, 0x00, 0xec, 0x9f, 0x00, 0x00,
0xd4, 0x9f, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0c, 0x00,
0x04, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x0b, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x6d, 0x69, 0x6e, 0x5f,
0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x8c, 0x9f, 0x00, 0x00,
0x74, 0x9f, 0x00, 0x00, 0x24, 0x03, 0x00, 0x00, 0xf4, 0x02, 0x00, 0x00,
0xec, 0x02, 0x00, 0x00, 0xe4, 0x02, 0x00, 0x00, 0xc4, 0x02, 0x00, 0x00,
0xbc, 0x02, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
0x1c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x5e, 0x5f, 0xff, 0xff,
0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x31, 0x2e, 0x35, 0x2e,
0x30, 0x00, 0x00, 0x00, 0xdc, 0x5c, 0xff, 0xff, 0xe0, 0x5c, 0xff, 0xff,
0x7a, 0x5f, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00,
0x19, 0xca, 0xeb, 0xee, 0x30, 0xf9, 0xbe, 0xe5, 0x11, 0x03, 0xc7, 0xf9,
0x18, 0xef, 0xf8, 0xd8, 0x17, 0xfa, 0xf2, 0xbd, 0xfc, 0xf9, 0xbd, 0xfb,
0x25, 0xf6, 0xdc, 0xf8, 0x35, 0xea, 0xcf, 0xcb, 0xd6, 0x0b, 0xa4, 0x0b,
0xde, 0xbd, 0xdd, 0x11, 0xf9, 0x1a, 0xcd, 0x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bd, 0xe0, 0xc1, 0xe9, 0xfc, 0xc4, 0xeb,
0xf9, 0x38, 0x23, 0x0d, 0x11, 0xe9, 0xc0, 0xbb, 0xf9, 0xf8, 0xe9, 0xfa,
0xd2, 0xb1, 0x1c, 0xe8, 0xda, 0x12, 0x05, 0xf7, 0xf1, 0xeb, 0x37, 0xef,
0x05, 0x2e, 0xe3, 0xee, 0xd0, 0xea, 0x60, 0xee, 0xf1, 0x33, 0x08, 0x08,
0xda, 0x0b, 0x42, 0x00, 0x70, 0x5f, 0xff, 0xff, 0x0a, 0x62, 0xff, 0xff,
0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
0xf9, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x90, 0x5f, 0xff, 0xff, 0x94, 0x5f, 0xff, 0xff, 0x2e, 0x62, 0xff, 0xff,
0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x42, 0xfb, 0xff, 0xff,
0xd4, 0xff, 0xff, 0xff, 0x47, 0x01, 0x00, 0x00, 0xd8, 0x01, 0x00, 0x00,
0x90, 0xfc, 0xff, 0xff, 0x50, 0x00, 0x00, 0x00, 0x7a, 0xf9, 0xff, 0xff,
0x08, 0x03, 0x00, 0x00, 0x5a, 0x62, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00,
0x40, 0x9c, 0x00, 0x00, 0xf9, 0x13, 0xe2, 0x0e, 0x05, 0xe7, 0xeb, 0x0c,
0x08, 0xf9, 0xe9, 0xe1, 0x0a, 0xf1, 0x1e, 0x01, 0xd8, 0x06, 0x06, 0x17,
0xff, 0xf0, 0xee, 0x03, 0xd8, 0x0d, 0x00, 0x0d, 0x0a, 0xfb, 0x21, 0xe4,
0xd4, 0x04, 0xf9, 0xff, 0xe7, 0x0c, 0x11, 0xe8, 0xd5, 0xed, 0xf6, 0x17,
0xee, 0xee, 0x06, 0xea, 0x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00, 0x00,
0x54, 0x4f, 0x43, 0x4f, 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74,
0x65, 0x64, 0x2e, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x24, 0xfb, 0xff, 0xff, 0x68, 0x01, 0x00, 0x00, 0x5c, 0x01, 0x00, 0x00,
0x50, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0xf4, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0xce, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x09,
0x03, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x1a, 0xff, 0xff, 0xff, 0x00, 0x00, 0x80, 0x3f,
0x01, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x18, 0x00, 0x08, 0x00,
0x0c, 0x00, 0x10, 0x00, 0x07, 0x00, 0x14, 0x00, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xc4, 0xfc, 0xff, 0xff,
0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0e, 0x00, 0x16, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0c, 0x00,
0x07, 0x00, 0x10, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x38, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0e, 0x00, 0x14, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0c, 0x00,
0x10, 0x00, 0x07, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0e, 0x00, 0x1a, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x10, 0x00,
0x07, 0x00, 0x14, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11,
0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00,
0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x08, 0x00, 0x04, 0x00,
0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0xf9, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x34, 0x04, 0x00, 0x00,
0xcc, 0x03, 0x00, 0x00, 0x4c, 0x03, 0x00, 0x00, 0xdc, 0x02, 0x00, 0x00,
0x60, 0x02, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x00,
0x44, 0x01, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x02, 0xfc, 0xff, 0xff, 0x00, 0x00, 0x00, 0x09, 0x44, 0x00, 0x00, 0x00,
0x07, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0xf4, 0xfb, 0xff, 0xff, 0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3b, 0x0e, 0x00, 0x00, 0x00,
0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x5f, 0x73, 0x6f, 0x66, 0x74, 0x6d,
0x61, 0x78, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x1a, 0x00, 0x08, 0x00,
0x07, 0x00, 0x0c, 0x00, 0x10, 0x00, 0x14, 0x00, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x09, 0xb4, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x94, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00,
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0c, 0x00, 0x12, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbe, 0xaa, 0x1b, 0x3a,
0xab, 0xba, 0x35, 0x39, 0x29, 0x73, 0xc2, 0x39, 0x5e, 0xec, 0x82, 0x3a,
0xff, 0x03, 0x51, 0x3a, 0x4a, 0x37, 0xe7, 0x39, 0xc9, 0x46, 0xb8, 0x39,
0x43, 0x39, 0x00, 0x3a, 0x12, 0x00, 0x00, 0x00, 0x66, 0x69, 0x72, 0x73,
0x74, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0x2f, 0x72, 0x65,
0x61, 0x64, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x0a, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x3a, 0xfd, 0xff, 0xff, 0x00, 0x00, 0x00, 0x09, 0x54, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x2c, 0xfd, 0xff, 0xff, 0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x4e, 0x80, 0xca, 0x39, 0x1f, 0x00, 0x00, 0x00,
0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x63, 0x5f, 0x77, 0x65, 0x69,
0x67, 0x68, 0x74, 0x73, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x2f, 0x74, 0x72,
0x61, 0x6e, 0x73, 0x70, 0x6f, 0x73, 0x65, 0x00, 0x02, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x20, 0x4e, 0x00, 0x00, 0xa2, 0xfd, 0xff, 0xff,
0x00, 0x00, 0x00, 0x09, 0x58, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x44, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x74, 0xfe, 0xff, 0xff,
0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf9, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0xb1, 0x6c, 0x2a, 0x3d, 0x01, 0x00, 0x00, 0x00, 0x10, 0xf2, 0xb1, 0x40,
0x01, 0x00, 0x00, 0x00, 0x77, 0x92, 0xa1, 0xc0, 0x05, 0x00, 0x00, 0x00,
0x61, 0x64, 0x64, 0x5f, 0x31, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0e, 0xfe, 0xff, 0xff,
0x00, 0x00, 0x00, 0x02, 0x2c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00,
0x04, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x52, 0x65, 0x73, 0x68,
0x61, 0x70, 0x65, 0x5f, 0x32, 0x2f, 0x73, 0x68, 0x61, 0x70, 0x65, 0x00,
0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x4a, 0xfe, 0xff, 0xff,
0x00, 0x00, 0x00, 0x09, 0x5c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
0x44, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1c, 0xff, 0xff, 0xff,
0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x41, 0x41, 0xd1, 0x3d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x70, 0xd0, 0x41,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
0x52, 0x65, 0x73, 0x68, 0x61, 0x70, 0x65, 0x5f, 0x32, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00,
0x28, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xc2, 0xfe, 0xff, 0xff,
0x00, 0x00, 0x00, 0x09, 0x58, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
0x40, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x94, 0xff, 0xff, 0xff,
0x2c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x41, 0x41, 0xd1, 0x3d,
0x01, 0x00, 0x00, 0x00, 0x00, 0x70, 0xd0, 0x41, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x52, 0x65, 0x73, 0x68,
0x61, 0x70, 0x65, 0x5f, 0x31, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0xe8, 0x26, 0x00, 0x00, 0x2e, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x09, 0x60, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
0x4c, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x14, 0x00,
0x04, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00,
0x2c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x9a, 0x38, 0x3e, 0x3d,
0x01, 0x00, 0x00, 0x00, 0x61, 0x7a, 0x3d, 0x41, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x52, 0x65, 0x6c, 0x75,
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x7d, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0xaa, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x02, 0x44, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x9c, 0xff, 0xff, 0xff, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x78, 0x96, 0x37,
0x0b, 0x00, 0x00, 0x00, 0x4d, 0x61, 0x74, 0x4d, 0x75, 0x6c, 0x5f, 0x62,
0x69, 0x61, 0x73, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0e, 0x00, 0x18, 0x00, 0x08, 0x00, 0x07, 0x00, 0x0c, 0x00,
0x10, 0x00, 0x14, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0xa0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x26, 0x7c, 0x7e, 0x38, 0xb8, 0x8b, 0x94, 0x37,
0x95, 0xf1, 0x1e, 0x38, 0xb0, 0x08, 0xd6, 0x38, 0x8a, 0xd9, 0xaa, 0x38,
0x13, 0xff, 0x3c, 0x38, 0xc3, 0xa0, 0x16, 0x38, 0xde, 0x9e, 0x51, 0x38,
0x0b, 0x00, 0x00, 0x00, 0x43, 0x6f, 0x6e, 0x76, 0x32, 0x44, 0x5f, 0x62,
0x69, 0x61, 0x73, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
0x1c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xe6, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x19, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
0x06, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x16, 0x0a, 0x00,
0x0e, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0a, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00,
0x0c, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0a, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, 0x00
};
const int g_model_5sec_len = 42704;
| 73.565157 | 80 | 0.649114 | [
"model"
] |
96aff72318cfacb4744fa6255d066d701eac0ad7 | 8,964 | cxx | C++ | com/svcdlls/trksvcs/common/rpcsvr.cxx | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | com/svcdlls/trksvcs/common/rpcsvr.cxx | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | com/svcdlls/trksvcs/common/rpcsvr.cxx | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z |
// Copyright (c) 1996-1999 Microsoft Corporation
//+============================================================================
//
// rpcsvr.cxx
//
// Implementation of CRpcServer, with the common code to support
// trkwks & trksvr RPC servers.
//
//+============================================================================
#include <pch.cxx>
#pragma hdrstop
#include "trklib.hxx"
#define THIS_FILE_NUMBER RPCSVR_CXX_FILE_NO
//+----------------------------------------------------------------------------
//
// CRpcServer::Initialize
//
// Initialize the CRpcServer base class. Before calling this
// method, a derivation should perform all of its necessary
// RpcUseProtseq calls.
//
// If a ptszProtSeqForEpRegistration is specified, find the
// binding handle for that protocol and register this interface
// just with that binding.
//
//+----------------------------------------------------------------------------
void
CRpcServer::Initialize(RPC_IF_HANDLE ifspec,
ULONG grfRpcServerRegisterInterfaceEx,
UINT cMaxCalls,
BOOL fSetAuthInfo,
const TCHAR *ptszProtSeqForEpRegistration )
{
RPC_STATUS rpcstatus;
RPC_BINDING_VECTOR *pBindingVector = NULL;
TCHAR *ptszStringBinding = NULL;
TCHAR *ptszProtSeq = NULL;
_ifspec = ifspec;
_fEpRegister = NULL != ptszProtSeqForEpRegistration;
__try
{
// If required, set authentication information
if( RpcSecurityEnabled() && fSetAuthInfo )
{
RPC_TCHAR tszAuthName[MAX_COMPUTERNAME_LENGTH * 2 + 2 + 1]; // slash and $ and NUL
CMachineId mcid(MCID_LOCAL);
// Get the authentiation name, e.g. domain\machine$
mcid.GetLocalAuthName(tszAuthName, sizeof(tszAuthName)/sizeof(tszAuthName[0]));
// Set the auth info. We set it to negotiate, but we'll always get Kerberos.
rpcstatus = RpcServerRegisterAuthInfo(
tszAuthName,
RPC_C_AUTHN_GSS_NEGOTIATE,
NULL, // RPC_AUTH_KEY_RETRIEVAL_FN,
NULL ); // Arg );
if (rpcstatus)
{
TrkReportInternalError( THIS_FILE_NUMBER, __LINE__,
HRESULT_FROM_WIN32(rpcstatus), tszAuthName );
TrkRaiseWin32Error(rpcstatus);
}
}
// If using dynamic enpoints, register in the endpoint mapper
// for the first binding handle for the specified protocol sequence.
if( _fEpRegister )
{
// Query for the currently active binding handles
rpcstatus = RpcServerInqBindings(&pBindingVector);
if (rpcstatus)
{
TrkLog((TRKDBG_ERROR, TEXT("RpcServerInqBindings %08x"), rpcstatus));
TrkReportInternalError( THIS_FILE_NUMBER, __LINE__,
HRESULT_FROM_WIN32(rpcstatus), TRKREPORT_LAST_PARAM );
TrkRaiseWin32Error(rpcstatus);
}
// Loop through the binding handles, looking for the first one with
// the required protocol sequence.
for( ULONG i = 0; i < pBindingVector->Count; i++ )
{
// Stringize the binding handle.
rpcstatus = RpcBindingToStringBinding( pBindingVector->BindingH[i],
&ptszStringBinding );
if( RPC_S_OK != rpcstatus )
{
TrkLog(( TRKDBG_ERROR, TEXT("RpcBindingToStringBinding %08x"), rpcstatus ));
TrkReportInternalError( THIS_FILE_NUMBER, __LINE__, HRESULT_FROM_WIN32(rpcstatus), TRKREPORT_LAST_PARAM );
TrkRaiseWin32Error(rpcstatus);
}
// Parse the binding string for the protseq
rpcstatus = RpcStringBindingParse( ptszStringBinding, NULL,
&ptszProtSeq,
NULL, NULL, NULL );
if( RPC_S_OK != rpcstatus )
{
TrkLog(( TRKDBG_ERROR, TEXT("RpcStringBindingParse %08x"), rpcstatus ));
TrkReportInternalError( THIS_FILE_NUMBER, __LINE__, HRESULT_FROM_WIN32(rpcstatus), TRKREPORT_LAST_PARAM );
TrkRaiseWin32Error(rpcstatus);
}
// See if this protseq is that which we seek
if( 0 == _tcscmp( ptszProtSeq, ptszProtSeqForEpRegistration ))
{
// We have a match. Register against this binding handle.
RPC_BINDING_VECTOR PartialBindingVector;
PartialBindingVector.Count = 1;
PartialBindingVector.BindingH[0] = pBindingVector->BindingH[i];
rpcstatus = RpcEpRegister(ifspec, &PartialBindingVector, NULL, NULL);
if( RPC_S_OK != rpcstatus )
{
TrkLog((TRKDBG_ERROR, TEXT("RpcEpRegister %08x"), rpcstatus));
TrkReportInternalError( THIS_FILE_NUMBER, __LINE__, HRESULT_FROM_WIN32(rpcstatus), TRKREPORT_LAST_PARAM );
TrkRaiseWin32Error(rpcstatus);
}
else
TrkLog(( TRKDBG_MISC, TEXT("RpcEpRegister on %s"), ptszStringBinding ));
break;
}
RpcStringFree( &ptszStringBinding );
ptszStringBinding = NULL;
RpcStringFree( &ptszProtSeq );
ptszProtSeq = NULL;
}
if( i == pBindingVector->Count )
{
TrkLog((TRKDBG_ERROR, TEXT("Couldn't find protseq %s in binding vector"),
ptszProtSeqForEpRegistration ));
TrkReportInternalError( THIS_FILE_NUMBER, __LINE__, HRESULT_FROM_WIN32(rpcstatus), TRKREPORT_LAST_PARAM );
TrkRaiseWin32Error( HRESULT_FROM_WIN32(RPC_S_NO_PROTSEQS_REGISTERED) );
}
} // if( _fEpRegister )
// Finally, register the server interface
rpcstatus = RpcServerRegisterIfEx(ifspec, NULL, NULL,
grfRpcServerRegisterInterfaceEx,
cMaxCalls, NULL );
if (rpcstatus != RPC_S_OK && rpcstatus != RPC_S_TYPE_ALREADY_REGISTERED)
{
TrkLog((TRKDBG_ERROR, TEXT("RpcServerRegisterIf %08x"), rpcstatus));
TrkReportInternalError( THIS_FILE_NUMBER, __LINE__,
HRESULT_FROM_WIN32(rpcstatus), TRKREPORT_LAST_PARAM );
TrkRaiseWin32Error(rpcstatus);
}
}
__finally
{
if( NULL != pBindingVector )
RpcBindingVectorFree( &pBindingVector );
if( NULL != ptszStringBinding )
RpcStringFree( &ptszStringBinding );
if( NULL != ptszProtSeq )
RpcStringFree( &ptszProtSeq );
}
}
//+----------------------------------------------------------------------------
//
// CRpcServer::UnInitialize
//
// Unregister the interface, and if necessary unregister the endpoints.
//
//+----------------------------------------------------------------------------
void
CRpcServer::UnInitialize()
{
RPC_STATUS rpcstatus;
RPC_BINDING_VECTOR *pBindingVector = NULL;
if (_ifspec == NULL)
return;
// If we registered with the endpoint mapper, unreg now.
if( _fEpRegister )
{
// Ignore any errors; we should still unregister the interface
// no matter what.
rpcstatus = RpcServerInqBindings(&pBindingVector);
if (rpcstatus)
{
TrkLog((TRKDBG_ERROR, TEXT("RpcServerInqBindings %08x"), rpcstatus));
}
else
{
rpcstatus = RpcEpUnregister(_ifspec, pBindingVector, NULL);
RpcBindingVectorFree( &pBindingVector );
if( RPC_S_OK != rpcstatus && EPT_S_NOT_REGISTERED != rpcstatus )
{
TrkLog((TRKDBG_ERROR, TEXT("RpcEpUnregister %08x"), rpcstatus));
}
}
}
// Unregister the interface
rpcstatus = RpcServerUnregisterIf(_ifspec, NULL, 1 /* wait for calls */);
if (rpcstatus != RPC_S_OK)
{
TrkLog((TRKDBG_ERROR, TEXT("RpcServerUnregisterIf %08x"), rpcstatus));
//TrkRaiseWin32Error(rpcstatus);
}
CTrkRpcConfig::UnInitialize();
_ifspec = NULL;
_fEpRegister = FALSE;
}
| 37.041322 | 131 | 0.518407 | [
"vector"
] |
96c157ee696ec3105bc068491182e1b068b17dec | 991 | cpp | C++ | String/344. Reverse String/main.cpp | Minecodecraft/LeetCode-Minecode | 185fd6efe88d8ffcad94e581915c41502a0361a0 | [
"MIT"
] | 1 | 2021-11-19T19:58:33.000Z | 2021-11-19T19:58:33.000Z | String/344. Reverse String/main.cpp | Minecodecraft/LeetCode-Minecode | 185fd6efe88d8ffcad94e581915c41502a0361a0 | [
"MIT"
] | null | null | null | String/344. Reverse String/main.cpp | Minecodecraft/LeetCode-Minecode | 185fd6efe88d8ffcad94e581915c41502a0361a0 | [
"MIT"
] | 2 | 2021-11-26T12:47:27.000Z | 2022-01-13T16:14:46.000Z | //
// main.cpp
// 344. Reverse String
//
// Created by 边俊林 on 2019/8/11.
// Copyright © 2019 Minecode.Link. All rights reserved.
//
/* ------------------------------------------------------ *\
https://leetcode.com/problems/reverse-string/
\* ------------------------------------------------------ */
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
using namespace std;
/// Solution:
//
class Solution {
public:
void reverseString(vector<char>& s) {
if (s.size() <= 0) return;
int l = 0, r = s.size()-1;
while (l < r) {
swap(s[l++], s[r--]);
}
}
};
int main() {
Solution sol = Solution();
vector<char> s = {'h','e','l','l','o'};
sol.reverseString(s);
for_each(s.begin(), s.end(), [](char ch) { cout << ch << " "; });
return 0;
}
| 20.22449 | 69 | 0.504541 | [
"vector"
] |
96c7ed27f6547c184f31cf4ebda497637cf88d31 | 1,715 | hpp | C++ | libs/sprite/include/sge/sprite/buffers/multi_decl.hpp | cpreh/spacegameengine | 313a1c34160b42a5135f8223ffaa3a31bc075a01 | [
"BSL-1.0"
] | 2 | 2016-01-27T13:18:14.000Z | 2018-05-11T01:11:32.000Z | libs/sprite/include/sge/sprite/buffers/multi_decl.hpp | cpreh/spacegameengine | 313a1c34160b42a5135f8223ffaa3a31bc075a01 | [
"BSL-1.0"
] | null | null | null | libs/sprite/include/sge/sprite/buffers/multi_decl.hpp | cpreh/spacegameengine | 313a1c34160b42a5135f8223ffaa3a31bc075a01 | [
"BSL-1.0"
] | 3 | 2018-05-11T01:11:34.000Z | 2021-04-24T19:47:45.000Z | // Copyright Carl Philipp Reh 2006 - 2019.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef SGE_SPRITE_BUFFERS_MULTI_DECL_HPP_INCLUDED
#define SGE_SPRITE_BUFFERS_MULTI_DECL_HPP_INCLUDED
#include <sge/renderer/device/core_ref.hpp>
#include <sge/renderer/vertex/const_declaration_ref.hpp>
#include <sge/renderer/vertex/declaration_fwd.hpp>
#include <sge/sprite/count.hpp>
#include <sge/sprite/buffers/multi_fwd.hpp>
#include <sge/sprite/buffers/object.hpp>
#include <sge/sprite/buffers/option.hpp>
#include <sge/sprite/buffers/slice_fwd.hpp>
#include <fcppt/nonmovable.hpp>
#include <fcppt/unique_ptr_decl.hpp>
#include <fcppt/config/external_begin.hpp>
#include <vector>
#include <fcppt/config/external_end.hpp>
namespace sge::sprite::buffers
{
template <typename Choices>
class multi
{
FCPPT_NONMOVABLE(multi);
public:
using choices = Choices;
multi(
sge::renderer::device::core_ref,
sge::renderer::vertex::const_declaration_ref,
sge::sprite::buffers::option);
~multi();
using slice_type = sge::sprite::buffers::slice<Choices>;
[[nodiscard]] slice_type allocate(sge::sprite::count);
[[nodiscard]] sge::renderer::vertex::declaration const &vertex_declaration() const;
private:
sge::renderer::device::core_ref const renderer_;
sge::renderer::vertex::const_declaration_ref const vertex_declaration_;
sge::sprite::buffers::option const buffers_option_;
using buffers_object = sge::sprite::buffers::object<Choices>;
using buffer_vector = std::vector<fcppt::unique_ptr<buffers_object>>;
buffer_vector buffers_;
};
}
#endif
| 26.796875 | 85 | 0.753353 | [
"object",
"vector"
] |
96cb752ea551b3c3f9e4ca539b0c4f94cd6c1ce2 | 12,334 | cc | C++ | alb/src/model/ListRulesResult.cc | aliyun/aliyun-openapi-cpp-sdk | 0cf5861ece17dfb0bb251f13bf3fbdb39c0c6e36 | [
"Apache-2.0"
] | 89 | 2018-02-02T03:54:39.000Z | 2021-12-13T01:32:55.000Z | alb/src/model/ListRulesResult.cc | aliyun/aliyun-openapi-cpp-sdk | 0cf5861ece17dfb0bb251f13bf3fbdb39c0c6e36 | [
"Apache-2.0"
] | 89 | 2018-03-14T07:44:54.000Z | 2021-11-26T07:43:25.000Z | alb/src/model/ListRulesResult.cc | aliyun/aliyun-openapi-cpp-sdk | 0cf5861ece17dfb0bb251f13bf3fbdb39c0c6e36 | [
"Apache-2.0"
] | 69 | 2018-01-22T09:45:52.000Z | 2022-03-28T07:58:38.000Z | /*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/alb/model/ListRulesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Alb;
using namespace AlibabaCloud::Alb::Model;
ListRulesResult::ListRulesResult() :
ServiceResult()
{}
ListRulesResult::ListRulesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListRulesResult::~ListRulesResult()
{}
void ListRulesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allRulesNode = value["Rules"]["Rule"];
for (auto valueRulesRule : allRulesNode)
{
Rule rulesObject;
if(!valueRulesRule["ListenerId"].isNull())
rulesObject.listenerId = valueRulesRule["ListenerId"].asString();
if(!valueRulesRule["LoadBalancerId"].isNull())
rulesObject.loadBalancerId = valueRulesRule["LoadBalancerId"].asString();
if(!valueRulesRule["Priority"].isNull())
rulesObject.priority = std::stoi(valueRulesRule["Priority"].asString());
if(!valueRulesRule["RuleId"].isNull())
rulesObject.ruleId = valueRulesRule["RuleId"].asString();
if(!valueRulesRule["RuleName"].isNull())
rulesObject.ruleName = valueRulesRule["RuleName"].asString();
if(!valueRulesRule["RuleStatus"].isNull())
rulesObject.ruleStatus = valueRulesRule["RuleStatus"].asString();
if(!valueRulesRule["Direction"].isNull())
rulesObject.direction = valueRulesRule["Direction"].asString();
if(!valueRulesRule["ServiceManagedEnabled"].isNull())
rulesObject.serviceManagedEnabled = valueRulesRule["ServiceManagedEnabled"].asString() == "true";
if(!valueRulesRule["ServiceManagedMode"].isNull())
rulesObject.serviceManagedMode = valueRulesRule["ServiceManagedMode"].asString();
auto allRuleActionsNode = valueRulesRule["RuleActions"]["Action"];
for (auto valueRulesRuleRuleActionsAction : allRuleActionsNode)
{
Rule::Action ruleActionsObject;
if(!valueRulesRuleRuleActionsAction["Order"].isNull())
ruleActionsObject.order = std::stoi(valueRulesRuleRuleActionsAction["Order"].asString());
if(!valueRulesRuleRuleActionsAction["Type"].isNull())
ruleActionsObject.type = valueRulesRuleRuleActionsAction["Type"].asString();
auto fixedResponseConfigNode = value["FixedResponseConfig"];
if(!fixedResponseConfigNode["Content"].isNull())
ruleActionsObject.fixedResponseConfig.content = fixedResponseConfigNode["Content"].asString();
if(!fixedResponseConfigNode["ContentType"].isNull())
ruleActionsObject.fixedResponseConfig.contentType = fixedResponseConfigNode["ContentType"].asString();
if(!fixedResponseConfigNode["HttpCode"].isNull())
ruleActionsObject.fixedResponseConfig.httpCode = fixedResponseConfigNode["HttpCode"].asString();
auto forwardGroupConfigNode = value["ForwardGroupConfig"];
auto allServerGroupTuplesNode = forwardGroupConfigNode["ServerGroupTuples"]["ServerGroupTuple"];
for (auto forwardGroupConfigNodeServerGroupTuplesServerGroupTuple : allServerGroupTuplesNode)
{
Rule::Action::ForwardGroupConfig::ServerGroupTuple serverGroupTupleObject;
if(!forwardGroupConfigNodeServerGroupTuplesServerGroupTuple["ServerGroupId"].isNull())
serverGroupTupleObject.serverGroupId = forwardGroupConfigNodeServerGroupTuplesServerGroupTuple["ServerGroupId"].asString();
if(!forwardGroupConfigNodeServerGroupTuplesServerGroupTuple["Weight"].isNull())
serverGroupTupleObject.weight = std::stoi(forwardGroupConfigNodeServerGroupTuplesServerGroupTuple["Weight"].asString());
ruleActionsObject.forwardGroupConfig.serverGroupTuples.push_back(serverGroupTupleObject);
}
auto serverGroupStickySessionNode = forwardGroupConfigNode["ServerGroupStickySession"];
if(!serverGroupStickySessionNode["Enabled"].isNull())
ruleActionsObject.forwardGroupConfig.serverGroupStickySession.enabled = serverGroupStickySessionNode["Enabled"].asString() == "true";
if(!serverGroupStickySessionNode["Timeout"].isNull())
ruleActionsObject.forwardGroupConfig.serverGroupStickySession.timeout = std::stoi(serverGroupStickySessionNode["Timeout"].asString());
auto insertHeaderConfigNode = value["InsertHeaderConfig"];
if(!insertHeaderConfigNode["CoverEnabled"].isNull())
ruleActionsObject.insertHeaderConfig.coverEnabled = insertHeaderConfigNode["CoverEnabled"].asString() == "true";
if(!insertHeaderConfigNode["Key"].isNull())
ruleActionsObject.insertHeaderConfig.key = insertHeaderConfigNode["Key"].asString();
if(!insertHeaderConfigNode["Value"].isNull())
ruleActionsObject.insertHeaderConfig.value = insertHeaderConfigNode["Value"].asString();
if(!insertHeaderConfigNode["ValueType"].isNull())
ruleActionsObject.insertHeaderConfig.valueType = insertHeaderConfigNode["ValueType"].asString();
auto redirectConfigNode = value["RedirectConfig"];
if(!redirectConfigNode["Host"].isNull())
ruleActionsObject.redirectConfig.host = redirectConfigNode["Host"].asString();
if(!redirectConfigNode["HttpCode"].isNull())
ruleActionsObject.redirectConfig.httpCode = redirectConfigNode["HttpCode"].asString();
if(!redirectConfigNode["Path"].isNull())
ruleActionsObject.redirectConfig.path = redirectConfigNode["Path"].asString();
if(!redirectConfigNode["Port"].isNull())
ruleActionsObject.redirectConfig.port = redirectConfigNode["Port"].asString();
if(!redirectConfigNode["Protocol"].isNull())
ruleActionsObject.redirectConfig.protocol = redirectConfigNode["Protocol"].asString();
if(!redirectConfigNode["Query"].isNull())
ruleActionsObject.redirectConfig.query = redirectConfigNode["Query"].asString();
auto removeHeaderConfigNode = value["RemoveHeaderConfig"];
if(!removeHeaderConfigNode["Key"].isNull())
ruleActionsObject.removeHeaderConfig.key = removeHeaderConfigNode["Key"].asString();
auto rewriteConfigNode = value["RewriteConfig"];
if(!rewriteConfigNode["Host"].isNull())
ruleActionsObject.rewriteConfig.host = rewriteConfigNode["Host"].asString();
if(!rewriteConfigNode["Path"].isNull())
ruleActionsObject.rewriteConfig.path = rewriteConfigNode["Path"].asString();
if(!rewriteConfigNode["Query"].isNull())
ruleActionsObject.rewriteConfig.query = rewriteConfigNode["Query"].asString();
auto trafficMirrorConfigNode = value["TrafficMirrorConfig"];
if(!trafficMirrorConfigNode["TargetType"].isNull())
ruleActionsObject.trafficMirrorConfig.targetType = trafficMirrorConfigNode["TargetType"].asString();
auto mirrorGroupConfigNode = trafficMirrorConfigNode["MirrorGroupConfig"];
auto allServerGroupTuples1Node = mirrorGroupConfigNode["ServerGroupTuples"]["ServerGroupTuple"];
for (auto mirrorGroupConfigNodeServerGroupTuplesServerGroupTuple : allServerGroupTuples1Node)
{
Rule::Action::TrafficMirrorConfig::MirrorGroupConfig::ServerGroupTuple2 serverGroupTuple2Object;
if(!mirrorGroupConfigNodeServerGroupTuplesServerGroupTuple["ServerGroupId"].isNull())
serverGroupTuple2Object.serverGroupId = mirrorGroupConfigNodeServerGroupTuplesServerGroupTuple["ServerGroupId"].asString();
if(!mirrorGroupConfigNodeServerGroupTuplesServerGroupTuple["Weight"].isNull())
serverGroupTuple2Object.weight = std::stoi(mirrorGroupConfigNodeServerGroupTuplesServerGroupTuple["Weight"].asString());
ruleActionsObject.trafficMirrorConfig.mirrorGroupConfig.serverGroupTuples1.push_back(serverGroupTuple2Object);
}
auto trafficLimitConfigNode = value["TrafficLimitConfig"];
if(!trafficLimitConfigNode["QPS"].isNull())
ruleActionsObject.trafficLimitConfig.qPS = std::stoi(trafficLimitConfigNode["QPS"].asString());
rulesObject.ruleActions.push_back(ruleActionsObject);
}
auto allRuleConditionsNode = valueRulesRule["RuleConditions"]["Condition"];
for (auto valueRulesRuleRuleConditionsCondition : allRuleConditionsNode)
{
Rule::Condition ruleConditionsObject;
if(!valueRulesRuleRuleConditionsCondition["Type"].isNull())
ruleConditionsObject.type = valueRulesRuleRuleConditionsCondition["Type"].asString();
auto cookieConfigNode = value["CookieConfig"];
auto allValuesNode = cookieConfigNode["Values"]["Value"];
for (auto cookieConfigNodeValuesValue : allValuesNode)
{
Rule::Condition::CookieConfig::Value valueObject;
if(!cookieConfigNodeValuesValue["Key"].isNull())
valueObject.key = cookieConfigNodeValuesValue["Key"].asString();
if(!cookieConfigNodeValuesValue["Value"].isNull())
valueObject.value = cookieConfigNodeValuesValue["Value"].asString();
ruleConditionsObject.cookieConfig.values.push_back(valueObject);
}
auto headerConfigNode = value["HeaderConfig"];
if(!headerConfigNode["Key"].isNull())
ruleConditionsObject.headerConfig.key = headerConfigNode["Key"].asString();
auto allValues3 = headerConfigNode["Values"]["Value"];
for (auto value : allValues3)
ruleConditionsObject.headerConfig.values3.push_back(value.asString());
auto hostConfigNode = value["HostConfig"];
auto allValues4 = hostConfigNode["Values"]["Value"];
for (auto value : allValues4)
ruleConditionsObject.hostConfig.values4.push_back(value.asString());
auto methodConfigNode = value["MethodConfig"];
auto allValues5 = methodConfigNode["Values"]["Value"];
for (auto value : allValues5)
ruleConditionsObject.methodConfig.values5.push_back(value.asString());
auto pathConfigNode = value["PathConfig"];
auto allValues6 = pathConfigNode["Values"]["Value"];
for (auto value : allValues6)
ruleConditionsObject.pathConfig.values6.push_back(value.asString());
auto queryStringConfigNode = value["QueryStringConfig"];
auto allValues7Node = queryStringConfigNode["Values"]["Value"];
for (auto queryStringConfigNodeValuesValue : allValues7Node)
{
Rule::Condition::QueryStringConfig::Value8 value8Object;
if(!queryStringConfigNodeValuesValue["Key"].isNull())
value8Object.key = queryStringConfigNodeValuesValue["Key"].asString();
if(!queryStringConfigNodeValuesValue["Value"].isNull())
value8Object.value = queryStringConfigNodeValuesValue["Value"].asString();
ruleConditionsObject.queryStringConfig.values7.push_back(value8Object);
}
auto sourceIpConfigNode = value["SourceIpConfig"];
auto allValues9 = sourceIpConfigNode["Values"]["Value"];
for (auto value : allValues9)
ruleConditionsObject.sourceIpConfig.values9.push_back(value.asString());
auto responseStatusCodeConfigNode = value["ResponseStatusCodeConfig"];
auto allValues10 = responseStatusCodeConfigNode["Values"]["Value"];
for (auto value : allValues10)
ruleConditionsObject.responseStatusCodeConfig.values10.push_back(value.asString());
auto responseHeaderConfigNode = value["ResponseHeaderConfig"];
if(!responseHeaderConfigNode["Key"].isNull())
ruleConditionsObject.responseHeaderConfig.key = responseHeaderConfigNode["Key"].asString();
auto allValues11 = responseHeaderConfigNode["Values"]["Value"];
for (auto value : allValues11)
ruleConditionsObject.responseHeaderConfig.values11.push_back(value.asString());
rulesObject.ruleConditions.push_back(ruleConditionsObject);
}
rules_.push_back(rulesObject);
}
if(!value["MaxResults"].isNull())
maxResults_ = std::stoi(value["MaxResults"].asString());
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
}
int ListRulesResult::getTotalCount()const
{
return totalCount_;
}
std::string ListRulesResult::getNextToken()const
{
return nextToken_;
}
int ListRulesResult::getMaxResults()const
{
return maxResults_;
}
std::vector<ListRulesResult::Rule> ListRulesResult::getRules()const
{
return rules_;
}
| 51.606695 | 138 | 0.772418 | [
"vector",
"model"
] |
96ede5d3b31bb6c81d67d8aecd9865790da79400 | 231 | cpp | C++ | docs/mfc/codesnippet/CPP/crecordset-class_1.cpp | jmittert/cpp-docs | cea5a8ee2b4764b2bac4afe5d386362ffd64e55a | [
"CC-BY-4.0",
"MIT"
] | 14 | 2018-01-28T18:10:55.000Z | 2021-11-16T13:21:18.000Z | docs/mfc/codesnippet/CPP/crecordset-class_1.cpp | jmittert/cpp-docs | cea5a8ee2b4764b2bac4afe5d386362ffd64e55a | [
"CC-BY-4.0",
"MIT"
] | null | null | null | docs/mfc/codesnippet/CPP/crecordset-class_1.cpp | jmittert/cpp-docs | cea5a8ee2b4764b2bac4afe5d386362ffd64e55a | [
"CC-BY-4.0",
"MIT"
] | 2 | 2018-10-10T07:37:30.000Z | 2019-06-21T15:18:07.000Z | // Construct a snapshot object
CCustomer rsCustSet(NULL);
if(!rsCustSet.Open())
return;
// Use the snapshot ...
// Close the snapshot
rsCustSet.Close();
// Destructor is called when the function exits | 19.25 | 50 | 0.645022 | [
"object"
] |
96f52324c9cb5a632cc83669d0bf61c6035d7339 | 256,548 | hpp | C++ | SDK.hpp | Scorpyy1/NiagaraCheats | 8b51004213d8a6178067c6f60d4904cef3b5e72b | [
"MIT"
] | 4 | 2022-03-13T14:37:32.000Z | 2022-03-31T06:44:32.000Z | SDK.hpp | Scorpyy1/NiagaraCheats | 8b51004213d8a6178067c6f60d4904cef3b5e72b | [
"MIT"
] | null | null | null | SDK.hpp | Scorpyy1/NiagaraCheats | 8b51004213d8a6178067c6f60d4904cef3b5e72b | [
"MIT"
] | 1 | 2022-03-16T12:49:15.000Z | 2022-03-16T12:49:15.000Z |
#pragma once
// SKD
#include <set>
#include <string>
#include "SDK/FN_Basic.hpp"
#include "SDK/FN_CoreUObject_structs.hpp"
#include "SDK/FN_CoreUObject_classes.hpp"
#include "SDK/FN_CoreUObject_parameters.hpp"
#include "SDK/FN_SlateCore_structs.hpp"
#include "SDK/FN_SlateCore_classes.hpp"
#include "SDK/FN_SlateCore_parameters.hpp"
#include "SDK/FN_JsonUtilities_structs.hpp"
#include "SDK/FN_JsonUtilities_classes.hpp"
#include "SDK/FN_JsonUtilities_parameters.hpp"
#include "SDK/FN_InputCore_structs.hpp"
#include "SDK/FN_InputCore_classes.hpp"
#include "SDK/FN_InputCore_parameters.hpp"
#include "SDK/FN_PacketHandler_structs.hpp"
#include "SDK/FN_PacketHandler_classes.hpp"
#include "SDK/FN_PacketHandler_parameters.hpp"
#include "SDK/FN_Slate_structs.hpp"
#include "SDK/FN_Slate_classes.hpp"
#include "SDK/FN_Slate_parameters.hpp"
#include "SDK/FN_Engine_structs.hpp"
#include "SDK/FN_Engine_classes.hpp"
#include "SDK/FN_Engine_parameters.hpp"
#include "SDK/FN_McpProfileSys_structs.hpp"
#include "SDK/FN_McpProfileSys_classes.hpp"
#include "SDK/FN_McpProfileSys_parameters.hpp"
#include "SDK/FN_OnlineSubsystem_structs.hpp"
#include "SDK/FN_OnlineSubsystem_classes.hpp"
#include "SDK/FN_OnlineSubsystem_parameters.hpp"
#include "SDK/FN_GameplayTasks_structs.hpp"
#include "SDK/FN_GameplayTasks_classes.hpp"
#include "SDK/FN_GameplayTasks_parameters.hpp"
#include "SDK/FN_AnimGraphRuntime_structs.hpp"
#include "SDK/FN_AnimGraphRuntime_classes.hpp"
#include "SDK/FN_AnimGraphRuntime_parameters.hpp"
#include "SDK/FN_BlueprintContext_structs.hpp"
#include "SDK/FN_BlueprintContext_classes.hpp"
#include "SDK/FN_BlueprintContext_parameters.hpp"
#include "SDK/FN_Foliage_structs.hpp"
#include "SDK/FN_Foliage_classes.hpp"
#include "SDK/FN_Foliage_parameters.hpp"
#include "SDK/FN_PhysXVehicles_structs.hpp"
#include "SDK/FN_PhysXVehicles_classes.hpp"
#include "SDK/FN_PhysXVehicles_parameters.hpp"
#include "SDK/FN_OnlineSubsystemUtils_structs.hpp"
#include "SDK/FN_OnlineSubsystemUtils_classes.hpp"
#include "SDK/FN_OnlineSubsystemUtils_parameters.hpp"
#include "SDK/FN_VinderTech_Umbrella_AnimBP_structs.hpp"
#include "SDK/FN_VinderTech_Umbrella_AnimBP_classes.hpp"
#include "SDK/FN_VinderTech_Umbrella_AnimBP_parameters.hpp"
#include "SDK/FN_GameplayTags_structs.hpp"
#include "SDK/FN_GameplayTags_classes.hpp"
#include "SDK/FN_GameplayTags_parameters.hpp"
#include "SDK/FN_AIModule_structs.hpp"
#include "SDK/FN_AIModule_classes.hpp"
#include "SDK/FN_AIModule_parameters.hpp"
#include "SDK/FN_Lobby_structs.hpp"
#include "SDK/FN_Lobby_classes.hpp"
#include "SDK/FN_Lobby_parameters.hpp"
#include "SDK/FN_Rejoin_structs.hpp"
#include "SDK/FN_Rejoin_classes.hpp"
#include "SDK/FN_Rejoin_parameters.hpp"
#include "SDK/FN_Hotfix_structs.hpp"
#include "SDK/FN_Hotfix_classes.hpp"
#include "SDK/FN_Hotfix_parameters.hpp"
#include "SDK/FN_GameplayAbilities_structs.hpp"
#include "SDK/FN_GameplayAbilities_classes.hpp"
#include "SDK/FN_GameplayAbilities_parameters.hpp"
#include "SDK/FN_Gauntlet_structs.hpp"
#include "SDK/FN_Gauntlet_classes.hpp"
#include "SDK/FN_Gauntlet_parameters.hpp"
#include "SDK/FN_SignificanceManager_structs.hpp"
#include "SDK/FN_SignificanceManager_classes.hpp"
#include "SDK/FN_SignificanceManager_parameters.hpp"
#include "SDK/FN_GE_Athena_Revive_structs.hpp"
#include "SDK/FN_GE_Athena_Revive_classes.hpp"
#include "SDK/FN_GE_Athena_Revive_parameters.hpp"
#include "SDK/FN_Account_structs.hpp"
#include "SDK/FN_Account_classes.hpp"
#include "SDK/FN_Account_parameters.hpp"
#include "SDK/FN_Party_structs.hpp"
#include "SDK/FN_Party_classes.hpp"
#include "SDK/FN_Party_parameters.hpp"
#include "SDK/FN_VinderTech_GliderChute_AnimBP_structs.hpp"
#include "SDK/FN_VinderTech_GliderChute_AnimBP_classes.hpp"
#include "SDK/FN_VinderTech_GliderChute_AnimBP_parameters.hpp"
#include "SDK/FN_FortniteGame_structs.hpp"
#include "SDK/FN_FortniteGame_classes.hpp"
#include "SDK/FN_FortniteGame_parameters.hpp"
#include "SDK/FN_SK_M_Med_Soldier_04_Skeleton_AnimBP_structs.hpp"
#include "SDK/FN_SK_M_Med_Soldier_04_Skeleton_AnimBP_classes.hpp"
#include "SDK/FN_SK_M_Med_Soldier_04_Skeleton_AnimBP_parameters.hpp"
#include "SDK/FN_M_MED_BLK_Sydney_01_Skeleton_AnimBP_structs.hpp"
#include "SDK/FN_M_MED_BLK_Sydney_01_Skeleton_AnimBP_classes.hpp"
#include "SDK/FN_M_MED_BLK_Sydney_01_Skeleton_AnimBP_parameters.hpp"
#include "SDK/FN_F_Med_Soldier_01_Skeleton_AnimBP_structs.hpp"
#include "SDK/FN_F_Med_Soldier_01_Skeleton_AnimBP_classes.hpp"
#include "SDK/FN_F_Med_Soldier_01_Skeleton_AnimBP_parameters.hpp"
#include "SDK/FN_F_Med_Head_01_Skeleton_AnimBlueprint_structs.hpp"
#include "SDK/FN_F_Med_Head_01_Skeleton_AnimBlueprint_classes.hpp"
#include "SDK/FN_F_Med_Head_01_Skeleton_AnimBlueprint_parameters.hpp"
#include "SDK/FN_PlayerPawn_Athena_Generic_Parent_structs.hpp"
#include "SDK/FN_PlayerPawn_Athena_Generic_Parent_classes.hpp"
#include "SDK/FN_PlayerPawn_Athena_Generic_Parent_parameters.hpp"
#include "SDK/FN_MenuScreen_Commando_structs.hpp"
#include "SDK/FN_MenuScreen_Commando_classes.hpp"
#include "SDK/FN_MenuScreen_Commando_parameters.hpp"
#include "SDK/FN_PlayerPawn_Athena_Generic_structs.hpp"
#include "SDK/FN_PlayerPawn_Athena_Generic_classes.hpp"
#include "SDK/FN_PlayerPawn_Athena_Generic_parameters.hpp"
#include "SDK/FN_BP_ZT_PVE_structs.hpp"
#include "SDK/FN_BP_ZT_PVE_classes.hpp"
#include "SDK/FN_BP_ZT_PVE_parameters.hpp"
#include "SDK/FN__MissionGen_PARENT_structs.hpp"
#include "SDK/FN__MissionGen_PARENT_classes.hpp"
#include "SDK/FN__MissionGen_PARENT_parameters.hpp"
#include "SDK/FN_MissionGen_EvacuateTheSurvivors_structs.hpp"
#include "SDK/FN_MissionGen_EvacuateTheSurvivors_classes.hpp"
#include "SDK/FN_MissionGen_EvacuateTheSurvivors_parameters.hpp"
#include "SDK/FN_BP_ZT_TheSuburbs_structs.hpp"
#include "SDK/FN_BP_ZT_TheSuburbs_classes.hpp"
#include "SDK/FN_BP_ZT_TheSuburbs_parameters.hpp"
#include "SDK/FN_BP_ZT_TheForest_structs.hpp"
#include "SDK/FN_BP_ZT_TheForest_classes.hpp"
#include "SDK/FN_BP_ZT_TheForest_parameters.hpp"
#include "SDK/FN_BP_ZT_Onboarding_Forest_a_structs.hpp"
#include "SDK/FN_BP_ZT_Onboarding_Forest_a_classes.hpp"
#include "SDK/FN_BP_ZT_Onboarding_Forest_a_parameters.hpp"
#include "SDK/FN_BP_ZT_TheGrasslands_structs.hpp"
#include "SDK/FN_BP_ZT_TheGrasslands_classes.hpp"
#include "SDK/FN_BP_ZT_TheGrasslands_parameters.hpp"
#include "SDK/FN_BP_ZT_Onboarding_Grasslands_a_structs.hpp"
#include "SDK/FN_BP_ZT_Onboarding_Grasslands_a_classes.hpp"
#include "SDK/FN_BP_ZT_Onboarding_Grasslands_a_parameters.hpp"
#include "SDK/FN_BP_ZT_Onboarding_Suburban_a_structs.hpp"
#include "SDK/FN_BP_ZT_Onboarding_Suburban_a_classes.hpp"
#include "SDK/FN_BP_ZT_Onboarding_Suburban_a_parameters.hpp"
#include "SDK/FN_MissionGen_BuildtheRadarGrid_structs.hpp"
#include "SDK/FN_MissionGen_BuildtheRadarGrid_classes.hpp"
#include "SDK/FN_MissionGen_BuildtheRadarGrid_parameters.hpp"
#include "SDK/FN_BP_ZT_VindermansLab_structs.hpp"
#include "SDK/FN_BP_ZT_VindermansLab_classes.hpp"
#include "SDK/FN_BP_ZT_VindermansLab_parameters.hpp"
#include "SDK/FN_MissionGen_T1_LT_LtB_structs.hpp"
#include "SDK/FN_MissionGen_T1_LT_LtB_classes.hpp"
#include "SDK/FN_MissionGen_T1_LT_LtB_parameters.hpp"
#include "SDK/FN_BP_ZT_TheCity_structs.hpp"
#include "SDK/FN_BP_ZT_TheCity_classes.hpp"
#include "SDK/FN_BP_ZT_TheCity_parameters.hpp"
#include "SDK/FN_MissionGen_T1_VHT_LtR_structs.hpp"
#include "SDK/FN_MissionGen_T1_VHT_LtR_classes.hpp"
#include "SDK/FN_MissionGen_T1_VHT_LtR_parameters.hpp"
#include "SDK/FN_MissionGen_T1_HT_LtB_structs.hpp"
#include "SDK/FN_MissionGen_T1_HT_LtB_classes.hpp"
#include "SDK/FN_MissionGen_T1_HT_LtB_parameters.hpp"
#include "SDK/FN_MissionGen_1Gate_structs.hpp"
#include "SDK/FN_MissionGen_1Gate_classes.hpp"
#include "SDK/FN_MissionGen_1Gate_parameters.hpp"
#include "SDK/FN_MissionGen_T1_HT_RtD_structs.hpp"
#include "SDK/FN_MissionGen_T1_HT_RtD_classes.hpp"
#include "SDK/FN_MissionGen_T1_HT_RtD_parameters.hpp"
#include "SDK/FN_MissionGen_T1_MT_Cat1FtS_structs.hpp"
#include "SDK/FN_MissionGen_T1_MT_Cat1FtS_classes.hpp"
#include "SDK/FN_MissionGen_T1_MT_Cat1FtS_parameters.hpp"
#include "SDK/FN_MissionGen_T1_MT_RtD_structs.hpp"
#include "SDK/FN_MissionGen_T1_MT_RtD_classes.hpp"
#include "SDK/FN_MissionGen_T1_MT_RtD_parameters.hpp"
#include "SDK/FN_MissionGen_T1_HT_Cat1FtS_structs.hpp"
#include "SDK/FN_MissionGen_T1_HT_Cat1FtS_classes.hpp"
#include "SDK/FN_MissionGen_T1_HT_Cat1FtS_parameters.hpp"
#include "SDK/FN_MissionGen_T1_VHT_LtB_structs.hpp"
#include "SDK/FN_MissionGen_T1_VHT_LtB_classes.hpp"
#include "SDK/FN_MissionGen_T1_VHT_LtB_parameters.hpp"
#include "SDK/FN_MissionGen_T1_VHT_Cat1FtS_structs.hpp"
#include "SDK/FN_MissionGen_T1_VHT_Cat1FtS_classes.hpp"
#include "SDK/FN_MissionGen_T1_VHT_Cat1FtS_parameters.hpp"
#include "SDK/FN_MissionGen_T1_VHT_RtD_structs.hpp"
#include "SDK/FN_MissionGen_T1_VHT_RtD_classes.hpp"
#include "SDK/FN_MissionGen_T1_VHT_RtD_parameters.hpp"
#include "SDK/FN_MissionGen_T1_HT_EvacuateTheSurvivors_structs.hpp"
#include "SDK/FN_MissionGen_T1_HT_EvacuateTheSurvivors_classes.hpp"
#include "SDK/FN_MissionGen_T1_HT_EvacuateTheSurvivors_parameters.hpp"
#include "SDK/FN_MissionGen_DestroyTheEncampments_structs.hpp"
#include "SDK/FN_MissionGen_DestroyTheEncampments_classes.hpp"
#include "SDK/FN_MissionGen_DestroyTheEncampments_parameters.hpp"
#include "SDK/FN_MissionGen_1Gate_VLT_structs.hpp"
#include "SDK/FN_MissionGen_1Gate_VLT_classes.hpp"
#include "SDK/FN_MissionGen_1Gate_VLT_parameters.hpp"
#include "SDK/FN_MissionGen_RetrieveTheData_NoSecondary_structs.hpp"
#include "SDK/FN_MissionGen_RetrieveTheData_NoSecondary_classes.hpp"
#include "SDK/FN_MissionGen_RetrieveTheData_NoSecondary_parameters.hpp"
#include "SDK/FN_MissionGen_T1_VHT_EvacuateTheSurvivors_structs.hpp"
#include "SDK/FN_MissionGen_T1_VHT_EvacuateTheSurvivors_classes.hpp"
#include "SDK/FN_MissionGen_T1_VHT_EvacuateTheSurvivors_parameters.hpp"
#include "SDK/FN_MissionGen_T1_LT_Cat1FtS_structs.hpp"
#include "SDK/FN_MissionGen_T1_LT_Cat1FtS_classes.hpp"
#include "SDK/FN_MissionGen_T1_LT_Cat1FtS_parameters.hpp"
#include "SDK/FN_BP_ZT_TheIndustrialPark_structs.hpp"
#include "SDK/FN_BP_ZT_TheIndustrialPark_classes.hpp"
#include "SDK/FN_BP_ZT_TheIndustrialPark_parameters.hpp"
#include "SDK/FN_BP_ZT_Homebase_06_structs.hpp"
#include "SDK/FN_BP_ZT_Homebase_06_classes.hpp"
#include "SDK/FN_BP_ZT_Homebase_06_parameters.hpp"
#include "SDK/FN_MissionGen_TheOutpost_PARENT_structs.hpp"
#include "SDK/FN_MissionGen_TheOutpost_PARENT_classes.hpp"
#include "SDK/FN_MissionGen_TheOutpost_PARENT_parameters.hpp"
#include "SDK/FN_MissionGen_LaunchTheBalloon_NoSecondary_structs.hpp"
#include "SDK/FN_MissionGen_LaunchTheBalloon_NoSecondary_classes.hpp"
#include "SDK/FN_MissionGen_LaunchTheBalloon_NoSecondary_parameters.hpp"
#include "SDK/FN_MissionGen_1GateNoBonus_structs.hpp"
#include "SDK/FN_MissionGen_1GateNoBonus_classes.hpp"
#include "SDK/FN_MissionGen_1GateNoBonus_parameters.hpp"
#include "SDK/FN_BP_ZT_TheOutpost_PvE_01_structs.hpp"
#include "SDK/FN_BP_ZT_TheOutpost_PvE_01_classes.hpp"
#include "SDK/FN_BP_ZT_TheOutpost_PvE_01_parameters.hpp"
#include "SDK/FN_BP_ZT_Homebase_02_structs.hpp"
#include "SDK/FN_BP_ZT_Homebase_02_classes.hpp"
#include "SDK/FN_BP_ZT_Homebase_02_parameters.hpp"
#include "SDK/FN_BP_ZT_Homebase_03_structs.hpp"
#include "SDK/FN_BP_ZT_Homebase_03_classes.hpp"
#include "SDK/FN_BP_ZT_Homebase_03_parameters.hpp"
#include "SDK/FN_BP_ZT_Homebase_05_structs.hpp"
#include "SDK/FN_BP_ZT_Homebase_05_classes.hpp"
#include "SDK/FN_BP_ZT_Homebase_05_parameters.hpp"
#include "SDK/FN_MissionGen_T1_MT_LtB_structs.hpp"
#include "SDK/FN_MissionGen_T1_MT_LtB_classes.hpp"
#include "SDK/FN_MissionGen_T1_MT_LtB_parameters.hpp"
#include "SDK/FN_MissionGen_RetrieveTheData_structs.hpp"
#include "SDK/FN_MissionGen_RetrieveTheData_classes.hpp"
#include "SDK/FN_MissionGen_RetrieveTheData_parameters.hpp"
#include "SDK/FN_MissionGen_LaunchTheBalloon_structs.hpp"
#include "SDK/FN_MissionGen_LaunchTheBalloon_classes.hpp"
#include "SDK/FN_MissionGen_LaunchTheBalloon_parameters.hpp"
#include "SDK/FN__MissionGen_T2_PARENT_structs.hpp"
#include "SDK/FN__MissionGen_T2_PARENT_classes.hpp"
#include "SDK/FN__MissionGen_T2_PARENT_parameters.hpp"
#include "SDK/FN_MissionGen_T2_RtL_structs.hpp"
#include "SDK/FN_MissionGen_T2_RtL_classes.hpp"
#include "SDK/FN_MissionGen_T2_RtL_parameters.hpp"
#include "SDK/FN_MissionGen_T2_2Gates_structs.hpp"
#include "SDK/FN_MissionGen_T2_2Gates_classes.hpp"
#include "SDK/FN_MissionGen_T2_2Gates_parameters.hpp"
#include "SDK/FN_MissionGen_T2_RtS_structs.hpp"
#include "SDK/FN_MissionGen_T2_RtS_classes.hpp"
#include "SDK/FN_MissionGen_T2_RtS_parameters.hpp"
#include "SDK/FN_MissionGen_T2_EtShelter_structs.hpp"
#include "SDK/FN_MissionGen_T2_EtShelter_classes.hpp"
#include "SDK/FN_MissionGen_T2_EtShelter_parameters.hpp"
#include "SDK/FN_BP_ZT_Homebase_07_structs.hpp"
#include "SDK/FN_BP_ZT_Homebase_07_classes.hpp"
#include "SDK/FN_BP_ZT_Homebase_07_parameters.hpp"
#include "SDK/FN_MissionGen_TheOutpost_PvE_01_structs.hpp"
#include "SDK/FN_MissionGen_TheOutpost_PvE_01_classes.hpp"
#include "SDK/FN_MissionGen_TheOutpost_PvE_01_parameters.hpp"
#include "SDK/FN_MissionGen_T2_DtE_structs.hpp"
#include "SDK/FN_MissionGen_T2_DtE_classes.hpp"
#include "SDK/FN_MissionGen_T2_DtE_parameters.hpp"
#include "SDK/FN_MissionGen_T2_3Gates_structs.hpp"
#include "SDK/FN_MissionGen_T2_3Gates_classes.hpp"
#include "SDK/FN_MissionGen_T2_3Gates_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R5_EtShelter_structs.hpp"
#include "SDK/FN_MissionGen_T2_R5_EtShelter_classes.hpp"
#include "SDK/FN_MissionGen_T2_R5_EtShelter_parameters.hpp"
#include "SDK/FN_MissionGen_T2_RtD_structs.hpp"
#include "SDK/FN_MissionGen_T2_RtD_classes.hpp"
#include "SDK/FN_MissionGen_T2_RtD_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R5_RtD_structs.hpp"
#include "SDK/FN_MissionGen_T2_R5_RtD_classes.hpp"
#include "SDK/FN_MissionGen_T2_R5_RtD_parameters.hpp"
#include "SDK/FN_MissionGen_T2_1Gate_structs.hpp"
#include "SDK/FN_MissionGen_T2_1Gate_classes.hpp"
#include "SDK/FN_MissionGen_T2_1Gate_parameters.hpp"
#include "SDK/FN_MissionGen_T2_DtB_structs.hpp"
#include "SDK/FN_MissionGen_T2_DtB_classes.hpp"
#include "SDK/FN_MissionGen_T2_DtB_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R5_DtB_structs.hpp"
#include "SDK/FN_MissionGen_T2_R5_DtB_classes.hpp"
#include "SDK/FN_MissionGen_T2_R5_DtB_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R3_DtB_Tutorial_structs.hpp"
#include "SDK/FN_MissionGen_T2_R3_DtB_Tutorial_classes.hpp"
#include "SDK/FN_MissionGen_T2_R3_DtB_Tutorial_parameters.hpp"
#include "SDK/FN_MissionGen_T2_EtSurvivors_structs.hpp"
#include "SDK/FN_MissionGen_T2_EtSurvivors_classes.hpp"
#include "SDK/FN_MissionGen_T2_EtSurvivors_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R1_RtL_structs.hpp"
#include "SDK/FN_MissionGen_T2_R1_RtL_classes.hpp"
#include "SDK/FN_MissionGen_T2_R1_RtL_parameters.hpp"
#include "SDK/FN_MissionGen_T2_PtS_structs.hpp"
#include "SDK/FN_MissionGen_T2_PtS_classes.hpp"
#include "SDK/FN_MissionGen_T2_PtS_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R5_PtS_structs.hpp"
#include "SDK/FN_MissionGen_T2_R5_PtS_classes.hpp"
#include "SDK/FN_MissionGen_T2_R5_PtS_parameters.hpp"
#include "SDK/FN_MissionGen_T2_LtR_structs.hpp"
#include "SDK/FN_MissionGen_T2_LtR_classes.hpp"
#include "SDK/FN_MissionGen_T2_LtR_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R5_LtR_structs.hpp"
#include "SDK/FN_MissionGen_T2_R5_LtR_classes.hpp"
#include "SDK/FN_MissionGen_T2_R5_LtR_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R5_RtL_structs.hpp"
#include "SDK/FN_MissionGen_T2_R5_RtL_classes.hpp"
#include "SDK/FN_MissionGen_T2_R5_RtL_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R2_RtS_structs.hpp"
#include "SDK/FN_MissionGen_T2_R2_RtS_classes.hpp"
#include "SDK/FN_MissionGen_T2_R2_RtS_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R3_RtS_structs.hpp"
#include "SDK/FN_MissionGen_T2_R3_RtS_classes.hpp"
#include "SDK/FN_MissionGen_T2_R3_RtS_parameters.hpp"
#include "SDK/FN_MissionGen_T2_BuildtheRadarGrid_structs.hpp"
#include "SDK/FN_MissionGen_T2_BuildtheRadarGrid_classes.hpp"
#include "SDK/FN_MissionGen_T2_BuildtheRadarGrid_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R1_2Gates_structs.hpp"
#include "SDK/FN_MissionGen_T2_R1_2Gates_classes.hpp"
#include "SDK/FN_MissionGen_T2_R1_2Gates_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R3_1Gate_structs.hpp"
#include "SDK/FN_MissionGen_T2_R3_1Gate_classes.hpp"
#include "SDK/FN_MissionGen_T2_R3_1Gate_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R3_RtD_structs.hpp"
#include "SDK/FN_MissionGen_T2_R3_RtD_classes.hpp"
#include "SDK/FN_MissionGen_T2_R3_RtD_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R2_DtE_structs.hpp"
#include "SDK/FN_MissionGen_T2_R2_DtE_classes.hpp"
#include "SDK/FN_MissionGen_T2_R2_DtE_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R1_1Gate_structs.hpp"
#include "SDK/FN_MissionGen_T2_R1_1Gate_classes.hpp"
#include "SDK/FN_MissionGen_T2_R1_1Gate_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R3_2Gates_structs.hpp"
#include "SDK/FN_MissionGen_T2_R3_2Gates_classes.hpp"
#include "SDK/FN_MissionGen_T2_R3_2Gates_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R1_RtD_structs.hpp"
#include "SDK/FN_MissionGen_T2_R1_RtD_classes.hpp"
#include "SDK/FN_MissionGen_T2_R1_RtD_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R3_RtL_structs.hpp"
#include "SDK/FN_MissionGen_T2_R3_RtL_classes.hpp"
#include "SDK/FN_MissionGen_T2_R3_RtL_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R5_RtS_structs.hpp"
#include "SDK/FN_MissionGen_T2_R5_RtS_classes.hpp"
#include "SDK/FN_MissionGen_T2_R5_RtS_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R1_BuildtheRadarGrid_structs.hpp"
#include "SDK/FN_MissionGen_T2_R1_BuildtheRadarGrid_classes.hpp"
#include "SDK/FN_MissionGen_T2_R1_BuildtheRadarGrid_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R1_EtSurvivors_structs.hpp"
#include "SDK/FN_MissionGen_T2_R1_EtSurvivors_classes.hpp"
#include "SDK/FN_MissionGen_T2_R1_EtSurvivors_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R2_2Gates_structs.hpp"
#include "SDK/FN_MissionGen_T2_R2_2Gates_classes.hpp"
#include "SDK/FN_MissionGen_T2_R2_2Gates_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R2_EtSurvivors_structs.hpp"
#include "SDK/FN_MissionGen_T2_R2_EtSurvivors_classes.hpp"
#include "SDK/FN_MissionGen_T2_R2_EtSurvivors_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R1_DtE_structs.hpp"
#include "SDK/FN_MissionGen_T2_R1_DtE_classes.hpp"
#include "SDK/FN_MissionGen_T2_R1_DtE_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R2_BuildtheRadarGrid_structs.hpp"
#include "SDK/FN_MissionGen_T2_R2_BuildtheRadarGrid_classes.hpp"
#include "SDK/FN_MissionGen_T2_R2_BuildtheRadarGrid_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R5_DtE_structs.hpp"
#include "SDK/FN_MissionGen_T2_R5_DtE_classes.hpp"
#include "SDK/FN_MissionGen_T2_R5_DtE_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R5_BuildtheRadarGrid_structs.hpp"
#include "SDK/FN_MissionGen_T2_R5_BuildtheRadarGrid_classes.hpp"
#include "SDK/FN_MissionGen_T2_R5_BuildtheRadarGrid_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R5_EtSurvivors_structs.hpp"
#include "SDK/FN_MissionGen_T2_R5_EtSurvivors_classes.hpp"
#include "SDK/FN_MissionGen_T2_R5_EtSurvivors_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R5_2Gates_structs.hpp"
#include "SDK/FN_MissionGen_T2_R5_2Gates_classes.hpp"
#include "SDK/FN_MissionGen_T2_R5_2Gates_parameters.hpp"
#include "SDK/FN_MissionGen_T2_4Gates_structs.hpp"
#include "SDK/FN_MissionGen_T2_4Gates_classes.hpp"
#include "SDK/FN_MissionGen_T2_4Gates_parameters.hpp"
#include "SDK/FN_BP_ZT_TheOutpost_PvE_02_structs.hpp"
#include "SDK/FN_BP_ZT_TheOutpost_PvE_02_classes.hpp"
#include "SDK/FN_BP_ZT_TheOutpost_PvE_02_parameters.hpp"
#include "SDK/FN_MissionGen_TheOutpost_PvE_02_structs.hpp"
#include "SDK/FN_MissionGen_TheOutpost_PvE_02_classes.hpp"
#include "SDK/FN_MissionGen_TheOutpost_PvE_02_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R5_3Gates_structs.hpp"
#include "SDK/FN_MissionGen_T2_R5_3Gates_classes.hpp"
#include "SDK/FN_MissionGen_T2_R5_3Gates_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R3_BuildtheRadarGrid_structs.hpp"
#include "SDK/FN_MissionGen_T2_R3_BuildtheRadarGrid_classes.hpp"
#include "SDK/FN_MissionGen_T2_R3_BuildtheRadarGrid_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R3_EtSurvivors_structs.hpp"
#include "SDK/FN_MissionGen_T2_R3_EtSurvivors_classes.hpp"
#include "SDK/FN_MissionGen_T2_R3_EtSurvivors_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R2_RtS_Tutorial_structs.hpp"
#include "SDK/FN_MissionGen_T2_R2_RtS_Tutorial_classes.hpp"
#include "SDK/FN_MissionGen_T2_R2_RtS_Tutorial_parameters.hpp"
#include "SDK/FN_MissionGen_2Gates_structs.hpp"
#include "SDK/FN_MissionGen_2Gates_classes.hpp"
#include "SDK/FN_MissionGen_2Gates_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R3_DtE_structs.hpp"
#include "SDK/FN_MissionGen_T2_R3_DtE_classes.hpp"
#include "SDK/FN_MissionGen_T2_R3_DtE_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R2_RtD_structs.hpp"
#include "SDK/FN_MissionGen_T2_R2_RtD_classes.hpp"
#include "SDK/FN_MissionGen_T2_R2_RtD_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R2_RtL_structs.hpp"
#include "SDK/FN_MissionGen_T2_R2_RtL_classes.hpp"
#include "SDK/FN_MissionGen_T2_R2_RtL_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R4_EtShelter_Tutorial_structs.hpp"
#include "SDK/FN_MissionGen_T2_R4_EtShelter_Tutorial_classes.hpp"
#include "SDK/FN_MissionGen_T2_R4_EtShelter_Tutorial_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R2_1Gate_structs.hpp"
#include "SDK/FN_MissionGen_T2_R2_1Gate_classes.hpp"
#include "SDK/FN_MissionGen_T2_R2_1Gate_parameters.hpp"
#include "SDK/FN_MissionGen_T2_R5_1Gate_structs.hpp"
#include "SDK/FN_MissionGen_T2_R5_1Gate_classes.hpp"
#include "SDK/FN_MissionGen_T2_R5_1Gate_parameters.hpp"
#include "SDK/FN_BP_ZT_TheOutpost_PvE_03_structs.hpp"
#include "SDK/FN_BP_ZT_TheOutpost_PvE_03_classes.hpp"
#include "SDK/FN_BP_ZT_TheOutpost_PvE_03_parameters.hpp"
#include "SDK/FN_MissionGen_TheOutpost_PvE_03_structs.hpp"
#include "SDK/FN_MissionGen_TheOutpost_PvE_03_classes.hpp"
#include "SDK/FN_MissionGen_TheOutpost_PvE_03_parameters.hpp"
#include "SDK/FN_MissionGen_TheOutpost_PvE_04_structs.hpp"
#include "SDK/FN_MissionGen_TheOutpost_PvE_04_classes.hpp"
#include "SDK/FN_MissionGen_TheOutpost_PvE_04_parameters.hpp"
#include "SDK/FN_GE_Commando_DefaultRangeDamageBonus_structs.hpp"
#include "SDK/FN_GE_Commando_DefaultRangeDamageBonus_classes.hpp"
#include "SDK/FN_GE_Commando_DefaultRangeDamageBonus_parameters.hpp"
#include "SDK/FN_GE_Commando_IsCommando_structs.hpp"
#include "SDK/FN_GE_Commando_IsCommando_classes.hpp"
#include "SDK/FN_GE_Commando_IsCommando_parameters.hpp"
#include "SDK/FN_GE_Map_Resistance_To_Shield_structs.hpp"
#include "SDK/FN_GE_Map_Resistance_To_Shield_classes.hpp"
#include "SDK/FN_GE_Map_Resistance_To_Shield_parameters.hpp"
#include "SDK/FN_MissionGen_LtR_CannyValley_structs.hpp"
#include "SDK/FN_MissionGen_LtR_CannyValley_classes.hpp"
#include "SDK/FN_MissionGen_LtR_CannyValley_parameters.hpp"
#include "SDK/FN_GE_Map_Commando_Defense_ShieldStrength_ShieldRegen_structs.hpp"
#include "SDK/FN_GE_Map_Commando_Defense_ShieldStrength_ShieldRegen_classes.hpp"
#include "SDK/FN_GE_Map_Commando_Defense_ShieldStrength_ShieldRegen_parameters.hpp"
#include "SDK/FN_GE_Map_Fortitude_To_Health_structs.hpp"
#include "SDK/FN_GE_Map_Fortitude_To_Health_classes.hpp"
#include "SDK/FN_GE_Map_Fortitude_To_Health_parameters.hpp"
#include "SDK/FN_GE_Map_Tech_to_AbilityDamage_TrapDamage_structs.hpp"
#include "SDK/FN_GE_Map_Tech_to_AbilityDamage_TrapDamage_classes.hpp"
#include "SDK/FN_GE_Map_Tech_to_AbilityDamage_TrapDamage_parameters.hpp"
#include "SDK/FN_Delete_structs.hpp"
#include "SDK/FN_Delete_classes.hpp"
#include "SDK/FN_Delete_parameters.hpp"
#include "SDK/FN_GE_Map_Commando_Prowess_TrapDamage_structs.hpp"
#include "SDK/FN_GE_Map_Commando_Prowess_TrapDamage_classes.hpp"
#include "SDK/FN_GE_Map_Commando_Prowess_TrapDamage_parameters.hpp"
#include "SDK/FN_GE_Map_Offense_To_WeaponDamage_structs.hpp"
#include "SDK/FN_GE_Map_Offense_To_WeaponDamage_classes.hpp"
#include "SDK/FN_GE_Map_Offense_To_WeaponDamage_parameters.hpp"
#include "SDK/FN_MissionGen_LtR_Twine_structs.hpp"
#include "SDK/FN_MissionGen_LtR_Twine_classes.hpp"
#include "SDK/FN_MissionGen_LtR_Twine_parameters.hpp"
#include "SDK/FN_MissionGen_BuildTheBase_structs.hpp"
#include "SDK/FN_MissionGen_BuildTheBase_classes.hpp"
#include "SDK/FN_MissionGen_BuildTheBase_parameters.hpp"
#include "SDK/FN_B_CameraRainDrops_01_structs.hpp"
#include "SDK/FN_B_CameraRainDrops_01_classes.hpp"
#include "SDK/FN_B_CameraRainDrops_01_parameters.hpp"
#include "SDK/FN_MissionGen_ChallengeTheHorde_structs.hpp"
#include "SDK/FN_MissionGen_ChallengeTheHorde_classes.hpp"
#include "SDK/FN_MissionGen_ChallengeTheHorde_parameters.hpp"
#include "SDK/FN_StatEventManager_structs.hpp"
#include "SDK/FN_StatEventManager_classes.hpp"
#include "SDK/FN_StatEventManager_parameters.hpp"
#include "SDK/FN_Threat_RainAttachedToPlayer_structs.hpp"
#include "SDK/FN_Threat_RainAttachedToPlayer_classes.hpp"
#include "SDK/FN_Threat_RainAttachedToPlayer_parameters.hpp"
#include "SDK/FN_Announce_BackpackFull_structs.hpp"
#include "SDK/FN_Announce_BackpackFull_classes.hpp"
#include "SDK/FN_Announce_BackpackFull_parameters.hpp"
#include "SDK/FN_GE_Map_Commando_Offense_AllWeaponDamage_structs.hpp"
#include "SDK/FN_GE_Map_Commando_Offense_AllWeaponDamage_classes.hpp"
#include "SDK/FN_GE_Map_Commando_Offense_AllWeaponDamage_parameters.hpp"
#include "SDK/FN_Announce_BuildingDamaged_structs.hpp"
#include "SDK/FN_Announce_BuildingDamaged_classes.hpp"
#include "SDK/FN_Announce_BuildingDamaged_parameters.hpp"
#include "SDK/FN_Announce_HeadshotStreak_5x_structs.hpp"
#include "SDK/FN_Announce_HeadshotStreak_5x_classes.hpp"
#include "SDK/FN_Announce_HeadshotStreak_5x_parameters.hpp"
#include "SDK/FN_GE_SquadBuff_structs.hpp"
#include "SDK/FN_GE_SquadBuff_classes.hpp"
#include "SDK/FN_GE_SquadBuff_parameters.hpp"
#include "SDK/FN_Announce_LowDurability_structs.hpp"
#include "SDK/FN_Announce_LowDurability_classes.hpp"
#include "SDK/FN_Announce_LowDurability_parameters.hpp"
#include "SDK/FN_Announce_LowHeath_structs.hpp"
#include "SDK/FN_Announce_LowHeath_classes.hpp"
#include "SDK/FN_Announce_LowHeath_parameters.hpp"
#include "SDK/FN_SocialTypes_structs.hpp"
#include "SDK/FN_SocialTypes_classes.hpp"
#include "SDK/FN_SocialTypes_parameters.hpp"
#include "SDK/FN_CCGameplayEffects_structs.hpp"
#include "SDK/FN_CCGameplayEffects_classes.hpp"
#include "SDK/FN_CCGameplayEffects_parameters.hpp"
#include "SDK/FN_Announce_NoDurability_structs.hpp"
#include "SDK/FN_Announce_NoDurability_classes.hpp"
#include "SDK/FN_Announce_NoDurability_parameters.hpp"
#include "SDK/FN_WM_Pin_Master_structs.hpp"
#include "SDK/FN_WM_Pin_Master_classes.hpp"
#include "SDK/FN_WM_Pin_Master_parameters.hpp"
#include "SDK/FN_WM_PinHorde_structs.hpp"
#include "SDK/FN_WM_PinHorde_classes.hpp"
#include "SDK/FN_WM_PinHorde_parameters.hpp"
#include "SDK/FN_WM_Pin_Round_structs.hpp"
#include "SDK/FN_WM_Pin_Round_classes.hpp"
#include "SDK/FN_WM_Pin_Round_parameters.hpp"
#include "SDK/FN_UseableWeaponsObject_structs.hpp"
#include "SDK/FN_UseableWeaponsObject_classes.hpp"
#include "SDK/FN_UseableWeaponsObject_parameters.hpp"
#include "SDK/FN_StoreWeaponMaster_BP_structs.hpp"
#include "SDK/FN_StoreWeaponMaster_BP_classes.hpp"
#include "SDK/FN_StoreWeaponMaster_BP_parameters.hpp"
#include "SDK/FN_WM_PinHard_structs.hpp"
#include "SDK/FN_WM_PinHard_classes.hpp"
#include "SDK/FN_WM_PinHard_parameters.hpp"
#include "SDK/FN_WidgetCarousel_structs.hpp"
#include "SDK/FN_WidgetCarousel_classes.hpp"
#include "SDK/FN_WidgetCarousel_parameters.hpp"
#include "SDK/FN_MovieScene_structs.hpp"
#include "SDK/FN_MovieScene_classes.hpp"
#include "SDK/FN_MovieScene_parameters.hpp"
#include "SDK/FN_MovieSceneTracks_structs.hpp"
#include "SDK/FN_MovieSceneTracks_classes.hpp"
#include "SDK/FN_MovieSceneTracks_parameters.hpp"
#include "SDK/FN_WM_PinMedium_structs.hpp"
#include "SDK/FN_WM_PinMedium_classes.hpp"
#include "SDK/FN_WM_PinMedium_parameters.hpp"
#include "SDK/FN_UMG_structs.hpp"
#include "SDK/FN_UMG_classes.hpp"
#include "SDK/FN_UMG_parameters.hpp"
#include "SDK/FN_CommonUI_structs.hpp"
#include "SDK/FN_CommonUI_classes.hpp"
#include "SDK/FN_CommonUI_parameters.hpp"
#include "SDK/FN_EpicCMSUIFramework_structs.hpp"
#include "SDK/FN_EpicCMSUIFramework_classes.hpp"
#include "SDK/FN_EpicCMSUIFramework_parameters.hpp"
#include "SDK/FN_WM_PinEasy_structs.hpp"
#include "SDK/FN_WM_PinEasy_classes.hpp"
#include "SDK/FN_WM_PinEasy_parameters.hpp"
#include "SDK/FN_VaultCharacterPlacementHelper_structs.hpp"
#include "SDK/FN_VaultCharacterPlacementHelper_classes.hpp"
#include "SDK/FN_VaultCharacterPlacementHelper_parameters.hpp"
#include "SDK/FN_WorldLightingMenu_structs.hpp"
#include "SDK/FN_WorldLightingMenu_classes.hpp"
#include "SDK/FN_WorldLightingMenu_parameters.hpp"
#include "SDK/FN_ThreatPostProcessManagerAndParticleBlueprint_structs.hpp"
#include "SDK/FN_ThreatPostProcessManagerAndParticleBlueprint_classes.hpp"
#include "SDK/FN_ThreatPostProcessManagerAndParticleBlueprint_parameters.hpp"
#include "SDK/FN_FeedbackManager_structs.hpp"
#include "SDK/FN_FeedbackManager_classes.hpp"
#include "SDK/FN_FeedbackManager_parameters.hpp"
#include "SDK/FN_TextStyle-Base_structs.hpp"
#include "SDK/FN_TextStyle-Base_classes.hpp"
#include "SDK/FN_TextStyle-Base_parameters.hpp"
#include "SDK/FN_WM_Lights_structs.hpp"
#include "SDK/FN_WM_Lights_classes.hpp"
#include "SDK/FN_WM_Lights_parameters.hpp"
#include "SDK/FN_FeedbackAnnouncer_structs.hpp"
#include "SDK/FN_FeedbackAnnouncer_classes.hpp"
#include "SDK/FN_FeedbackAnnouncer_parameters.hpp"
#include "SDK/FN_TODM_A_structs.hpp"
#include "SDK/FN_TODM_A_classes.hpp"
#include "SDK/FN_TODM_A_parameters.hpp"
#include "SDK/FN_TODM_Disabled_structs.hpp"
#include "SDK/FN_TODM_Disabled_classes.hpp"
#include "SDK/FN_TODM_Disabled_parameters.hpp"
#include "SDK/FN_TutorialHighlightData_structs.hpp"
#include "SDK/FN_TutorialHighlightData_classes.hpp"
#include "SDK/FN_TutorialHighlightData_parameters.hpp"
#include "SDK/FN_VaultCharacterLightingBP_structs.hpp"
#include "SDK/FN_VaultCharacterLightingBP_classes.hpp"
#include "SDK/FN_VaultCharacterLightingBP_parameters.hpp"
#include "SDK/FN_ButtonStyle-Slot-Gadget-S_structs.hpp"
#include "SDK/FN_ButtonStyle-Slot-Gadget-S_classes.hpp"
#include "SDK/FN_ButtonStyle-Slot-Gadget-S_parameters.hpp"
#include "SDK/FN_Frontend_SkillTree_structs.hpp"
#include "SDK/FN_Frontend_SkillTree_classes.hpp"
#include "SDK/FN_Frontend_SkillTree_parameters.hpp"
#include "SDK/FN_Frontend_Lobby_structs.hpp"
#include "SDK/FN_Frontend_Lobby_classes.hpp"
#include "SDK/FN_Frontend_Lobby_parameters.hpp"
#include "SDK/FN_FrontEndStore_structs.hpp"
#include "SDK/FN_FrontEndStore_classes.hpp"
#include "SDK/FN_FrontEndStore_parameters.hpp"
#include "SDK/FN_FortniteWorldMap_structs.hpp"
#include "SDK/FN_FortniteWorldMap_classes.hpp"
#include "SDK/FN_FortniteWorldMap_parameters.hpp"
#include "SDK/FN_WM_PinManager_structs.hpp"
#include "SDK/FN_WM_PinManager_classes.hpp"
#include "SDK/FN_WM_PinManager_parameters.hpp"
#include "SDK/FN_FortniteTownmap_structs.hpp"
#include "SDK/FN_FortniteTownmap_classes.hpp"
#include "SDK/FN_FortniteTownmap_parameters.hpp"
#include "SDK/FN_GameSubCatalog_structs.hpp"
#include "SDK/FN_GameSubCatalog_classes.hpp"
#include "SDK/FN_GameSubCatalog_parameters.hpp"
#include "SDK/FN_Frontend_BG_Main_structs.hpp"
#include "SDK/FN_Frontend_BG_Main_classes.hpp"
#include "SDK/FN_Frontend_BG_Main_parameters.hpp"
#include "SDK/FN_FortniteUI_structs.hpp"
#include "SDK/FN_FortniteUI_classes.hpp"
#include "SDK/FN_FortniteUI_parameters.hpp"
#include "SDK/FN_LobbyGadgetButton_structs.hpp"
#include "SDK/FN_LobbyGadgetButton_classes.hpp"
#include "SDK/FN_LobbyGadgetButton_parameters.hpp"
#include "SDK/FN_PartyDisplayManagerBP_structs.hpp"
#include "SDK/FN_PartyDisplayManagerBP_classes.hpp"
#include "SDK/FN_PartyDisplayManagerBP_parameters.hpp"
#include "SDK/FN_TVPostProcessBP_structs.hpp"
#include "SDK/FN_TVPostProcessBP_classes.hpp"
#include "SDK/FN_TVPostProcessBP_parameters.hpp"
#include "SDK/FN_LobbyPlayerPadGadgets_structs.hpp"
#include "SDK/FN_LobbyPlayerPadGadgets_classes.hpp"
#include "SDK/FN_LobbyPlayerPadGadgets_parameters.hpp"
#include "SDK/FN_ChoiceCardName_structs.hpp"
#include "SDK/FN_ChoiceCardName_classes.hpp"
#include "SDK/FN_ChoiceCardName_parameters.hpp"
#include "SDK/FN_EIntTypes_structs.hpp"
#include "SDK/FN_EIntTypes_classes.hpp"
#include "SDK/FN_EIntTypes_parameters.hpp"
#include "SDK/FN_HexmapLevelSettings_Temperate01_structs.hpp"
#include "SDK/FN_HexmapLevelSettings_Temperate01_classes.hpp"
#include "SDK/FN_HexmapLevelSettings_Temperate01_parameters.hpp"
#include "SDK/FN_VaultWeaponPlacementHelper_structs.hpp"
#include "SDK/FN_VaultWeaponPlacementHelper_classes.hpp"
#include "SDK/FN_VaultWeaponPlacementHelper_parameters.hpp"
#include "SDK/FN_StoreCamera_Blueprint_structs.hpp"
#include "SDK/FN_StoreCamera_Blueprint_classes.hpp"
#include "SDK/FN_StoreCamera_Blueprint_parameters.hpp"
#include "SDK/FN_Frontend_structs.hpp"
#include "SDK/FN_Frontend_classes.hpp"
#include "SDK/FN_Frontend_parameters.hpp"
#include "SDK/FN_WM_Camera_structs.hpp"
#include "SDK/FN_WM_Camera_classes.hpp"
#include "SDK/FN_WM_Camera_parameters.hpp"
#include "SDK/FN_FortnitePartyBackdrop_Camera_structs.hpp"
#include "SDK/FN_FortnitePartyBackdrop_Camera_classes.hpp"
#include "SDK/FN_FortnitePartyBackdrop_Camera_parameters.hpp"
#include "SDK/FN_RenderToTextureFunctionLibrary_structs.hpp"
#include "SDK/FN_RenderToTextureFunctionLibrary_classes.hpp"
#include "SDK/FN_RenderToTextureFunctionLibrary_parameters.hpp"
#include "SDK/FN_FortnitePartyHeroSelect_Camera_structs.hpp"
#include "SDK/FN_FortnitePartyHeroSelect_Camera_classes.hpp"
#include "SDK/FN_FortnitePartyHeroSelect_Camera_parameters.hpp"
#include "SDK/FN_PartyCharacterPlacementHelper_structs.hpp"
#include "SDK/FN_PartyCharacterPlacementHelper_classes.hpp"
#include "SDK/FN_PartyCharacterPlacementHelper_parameters.hpp"
#include "SDK/FN_StoreCardReveal_BP_structs.hpp"
#include "SDK/FN_StoreCardReveal_BP_classes.hpp"
#include "SDK/FN_StoreCardReveal_BP_parameters.hpp"
#include "SDK/FN_FrontendCamera_Inspect_structs.hpp"
#include "SDK/FN_FrontendCamera_Inspect_classes.hpp"
#include "SDK/FN_FrontendCamera_Inspect_parameters.hpp"
#include "SDK/FN_FrontendCamera_Manage_structs.hpp"
#include "SDK/FN_FrontendCamera_Manage_classes.hpp"
#include "SDK/FN_FrontendCamera_Manage_parameters.hpp"
#include "SDK/FN_LobbyPlayerPadTop_structs.hpp"
#include "SDK/FN_LobbyPlayerPadTop_classes.hpp"
#include "SDK/FN_LobbyPlayerPadTop_parameters.hpp"
#include "SDK/FN_HeroesCamera_Blueprint_structs.hpp"
#include "SDK/FN_HeroesCamera_Blueprint_classes.hpp"
#include "SDK/FN_HeroesCamera_Blueprint_parameters.hpp"
#include "SDK/FN_TextStyle-HeaderParent_structs.hpp"
#include "SDK/FN_TextStyle-HeaderParent_classes.hpp"
#include "SDK/FN_TextStyle-HeaderParent_parameters.hpp"
#include "SDK/FN_Announce_TutorialConversation_structs.hpp"
#include "SDK/FN_Announce_TutorialConversation_classes.hpp"
#include "SDK/FN_Announce_TutorialConversation_parameters.hpp"
#include "SDK/FN_ChoiceCardCount_structs.hpp"
#include "SDK/FN_ChoiceCardCount_classes.hpp"
#include "SDK/FN_ChoiceCardCount_parameters.hpp"
#include "SDK/FN_LobbyPlayerAddPlayer_structs.hpp"
#include "SDK/FN_LobbyPlayerAddPlayer_classes.hpp"
#include "SDK/FN_LobbyPlayerAddPlayer_parameters.hpp"
#include "SDK/FN_Announce_NameHomeBase_structs.hpp"
#include "SDK/FN_Announce_NameHomeBase_classes.hpp"
#include "SDK/FN_Announce_NameHomeBase_parameters.hpp"
#include "SDK/FN_PowerRequirement_structs.hpp"
#include "SDK/FN_PowerRequirement_classes.hpp"
#include "SDK/FN_PowerRequirement_parameters.hpp"
#include "SDK/FN_StorePinataMaster_BP_structs.hpp"
#include "SDK/FN_StorePinataMaster_BP_classes.hpp"
#include "SDK/FN_StorePinataMaster_BP_parameters.hpp"
#include "SDK/FN_LoginCamera_Blueprint_structs.hpp"
#include "SDK/FN_LoginCamera_Blueprint_classes.hpp"
#include "SDK/FN_LoginCamera_Blueprint_parameters.hpp"
#include "SDK/FN_MissionAlertIndicator_structs.hpp"
#include "SDK/FN_MissionAlertIndicator_classes.hpp"
#include "SDK/FN_MissionAlertIndicator_parameters.hpp"
#include "SDK/FN_VaultCamera_Blueprint_structs.hpp"
#include "SDK/FN_VaultCamera_Blueprint_classes.hpp"
#include "SDK/FN_VaultCamera_Blueprint_parameters.hpp"
#include "SDK/FN_StoreItemCardFront_structs.hpp"
#include "SDK/FN_StoreItemCardFront_classes.hpp"
#include "SDK/FN_StoreItemCardFront_parameters.hpp"
#include "SDK/FN_HBOnboardingFlow_structs.hpp"
#include "SDK/FN_HBOnboardingFlow_classes.hpp"
#include "SDK/FN_HBOnboardingFlow_parameters.hpp"
#include "SDK/FN_FrontEndSettingsBP_structs.hpp"
#include "SDK/FN_FrontEndSettingsBP_classes.hpp"
#include "SDK/FN_FrontEndSettingsBP_parameters.hpp"
#include "SDK/FN_LoginResultWIdget_structs.hpp"
#include "SDK/FN_LoginResultWIdget_classes.hpp"
#include "SDK/FN_LoginResultWIdget_parameters.hpp"
#include "SDK/FN_TextStyle-PageTitle_structs.hpp"
#include "SDK/FN_TextStyle-PageTitle_classes.hpp"
#include "SDK/FN_TextStyle-PageTitle_parameters.hpp"
#include "SDK/FN_Announce_OnboardingSatelliteCine_structs.hpp"
#include "SDK/FN_Announce_OnboardingSatelliteCine_classes.hpp"
#include "SDK/FN_Announce_OnboardingSatelliteCine_parameters.hpp"
#include "SDK/FN_BP_Hex_PARENT_structs.hpp"
#include "SDK/FN_BP_Hex_PARENT_classes.hpp"
#include "SDK/FN_BP_Hex_PARENT_parameters.hpp"
#include "SDK/FN_BP_Hex_CriticalMission_structs.hpp"
#include "SDK/FN_BP_Hex_CriticalMission_classes.hpp"
#include "SDK/FN_BP_Hex_CriticalMission_parameters.hpp"
#include "SDK/FN_BP_Hex_TheGrasslands_structs.hpp"
#include "SDK/FN_BP_Hex_TheGrasslands_classes.hpp"
#include "SDK/FN_BP_Hex_TheGrasslands_parameters.hpp"
#include "SDK/FN_TheaterCamera_Blueprint_structs.hpp"
#include "SDK/FN_TheaterCamera_Blueprint_classes.hpp"
#include "SDK/FN_TheaterCamera_Blueprint_parameters.hpp"
#include "SDK/FN_BP_Hex_BuildTheBase_structs.hpp"
#include "SDK/FN_BP_Hex_BuildTheBase_classes.hpp"
#include "SDK/FN_BP_Hex_BuildTheBase_parameters.hpp"
#include "SDK/FN_LoginBackground_structs.hpp"
#include "SDK/FN_LoginBackground_classes.hpp"
#include "SDK/FN_LoginBackground_parameters.hpp"
#include "SDK/FN_BP_Hex_TheLakeside_structs.hpp"
#include "SDK/FN_BP_Hex_TheLakeside_classes.hpp"
#include "SDK/FN_BP_Hex_TheLakeside_parameters.hpp"
#include "SDK/FN_BP_Hex_TheIndustrialPark_structs.hpp"
#include "SDK/FN_BP_Hex_TheIndustrialPark_classes.hpp"
#include "SDK/FN_BP_Hex_TheIndustrialPark_parameters.hpp"
#include "SDK/FN_BP_Hex_TheForest_structs.hpp"
#include "SDK/FN_BP_Hex_TheForest_classes.hpp"
#include "SDK/FN_BP_Hex_TheForest_parameters.hpp"
#include "SDK/FN_BP_Hex_TheSuburbs_structs.hpp"
#include "SDK/FN_BP_Hex_TheSuburbs_classes.hpp"
#include "SDK/FN_BP_Hex_TheSuburbs_parameters.hpp"
#include "SDK/FN_MissionTooltip_structs.hpp"
#include "SDK/FN_MissionTooltip_classes.hpp"
#include "SDK/FN_MissionTooltip_parameters.hpp"
#include "SDK/FN_TextStyle-Header-S_structs.hpp"
#include "SDK/FN_TextStyle-Header-S_classes.hpp"
#include "SDK/FN_TextStyle-Header-S_parameters.hpp"
#include "SDK/FN_MissionRewardItem-Tooltip_structs.hpp"
#include "SDK/FN_MissionRewardItem-Tooltip_classes.hpp"
#include "SDK/FN_MissionRewardItem-Tooltip_parameters.hpp"
#include "SDK/FN_MissionModifierItem_structs.hpp"
#include "SDK/FN_MissionModifierItem_classes.hpp"
#include "SDK/FN_MissionModifierItem_parameters.hpp"
#include "SDK/FN_LoginScreen_structs.hpp"
#include "SDK/FN_LoginScreen_classes.hpp"
#include "SDK/FN_LoginScreen_parameters.hpp"
#include "SDK/FN_AccountLinkingWindow_structs.hpp"
#include "SDK/FN_AccountLinkingWindow_classes.hpp"
#include "SDK/FN_AccountLinkingWindow_parameters.hpp"
#include "SDK/FN_EulaWidget_structs.hpp"
#include "SDK/FN_EulaWidget_classes.hpp"
#include "SDK/FN_EulaWidget_parameters.hpp"
#include "SDK/FN_LoginAccountSelect_structs.hpp"
#include "SDK/FN_LoginAccountSelect_classes.hpp"
#include "SDK/FN_LoginAccountSelect_parameters.hpp"
#include "SDK/FN_StatusWidget_structs.hpp"
#include "SDK/FN_StatusWidget_classes.hpp"
#include "SDK/FN_StatusWidget_parameters.hpp"
#include "SDK/FN_SignInWidget_structs.hpp"
#include "SDK/FN_SignInWidget_classes.hpp"
#include "SDK/FN_SignInWidget_parameters.hpp"
#include "SDK/FN_SplashScreenWidget_structs.hpp"
#include "SDK/FN_SplashScreenWidget_classes.hpp"
#include "SDK/FN_SplashScreenWidget_parameters.hpp"
#include "SDK/FN_AthenaRotator_structs.hpp"
#include "SDK/FN_AthenaRotator_classes.hpp"
#include "SDK/FN_AthenaRotator_parameters.hpp"
#include "SDK/FN_JoinServer_structs.hpp"
#include "SDK/FN_JoinServer_classes.hpp"
#include "SDK/FN_JoinServer_parameters.hpp"
#include "SDK/FN_RejoinWindow_structs.hpp"
#include "SDK/FN_RejoinWindow_classes.hpp"
#include "SDK/FN_RejoinWindow_parameters.hpp"
#include "SDK/FN_StoreOfferCosts_structs.hpp"
#include "SDK/FN_StoreOfferCosts_classes.hpp"
#include "SDK/FN_StoreOfferCosts_parameters.hpp"
#include "SDK/FN_Border-SolidBG-Yellow_structs.hpp"
#include "SDK/FN_Border-SolidBG-Yellow_classes.hpp"
#include "SDK/FN_Border-SolidBG-Yellow_parameters.hpp"
#include "SDK/FN_TextStyle-BaseParent_structs.hpp"
#include "SDK/FN_TextStyle-BaseParent_classes.hpp"
#include "SDK/FN_TextStyle-BaseParent_parameters.hpp"
#include "SDK/FN_ComingSoonPlaceholderWidget_structs.hpp"
#include "SDK/FN_ComingSoonPlaceholderWidget_classes.hpp"
#include "SDK/FN_ComingSoonPlaceholderWidget_parameters.hpp"
#include "SDK/FN_TutorialWindow_structs.hpp"
#include "SDK/FN_TutorialWindow_classes.hpp"
#include "SDK/FN_TutorialWindow_parameters.hpp"
#include "SDK/FN_SubgameSelect_structs.hpp"
#include "SDK/FN_SubgameSelect_classes.hpp"
#include "SDK/FN_SubgameSelect_parameters.hpp"
#include "SDK/FN_TextStyle-SignInPage-S_structs.hpp"
#include "SDK/FN_TextStyle-SignInPage-S_classes.hpp"
#include "SDK/FN_TextStyle-SignInPage-S_parameters.hpp"
#include "SDK/FN_FrontEnd_structs.hpp"
#include "SDK/FN_FrontEnd_classes.hpp"
#include "SDK/FN_FrontEnd_parameters.hpp"
#include "SDK/FN_AthenaTabsScreen_structs.hpp"
#include "SDK/FN_AthenaTabsScreen_classes.hpp"
#include "SDK/FN_AthenaTabsScreen_parameters.hpp"
#include "SDK/FN_ButtonStyle-Primary-XL-Yellow_structs.hpp"
#include "SDK/FN_ButtonStyle-Primary-XL-Yellow_classes.hpp"
#include "SDK/FN_ButtonStyle-Primary-XL-Yellow_parameters.hpp"
#include "SDK/FN_SubGameSelectRotatorItems_structs.hpp"
#include "SDK/FN_SubGameSelectRotatorItems_classes.hpp"
#include "SDK/FN_SubGameSelectRotatorItems_parameters.hpp"
#include "SDK/FN_TextStyle-Button-Primary-M-FadedDisabled_structs.hpp"
#include "SDK/FN_TextStyle-Button-Primary-M-FadedDisabled_classes.hpp"
#include "SDK/FN_TextStyle-Button-Primary-M-FadedDisabled_parameters.hpp"
#include "SDK/FN_AthenaLeaderboardTab_structs.hpp"
#include "SDK/FN_AthenaLeaderboardTab_classes.hpp"
#include "SDK/FN_AthenaLeaderboardTab_parameters.hpp"
#include "SDK/FN_LeaderboardRowWidget_structs.hpp"
#include "SDK/FN_LeaderboardRowWidget_classes.hpp"
#include "SDK/FN_LeaderboardRowWidget_parameters.hpp"
#include "SDK/FN_ButtonStyle-Skew_structs.hpp"
#include "SDK/FN_ButtonStyle-Skew_classes.hpp"
#include "SDK/FN_ButtonStyle-Skew_parameters.hpp"
#include "SDK/FN_ButtonStyle-Tab-Main_structs.hpp"
#include "SDK/FN_ButtonStyle-Tab-Main_classes.hpp"
#include "SDK/FN_ButtonStyle-Tab-Main_parameters.hpp"
#include "SDK/FN_TextStyle-Base-M_structs.hpp"
#include "SDK/FN_TextStyle-Base-M_classes.hpp"
#include "SDK/FN_TextStyle-Base-M_parameters.hpp"
#include "SDK/FN_AthenaLobbyPlayerPanel_structs.hpp"
#include "SDK/FN_AthenaLobbyPlayerPanel_classes.hpp"
#include "SDK/FN_AthenaLobbyPlayerPanel_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S_structs.hpp"
#include "SDK/FN_TextStyle-Base-S_classes.hpp"
#include "SDK/FN_TextStyle-Base-S_parameters.hpp"
#include "SDK/FN_AthenaLobby_structs.hpp"
#include "SDK/FN_AthenaLobby_classes.hpp"
#include "SDK/FN_AthenaLobby_parameters.hpp"
#include "SDK/FN_ConsoleProfileWidget_structs.hpp"
#include "SDK/FN_ConsoleProfileWidget_classes.hpp"
#include "SDK/FN_ConsoleProfileWidget_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-LowOpacity_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-LowOpacity_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-LowOpacity_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S-B_structs.hpp"
#include "SDK/FN_TextStyle-Base-S-B_classes.hpp"
#include "SDK/FN_TextStyle-Base-S-B_parameters.hpp"
#include "SDK/FN_AthenaLobbyPlayerPanelDetails_structs.hpp"
#include "SDK/FN_AthenaLobbyPlayerPanelDetails_classes.hpp"
#include "SDK/FN_AthenaLobbyPlayerPanelDetails_parameters.hpp"
#include "SDK/FN_AthenaLobbyPlayerPanelActions_structs.hpp"
#include "SDK/FN_AthenaLobbyPlayerPanelActions_classes.hpp"
#include "SDK/FN_AthenaLobbyPlayerPanelActions_parameters.hpp"
#include "SDK/FN_Border-FloatingShadow_structs.hpp"
#include "SDK/FN_Border-FloatingShadow_classes.hpp"
#include "SDK/FN_Border-FloatingShadow_parameters.hpp"
#include "SDK/FN_ButtonStyle-Primary-L-Yellow_structs.hpp"
#include "SDK/FN_ButtonStyle-Primary-L-Yellow_classes.hpp"
#include "SDK/FN_ButtonStyle-Primary-L-Yellow_parameters.hpp"
#include "SDK/FN_MissionGen_Athena_structs.hpp"
#include "SDK/FN_MissionGen_Athena_classes.hpp"
#include "SDK/FN_MissionGen_Athena_parameters.hpp"
#include "SDK/FN_EFortUITheme_structs.hpp"
#include "SDK/FN_EFortUITheme_classes.hpp"
#include "SDK/FN_EFortUITheme_parameters.hpp"
#include "SDK/FN_MissionGen_AthenaDuo_structs.hpp"
#include "SDK/FN_MissionGen_AthenaDuo_classes.hpp"
#include "SDK/FN_MissionGen_AthenaDuo_parameters.hpp"
#include "SDK/FN_MissionGen_AthenaSquad_structs.hpp"
#include "SDK/FN_MissionGen_AthenaSquad_classes.hpp"
#include "SDK/FN_MissionGen_AthenaSquad_parameters.hpp"
#include "SDK/FN_AthenaMatchmakingWidget_structs.hpp"
#include "SDK/FN_AthenaMatchmakingWidget_classes.hpp"
#include "SDK/FN_AthenaMatchmakingWidget_parameters.hpp"
#include "SDK/FN_StoreMain_OfferDetailsAttribute_structs.hpp"
#include "SDK/FN_StoreMain_OfferDetailsAttribute_classes.hpp"
#include "SDK/FN_StoreMain_OfferDetailsAttribute_parameters.hpp"
#include "SDK/FN_ActiveModifierItemHUD_structs.hpp"
#include "SDK/FN_ActiveModifierItemHUD_classes.hpp"
#include "SDK/FN_ActiveModifierItemHUD_parameters.hpp"
#include "SDK/FN_AdditionalEntriesIndicator_structs.hpp"
#include "SDK/FN_AdditionalEntriesIndicator_classes.hpp"
#include "SDK/FN_AdditionalEntriesIndicator_parameters.hpp"
#include "SDK/FN_AthenaNews_structs.hpp"
#include "SDK/FN_AthenaNews_classes.hpp"
#include "SDK/FN_AthenaNews_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S-B-LowOpacity_structs.hpp"
#include "SDK/FN_TextStyle-Base-S-B-LowOpacity_classes.hpp"
#include "SDK/FN_TextStyle-Base-S-B-LowOpacity_parameters.hpp"
#include "SDK/FN_FrontEndRewards_Definition_structs.hpp"
#include "SDK/FN_FrontEndRewards_Definition_classes.hpp"
#include "SDK/FN_FrontEndRewards_Definition_parameters.hpp"
#include "SDK/FN_CheckExpeditionRewardsAction_structs.hpp"
#include "SDK/FN_CheckExpeditionRewardsAction_classes.hpp"
#include "SDK/FN_CheckExpeditionRewardsAction_parameters.hpp"
#include "SDK/FN_AthenaStatsTab_structs.hpp"
#include "SDK/FN_AthenaStatsTab_classes.hpp"
#include "SDK/FN_AthenaStatsTab_parameters.hpp"
#include "SDK/FN_CheckFrontEndDailyRewardsAction_structs.hpp"
#include "SDK/FN_CheckFrontEndDailyRewardsAction_classes.hpp"
#include "SDK/FN_CheckFrontEndDailyRewardsAction_parameters.hpp"
#include "SDK/FN_TextStyle-Base-M-B_structs.hpp"
#include "SDK/FN_TextStyle-Base-M-B_classes.hpp"
#include "SDK/FN_TextStyle-Base-M-B_parameters.hpp"
#include "SDK/FN_TextStyle-Base-L_structs.hpp"
#include "SDK/FN_TextStyle-Base-L_classes.hpp"
#include "SDK/FN_TextStyle-Base-L_parameters.hpp"
#include "SDK/FN_CheckRateExperienceAction_structs.hpp"
#include "SDK/FN_CheckRateExperienceAction_classes.hpp"
#include "SDK/FN_CheckRateExperienceAction_parameters.hpp"
#include "SDK/FN_ProgressBarType_structs.hpp"
#include "SDK/FN_ProgressBarType_classes.hpp"
#include "SDK/FN_ProgressBarType_parameters.hpp"
#include "SDK/FN_MissionFocusWidget_structs.hpp"
#include "SDK/FN_MissionFocusWidget_classes.hpp"
#include "SDK/FN_MissionFocusWidget_parameters.hpp"
#include "SDK/FN_TextStyle-Base-L-B-S_structs.hpp"
#include "SDK/FN_TextStyle-Base-L-B-S_classes.hpp"
#include "SDK/FN_TextStyle-Base-L-B-S_parameters.hpp"
#include "SDK/FN_Feedback_RateExperience_structs.hpp"
#include "SDK/FN_Feedback_RateExperience_classes.hpp"
#include "SDK/FN_Feedback_RateExperience_parameters.hpp"
#include "SDK/FN_LegacyButtonStyle-Base_structs.hpp"
#include "SDK/FN_LegacyButtonStyle-Base_classes.hpp"
#include "SDK/FN_LegacyButtonStyle-Base_parameters.hpp"
#include "SDK/FN_SubgameSelectScreen_structs.hpp"
#include "SDK/FN_SubgameSelectScreen_classes.hpp"
#include "SDK/FN_SubgameSelectScreen_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S-S_structs.hpp"
#include "SDK/FN_TextStyle-Base-S-S_classes.hpp"
#include "SDK/FN_TextStyle-Base-S-S_parameters.hpp"
#include "SDK/FN_MainTabsScreen_structs.hpp"
#include "SDK/FN_MainTabsScreen_classes.hpp"
#include "SDK/FN_MainTabsScreen_parameters.hpp"
#include "SDK/FN_QuestsCountIconTabButton_structs.hpp"
#include "SDK/FN_QuestsCountIconTabButton_classes.hpp"
#include "SDK/FN_QuestsCountIconTabButton_parameters.hpp"
#include "SDK/FN_StoreMain_Root_structs.hpp"
#include "SDK/FN_StoreMain_Root_classes.hpp"
#include "SDK/FN_StoreMain_Root_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S-B-MineShaft_structs.hpp"
#include "SDK/FN_TextStyle-Base-S-B-MineShaft_classes.hpp"
#include "SDK/FN_TextStyle-Base-S-B-MineShaft_parameters.hpp"
#include "SDK/FN_StoreMain_MTXOffer_structs.hpp"
#include "SDK/FN_StoreMain_MTXOffer_classes.hpp"
#include "SDK/FN_StoreMain_MTXOffer_parameters.hpp"
#include "SDK/FN_StoreMain_OfferDetails_structs.hpp"
#include "SDK/FN_StoreMain_OfferDetails_classes.hpp"
#include "SDK/FN_StoreMain_OfferDetails_parameters.hpp"
#include "SDK/FN_FriendNotification_structs.hpp"
#include "SDK/FN_FriendNotification_classes.hpp"
#include "SDK/FN_FriendNotification_parameters.hpp"
#include "SDK/FN_DynamicQuestUpdateInfo_structs.hpp"
#include "SDK/FN_DynamicQuestUpdateInfo_classes.hpp"
#include "SDK/FN_DynamicQuestUpdateInfo_parameters.hpp"
#include "SDK/FN_HUD_structs.hpp"
#include "SDK/FN_HUD_classes.hpp"
#include "SDK/FN_HUD_parameters.hpp"
#include "SDK/FN_ActiveModifiersHUD_structs.hpp"
#include "SDK/FN_ActiveModifiersHUD_classes.hpp"
#include "SDK/FN_ActiveModifiersHUD_parameters.hpp"
#include "SDK/FN_Announcement_Layout_structs.hpp"
#include "SDK/FN_Announcement_Layout_classes.hpp"
#include "SDK/FN_Announcement_Layout_parameters.hpp"
#include "SDK/FN_Announcement_Basic_structs.hpp"
#include "SDK/FN_Announcement_Basic_classes.hpp"
#include "SDK/FN_Announcement_Basic_parameters.hpp"
#include "SDK/FN_MissionTracker_structs.hpp"
#include "SDK/FN_MissionTracker_classes.hpp"
#include "SDK/FN_MissionTracker_parameters.hpp"
#include "SDK/FN_BluGloInventory_structs.hpp"
#include "SDK/FN_BluGloInventory_classes.hpp"
#include "SDK/FN_BluGloInventory_parameters.hpp"
#include "SDK/FN_ZoneDayCompletion_ScoreBlock_structs.hpp"
#include "SDK/FN_ZoneDayCompletion_ScoreBlock_classes.hpp"
#include "SDK/FN_ZoneDayCompletion_ScoreBlock_parameters.hpp"
#include "SDK/FN_ZoneScoreWidget_structs.hpp"
#include "SDK/FN_ZoneScoreWidget_classes.hpp"
#include "SDK/FN_ZoneScoreWidget_parameters.hpp"
#include "SDK/FN_TeamScoreToPlayerXPRewardWidget_structs.hpp"
#include "SDK/FN_TeamScoreToPlayerXPRewardWidget_classes.hpp"
#include "SDK/FN_TeamScoreToPlayerXPRewardWidget_parameters.hpp"
#include "SDK/FN_EquippedItem-Bandolier_structs.hpp"
#include "SDK/FN_EquippedItem-Bandolier_classes.hpp"
#include "SDK/FN_EquippedItem-Bandolier_parameters.hpp"
#include "SDK/FN_PinnedSchematicItemWidget_structs.hpp"
#include "SDK/FN_PinnedSchematicItemWidget_classes.hpp"
#include "SDK/FN_PinnedSchematicItemWidget_parameters.hpp"
#include "SDK/FN_PinnedSchematicItemsWidget_structs.hpp"
#include "SDK/FN_PinnedSchematicItemsWidget_classes.hpp"
#include "SDK/FN_PinnedSchematicItemsWidget_parameters.hpp"
#include "SDK/FN_PlayerInfo_structs.hpp"
#include "SDK/FN_PlayerInfo_classes.hpp"
#include "SDK/FN_PlayerInfo_parameters.hpp"
#include "SDK/FN_Border-PlayerXPBar-Frame_structs.hpp"
#include "SDK/FN_Border-PlayerXPBar-Frame_classes.hpp"
#include "SDK/FN_Border-PlayerXPBar-Frame_parameters.hpp"
#include "SDK/FN_ChatWidget_structs.hpp"
#include "SDK/FN_ChatWidget_classes.hpp"
#include "SDK/FN_ChatWidget_parameters.hpp"
#include "SDK/FN_PickupManager_structs.hpp"
#include "SDK/FN_PickupManager_classes.hpp"
#include "SDK/FN_PickupManager_parameters.hpp"
#include "SDK/FN_CraftingBar_structs.hpp"
#include "SDK/FN_CraftingBar_classes.hpp"
#include "SDK/FN_CraftingBar_parameters.hpp"
#include "SDK/FN_DeathWidget_structs.hpp"
#include "SDK/FN_DeathWidget_classes.hpp"
#include "SDK/FN_DeathWidget_parameters.hpp"
#include "SDK/FN_EquippedItemWidget_structs.hpp"
#include "SDK/FN_EquippedItemWidget_classes.hpp"
#include "SDK/FN_EquippedItemWidget_parameters.hpp"
#include "SDK/FN_SurvivorRescuedCounter_structs.hpp"
#include "SDK/FN_SurvivorRescuedCounter_classes.hpp"
#include "SDK/FN_SurvivorRescuedCounter_parameters.hpp"
#include "SDK/FN_QuestUpdateEntry_structs.hpp"
#include "SDK/FN_QuestUpdateEntry_classes.hpp"
#include "SDK/FN_QuestUpdateEntry_parameters.hpp"
#include "SDK/FN_PlayerZoneTeamScoreContributionWidget_structs.hpp"
#include "SDK/FN_PlayerZoneTeamScoreContributionWidget_classes.hpp"
#include "SDK/FN_PlayerZoneTeamScoreContributionWidget_parameters.hpp"
#include "SDK/FN_QuestObjectiveEntry_structs.hpp"
#include "SDK/FN_QuestObjectiveEntry_classes.hpp"
#include "SDK/FN_QuestObjectiveEntry_parameters.hpp"
#include "SDK/FN_HordeTierResultsWidget_structs.hpp"
#include "SDK/FN_HordeTierResultsWidget_classes.hpp"
#include "SDK/FN_HordeTierResultsWidget_parameters.hpp"
#include "SDK/FN_Results_NameplateWidget_structs.hpp"
#include "SDK/FN_Results_NameplateWidget_classes.hpp"
#include "SDK/FN_Results_NameplateWidget_parameters.hpp"
#include "SDK/FN_QuestProgressWidget_structs.hpp"
#include "SDK/FN_QuestProgressWidget_classes.hpp"
#include "SDK/FN_QuestProgressWidget_parameters.hpp"
#include "SDK/FN_REsults_CommanderXP_MaterialData_structs.hpp"
#include "SDK/FN_REsults_CommanderXP_MaterialData_classes.hpp"
#include "SDK/FN_REsults_CommanderXP_MaterialData_parameters.hpp"
#include "SDK/FN_Results_CommanderXP_Data_structs.hpp"
#include "SDK/FN_Results_CommanderXP_Data_classes.hpp"
#include "SDK/FN_Results_CommanderXP_Data_parameters.hpp"
#include "SDK/FN_TextStyle-Power-S_structs.hpp"
#include "SDK/FN_TextStyle-Power-S_classes.hpp"
#include "SDK/FN_TextStyle-Power-S_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-S_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-S_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-S_parameters.hpp"
#include "SDK/FN_LocalPlayerHitPointInfo_structs.hpp"
#include "SDK/FN_LocalPlayerHitPointInfo_classes.hpp"
#include "SDK/FN_LocalPlayerHitPointInfo_parameters.hpp"
#include "SDK/FN_HordeWaveAlertWidget_structs.hpp"
#include "SDK/FN_HordeWaveAlertWidget_classes.hpp"
#include "SDK/FN_HordeWaveAlertWidget_parameters.hpp"
#include "SDK/FN_HordeWaveModifiersWidget_structs.hpp"
#include "SDK/FN_HordeWaveModifiersWidget_classes.hpp"
#include "SDK/FN_HordeWaveModifiersWidget_parameters.hpp"
#include "SDK/FN_HordeWaveModifiersTile_structs.hpp"
#include "SDK/FN_HordeWaveModifiersTile_classes.hpp"
#include "SDK/FN_HordeWaveModifiersTile_parameters.hpp"
#include "SDK/FN_CinematicLanuageToTrackStruct_structs.hpp"
#include "SDK/FN_CinematicLanuageToTrackStruct_classes.hpp"
#include "SDK/FN_CinematicLanuageToTrackStruct_parameters.hpp"
#include "SDK/FN_Results_TeamScore_structs.hpp"
#include "SDK/FN_Results_TeamScore_classes.hpp"
#include "SDK/FN_Results_TeamScore_parameters.hpp"
#include "SDK/FN_HUD_TeamInfo_structs.hpp"
#include "SDK/FN_HUD_TeamInfo_classes.hpp"
#include "SDK/FN_HUD_TeamInfo_parameters.hpp"
#include "SDK/FN_Results_PlayerScoreBox_structs.hpp"
#include "SDK/FN_Results_PlayerScoreBox_classes.hpp"
#include "SDK/FN_Results_PlayerScoreBox_parameters.hpp"
#include "SDK/FN_Results_TeamTotalScore_structs.hpp"
#include "SDK/FN_Results_TeamTotalScore_classes.hpp"
#include "SDK/FN_Results_TeamTotalScore_parameters.hpp"
#include "SDK/FN_Results_BonusXpType_structs.hpp"
#include "SDK/FN_Results_BonusXpType_classes.hpp"
#include "SDK/FN_Results_BonusXpType_parameters.hpp"
#include "SDK/FN_KillerPortraitWidget_structs.hpp"
#include "SDK/FN_KillerPortraitWidget_classes.hpp"
#include "SDK/FN_KillerPortraitWidget_parameters.hpp"
#include "SDK/FN_MinimapContainer_structs.hpp"
#include "SDK/FN_MinimapContainer_classes.hpp"
#include "SDK/FN_MinimapContainer_parameters.hpp"
#include "SDK/FN_QuickbarBase_structs.hpp"
#include "SDK/FN_QuickbarBase_classes.hpp"
#include "SDK/FN_QuickbarBase_parameters.hpp"
#include "SDK/FN_TalkingHeadWidget_structs.hpp"
#include "SDK/FN_TalkingHeadWidget_classes.hpp"
#include "SDK/FN_TalkingHeadWidget_parameters.hpp"
#include "SDK/FN_Announce_QuestUpdate_structs.hpp"
#include "SDK/FN_Announce_QuestUpdate_classes.hpp"
#include "SDK/FN_Announce_QuestUpdate_parameters.hpp"
#include "SDK/FN_Results_TeleportPadPlayerTop_structs.hpp"
#include "SDK/FN_Results_TeleportPadPlayerTop_classes.hpp"
#include "SDK/FN_Results_TeleportPadPlayerTop_parameters.hpp"
#include "SDK/FN_QuestUpdatesLog_structs.hpp"
#include "SDK/FN_QuestUpdatesLog_classes.hpp"
#include "SDK/FN_QuestUpdatesLog_parameters.hpp"
#include "SDK/FN_Results_Badge_structs.hpp"
#include "SDK/FN_Results_Badge_classes.hpp"
#include "SDK/FN_Results_Badge_parameters.hpp"
#include "SDK/FN_Announcement_QuestUpdate_structs.hpp"
#include "SDK/FN_Announcement_QuestUpdate_classes.hpp"
#include "SDK/FN_Announcement_QuestUpdate_parameters.hpp"
#include "SDK/FN_Results_Widget_structs.hpp"
#include "SDK/FN_Results_Widget_classes.hpp"
#include "SDK/FN_Results_Widget_parameters.hpp"
#include "SDK/FN_Results_StatsSubtypeBox_structs.hpp"
#include "SDK/FN_Results_StatsSubtypeBox_classes.hpp"
#include "SDK/FN_Results_StatsSubtypeBox_parameters.hpp"
#include "SDK/FN_BasicGradientFill_structs.hpp"
#include "SDK/FN_BasicGradientFill_classes.hpp"
#include "SDK/FN_BasicGradientFill_parameters.hpp"
#include "SDK/FN_Results_PlayerScoreRow_structs.hpp"
#include "SDK/FN_Results_PlayerScoreRow_classes.hpp"
#include "SDK/FN_Results_PlayerScoreRow_parameters.hpp"
#include "SDK/FN_Results_Summary_structs.hpp"
#include "SDK/FN_Results_Summary_classes.hpp"
#include "SDK/FN_Results_Summary_parameters.hpp"
#include "SDK/FN_Results_BadgeLootBar_structs.hpp"
#include "SDK/FN_Results_BadgeLootBar_classes.hpp"
#include "SDK/FN_Results_BadgeLootBar_parameters.hpp"
#include "SDK/FN_Results_CommanderXP_structs.hpp"
#include "SDK/FN_Results_CommanderXP_classes.hpp"
#include "SDK/FN_Results_CommanderXP_parameters.hpp"
#include "SDK/FN_Results_TeamScoreRow_structs.hpp"
#include "SDK/FN_Results_TeamScoreRow_classes.hpp"
#include "SDK/FN_Results_TeamScoreRow_parameters.hpp"
#include "SDK/FN_Results_TeamScoreBox_structs.hpp"
#include "SDK/FN_Results_TeamScoreBox_classes.hpp"
#include "SDK/FN_Results_TeamScoreBox_parameters.hpp"
#include "SDK/FN_Results_BadgeLoot_structs.hpp"
#include "SDK/FN_Results_BadgeLoot_classes.hpp"
#include "SDK/FN_Results_BadgeLoot_parameters.hpp"
#include "SDK/FN_WaveModifiersWidget_structs.hpp"
#include "SDK/FN_WaveModifiersWidget_classes.hpp"
#include "SDK/FN_WaveModifiersWidget_parameters.hpp"
#include "SDK/FN_Results_SummaryBadge_structs.hpp"
#include "SDK/FN_Results_SummaryBadge_classes.hpp"
#include "SDK/FN_Results_SummaryBadge_parameters.hpp"
#include "SDK/FN_HitPointBar_structs.hpp"
#include "SDK/FN_HitPointBar_classes.hpp"
#include "SDK/FN_HitPointBar_parameters.hpp"
#include "SDK/FN_Results_TopPanel_structs.hpp"
#include "SDK/FN_Results_TopPanel_classes.hpp"
#include "SDK/FN_Results_TopPanel_parameters.hpp"
#include "SDK/FN_TextStyle-Header-L_structs.hpp"
#include "SDK/FN_TextStyle-Header-L_classes.hpp"
#include "SDK/FN_TextStyle-Header-L_parameters.hpp"
#include "SDK/FN_Results_CommanderXPBar_structs.hpp"
#include "SDK/FN_Results_CommanderXPBar_classes.hpp"
#include "SDK/FN_Results_CommanderXPBar_parameters.hpp"
#include "SDK/FN_Results_TeleportPadPlayer_structs.hpp"
#include "SDK/FN_Results_TeleportPadPlayer_classes.hpp"
#include "SDK/FN_Results_TeleportPadPlayer_parameters.hpp"
#include "SDK/FN_Results_TeamSubtotalScore_structs.hpp"
#include "SDK/FN_Results_TeamSubtotalScore_classes.hpp"
#include "SDK/FN_Results_TeamSubtotalScore_parameters.hpp"
#include "SDK/FN_TeamMemberBluGloIndicator_structs.hpp"
#include "SDK/FN_TeamMemberBluGloIndicator_classes.hpp"
#include "SDK/FN_TeamMemberBluGloIndicator_parameters.hpp"
#include "SDK/FN_Results_TeleportPad_structs.hpp"
#include "SDK/FN_Results_TeleportPad_classes.hpp"
#include "SDK/FN_Results_TeleportPad_parameters.hpp"
#include "SDK/FN_WaveModifiersTile_structs.hpp"
#include "SDK/FN_WaveModifiersTile_classes.hpp"
#include "SDK/FN_WaveModifiersTile_parameters.hpp"
#include "SDK/FN_AthenaWinWidget_structs.hpp"
#include "SDK/FN_AthenaWinWidget_classes.hpp"
#include "SDK/FN_AthenaWinWidget_parameters.hpp"
#include "SDK/FN_Cinematic-TeamMics_structs.hpp"
#include "SDK/FN_Cinematic-TeamMics_classes.hpp"
#include "SDK/FN_Cinematic-TeamMics_parameters.hpp"
#include "SDK/FN_Cinematic_structs.hpp"
#include "SDK/FN_Cinematic_classes.hpp"
#include "SDK/FN_Cinematic_parameters.hpp"
#include "SDK/FN_ButtonStyle-Primary-L_structs.hpp"
#include "SDK/FN_ButtonStyle-Primary-L_classes.hpp"
#include "SDK/FN_ButtonStyle-Primary-L_parameters.hpp"
#include "SDK/FN_HUD-TeamMemberInfo_structs.hpp"
#include "SDK/FN_HUD-TeamMemberInfo_classes.hpp"
#include "SDK/FN_HUD-TeamMemberInfo_parameters.hpp"
#include "SDK/FN_RatingWidget_NUI_structs.hpp"
#include "SDK/FN_RatingWidget_NUI_classes.hpp"
#include "SDK/FN_RatingWidget_NUI_parameters.hpp"
#include "SDK/FN_TeamMicStack_structs.hpp"
#include "SDK/FN_TeamMicStack_classes.hpp"
#include "SDK/FN_TeamMicStack_parameters.hpp"
#include "SDK/FN_Athena_PlayerController_structs.hpp"
#include "SDK/FN_Athena_PlayerController_classes.hpp"
#include "SDK/FN_Athena_PlayerController_parameters.hpp"
#include "SDK/FN_MicIndicator_structs.hpp"
#include "SDK/FN_MicIndicator_classes.hpp"
#include "SDK/FN_MicIndicator_parameters.hpp"
#include "SDK/FN_ItemDisplayStyle_structs.hpp"
#include "SDK/FN_ItemDisplayStyle_classes.hpp"
#include "SDK/FN_ItemDisplayStyle_parameters.hpp"
#include "SDK/FN_AmbientControllerComponent_Athena_structs.hpp"
#include "SDK/FN_AmbientControllerComponent_Athena_classes.hpp"
#include "SDK/FN_AmbientControllerComponent_Athena_parameters.hpp"
#include "SDK/FN_AthenaHUD_structs.hpp"
#include "SDK/FN_AthenaHUD_classes.hpp"
#include "SDK/FN_AthenaHUD_parameters.hpp"
#include "SDK/FN_AthenaAerialFeedback_structs.hpp"
#include "SDK/FN_AthenaAerialFeedback_classes.hpp"
#include "SDK/FN_AthenaAerialFeedback_parameters.hpp"
#include "SDK/FN_AthenaCompass_structs.hpp"
#include "SDK/FN_AthenaCompass_classes.hpp"
#include "SDK/FN_AthenaCompass_parameters.hpp"
#include "SDK/FN_AthenaDeathWidget_structs.hpp"
#include "SDK/FN_AthenaDeathWidget_classes.hpp"
#include "SDK/FN_AthenaDeathWidget_parameters.hpp"
#include "SDK/FN_AthenaEquippedItemWidget_structs.hpp"
#include "SDK/FN_AthenaEquippedItemWidget_classes.hpp"
#include "SDK/FN_AthenaEquippedItemWidget_parameters.hpp"
#include "SDK/FN_AthenaEquipProgress_structs.hpp"
#include "SDK/FN_AthenaEquipProgress_classes.hpp"
#include "SDK/FN_AthenaEquipProgress_parameters.hpp"
#include "SDK/FN_AthenaKillerPortraitWidget_structs.hpp"
#include "SDK/FN_AthenaKillerPortraitWidget_classes.hpp"
#include "SDK/FN_AthenaKillerPortraitWidget_parameters.hpp"
#include "SDK/FN_AthenaViewTargetHitPointBar_structs.hpp"
#include "SDK/FN_AthenaViewTargetHitPointBar_classes.hpp"
#include "SDK/FN_AthenaViewTargetHitPointBar_parameters.hpp"
#include "SDK/FN_TextStyle-Base-L-B-Yellow_structs.hpp"
#include "SDK/FN_TextStyle-Base-L-B-Yellow_classes.hpp"
#include "SDK/FN_TextStyle-Base-L-B-Yellow_parameters.hpp"
#include "SDK/FN_AthenaViewTargetHitPointInfo_structs.hpp"
#include "SDK/FN_AthenaViewTargetHitPointInfo_classes.hpp"
#include "SDK/FN_AthenaViewTargetHitPointInfo_parameters.hpp"
#include "SDK/FN_AthenaGameOverScreen_structs.hpp"
#include "SDK/FN_AthenaGameOverScreen_classes.hpp"
#include "SDK/FN_AthenaGameOverScreen_parameters.hpp"
#include "SDK/FN_Athena_GameState_structs.hpp"
#include "SDK/FN_Athena_GameState_classes.hpp"
#include "SDK/FN_Athena_GameState_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-S-Green_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-S-Green_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-S-Green_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-HUD-DBNOBarMax_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-HUD-DBNOBarMax_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-HUD-DBNOBarMax_parameters.hpp"
#include "SDK/FN_AthenaGamePhaseChangeWidget_structs.hpp"
#include "SDK/FN_AthenaGamePhaseChangeWidget_classes.hpp"
#include "SDK/FN_AthenaGamePhaseChangeWidget_parameters.hpp"
#include "SDK/FN_AthenaGamePhaseWidget_structs.hpp"
#include "SDK/FN_AthenaGamePhaseWidget_classes.hpp"
#include "SDK/FN_AthenaGamePhaseWidget_parameters.hpp"
#include "SDK/FN_AthenaTeamMemberDBNOState_structs.hpp"
#include "SDK/FN_AthenaTeamMemberDBNOState_classes.hpp"
#include "SDK/FN_AthenaTeamMemberDBNOState_parameters.hpp"
#include "SDK/FN_AthenaInventoryLimitStatusIndicator_structs.hpp"
#include "SDK/FN_AthenaInventoryLimitStatusIndicator_classes.hpp"
#include "SDK/FN_AthenaInventoryLimitStatusIndicator_parameters.hpp"
#include "SDK/FN_AthenaHitPointBar_structs.hpp"
#include "SDK/FN_AthenaHitPointBar_classes.hpp"
#include "SDK/FN_AthenaHitPointBar_parameters.hpp"
#include "SDK/FN_Border-ShellTopBar-Glow_structs.hpp"
#include "SDK/FN_Border-ShellTopBar-Glow_classes.hpp"
#include "SDK/FN_Border-ShellTopBar-Glow_parameters.hpp"
#include "SDK/FN_Border-ShellTopBar-LeftSide_structs.hpp"
#include "SDK/FN_Border-ShellTopBar-LeftSide_classes.hpp"
#include "SDK/FN_Border-ShellTopBar-LeftSide_parameters.hpp"
#include "SDK/FN_Border-ShellTopBar-RightSide_structs.hpp"
#include "SDK/FN_Border-ShellTopBar-RightSide_classes.hpp"
#include "SDK/FN_Border-ShellTopBar-RightSide_parameters.hpp"
#include "SDK/FN_Border-ShellTopBar_structs.hpp"
#include "SDK/FN_Border-ShellTopBar_classes.hpp"
#include "SDK/FN_Border-ShellTopBar_parameters.hpp"
#include "SDK/FN_AthenaLocalPlayerHitPointInfo_structs.hpp"
#include "SDK/FN_AthenaLocalPlayerHitPointInfo_classes.hpp"
#include "SDK/FN_AthenaLocalPlayerHitPointInfo_parameters.hpp"
#include "SDK/FN_LobbyTimer_structs.hpp"
#include "SDK/FN_LobbyTimer_classes.hpp"
#include "SDK/FN_LobbyTimer_parameters.hpp"
#include "SDK/FN_Border-TopBar-Timer_structs.hpp"
#include "SDK/FN_Border-TopBar-Timer_classes.hpp"
#include "SDK/FN_Border-TopBar-Timer_parameters.hpp"
#include "SDK/FN_Border-TopBar-TimerFlash_structs.hpp"
#include "SDK/FN_Border-TopBar-TimerFlash_classes.hpp"
#include "SDK/FN_Border-TopBar-TimerFlash_parameters.hpp"
#include "SDK/FN_AthenaInventoryPanel_structs.hpp"
#include "SDK/FN_AthenaInventoryPanel_classes.hpp"
#include "SDK/FN_AthenaInventoryPanel_parameters.hpp"
#include "SDK/FN_AthenaInventoryDropSlot_structs.hpp"
#include "SDK/FN_AthenaInventoryDropSlot_classes.hpp"
#include "SDK/FN_AthenaInventoryDropSlot_parameters.hpp"
#include "SDK/FN_Border-TopBar-Twitch_structs.hpp"
#include "SDK/FN_Border-TopBar-Twitch_classes.hpp"
#include "SDK/FN_Border-TopBar-Twitch_parameters.hpp"
#include "SDK/FN_AthenaInventoryEquipSlot_structs.hpp"
#include "SDK/FN_AthenaInventoryEquipSlot_classes.hpp"
#include "SDK/FN_AthenaInventoryEquipSlot_parameters.hpp"
#include "SDK/FN_AthenaInventoryFortItemTileButton_structs.hpp"
#include "SDK/FN_AthenaInventoryFortItemTileButton_classes.hpp"
#include "SDK/FN_AthenaInventoryFortItemTileButton_parameters.hpp"
#include "SDK/FN_Border_HUD_Line_Horz_structs.hpp"
#include "SDK/FN_Border_HUD_Line_Horz_classes.hpp"
#include "SDK/FN_Border_HUD_Line_Horz_parameters.hpp"
#include "SDK/FN_AthenaInventoryDragVisual_structs.hpp"
#include "SDK/FN_AthenaInventoryDragVisual_classes.hpp"
#include "SDK/FN_AthenaInventoryDragVisual_parameters.hpp"
#include "SDK/FN_Border_HUD_Line_Vert_structs.hpp"
#include "SDK/FN_Border_HUD_Line_Vert_classes.hpp"
#include "SDK/FN_Border_HUD_Line_Vert_parameters.hpp"
#include "SDK/FN_Border_HUD_ResourceBg_structs.hpp"
#include "SDK/FN_Border_HUD_ResourceBg_classes.hpp"
#include "SDK/FN_Border_HUD_ResourceBg_parameters.hpp"
#include "SDK/FN_AthenaKillFeedItem_structs.hpp"
#include "SDK/FN_AthenaKillFeedItem_classes.hpp"
#include "SDK/FN_AthenaKillFeedItem_parameters.hpp"
#include "SDK/FN_AthenaKillFeedWidget_structs.hpp"
#include "SDK/FN_AthenaKillFeedWidget_classes.hpp"
#include "SDK/FN_AthenaKillFeedWidget_parameters.hpp"
#include "SDK/FN_AthenaKillsWidget_structs.hpp"
#include "SDK/FN_AthenaKillsWidget_classes.hpp"
#include "SDK/FN_AthenaKillsWidget_parameters.hpp"
#include "SDK/FN_Border_ShellUberBG_structs.hpp"
#include "SDK/FN_Border_ShellUberBG_classes.hpp"
#include "SDK/FN_Border_ShellUberBG_parameters.hpp"
#include "SDK/FN_ButtonStyle-Hamburger_structs.hpp"
#include "SDK/FN_ButtonStyle-Hamburger_classes.hpp"
#include "SDK/FN_ButtonStyle-Hamburger_parameters.hpp"
#include "SDK/FN_AthenaPickupManager_structs.hpp"
#include "SDK/FN_AthenaPickupManager_classes.hpp"
#include "SDK/FN_AthenaPickupManager_parameters.hpp"
#include "SDK/FN_PickupMessageItem_structs.hpp"
#include "SDK/FN_PickupMessageItem_classes.hpp"
#include "SDK/FN_PickupMessageItem_parameters.hpp"
#include "SDK/FN_ButtonStyle-Outline-LeftShade-Red_structs.hpp"
#include "SDK/FN_ButtonStyle-Outline-LeftShade-Red_classes.hpp"
#include "SDK/FN_ButtonStyle-Outline-LeftShade-Red_parameters.hpp"
#include "SDK/FN_AthenaMinimapContainer_structs.hpp"
#include "SDK/FN_AthenaMinimapContainer_classes.hpp"
#include "SDK/FN_AthenaMinimapContainer_parameters.hpp"
#include "SDK/FN_TextStyle-Button-Outline-M-Disabled_structs.hpp"
#include "SDK/FN_TextStyle-Button-Outline-M-Disabled_classes.hpp"
#include "SDK/FN_TextStyle-Button-Outline-M-Disabled_parameters.hpp"
#include "SDK/FN_AthenaPlayerActionAlert_structs.hpp"
#include "SDK/FN_AthenaPlayerActionAlert_classes.hpp"
#include "SDK/FN_AthenaPlayerActionAlert_parameters.hpp"
#include "SDK/FN_ButtonStyle-Outline-Red_structs.hpp"
#include "SDK/FN_ButtonStyle-Outline-Red_classes.hpp"
#include "SDK/FN_ButtonStyle-Outline-Red_parameters.hpp"
#include "SDK/FN_ButtonStyle-Outline-XPBar_structs.hpp"
#include "SDK/FN_ButtonStyle-Outline-XPBar_classes.hpp"
#include "SDK/FN_ButtonStyle-Outline-XPBar_parameters.hpp"
#include "SDK/FN_AthenaPlayerInfo_structs.hpp"
#include "SDK/FN_AthenaPlayerInfo_classes.hpp"
#include "SDK/FN_AthenaPlayerInfo_parameters.hpp"
#include "SDK/FN_AthenaPlayersLeftWidget_structs.hpp"
#include "SDK/FN_AthenaPlayersLeftWidget_classes.hpp"
#include "SDK/FN_AthenaPlayersLeftWidget_parameters.hpp"
#include "SDK/FN_AthenaTeamMemberInfo_structs.hpp"
#include "SDK/FN_AthenaTeamMemberInfo_classes.hpp"
#include "SDK/FN_AthenaTeamMemberInfo_parameters.hpp"
#include "SDK/FN_ButtonStyle-Outline_structs.hpp"
#include "SDK/FN_ButtonStyle-Outline_classes.hpp"
#include "SDK/FN_ButtonStyle-Outline_parameters.hpp"
#include "SDK/FN_ButtonStyle-OutlineLeftShade_structs.hpp"
#include "SDK/FN_ButtonStyle-OutlineLeftShade_classes.hpp"
#include "SDK/FN_ButtonStyle-OutlineLeftShade_parameters.hpp"
#include "SDK/FN_QuickbarPrimary_structs.hpp"
#include "SDK/FN_QuickbarPrimary_classes.hpp"
#include "SDK/FN_QuickbarPrimary_parameters.hpp"
#include "SDK/FN_Border-PowerBar_structs.hpp"
#include "SDK/FN_Border-PowerBar_classes.hpp"
#include "SDK/FN_Border-PowerBar_parameters.hpp"
#include "SDK/FN_AthenaTeamInfo_structs.hpp"
#include "SDK/FN_AthenaTeamInfo_classes.hpp"
#include "SDK/FN_AthenaTeamInfo_parameters.hpp"
#include "SDK/FN_AthenaSessionId_structs.hpp"
#include "SDK/FN_AthenaSessionId_classes.hpp"
#include "SDK/FN_AthenaSessionId_parameters.hpp"
#include "SDK/FN_AthenaTeamMemberIndicator_structs.hpp"
#include "SDK/FN_AthenaTeamMemberIndicator_classes.hpp"
#include "SDK/FN_AthenaTeamMemberIndicator_parameters.hpp"
#include "SDK/FN_AthenaWatchers_structs.hpp"
#include "SDK/FN_AthenaWatchers_classes.hpp"
#include "SDK/FN_AthenaWatchers_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-HUD-HealthBarMax_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-HUD-HealthBarMax_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-HUD-HealthBarMax_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-HUD-ShieldBarMax_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-HUD-ShieldBarMax_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-HUD-ShieldBarMax_parameters.hpp"
#include "SDK/FN_TextStyle-Base-L-B_structs.hpp"
#include "SDK/FN_TextStyle-Base-L-B_classes.hpp"
#include "SDK/FN_TextStyle-Base-L-B_parameters.hpp"
#include "SDK/FN_TextStyle-Base-L-S_structs.hpp"
#include "SDK/FN_TextStyle-Base-L-S_classes.hpp"
#include "SDK/FN_TextStyle-Base-L-S_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S-S_LightGray_structs.hpp"
#include "SDK/FN_TextStyle-Base-S-S_LightGray_classes.hpp"
#include "SDK/FN_TextStyle-Base-S-S_LightGray_parameters.hpp"
#include "SDK/FN_TopBar_structs.hpp"
#include "SDK/FN_TopBar_classes.hpp"
#include "SDK/FN_TopBar_parameters.hpp"
#include "SDK/FN_BottomBarWidget_structs.hpp"
#include "SDK/FN_BottomBarWidget_classes.hpp"
#include "SDK/FN_BottomBarWidget_parameters.hpp"
#include "SDK/FN_BP_FortLiveStreamGrantWindowExpires_structs.hpp"
#include "SDK/FN_BP_FortLiveStreamGrantWindowExpires_classes.hpp"
#include "SDK/FN_BP_FortLiveStreamGrantWindowExpires_parameters.hpp"
#include "SDK/FN_BasicInteractionWidget_structs.hpp"
#include "SDK/FN_BasicInteractionWidget_classes.hpp"
#include "SDK/FN_BasicInteractionWidget_parameters.hpp"
#include "SDK/FN_Border-KeyBase-Center-M_structs.hpp"
#include "SDK/FN_Border-KeyBase-Center-M_classes.hpp"
#include "SDK/FN_Border-KeyBase-Center-M_parameters.hpp"
#include "SDK/FN_AthenaQuickbarPrimary_structs.hpp"
#include "SDK/FN_AthenaQuickbarPrimary_classes.hpp"
#include "SDK/FN_AthenaQuickbarPrimary_parameters.hpp"
#include "SDK/FN_HUD-PickupItemWidget_structs.hpp"
#include "SDK/FN_HUD-PickupItemWidget_classes.hpp"
#include "SDK/FN_HUD-PickupItemWidget_parameters.hpp"
#include "SDK/FN_Credits_structs.hpp"
#include "SDK/FN_Credits_classes.hpp"
#include "SDK/FN_Credits_parameters.hpp"
#include "SDK/FN_Border_Navy_RGrad_structs.hpp"
#include "SDK/FN_Border_Navy_RGrad_classes.hpp"
#include "SDK/FN_Border_Navy_RGrad_parameters.hpp"
#include "SDK/FN_Border_Solid_LtBlue_structs.hpp"
#include "SDK/FN_Border_Solid_LtBlue_classes.hpp"
#include "SDK/FN_Border_Solid_LtBlue_parameters.hpp"
#include "SDK/FN_BuildingInfoIndicator_structs.hpp"
#include "SDK/FN_BuildingInfoIndicator_classes.hpp"
#include "SDK/FN_BuildingInfoIndicator_parameters.hpp"
#include "SDK/FN_PackResource_structs.hpp"
#include "SDK/FN_PackResource_classes.hpp"
#include "SDK/FN_PackResource_parameters.hpp"
#include "SDK/FN_BuildingBar_structs.hpp"
#include "SDK/FN_BuildingBar_classes.hpp"
#include "SDK/FN_BuildingBar_parameters.hpp"
#include "SDK/FN_ButtonStyle-PanelSelector_structs.hpp"
#include "SDK/FN_ButtonStyle-PanelSelector_classes.hpp"
#include "SDK/FN_ButtonStyle-PanelSelector_parameters.hpp"
#include "SDK/FN_LeaveButton_structs.hpp"
#include "SDK/FN_LeaveButton_classes.hpp"
#include "SDK/FN_LeaveButton_parameters.hpp"
#include "SDK/FN_TextStyle-Header-XL-S_structs.hpp"
#include "SDK/FN_TextStyle-Header-XL-S_classes.hpp"
#include "SDK/FN_TextStyle-Header-XL-S_parameters.hpp"
#include "SDK/FN_EulaTab_structs.hpp"
#include "SDK/FN_EulaTab_classes.hpp"
#include "SDK/FN_EulaTab_parameters.hpp"
#include "SDK/FN_MainMenu_structs.hpp"
#include "SDK/FN_MainMenu_classes.hpp"
#include "SDK/FN_MainMenu_parameters.hpp"
#include "SDK/FN_ThirdPartyTab_structs.hpp"
#include "SDK/FN_ThirdPartyTab_classes.hpp"
#include "SDK/FN_ThirdPartyTab_parameters.hpp"
#include "SDK/FN_OutpostScreenStormShieldContent_structs.hpp"
#include "SDK/FN_OutpostScreenStormShieldContent_classes.hpp"
#include "SDK/FN_OutpostScreenStormShieldContent_parameters.hpp"
#include "SDK/FN_TextStyle-MessageCenter-Description_structs.hpp"
#include "SDK/FN_TextStyle-MessageCenter-Description_classes.hpp"
#include "SDK/FN_TextStyle-MessageCenter-Description_parameters.hpp"
#include "SDK/FN_MessageCenterListItem_structs.hpp"
#include "SDK/FN_MessageCenterListItem_classes.hpp"
#include "SDK/FN_MessageCenterListItem_parameters.hpp"
#include "SDK/FN_TopBarSkillPoints_structs.hpp"
#include "SDK/FN_TopBarSkillPoints_classes.hpp"
#include "SDK/FN_TopBarSkillPoints_parameters.hpp"
#include "SDK/FN_News_structs.hpp"
#include "SDK/FN_News_classes.hpp"
#include "SDK/FN_News_parameters.hpp"
#include "SDK/FN_PopupCenterMessageModalPanel_structs.hpp"
#include "SDK/FN_PopupCenterMessageModalPanel_classes.hpp"
#include "SDK/FN_PopupCenterMessageModalPanel_parameters.hpp"
#include "SDK/FN_ChangeSubgameButton_structs.hpp"
#include "SDK/FN_ChangeSubgameButton_classes.hpp"
#include "SDK/FN_ChangeSubgameButton_parameters.hpp"
#include "SDK/FN_HomebaseRatingBar_structs.hpp"
#include "SDK/FN_HomebaseRatingBar_classes.hpp"
#include "SDK/FN_HomebaseRatingBar_parameters.hpp"
#include "SDK/FN_PowerWidget_structs.hpp"
#include "SDK/FN_PowerWidget_classes.hpp"
#include "SDK/FN_PowerWidget_parameters.hpp"
#include "SDK/FN_NewsEntry_structs.hpp"
#include "SDK/FN_NewsEntry_classes.hpp"
#include "SDK/FN_NewsEntry_parameters.hpp"
#include "SDK/FN_ResourceAggregationWidget_structs.hpp"
#include "SDK/FN_ResourceAggregationWidget_classes.hpp"
#include "SDK/FN_ResourceAggregationWidget_parameters.hpp"
#include "SDK/FN_InterestIndicatorWidget_structs.hpp"
#include "SDK/FN_InterestIndicatorWidget_classes.hpp"
#include "SDK/FN_InterestIndicatorWidget_parameters.hpp"
#include "SDK/FN_ReticleStatusWidget_structs.hpp"
#include "SDK/FN_ReticleStatusWidget_classes.hpp"
#include "SDK/FN_ReticleStatusWidget_parameters.hpp"
#include "SDK/FN_OptionsMenuRowSelector_structs.hpp"
#include "SDK/FN_OptionsMenuRowSelector_classes.hpp"
#include "SDK/FN_OptionsMenuRowSelector_parameters.hpp"
#include "SDK/FN_FullPartyBar_structs.hpp"
#include "SDK/FN_FullPartyBar_classes.hpp"
#include "SDK/FN_FullPartyBar_parameters.hpp"
#include "SDK/FN_FullPartyMember_structs.hpp"
#include "SDK/FN_FullPartyMember_classes.hpp"
#include "SDK/FN_FullPartyMember_parameters.hpp"
#include "SDK/FN_OptionsMenuInput_structs.hpp"
#include "SDK/FN_OptionsMenuInput_classes.hpp"
#include "SDK/FN_OptionsMenuInput_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-BlueGray_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-BlueGray_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-BlueGray_parameters.hpp"
#include "SDK/FN_BuildWatermark_structs.hpp"
#include "SDK/FN_BuildWatermark_classes.hpp"
#include "SDK/FN_BuildWatermark_parameters.hpp"
#include "SDK/FN_Border-MainModal-Dark_structs.hpp"
#include "SDK/FN_Border-MainModal-Dark_classes.hpp"
#include "SDK/FN_Border-MainModal-Dark_parameters.hpp"
#include "SDK/FN_OptionsMenuSlider_Light_structs.hpp"
#include "SDK/FN_OptionsMenuSlider_Light_classes.hpp"
#include "SDK/FN_OptionsMenuSlider_Light_parameters.hpp"
#include "SDK/FN_Feedback_structs.hpp"
#include "SDK/FN_Feedback_classes.hpp"
#include "SDK/FN_Feedback_parameters.hpp"
#include "SDK/FN_InteractionIndicator_structs.hpp"
#include "SDK/FN_InteractionIndicator_classes.hpp"
#include "SDK/FN_InteractionIndicator_parameters.hpp"
#include "SDK/FN_Interaction_DefenderBeacon_structs.hpp"
#include "SDK/FN_Interaction_DefenderBeacon_classes.hpp"
#include "SDK/FN_Interaction_DefenderBeacon_parameters.hpp"
#include "SDK/FN_BPI_StormShieldinterface_structs.hpp"
#include "SDK/FN_BPI_StormShieldinterface_classes.hpp"
#include "SDK/FN_BPI_StormShieldinterface_parameters.hpp"
#include "SDK/FN_OptionsMenuSlider_structs.hpp"
#include "SDK/FN_OptionsMenuSlider_classes.hpp"
#include "SDK/FN_OptionsMenuSlider_parameters.hpp"
#include "SDK/FN_FullPartyMemberConnected_structs.hpp"
#include "SDK/FN_FullPartyMemberConnected_classes.hpp"
#include "SDK/FN_FullPartyMemberConnected_parameters.hpp"
#include "SDK/FN_TextStyle-Header-L-Critical_structs.hpp"
#include "SDK/FN_TextStyle-Header-L-Critical_classes.hpp"
#include "SDK/FN_TextStyle-Header-L-Critical_parameters.hpp"
#include "SDK/FN_LeaveWarningInfo_structs.hpp"
#include "SDK/FN_LeaveWarningInfo_classes.hpp"
#include "SDK/FN_LeaveWarningInfo_parameters.hpp"
#include "SDK/FN_LegalInfo_structs.hpp"
#include "SDK/FN_LegalInfo_classes.hpp"
#include "SDK/FN_LegalInfo_parameters.hpp"
#include "SDK/FN_MessageCenterWidget_structs.hpp"
#include "SDK/FN_MessageCenterWidget_classes.hpp"
#include "SDK/FN_MessageCenterWidget_parameters.hpp"
#include "SDK/FN_OptionsMenu_structs.hpp"
#include "SDK/FN_OptionsMenu_classes.hpp"
#include "SDK/FN_OptionsMenu_parameters.hpp"
#include "SDK/FN_QuickbarSlot_structs.hpp"
#include "SDK/FN_QuickbarSlot_classes.hpp"
#include "SDK/FN_QuickbarSlot_parameters.hpp"
#include "SDK/FN_ScrollingTextButton_structs.hpp"
#include "SDK/FN_ScrollingTextButton_classes.hpp"
#include "SDK/FN_ScrollingTextButton_parameters.hpp"
#include "SDK/FN_TabInputOptions_structs.hpp"
#include "SDK/FN_TabInputOptions_classes.hpp"
#include "SDK/FN_TabInputOptions_parameters.hpp"
#include "SDK/FN_OptionsMenuHudRotator_structs.hpp"
#include "SDK/FN_OptionsMenuHudRotator_classes.hpp"
#include "SDK/FN_OptionsMenuHudRotator_parameters.hpp"
#include "SDK/FN_TabVideoOptions_structs.hpp"
#include "SDK/FN_TabVideoOptions_classes.hpp"
#include "SDK/FN_TabVideoOptions_parameters.hpp"
#include "SDK/FN_ButtonStyle-RotatorBorder_structs.hpp"
#include "SDK/FN_ButtonStyle-RotatorBorder_classes.hpp"
#include "SDK/FN_ButtonStyle-RotatorBorder_parameters.hpp"
#include "SDK/FN_TextRotator_structs.hpp"
#include "SDK/FN_TextRotator_classes.hpp"
#include "SDK/FN_TextRotator_parameters.hpp"
#include "SDK/FN_TabAccountLinkage_structs.hpp"
#include "SDK/FN_TabAccountLinkage_classes.hpp"
#include "SDK/FN_TabAccountLinkage_parameters.hpp"
#include "SDK/FN_FortTwitchLogin_structs.hpp"
#include "SDK/FN_FortTwitchLogin_classes.hpp"
#include "SDK/FN_FortTwitchLogin_parameters.hpp"
#include "SDK/FN_RotatorSelector_structs.hpp"
#include "SDK/FN_RotatorSelector_classes.hpp"
#include "SDK/FN_RotatorSelector_parameters.hpp"
#include "SDK/FN_TwitchLoginModalWidget_structs.hpp"
#include "SDK/FN_TwitchLoginModalWidget_classes.hpp"
#include "SDK/FN_TwitchLoginModalWidget_parameters.hpp"
#include "SDK/FN_TextStyle-Header-L-NavyBlue_structs.hpp"
#include "SDK/FN_TextStyle-Header-L-NavyBlue_classes.hpp"
#include "SDK/FN_TextStyle-Header-L-NavyBlue_parameters.hpp"
#include "SDK/FN_ButtonStyle-Primary-Radio-M-NoText_structs.hpp"
#include "SDK/FN_ButtonStyle-Primary-Radio-M-NoText_classes.hpp"
#include "SDK/FN_ButtonStyle-Primary-Radio-M-NoText_parameters.hpp"
#include "SDK/FN_OutpostScreenStormShield_structs.hpp"
#include "SDK/FN_OutpostScreenStormShield_classes.hpp"
#include "SDK/FN_OutpostScreenStormShield_parameters.hpp"
#include "SDK/FN_TabAudioOptions_structs.hpp"
#include "SDK/FN_TabAudioOptions_classes.hpp"
#include "SDK/FN_TabAudioOptions_parameters.hpp"
#include "SDK/FN_Border-PowerToast_structs.hpp"
#include "SDK/FN_Border-PowerToast_classes.hpp"
#include "SDK/FN_Border-PowerToast_parameters.hpp"
#include "SDK/FN_Border-PowerToastGlow_structs.hpp"
#include "SDK/FN_Border-PowerToastGlow_classes.hpp"
#include "SDK/FN_Border-PowerToastGlow_parameters.hpp"
#include "SDK/FN_TutorialRichText_structs.hpp"
#include "SDK/FN_TutorialRichText_classes.hpp"
#include "SDK/FN_TutorialRichText_parameters.hpp"
#include "SDK/FN_TutorialTransparentRichText_structs.hpp"
#include "SDK/FN_TutorialTransparentRichText_classes.hpp"
#include "SDK/FN_TutorialTransparentRichText_parameters.hpp"
#include "SDK/FN_TutorialOverlay_structs.hpp"
#include "SDK/FN_TutorialOverlay_classes.hpp"
#include "SDK/FN_TutorialOverlay_parameters.hpp"
#include "SDK/FN_Border-ShellTopBar-Solid_structs.hpp"
#include "SDK/FN_Border-ShellTopBar-Solid_classes.hpp"
#include "SDK/FN_Border-ShellTopBar-Solid_parameters.hpp"
#include "SDK/FN_TabBrightnessOptions_structs.hpp"
#include "SDK/FN_TabBrightnessOptions_classes.hpp"
#include "SDK/FN_TabBrightnessOptions_parameters.hpp"
#include "SDK/FN_TextStyle-Header-M-NavyBlue_structs.hpp"
#include "SDK/FN_TextStyle-Header-M-NavyBlue_classes.hpp"
#include "SDK/FN_TextStyle-Header-M-NavyBlue_parameters.hpp"
#include "SDK/FN_TabGamePadConfig_structs.hpp"
#include "SDK/FN_TabGamePadConfig_classes.hpp"
#include "SDK/FN_TabGamePadConfig_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-BlueGray_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-BlueGray_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-BlueGray_parameters.hpp"
#include "SDK/FN_ToastWidget_structs.hpp"
#include "SDK/FN_ToastWidget_classes.hpp"
#include "SDK/FN_ToastWidget_parameters.hpp"
#include "SDK/FN_GamepadMappingInfo_structs.hpp"
#include "SDK/FN_GamepadMappingInfo_classes.hpp"
#include "SDK/FN_GamepadMappingInfo_parameters.hpp"
#include "SDK/FN_TabGameOptions_structs.hpp"
#include "SDK/FN_TabGameOptions_classes.hpp"
#include "SDK/FN_TabGameOptions_parameters.hpp"
#include "SDK/FN_TabGameOptionsHud_structs.hpp"
#include "SDK/FN_TabGameOptionsHud_classes.hpp"
#include "SDK/FN_TabGameOptionsHud_parameters.hpp"
#include "SDK/FN_TabGameOptionsMain_structs.hpp"
#include "SDK/FN_TabGameOptionsMain_classes.hpp"
#include "SDK/FN_TabGameOptionsMain_parameters.hpp"
#include "SDK/FN_ShowFriendCodesSelection_structs.hpp"
#include "SDK/FN_ShowFriendCodesSelection_classes.hpp"
#include "SDK/FN_ShowFriendCodesSelection_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-EnchantedBlue_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-EnchantedBlue_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-EnchantedBlue_parameters.hpp"
#include "SDK/FN_TextStyle-Toast-Description_structs.hpp"
#include "SDK/FN_TextStyle-Toast-Description_classes.hpp"
#include "SDK/FN_TextStyle-Toast-Description_parameters.hpp"
#include "SDK/FN_TextStyle-Toast-Title_structs.hpp"
#include "SDK/FN_TextStyle-Toast-Title_classes.hpp"
#include "SDK/FN_TextStyle-Toast-Title_parameters.hpp"
#include "SDK/FN_FriendCodeConsole_structs.hpp"
#include "SDK/FN_FriendCodeConsole_classes.hpp"
#include "SDK/FN_FriendCodeConsole_parameters.hpp"
#include "SDK/FN_PermissionsRoot_structs.hpp"
#include "SDK/FN_PermissionsRoot_classes.hpp"
#include "SDK/FN_PermissionsRoot_parameters.hpp"
#include "SDK/FN_OutpostScreenStormShieldPermissions_structs.hpp"
#include "SDK/FN_OutpostScreenStormShieldPermissions_classes.hpp"
#include "SDK/FN_OutpostScreenStormShieldPermissions_parameters.hpp"
#include "SDK/FN_ButtonStyle-Primary-Radio-M_structs.hpp"
#include "SDK/FN_ButtonStyle-Primary-Radio-M_classes.hpp"
#include "SDK/FN_ButtonStyle-Primary-Radio-M_parameters.hpp"
#include "SDK/FN_Border-ModalHeader_structs.hpp"
#include "SDK/FN_Border-ModalHeader_classes.hpp"
#include "SDK/FN_Border-ModalHeader_parameters.hpp"
#include "SDK/FN_FriendCodePC_structs.hpp"
#include "SDK/FN_FriendCodePC_classes.hpp"
#include "SDK/FN_FriendCodePC_parameters.hpp"
#include "SDK/FN_PrivacyWidget_structs.hpp"
#include "SDK/FN_PrivacyWidget_classes.hpp"
#include "SDK/FN_PrivacyWidget_parameters.hpp"
#include "SDK/FN_ProgressWidget_structs.hpp"
#include "SDK/FN_ProgressWidget_classes.hpp"
#include "SDK/FN_ProgressWidget_parameters.hpp"
#include "SDK/FN_Border-SolidBG-RewardBack_structs.hpp"
#include "SDK/FN_Border-SolidBG-RewardBack_classes.hpp"
#include "SDK/FN_Border-SolidBG-RewardBack_parameters.hpp"
#include "SDK/FN_BP_PlayerControllerOutpost_structs.hpp"
#include "SDK/FN_BP_PlayerControllerOutpost_classes.hpp"
#include "SDK/FN_BP_PlayerControllerOutpost_parameters.hpp"
#include "SDK/FN_WebPurchase_structs.hpp"
#include "SDK/FN_WebPurchase_classes.hpp"
#include "SDK/FN_WebPurchase_parameters.hpp"
#include "SDK/FN_FounderBadgeTooltip_structs.hpp"
#include "SDK/FN_FounderBadgeTooltip_classes.hpp"
#include "SDK/FN_FounderBadgeTooltip_parameters.hpp"
#include "SDK/FN_MonthlyVIPBadgeTooltip_structs.hpp"
#include "SDK/FN_MonthlyVIPBadgeTooltip_classes.hpp"
#include "SDK/FN_MonthlyVIPBadgeTooltip_parameters.hpp"
#include "SDK/FN_OutpostScreenCanEditPanel_structs.hpp"
#include "SDK/FN_OutpostScreenCanEditPanel_classes.hpp"
#include "SDK/FN_OutpostScreenCanEditPanel_parameters.hpp"
#include "SDK/FN_OutpostScreenCanEditRow_structs.hpp"
#include "SDK/FN_OutpostScreenCanEditRow_classes.hpp"
#include "SDK/FN_OutpostScreenCanEditRow_parameters.hpp"
#include "SDK/FN_XpBonusToolTip_structs.hpp"
#include "SDK/FN_XpBonusToolTip_classes.hpp"
#include "SDK/FN_XpBonusToolTip_parameters.hpp"
#include "SDK/FN_RadialPickerItem_structs.hpp"
#include "SDK/FN_RadialPickerItem_classes.hpp"
#include "SDK/FN_RadialPickerItem_parameters.hpp"
#include "SDK/FN_UIManager_structs.hpp"
#include "SDK/FN_UIManager_classes.hpp"
#include "SDK/FN_UIManager_parameters.hpp"
#include "SDK/FN_ToastDisplayArea_structs.hpp"
#include "SDK/FN_ToastDisplayArea_classes.hpp"
#include "SDK/FN_ToastDisplayArea_parameters.hpp"
#include "SDK/FN_PowerToastWidget_structs.hpp"
#include "SDK/FN_PowerToastWidget_classes.hpp"
#include "SDK/FN_PowerToastWidget_parameters.hpp"
#include "SDK/FN_PotentialResourceWidget_structs.hpp"
#include "SDK/FN_PotentialResourceWidget_classes.hpp"
#include "SDK/FN_PotentialResourceWidget_parameters.hpp"
#include "SDK/FN_MiniPartyBar_structs.hpp"
#include "SDK/FN_MiniPartyBar_classes.hpp"
#include "SDK/FN_MiniPartyBar_parameters.hpp"
#include "SDK/FN_MiniPartyMember_structs.hpp"
#include "SDK/FN_MiniPartyMember_classes.hpp"
#include "SDK/FN_MiniPartyMember_parameters.hpp"
#include "SDK/FN_AthenaQuickBarSlot_structs.hpp"
#include "SDK/FN_AthenaQuickBarSlot_classes.hpp"
#include "SDK/FN_AthenaQuickBarSlot_parameters.hpp"
#include "SDK/FN_RadialPicker_structs.hpp"
#include "SDK/FN_RadialPicker_classes.hpp"
#include "SDK/FN_RadialPicker_parameters.hpp"
#include "SDK/FN_Announcement_Tutorial_structs.hpp"
#include "SDK/FN_Announcement_Tutorial_classes.hpp"
#include "SDK/FN_Announcement_Tutorial_parameters.hpp"
#include "SDK/FN_Border-ModalHeader-Recycle_structs.hpp"
#include "SDK/FN_Border-ModalHeader-Recycle_classes.hpp"
#include "SDK/FN_Border-ModalHeader-Recycle_parameters.hpp"
#include "SDK/FN_ConfirmationWindow_structs.hpp"
#include "SDK/FN_ConfirmationWindow_classes.hpp"
#include "SDK/FN_ConfirmationWindow_parameters.hpp"
#include "SDK/FN_ButtonStyle-Left_structs.hpp"
#include "SDK/FN_ButtonStyle-Left_classes.hpp"
#include "SDK/FN_ButtonStyle-Left_parameters.hpp"
#include "SDK/FN_ErrorWindow_structs.hpp"
#include "SDK/FN_ErrorWindow_classes.hpp"
#include "SDK/FN_ErrorWindow_parameters.hpp"
#include "SDK/FN_ErrorEntry_structs.hpp"
#include "SDK/FN_ErrorEntry_classes.hpp"
#include "SDK/FN_ErrorEntry_parameters.hpp"
#include "SDK/FN_ButtonStyle-Right_structs.hpp"
#include "SDK/FN_ButtonStyle-Right_classes.hpp"
#include "SDK/FN_ButtonStyle-Right_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-EnchantedBlue_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-EnchantedBlue_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-EnchantedBlue_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS_parameters.hpp"
#include "SDK/FN_FrontEndRewards_Queue_structs.hpp"
#include "SDK/FN_FrontEndRewards_Queue_classes.hpp"
#include "SDK/FN_FrontEndRewards_Queue_parameters.hpp"
#include "SDK/FN_ProgressModalWidget_structs.hpp"
#include "SDK/FN_ProgressModalWidget_classes.hpp"
#include "SDK/FN_ProgressModalWidget_parameters.hpp"
#include "SDK/FN_QuestTalkingHeadWidget_structs.hpp"
#include "SDK/FN_QuestTalkingHeadWidget_classes.hpp"
#include "SDK/FN_QuestTalkingHeadWidget_parameters.hpp"
#include "SDK/FN_QuickbarSecondary_structs.hpp"
#include "SDK/FN_QuickbarSecondary_classes.hpp"
#include "SDK/FN_QuickbarSecondary_parameters.hpp"
#include "SDK/FN_InputReflector_structs.hpp"
#include "SDK/FN_InputReflector_classes.hpp"
#include "SDK/FN_InputReflector_parameters.hpp"
#include "SDK/FN_ButtonStyle-LeftDark_structs.hpp"
#include "SDK/FN_ButtonStyle-LeftDark_classes.hpp"
#include "SDK/FN_ButtonStyle-LeftDark_parameters.hpp"
#include "SDK/FN_ButtonStyle-Right-Dark_structs.hpp"
#include "SDK/FN_ButtonStyle-Right-Dark_classes.hpp"
#include "SDK/FN_ButtonStyle-Right-Dark_parameters.hpp"
#include "SDK/FN_BP_LocalPlayerProfileManagement_structs.hpp"
#include "SDK/FN_BP_LocalPlayerProfileManagement_classes.hpp"
#include "SDK/FN_BP_LocalPlayerProfileManagement_parameters.hpp"
#include "SDK/FN_TextStyle-Button-Outline-Disabled_structs.hpp"
#include "SDK/FN_TextStyle-Button-Outline-Disabled_classes.hpp"
#include "SDK/FN_TextStyle-Button-Outline-Disabled_parameters.hpp"
#include "SDK/FN_BP_LocalPlayerProfileModal_structs.hpp"
#include "SDK/FN_BP_LocalPlayerProfileModal_classes.hpp"
#include "SDK/FN_BP_LocalPlayerProfileModal_parameters.hpp"
#include "SDK/FN_Subtitles_structs.hpp"
#include "SDK/FN_Subtitles_classes.hpp"
#include "SDK/FN_Subtitles_parameters.hpp"
#include "SDK/FN_ButtonStyle-Secondary-M_structs.hpp"
#include "SDK/FN_ButtonStyle-Secondary-M_classes.hpp"
#include "SDK/FN_ButtonStyle-Secondary-M_parameters.hpp"
#include "SDK/FN_SlateContentCalloutMenu_structs.hpp"
#include "SDK/FN_SlateContentCalloutMenu_classes.hpp"
#include "SDK/FN_SlateContentCalloutMenu_parameters.hpp"
#include "SDK/FN_TextStyle-Base-L-B-Black_structs.hpp"
#include "SDK/FN_TextStyle-Base-L-B-Black_classes.hpp"
#include "SDK/FN_TextStyle-Base-L-B-Black_parameters.hpp"
#include "SDK/FN_TextStyle-Header-S-Black_structs.hpp"
#include "SDK/FN_TextStyle-Header-S-Black_classes.hpp"
#include "SDK/FN_TextStyle-Header-S-Black_parameters.hpp"
#include "SDK/FN_PopupCenterMessageWidget_structs.hpp"
#include "SDK/FN_PopupCenterMessageWidget_classes.hpp"
#include "SDK/FN_PopupCenterMessageWidget_parameters.hpp"
#include "SDK/FN_Reticle_structs.hpp"
#include "SDK/FN_Reticle_classes.hpp"
#include "SDK/FN_Reticle_parameters.hpp"
#include "SDK/FN_BannerSelectionWidget_structs.hpp"
#include "SDK/FN_BannerSelectionWidget_classes.hpp"
#include "SDK/FN_BannerSelectionWidget_parameters.hpp"
#include "SDK/FN_CheckFrontEndRewardsAction_structs.hpp"
#include "SDK/FN_CheckFrontEndRewardsAction_classes.hpp"
#include "SDK/FN_CheckFrontEndRewardsAction_parameters.hpp"
#include "SDK/FN_BP_BannerEditorTile_structs.hpp"
#include "SDK/FN_BP_BannerEditorTile_classes.hpp"
#include "SDK/FN_BP_BannerEditorTile_parameters.hpp"
#include "SDK/FN_ItemInspectEvolutionChoiceEntry_structs.hpp"
#include "SDK/FN_ItemInspectEvolutionChoiceEntry_classes.hpp"
#include "SDK/FN_ItemInspectEvolutionChoiceEntry_parameters.hpp"
#include "SDK/FN_BP_LocalPlayerBannerEditor_structs.hpp"
#include "SDK/FN_BP_LocalPlayerBannerEditor_classes.hpp"
#include "SDK/FN_BP_LocalPlayerBannerEditor_parameters.hpp"
#include "SDK/FN_View3DModel_structs.hpp"
#include "SDK/FN_View3DModel_classes.hpp"
#include "SDK/FN_View3DModel_parameters.hpp"
#include "SDK/FN_FrontEndRewards_Expedition_structs.hpp"
#include "SDK/FN_FrontEndRewards_Expedition_classes.hpp"
#include "SDK/FN_FrontEndRewards_Expedition_parameters.hpp"
#include "SDK/FN_QuestInfo_BulletList_structs.hpp"
#include "SDK/FN_QuestInfo_BulletList_classes.hpp"
#include "SDK/FN_QuestInfo_BulletList_parameters.hpp"
#include "SDK/FN_FrontEndRewards_CurrentReward_structs.hpp"
#include "SDK/FN_FrontEndRewards_CurrentReward_classes.hpp"
#include "SDK/FN_FrontEndRewards_CurrentReward_parameters.hpp"
#include "SDK/FN_QuestInfo_BulletListEntry_structs.hpp"
#include "SDK/FN_QuestInfo_BulletListEntry_classes.hpp"
#include "SDK/FN_QuestInfo_BulletListEntry_parameters.hpp"
#include "SDK/FN_FrontEndRewards_ChoiceRewards_structs.hpp"
#include "SDK/FN_FrontEndRewards_ChoiceRewards_classes.hpp"
#include "SDK/FN_FrontEndRewards_ChoiceRewards_parameters.hpp"
#include "SDK/FN_Announce_Gen_Quest_Conversation_FrontEndRewards_structs.hpp"
#include "SDK/FN_Announce_Gen_Quest_Conversation_FrontEndRewards_classes.hpp"
#include "SDK/FN_Announce_Gen_Quest_Conversation_FrontEndRewards_parameters.hpp"
#include "SDK/FN_FrontEndRewards_Conversation_VO_structs.hpp"
#include "SDK/FN_FrontEndRewards_Conversation_VO_classes.hpp"
#include "SDK/FN_FrontEndRewards_Conversation_VO_parameters.hpp"
#include "SDK/FN_FrontEndRewards_EpicQuest_structs.hpp"
#include "SDK/FN_FrontEndRewards_EpicQuest_classes.hpp"
#include "SDK/FN_FrontEndRewards_EpicQuest_parameters.hpp"
#include "SDK/FN_FrontEndRewards_ListRewards_structs.hpp"
#include "SDK/FN_FrontEndRewards_ListRewards_classes.hpp"
#include "SDK/FN_FrontEndRewards_ListRewards_parameters.hpp"
#include "SDK/FN_RewardsIcon_structs.hpp"
#include "SDK/FN_RewardsIcon_classes.hpp"
#include "SDK/FN_RewardsIcon_parameters.hpp"
#include "SDK/FN_ItemInspectScreen_structs.hpp"
#include "SDK/FN_ItemInspectScreen_classes.hpp"
#include "SDK/FN_ItemInspectScreen_parameters.hpp"
#include "SDK/FN_RotatingStarburstWidget_structs.hpp"
#include "SDK/FN_RotatingStarburstWidget_classes.hpp"
#include "SDK/FN_RotatingStarburstWidget_parameters.hpp"
#include "SDK/FN_ButtonStyle-ItemReward_structs.hpp"
#include "SDK/FN_ButtonStyle-ItemReward_classes.hpp"
#include "SDK/FN_ButtonStyle-ItemReward_parameters.hpp"
#include "SDK/FN_ItemInspectEvolutionIngredientsList_structs.hpp"
#include "SDK/FN_ItemInspectEvolutionIngredientsList_classes.hpp"
#include "SDK/FN_ItemInspectEvolutionIngredientsList_parameters.hpp"
#include "SDK/FN_ItemInspectEvolutionIngredientsEntry_structs.hpp"
#include "SDK/FN_ItemInspectEvolutionIngredientsEntry_classes.hpp"
#include "SDK/FN_ItemInspectEvolutionIngredientsEntry_parameters.hpp"
#include "SDK/FN_ItemInspectUpgradeCallout_structs.hpp"
#include "SDK/FN_ItemInspectUpgradeCallout_classes.hpp"
#include "SDK/FN_ItemInspectUpgradeCallout_parameters.hpp"
#include "SDK/FN_ItemInspectUpgradeConfirmation_structs.hpp"
#include "SDK/FN_ItemInspectUpgradeConfirmation_classes.hpp"
#include "SDK/FN_ItemInspectUpgradeConfirmation_parameters.hpp"
#include "SDK/FN_ItemInspectEvolutionConfirmation_structs.hpp"
#include "SDK/FN_ItemInspectEvolutionConfirmation_classes.hpp"
#include "SDK/FN_ItemInspectEvolutionConfirmation_parameters.hpp"
#include "SDK/FN_TextStyle-Header-M-Special-Large_structs.hpp"
#include "SDK/FN_TextStyle-Header-M-Special-Large_classes.hpp"
#include "SDK/FN_TextStyle-Header-M-Special-Large_parameters.hpp"
#include "SDK/FN_ItemInspectionItemExtraDetailsHostPanel_structs.hpp"
#include "SDK/FN_ItemInspectionItemExtraDetailsHostPanel_classes.hpp"
#include "SDK/FN_ItemInspectionItemExtraDetailsHostPanel_parameters.hpp"
#include "SDK/FN_QuestInfo_Widget_structs.hpp"
#include "SDK/FN_QuestInfo_Widget_classes.hpp"
#include "SDK/FN_QuestInfo_Widget_parameters.hpp"
#include "SDK/FN_PartyInfo_structs.hpp"
#include "SDK/FN_PartyInfo_classes.hpp"
#include "SDK/FN_PartyInfo_parameters.hpp"
#include "SDK/FN_CollectionBounds_structs.hpp"
#include "SDK/FN_CollectionBounds_classes.hpp"
#include "SDK/FN_CollectionBounds_parameters.hpp"
#include "SDK/FN_ItemInspectionMainItemDetailsHostPanel_structs.hpp"
#include "SDK/FN_ItemInspectionMainItemDetailsHostPanel_classes.hpp"
#include "SDK/FN_ItemInspectionMainItemDetailsHostPanel_parameters.hpp"
#include "SDK/FN_Border-TabM_structs.hpp"
#include "SDK/FN_Border-TabM_classes.hpp"
#include "SDK/FN_Border-TabM_parameters.hpp"
#include "SDK/FN_Border-SolidBG-Purple_structs.hpp"
#include "SDK/FN_Border-SolidBG-Purple_classes.hpp"
#include "SDK/FN_Border-SolidBG-Purple_parameters.hpp"
#include "SDK/FN_Border-TabM-Solid_structs.hpp"
#include "SDK/FN_Border-TabM-Solid_classes.hpp"
#include "SDK/FN_Border-TabM-Solid_parameters.hpp"
#include "SDK/FN_Rewards_Header_structs.hpp"
#include "SDK/FN_Rewards_Header_classes.hpp"
#include "SDK/FN_Rewards_Header_parameters.hpp"
#include "SDK/FN_ButtonStyle-BottomBar_structs.hpp"
#include "SDK/FN_ButtonStyle-BottomBar_classes.hpp"
#include "SDK/FN_ButtonStyle-BottomBar_parameters.hpp"
#include "SDK/FN_RewardListEntryType_structs.hpp"
#include "SDK/FN_RewardListEntryType_classes.hpp"
#include "SDK/FN_RewardListEntryType_parameters.hpp"
#include "SDK/FN_TextStyle-Button-BottomBar-S-Disabled_structs.hpp"
#include "SDK/FN_TextStyle-Button-BottomBar-S-Disabled_classes.hpp"
#include "SDK/FN_TextStyle-Button-BottomBar-S-Disabled_parameters.hpp"
#include "SDK/FN_Border-Empty_structs.hpp"
#include "SDK/FN_Border-Empty_classes.hpp"
#include "SDK/FN_Border-Empty_parameters.hpp"
#include "SDK/FN_FrontEndRewards_Widget_structs.hpp"
#include "SDK/FN_FrontEndRewards_Widget_classes.hpp"
#include "SDK/FN_FrontEndRewards_Widget_parameters.hpp"
#include "SDK/FN_Rewards_ItemCard_structs.hpp"
#include "SDK/FN_Rewards_ItemCard_classes.hpp"
#include "SDK/FN_Rewards_ItemCard_parameters.hpp"
#include "SDK/FN_MissionObjectiveContentWidgetInterface_structs.hpp"
#include "SDK/FN_MissionObjectiveContentWidgetInterface_classes.hpp"
#include "SDK/FN_MissionObjectiveContentWidgetInterface_parameters.hpp"
#include "SDK/FN_ObjectivesPage_structs.hpp"
#include "SDK/FN_ObjectivesPage_classes.hpp"
#include "SDK/FN_ObjectivesPage_parameters.hpp"
#include "SDK/FN_DailyRewards_structs.hpp"
#include "SDK/FN_DailyRewards_classes.hpp"
#include "SDK/FN_DailyRewards_parameters.hpp"
#include "SDK/FN_DailyRewardsCurrent_structs.hpp"
#include "SDK/FN_DailyRewardsCurrent_classes.hpp"
#include "SDK/FN_DailyRewardsCurrent_parameters.hpp"
#include "SDK/FN_MissionObjectiveWidgetProviderInterface_structs.hpp"
#include "SDK/FN_MissionObjectiveWidgetProviderInterface_classes.hpp"
#include "SDK/FN_MissionObjectiveWidgetProviderInterface_parameters.hpp"
#include "SDK/FN_DailyRewardsMissingFoundersPack_structs.hpp"
#include "SDK/FN_DailyRewardsMissingFoundersPack_classes.hpp"
#include "SDK/FN_DailyRewardsMissingFoundersPack_parameters.hpp"
#include "SDK/FN_DailyRewardsEpic_structs.hpp"
#include "SDK/FN_DailyRewardsEpic_classes.hpp"
#include "SDK/FN_DailyRewardsEpic_parameters.hpp"
#include "SDK/FN_ActiveModifiersPanelContent_structs.hpp"
#include "SDK/FN_ActiveModifiersPanelContent_classes.hpp"
#include "SDK/FN_ActiveModifiersPanelContent_parameters.hpp"
#include "SDK/FN_DailyRewardsSchedule_structs.hpp"
#include "SDK/FN_DailyRewardsSchedule_classes.hpp"
#include "SDK/FN_DailyRewardsSchedule_parameters.hpp"
#include "SDK/FN_EarnedBadgeTile_structs.hpp"
#include "SDK/FN_EarnedBadgeTile_classes.hpp"
#include "SDK/FN_EarnedBadgeTile_parameters.hpp"
#include "SDK/FN_Border-TabM-Stats_structs.hpp"
#include "SDK/FN_Border-TabM-Stats_classes.hpp"
#include "SDK/FN_Border-TabM-Stats_parameters.hpp"
#include "SDK/FN_DailyRewardsItem_structs.hpp"
#include "SDK/FN_DailyRewardsItem_classes.hpp"
#include "SDK/FN_DailyRewardsItem_parameters.hpp"
#include "SDK/FN_CollectionBarTopIcon_structs.hpp"
#include "SDK/FN_CollectionBarTopIcon_classes.hpp"
#include "SDK/FN_CollectionBarTopIcon_parameters.hpp"
#include "SDK/FN_PartyFinder_structs.hpp"
#include "SDK/FN_PartyFinder_classes.hpp"
#include "SDK/FN_PartyFinder_parameters.hpp"
#include "SDK/FN_CollectionBar_structs.hpp"
#include "SDK/FN_CollectionBar_classes.hpp"
#include "SDK/FN_CollectionBar_parameters.hpp"
#include "SDK/FN_TeamScorePanelContent_structs.hpp"
#include "SDK/FN_TeamScorePanelContent_classes.hpp"
#include "SDK/FN_TeamScorePanelContent_parameters.hpp"
#include "SDK/FN_MissionOverviewObjective_structs.hpp"
#include "SDK/FN_MissionOverviewObjective_classes.hpp"
#include "SDK/FN_MissionOverviewObjective_parameters.hpp"
#include "SDK/FN_PartyFinderListItem_structs.hpp"
#include "SDK/FN_PartyFinderListItem_classes.hpp"
#include "SDK/FN_PartyFinderListItem_parameters.hpp"
#include "SDK/FN_MgmtTabsScreen_structs.hpp"
#include "SDK/FN_MgmtTabsScreen_classes.hpp"
#include "SDK/FN_MgmtTabsScreen_parameters.hpp"
#include "SDK/FN_AbilitiesPage_structs.hpp"
#include "SDK/FN_AbilitiesPage_classes.hpp"
#include "SDK/FN_AbilitiesPage_parameters.hpp"
#include "SDK/FN_AbilitiesPageTile_structs.hpp"
#include "SDK/FN_AbilitiesPageTile_classes.hpp"
#include "SDK/FN_AbilitiesPageTile_parameters.hpp"
#include "SDK/FN_MovieWidget_structs.hpp"
#include "SDK/FN_MovieWidget_classes.hpp"
#include "SDK/FN_MovieWidget_parameters.hpp"
#include "SDK/FN_HeroSquadManagementScreen_structs.hpp"
#include "SDK/FN_HeroSquadManagementScreen_classes.hpp"
#include "SDK/FN_HeroSquadManagementScreen_parameters.hpp"
#include "SDK/FN_HeroSquadBonus_structs.hpp"
#include "SDK/FN_HeroSquadBonus_classes.hpp"
#include "SDK/FN_HeroSquadBonus_parameters.hpp"
#include "SDK/FN_HeroSquadBonuses_structs.hpp"
#include "SDK/FN_HeroSquadBonuses_classes.hpp"
#include "SDK/FN_HeroSquadBonuses_parameters.hpp"
#include "SDK/FN_CollectionMissionBadgeDisplayInfo_structs.hpp"
#include "SDK/FN_CollectionMissionBadgeDisplayInfo_classes.hpp"
#include "SDK/FN_CollectionMissionBadgeDisplayInfo_parameters.hpp"
#include "SDK/FN_SquadStatsWidget_structs.hpp"
#include "SDK/FN_SquadStatsWidget_classes.hpp"
#include "SDK/FN_SquadStatsWidget_parameters.hpp"
#include "SDK/FN_BadgesEarnedPanelContent_structs.hpp"
#include "SDK/FN_BadgesEarnedPanelContent_classes.hpp"
#include "SDK/FN_BadgesEarnedPanelContent_parameters.hpp"
#include "SDK/FN_CollectionMultiProgressBar_structs.hpp"
#include "SDK/FN_CollectionMultiProgressBar_classes.hpp"
#include "SDK/FN_CollectionMultiProgressBar_parameters.hpp"
#include "SDK/FN_HeroSquadSlotsView_structs.hpp"
#include "SDK/FN_HeroSquadSlotsView_classes.hpp"
#include "SDK/FN_HeroSquadSlotsView_parameters.hpp"
#include "SDK/FN_StatItemLarge_structs.hpp"
#include "SDK/FN_StatItemLarge_classes.hpp"
#include "SDK/FN_StatItemLarge_parameters.hpp"
#include "SDK/FN_SimpleSquadSlotButton_structs.hpp"
#include "SDK/FN_SimpleSquadSlotButton_classes.hpp"
#include "SDK/FN_SimpleSquadSlotButton_parameters.hpp"
#include "SDK/FN_TeamScoreDetailsContent_structs.hpp"
#include "SDK/FN_TeamScoreDetailsContent_classes.hpp"
#include "SDK/FN_TeamScoreDetailsContent_parameters.hpp"
#include "SDK/FN_ScoreBarsWidget_structs.hpp"
#include "SDK/FN_ScoreBarsWidget_classes.hpp"
#include "SDK/FN_ScoreBarsWidget_parameters.hpp"
#include "SDK/FN_DayWidget_structs.hpp"
#include "SDK/FN_DayWidget_classes.hpp"
#include "SDK/FN_DayWidget_parameters.hpp"
#include "SDK/FN_ZoneDetails_structs.hpp"
#include "SDK/FN_ZoneDetails_classes.hpp"
#include "SDK/FN_ZoneDetails_parameters.hpp"
#include "SDK/FN_MissionObjectiveProgress_structs.hpp"
#include "SDK/FN_MissionObjectiveProgress_classes.hpp"
#include "SDK/FN_MissionObjectiveProgress_parameters.hpp"
#include "SDK/FN_MissionRichText_structs.hpp"
#include "SDK/FN_MissionRichText_classes.hpp"
#include "SDK/FN_MissionRichText_parameters.hpp"
#include "SDK/FN_ObjectivesPanelContent_structs.hpp"
#include "SDK/FN_ObjectivesPanelContent_classes.hpp"
#include "SDK/FN_ObjectivesPanelContent_parameters.hpp"
#include "SDK/FN_ScoreDetailsRow_structs.hpp"
#include "SDK/FN_ScoreDetailsRow_classes.hpp"
#include "SDK/FN_ScoreDetailsRow_parameters.hpp"
#include "SDK/FN_DefaultObjectiveContentWidget_structs.hpp"
#include "SDK/FN_DefaultObjectiveContentWidget_classes.hpp"
#include "SDK/FN_DefaultObjectiveContentWidget_parameters.hpp"
#include "SDK/FN_MissionObjectiveProgressBarsManager_structs.hpp"
#include "SDK/FN_MissionObjectiveProgressBarsManager_classes.hpp"
#include "SDK/FN_MissionObjectiveProgressBarsManager_parameters.hpp"
#include "SDK/FN_MissionTrackerEntry_structs.hpp"
#include "SDK/FN_MissionTrackerEntry_classes.hpp"
#include "SDK/FN_MissionTrackerEntry_parameters.hpp"
#include "SDK/FN_MissionTrackerSubEntry_structs.hpp"
#include "SDK/FN_MissionTrackerSubEntry_classes.hpp"
#include "SDK/FN_MissionTrackerSubEntry_parameters.hpp"
#include "SDK/FN_TextStyle-Base-L-B-CreamCan_structs.hpp"
#include "SDK/FN_TextStyle-Base-L-B-CreamCan_classes.hpp"
#include "SDK/FN_TextStyle-Base-L-B-CreamCan_parameters.hpp"
#include "SDK/FN_Border-SquadBonus_structs.hpp"
#include "SDK/FN_Border-SquadBonus_classes.hpp"
#include "SDK/FN_Border-SquadBonus_parameters.hpp"
#include "SDK/FN_Border_DropShadow_structs.hpp"
#include "SDK/FN_Border_DropShadow_classes.hpp"
#include "SDK/FN_Border_DropShadow_parameters.hpp"
#include "SDK/FN_ButtonStyle-Base_structs.hpp"
#include "SDK/FN_ButtonStyle-Base_classes.hpp"
#include "SDK/FN_ButtonStyle-Base_parameters.hpp"
#include "SDK/FN_ButtonStyle-Tab-Secondary_structs.hpp"
#include "SDK/FN_ButtonStyle-Tab-Secondary_classes.hpp"
#include "SDK/FN_ButtonStyle-Tab-Secondary_parameters.hpp"
#include "SDK/FN_TextStyle-Tab-Secondary-Disabled_structs.hpp"
#include "SDK/FN_TextStyle-Tab-Secondary-Disabled_classes.hpp"
#include "SDK/FN_TextStyle-Tab-Secondary-Disabled_parameters.hpp"
#include "SDK/FN_TextStyle-Tab-Secondary_structs.hpp"
#include "SDK/FN_TextStyle-Tab-Secondary_classes.hpp"
#include "SDK/FN_TextStyle-Tab-Secondary_parameters.hpp"
#include "SDK/FN_MissionTrackerList_structs.hpp"
#include "SDK/FN_MissionTrackerList_classes.hpp"
#include "SDK/FN_MissionTrackerList_parameters.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_structs.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_classes.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-Scorpion_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-Scorpion_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-Scorpion_parameters.hpp"
#include "SDK/FN_QuestTrackerSubEntry_structs.hpp"
#include "SDK/FN_QuestTrackerSubEntry_classes.hpp"
#include "SDK/FN_QuestTrackerSubEntry_parameters.hpp"
#include "SDK/FN_BoostsRoot_structs.hpp"
#include "SDK/FN_BoostsRoot_classes.hpp"
#include "SDK/FN_BoostsRoot_parameters.hpp"
#include "SDK/FN_QuestTrackerEntry_structs.hpp"
#include "SDK/FN_QuestTrackerEntry_classes.hpp"
#include "SDK/FN_QuestTrackerEntry_parameters.hpp"
#include "SDK/FN_QuestTrackerMainQuestList_structs.hpp"
#include "SDK/FN_QuestTrackerMainQuestList_classes.hpp"
#include "SDK/FN_QuestTrackerMainQuestList_parameters.hpp"
#include "SDK/FN_ScoreBadgeProviderMission_structs.hpp"
#include "SDK/FN_ScoreBadgeProviderMission_classes.hpp"
#include "SDK/FN_ScoreBadgeProviderMission_parameters.hpp"
#include "SDK/FN_QuestTrackerTrackedQuestsList_structs.hpp"
#include "SDK/FN_QuestTrackerTrackedQuestsList_classes.hpp"
#include "SDK/FN_QuestTrackerTrackedQuestsList_parameters.hpp"
#include "SDK/FN_ScoreMessageNumber_structs.hpp"
#include "SDK/FN_ScoreMessageNumber_classes.hpp"
#include "SDK/FN_ScoreMessageNumber_parameters.hpp"
#include "SDK/FN_ScoreBarsScoreMessageItem_structs.hpp"
#include "SDK/FN_ScoreBarsScoreMessageItem_classes.hpp"
#include "SDK/FN_ScoreBarsScoreMessageItem_parameters.hpp"
#include "SDK/FN_QuestScreen_structs.hpp"
#include "SDK/FN_QuestScreen_classes.hpp"
#include "SDK/FN_QuestScreen_parameters.hpp"
#include "SDK/FN_BP_LiveStreamerDescription_structs.hpp"
#include "SDK/FN_BP_LiveStreamerDescription_classes.hpp"
#include "SDK/FN_BP_LiveStreamerDescription_parameters.hpp"
#include "SDK/FN_JournalQuestDetails_structs.hpp"
#include "SDK/FN_JournalQuestDetails_classes.hpp"
#include "SDK/FN_JournalQuestDetails_parameters.hpp"
#include "SDK/FN_BP_QuestExpiresWidget_structs.hpp"
#include "SDK/FN_BP_QuestExpiresWidget_classes.hpp"
#include "SDK/FN_BP_QuestExpiresWidget_parameters.hpp"
#include "SDK/FN_AccountBonuses_structs.hpp"
#include "SDK/FN_AccountBonuses_classes.hpp"
#include "SDK/FN_AccountBonuses_parameters.hpp"
#include "SDK/FN_QuestTreeEntry_structs.hpp"
#include "SDK/FN_QuestTreeEntry_classes.hpp"
#include "SDK/FN_QuestTreeEntry_parameters.hpp"
#include "SDK/FN_JournalQuestProgressBar_structs.hpp"
#include "SDK/FN_JournalQuestProgressBar_classes.hpp"
#include "SDK/FN_JournalQuestProgressBar_parameters.hpp"
#include "SDK/FN_JournalQuestRewardDetails_structs.hpp"
#include "SDK/FN_JournalQuestRewardDetails_classes.hpp"
#include "SDK/FN_JournalQuestRewardDetails_parameters.hpp"
#include "SDK/FN_QuestVerticalRewardInfo_structs.hpp"
#include "SDK/FN_QuestVerticalRewardInfo_classes.hpp"
#include "SDK/FN_QuestVerticalRewardInfo_parameters.hpp"
#include "SDK/FN_RewardInfoButtonWidget_structs.hpp"
#include "SDK/FN_RewardInfoButtonWidget_classes.hpp"
#include "SDK/FN_RewardInfoButtonWidget_parameters.hpp"
#include "SDK/FN_RewardOrVerticalWidget_structs.hpp"
#include "SDK/FN_RewardOrVerticalWidget_classes.hpp"
#include "SDK/FN_RewardOrVerticalWidget_parameters.hpp"
#include "SDK/FN_ItemManagementScreen_structs.hpp"
#include "SDK/FN_ItemManagementScreen_classes.hpp"
#include "SDK/FN_ItemManagementScreen_parameters.hpp"
#include "SDK/FN_Border-CompareHeader_structs.hpp"
#include "SDK/FN_Border-CompareHeader_classes.hpp"
#include "SDK/FN_Border-CompareHeader_parameters.hpp"
#include "SDK/FN_ItemManagementInventoryPanel_structs.hpp"
#include "SDK/FN_ItemManagementInventoryPanel_classes.hpp"
#include "SDK/FN_ItemManagementInventoryPanel_parameters.hpp"
#include "SDK/FN_XpBoosts_structs.hpp"
#include "SDK/FN_XpBoosts_classes.hpp"
#include "SDK/FN_XpBoosts_parameters.hpp"
#include "SDK/FN_Border_Solid_DkBlue_structs.hpp"
#include "SDK/FN_Border_Solid_DkBlue_classes.hpp"
#include "SDK/FN_Border_Solid_DkBlue_parameters.hpp"
#include "SDK/FN_XpBoostDailyBonus_structs.hpp"
#include "SDK/FN_XpBoostDailyBonus_classes.hpp"
#include "SDK/FN_XpBoostDailyBonus_parameters.hpp"
#include "SDK/FN_XpBarXpText_structs.hpp"
#include "SDK/FN_XpBarXpText_classes.hpp"
#include "SDK/FN_XpBarXpText_parameters.hpp"
#include "SDK/FN_XpBoostRow_structs.hpp"
#include "SDK/FN_XpBoostRow_classes.hpp"
#include "SDK/FN_XpBoostRow_parameters.hpp"
#include "SDK/FN_XpBoostInfoText_structs.hpp"
#include "SDK/FN_XpBoostInfoText_classes.hpp"
#include "SDK/FN_XpBoostInfoText_parameters.hpp"
#include "SDK/FN_TextStyle-Power-S-S_structs.hpp"
#include "SDK/FN_TextStyle-Power-S-S_classes.hpp"
#include "SDK/FN_TextStyle-Power-S-S_parameters.hpp"
#include "SDK/FN_TextStyle-SectionHeader_structs.hpp"
#include "SDK/FN_TextStyle-SectionHeader_classes.hpp"
#include "SDK/FN_TextStyle-SectionHeader_parameters.hpp"
#include "SDK/FN_ItemManagementFocusSwitcher_structs.hpp"
#include "SDK/FN_ItemManagementFocusSwitcher_classes.hpp"
#include "SDK/FN_ItemManagementFocusSwitcher_parameters.hpp"
#include "SDK/FN_XpBar_structs.hpp"
#include "SDK/FN_XpBar_classes.hpp"
#include "SDK/FN_XpBar_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-70pc_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-70pc_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-70pc_parameters.hpp"
#include "SDK/FN_MulchConfirmationItem_structs.hpp"
#include "SDK/FN_MulchConfirmationItem_classes.hpp"
#include "SDK/FN_MulchConfirmationItem_parameters.hpp"
#include "SDK/FN_ItemManagementCompareModeBox_structs.hpp"
#include "SDK/FN_ItemManagementCompareModeBox_classes.hpp"
#include "SDK/FN_ItemManagementCompareModeBox_parameters.hpp"
#include "SDK/FN_PlayerBanner_structs.hpp"
#include "SDK/FN_PlayerBanner_classes.hpp"
#include "SDK/FN_PlayerBanner_parameters.hpp"
#include "SDK/FN_ItemManagementModeDetailsPanel_structs.hpp"
#include "SDK/FN_ItemManagementModeDetailsPanel_classes.hpp"
#include "SDK/FN_ItemManagementModeDetailsPanel_parameters.hpp"
#include "SDK/FN_BannerLibrary_structs.hpp"
#include "SDK/FN_BannerLibrary_classes.hpp"
#include "SDK/FN_BannerLibrary_parameters.hpp"
#include "SDK/FN_XpBoostCounts_structs.hpp"
#include "SDK/FN_XpBoostCounts_classes.hpp"
#include "SDK/FN_XpBoostCounts_parameters.hpp"
#include "SDK/FN_ItemManagementDetailsModeBox_structs.hpp"
#include "SDK/FN_ItemManagementDetailsModeBox_classes.hpp"
#include "SDK/FN_ItemManagementDetailsModeBox_parameters.hpp"
#include "SDK/FN_XpBoostQuantities_structs.hpp"
#include "SDK/FN_XpBoostQuantities_classes.hpp"
#include "SDK/FN_XpBoostQuantities_parameters.hpp"
#include "SDK/FN_ItemManagementMulchConfirmationDialogContent_structs.hpp"
#include "SDK/FN_ItemManagementMulchConfirmationDialogContent_classes.hpp"
#include "SDK/FN_ItemManagementMulchConfirmationDialogContent_parameters.hpp"
#include "SDK/FN_ButtonStyle-BasicVerticalList_structs.hpp"
#include "SDK/FN_ButtonStyle-BasicVerticalList_classes.hpp"
#include "SDK/FN_ButtonStyle-BasicVerticalList_parameters.hpp"
#include "SDK/FN_ItemManagementItemDetailsPanel-OverviewOnly_structs.hpp"
#include "SDK/FN_ItemManagementItemDetailsPanel-OverviewOnly_classes.hpp"
#include "SDK/FN_ItemManagementItemDetailsPanel-OverviewOnly_parameters.hpp"
#include "SDK/FN_ItemEntry_structs.hpp"
#include "SDK/FN_ItemEntry_classes.hpp"
#include "SDK/FN_ItemEntry_parameters.hpp"
#include "SDK/FN_ItemAttributesDetailWidget_structs.hpp"
#include "SDK/FN_ItemAttributesDetailWidget_classes.hpp"
#include "SDK/FN_ItemAttributesDetailWidget_parameters.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_S-B_Blue_structs.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_S-B_Blue_classes.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_S-B_Blue_parameters.hpp"
#include "SDK/FN_ItemManagementMulchModeBox_structs.hpp"
#include "SDK/FN_ItemManagementMulchModeBox_classes.hpp"
#include "SDK/FN_ItemManagementMulchModeBox_parameters.hpp"
#include "SDK/FN_MonolithicItemDetailsHostPanel_structs.hpp"
#include "SDK/FN_MonolithicItemDetailsHostPanel_classes.hpp"
#include "SDK/FN_MonolithicItemDetailsHostPanel_parameters.hpp"
#include "SDK/FN_StatsModeItemDetailsHostPanel_structs.hpp"
#include "SDK/FN_StatsModeItemDetailsHostPanel_classes.hpp"
#include "SDK/FN_StatsModeItemDetailsHostPanel_parameters.hpp"
#include "SDK/FN_ItemCraftingIngredientList_structs.hpp"
#include "SDK/FN_ItemCraftingIngredientList_classes.hpp"
#include "SDK/FN_ItemCraftingIngredientList_parameters.hpp"
#include "SDK/FN_ItemCraftingIngredientListEntryHaveNeedVerbose_structs.hpp"
#include "SDK/FN_ItemCraftingIngredientListEntryHaveNeedVerbose_classes.hpp"
#include "SDK/FN_ItemCraftingIngredientListEntryHaveNeedVerbose_parameters.hpp"
#include "SDK/FN_ItemManagementTileButtonStyle-Base_structs.hpp"
#include "SDK/FN_ItemManagementTileButtonStyle-Base_classes.hpp"
#include "SDK/FN_ItemManagementTileButtonStyle-Base_parameters.hpp"
#include "SDK/FN_ItemCraftingIngredientListEntryHaveNeed_structs.hpp"
#include "SDK/FN_ItemCraftingIngredientListEntryHaveNeed_classes.hpp"
#include "SDK/FN_ItemCraftingIngredientListEntryHaveNeed_parameters.hpp"
#include "SDK/FN_MiscellaneousModeItemDetailsHostPanel_structs.hpp"
#include "SDK/FN_MiscellaneousModeItemDetailsHostPanel_classes.hpp"
#include "SDK/FN_MiscellaneousModeItemDetailsHostPanel_parameters.hpp"
#include "SDK/FN_ItemIconWidget_structs.hpp"
#include "SDK/FN_ItemIconWidget_classes.hpp"
#include "SDK/FN_ItemIconWidget_parameters.hpp"
#include "SDK/FN_ItemManagementTileButtonStyle-ComparisonModeItemToCompare_structs.hpp"
#include "SDK/FN_ItemManagementTileButtonStyle-ComparisonModeItemToCompare_classes.hpp"
#include "SDK/FN_ItemManagementTileButtonStyle-ComparisonModeItemToCompare_parameters.hpp"
#include "SDK/FN_ItemCraftingIngredientsDetailWidget_structs.hpp"
#include "SDK/FN_ItemCraftingIngredientsDetailWidget_classes.hpp"
#include "SDK/FN_ItemCraftingIngredientsDetailWidget_parameters.hpp"
#include "SDK/FN_ItemManagementEquipSlot_structs.hpp"
#include "SDK/FN_ItemManagementEquipSlot_classes.hpp"
#include "SDK/FN_ItemManagementEquipSlot_parameters.hpp"
#include "SDK/FN_ItemManagementInventoryLimitStatusIndicator_structs.hpp"
#include "SDK/FN_ItemManagementInventoryLimitStatusIndicator_classes.hpp"
#include "SDK/FN_ItemManagementInventoryLimitStatusIndicator_parameters.hpp"
#include "SDK/FN_Border-LowerTabM_structs.hpp"
#include "SDK/FN_Border-LowerTabM_classes.hpp"
#include "SDK/FN_Border-LowerTabM_parameters.hpp"
#include "SDK/FN_QuantitySelector_structs.hpp"
#include "SDK/FN_QuantitySelector_classes.hpp"
#include "SDK/FN_QuantitySelector_parameters.hpp"
#include "SDK/FN_ItemManangementItemTileButton_structs.hpp"
#include "SDK/FN_ItemManangementItemTileButton_classes.hpp"
#include "SDK/FN_ItemManangementItemTileButton_parameters.hpp"
#include "SDK/FN_ItemManagementMulchDetailsPanel_structs.hpp"
#include "SDK/FN_ItemManagementMulchDetailsPanel_classes.hpp"
#include "SDK/FN_ItemManagementMulchDetailsPanel_parameters.hpp"
#include "SDK/FN_Border-LowerTabM-Solid_structs.hpp"
#include "SDK/FN_Border-LowerTabM-Solid_classes.hpp"
#include "SDK/FN_Border-LowerTabM-Solid_parameters.hpp"
#include "SDK/FN_ItemWindow_structs.hpp"
#include "SDK/FN_ItemWindow_classes.hpp"
#include "SDK/FN_ItemWindow_parameters.hpp"
#include "SDK/FN_HeroSquadBonusesDetailWidget_structs.hpp"
#include "SDK/FN_HeroSquadBonusesDetailWidget_classes.hpp"
#include "SDK/FN_HeroSquadBonusesDetailWidget_parameters.hpp"
#include "SDK/FN_ItemCraftingIngredientListEntryHaveNeedVerbose_BLACK_structs.hpp"
#include "SDK/FN_ItemCraftingIngredientListEntryHaveNeedVerbose_BLACK_classes.hpp"
#include "SDK/FN_ItemCraftingIngredientListEntryHaveNeedVerbose_BLACK_parameters.hpp"
#include "SDK/FN_Border-SolidBG-ShellBlue_structs.hpp"
#include "SDK/FN_Border-SolidBG-ShellBlue_classes.hpp"
#include "SDK/FN_Border-SolidBG-ShellBlue_parameters.hpp"
#include "SDK/FN_MulchRefundItemQuantityList_structs.hpp"
#include "SDK/FN_MulchRefundItemQuantityList_classes.hpp"
#include "SDK/FN_MulchRefundItemQuantityList_parameters.hpp"
#include "SDK/FN_MulchRefundItemQuantityListEntry_structs.hpp"
#include "SDK/FN_MulchRefundItemQuantityListEntry_classes.hpp"
#include "SDK/FN_MulchRefundItemQuantityListEntry_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-Red_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-Red_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-Red_parameters.hpp"
#include "SDK/FN_ItemCountRecycling_structs.hpp"
#include "SDK/FN_ItemCountRecycling_classes.hpp"
#include "SDK/FN_ItemCountRecycling_parameters.hpp"
#include "SDK/FN_ItemTransformConfirmationModal_structs.hpp"
#include "SDK/FN_ItemTransformConfirmationModal_classes.hpp"
#include "SDK/FN_ItemTransformConfirmationModal_parameters.hpp"
#include "SDK/FN_ItemTransform_structs.hpp"
#include "SDK/FN_ItemTransform_classes.hpp"
#include "SDK/FN_ItemTransform_parameters.hpp"
#include "SDK/FN_ItemTransformRequiredItems_structs.hpp"
#include "SDK/FN_ItemTransformRequiredItems_classes.hpp"
#include "SDK/FN_ItemTransformRequiredItems_parameters.hpp"
#include "SDK/FN_PanelButton_structs.hpp"
#include "SDK/FN_PanelButton_classes.hpp"
#include "SDK/FN_PanelButton_parameters.hpp"
#include "SDK/FN_ItemTransformSlotEntry_structs.hpp"
#include "SDK/FN_ItemTransformSlotEntry_classes.hpp"
#include "SDK/FN_ItemTransformSlotEntry_parameters.hpp"
#include "SDK/FN_Border-TabM-Solid-White100pc_structs.hpp"
#include "SDK/FN_Border-TabM-Solid-White100pc_classes.hpp"
#include "SDK/FN_Border-TabM-Solid-White100pc_parameters.hpp"
#include "SDK/FN_CollectionHeader-Level_structs.hpp"
#include "SDK/FN_CollectionHeader-Level_classes.hpp"
#include "SDK/FN_CollectionHeader-Level_parameters.hpp"
#include "SDK/FN_CollectionHeader-PageProgress_structs.hpp"
#include "SDK/FN_CollectionHeader-PageProgress_classes.hpp"
#include "SDK/FN_CollectionHeader-PageProgress_parameters.hpp"
#include "SDK/FN_CollectionHeader-Progress-Solid_structs.hpp"
#include "SDK/FN_CollectionHeader-Progress-Solid_classes.hpp"
#include "SDK/FN_CollectionHeader-Progress-Solid_parameters.hpp"
#include "SDK/FN_CollectionHeader-Progress_structs.hpp"
#include "SDK/FN_CollectionHeader-Progress_classes.hpp"
#include "SDK/FN_CollectionHeader-Progress_parameters.hpp"
#include "SDK/FN_ItemManagementTileButtonStyle-ComparisonModeItemToDetail_structs.hpp"
#include "SDK/FN_ItemManagementTileButtonStyle-ComparisonModeItemToDetail_classes.hpp"
#include "SDK/FN_ItemManagementTileButtonStyle-ComparisonModeItemToDetail_parameters.hpp"
#include "SDK/FN_ItemTransformSlotScreen_structs.hpp"
#include "SDK/FN_ItemTransformSlotScreen_classes.hpp"
#include "SDK/FN_ItemTransformSlotScreen_parameters.hpp"
#include "SDK/FN_ItemTransformResultInfo_structs.hpp"
#include "SDK/FN_ItemTransformResultInfo_classes.hpp"
#include "SDK/FN_ItemTransformResultInfo_parameters.hpp"
#include "SDK/FN_ItemTransformSlotItemPickerTileButton_structs.hpp"
#include "SDK/FN_ItemTransformSlotItemPickerTileButton_classes.hpp"
#include "SDK/FN_ItemTransformSlotItemPickerTileButton_parameters.hpp"
#include "SDK/FN_ItemTransformResultModal_structs.hpp"
#include "SDK/FN_ItemTransformResultModal_classes.hpp"
#include "SDK/FN_ItemTransformResultModal_parameters.hpp"
#include "SDK/FN_FortHeroSupportPerkWidget-Overview_structs.hpp"
#include "SDK/FN_FortHeroSupportPerkWidget-Overview_classes.hpp"
#include "SDK/FN_FortHeroSupportPerkWidget-Overview_parameters.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_XS-SortLabel_structs.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_XS-SortLabel_classes.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_XS-SortLabel_parameters.hpp"
#include "SDK/FN_ItemHeaderWidget_structs.hpp"
#include "SDK/FN_ItemHeaderWidget_classes.hpp"
#include "SDK/FN_ItemHeaderWidget_parameters.hpp"
#include "SDK/FN_ItemTransformItemPicker_structs.hpp"
#include "SDK/FN_ItemTransformItemPicker_classes.hpp"
#include "SDK/FN_ItemTransformItemPicker_parameters.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_S-B_structs.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_S-B_classes.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_S-B_parameters.hpp"
#include "SDK/FN_ItemDetailsWidget_structs.hpp"
#include "SDK/FN_ItemDetailsWidget_classes.hpp"
#include "SDK/FN_ItemDetailsWidget_parameters.hpp"
#include "SDK/FN_BP_ItemTransform_TabButton_structs.hpp"
#include "SDK/FN_BP_ItemTransform_TabButton_classes.hpp"
#include "SDK/FN_BP_ItemTransform_TabButton_parameters.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_XS-SortLabelLight_structs.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_XS-SortLabelLight_classes.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_XS-SortLabelLight_parameters.hpp"
#include "SDK/FN_ItemTransformKeyScreen_structs.hpp"
#include "SDK/FN_ItemTransformKeyScreen_classes.hpp"
#include "SDK/FN_ItemTransformKeyScreen_parameters.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_XS-B_structs.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_XS-B_classes.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_XS-B_parameters.hpp"
#include "SDK/FN_TextStyle-Base-M-B-S_structs.hpp"
#include "SDK/FN_TextStyle-Base-M-B-S_classes.hpp"
#include "SDK/FN_TextStyle-Base-M-B-S_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-Blue_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-Blue_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-Blue_parameters.hpp"
#include "SDK/FN_TextStyle-Header-M-Special_structs.hpp"
#include "SDK/FN_TextStyle-Header-M-Special_classes.hpp"
#include "SDK/FN_TextStyle-Header-M-Special_parameters.hpp"
#include "SDK/FN_TextStyle-Header-HomeBasePower_structs.hpp"
#include "SDK/FN_TextStyle-Header-HomeBasePower_classes.hpp"
#include "SDK/FN_TextStyle-Header-HomeBasePower_parameters.hpp"
#include "SDK/FN_ItemDetailsStackCounter_structs.hpp"
#include "SDK/FN_ItemDetailsStackCounter_classes.hpp"
#include "SDK/FN_ItemDetailsStackCounter_parameters.hpp"
#include "SDK/FN_StatsListWidget_structs.hpp"
#include "SDK/FN_StatsListWidget_classes.hpp"
#include "SDK/FN_StatsListWidget_parameters.hpp"
#include "SDK/FN_ItemTransformKeyInfo_structs.hpp"
#include "SDK/FN_ItemTransformKeyInfo_classes.hpp"
#include "SDK/FN_ItemTransformKeyInfo_parameters.hpp"
#include "SDK/FN_IconTabButton_structs.hpp"
#include "SDK/FN_IconTabButton_classes.hpp"
#include "SDK/FN_IconTabButton_parameters.hpp"
#include "SDK/FN_HelpWidget_structs.hpp"
#include "SDK/FN_HelpWidget_classes.hpp"
#include "SDK/FN_HelpWidget_parameters.hpp"
#include "SDK/FN_Border-ItemInfo-Unlocked_structs.hpp"
#include "SDK/FN_Border-ItemInfo-Unlocked_classes.hpp"
#include "SDK/FN_Border-ItemInfo-Unlocked_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-DarkBlueFade_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-DarkBlueFade_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-DarkBlueFade_parameters.hpp"
#include "SDK/FN_Border-RoundBoxM_structs.hpp"
#include "SDK/FN_Border-RoundBoxM_classes.hpp"
#include "SDK/FN_Border-RoundBoxM_parameters.hpp"
#include "SDK/FN_ButtonStyle-QuestPrimary-L2_structs.hpp"
#include "SDK/FN_ButtonStyle-QuestPrimary-L2_classes.hpp"
#include "SDK/FN_ButtonStyle-QuestPrimary-L2_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S-B-NavyBlue_structs.hpp"
#include "SDK/FN_TextStyle-Base-S-B-NavyBlue_classes.hpp"
#include "SDK/FN_TextStyle-Base-S-B-NavyBlue_parameters.hpp"
#include "SDK/FN_ButtonStyle-QuestSecondary-L_structs.hpp"
#include "SDK/FN_ButtonStyle-QuestSecondary-L_classes.hpp"
#include "SDK/FN_ButtonStyle-QuestSecondary-L_parameters.hpp"
#include "SDK/FN_ItemTransformKeyPicker_structs.hpp"
#include "SDK/FN_ItemTransformKeyPicker_classes.hpp"
#include "SDK/FN_ItemTransformKeyPicker_parameters.hpp"
#include "SDK/FN_ItemTransformResultItems_structs.hpp"
#include "SDK/FN_ItemTransformResultItems_classes.hpp"
#include "SDK/FN_ItemTransformResultItems_parameters.hpp"
#include "SDK/FN_ItemTransformKeyPickerTileButton_structs.hpp"
#include "SDK/FN_ItemTransformKeyPickerTileButton_classes.hpp"
#include "SDK/FN_ItemTransformKeyPickerTileButton_parameters.hpp"
#include "SDK/FN_ItemTransformSlotItemPicker_structs.hpp"
#include "SDK/FN_ItemTransformSlotItemPicker_classes.hpp"
#include "SDK/FN_ItemTransformSlotItemPicker_parameters.hpp"
#include "SDK/FN_PowerRatingBlockItemDetails_structs.hpp"
#include "SDK/FN_PowerRatingBlockItemDetails_classes.hpp"
#include "SDK/FN_PowerRatingBlockItemDetails_parameters.hpp"
#include "SDK/FN_CollectionBookWidget_structs.hpp"
#include "SDK/FN_CollectionBookWidget_classes.hpp"
#include "SDK/FN_CollectionBookWidget_parameters.hpp"
#include "SDK/FN_TextStyle-Button-Primary-L-Disabled_structs.hpp"
#include "SDK/FN_TextStyle-Button-Primary-L-Disabled_classes.hpp"
#include "SDK/FN_TextStyle-Button-Primary-L-Disabled_parameters.hpp"
#include "SDK/FN_CollectionBookSectionPanel_structs.hpp"
#include "SDK/FN_CollectionBookSectionPanel_classes.hpp"
#include "SDK/FN_CollectionBookSectionPanel_parameters.hpp"
#include "SDK/FN_CollectionBookProgressWidget_structs.hpp"
#include "SDK/FN_CollectionBookProgressWidget_classes.hpp"
#include "SDK/FN_CollectionBookProgressWidget_parameters.hpp"
#include "SDK/FN_CollectionBookSectionRewardWidget_structs.hpp"
#include "SDK/FN_CollectionBookSectionRewardWidget_classes.hpp"
#include "SDK/FN_CollectionBookSectionRewardWidget_parameters.hpp"
#include "SDK/FN_CollectionBookPageDetailsWidget_structs.hpp"
#include "SDK/FN_CollectionBookPageDetailsWidget_classes.hpp"
#include "SDK/FN_CollectionBookPageDetailsWidget_parameters.hpp"
#include "SDK/FN_CollectionBookProgressionRewardsPreviewWidget_structs.hpp"
#include "SDK/FN_CollectionBookProgressionRewardsPreviewWidget_classes.hpp"
#include "SDK/FN_CollectionBookProgressionRewardsPreviewWidget_parameters.hpp"
#include "SDK/FN_TextStyle-Button-Primary-L_structs.hpp"
#include "SDK/FN_TextStyle-Button-Primary-L_classes.hpp"
#include "SDK/FN_TextStyle-Button-Primary-L_parameters.hpp"
#include "SDK/FN_CollectionBookProgressionRewardWidget_structs.hpp"
#include "SDK/FN_CollectionBookProgressionRewardWidget_classes.hpp"
#include "SDK/FN_CollectionBookProgressionRewardWidget_parameters.hpp"
#include "SDK/FN_CollectionBookItemPicker_structs.hpp"
#include "SDK/FN_CollectionBookItemPicker_classes.hpp"
#include "SDK/FN_CollectionBookItemPicker_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-Blue-StatNormal_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-Blue-StatNormal_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-Blue-StatNormal_parameters.hpp"
#include "SDK/FN_ButtonStyle-Solid-Square-CollectionBook_structs.hpp"
#include "SDK/FN_ButtonStyle-Solid-Square-CollectionBook_classes.hpp"
#include "SDK/FN_ButtonStyle-Solid-Square-CollectionBook_parameters.hpp"
#include "SDK/FN_TextScrollStyle-NoFade_structs.hpp"
#include "SDK/FN_TextScrollStyle-NoFade_classes.hpp"
#include "SDK/FN_TextScrollStyle-NoFade_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-S_LightGray_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-S_LightGray_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-S_LightGray_parameters.hpp"
#include "SDK/FN_CollectionBookRecycleSlotResultsWidget_structs.hpp"
#include "SDK/FN_CollectionBookRecycleSlotResultsWidget_classes.hpp"
#include "SDK/FN_CollectionBookRecycleSlotResultsWidget_parameters.hpp"
#include "SDK/FN_DONOTUSE_structs.hpp"
#include "SDK/FN_DONOTUSE_classes.hpp"
#include "SDK/FN_DONOTUSE_parameters.hpp"
#include "SDK/FN_CollectionBookItemPickerButton_structs.hpp"
#include "SDK/FN_CollectionBookItemPickerButton_classes.hpp"
#include "SDK/FN_CollectionBookItemPickerButton_parameters.hpp"
#include "SDK/FN_CollectionBookOverviewWidget_structs.hpp"
#include "SDK/FN_CollectionBookOverviewWidget_classes.hpp"
#include "SDK/FN_CollectionBookOverviewWidget_parameters.hpp"
#include "SDK/FN_CollectionBookPrimaryPanel_structs.hpp"
#include "SDK/FN_CollectionBookPrimaryPanel_classes.hpp"
#include "SDK/FN_CollectionBookPrimaryPanel_parameters.hpp"
#include "SDK/FN_Border-Bottom-Box-Rounded-DkBlue_structs.hpp"
#include "SDK/FN_Border-Bottom-Box-Rounded-DkBlue_classes.hpp"
#include "SDK/FN_Border-Bottom-Box-Rounded-DkBlue_parameters.hpp"
#include "SDK/FN_CollectionBookPageCompletionRewardWidget_structs.hpp"
#include "SDK/FN_CollectionBookPageCompletionRewardWidget_classes.hpp"
#include "SDK/FN_CollectionBookPageCompletionRewardWidget_parameters.hpp"
#include "SDK/FN_CollectionBookPageListWidget_structs.hpp"
#include "SDK/FN_CollectionBookPageListWidget_classes.hpp"
#include "SDK/FN_CollectionBookPageListWidget_parameters.hpp"
#include "SDK/FN_CollectionBookRewardCardWidget_structs.hpp"
#include "SDK/FN_CollectionBookRewardCardWidget_classes.hpp"
#include "SDK/FN_CollectionBookRewardCardWidget_parameters.hpp"
#include "SDK/FN_ButtonStyle-OutlineRightShade_structs.hpp"
#include "SDK/FN_ButtonStyle-OutlineRightShade_classes.hpp"
#include "SDK/FN_ButtonStyle-OutlineRightShade_parameters.hpp"
#include "SDK/FN_CollectionBookSectionTileWidget_structs.hpp"
#include "SDK/FN_CollectionBookSectionTileWidget_classes.hpp"
#include "SDK/FN_CollectionBookSectionTileWidget_parameters.hpp"
#include "SDK/FN_CollectionBookSectionTileRewardWidget_structs.hpp"
#include "SDK/FN_CollectionBookSectionTileRewardWidget_classes.hpp"
#include "SDK/FN_CollectionBookSectionTileRewardWidget_parameters.hpp"
#include "SDK/FN_ItemDescriptionDetailWidget_structs.hpp"
#include "SDK/FN_ItemDescriptionDetailWidget_classes.hpp"
#include "SDK/FN_ItemDescriptionDetailWidget_parameters.hpp"
#include "SDK/FN_MainModeItemDetailsHostPanel_structs.hpp"
#include "SDK/FN_MainModeItemDetailsHostPanel_classes.hpp"
#include "SDK/FN_MainModeItemDetailsHostPanel_parameters.hpp"
#include "SDK/FN_CollectionBookSlotView_structs.hpp"
#include "SDK/FN_CollectionBookSlotView_classes.hpp"
#include "SDK/FN_CollectionBookSlotView_parameters.hpp"
#include "SDK/FN_ItemPerksListDetailWidget_structs.hpp"
#include "SDK/FN_ItemPerksListDetailWidget_classes.hpp"
#include "SDK/FN_ItemPerksListDetailWidget_parameters.hpp"
#include "SDK/FN_MiniCraftingIngredientListEntry_structs.hpp"
#include "SDK/FN_MiniCraftingIngredientListEntry_classes.hpp"
#include "SDK/FN_MiniCraftingIngredientListEntry_parameters.hpp"
#include "SDK/FN_GE_Homebase_CombinedRatings_structs.hpp"
#include "SDK/FN_GE_Homebase_CombinedRatings_classes.hpp"
#include "SDK/FN_GE_Homebase_CombinedRatings_parameters.hpp"
#include "SDK/FN_ItemCount_structs.hpp"
#include "SDK/FN_ItemCount_classes.hpp"
#include "SDK/FN_ItemCount_parameters.hpp"
#include "SDK/FN_SetBonus_AbilityDamage_Low_structs.hpp"
#include "SDK/FN_SetBonus_AbilityDamage_Low_classes.hpp"
#include "SDK/FN_SetBonus_AbilityDamage_Low_parameters.hpp"
#include "SDK/FN_SetBonus_MaxHealth_High_structs.hpp"
#include "SDK/FN_SetBonus_MaxHealth_High_classes.hpp"
#include "SDK/FN_SetBonus_MaxHealth_High_parameters.hpp"
#include "SDK/FN_Fort_Entry_Music_Controller_BP_structs.hpp"
#include "SDK/FN_Fort_Entry_Music_Controller_BP_classes.hpp"
#include "SDK/FN_Fort_Entry_Music_Controller_BP_parameters.hpp"
#include "SDK/FN_SetBonus_MaxShield_High_structs.hpp"
#include "SDK/FN_SetBonus_MaxShield_High_classes.hpp"
#include "SDK/FN_SetBonus_MaxShield_High_parameters.hpp"
#include "SDK/FN_SetBonus_MeleeDamage_Low_structs.hpp"
#include "SDK/FN_SetBonus_MeleeDamage_Low_classes.hpp"
#include "SDK/FN_SetBonus_MeleeDamage_Low_parameters.hpp"
#include "SDK/FN_SetBonus_RangedDamage_Low_structs.hpp"
#include "SDK/FN_SetBonus_RangedDamage_Low_classes.hpp"
#include "SDK/FN_SetBonus_RangedDamage_Low_parameters.hpp"
#include "SDK/FN_MtxOffer_3_structs.hpp"
#include "SDK/FN_MtxOffer_3_classes.hpp"
#include "SDK/FN_MtxOffer_3_parameters.hpp"
#include "SDK/FN_MtxOffersList_3_structs.hpp"
#include "SDK/FN_MtxOffersList_3_classes.hpp"
#include "SDK/FN_MtxOffersList_3_parameters.hpp"
#include "SDK/FN_SetBonus_ShieldRegen_Low_structs.hpp"
#include "SDK/FN_SetBonus_ShieldRegen_Low_classes.hpp"
#include "SDK/FN_SetBonus_ShieldRegen_Low_parameters.hpp"
#include "SDK/FN_SetBonus_TrapDamage_Low_structs.hpp"
#include "SDK/FN_SetBonus_TrapDamage_Low_classes.hpp"
#include "SDK/FN_SetBonus_TrapDamage_Low_parameters.hpp"
#include "SDK/FN_SetBonus_TrapDurability_High_structs.hpp"
#include "SDK/FN_SetBonus_TrapDurability_High_classes.hpp"
#include "SDK/FN_SetBonus_TrapDurability_High_parameters.hpp"
#include "SDK/FN_GET_DamageParent_structs.hpp"
#include "SDK/FN_GET_DamageParent_classes.hpp"
#include "SDK/FN_GET_DamageParent_parameters.hpp"
#include "SDK/FN_MTXButton_structs.hpp"
#include "SDK/FN_MTXButton_classes.hpp"
#include "SDK/FN_MTXButton_parameters.hpp"
#include "SDK/FN_GE_Map_Commando_Vitality_Health_structs.hpp"
#include "SDK/FN_GE_Map_Commando_Vitality_Health_classes.hpp"
#include "SDK/FN_GE_Map_Commando_Vitality_Health_parameters.hpp"
#include "SDK/FN_GE_Athena_DBNO_Start_structs.hpp"
#include "SDK/FN_GE_Athena_DBNO_Start_classes.hpp"
#include "SDK/FN_GE_Athena_DBNO_Start_parameters.hpp"
#include "SDK/FN_GET_AfflictedParent_structs.hpp"
#include "SDK/FN_GET_AfflictedParent_classes.hpp"
#include "SDK/FN_GET_AfflictedParent_parameters.hpp"
#include "SDK/FN_SmasherStrength00_structs.hpp"
#include "SDK/FN_SmasherStrength00_classes.hpp"
#include "SDK/FN_SmasherStrength00_parameters.hpp"
#include "SDK/FN_SmasherStrength01_structs.hpp"
#include "SDK/FN_SmasherStrength01_classes.hpp"
#include "SDK/FN_SmasherStrength01_parameters.hpp"
#include "SDK/FN_SmasherStrength02_structs.hpp"
#include "SDK/FN_SmasherStrength02_classes.hpp"
#include "SDK/FN_SmasherStrength02_parameters.hpp"
#include "SDK/FN_GET_PeriodicDamageParent_structs.hpp"
#include "SDK/FN_GET_PeriodicDamageParent_classes.hpp"
#include "SDK/FN_GET_PeriodicDamageParent_parameters.hpp"
#include "SDK/FN_AnimNotify_PlayForceFeedback_structs.hpp"
#include "SDK/FN_AnimNotify_PlayForceFeedback_classes.hpp"
#include "SDK/FN_AnimNotify_PlayForceFeedback_parameters.hpp"
#include "SDK/FN_SmasherStrength03_structs.hpp"
#include "SDK/FN_SmasherStrength03_classes.hpp"
#include "SDK/FN_SmasherStrength03_parameters.hpp"
#include "SDK/FN_AnimNotifyState_DisableSteering_structs.hpp"
#include "SDK/FN_AnimNotifyState_DisableSteering_classes.hpp"
#include "SDK/FN_AnimNotifyState_DisableSteering_parameters.hpp"
#include "SDK/FN_GET_PeriodicPhysicalDamage_structs.hpp"
#include "SDK/FN_GET_PeriodicPhysicalDamage_classes.hpp"
#include "SDK/FN_GET_PeriodicPhysicalDamage_parameters.hpp"
#include "SDK/FN_SmasherStrength04_structs.hpp"
#include "SDK/FN_SmasherStrength04_classes.hpp"
#include "SDK/FN_SmasherStrength04_parameters.hpp"
#include "SDK/FN_SmasherStrength05_structs.hpp"
#include "SDK/FN_SmasherStrength05_classes.hpp"
#include "SDK/FN_SmasherStrength05_parameters.hpp"
#include "SDK/FN_SmasherStrength06_structs.hpp"
#include "SDK/FN_SmasherStrength06_classes.hpp"
#include "SDK/FN_SmasherStrength06_parameters.hpp"
#include "SDK/FN_GET_PeriodicEnergyDamage_structs.hpp"
#include "SDK/FN_GET_PeriodicEnergyDamage_classes.hpp"
#include "SDK/FN_GET_PeriodicEnergyDamage_parameters.hpp"
#include "SDK/FN_GET_Stun_structs.hpp"
#include "SDK/FN_GET_Stun_classes.hpp"
#include "SDK/FN_GET_Stun_parameters.hpp"
#include "SDK/FN_SmasherStrength07_structs.hpp"
#include "SDK/FN_SmasherStrength07_classes.hpp"
#include "SDK/FN_SmasherStrength07_parameters.hpp"
#include "SDK/FN_SmasherStrength08_structs.hpp"
#include "SDK/FN_SmasherStrength08_classes.hpp"
#include "SDK/FN_SmasherStrength08_parameters.hpp"
#include "SDK/FN_GE_DBNOResurrectStun_structs.hpp"
#include "SDK/FN_GE_DBNOResurrectStun_classes.hpp"
#include "SDK/FN_GE_DBNOResurrectStun_parameters.hpp"
#include "SDK/FN_SmasherStrength09_structs.hpp"
#include "SDK/FN_SmasherStrength09_classes.hpp"
#include "SDK/FN_SmasherStrength09_parameters.hpp"
#include "SDK/FN_GET_TagContainer_structs.hpp"
#include "SDK/FN_GET_TagContainer_classes.hpp"
#include "SDK/FN_GET_TagContainer_parameters.hpp"
#include "SDK/FN_GE_TransferKnockback_structs.hpp"
#include "SDK/FN_GE_TransferKnockback_classes.hpp"
#include "SDK/FN_GE_TransferKnockback_parameters.hpp"
#include "SDK/FN_BP_VictoryDrone_structs.hpp"
#include "SDK/FN_BP_VictoryDrone_classes.hpp"
#include "SDK/FN_BP_VictoryDrone_parameters.hpp"
#include "SDK/FN_AnimNotifyState_TeleportFinished_structs.hpp"
#include "SDK/FN_AnimNotifyState_TeleportFinished_classes.hpp"
#include "SDK/FN_AnimNotifyState_TeleportFinished_parameters.hpp"
#include "SDK/FN_AnimNotifyState_DisablePawnRotation_structs.hpp"
#include "SDK/FN_AnimNotifyState_DisablePawnRotation_classes.hpp"
#include "SDK/FN_AnimNotifyState_DisablePawnRotation_parameters.hpp"
#include "SDK/FN_GE_DefaultPlayer_BuildTime_structs.hpp"
#include "SDK/FN_GE_DefaultPlayer_BuildTime_classes.hpp"
#include "SDK/FN_GE_DefaultPlayer_BuildTime_parameters.hpp"
#include "SDK/FN_SmasherStrength10_structs.hpp"
#include "SDK/FN_SmasherStrength10_classes.hpp"
#include "SDK/FN_SmasherStrength10_parameters.hpp"
#include "SDK/FN_GE_DefaultPlayer_RepairTime_structs.hpp"
#include "SDK/FN_GE_DefaultPlayer_RepairTime_classes.hpp"
#include "SDK/FN_GE_DefaultPlayer_RepairTime_parameters.hpp"
#include "SDK/FN_TheaterMapViewer_structs.hpp"
#include "SDK/FN_TheaterMapViewer_classes.hpp"
#include "SDK/FN_TheaterMapViewer_parameters.hpp"
#include "SDK/FN_ImpactNumbers_structs.hpp"
#include "SDK/FN_ImpactNumbers_classes.hpp"
#include "SDK/FN_ImpactNumbers_parameters.hpp"
#include "SDK/FN_WeakSpot_structs.hpp"
#include "SDK/FN_WeakSpot_classes.hpp"
#include "SDK/FN_WeakSpot_parameters.hpp"
#include "SDK/FN_GE_DefaultPlayer_HarvestBuffHit_structs.hpp"
#include "SDK/FN_GE_DefaultPlayer_HarvestBuffHit_classes.hpp"
#include "SDK/FN_GE_DefaultPlayer_HarvestBuffHit_parameters.hpp"
#include "SDK/FN_GE_DefaultPlayer_HarvestBuff_T1_structs.hpp"
#include "SDK/FN_GE_DefaultPlayer_HarvestBuff_T1_classes.hpp"
#include "SDK/FN_GE_DefaultPlayer_HarvestBuff_T1_parameters.hpp"
#include "SDK/FN_GE_DefaultPlayer_HarvestBuff_T2_structs.hpp"
#include "SDK/FN_GE_DefaultPlayer_HarvestBuff_T2_classes.hpp"
#include "SDK/FN_GE_DefaultPlayer_HarvestBuff_T2_parameters.hpp"
#include "SDK/FN_B_Pickups_structs.hpp"
#include "SDK/FN_B_Pickups_classes.hpp"
#include "SDK/FN_B_Pickups_parameters.hpp"
#include "SDK/FN_GAB_AthenaDBNO_structs.hpp"
#include "SDK/FN_GAB_AthenaDBNO_classes.hpp"
#include "SDK/FN_GAB_AthenaDBNO_parameters.hpp"
#include "SDK/FN_GE_Generic_StaminaRegenLockout_structs.hpp"
#include "SDK/FN_GE_Generic_StaminaRegenLockout_classes.hpp"
#include "SDK/FN_GE_Generic_StaminaRegenLockout_parameters.hpp"
#include "SDK/FN_GE_Outlander_LaserFocusApplied_structs.hpp"
#include "SDK/FN_GE_Outlander_LaserFocusApplied_classes.hpp"
#include "SDK/FN_GE_Outlander_LaserFocusApplied_parameters.hpp"
#include "SDK/FN_GE_Outlander_LaserFocusDispel_structs.hpp"
#include "SDK/FN_GE_Outlander_LaserFocusDispel_classes.hpp"
#include "SDK/FN_GE_Outlander_LaserFocusDispel_parameters.hpp"
#include "SDK/FN_GE_ImpactImmunity_structs.hpp"
#include "SDK/FN_GE_ImpactImmunity_classes.hpp"
#include "SDK/FN_GE_ImpactImmunity_parameters.hpp"
#include "SDK/FN_SoulSuckCameraShake_structs.hpp"
#include "SDK/FN_SoulSuckCameraShake_classes.hpp"
#include "SDK/FN_SoulSuckCameraShake_parameters.hpp"
#include "SDK/FN_GAB_AthenaDBNORevive_structs.hpp"
#include "SDK/FN_GAB_AthenaDBNORevive_classes.hpp"
#include "SDK/FN_GAB_AthenaDBNORevive_parameters.hpp"
#include "SDK/FN_GE_RestoreControlResistance_structs.hpp"
#include "SDK/FN_GE_RestoreControlResistance_classes.hpp"
#include "SDK/FN_GE_RestoreControlResistance_parameters.hpp"
#include "SDK/FN_GE_KnockbackActive_structs.hpp"
#include "SDK/FN_GE_KnockbackActive_classes.hpp"
#include "SDK/FN_GE_KnockbackActive_parameters.hpp"
#include "SDK/FN_GE_StunActive_structs.hpp"
#include "SDK/FN_GE_StunActive_classes.hpp"
#include "SDK/FN_GE_StunActive_parameters.hpp"
#include "SDK/FN_GE_TrapArmGeneric_structs.hpp"
#include "SDK/FN_GE_TrapArmGeneric_classes.hpp"
#include "SDK/FN_GE_TrapArmGeneric_parameters.hpp"
#include "SDK/FN_GE_Athena_DBNO_Bleed_structs.hpp"
#include "SDK/FN_GE_Athena_DBNO_Bleed_classes.hpp"
#include "SDK/FN_GE_Athena_DBNO_Bleed_parameters.hpp"
#include "SDK/FN_Get_DirectDamageParent_structs.hpp"
#include "SDK/FN_Get_DirectDamageParent_classes.hpp"
#include "SDK/FN_Get_DirectDamageParent_parameters.hpp"
#include "SDK/FN_GET_DirectEnvironmentDamage_structs.hpp"
#include "SDK/FN_GET_DirectEnvironmentDamage_classes.hpp"
#include "SDK/FN_GET_DirectEnvironmentDamage_parameters.hpp"
#include "SDK/FN_GET_FallingDamage_structs.hpp"
#include "SDK/FN_GET_FallingDamage_classes.hpp"
#include "SDK/FN_GET_FallingDamage_parameters.hpp"
#include "SDK/FN_GAB_PlayerDBNO_structs.hpp"
#include "SDK/FN_GAB_PlayerDBNO_classes.hpp"
#include "SDK/FN_GAB_PlayerDBNO_parameters.hpp"
#include "SDK/FN_GET_FatalDamage_structs.hpp"
#include "SDK/FN_GET_FatalDamage_classes.hpp"
#include "SDK/FN_GET_FatalDamage_parameters.hpp"
#include "SDK/FN_GE_HealthRegen_structs.hpp"
#include "SDK/FN_GE_HealthRegen_classes.hpp"
#include "SDK/FN_GE_HealthRegen_parameters.hpp"
#include "SDK/FN_GAB_PlayerDBNOResurrect_structs.hpp"
#include "SDK/FN_GAB_PlayerDBNOResurrect_classes.hpp"
#include "SDK/FN_GAB_PlayerDBNOResurrect_parameters.hpp"
#include "SDK/FN_GAB_GenericApplyKnockback_structs.hpp"
#include "SDK/FN_GAB_GenericApplyKnockback_classes.hpp"
#include "SDK/FN_GAB_GenericApplyKnockback_parameters.hpp"
#include "SDK/FN_GA_DefaultPlayer_ApplyKnockback_structs.hpp"
#include "SDK/FN_GA_DefaultPlayer_ApplyKnockback_classes.hpp"
#include "SDK/FN_GA_DefaultPlayer_ApplyKnockback_parameters.hpp"
#include "SDK/FN_GA_Default_KilledEnemy_structs.hpp"
#include "SDK/FN_GA_Default_KilledEnemy_classes.hpp"
#include "SDK/FN_GA_Default_KilledEnemy_parameters.hpp"
#include "SDK/FN_GA_DefaultPlayer_BuildingCreated_structs.hpp"
#include "SDK/FN_GA_DefaultPlayer_BuildingCreated_classes.hpp"
#include "SDK/FN_GA_DefaultPlayer_BuildingCreated_parameters.hpp"
#include "SDK/FN_GA_DefaultPlayer_BuildingRepaired_structs.hpp"
#include "SDK/FN_GA_DefaultPlayer_BuildingRepaired_classes.hpp"
#include "SDK/FN_GA_DefaultPlayer_BuildingRepaired_parameters.hpp"
#include "SDK/FN_GE_SquadStatBonus_structs.hpp"
#include "SDK/FN_GE_SquadStatBonus_classes.hpp"
#include "SDK/FN_GE_SquadStatBonus_parameters.hpp"
#include "SDK/FN_GA_DefaultPlayer_Consumable_structs.hpp"
#include "SDK/FN_GA_DefaultPlayer_Consumable_classes.hpp"
#include "SDK/FN_GA_DefaultPlayer_Consumable_parameters.hpp"
#include "SDK/FN_TextStyle-Button-Outline_structs.hpp"
#include "SDK/FN_TextStyle-Button-Outline_classes.hpp"
#include "SDK/FN_TextStyle-Button-Outline_parameters.hpp"
#include "SDK/FN_GAB_GenericDeath_structs.hpp"
#include "SDK/FN_GAB_GenericDeath_classes.hpp"
#include "SDK/FN_GAB_GenericDeath_parameters.hpp"
#include "SDK/FN_GA_DefaultPlayer_Death_structs.hpp"
#include "SDK/FN_GA_DefaultPlayer_Death_classes.hpp"
#include "SDK/FN_GA_DefaultPlayer_Death_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S-B-S_structs.hpp"
#include "SDK/FN_TextStyle-Base-S-B-S_classes.hpp"
#include "SDK/FN_TextStyle-Base-S-B-S_parameters.hpp"
#include "SDK/FN_GE_SharedPlayerTrapStatTransfer_structs.hpp"
#include "SDK/FN_GE_SharedPlayerTrapStatTransfer_classes.hpp"
#include "SDK/FN_GE_SharedPlayerTrapStatTransfer_parameters.hpp"
#include "SDK/FN_GA_DefaultPlayer_HarvestBuff_structs.hpp"
#include "SDK/FN_GA_DefaultPlayer_HarvestBuff_classes.hpp"
#include "SDK/FN_GA_DefaultPlayer_HarvestBuff_parameters.hpp"
#include "SDK/FN_GA_DefaultPlayer_HarvestBuffSwitch_structs.hpp"
#include "SDK/FN_GA_DefaultPlayer_HarvestBuffSwitch_classes.hpp"
#include "SDK/FN_GA_DefaultPlayer_HarvestBuffSwitch_parameters.hpp"
#include "SDK/FN_GA_DefaultPlayer_InteractSearch_structs.hpp"
#include "SDK/FN_GA_DefaultPlayer_InteractSearch_classes.hpp"
#include "SDK/FN_GA_DefaultPlayer_InteractSearch_parameters.hpp"
#include "SDK/FN_GA_DefaultPlayer_InteractUse_structs.hpp"
#include "SDK/FN_GA_DefaultPlayer_InteractUse_classes.hpp"
#include "SDK/FN_GA_DefaultPlayer_InteractUse_parameters.hpp"
#include "SDK/FN_ButtonStyle-OutlineEmptyFill_structs.hpp"
#include "SDK/FN_ButtonStyle-OutlineEmptyFill_classes.hpp"
#include "SDK/FN_ButtonStyle-OutlineEmptyFill_parameters.hpp"
#include "SDK/FN_ItemDisplayMode_structs.hpp"
#include "SDK/FN_ItemDisplayMode_classes.hpp"
#include "SDK/FN_ItemDisplayMode_parameters.hpp"
#include "SDK/FN_QuickbarSlotCooldown_structs.hpp"
#include "SDK/FN_QuickbarSlotCooldown_classes.hpp"
#include "SDK/FN_QuickbarSlotCooldown_parameters.hpp"
#include "SDK/FN_GAB_GenericStunned_structs.hpp"
#include "SDK/FN_GAB_GenericStunned_classes.hpp"
#include "SDK/FN_GAB_GenericStunned_parameters.hpp"
#include "SDK/FN_RewardType_structs.hpp"
#include "SDK/FN_RewardType_classes.hpp"
#include "SDK/FN_RewardType_parameters.hpp"
#include "SDK/FN_GA_DefaultPlayer_Stunned_structs.hpp"
#include "SDK/FN_GA_DefaultPlayer_Stunned_classes.hpp"
#include "SDK/FN_GA_DefaultPlayer_Stunned_parameters.hpp"
#include "SDK/FN_GA_TrapBuildGeneric_structs.hpp"
#include "SDK/FN_GA_TrapBuildGeneric_classes.hpp"
#include "SDK/FN_GA_TrapBuildGeneric_parameters.hpp"
#include "SDK/FN_PlayerTrapArmSpeedModCalculation_structs.hpp"
#include "SDK/FN_PlayerTrapArmSpeedModCalculation_classes.hpp"
#include "SDK/FN_PlayerTrapArmSpeedModCalculation_parameters.hpp"
#include "SDK/FN_PlayerTrapBaseDamageModCalculation_structs.hpp"
#include "SDK/FN_PlayerTrapBaseDamageModCalculation_classes.hpp"
#include "SDK/FN_PlayerTrapBaseDamageModCalculation_parameters.hpp"
#include "SDK/FN_ArrowCursorWidget_structs.hpp"
#include "SDK/FN_ArrowCursorWidget_classes.hpp"
#include "SDK/FN_ArrowCursorWidget_parameters.hpp"
#include "SDK/FN_PlayerTrapDiceCritChanceModCalculation_structs.hpp"
#include "SDK/FN_PlayerTrapDiceCritChanceModCalculation_classes.hpp"
#include "SDK/FN_PlayerTrapDiceCritChanceModCalculation_parameters.hpp"
#include "SDK/FN_PlayerTrapDiceCritMultiplierModCalculation_structs.hpp"
#include "SDK/FN_PlayerTrapDiceCritMultiplierModCalculation_classes.hpp"
#include "SDK/FN_PlayerTrapDiceCritMultiplierModCalculation_parameters.hpp"
#include "SDK/FN_TextStyle-Button-Outline-XS-Disabled_structs.hpp"
#include "SDK/FN_TextStyle-Button-Outline-XS-Disabled_classes.hpp"
#include "SDK/FN_TextStyle-Button-Outline-XS-Disabled_parameters.hpp"
#include "SDK/FN_ItemOrWidget_structs.hpp"
#include "SDK/FN_ItemOrWidget_classes.hpp"
#include "SDK/FN_ItemOrWidget_parameters.hpp"
#include "SDK/FN_PlayerTrapHealingSourceModCalculation_structs.hpp"
#include "SDK/FN_PlayerTrapHealingSourceModCalculation_classes.hpp"
#include "SDK/FN_PlayerTrapHealingSourceModCalculation_parameters.hpp"
#include "SDK/FN_MiniCraftingIngredientList_structs.hpp"
#include "SDK/FN_MiniCraftingIngredientList_classes.hpp"
#include "SDK/FN_MiniCraftingIngredientList_parameters.hpp"
#include "SDK/FN_MiniItemCraftingIngredientsDetailWidget_structs.hpp"
#include "SDK/FN_MiniItemCraftingIngredientsDetailWidget_classes.hpp"
#include "SDK/FN_MiniItemCraftingIngredientsDetailWidget_parameters.hpp"
#include "SDK/FN_PlayerTrapMaxDurabilityModCalculation_structs.hpp"
#include "SDK/FN_PlayerTrapMaxDurabilityModCalculation_classes.hpp"
#include "SDK/FN_PlayerTrapMaxDurabilityModCalculation_parameters.hpp"
#include "SDK/FN_PopupFrame_structs.hpp"
#include "SDK/FN_PopupFrame_classes.hpp"
#include "SDK/FN_PopupFrame_parameters.hpp"
#include "SDK/FN_SurvivorTraitsDetailWidget_structs.hpp"
#include "SDK/FN_SurvivorTraitsDetailWidget_classes.hpp"
#include "SDK/FN_SurvivorTraitsDetailWidget_parameters.hpp"
#include "SDK/FN_PlayerTrapReloadTimeModCalculation_structs.hpp"
#include "SDK/FN_PlayerTrapReloadTimeModCalculation_classes.hpp"
#include "SDK/FN_PlayerTrapReloadTimeModCalculation_parameters.hpp"
#include "SDK/FN_MtxStoreRoot_structs.hpp"
#include "SDK/FN_MtxStoreRoot_classes.hpp"
#include "SDK/FN_MtxStoreRoot_parameters.hpp"
#include "SDK/FN_Hero_Management_HUDWrapper_structs.hpp"
#include "SDK/FN_Hero_Management_HUDWrapper_classes.hpp"
#include "SDK/FN_Hero_Management_HUDWrapper_parameters.hpp"
#include "SDK/FN_PlayerChoiceWidget_structs.hpp"
#include "SDK/FN_PlayerChoiceWidget_classes.hpp"
#include "SDK/FN_PlayerChoiceWidget_parameters.hpp"
#include "SDK/FN_Announce_Gen_Quest_Conversation_structs.hpp"
#include "SDK/FN_Announce_Gen_Quest_Conversation_classes.hpp"
#include "SDK/FN_Announce_Gen_Quest_Conversation_parameters.hpp"
#include "SDK/FN_HomeScreenQuestRewardItem_structs.hpp"
#include "SDK/FN_HomeScreenQuestRewardItem_classes.hpp"
#include "SDK/FN_HomeScreenQuestRewardItem_parameters.hpp"
#include "SDK/FN_PlayerChoiceButtonWidget_structs.hpp"
#include "SDK/FN_PlayerChoiceButtonWidget_classes.hpp"
#include "SDK/FN_PlayerChoiceButtonWidget_parameters.hpp"
#include "SDK/FN_RewardsWidget_structs.hpp"
#include "SDK/FN_RewardsWidget_classes.hpp"
#include "SDK/FN_RewardsWidget_parameters.hpp"
#include "SDK/FN_LegacyButtonStyle-StarRating_structs.hpp"
#include "SDK/FN_LegacyButtonStyle-StarRating_classes.hpp"
#include "SDK/FN_LegacyButtonStyle-StarRating_parameters.hpp"
#include "SDK/FN_ItemTextureSet_structs.hpp"
#include "SDK/FN_ItemTextureSet_classes.hpp"
#include "SDK/FN_ItemTextureSet_parameters.hpp"
#include "SDK/FN_LegacyButtonStyle-Default_structs.hpp"
#include "SDK/FN_LegacyButtonStyle-Default_classes.hpp"
#include "SDK/FN_LegacyButtonStyle-Default_parameters.hpp"
#include "SDK/FN_RewardsListWidget_structs.hpp"
#include "SDK/FN_RewardsListWidget_classes.hpp"
#include "SDK/FN_RewardsListWidget_parameters.hpp"
#include "SDK/FN_RewardsChoiceButtonWidget_structs.hpp"
#include "SDK/FN_RewardsChoiceButtonWidget_classes.hpp"
#include "SDK/FN_RewardsChoiceButtonWidget_parameters.hpp"
#include "SDK/FN_ItemTextureStylesheet_structs.hpp"
#include "SDK/FN_ItemTextureStylesheet_classes.hpp"
#include "SDK/FN_ItemTextureStylesheet_parameters.hpp"
#include "SDK/FN_LegacyItem_DO_NOT_USE_structs.hpp"
#include "SDK/FN_LegacyItem_DO_NOT_USE_classes.hpp"
#include "SDK/FN_LegacyItem_DO_NOT_USE_parameters.hpp"
#include "SDK/FN_Item_TierBadge_structs.hpp"
#include "SDK/FN_Item_TierBadge_classes.hpp"
#include "SDK/FN_Item_TierBadge_parameters.hpp"
#include "SDK/FN_ItemCooldownMeter_structs.hpp"
#include "SDK/FN_ItemCooldownMeter_classes.hpp"
#include "SDK/FN_ItemCooldownMeter_parameters.hpp"
#include "SDK/FN_FrontEndRewardWrapperWidget_structs.hpp"
#include "SDK/FN_FrontEndRewardWrapperWidget_classes.hpp"
#include "SDK/FN_FrontEndRewardWrapperWidget_parameters.hpp"
#include "SDK/FN_LegacyButtonStyle-Transparent_structs.hpp"
#include "SDK/FN_LegacyButtonStyle-Transparent_classes.hpp"
#include "SDK/FN_LegacyButtonStyle-Transparent_parameters.hpp"
#include "SDK/FN_ItemDragIcon_structs.hpp"
#include "SDK/FN_ItemDragIcon_classes.hpp"
#include "SDK/FN_ItemDragIcon_parameters.hpp"
#include "SDK/FN_StickyNotification_structs.hpp"
#include "SDK/FN_StickyNotification_classes.hpp"
#include "SDK/FN_StickyNotification_parameters.hpp"
#include "SDK/FN_HeroNotificationHandler_structs.hpp"
#include "SDK/FN_HeroNotificationHandler_classes.hpp"
#include "SDK/FN_HeroNotificationHandler_parameters.hpp"
#include "SDK/FN_BasicNotification_structs.hpp"
#include "SDK/FN_BasicNotification_classes.hpp"
#include "SDK/FN_BasicNotification_parameters.hpp"
#include "SDK/FN_TwitchNotification_structs.hpp"
#include "SDK/FN_TwitchNotification_classes.hpp"
#include "SDK/FN_TwitchNotification_parameters.hpp"
#include "SDK/FN_Announce_ZoneModifiers_structs.hpp"
#include "SDK/FN_Announce_ZoneModifiers_classes.hpp"
#include "SDK/FN_Announce_ZoneModifiers_parameters.hpp"
#include "SDK/FN_PBWA_BG_DoorC_structs.hpp"
#include "SDK/FN_PBWA_BG_DoorC_classes.hpp"
#include "SDK/FN_PBWA_BG_DoorC_parameters.hpp"
#include "SDK/FN_PBWA_BG_DoorS_structs.hpp"
#include "SDK/FN_PBWA_BG_DoorS_classes.hpp"
#include "SDK/FN_PBWA_BG_DoorS_parameters.hpp"
#include "SDK/FN_PBWA_BG_DoorSide_structs.hpp"
#include "SDK/FN_PBWA_BG_DoorSide_classes.hpp"
#include "SDK/FN_PBWA_BG_DoorSide_parameters.hpp"
#include "SDK/FN_PBWA_BG_Solid_structs.hpp"
#include "SDK/FN_PBWA_BG_Solid_classes.hpp"
#include "SDK/FN_PBWA_BG_Solid_parameters.hpp"
#include "SDK/FN_PBWA_BG_WindowC_structs.hpp"
#include "SDK/FN_PBWA_BG_WindowC_classes.hpp"
#include "SDK/FN_PBWA_BG_WindowC_parameters.hpp"
#include "SDK/FN_PBWA_BG_Windows_structs.hpp"
#include "SDK/FN_PBWA_BG_Windows_classes.hpp"
#include "SDK/FN_PBWA_BG_Windows_parameters.hpp"
#include "SDK/FN_PBWA_BG_WindowSide_structs.hpp"
#include "SDK/FN_PBWA_BG_WindowSide_classes.hpp"
#include "SDK/FN_PBWA_BG_WindowSide_parameters.hpp"
#include "SDK/FN_PBWA_M1_DoorC_structs.hpp"
#include "SDK/FN_PBWA_M1_DoorC_classes.hpp"
#include "SDK/FN_PBWA_M1_DoorC_parameters.hpp"
#include "SDK/FN_PBWA_M1_DoorS_structs.hpp"
#include "SDK/FN_PBWA_M1_DoorS_classes.hpp"
#include "SDK/FN_PBWA_M1_DoorS_parameters.hpp"
#include "SDK/FN_PBWA_M1_DoorSide_structs.hpp"
#include "SDK/FN_PBWA_M1_DoorSide_classes.hpp"
#include "SDK/FN_PBWA_M1_DoorSide_parameters.hpp"
#include "SDK/FN_BasicStrokeBox_structs.hpp"
#include "SDK/FN_BasicStrokeBox_classes.hpp"
#include "SDK/FN_BasicStrokeBox_parameters.hpp"
#include "SDK/FN_PBWA_M1_Solid_structs.hpp"
#include "SDK/FN_PBWA_M1_Solid_classes.hpp"
#include "SDK/FN_PBWA_M1_Solid_parameters.hpp"
#include "SDK/FN_LegacyButtonStyle-Item_structs.hpp"
#include "SDK/FN_LegacyButtonStyle-Item_classes.hpp"
#include "SDK/FN_LegacyButtonStyle-Item_parameters.hpp"
#include "SDK/FN_PBWA_M1_WindowC_structs.hpp"
#include "SDK/FN_PBWA_M1_WindowC_classes.hpp"
#include "SDK/FN_PBWA_M1_WindowC_parameters.hpp"
#include "SDK/FN_PBWA_M1_Windows_structs.hpp"
#include "SDK/FN_PBWA_M1_Windows_classes.hpp"
#include "SDK/FN_PBWA_M1_Windows_parameters.hpp"
#include "SDK/FN_PBWA_M1_WindowSide_structs.hpp"
#include "SDK/FN_PBWA_M1_WindowSide_classes.hpp"
#include "SDK/FN_PBWA_M1_WindowSide_parameters.hpp"
#include "SDK/FN_PBWA_S1_DoorC_structs.hpp"
#include "SDK/FN_PBWA_S1_DoorC_classes.hpp"
#include "SDK/FN_PBWA_S1_DoorC_parameters.hpp"
#include "SDK/FN_Border-MainL_structs.hpp"
#include "SDK/FN_Border-MainL_classes.hpp"
#include "SDK/FN_Border-MainL_parameters.hpp"
#include "SDK/FN_MissionDetailsModifierRow_structs.hpp"
#include "SDK/FN_MissionDetailsModifierRow_classes.hpp"
#include "SDK/FN_MissionDetailsModifierRow_parameters.hpp"
#include "SDK/FN_PBWA_S1_DoorS_structs.hpp"
#include "SDK/FN_PBWA_S1_DoorS_classes.hpp"
#include "SDK/FN_PBWA_S1_DoorS_parameters.hpp"
#include "SDK/FN_MissionDetailsModifierList_structs.hpp"
#include "SDK/FN_MissionDetailsModifierList_classes.hpp"
#include "SDK/FN_MissionDetailsModifierList_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S-B-LightGray35_structs.hpp"
#include "SDK/FN_TextStyle-Base-S-B-LightGray35_classes.hpp"
#include "SDK/FN_TextStyle-Base-S-B-LightGray35_parameters.hpp"
#include "SDK/FN_PBWA_S1_DoorSide_structs.hpp"
#include "SDK/FN_PBWA_S1_DoorSide_classes.hpp"
#include "SDK/FN_PBWA_S1_DoorSide_parameters.hpp"
#include "SDK/FN_PBWA_S1_Solid_structs.hpp"
#include "SDK/FN_PBWA_S1_Solid_classes.hpp"
#include "SDK/FN_PBWA_S1_Solid_parameters.hpp"
#include "SDK/FN_Border-ItemInfo-Blank-DkBlue_structs.hpp"
#include "SDK/FN_Border-ItemInfo-Blank-DkBlue_classes.hpp"
#include "SDK/FN_Border-ItemInfo-Blank-DkBlue_parameters.hpp"
#include "SDK/FN_PBWA_S1_Windows_structs.hpp"
#include "SDK/FN_PBWA_S1_Windows_classes.hpp"
#include "SDK/FN_PBWA_S1_Windows_parameters.hpp"
#include "SDK/FN_Border-MainL-Black_structs.hpp"
#include "SDK/FN_Border-MainL-Black_classes.hpp"
#include "SDK/FN_Border-MainL-Black_parameters.hpp"
#include "SDK/FN_Border-FSModal-TopL_structs.hpp"
#include "SDK/FN_Border-FSModal-TopL_classes.hpp"
#include "SDK/FN_Border-FSModal-TopL_parameters.hpp"
#include "SDK/FN_PBWA_S1_WindowsC_structs.hpp"
#include "SDK/FN_PBWA_S1_WindowsC_classes.hpp"
#include "SDK/FN_PBWA_S1_WindowsC_parameters.hpp"
#include "SDK/FN_Border-MainModal_structs.hpp"
#include "SDK/FN_Border-MainModal_classes.hpp"
#include "SDK/FN_Border-MainModal_parameters.hpp"
#include "SDK/FN_Border-ManageListHeader_structs.hpp"
#include "SDK/FN_Border-ManageListHeader_classes.hpp"
#include "SDK/FN_Border-ManageListHeader_parameters.hpp"
#include "SDK/FN_Border-ProgressBar-Collections_structs.hpp"
#include "SDK/FN_Border-ProgressBar-Collections_classes.hpp"
#include "SDK/FN_Border-ProgressBar-Collections_parameters.hpp"
#include "SDK/FN_PBWA_S1_WindowsSide_structs.hpp"
#include "SDK/FN_PBWA_S1_WindowsSide_classes.hpp"
#include "SDK/FN_PBWA_S1_WindowsSide_parameters.hpp"
#include "SDK/FN_Border-ListItem-GreenComplete_structs.hpp"
#include "SDK/FN_Border-ListItem-GreenComplete_classes.hpp"
#include "SDK/FN_Border-ListItem-GreenComplete_parameters.hpp"
#include "SDK/FN_LegacyButtonIconText_structs.hpp"
#include "SDK/FN_LegacyButtonIconText_classes.hpp"
#include "SDK/FN_LegacyButtonIconText_parameters.hpp"
#include "SDK/FN_Border-TabM-Solid-85pc_structs.hpp"
#include "SDK/FN_Border-TabM-Solid-85pc_classes.hpp"
#include "SDK/FN_Border-TabM-Solid-85pc_parameters.hpp"
#include "SDK/FN_SquadSlotGroup_structs.hpp"
#include "SDK/FN_SquadSlotGroup_classes.hpp"
#include "SDK/FN_SquadSlotGroup_parameters.hpp"
#include "SDK/FN_Border-TabM-Solid-White60pc_structs.hpp"
#include "SDK/FN_Border-TabM-Solid-White60pc_classes.hpp"
#include "SDK/FN_Border-TabM-Solid-White60pc_parameters.hpp"
#include "SDK/FN_Border-TabM-Solid-White20pc_structs.hpp"
#include "SDK/FN_Border-TabM-Solid-White20pc_classes.hpp"
#include "SDK/FN_Border-TabM-Solid-White20pc_parameters.hpp"
#include "SDK/FN_Border-TabM-Solid-10pc_structs.hpp"
#include "SDK/FN_Border-TabM-Solid-10pc_classes.hpp"
#include "SDK/FN_Border-TabM-Solid-10pc_parameters.hpp"
#include "SDK/FN_LegacyButtonStyle-Close_structs.hpp"
#include "SDK/FN_LegacyButtonStyle-Close_classes.hpp"
#include "SDK/FN_LegacyButtonStyle-Close_parameters.hpp"
#include "SDK/FN_Border-StatRow-AffectedStatRowHighlight_structs.hpp"
#include "SDK/FN_Border-StatRow-AffectedStatRowHighlight_classes.hpp"
#include "SDK/FN_Border-StatRow-AffectedStatRowHighlight_parameters.hpp"
#include "SDK/FN_ButtonStyle-Solid-SquareM_structs.hpp"
#include "SDK/FN_ButtonStyle-Solid-SquareM_classes.hpp"
#include "SDK/FN_ButtonStyle-Solid-SquareM_parameters.hpp"
#include "SDK/FN_ButtonStyle-Tab-Manage_structs.hpp"
#include "SDK/FN_ButtonStyle-Tab-Manage_classes.hpp"
#include "SDK/FN_ButtonStyle-Tab-Manage_parameters.hpp"
#include "SDK/FN_PBWA_W1_DoorC_structs.hpp"
#include "SDK/FN_PBWA_W1_DoorC_classes.hpp"
#include "SDK/FN_PBWA_W1_DoorC_parameters.hpp"
#include "SDK/FN_PBWA_W1_DoorS_structs.hpp"
#include "SDK/FN_PBWA_W1_DoorS_classes.hpp"
#include "SDK/FN_PBWA_W1_DoorS_parameters.hpp"
#include "SDK/FN_PBWA_W1_DoorSide_structs.hpp"
#include "SDK/FN_PBWA_W1_DoorSide_classes.hpp"
#include "SDK/FN_PBWA_W1_DoorSide_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S-Gray_structs.hpp"
#include "SDK/FN_TextStyle-Base-S-Gray_classes.hpp"
#include "SDK/FN_TextStyle-Base-S-Gray_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S-Picasso_structs.hpp"
#include "SDK/FN_TextStyle-Base-S-Picasso_classes.hpp"
#include "SDK/FN_TextStyle-Base-S-Picasso_parameters.hpp"
#include "SDK/FN_TextStyle-Base-M-B-Yellow_structs.hpp"
#include "SDK/FN_TextStyle-Base-M-B-Yellow_classes.hpp"
#include "SDK/FN_TextStyle-Base-M-B-Yellow_parameters.hpp"
#include "SDK/FN_TextStyle-Base-M-B_Blue_structs.hpp"
#include "SDK/FN_TextStyle-Base-M-B_Blue_classes.hpp"
#include "SDK/FN_TextStyle-Base-M-B_Blue_parameters.hpp"
#include "SDK/FN_TextStyle-Base-M-B_Black_structs.hpp"
#include "SDK/FN_TextStyle-Base-M-B_Black_classes.hpp"
#include "SDK/FN_TextStyle-Base-M-B_Black_parameters.hpp"
#include "SDK/FN_TextStyle-Base-M-B_Blue50_structs.hpp"
#include "SDK/FN_TextStyle-Base-M-B_Blue50_classes.hpp"
#include "SDK/FN_TextStyle-Base-M-B_Blue50_parameters.hpp"
#include "SDK/FN_TextStyle-Base-M-B_Red_structs.hpp"
#include "SDK/FN_TextStyle-Base-M-B_Red_classes.hpp"
#include "SDK/FN_TextStyle-Base-M-B_Red_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S-B-S_Gorse_structs.hpp"
#include "SDK/FN_TextStyle-Base-S-B-S_Gorse_classes.hpp"
#include "SDK/FN_TextStyle-Base-S-B-S_Gorse_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S-B-Black_structs.hpp"
#include "SDK/FN_TextStyle-Base-S-B-Black_classes.hpp"
#include "SDK/FN_TextStyle-Base-S-B-Black_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S-B-Blue_structs.hpp"
#include "SDK/FN_TextStyle-Base-S-B-Blue_classes.hpp"
#include "SDK/FN_TextStyle-Base-S-B-Blue_parameters.hpp"
#include "SDK/FN_PBWA_W1_Solid_structs.hpp"
#include "SDK/FN_PBWA_W1_Solid_classes.hpp"
#include "SDK/FN_PBWA_W1_Solid_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-Black_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-Black_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-Black_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-Black_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-Black_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-Black_parameters.hpp"
#include "SDK/FN_LegacyButtonStyle-Emphasis_structs.hpp"
#include "SDK/FN_LegacyButtonStyle-Emphasis_classes.hpp"
#include "SDK/FN_LegacyButtonStyle-Emphasis_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S-Black_structs.hpp"
#include "SDK/FN_TextStyle-Base-S-Black_classes.hpp"
#include "SDK/FN_TextStyle-Base-S-Black_parameters.hpp"
#include "SDK/FN_PBWA_W1_WindowC_structs.hpp"
#include "SDK/FN_PBWA_W1_WindowC_classes.hpp"
#include "SDK/FN_PBWA_W1_WindowC_parameters.hpp"
#include "SDK/FN_TextStyle-Base-ToolTip-B_structs.hpp"
#include "SDK/FN_TextStyle-Base-ToolTip-B_classes.hpp"
#include "SDK/FN_TextStyle-Base-ToolTip-B_parameters.hpp"
#include "SDK/FN_TextStyle-Base-ToolTip-Body_structs.hpp"
#include "SDK/FN_TextStyle-Base-ToolTip-Body_classes.hpp"
#include "SDK/FN_TextStyle-Base-ToolTip-Body_parameters.hpp"
#include "SDK/FN_PBWA_W1_Windows_structs.hpp"
#include "SDK/FN_PBWA_W1_Windows_classes.hpp"
#include "SDK/FN_PBWA_W1_Windows_parameters.hpp"
#include "SDK/FN_PBWA_W1_WindowSide_structs.hpp"
#include "SDK/FN_PBWA_W1_WindowSide_classes.hpp"
#include "SDK/FN_PBWA_W1_WindowSide_parameters.hpp"
#include "SDK/FN_FrontendCamera_Main_structs.hpp"
#include "SDK/FN_FrontendCamera_Main_classes.hpp"
#include "SDK/FN_FrontendCamera_Main_parameters.hpp"
#include "SDK/FN_BasicRatingWidget_structs.hpp"
#include "SDK/FN_BasicRatingWidget_classes.hpp"
#include "SDK/FN_BasicRatingWidget_parameters.hpp"
#include "SDK/FN_Announcement_ZoneModifiers_structs.hpp"
#include "SDK/FN_Announcement_ZoneModifiers_classes.hpp"
#include "SDK/FN_Announcement_ZoneModifiers_parameters.hpp"
#include "SDK/FN_BP_FortExpeditionDetailsWidget_structs.hpp"
#include "SDK/FN_BP_FortExpeditionDetailsWidget_classes.hpp"
#include "SDK/FN_BP_FortExpeditionDetailsWidget_parameters.hpp"
#include "SDK/FN_BP_FortExpeditionListItem_structs.hpp"
#include "SDK/FN_BP_FortExpeditionListItem_classes.hpp"
#include "SDK/FN_BP_FortExpeditionListItem_parameters.hpp"
#include "SDK/FN_BP_FortExpeditionOverviewWidget_structs.hpp"
#include "SDK/FN_BP_FortExpeditionOverviewWidget_classes.hpp"
#include "SDK/FN_BP_FortExpeditionOverviewWidget_parameters.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_XS-B_Blue_structs.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_XS-B_Blue_classes.hpp"
#include "SDK/FN_ButtonStyle-TextOnlyBase_XS-B_Blue_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S-Blue_structs.hpp"
#include "SDK/FN_TextStyle-Base-S-Blue_classes.hpp"
#include "SDK/FN_TextStyle-Base-S-Blue_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S-B-Gray_structs.hpp"
#include "SDK/FN_TextStyle-Base-S-B-Gray_classes.hpp"
#include "SDK/FN_TextStyle-Base-S-B-Gray_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S-B-Gray50_structs.hpp"
#include "SDK/FN_TextStyle-Base-S-B-Gray50_classes.hpp"
#include "SDK/FN_TextStyle-Base-S-B-Gray50_parameters.hpp"
#include "SDK/FN_BP_FortExpeditionBuildSquadWidget_structs.hpp"
#include "SDK/FN_BP_FortExpeditionBuildSquadWidget_classes.hpp"
#include "SDK/FN_BP_FortExpeditionBuildSquadWidget_parameters.hpp"
#include "SDK/FN_BP_FortExpeditionVehicleTileItemWidget_structs.hpp"
#include "SDK/FN_BP_FortExpeditionVehicleTileItemWidget_classes.hpp"
#include "SDK/FN_BP_FortExpeditionVehicleTileItemWidget_parameters.hpp"
#include "SDK/FN_InfoWindow_structs.hpp"
#include "SDK/FN_InfoWindow_classes.hpp"
#include "SDK/FN_InfoWindow_parameters.hpp"
#include "SDK/FN_TextStyle-Base-S-B-Picasso_structs.hpp"
#include "SDK/FN_TextStyle-Base-S-B-Picasso_classes.hpp"
#include "SDK/FN_TextStyle-Base-S-B-Picasso_parameters.hpp"
#include "SDK/FN_TextStyle-Base-M-B-DarkGreen_structs.hpp"
#include "SDK/FN_TextStyle-Base-M-B-DarkGreen_classes.hpp"
#include "SDK/FN_TextStyle-Base-M-B-DarkGreen_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-LightGray_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-LightGray_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-LightGray_parameters.hpp"
#include "SDK/FN_IconAndNameWidget_structs.hpp"
#include "SDK/FN_IconAndNameWidget_classes.hpp"
#include "SDK/FN_IconAndNameWidget_parameters.hpp"
#include "SDK/FN_BP_FortExpeditionReturnsWidget_structs.hpp"
#include "SDK/FN_BP_FortExpeditionReturnsWidget_classes.hpp"
#include "SDK/FN_BP_FortExpeditionReturnsWidget_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-Blue_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-Blue_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-Blue_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-B_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-B_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-B_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-NavyBlueFade_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-NavyBlueFade_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-NavyBlueFade_parameters.hpp"
#include "SDK/FN_TextStyle-Header-M-Blue_structs.hpp"
#include "SDK/FN_TextStyle-Header-M-Blue_classes.hpp"
#include "SDK/FN_TextStyle-Header-M-Blue_parameters.hpp"
#include "SDK/FN_TextStyle-Header-L-S_structs.hpp"
#include "SDK/FN_TextStyle-Header-L-S_classes.hpp"
#include "SDK/FN_TextStyle-Header-L-S_parameters.hpp"
#include "SDK/FN_Border-ItemDetailsBG_structs.hpp"
#include "SDK/FN_Border-ItemDetailsBG_classes.hpp"
#include "SDK/FN_Border-ItemDetailsBG_parameters.hpp"
#include "SDK/FN_Border-ItemInfo-Blank_structs.hpp"
#include "SDK/FN_Border-ItemInfo-Blank_classes.hpp"
#include "SDK/FN_Border-ItemInfo-Blank_parameters.hpp"
#include "SDK/FN_VehicleObject_structs.hpp"
#include "SDK/FN_VehicleObject_classes.hpp"
#include "SDK/FN_VehicleObject_parameters.hpp"
#include "SDK/FN_BP_FortMaterialProgressBar_structs.hpp"
#include "SDK/FN_BP_FortMaterialProgressBar_classes.hpp"
#include "SDK/FN_BP_FortMaterialProgressBar_parameters.hpp"
#include "SDK/FN_Border-ItemInfo-Locked_structs.hpp"
#include "SDK/FN_Border-ItemInfo-Locked_classes.hpp"
#include "SDK/FN_Border-ItemInfo-Locked_parameters.hpp"
#include "SDK/FN_Border-ItemInfoHeader_structs.hpp"
#include "SDK/FN_Border-ItemInfoHeader_classes.hpp"
#include "SDK/FN_Border-ItemInfoHeader_parameters.hpp"
#include "SDK/FN_Border-PerkList-Unlocked_structs.hpp"
#include "SDK/FN_Border-PerkList-Unlocked_classes.hpp"
#include "SDK/FN_Border-PerkList-Unlocked_parameters.hpp"
#include "SDK/FN_Border-SolidBG-DkBlue_structs.hpp"
#include "SDK/FN_Border-SolidBG-DkBlue_classes.hpp"
#include "SDK/FN_Border-SolidBG-DkBlue_parameters.hpp"
#include "SDK/FN_Border-SolidBG_structs.hpp"
#include "SDK/FN_Border-SolidBG_classes.hpp"
#include "SDK/FN_Border-SolidBG_parameters.hpp"
#include "SDK/FN_BP_ExpeditionSquadSlotsView_structs.hpp"
#include "SDK/FN_BP_ExpeditionSquadSlotsView_classes.hpp"
#include "SDK/FN_BP_ExpeditionSquadSlotsView_parameters.hpp"
#include "SDK/FN_FortUITheme_structs.hpp"
#include "SDK/FN_FortUITheme_classes.hpp"
#include "SDK/FN_FortUITheme_parameters.hpp"
#include "SDK/FN_ColorStylesheet_structs.hpp"
#include "SDK/FN_ColorStylesheet_classes.hpp"
#include "SDK/FN_ColorStylesheet_parameters.hpp"
#include "SDK/FN_TextStyle-Header-M_structs.hpp"
#include "SDK/FN_TextStyle-Header-M_classes.hpp"
#include "SDK/FN_TextStyle-Header-M_parameters.hpp"
#include "SDK/FN_WeaponTooltipStatType_structs.hpp"
#include "SDK/FN_WeaponTooltipStatType_classes.hpp"
#include "SDK/FN_WeaponTooltipStatType_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-Blue-60pc_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-Blue-60pc_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-Blue-60pc_parameters.hpp"
#include "SDK/FN_BP_FortExpeditionPickVehicleWidget_structs.hpp"
#include "SDK/FN_BP_FortExpeditionPickVehicleWidget_classes.hpp"
#include "SDK/FN_BP_FortExpeditionPickVehicleWidget_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-Blue-StatLesser_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-Blue-StatLesser_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-Blue-StatLesser_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-Yellow_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-Yellow_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-Yellow_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-S-Red_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-S-Red_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-S-Red_parameters.hpp"
#include "SDK/FN_StatsListItemWIdget_structs.hpp"
#include "SDK/FN_StatsListItemWIdget_classes.hpp"
#include "SDK/FN_StatsListItemWIdget_parameters.hpp"
#include "SDK/FN_ButtonStyle-MediumBase_structs.hpp"
#include "SDK/FN_ButtonStyle-MediumBase_classes.hpp"
#include "SDK/FN_ButtonStyle-MediumBase_parameters.hpp"
#include "SDK/FN_ItemDetailsHeader_structs.hpp"
#include "SDK/FN_ItemDetailsHeader_classes.hpp"
#include "SDK/FN_ItemDetailsHeader_parameters.hpp"
#include "SDK/FN_ItemRatingIndicator_structs.hpp"
#include "SDK/FN_ItemRatingIndicator_classes.hpp"
#include "SDK/FN_ItemRatingIndicator_parameters.hpp"
#include "SDK/FN_SquadSlotDetailsPanel_structs.hpp"
#include "SDK/FN_SquadSlotDetailsPanel_classes.hpp"
#include "SDK/FN_SquadSlotDetailsPanel_parameters.hpp"
#include "SDK/FN_SquadSlotItemDetailsHostPanel_structs.hpp"
#include "SDK/FN_SquadSlotItemDetailsHostPanel_classes.hpp"
#include "SDK/FN_SquadSlotItemDetailsHostPanel_parameters.hpp"
#include "SDK/FN_MissionPanelContent_structs.hpp"
#include "SDK/FN_MissionPanelContent_classes.hpp"
#include "SDK/FN_MissionPanelContent_parameters.hpp"
#include "SDK/FN_Border-StatBG_structs.hpp"
#include "SDK/FN_Border-StatBG_classes.hpp"
#include "SDK/FN_Border-StatBG_parameters.hpp"
#include "SDK/FN_ButtonStyle-Slot-PeopleL-XL_structs.hpp"
#include "SDK/FN_ButtonStyle-Slot-PeopleL-XL_classes.hpp"
#include "SDK/FN_ButtonStyle-Slot-PeopleL-XL_parameters.hpp"
#include "SDK/FN_ButtonStyle-Slot-PeopleM_structs.hpp"
#include "SDK/FN_ButtonStyle-Slot-PeopleM_classes.hpp"
#include "SDK/FN_ButtonStyle-Slot-PeopleM_parameters.hpp"
#include "SDK/FN_BP_FortExpeditionIconTabButton_structs.hpp"
#include "SDK/FN_BP_FortExpeditionIconTabButton_classes.hpp"
#include "SDK/FN_BP_FortExpeditionIconTabButton_parameters.hpp"
#include "SDK/FN_PerkDivider_structs.hpp"
#include "SDK/FN_PerkDivider_classes.hpp"
#include "SDK/FN_PerkDivider_parameters.hpp"
#include "SDK/FN_ButtonStyle-Slot-PeopleS-XS_structs.hpp"
#include "SDK/FN_ButtonStyle-Slot-PeopleS-XS_classes.hpp"
#include "SDK/FN_ButtonStyle-Slot-PeopleS-XS_parameters.hpp"
#include "SDK/FN_RewardsListEntry_structs.hpp"
#include "SDK/FN_RewardsListEntry_classes.hpp"
#include "SDK/FN_RewardsListEntry_parameters.hpp"
#include "SDK/FN_ItemCountOverCost_structs.hpp"
#include "SDK/FN_ItemCountOverCost_classes.hpp"
#include "SDK/FN_ItemCountOverCost_parameters.hpp"
#include "SDK/FN_Border-Slot-Empty_structs.hpp"
#include "SDK/FN_Border-Slot-Empty_classes.hpp"
#include "SDK/FN_Border-Slot-Empty_parameters.hpp"
#include "SDK/FN_TextStyle-Header-M-S_structs.hpp"
#include "SDK/FN_TextStyle-Header-M-S_classes.hpp"
#include "SDK/FN_TextStyle-Header-M-S_parameters.hpp"
#include "SDK/FN_Border-ModalHeader-Dark_structs.hpp"
#include "SDK/FN_Border-ModalHeader-Dark_classes.hpp"
#include "SDK/FN_Border-ModalHeader-Dark_parameters.hpp"
#include "SDK/FN_Lightbox_structs.hpp"
#include "SDK/FN_Lightbox_classes.hpp"
#include "SDK/FN_Lightbox_parameters.hpp"
#include "SDK/FN_InfoEntry_structs.hpp"
#include "SDK/FN_InfoEntry_classes.hpp"
#include "SDK/FN_InfoEntry_parameters.hpp"
#include "SDK/FN_Border-1pxOutline_structs.hpp"
#include "SDK/FN_Border-1pxOutline_classes.hpp"
#include "SDK/FN_Border-1pxOutline_parameters.hpp"
#include "SDK/FN_Border-MainL2_structs.hpp"
#include "SDK/FN_Border-MainL2_classes.hpp"
#include "SDK/FN_Border-MainL2_parameters.hpp"
#include "SDK/FN_TextScrollStyle-Base_structs.hpp"
#include "SDK/FN_TextScrollStyle-Base_classes.hpp"
#include "SDK/FN_TextScrollStyle-Base_parameters.hpp"
#include "SDK/FN_ButtonStyle-MediumTransparentNoCues_structs.hpp"
#include "SDK/FN_ButtonStyle-MediumTransparentNoCues_classes.hpp"
#include "SDK/FN_ButtonStyle-MediumTransparentNoCues_parameters.hpp"
#include "SDK/FN_BP_SimpleItemWidget_structs.hpp"
#include "SDK/FN_BP_SimpleItemWidget_classes.hpp"
#include "SDK/FN_BP_SimpleItemWidget_parameters.hpp"
#include "SDK/FN_ItemManagementTileButtonStyle-MulchModeItemToDetail_structs.hpp"
#include "SDK/FN_ItemManagementTileButtonStyle-MulchModeItemToDetail_classes.hpp"
#include "SDK/FN_ItemManagementTileButtonStyle-MulchModeItemToDetail_parameters.hpp"
#include "SDK/FN_ButtonStyle-MediumTransparentWithCues_structs.hpp"
#include "SDK/FN_ButtonStyle-MediumTransparentWithCues_classes.hpp"
#include "SDK/FN_ButtonStyle-MediumTransparentWithCues_parameters.hpp"
#include "SDK/FN_NormalBangWrapper_structs.hpp"
#include "SDK/FN_NormalBangWrapper_classes.hpp"
#include "SDK/FN_NormalBangWrapper_parameters.hpp"
#include "SDK/FN_ItemDetailsHeaderTagListText_structs.hpp"
#include "SDK/FN_ItemDetailsHeaderTagListText_classes.hpp"
#include "SDK/FN_ItemDetailsHeaderTagListText_parameters.hpp"
#include "SDK/FN_SupportHeroSquadBonusesDetailWidget_structs.hpp"
#include "SDK/FN_SupportHeroSquadBonusesDetailWidget_classes.hpp"
#include "SDK/FN_SupportHeroSquadBonusesDetailWidget_parameters.hpp"
#include "SDK/FN_TooltipStat_structs.hpp"
#include "SDK/FN_TooltipStat_classes.hpp"
#include "SDK/FN_TooltipStat_parameters.hpp"
#include "SDK/FN_BP_FortExpeditionExpiresWidget_structs.hpp"
#include "SDK/FN_BP_FortExpeditionExpiresWidget_classes.hpp"
#include "SDK/FN_BP_FortExpeditionExpiresWidget_parameters.hpp"
#include "SDK/FN_ButtonStyle-HighlightEmphasized_structs.hpp"
#include "SDK/FN_ButtonStyle-HighlightEmphasized_classes.hpp"
#include "SDK/FN_ButtonStyle-HighlightEmphasized_parameters.hpp"
#include "SDK/FN_TextStyle-MediumButton_structs.hpp"
#include "SDK/FN_TextStyle-MediumButton_classes.hpp"
#include "SDK/FN_TextStyle-MediumButton_parameters.hpp"
#include "SDK/FN_ItemTooltip_DisplayMode_structs.hpp"
#include "SDK/FN_ItemTooltip_DisplayMode_classes.hpp"
#include "SDK/FN_ItemTooltip_DisplayMode_parameters.hpp"
#include "SDK/FN_TextStyle-MediumButton-Disabled_structs.hpp"
#include "SDK/FN_TextStyle-MediumButton-Disabled_classes.hpp"
#include "SDK/FN_TextStyle-MediumButton-Disabled_parameters.hpp"
#include "SDK/FN_TextStyle-Button-BottomBar-S-Selected_structs.hpp"
#include "SDK/FN_TextStyle-Button-BottomBar-S-Selected_classes.hpp"
#include "SDK/FN_TextStyle-Button-BottomBar-S-Selected_parameters.hpp"
#include "SDK/FN_AlterationsWidget_structs.hpp"
#include "SDK/FN_AlterationsWidget_classes.hpp"
#include "SDK/FN_AlterationsWidget_parameters.hpp"
#include "SDK/FN_TextStyle-Button-BottomBar-S_structs.hpp"
#include "SDK/FN_TextStyle-Button-BottomBar-S_classes.hpp"
#include "SDK/FN_TextStyle-Button-BottomBar-S_parameters.hpp"
#include "SDK/FN_Border-Bang_structs.hpp"
#include "SDK/FN_Border-Bang_classes.hpp"
#include "SDK/FN_Border-Bang_parameters.hpp"
#include "SDK/FN_AlterationWidget_structs.hpp"
#include "SDK/FN_AlterationWidget_classes.hpp"
#include "SDK/FN_AlterationWidget_parameters.hpp"
#include "SDK/FN_FortHeroSupportPerkWidget_structs.hpp"
#include "SDK/FN_FortHeroSupportPerkWidget_classes.hpp"
#include "SDK/FN_FortHeroSupportPerkWidget_parameters.hpp"
#include "SDK/FN_ViewInfoButton_NoText_structs.hpp"
#include "SDK/FN_ViewInfoButton_NoText_classes.hpp"
#include "SDK/FN_ViewInfoButton_NoText_parameters.hpp"
#include "SDK/FN_ItemAlterationsListDetailWidget_structs.hpp"
#include "SDK/FN_ItemAlterationsListDetailWidget_classes.hpp"
#include "SDK/FN_ItemAlterationsListDetailWidget_parameters.hpp"
#include "SDK/FN_XpBarToolTip_structs.hpp"
#include "SDK/FN_XpBarToolTip_classes.hpp"
#include "SDK/FN_XpBarToolTip_parameters.hpp"
#include "SDK/FN_ItemDetailsHeaderRarityTypeText_structs.hpp"
#include "SDK/FN_ItemDetailsHeaderRarityTypeText_classes.hpp"
#include "SDK/FN_ItemDetailsHeaderRarityTypeText_parameters.hpp"
#include "SDK/FN_Tooltip-Custom-S_structs.hpp"
#include "SDK/FN_Tooltip-Custom-S_classes.hpp"
#include "SDK/FN_Tooltip-Custom-S_parameters.hpp"
#include "SDK/FN_PerksList_structs.hpp"
#include "SDK/FN_PerksList_classes.hpp"
#include "SDK/FN_PerksList_parameters.hpp"
#include "SDK/FN_Tooltip-Basic-S_structs.hpp"
#include "SDK/FN_Tooltip-Basic-S_classes.hpp"
#include "SDK/FN_Tooltip-Basic-S_parameters.hpp"
#include "SDK/FN_PerkWidgetNew_structs.hpp"
#include "SDK/FN_PerkWidgetNew_classes.hpp"
#include "SDK/FN_PerkWidgetNew_parameters.hpp"
#include "SDK/FN_PrimaryHeroActiveAbilitiesListDetailWidget_structs.hpp"
#include "SDK/FN_PrimaryHeroActiveAbilitiesListDetailWidget_classes.hpp"
#include "SDK/FN_PrimaryHeroActiveAbilitiesListDetailWidget_parameters.hpp"
#include "SDK/FN_Border-SolidBG-StatItem_structs.hpp"
#include "SDK/FN_Border-SolidBG-StatItem_classes.hpp"
#include "SDK/FN_Border-SolidBG-StatItem_parameters.hpp"
#include "SDK/FN_SurvivorSquadBonusTraitsDetailWidget_structs.hpp"
#include "SDK/FN_SurvivorSquadBonusTraitsDetailWidget_classes.hpp"
#include "SDK/FN_SurvivorSquadBonusTraitsDetailWidget_parameters.hpp"
#include "SDK/FN_Border-SolidBG-ToolTip_structs.hpp"
#include "SDK/FN_Border-SolidBG-ToolTip_classes.hpp"
#include "SDK/FN_Border-SolidBG-ToolTip_parameters.hpp"
#include "SDK/FN_ItemDetailsHeaderItemDisplayText_structs.hpp"
#include "SDK/FN_ItemDetailsHeaderItemDisplayText_classes.hpp"
#include "SDK/FN_ItemDetailsHeaderItemDisplayText_parameters.hpp"
#include "SDK/FN_ExpeditionSquadSlotButton_structs.hpp"
#include "SDK/FN_ExpeditionSquadSlotButton_classes.hpp"
#include "SDK/FN_ExpeditionSquadSlotButton_parameters.hpp"
#include "SDK/FN_ItemCalledOutAttributesDetailWidget_structs.hpp"
#include "SDK/FN_ItemCalledOutAttributesDetailWidget_classes.hpp"
#include "SDK/FN_ItemCalledOutAttributesDetailWidget_parameters.hpp"
#include "SDK/FN_Border-SolidBG-ToolTipShadow_structs.hpp"
#include "SDK/FN_Border-SolidBG-ToolTipShadow_classes.hpp"
#include "SDK/FN_Border-SolidBG-ToolTipShadow_parameters.hpp"
#include "SDK/FN_PerkTierWidgetNew_structs.hpp"
#include "SDK/FN_PerkTierWidgetNew_classes.hpp"
#include "SDK/FN_PerkTierWidgetNew_parameters.hpp"
#include "SDK/FN_CraftingIngredient_structs.hpp"
#include "SDK/FN_CraftingIngredient_classes.hpp"
#include "SDK/FN_CraftingIngredient_parameters.hpp"
#include "SDK/FN_EFortUIThemeColor_structs.hpp"
#include "SDK/FN_EFortUIThemeColor_classes.hpp"
#include "SDK/FN_EFortUIThemeColor_parameters.hpp"
#include "SDK/FN_ColorLibrary_structs.hpp"
#include "SDK/FN_ColorLibrary_classes.hpp"
#include "SDK/FN_ColorLibrary_parameters.hpp"
#include "SDK/FN_Tooltip-Item_structs.hpp"
#include "SDK/FN_Tooltip-Item_classes.hpp"
#include "SDK/FN_Tooltip-Item_parameters.hpp"
#include "SDK/FN_Item_TierStar_structs.hpp"
#include "SDK/FN_Item_TierStar_classes.hpp"
#include "SDK/FN_Item_TierStar_parameters.hpp"
#include "SDK/FN_StatNumericTextBlock_structs.hpp"
#include "SDK/FN_StatNumericTextBlock_classes.hpp"
#include "SDK/FN_StatNumericTextBlock_parameters.hpp"
#include "SDK/FN_PerkWidget_structs.hpp"
#include "SDK/FN_PerkWidget_classes.hpp"
#include "SDK/FN_PerkWidget_parameters.hpp"
#include "SDK/FN_Tooltip-BasicMultiLine-S_structs.hpp"
#include "SDK/FN_Tooltip-BasicMultiLine-S_classes.hpp"
#include "SDK/FN_Tooltip-BasicMultiLine-S_parameters.hpp"
#include "SDK/FN_SquadSlotItemPickerTileButton_structs.hpp"
#include "SDK/FN_SquadSlotItemPickerTileButton_classes.hpp"
#include "SDK/FN_SquadSlotItemPickerTileButton_parameters.hpp"
#include "SDK/FN_E_OutlanderFragmentTypes_structs.hpp"
#include "SDK/FN_E_OutlanderFragmentTypes_classes.hpp"
#include "SDK/FN_E_OutlanderFragmentTypes_parameters.hpp"
#include "SDK/FN_ItemDurabilityMeter_structs.hpp"
#include "SDK/FN_ItemDurabilityMeter_classes.hpp"
#include "SDK/FN_ItemDurabilityMeter_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-HUD-StaminaBarMax_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-HUD-StaminaBarMax_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-HUD-StaminaBarMax_parameters.hpp"
#include "SDK/FN_SquadSlotItemPicker_structs.hpp"
#include "SDK/FN_SquadSlotItemPicker_classes.hpp"
#include "SDK/FN_SquadSlotItemPicker_parameters.hpp"
#include "SDK/FN_SquadIcon_structs.hpp"
#include "SDK/FN_SquadIcon_classes.hpp"
#include "SDK/FN_SquadIcon_parameters.hpp"
#include "SDK/FN_TooltipStatWrapper_structs.hpp"
#include "SDK/FN_TooltipStatWrapper_classes.hpp"
#include "SDK/FN_TooltipStatWrapper_parameters.hpp"
#include "SDK/FN_IconTextButton_structs.hpp"
#include "SDK/FN_IconTextButton_classes.hpp"
#include "SDK/FN_IconTextButton_parameters.hpp"
#include "SDK/FN_BP_FortExpeditionMasterWidget_structs.hpp"
#include "SDK/FN_BP_FortExpeditionMasterWidget_classes.hpp"
#include "SDK/FN_BP_FortExpeditionMasterWidget_parameters.hpp"
#include "SDK/FN_HeroCoreStat_structs.hpp"
#include "SDK/FN_HeroCoreStat_classes.hpp"
#include "SDK/FN_HeroCoreStat_parameters.hpp"
#include "SDK/FN_BP_FortExpeditionListView_structs.hpp"
#include "SDK/FN_BP_FortExpeditionListView_classes.hpp"
#include "SDK/FN_BP_FortExpeditionListView_parameters.hpp"
#include "SDK/FN_TooltipStatWidget_structs.hpp"
#include "SDK/FN_TooltipStatWidget_classes.hpp"
#include "SDK/FN_TooltipStatWidget_parameters.hpp"
#include "SDK/FN_TooltipLibrary_structs.hpp"
#include "SDK/FN_TooltipLibrary_classes.hpp"
#include "SDK/FN_TooltipLibrary_parameters.hpp"
#include "SDK/FN_Tooltip-CoreStat_structs.hpp"
#include "SDK/FN_Tooltip-CoreStat_classes.hpp"
#include "SDK/FN_Tooltip-CoreStat_parameters.hpp"
#include "SDK/FN_HorizontalTabList_structs.hpp"
#include "SDK/FN_HorizontalTabList_classes.hpp"
#include "SDK/FN_HorizontalTabList_parameters.hpp"
#include "SDK/FN_ItemStackCounter_structs.hpp"
#include "SDK/FN_ItemStackCounter_classes.hpp"
#include "SDK/FN_ItemStackCounter_parameters.hpp"
#include "SDK/FN_ItemTooltipContent_structs.hpp"
#include "SDK/FN_ItemTooltipContent_classes.hpp"
#include "SDK/FN_ItemTooltipContent_parameters.hpp"
#include "SDK/FN_LegacyAlterationGroup_Widget_structs.hpp"
#include "SDK/FN_LegacyAlterationGroup_Widget_classes.hpp"
#include "SDK/FN_LegacyAlterationGroup_Widget_parameters.hpp"
#include "SDK/FN_LegacyAlteration_Widget_structs.hpp"
#include "SDK/FN_LegacyAlteration_Widget_classes.hpp"
#include "SDK/FN_LegacyAlteration_Widget_parameters.hpp"
#include "SDK/FN_LegacyPerksWidget_structs.hpp"
#include "SDK/FN_LegacyPerksWidget_classes.hpp"
#include "SDK/FN_LegacyPerksWidget_parameters.hpp"
#include "SDK/FN_WorkerTooltipStatsWidget_structs.hpp"
#include "SDK/FN_WorkerTooltipStatsWidget_classes.hpp"
#include "SDK/FN_WorkerTooltipStatsWidget_parameters.hpp"
#include "SDK/FN_SlotLibrary_structs.hpp"
#include "SDK/FN_SlotLibrary_classes.hpp"
#include "SDK/FN_SlotLibrary_parameters.hpp"
#include "SDK/FN_LegacyPerkTierWidget_structs.hpp"
#include "SDK/FN_LegacyPerkTierWidget_classes.hpp"
#include "SDK/FN_LegacyPerkTierWidget_parameters.hpp"
#include "SDK/FN_ItemUIFunctionLibrary_structs.hpp"
#include "SDK/FN_ItemUIFunctionLibrary_classes.hpp"
#include "SDK/FN_ItemUIFunctionLibrary_parameters.hpp"
#include "SDK/FN_TooltipDurabilityMeter_structs.hpp"
#include "SDK/FN_TooltipDurabilityMeter_classes.hpp"
#include "SDK/FN_TooltipDurabilityMeter_parameters.hpp"
#include "SDK/FN_FortUIStylesheet_structs.hpp"
#include "SDK/FN_FortUIStylesheet_classes.hpp"
#include "SDK/FN_FortUIStylesheet_parameters.hpp"
#include "SDK/FN_LegacyBasicGradientFill_structs.hpp"
#include "SDK/FN_LegacyBasicGradientFill_classes.hpp"
#include "SDK/FN_LegacyBasicGradientFill_parameters.hpp"
#include "SDK/FN_Tooltip-DisplayAttribute_structs.hpp"
#include "SDK/FN_Tooltip-DisplayAttribute_classes.hpp"
#include "SDK/FN_Tooltip-DisplayAttribute_parameters.hpp"
#include "SDK/FN_PBWA_BG_Archway_structs.hpp"
#include "SDK/FN_PBWA_BG_Archway_classes.hpp"
#include "SDK/FN_PBWA_BG_Archway_parameters.hpp"
#include "SDK/FN_PBWA_BG_ArchwayLarge_structs.hpp"
#include "SDK/FN_PBWA_BG_ArchwayLarge_classes.hpp"
#include "SDK/FN_PBWA_BG_ArchwayLarge_parameters.hpp"
#include "SDK/FN_PBWA_BG_ArchwayLargeSupport_structs.hpp"
#include "SDK/FN_PBWA_BG_ArchwayLargeSupport_classes.hpp"
#include "SDK/FN_PBWA_BG_ArchwayLargeSupport_parameters.hpp"
#include "SDK/FN_PBWA_BG_BalconyD_structs.hpp"
#include "SDK/FN_PBWA_BG_BalconyD_classes.hpp"
#include "SDK/FN_PBWA_BG_BalconyD_parameters.hpp"
#include "SDK/FN_PBWA_BG_BalconyI_structs.hpp"
#include "SDK/FN_PBWA_BG_BalconyI_classes.hpp"
#include "SDK/FN_PBWA_BG_BalconyI_parameters.hpp"
#include "SDK/FN_PBWA_BG_BalconyO_structs.hpp"
#include "SDK/FN_PBWA_BG_BalconyO_classes.hpp"
#include "SDK/FN_PBWA_BG_BalconyO_parameters.hpp"
#include "SDK/FN_PBWA_BG_BalconyS_structs.hpp"
#include "SDK/FN_PBWA_BG_BalconyS_classes.hpp"
#include "SDK/FN_PBWA_BG_BalconyS_parameters.hpp"
#include "SDK/FN_PBWA_BG_Brace_structs.hpp"
#include "SDK/FN_PBWA_BG_Brace_classes.hpp"
#include "SDK/FN_PBWA_BG_Brace_parameters.hpp"
#include "SDK/FN_PBWA_BG_Floor_structs.hpp"
#include "SDK/FN_PBWA_BG_Floor_classes.hpp"
#include "SDK/FN_PBWA_BG_Floor_parameters.hpp"
#include "SDK/FN_PBWA_BG_HalfWall_structs.hpp"
#include "SDK/FN_PBWA_BG_HalfWall_classes.hpp"
#include "SDK/FN_PBWA_BG_HalfWall_parameters.hpp"
#include "SDK/FN_PBWA_BG_HalfWallDoor_structs.hpp"
#include "SDK/FN_PBWA_BG_HalfWallDoor_classes.hpp"
#include "SDK/FN_PBWA_BG_HalfWallDoor_parameters.hpp"
#include "SDK/FN_PBWA_BG_HalfWallDoorS_structs.hpp"
#include "SDK/FN_PBWA_BG_HalfWallDoorS_classes.hpp"
#include "SDK/FN_PBWA_BG_HalfWallDoorS_parameters.hpp"
#include "SDK/FN_PBWA_BG_HalfWallHalf_structs.hpp"
#include "SDK/FN_PBWA_BG_HalfWallHalf_classes.hpp"
#include "SDK/FN_PBWA_BG_HalfWallHalf_parameters.hpp"
#include "SDK/FN_PBWA_BG_QuarterWallHalf_structs.hpp"
#include "SDK/FN_PBWA_BG_QuarterWallHalf_classes.hpp"
#include "SDK/FN_PBWA_BG_QuarterWallHalf_parameters.hpp"
#include "SDK/FN_PBWA_BG_QuarterWallS_structs.hpp"
#include "SDK/FN_PBWA_BG_QuarterWallS_classes.hpp"
#include "SDK/FN_PBWA_BG_QuarterWallS_parameters.hpp"
#include "SDK/FN_PBWA_BG_RoofC_structs.hpp"
#include "SDK/FN_PBWA_BG_RoofC_classes.hpp"
#include "SDK/FN_PBWA_BG_RoofC_parameters.hpp"
#include "SDK/FN_PBWA_BG_RoofD_structs.hpp"
#include "SDK/FN_PBWA_BG_RoofD_classes.hpp"
#include "SDK/FN_PBWA_BG_RoofD_parameters.hpp"
#include "SDK/FN_PBWA_BG_RoofI_structs.hpp"
#include "SDK/FN_PBWA_BG_RoofI_classes.hpp"
#include "SDK/FN_PBWA_BG_RoofI_parameters.hpp"
#include "SDK/FN_PBWA_BG_RoofO_structs.hpp"
#include "SDK/FN_PBWA_BG_RoofO_classes.hpp"
#include "SDK/FN_PBWA_BG_RoofO_parameters.hpp"
#include "SDK/FN_PBWA_BG_RoofS_structs.hpp"
#include "SDK/FN_PBWA_BG_RoofS_classes.hpp"
#include "SDK/FN_PBWA_BG_RoofS_parameters.hpp"
#include "SDK/FN_PBWA_BG_RoofWall_structs.hpp"
#include "SDK/FN_PBWA_BG_RoofWall_classes.hpp"
#include "SDK/FN_PBWA_BG_RoofWall_parameters.hpp"
#include "SDK/FN_PBWA_BG_StairF_structs.hpp"
#include "SDK/FN_PBWA_BG_StairF_classes.hpp"
#include "SDK/FN_PBWA_BG_StairF_parameters.hpp"
#include "SDK/FN_PBWA_BG_StairR_structs.hpp"
#include "SDK/FN_PBWA_BG_StairR_classes.hpp"
#include "SDK/FN_PBWA_BG_StairR_parameters.hpp"
#include "SDK/FN_PBWA_BG_StairT_structs.hpp"
#include "SDK/FN_PBWA_BG_StairT_classes.hpp"
#include "SDK/FN_PBWA_BG_StairT_parameters.hpp"
#include "SDK/FN_PBWA_BG_StairW_structs.hpp"
#include "SDK/FN_PBWA_BG_StairW_classes.hpp"
#include "SDK/FN_PBWA_BG_StairW_parameters.hpp"
#include "SDK/FN_PBW_BP_Parent_structs.hpp"
#include "SDK/FN_PBW_BP_Parent_classes.hpp"
#include "SDK/FN_PBW_BP_Parent_parameters.hpp"
#include "SDK/FN_PBWA_M1_Archway_structs.hpp"
#include "SDK/FN_PBWA_M1_Archway_classes.hpp"
#include "SDK/FN_PBWA_M1_Archway_parameters.hpp"
#include "SDK/FN_PBWA_M1_ArchwayLarge_structs.hpp"
#include "SDK/FN_PBWA_M1_ArchwayLarge_classes.hpp"
#include "SDK/FN_PBWA_M1_ArchwayLarge_parameters.hpp"
#include "SDK/FN_PBWA_M1_ArchwayLargeSupport_structs.hpp"
#include "SDK/FN_PBWA_M1_ArchwayLargeSupport_classes.hpp"
#include "SDK/FN_PBWA_M1_ArchwayLargeSupport_parameters.hpp"
#include "SDK/FN_PBWA_M1_BalconyD_structs.hpp"
#include "SDK/FN_PBWA_M1_BalconyD_classes.hpp"
#include "SDK/FN_PBWA_M1_BalconyD_parameters.hpp"
#include "SDK/FN_PBWA_M1_BalconyI_structs.hpp"
#include "SDK/FN_PBWA_M1_BalconyI_classes.hpp"
#include "SDK/FN_PBWA_M1_BalconyI_parameters.hpp"
#include "SDK/FN_PBWA_M1_BalconyO_structs.hpp"
#include "SDK/FN_PBWA_M1_BalconyO_classes.hpp"
#include "SDK/FN_PBWA_M1_BalconyO_parameters.hpp"
#include "SDK/FN_PBWA_M1_BalconyS_structs.hpp"
#include "SDK/FN_PBWA_M1_BalconyS_classes.hpp"
#include "SDK/FN_PBWA_M1_BalconyS_parameters.hpp"
#include "SDK/FN_PBWA_M1_Brace_structs.hpp"
#include "SDK/FN_PBWA_M1_Brace_classes.hpp"
#include "SDK/FN_PBWA_M1_Brace_parameters.hpp"
#include "SDK/FN_PBWA_M1_Floor_structs.hpp"
#include "SDK/FN_PBWA_M1_Floor_classes.hpp"
#include "SDK/FN_PBWA_M1_Floor_parameters.hpp"
#include "SDK/FN_PBWA_M1_HalfWall_structs.hpp"
#include "SDK/FN_PBWA_M1_HalfWall_classes.hpp"
#include "SDK/FN_PBWA_M1_HalfWall_parameters.hpp"
#include "SDK/FN_PBWA_M1_HalfWallDoor_structs.hpp"
#include "SDK/FN_PBWA_M1_HalfWallDoor_classes.hpp"
#include "SDK/FN_PBWA_M1_HalfWallDoor_parameters.hpp"
#include "SDK/FN_PBWA_M1_HalfWallDoorS_structs.hpp"
#include "SDK/FN_PBWA_M1_HalfWallDoorS_classes.hpp"
#include "SDK/FN_PBWA_M1_HalfWallDoorS_parameters.hpp"
#include "SDK/FN_PBWA_M1_HalfWallHalf_structs.hpp"
#include "SDK/FN_PBWA_M1_HalfWallHalf_classes.hpp"
#include "SDK/FN_PBWA_M1_HalfWallHalf_parameters.hpp"
#include "SDK/FN_PBWA_M1_Pillar_structs.hpp"
#include "SDK/FN_PBWA_M1_Pillar_classes.hpp"
#include "SDK/FN_PBWA_M1_Pillar_parameters.hpp"
#include "SDK/FN_PBWA_M1_QuarterWallHalf_structs.hpp"
#include "SDK/FN_PBWA_M1_QuarterWallHalf_classes.hpp"
#include "SDK/FN_PBWA_M1_QuarterWallHalf_parameters.hpp"
#include "SDK/FN_PBWA_M1_QuarterWallS_structs.hpp"
#include "SDK/FN_PBWA_M1_QuarterWallS_classes.hpp"
#include "SDK/FN_PBWA_M1_QuarterWallS_parameters.hpp"
#include "SDK/FN_PBWA_M1_RoofC_structs.hpp"
#include "SDK/FN_PBWA_M1_RoofC_classes.hpp"
#include "SDK/FN_PBWA_M1_RoofC_parameters.hpp"
#include "SDK/FN_PBWA_M1_RoofD_structs.hpp"
#include "SDK/FN_PBWA_M1_RoofD_classes.hpp"
#include "SDK/FN_PBWA_M1_RoofD_parameters.hpp"
#include "SDK/FN_PBWA_M1_RoofI_structs.hpp"
#include "SDK/FN_PBWA_M1_RoofI_classes.hpp"
#include "SDK/FN_PBWA_M1_RoofI_parameters.hpp"
#include "SDK/FN_PBWA_M1_RoofO_structs.hpp"
#include "SDK/FN_PBWA_M1_RoofO_classes.hpp"
#include "SDK/FN_PBWA_M1_RoofO_parameters.hpp"
#include "SDK/FN_PBWA_M1_RoofS_structs.hpp"
#include "SDK/FN_PBWA_M1_RoofS_classes.hpp"
#include "SDK/FN_PBWA_M1_RoofS_parameters.hpp"
#include "SDK/FN_PBWA_M1_RoofWall_structs.hpp"
#include "SDK/FN_PBWA_M1_RoofWall_classes.hpp"
#include "SDK/FN_PBWA_M1_RoofWall_parameters.hpp"
#include "SDK/FN_PBWA_M1_StairF_structs.hpp"
#include "SDK/FN_PBWA_M1_StairF_classes.hpp"
#include "SDK/FN_PBWA_M1_StairF_parameters.hpp"
#include "SDK/FN_PBWA_M1_StairR_structs.hpp"
#include "SDK/FN_PBWA_M1_StairR_classes.hpp"
#include "SDK/FN_PBWA_M1_StairR_parameters.hpp"
#include "SDK/FN_PBWA_M1_StairT_structs.hpp"
#include "SDK/FN_PBWA_M1_StairT_classes.hpp"
#include "SDK/FN_PBWA_M1_StairT_parameters.hpp"
#include "SDK/FN_PBWA_M1_StairW_structs.hpp"
#include "SDK/FN_PBWA_M1_StairW_classes.hpp"
#include "SDK/FN_PBWA_M1_StairW_parameters.hpp"
#include "SDK/FN_PBWA_S1_Archway_structs.hpp"
#include "SDK/FN_PBWA_S1_Archway_classes.hpp"
#include "SDK/FN_PBWA_S1_Archway_parameters.hpp"
#include "SDK/FN_PBWA_S1_ArchwayLarge_structs.hpp"
#include "SDK/FN_PBWA_S1_ArchwayLarge_classes.hpp"
#include "SDK/FN_PBWA_S1_ArchwayLarge_parameters.hpp"
#include "SDK/FN_PBWA_S1_ArchwayLargeSupport_structs.hpp"
#include "SDK/FN_PBWA_S1_ArchwayLargeSupport_classes.hpp"
#include "SDK/FN_PBWA_S1_ArchwayLargeSupport_parameters.hpp"
#include "SDK/FN_PBWA_S1_BalconyD_structs.hpp"
#include "SDK/FN_PBWA_S1_BalconyD_classes.hpp"
#include "SDK/FN_PBWA_S1_BalconyD_parameters.hpp"
#include "SDK/FN_PBWA_S1_BalconyI_structs.hpp"
#include "SDK/FN_PBWA_S1_BalconyI_classes.hpp"
#include "SDK/FN_PBWA_S1_BalconyI_parameters.hpp"
#include "SDK/FN_PBWA_S1_BalconyO_structs.hpp"
#include "SDK/FN_PBWA_S1_BalconyO_classes.hpp"
#include "SDK/FN_PBWA_S1_BalconyO_parameters.hpp"
#include "SDK/FN_PBWA_S1_BalconyS_structs.hpp"
#include "SDK/FN_PBWA_S1_BalconyS_classes.hpp"
#include "SDK/FN_PBWA_S1_BalconyS_parameters.hpp"
#include "SDK/FN_PBWA_S1_Brace_structs.hpp"
#include "SDK/FN_PBWA_S1_Brace_classes.hpp"
#include "SDK/FN_PBWA_S1_Brace_parameters.hpp"
#include "SDK/FN_PBWA_S1_Floor_structs.hpp"
#include "SDK/FN_PBWA_S1_Floor_classes.hpp"
#include "SDK/FN_PBWA_S1_Floor_parameters.hpp"
#include "SDK/FN_PBWA_S1_HalfWallDoor_structs.hpp"
#include "SDK/FN_PBWA_S1_HalfWallDoor_classes.hpp"
#include "SDK/FN_PBWA_S1_HalfWallDoor_parameters.hpp"
#include "SDK/FN_PBWA_S1_HalfWallDoorSide_structs.hpp"
#include "SDK/FN_PBWA_S1_HalfWallDoorSide_classes.hpp"
#include "SDK/FN_PBWA_S1_HalfWallDoorSide_parameters.hpp"
#include "SDK/FN_PBWA_S1_HalfWallHalf_structs.hpp"
#include "SDK/FN_PBWA_S1_HalfWallHalf_classes.hpp"
#include "SDK/FN_PBWA_S1_HalfWallHalf_parameters.hpp"
#include "SDK/FN_PBWA_S1_HalfWallS_structs.hpp"
#include "SDK/FN_PBWA_S1_HalfWallS_classes.hpp"
#include "SDK/FN_PBWA_S1_HalfWallS_parameters.hpp"
#include "SDK/FN_PBWA_S1_Pillar_structs.hpp"
#include "SDK/FN_PBWA_S1_Pillar_classes.hpp"
#include "SDK/FN_PBWA_S1_Pillar_parameters.hpp"
#include "SDK/FN_PBWA_S1_QuarterWallHalf_structs.hpp"
#include "SDK/FN_PBWA_S1_QuarterWallHalf_classes.hpp"
#include "SDK/FN_PBWA_S1_QuarterWallHalf_parameters.hpp"
#include "SDK/FN_PBWA_S1_QuarterWallS_structs.hpp"
#include "SDK/FN_PBWA_S1_QuarterWallS_classes.hpp"
#include "SDK/FN_PBWA_S1_QuarterWallS_parameters.hpp"
#include "SDK/FN_PBWA_S1_RoofC_structs.hpp"
#include "SDK/FN_PBWA_S1_RoofC_classes.hpp"
#include "SDK/FN_PBWA_S1_RoofC_parameters.hpp"
#include "SDK/FN_PBWA_S1_RoofD_structs.hpp"
#include "SDK/FN_PBWA_S1_RoofD_classes.hpp"
#include "SDK/FN_PBWA_S1_RoofD_parameters.hpp"
#include "SDK/FN_PBWA_S1_RoofI_structs.hpp"
#include "SDK/FN_PBWA_S1_RoofI_classes.hpp"
#include "SDK/FN_PBWA_S1_RoofI_parameters.hpp"
#include "SDK/FN_PBWA_S1_RoofO_structs.hpp"
#include "SDK/FN_PBWA_S1_RoofO_classes.hpp"
#include "SDK/FN_PBWA_S1_RoofO_parameters.hpp"
#include "SDK/FN_PBWA_S1_RoofS_structs.hpp"
#include "SDK/FN_PBWA_S1_RoofS_classes.hpp"
#include "SDK/FN_PBWA_S1_RoofS_parameters.hpp"
#include "SDK/FN_PBWA_S1_RoofWall_structs.hpp"
#include "SDK/FN_PBWA_S1_RoofWall_classes.hpp"
#include "SDK/FN_PBWA_S1_RoofWall_parameters.hpp"
#include "SDK/FN_PBWA_S1_StairF_structs.hpp"
#include "SDK/FN_PBWA_S1_StairF_classes.hpp"
#include "SDK/FN_PBWA_S1_StairF_parameters.hpp"
#include "SDK/FN_PBWA_S1_StairR_structs.hpp"
#include "SDK/FN_PBWA_S1_StairR_classes.hpp"
#include "SDK/FN_PBWA_S1_StairR_parameters.hpp"
#include "SDK/FN_PBWA_S1_StairT_structs.hpp"
#include "SDK/FN_PBWA_S1_StairT_classes.hpp"
#include "SDK/FN_PBWA_S1_StairT_parameters.hpp"
#include "SDK/FN_PBWA_S1_StairW_structs.hpp"
#include "SDK/FN_PBWA_S1_StairW_classes.hpp"
#include "SDK/FN_PBWA_S1_StairW_parameters.hpp"
#include "SDK/FN_PBWA_W1_Archway_structs.hpp"
#include "SDK/FN_PBWA_W1_Archway_classes.hpp"
#include "SDK/FN_PBWA_W1_Archway_parameters.hpp"
#include "SDK/FN_PBWA_W1_ArchwayLarge_structs.hpp"
#include "SDK/FN_PBWA_W1_ArchwayLarge_classes.hpp"
#include "SDK/FN_PBWA_W1_ArchwayLarge_parameters.hpp"
#include "SDK/FN_PBWA_W1_ArchwayLargeSupport_structs.hpp"
#include "SDK/FN_PBWA_W1_ArchwayLargeSupport_classes.hpp"
#include "SDK/FN_PBWA_W1_ArchwayLargeSupport_parameters.hpp"
#include "SDK/FN_PBWA_W1_BalconyD_structs.hpp"
#include "SDK/FN_PBWA_W1_BalconyD_classes.hpp"
#include "SDK/FN_PBWA_W1_BalconyD_parameters.hpp"
#include "SDK/FN_PBWA_W1_BalconyI_structs.hpp"
#include "SDK/FN_PBWA_W1_BalconyI_classes.hpp"
#include "SDK/FN_PBWA_W1_BalconyI_parameters.hpp"
#include "SDK/FN_PBWA_W1_BalconyO_structs.hpp"
#include "SDK/FN_PBWA_W1_BalconyO_classes.hpp"
#include "SDK/FN_PBWA_W1_BalconyO_parameters.hpp"
#include "SDK/FN_PBWA_W1_BalconyS_structs.hpp"
#include "SDK/FN_PBWA_W1_BalconyS_classes.hpp"
#include "SDK/FN_PBWA_W1_BalconyS_parameters.hpp"
#include "SDK/FN_PBWA_W1_Brace_structs.hpp"
#include "SDK/FN_PBWA_W1_Brace_classes.hpp"
#include "SDK/FN_PBWA_W1_Brace_parameters.hpp"
#include "SDK/FN_PBWA_W1_Floor_structs.hpp"
#include "SDK/FN_PBWA_W1_Floor_classes.hpp"
#include "SDK/FN_PBWA_W1_Floor_parameters.hpp"
#include "SDK/FN_PBWA_W1_HalfWallDoor_structs.hpp"
#include "SDK/FN_PBWA_W1_HalfWallDoor_classes.hpp"
#include "SDK/FN_PBWA_W1_HalfWallDoor_parameters.hpp"
#include "SDK/FN_PBWA_W1_HalfWallDoorS_structs.hpp"
#include "SDK/FN_PBWA_W1_HalfWallDoorS_classes.hpp"
#include "SDK/FN_PBWA_W1_HalfWallDoorS_parameters.hpp"
#include "SDK/FN_PBWA_W1_HalfWallHalf_structs.hpp"
#include "SDK/FN_PBWA_W1_HalfWallHalf_classes.hpp"
#include "SDK/FN_PBWA_W1_HalfWallHalf_parameters.hpp"
#include "SDK/FN_PBWA_W1_HalfWallS_structs.hpp"
#include "SDK/FN_PBWA_W1_HalfWallS_classes.hpp"
#include "SDK/FN_PBWA_W1_HalfWallS_parameters.hpp"
#include "SDK/FN_PBWA_W1_Pillar_structs.hpp"
#include "SDK/FN_PBWA_W1_Pillar_classes.hpp"
#include "SDK/FN_PBWA_W1_Pillar_parameters.hpp"
#include "SDK/FN_PBWA_W1_QuarterWallHalf_structs.hpp"
#include "SDK/FN_PBWA_W1_QuarterWallHalf_classes.hpp"
#include "SDK/FN_PBWA_W1_QuarterWallHalf_parameters.hpp"
#include "SDK/FN_PBWA_W1_QuarterWallS_structs.hpp"
#include "SDK/FN_PBWA_W1_QuarterWallS_classes.hpp"
#include "SDK/FN_PBWA_W1_QuarterWallS_parameters.hpp"
#include "SDK/FN_PBWA_W1_RoofC_structs.hpp"
#include "SDK/FN_PBWA_W1_RoofC_classes.hpp"
#include "SDK/FN_PBWA_W1_RoofC_parameters.hpp"
#include "SDK/FN_PBWA_W1_RoofD_structs.hpp"
#include "SDK/FN_PBWA_W1_RoofD_classes.hpp"
#include "SDK/FN_PBWA_W1_RoofD_parameters.hpp"
#include "SDK/FN_PBWA_W1_RoofI_structs.hpp"
#include "SDK/FN_PBWA_W1_RoofI_classes.hpp"
#include "SDK/FN_PBWA_W1_RoofI_parameters.hpp"
#include "SDK/FN_PBWA_W1_RoofO_structs.hpp"
#include "SDK/FN_PBWA_W1_RoofO_classes.hpp"
#include "SDK/FN_PBWA_W1_RoofO_parameters.hpp"
#include "SDK/FN_PBWA_W1_RoofS_structs.hpp"
#include "SDK/FN_PBWA_W1_RoofS_classes.hpp"
#include "SDK/FN_PBWA_W1_RoofS_parameters.hpp"
#include "SDK/FN_PBWA_W1_RoofWall_structs.hpp"
#include "SDK/FN_PBWA_W1_RoofWall_classes.hpp"
#include "SDK/FN_PBWA_W1_RoofWall_parameters.hpp"
#include "SDK/FN_PBWA_W1_StairF_structs.hpp"
#include "SDK/FN_PBWA_W1_StairF_classes.hpp"
#include "SDK/FN_PBWA_W1_StairF_parameters.hpp"
#include "SDK/FN_PBWA_W1_StairR_structs.hpp"
#include "SDK/FN_PBWA_W1_StairR_classes.hpp"
#include "SDK/FN_PBWA_W1_StairR_parameters.hpp"
#include "SDK/FN_PBWA_W1_StairT_structs.hpp"
#include "SDK/FN_PBWA_W1_StairT_classes.hpp"
#include "SDK/FN_PBWA_W1_StairT_parameters.hpp"
#include "SDK/FN_PBWA_W1_StairW_structs.hpp"
#include "SDK/FN_PBWA_W1_StairW_classes.hpp"
#include "SDK/FN_PBWA_W1_StairW_parameters.hpp"
#include "SDK/FN_BP_ZT_Survival_structs.hpp"
#include "SDK/FN_BP_ZT_Survival_classes.hpp"
#include "SDK/FN_BP_ZT_Survival_parameters.hpp"
#include "SDK/FN_BP_ZT_CriticalMission_structs.hpp"
#include "SDK/FN_BP_ZT_CriticalMission_classes.hpp"
#include "SDK/FN_BP_ZT_CriticalMission_parameters.hpp"
#include "SDK/FN_BP_ZT_BuildTheBase_structs.hpp"
#include "SDK/FN_BP_ZT_BuildTheBase_classes.hpp"
#include "SDK/FN_BP_ZT_BuildTheBase_parameters.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Canny_H_structs.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Canny_H_classes.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Canny_H_parameters.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Canny_L_structs.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Canny_L_classes.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Canny_L_parameters.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Canny_M_structs.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Canny_M_classes.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Canny_M_parameters.hpp"
#include "SDK/FN_DoorMetaObstacle_structs.hpp"
#include "SDK/FN_DoorMetaObstacle_classes.hpp"
#include "SDK/FN_DoorMetaObstacle_parameters.hpp"
#include "SDK/FN_NavFilter_MissionBots_structs.hpp"
#include "SDK/FN_NavFilter_MissionBots_classes.hpp"
#include "SDK/FN_NavFilter_MissionBots_parameters.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Canny_VH_structs.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Canny_VH_classes.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Canny_VH_parameters.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Canny_VL_structs.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Canny_VL_classes.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Canny_VL_parameters.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Plank_H_structs.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Plank_H_classes.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Plank_H_parameters.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Plank_L_structs.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Plank_L_classes.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Plank_L_parameters.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Plank_M_structs.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Plank_M_classes.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Plank_M_parameters.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Plank_VH_structs.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Plank_VH_classes.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Plank_VH_parameters.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Plank_VL_structs.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Plank_VL_classes.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Plank_VL_parameters.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_SW_H_structs.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_SW_H_classes.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_SW_H_parameters.hpp"
#include "SDK/FN_En_SplineForwardAxes_01_structs.hpp"
#include "SDK/FN_En_SplineForwardAxes_01_classes.hpp"
#include "SDK/FN_En_SplineForwardAxes_01_parameters.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_SW_M_structs.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_SW_M_classes.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_SW_M_parameters.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_SW_VH_structs.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_SW_VH_classes.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_SW_VH_parameters.hpp"
#include "SDK/FN_E_Outlander_FragmentTypes_structs.hpp"
#include "SDK/FN_E_Outlander_FragmentTypes_classes.hpp"
#include "SDK/FN_E_Outlander_FragmentTypes_parameters.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Twine_structs.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Twine_classes.hpp"
#include "SDK/FN_BP_ZT_ChallengeTheHorde_Twine_parameters.hpp"
#include "SDK/FN_BP_ZT_Athena_structs.hpp"
#include "SDK/FN_BP_ZT_Athena_classes.hpp"
#include "SDK/FN_BP_ZT_Athena_parameters.hpp"
#include "SDK/FN_BP_ZT_Athena_Faceoff_structs.hpp"
#include "SDK/FN_BP_ZT_Athena_Faceoff_classes.hpp"
#include "SDK/FN_BP_ZT_Athena_Faceoff_parameters.hpp"
#include "SDK/FN_BP_SplineVolumeTrail_v1b_structs.hpp"
#include "SDK/FN_BP_SplineVolumeTrail_v1b_classes.hpp"
#include "SDK/FN_BP_SplineVolumeTrail_v1b_parameters.hpp"
#include "SDK/FN_B_Fragment_Container_structs.hpp"
#include "SDK/FN_B_Fragment_Container_classes.hpp"
#include "SDK/FN_B_Fragment_Container_parameters.hpp"
#include "SDK/FN_B_AntiMatCharge_CameraShake_structs.hpp"
#include "SDK/FN_B_AntiMatCharge_CameraShake_classes.hpp"
#include "SDK/FN_B_AntiMatCharge_CameraShake_parameters.hpp"
#include "SDK/FN_CameraShake_AntiMaterialCharge_FullyCharged_structs.hpp"
#include "SDK/FN_CameraShake_AntiMaterialCharge_FullyCharged_classes.hpp"
#include "SDK/FN_CameraShake_AntiMaterialCharge_FullyCharged_parameters.hpp"
#include "SDK/FN_BP_ZT_Athena_Streaming_structs.hpp"
#include "SDK/FN_BP_ZT_Athena_Streaming_classes.hpp"
#include "SDK/FN_BP_ZT_Athena_Streaming_parameters.hpp"
#include "SDK/FN_BP_ZT_TheOutpost_PvE_04_structs.hpp"
#include "SDK/FN_BP_ZT_TheOutpost_PvE_04_classes.hpp"
#include "SDK/FN_BP_ZT_TheOutpost_PvE_04_parameters.hpp"
#include "SDK/FN_FortMetaNavAreaDef_structs.hpp"
#include "SDK/FN_FortMetaNavAreaDef_classes.hpp"
#include "SDK/FN_FortMetaNavAreaDef_parameters.hpp"
#include "SDK/FN_NavLink_Floor_structs.hpp"
#include "SDK/FN_NavLink_Floor_classes.hpp"
#include "SDK/FN_NavLink_Floor_parameters.hpp"
#include "SDK/FN_NavLink_RoofC_structs.hpp"
#include "SDK/FN_NavLink_RoofC_classes.hpp"
#include "SDK/FN_NavLink_RoofC_parameters.hpp"
#include "SDK/FN_MissionBotPawn_structs.hpp"
#include "SDK/FN_MissionBotPawn_classes.hpp"
#include "SDK/FN_MissionBotPawn_parameters.hpp"
#include "SDK/FN_DefenderAnimBlueprint_structs.hpp"
#include "SDK/FN_DefenderAnimBlueprint_classes.hpp"
#include "SDK/FN_DefenderAnimBlueprint_parameters.hpp"
#include "SDK/FN_HuskStrength00_structs.hpp"
#include "SDK/FN_HuskStrength00_classes.hpp"
#include "SDK/FN_HuskStrength00_parameters.hpp"
#include "SDK/FN_GET_MoveSpeed_structs.hpp"
#include "SDK/FN_GET_MoveSpeed_classes.hpp"
#include "SDK/FN_GET_MoveSpeed_parameters.hpp"
#include "SDK/FN_HuskStrength01_structs.hpp"
#include "SDK/FN_HuskStrength01_classes.hpp"
#include "SDK/FN_HuskStrength01_parameters.hpp"
#include "SDK/FN_HuskStrength02_structs.hpp"
#include "SDK/FN_HuskStrength02_classes.hpp"
#include "SDK/FN_HuskStrength02_parameters.hpp"
#include "SDK/FN_BluGlow_MorphAnimation_structs.hpp"
#include "SDK/FN_BluGlow_MorphAnimation_classes.hpp"
#include "SDK/FN_BluGlow_MorphAnimation_parameters.hpp"
#include "SDK/FN_Tooltip-DescriptionText_structs.hpp"
#include "SDK/FN_Tooltip-DescriptionText_classes.hpp"
#include "SDK/FN_Tooltip-DescriptionText_parameters.hpp"
#include "SDK/FN_GE_Outlander_FragmentTeamSpeedBoost_structs.hpp"
#include "SDK/FN_GE_Outlander_FragmentTeamSpeedBoost_classes.hpp"
#include "SDK/FN_GE_Outlander_FragmentTeamSpeedBoost_parameters.hpp"
#include "SDK/FN_GE_Outlander_LlamaFragment_structs.hpp"
#include "SDK/FN_GE_Outlander_LlamaFragment_classes.hpp"
#include "SDK/FN_GE_Outlander_LlamaFragment_parameters.hpp"
#include "SDK/FN_HuskStrength03_structs.hpp"
#include "SDK/FN_HuskStrength03_classes.hpp"
#include "SDK/FN_HuskStrength03_parameters.hpp"
#include "SDK/FN_LegacyRatingWidget_structs.hpp"
#include "SDK/FN_LegacyRatingWidget_classes.hpp"
#include "SDK/FN_LegacyRatingWidget_parameters.hpp"
#include "SDK/FN_BluGloRequestHandler_structs.hpp"
#include "SDK/FN_BluGloRequestHandler_classes.hpp"
#include "SDK/FN_BluGloRequestHandler_parameters.hpp"
#include "SDK/FN_ButtonStyle-RatingWidget_structs.hpp"
#include "SDK/FN_ButtonStyle-RatingWidget_classes.hpp"
#include "SDK/FN_ButtonStyle-RatingWidget_parameters.hpp"
#include "SDK/FN_TooltipIngredientList_structs.hpp"
#include "SDK/FN_TooltipIngredientList_classes.hpp"
#include "SDK/FN_TooltipIngredientList_parameters.hpp"
#include "SDK/FN_HuskStrength04_structs.hpp"
#include "SDK/FN_HuskStrength04_classes.hpp"
#include "SDK/FN_HuskStrength04_parameters.hpp"
#include "SDK/FN_StyleLibrary_structs.hpp"
#include "SDK/FN_StyleLibrary_classes.hpp"
#include "SDK/FN_StyleLibrary_parameters.hpp"
#include "SDK/FN_HuskStrength05_structs.hpp"
#include "SDK/FN_HuskStrength05_classes.hpp"
#include "SDK/FN_HuskStrength05_parameters.hpp"
#include "SDK/FN_HuskStrength06_structs.hpp"
#include "SDK/FN_HuskStrength06_classes.hpp"
#include "SDK/FN_HuskStrength06_parameters.hpp"
#include "SDK/FN_Border-ItemInfoHeader_BrightBar_structs.hpp"
#include "SDK/FN_Border-ItemInfoHeader_BrightBar_classes.hpp"
#include "SDK/FN_Border-ItemInfoHeader_BrightBar_parameters.hpp"
#include "SDK/FN_Border_HordeZoneLabel_Blue_structs.hpp"
#include "SDK/FN_Border_HordeZoneLabel_Blue_classes.hpp"
#include "SDK/FN_Border_HordeZoneLabel_Blue_parameters.hpp"
#include "SDK/FN_HuskStrength07_structs.hpp"
#include "SDK/FN_HuskStrength07_classes.hpp"
#include "SDK/FN_HuskStrength07_parameters.hpp"
#include "SDK/FN_HuskStrength08_structs.hpp"
#include "SDK/FN_HuskStrength08_classes.hpp"
#include "SDK/FN_HuskStrength08_parameters.hpp"
#include "SDK/FN_HuskStrength09_structs.hpp"
#include "SDK/FN_HuskStrength09_classes.hpp"
#include "SDK/FN_HuskStrength09_parameters.hpp"
#include "SDK/FN_HuskStrength10_structs.hpp"
#include "SDK/FN_HuskStrength10_classes.hpp"
#include "SDK/FN_HuskStrength10_parameters.hpp"
#include "SDK/FN_Border_HordeZoneLabel_Green_structs.hpp"
#include "SDK/FN_Border_HordeZoneLabel_Green_classes.hpp"
#include "SDK/FN_Border_HordeZoneLabel_Green_parameters.hpp"
#include "SDK/FN_PlayerPawn_Generic_Parent_structs.hpp"
#include "SDK/FN_PlayerPawn_Generic_Parent_classes.hpp"
#include "SDK/FN_PlayerPawn_Generic_Parent_parameters.hpp"
#include "SDK/FN_GE_Outlander_PhaseShiftClearCD_OLD_structs.hpp"
#include "SDK/FN_GE_Outlander_PhaseShiftClearCD_OLD_classes.hpp"
#include "SDK/FN_GE_Outlander_PhaseShiftClearCD_OLD_parameters.hpp"
#include "SDK/FN_WeaponTooltipDPSWidget_structs.hpp"
#include "SDK/FN_WeaponTooltipDPSWidget_classes.hpp"
#include "SDK/FN_WeaponTooltipDPSWidget_parameters.hpp"
#include "SDK/FN_Border_HordeZoneLabel_Orange_structs.hpp"
#include "SDK/FN_Border_HordeZoneLabel_Orange_classes.hpp"
#include "SDK/FN_Border_HordeZoneLabel_Orange_parameters.hpp"
#include "SDK/FN_SkillTreeGroupColors_structs.hpp"
#include "SDK/FN_SkillTreeGroupColors_classes.hpp"
#include "SDK/FN_SkillTreeGroupColors_parameters.hpp"
#include "SDK/FN_LegacyPerkWidget_structs.hpp"
#include "SDK/FN_LegacyPerkWidget_classes.hpp"
#include "SDK/FN_LegacyPerkWidget_parameters.hpp"
#include "SDK/FN_Fortnite_M_Avg_Player_MenusScreen_AnimBP_structs.hpp"
#include "SDK/FN_Fortnite_M_Avg_Player_MenusScreen_AnimBP_classes.hpp"
#include "SDK/FN_Fortnite_M_Avg_Player_MenusScreen_AnimBP_parameters.hpp"
#include "SDK/FN_FortNavArea_JumpDown_structs.hpp"
#include "SDK/FN_FortNavArea_JumpDown_classes.hpp"
#include "SDK/FN_FortNavArea_JumpDown_parameters.hpp"
#include "SDK/FN_Border_HordeZoneLabel_Purple_structs.hpp"
#include "SDK/FN_Border_HordeZoneLabel_Purple_classes.hpp"
#include "SDK/FN_Border_HordeZoneLabel_Purple_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-40pc_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-40pc_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-40pc_parameters.hpp"
#include "SDK/FN_TextStyle-Header-XL_structs.hpp"
#include "SDK/FN_TextStyle-Header-XL_classes.hpp"
#include "SDK/FN_TextStyle-Header-XL_parameters.hpp"
#include "SDK/FN_SkillTreeGroups_structs.hpp"
#include "SDK/FN_SkillTreeGroups_classes.hpp"
#include "SDK/FN_SkillTreeGroups_parameters.hpp"
#include "SDK/FN_SkillTreeGroupBG-H_structs.hpp"
#include "SDK/FN_SkillTreeGroupBG-H_classes.hpp"
#include "SDK/FN_SkillTreeGroupBG-H_parameters.hpp"
#include "SDK/FN_SkillTreePages_structs.hpp"
#include "SDK/FN_SkillTreePages_classes.hpp"
#include "SDK/FN_SkillTreePages_parameters.hpp"
#include "SDK/FN_NodeBackground_structs.hpp"
#include "SDK/FN_NodeBackground_classes.hpp"
#include "SDK/FN_NodeBackground_parameters.hpp"
#include "SDK/FN_SkillTreepAGEColors_structs.hpp"
#include "SDK/FN_SkillTreepAGEColors_classes.hpp"
#include "SDK/FN_SkillTreepAGEColors_parameters.hpp"
#include "SDK/FN_SkillTreeGroupBG-H-Wide_structs.hpp"
#include "SDK/FN_SkillTreeGroupBG-H-Wide_classes.hpp"
#include "SDK/FN_SkillTreeGroupBG-H-Wide_parameters.hpp"
#include "SDK/FN_SkillTreeGroupBG-Vert_structs.hpp"
#include "SDK/FN_SkillTreeGroupBG-Vert_classes.hpp"
#include "SDK/FN_SkillTreeGroupBG-Vert_parameters.hpp"
#include "SDK/FN_SchematicTooltipCraftingIngredient_structs.hpp"
#include "SDK/FN_SchematicTooltipCraftingIngredient_classes.hpp"
#include "SDK/FN_SchematicTooltipCraftingIngredient_parameters.hpp"
#include "SDK/FN_DefaultSkillNodeStyle_structs.hpp"
#include "SDK/FN_DefaultSkillNodeStyle_classes.hpp"
#include "SDK/FN_DefaultSkillNodeStyle_parameters.hpp"
#include "SDK/FN_FortNavArea_JumpDownSmashable_structs.hpp"
#include "SDK/FN_FortNavArea_JumpDownSmashable_classes.hpp"
#include "SDK/FN_FortNavArea_JumpDownSmashable_parameters.hpp"
#include "SDK/FN_FortNavArea_JumpDownSmashable2_structs.hpp"
#include "SDK/FN_FortNavArea_JumpDownSmashable2_classes.hpp"
#include "SDK/FN_FortNavArea_JumpDownSmashable2_parameters.hpp"
#include "SDK/FN_FortNavArea_JumpDownSmashable3_structs.hpp"
#include "SDK/FN_FortNavArea_JumpDownSmashable3_classes.hpp"
#include "SDK/FN_FortNavArea_JumpDownSmashable3_parameters.hpp"
#include "SDK/FN_DecoTool_structs.hpp"
#include "SDK/FN_DecoTool_classes.hpp"
#include "SDK/FN_DecoTool_parameters.hpp"
#include "SDK/FN_BluGloManager_structs.hpp"
#include "SDK/FN_BluGloManager_classes.hpp"
#include "SDK/FN_BluGloManager_parameters.hpp"
#include "SDK/FN_ListOfWaterComponentsThatTheCharactersInteractingWithByIndex_structs.hpp"
#include "SDK/FN_ListOfWaterComponentsThatTheCharactersInteractingWithByIndex_classes.hpp"
#include "SDK/FN_ListOfWaterComponentsThatTheCharactersInteractingWithByIndex_parameters.hpp"
#include "SDK/FN_SkillTreeColorSetup_structs.hpp"
#include "SDK/FN_SkillTreeColorSetup_classes.hpp"
#include "SDK/FN_SkillTreeColorSetup_parameters.hpp"
#include "SDK/FN_GE_Resist_Damage_AoE_structs.hpp"
#include "SDK/FN_GE_Resist_Damage_AoE_classes.hpp"
#include "SDK/FN_GE_Resist_Damage_AoE_parameters.hpp"
#include "SDK/FN_BluGlo_Node_structs.hpp"
#include "SDK/FN_BluGlo_Node_classes.hpp"
#include "SDK/FN_BluGlo_Node_parameters.hpp"
#include "SDK/FN_Tiered_BluGlo_Parent_structs.hpp"
#include "SDK/FN_Tiered_BluGlo_Parent_classes.hpp"
#include "SDK/FN_Tiered_BluGlo_Parent_parameters.hpp"
#include "SDK/FN_TooltipHeroBonuses_structs.hpp"
#include "SDK/FN_TooltipHeroBonuses_classes.hpp"
#include "SDK/FN_TooltipHeroBonuses_parameters.hpp"
#include "SDK/FN__WaterMeshBlueprintMaster_structs.hpp"
#include "SDK/FN__WaterMeshBlueprintMaster_classes.hpp"
#include "SDK/FN__WaterMeshBlueprintMaster_parameters.hpp"
#include "SDK/FN_Direction_structs.hpp"
#include "SDK/FN_Direction_classes.hpp"
#include "SDK/FN_Direction_parameters.hpp"
#include "SDK/FN_PlayerAnimAssets_Struct_structs.hpp"
#include "SDK/FN_PlayerAnimAssets_Struct_classes.hpp"
#include "SDK/FN_PlayerAnimAssets_Struct_parameters.hpp"
#include "SDK/FN_ECardinalDirection_structs.hpp"
#include "SDK/FN_ECardinalDirection_classes.hpp"
#include "SDK/FN_ECardinalDirection_parameters.hpp"
#include "SDK/FN_Combined_Horde_structs.hpp"
#include "SDK/FN_Combined_Horde_classes.hpp"
#include "SDK/FN_Combined_Horde_parameters.hpp"
#include "SDK/FN_AnimNotify_FootStep_structs.hpp"
#include "SDK/FN_AnimNotify_FootStep_classes.hpp"
#include "SDK/FN_AnimNotify_FootStep_parameters.hpp"
#include "SDK/FN_AnimNotify_FootStep_Left_structs.hpp"
#include "SDK/FN_AnimNotify_FootStep_Left_classes.hpp"
#include "SDK/FN_AnimNotify_FootStep_Left_parameters.hpp"
#include "SDK/FN_AnimNotify_FootStep_Right_structs.hpp"
#include "SDK/FN_AnimNotify_FootStep_Right_classes.hpp"
#include "SDK/FN_AnimNotify_FootStep_Right_parameters.hpp"
#include "SDK/FN_T1_Main_structs.hpp"
#include "SDK/FN_T1_Main_classes.hpp"
#include "SDK/FN_T1_Main_parameters.hpp"
#include "SDK/FN_T1_Research_structs.hpp"
#include "SDK/FN_T1_Research_classes.hpp"
#include "SDK/FN_T1_Research_parameters.hpp"
#include "SDK/FN_BP_AnimNotify_CameraShake_structs.hpp"
#include "SDK/FN_BP_AnimNotify_CameraShake_classes.hpp"
#include "SDK/FN_BP_AnimNotify_CameraShake_parameters.hpp"
#include "SDK/FN_BP_GCSteps_structs.hpp"
#include "SDK/FN_BP_GCSteps_classes.hpp"
#include "SDK/FN_BP_GCSteps_parameters.hpp"
#include "SDK/FN_DuplicateResOutMesh_structs.hpp"
#include "SDK/FN_DuplicateResOutMesh_classes.hpp"
#include "SDK/FN_DuplicateResOutMesh_parameters.hpp"
#include "SDK/FN_En_ShellTypes_01_structs.hpp"
#include "SDK/FN_En_ShellTypes_01_classes.hpp"
#include "SDK/FN_En_ShellTypes_01_parameters.hpp"
#include "SDK/FN_T2_Horde_structs.hpp"
#include "SDK/FN_T2_Horde_classes.hpp"
#include "SDK/FN_T2_Horde_parameters.hpp"
#include "SDK/FN_AnimNotifyState_HolsterWeapon_structs.hpp"
#include "SDK/FN_AnimNotifyState_HolsterWeapon_classes.hpp"
#include "SDK/FN_AnimNotifyState_HolsterWeapon_parameters.hpp"
#include "SDK/FN_T2_Main_structs.hpp"
#include "SDK/FN_T2_Main_classes.hpp"
#include "SDK/FN_T2_Main_parameters.hpp"
#include "SDK/FN_T2_Research_structs.hpp"
#include "SDK/FN_T2_Research_classes.hpp"
#include "SDK/FN_T2_Research_parameters.hpp"
#include "SDK/FN_Button-SkillTree-L_structs.hpp"
#include "SDK/FN_Button-SkillTree-L_classes.hpp"
#include "SDK/FN_Button-SkillTree-L_parameters.hpp"
#include "SDK/FN_T3_Horde_structs.hpp"
#include "SDK/FN_T3_Horde_classes.hpp"
#include "SDK/FN_T3_Horde_parameters.hpp"
#include "SDK/FN_T3_Main_structs.hpp"
#include "SDK/FN_T3_Main_classes.hpp"
#include "SDK/FN_T3_Main_parameters.hpp"
#include "SDK/FN_B_PlayerHealthDamage_CameraLensEffect_structs.hpp"
#include "SDK/FN_B_PlayerHealthDamage_CameraLensEffect_classes.hpp"
#include "SDK/FN_B_PlayerHealthDamage_CameraLensEffect_parameters.hpp"
#include "SDK/FN_B_PlayerShieldDamage_CameraLensEffect_structs.hpp"
#include "SDK/FN_B_PlayerShieldDamage_CameraLensEffect_classes.hpp"
#include "SDK/FN_B_PlayerShieldDamage_CameraLensEffect_parameters.hpp"
#include "SDK/FN_T3_Research_structs.hpp"
#include "SDK/FN_T3_Research_classes.hpp"
#include "SDK/FN_T3_Research_parameters.hpp"
#include "SDK/FN_T4_Horde_structs.hpp"
#include "SDK/FN_T4_Horde_classes.hpp"
#include "SDK/FN_T4_Horde_parameters.hpp"
#include "SDK/FN_GCNS_GM_OnDeath_SpeedUpFriends_structs.hpp"
#include "SDK/FN_GCNS_GM_OnDeath_SpeedUpFriends_classes.hpp"
#include "SDK/FN_GCNS_GM_OnDeath_SpeedUpFriends_parameters.hpp"
#include "SDK/FN_InterfacePlayerPawn_structs.hpp"
#include "SDK/FN_InterfacePlayerPawn_classes.hpp"
#include "SDK/FN_InterfacePlayerPawn_parameters.hpp"
#include "SDK/FN_GCNS_GM_OnDeathAlliedHeal_structs.hpp"
#include "SDK/FN_GCNS_GM_OnDeathAlliedHeal_classes.hpp"
#include "SDK/FN_GCNS_GM_OnDeathAlliedHeal_parameters.hpp"
#include "SDK/FN_GE_Generic_Revive_structs.hpp"
#include "SDK/FN_GE_Generic_Revive_classes.hpp"
#include "SDK/FN_GE_Generic_Revive_parameters.hpp"
#include "SDK/FN_GE_Generic_HealthRegen_structs.hpp"
#include "SDK/FN_GE_Generic_HealthRegen_classes.hpp"
#include "SDK/FN_GE_Generic_HealthRegen_parameters.hpp"
#include "SDK/FN_GE_ExtraLifeRevive_structs.hpp"
#include "SDK/FN_GE_ExtraLifeRevive_classes.hpp"
#include "SDK/FN_GE_ExtraLifeRevive_parameters.hpp"
#include "SDK/FN_Button-SkillTree-Next-L_structs.hpp"
#include "SDK/FN_Button-SkillTree-Next-L_classes.hpp"
#include "SDK/FN_Button-SkillTree-Next-L_parameters.hpp"
#include "SDK/FN_PlayerTakeDamage_CameraShake_structs.hpp"
#include "SDK/FN_PlayerTakeDamage_CameraShake_classes.hpp"
#include "SDK/FN_PlayerTakeDamage_CameraShake_parameters.hpp"
#include "SDK/FN_GCNS_GM_OnDeathAreaHeal_structs.hpp"
#include "SDK/FN_GCNS_GM_OnDeathAreaHeal_classes.hpp"
#include "SDK/FN_GCNS_GM_OnDeathAreaHeal_parameters.hpp"
#include "SDK/FN_Button-SkillTree-M-People_structs.hpp"
#include "SDK/FN_Button-SkillTree-M-People_classes.hpp"
#include "SDK/FN_Button-SkillTree-M-People_parameters.hpp"
#include "SDK/FN_Button-SkillTree-M_structs.hpp"
#include "SDK/FN_Button-SkillTree-M_classes.hpp"
#include "SDK/FN_Button-SkillTree-M_parameters.hpp"
#include "SDK/FN_GCNS_GM_OnDeathExplosion_structs.hpp"
#include "SDK/FN_GCNS_GM_OnDeathExplosion_classes.hpp"
#include "SDK/FN_GCNS_GM_OnDeathExplosion_parameters.hpp"
#include "SDK/FN_GCNS_GM_OnDmgLifeLeech_structs.hpp"
#include "SDK/FN_GCNS_GM_OnDmgLifeLeech_classes.hpp"
#include "SDK/FN_GCNS_GM_OnDmgLifeLeech_parameters.hpp"
#include "SDK/FN_GE_Generic_ShieldRegen_structs.hpp"
#include "SDK/FN_GE_Generic_ShieldRegen_classes.hpp"
#include "SDK/FN_GE_Generic_ShieldRegen_parameters.hpp"
#include "SDK/FN_GCNS_GM_OnDmgReceived_DmgShare_structs.hpp"
#include "SDK/FN_GCNS_GM_OnDmgReceived_DmgShare_classes.hpp"
#include "SDK/FN_GCNS_GM_OnDmgReceived_DmgShare_parameters.hpp"
#include "SDK/FN_GCNS_GM_Player_OnShieldDestroyed_AOE_structs.hpp"
#include "SDK/FN_GCNS_GM_Player_OnShieldDestroyed_AOE_classes.hpp"
#include "SDK/FN_GCNS_GM_Player_OnShieldDestroyed_AOE_parameters.hpp"
#include "SDK/FN_GCNS_GM_PlayerOnDmgLifeLeech_structs.hpp"
#include "SDK/FN_GCNS_GM_PlayerOnDmgLifeLeech_classes.hpp"
#include "SDK/FN_GCNS_GM_PlayerOnDmgLifeLeech_parameters.hpp"
#include "SDK/FN_B_DtB_LightningZap_structs.hpp"
#include "SDK/FN_B_DtB_LightningZap_classes.hpp"
#include "SDK/FN_B_DtB_LightningZap_parameters.hpp"
#include "SDK/FN_PlayerPawn_Generic_structs.hpp"
#include "SDK/FN_PlayerPawn_Generic_classes.hpp"
#include "SDK/FN_PlayerPawn_Generic_parameters.hpp"
#include "SDK/FN_Fortnite_M_Avg_Player_AnimBlueprint_structs.hpp"
#include "SDK/FN_Fortnite_M_Avg_Player_AnimBlueprint_classes.hpp"
#include "SDK/FN_Fortnite_M_Avg_Player_AnimBlueprint_parameters.hpp"
#include "SDK/FN_PlayerPawn_Athena_structs.hpp"
#include "SDK/FN_PlayerPawn_Athena_classes.hpp"
#include "SDK/FN_PlayerPawn_Athena_parameters.hpp"
#include "SDK/FN_PlayerPawn_Outlander_structs.hpp"
#include "SDK/FN_PlayerPawn_Outlander_classes.hpp"
#include "SDK/FN_PlayerPawn_Outlander_parameters.hpp"
#include "SDK/FN_GE_HealthRegen_Delay_Damaged_structs.hpp"
#include "SDK/FN_GE_HealthRegen_Delay_Damaged_classes.hpp"
#include "SDK/FN_GE_HealthRegen_Delay_Damaged_parameters.hpp"
#include "SDK/FN_ProjectileHuskRanged_structs.hpp"
#include "SDK/FN_ProjectileHuskRanged_classes.hpp"
#include "SDK/FN_ProjectileHuskRanged_parameters.hpp"
#include "SDK/FN_GE_ShieldRegen_Delay_Damaged_structs.hpp"
#include "SDK/FN_GE_ShieldRegen_Delay_Damaged_classes.hpp"
#include "SDK/FN_GE_ShieldRegen_Delay_Damaged_parameters.hpp"
#include "SDK/FN_TracerGeneric_structs.hpp"
#include "SDK/FN_TracerGeneric_classes.hpp"
#include "SDK/FN_TracerGeneric_parameters.hpp"
#include "SDK/FN_B_Ranged_Generic_structs.hpp"
#include "SDK/FN_B_Ranged_Generic_classes.hpp"
#include "SDK/FN_B_Ranged_Generic_parameters.hpp"
#include "SDK/FN_EnumEventWorldItemDrop_structs.hpp"
#include "SDK/FN_EnumEventWorldItemDrop_classes.hpp"
#include "SDK/FN_EnumEventWorldItemDrop_parameters.hpp"
#include "SDK/FN_SurvivorBadgeTypes_structs.hpp"
#include "SDK/FN_SurvivorBadgeTypes_classes.hpp"
#include "SDK/FN_SurvivorBadgeTypes_parameters.hpp"
#include "SDK/FN_GCNStatic_MantisStrike_structs.hpp"
#include "SDK/FN_GCNStatic_MantisStrike_classes.hpp"
#include "SDK/FN_GCNStatic_MantisStrike_parameters.hpp"
#include "SDK/FN_PlayerCameraMode1P_structs.hpp"
#include "SDK/FN_PlayerCameraMode1P_classes.hpp"
#include "SDK/FN_PlayerCameraMode1P_parameters.hpp"
#include "SDK/FN_PlayerCameraMode1P_Targeting_structs.hpp"
#include "SDK/FN_PlayerCameraMode1P_Targeting_classes.hpp"
#include "SDK/FN_PlayerCameraMode1P_Targeting_parameters.hpp"
#include "SDK/FN_B_PlayerHealthDamage_LensEffect_Direction_structs.hpp"
#include "SDK/FN_B_PlayerHealthDamage_LensEffect_Direction_classes.hpp"
#include "SDK/FN_B_PlayerHealthDamage_LensEffect_Direction_parameters.hpp"
#include "SDK/FN_B_PlayerShieldDamage_LensEffect_Direction_structs.hpp"
#include "SDK/FN_B_PlayerShieldDamage_LensEffect_Direction_classes.hpp"
#include "SDK/FN_B_PlayerShieldDamage_LensEffect_Direction_parameters.hpp"
#include "SDK/FN_ThrowingStarTest_structs.hpp"
#include "SDK/FN_ThrowingStarTest_classes.hpp"
#include "SDK/FN_ThrowingStarTest_parameters.hpp"
#include "SDK/FN_ElementalEnum_structs.hpp"
#include "SDK/FN_ElementalEnum_classes.hpp"
#include "SDK/FN_ElementalEnum_parameters.hpp"
#include "SDK/FN_WindManager_structs.hpp"
#include "SDK/FN_WindManager_classes.hpp"
#include "SDK/FN_WindManager_parameters.hpp"
#include "SDK/FN_GCN_RiftZapPlayer_structs.hpp"
#include "SDK/FN_GCN_RiftZapPlayer_classes.hpp"
#include "SDK/FN_GCN_RiftZapPlayer_parameters.hpp"
#include "SDK/FN_GCNS_Constructor_ContainmentUnitFX_structs.hpp"
#include "SDK/FN_GCNS_Constructor_ContainmentUnitFX_classes.hpp"
#include "SDK/FN_GCNS_Constructor_ContainmentUnitFX_parameters.hpp"
#include "SDK/FN_GCNS_Constructor_ElectrifiedFloors_structs.hpp"
#include "SDK/FN_GCNS_Constructor_ElectrifiedFloors_classes.hpp"
#include "SDK/FN_GCNS_Constructor_ElectrifiedFloors_parameters.hpp"
#include "SDK/FN_GCNS_Commando_IfItBleedsTick_structs.hpp"
#include "SDK/FN_GCNS_Commando_IfItBleedsTick_classes.hpp"
#include "SDK/FN_GCNS_Commando_IfItBleedsTick_parameters.hpp"
#include "SDK/FN_B_RiftImpact_CameraShake_structs.hpp"
#include "SDK/FN_B_RiftImpact_CameraShake_classes.hpp"
#include "SDK/FN_B_RiftImpact_CameraShake_parameters.hpp"
#include "SDK/FN_GCNS_Constructor_KineticOverload_structs.hpp"
#include "SDK/FN_GCNS_Constructor_KineticOverload_classes.hpp"
#include "SDK/FN_GCNS_Constructor_KineticOverload_parameters.hpp"
#include "SDK/FN_GCNS_Generic_BotTurret_Impact_structs.hpp"
#include "SDK/FN_GCNS_Generic_BotTurret_Impact_classes.hpp"
#include "SDK/FN_GCNS_Generic_BotTurret_Impact_parameters.hpp"
#include "SDK/FN_GCNS_TestAntiMaterial_structs.hpp"
#include "SDK/FN_GCNS_TestAntiMaterial_classes.hpp"
#include "SDK/FN_GCNS_TestAntiMaterial_parameters.hpp"
#include "SDK/FN_GCNS_Outlander_HeavyStuffDamage_structs.hpp"
#include "SDK/FN_GCNS_Outlander_HeavyStuffDamage_classes.hpp"
#include "SDK/FN_GCNS_Outlander_HeavyStuffDamage_parameters.hpp"
#include "SDK/FN_GCNS_Cart_InstantHealFX_structs.hpp"
#include "SDK/FN_GCNS_Cart_InstantHealFX_classes.hpp"
#include "SDK/FN_GCNS_Cart_InstantHealFX_parameters.hpp"
#include "SDK/FN_Struct_SurvivorScriptedAbilities_structs.hpp"
#include "SDK/FN_Struct_SurvivorScriptedAbilities_classes.hpp"
#include "SDK/FN_Struct_SurvivorScriptedAbilities_parameters.hpp"
#include "SDK/FN_MissionBlueprintFunctionLibrary_structs.hpp"
#include "SDK/FN_MissionBlueprintFunctionLibrary_classes.hpp"
#include "SDK/FN_MissionBlueprintFunctionLibrary_parameters.hpp"
#include "SDK/FN_GCNL_GM_OnDmg_SpeedBuff_structs.hpp"
#include "SDK/FN_GCNL_GM_OnDmg_SpeedBuff_classes.hpp"
#include "SDK/FN_GCNL_GM_OnDmg_SpeedBuff_parameters.hpp"
#include "SDK/FN_GCNL_GM_OnDmgCorrosion_structs.hpp"
#include "SDK/FN_GCNL_GM_OnDmgCorrosion_classes.hpp"
#include "SDK/FN_GCNL_GM_OnDmgCorrosion_parameters.hpp"
#include "SDK/FN_GCNL_GM_OnDmgReceived_Slow_structs.hpp"
#include "SDK/FN_GCNL_GM_OnDmgReceived_Slow_classes.hpp"
#include "SDK/FN_GCNL_GM_OnDmgReceived_Slow_parameters.hpp"
#include "SDK/FN_GCNL_GM_OnDmgVulnerability_structs.hpp"
#include "SDK/FN_GCNL_GM_OnDmgVulnerability_classes.hpp"
#include "SDK/FN_GCNL_GM_OnDmgVulnerability_parameters.hpp"
#include "SDK/FN_GCNL_GM_OnLowHealth_Enrage_structs.hpp"
#include "SDK/FN_GCNL_GM_OnLowHealth_Enrage_classes.hpp"
#include "SDK/FN_GCNL_GM_OnLowHealth_Enrage_parameters.hpp"
#include "SDK/FN_GCNL_GM_ReflectDamage_structs.hpp"
#include "SDK/FN_GCNL_GM_ReflectDamage_classes.hpp"
#include "SDK/FN_GCNL_GM_ReflectDamage_parameters.hpp"
#include "SDK/FN_GCNL_GM_MaxHealthIncrease_Major_structs.hpp"
#include "SDK/FN_GCNL_GM_MaxHealthIncrease_Major_classes.hpp"
#include "SDK/FN_GCNL_GM_MaxHealthIncrease_Major_parameters.hpp"
#include "SDK/FN_B_DtB_FloatingRift_structs.hpp"
#include "SDK/FN_B_DtB_FloatingRift_classes.hpp"
#include "SDK/FN_B_DtB_FloatingRift_parameters.hpp"
#include "SDK/FN_GE_SpecialEvent_Halloween_PumpkinHead_structs.hpp"
#include "SDK/FN_GE_SpecialEvent_Halloween_PumpkinHead_classes.hpp"
#include "SDK/FN_GE_SpecialEvent_Halloween_PumpkinHead_parameters.hpp"
#include "SDK/FN_EnemyPawn_Parent_structs.hpp"
#include "SDK/FN_EnemyPawn_Parent_classes.hpp"
#include "SDK/FN_EnemyPawn_Parent_parameters.hpp"
#include "SDK/FN_AnimNotify_PlayFeedbackLine_structs.hpp"
#include "SDK/FN_AnimNotify_PlayFeedbackLine_classes.hpp"
#include "SDK/FN_AnimNotify_PlayFeedbackLine_parameters.hpp"
#include "SDK/FN_B_Rift_Portals_structs.hpp"
#include "SDK/FN_B_Rift_Portals_classes.hpp"
#include "SDK/FN_B_Rift_Portals_parameters.hpp"
#include "SDK/FN_Car_Copper_structs.hpp"
#include "SDK/FN_Car_Copper_classes.hpp"
#include "SDK/FN_Car_Copper_parameters.hpp"
#include "SDK/FN_GCN_RiftStaminaDrain_structs.hpp"
#include "SDK/FN_GCN_RiftStaminaDrain_classes.hpp"
#include "SDK/FN_GCN_RiftStaminaDrain_parameters.hpp"
#include "SDK/FN_GCN_NPC_Fire_structs.hpp"
#include "SDK/FN_GCN_NPC_Fire_classes.hpp"
#include "SDK/FN_GCN_NPC_Fire_parameters.hpp"
#include "SDK/FN_GCN_NPC_Ice_structs.hpp"
#include "SDK/FN_GCN_NPC_Ice_classes.hpp"
#include "SDK/FN_GCN_NPC_Ice_parameters.hpp"
#include "SDK/FN_GCN_NPC_Lightning_structs.hpp"
#include "SDK/FN_GCN_NPC_Lightning_classes.hpp"
#include "SDK/FN_GCN_NPC_Lightning_parameters.hpp"
#include "SDK/FN_GCN_Generic_Stunned_structs.hpp"
#include "SDK/FN_GCN_Generic_Stunned_classes.hpp"
#include "SDK/FN_GCN_Generic_Stunned_parameters.hpp"
#include "SDK/FN_GCN_TakerMarkedForDeath_structs.hpp"
#include "SDK/FN_GCN_TakerMarkedForDeath_classes.hpp"
#include "SDK/FN_GCN_TakerMarkedForDeath_parameters.hpp"
#include "SDK/FN_GCN_BluGloPylon_BuildSpeed_Activate_structs.hpp"
#include "SDK/FN_GCN_BluGloPylon_BuildSpeed_Activate_classes.hpp"
#include "SDK/FN_GCN_BluGloPylon_BuildSpeed_Activate_parameters.hpp"
#include "SDK/FN_GCN_BluGloPylon_Energy_Activate_structs.hpp"
#include "SDK/FN_GCN_BluGloPylon_Energy_Activate_classes.hpp"
#include "SDK/FN_GCN_BluGloPylon_Energy_Activate_parameters.hpp"
#include "SDK/FN_GCN_BluGloPylon_Health_Activate_structs.hpp"
#include "SDK/FN_GCN_BluGloPylon_Health_Activate_classes.hpp"
#include "SDK/FN_GCN_BluGloPylon_Health_Activate_parameters.hpp"
#include "SDK/FN_GCN_BluGloPylon_RunSpeed_Activate_structs.hpp"
#include "SDK/FN_GCN_BluGloPylon_RunSpeed_Activate_classes.hpp"
#include "SDK/FN_GCN_BluGloPylon_RunSpeed_Activate_parameters.hpp"
#include "SDK/FN_GCN_BluGloPylon_Shield_Activate_structs.hpp"
#include "SDK/FN_GCN_BluGloPylon_Shield_Activate_classes.hpp"
#include "SDK/FN_GCN_BluGloPylon_Shield_Activate_parameters.hpp"
#include "SDK/FN_GCN_Commando_IncendiaryRoundsActive_structs.hpp"
#include "SDK/FN_GCN_Commando_IncendiaryRoundsActive_classes.hpp"
#include "SDK/FN_GCN_Commando_IncendiaryRoundsActive_parameters.hpp"
#include "SDK/FN_GCN_Commando_IncendiaryRoundsDOT_structs.hpp"
#include "SDK/FN_GCN_Commando_IncendiaryRoundsDOT_classes.hpp"
#include "SDK/FN_GCN_Commando_IncendiaryRoundsDOT_parameters.hpp"
#include "SDK/FN_GCN_Commando_Warcry_structs.hpp"
#include "SDK/FN_GCN_Commando_Warcry_classes.hpp"
#include "SDK/FN_GCN_Commando_Warcry_parameters.hpp"
#include "SDK/FN_GCN_Commando_DebilitatingShots_structs.hpp"
#include "SDK/FN_GCN_Commando_DebilitatingShots_classes.hpp"
#include "SDK/FN_GCN_Commando_DebilitatingShots_parameters.hpp"
#include "SDK/FN_GCN_Outlander_BearFragmentDebuff_structs.hpp"
#include "SDK/FN_GCN_Outlander_BearFragmentDebuff_classes.hpp"
#include "SDK/FN_GCN_Outlander_BearFragmentDebuff_parameters.hpp"
#include "SDK/FN_GCN_Outlander_DefensiveBuff_structs.hpp"
#include "SDK/FN_GCN_Outlander_DefensiveBuff_classes.hpp"
#include "SDK/FN_GCN_Outlander_DefensiveBuff_parameters.hpp"
#include "SDK/FN_AIGoalManager_structs.hpp"
#include "SDK/FN_AIGoalManager_classes.hpp"
#include "SDK/FN_AIGoalManager_parameters.hpp"
#include "SDK/FN_CircleAroundPrimaryAssignmentGoals_Blaster_structs.hpp"
#include "SDK/FN_CircleAroundPrimaryAssignmentGoals_Blaster_classes.hpp"
#include "SDK/FN_CircleAroundPrimaryAssignmentGoals_Blaster_parameters.hpp"
#include "SDK/FN_StructuralBuildingsAroundPrimaryAssignments_structs.hpp"
#include "SDK/FN_StructuralBuildingsAroundPrimaryAssignments_classes.hpp"
#include "SDK/FN_StructuralBuildingsAroundPrimaryAssignments_parameters.hpp"
#include "SDK/FN_NearestPlayerContext_structs.hpp"
#include "SDK/FN_NearestPlayerContext_classes.hpp"
#include "SDK/FN_NearestPlayerContext_parameters.hpp"
#include "SDK/FN_CircleAroundPrimaryAssignmentGoals_Flinger_structs.hpp"
#include "SDK/FN_CircleAroundPrimaryAssignmentGoals_Flinger_classes.hpp"
#include "SDK/FN_CircleAroundPrimaryAssignmentGoals_Flinger_parameters.hpp"
#include "SDK/FN_CCTeamStatsGameplayEffect_structs.hpp"
#include "SDK/FN_CCTeamStatsGameplayEffect_classes.hpp"
#include "SDK/FN_CCTeamStatsGameplayEffect_parameters.hpp"
#include "SDK/FN_CircleAroundPrimaryAssignmentGoals_Bombshell_Poison_structs.hpp"
#include "SDK/FN_CircleAroundPrimaryAssignmentGoals_Bombshell_Poison_classes.hpp"
#include "SDK/FN_CircleAroundPrimaryAssignmentGoals_Bombshell_Poison_parameters.hpp"
#include "SDK/FN_CircleAroundPrimaryAssignmentGoals_Bombshell_structs.hpp"
#include "SDK/FN_CircleAroundPrimaryAssignmentGoals_Bombshell_classes.hpp"
#include "SDK/FN_CircleAroundPrimaryAssignmentGoals_Bombshell_parameters.hpp"
#include "SDK/FN_StructuralBuildingsInCachedPathOfPrimaryAssignments_structs.hpp"
#include "SDK/FN_StructuralBuildingsInCachedPathOfPrimaryAssignments_classes.hpp"
#include "SDK/FN_StructuralBuildingsInCachedPathOfPrimaryAssignments_parameters.hpp"
#include "SDK/FN_CircleAroundPrimaryAssignmentGoals_Taker_structs.hpp"
#include "SDK/FN_CircleAroundPrimaryAssignmentGoals_Taker_classes.hpp"
#include "SDK/FN_CircleAroundPrimaryAssignmentGoals_Taker_parameters.hpp"
#include "SDK/FN_MusicManager_structs.hpp"
#include "SDK/FN_MusicManager_classes.hpp"
#include "SDK/FN_MusicManager_parameters.hpp"
#include "SDK/FN_B_FortGlobalAbilityTargetingActor_structs.hpp"
#include "SDK/FN_B_FortGlobalAbilityTargetingActor_classes.hpp"
#include "SDK/FN_B_FortGlobalAbilityTargetingActor_parameters.hpp"
#include "SDK/FN_MainPlayerCamera_structs.hpp"
#include "SDK/FN_MainPlayerCamera_classes.hpp"
#include "SDK/FN_MainPlayerCamera_parameters.hpp"
#include "SDK/FN_Athena_PlayerCameraModeBase_structs.hpp"
#include "SDK/FN_Athena_PlayerCameraModeBase_classes.hpp"
#include "SDK/FN_Athena_PlayerCameraModeBase_parameters.hpp"
#include "SDK/FN_Athena_PlayerCamera_DBNO_structs.hpp"
#include "SDK/FN_Athena_PlayerCamera_DBNO_classes.hpp"
#include "SDK/FN_Athena_PlayerCamera_DBNO_parameters.hpp"
#include "SDK/FN_Athena_PlayerCameraModeMelee_structs.hpp"
#include "SDK/FN_Athena_PlayerCameraModeMelee_classes.hpp"
#include "SDK/FN_Athena_PlayerCameraModeMelee_parameters.hpp"
#include "SDK/FN_Athena_PlayerCameraModeRanged_structs.hpp"
#include "SDK/FN_Athena_PlayerCameraModeRanged_classes.hpp"
#include "SDK/FN_Athena_PlayerCameraModeRanged_parameters.hpp"
#include "SDK/FN_Athena_PlayerCameraModeSkydiveDive_structs.hpp"
#include "SDK/FN_Athena_PlayerCameraModeSkydiveDive_classes.hpp"
#include "SDK/FN_Athena_PlayerCameraModeSkydiveDive_parameters.hpp"
#include "SDK/FN_Athena_PlayerCameraModeSkydiveGlide_structs.hpp"
#include "SDK/FN_Athena_PlayerCameraModeSkydiveGlide_classes.hpp"
#include "SDK/FN_Athena_PlayerCameraModeSkydiveGlide_parameters.hpp"
#include "SDK/FN_Athena_PlayerCameraModeSkydiveParachute_structs.hpp"
#include "SDK/FN_Athena_PlayerCameraModeSkydiveParachute_classes.hpp"
#include "SDK/FN_Athena_PlayerCameraModeSkydiveParachute_parameters.hpp"
#include "SDK/FN_Athena_PlayerCameraModeSniper_structs.hpp"
#include "SDK/FN_Athena_PlayerCameraModeSniper_classes.hpp"
#include "SDK/FN_Athena_PlayerCameraModeSniper_parameters.hpp"
#include "SDK/FN_Athena_PlayerCameraModeTargetingScope_structs.hpp"
#include "SDK/FN_Athena_PlayerCameraModeTargetingScope_classes.hpp"
#include "SDK/FN_Athena_PlayerCameraModeTargetingScope_parameters.hpp"
#include "SDK/FN_Athena_PlayerCameraModeTargetingAssault_structs.hpp"
#include "SDK/FN_Athena_PlayerCameraModeTargetingAssault_classes.hpp"
#include "SDK/FN_Athena_PlayerCameraModeTargetingAssault_parameters.hpp"
#include "SDK/FN_Athena_PlayerCameraModeTargetingPistol_structs.hpp"
#include "SDK/FN_Athena_PlayerCameraModeTargetingPistol_classes.hpp"
#include "SDK/FN_Athena_PlayerCameraModeTargetingPistol_parameters.hpp"
#include "SDK/FN_Athena_PlayerCameraModeTargetingRifle_structs.hpp"
#include "SDK/FN_Athena_PlayerCameraModeTargetingRifle_classes.hpp"
#include "SDK/FN_Athena_PlayerCameraModeTargetingRifle_parameters.hpp"
#include "SDK/FN_Athena_PlayerCameraModeTargetingVeryShortRange_structs.hpp"
#include "SDK/FN_Athena_PlayerCameraModeTargetingVeryShortRange_classes.hpp"
#include "SDK/FN_Athena_PlayerCameraModeTargetingVeryShortRange_parameters.hpp"
#include "SDK/FN_v1_PlayerCameraModeBase_structs.hpp"
#include "SDK/FN_v1_PlayerCameraModeBase_classes.hpp"
#include "SDK/FN_v1_PlayerCameraModeBase_parameters.hpp"
#include "SDK/FN_v1_PlayerCameraModeMelee_structs.hpp"
#include "SDK/FN_v1_PlayerCameraModeMelee_classes.hpp"
#include "SDK/FN_v1_PlayerCameraModeMelee_parameters.hpp"
#include "SDK/FN_v1_PlayerCameraModeRanged_structs.hpp"
#include "SDK/FN_v1_PlayerCameraModeRanged_classes.hpp"
#include "SDK/FN_v1_PlayerCameraModeRanged_parameters.hpp"
#include "SDK/FN_v1_PlayerCameraModeTargetingPistol_structs.hpp"
#include "SDK/FN_v1_PlayerCameraModeTargetingPistol_classes.hpp"
#include "SDK/FN_v1_PlayerCameraModeTargetingPistol_parameters.hpp"
#include "SDK/FN_v1_PlayerCameraModeTargetingRifle_structs.hpp"
#include "SDK/FN_v1_PlayerCameraModeTargetingRifle_classes.hpp"
#include "SDK/FN_v1_PlayerCameraModeTargetingRifle_parameters.hpp"
#include "SDK/FN_v1_PlayerCameraModeTargetingScope_structs.hpp"
#include "SDK/FN_v1_PlayerCameraModeTargetingScope_classes.hpp"
#include "SDK/FN_v1_PlayerCameraModeTargetingScope_parameters.hpp"
#include "SDK/FN_v1_PlayerCameraModeTargetingVeryShortRange_structs.hpp"
#include "SDK/FN_v1_PlayerCameraModeTargetingVeryShortRange_classes.hpp"
#include "SDK/FN_v1_PlayerCameraModeTargetingVeryShortRange_parameters.hpp"
#include "SDK/FN_CinematicCamera_MatineeTransition_structs.hpp"
#include "SDK/FN_CinematicCamera_MatineeTransition_classes.hpp"
#include "SDK/FN_CinematicCamera_MatineeTransition_parameters.hpp"
#include "SDK/FN_Default3PCamera_structs.hpp"
#include "SDK/FN_Default3PCamera_classes.hpp"
#include "SDK/FN_Default3PCamera_parameters.hpp"
#include "SDK/FN_Sniper3PCamera_structs.hpp"
#include "SDK/FN_Sniper3PCamera_classes.hpp"
#include "SDK/FN_Sniper3PCamera_parameters.hpp"
#include "SDK/FN_Ranged3PCamera_structs.hpp"
#include "SDK/FN_Ranged3PCamera_classes.hpp"
#include "SDK/FN_Ranged3PCamera_parameters.hpp"
#include "SDK/FN_Targeting3PCamera_structs.hpp"
#include "SDK/FN_Targeting3PCamera_classes.hpp"
#include "SDK/FN_Targeting3PCamera_parameters.hpp"
#include "SDK/FN_Targeting3PCamera_LongRange_structs.hpp"
#include "SDK/FN_Targeting3PCamera_LongRange_classes.hpp"
#include "SDK/FN_Targeting3PCamera_LongRange_parameters.hpp"
#include "SDK/FN_Targeting3PCamera_MidRange_structs.hpp"
#include "SDK/FN_Targeting3PCamera_MidRange_classes.hpp"
#include "SDK/FN_Targeting3PCamera_MidRange_parameters.hpp"
#include "SDK/FN_Targeting3PCamera_Scope_structs.hpp"
#include "SDK/FN_Targeting3PCamera_Scope_classes.hpp"
#include "SDK/FN_Targeting3PCamera_Scope_parameters.hpp"
#include "SDK/FN_Targeting3PCamera_VeryShortRange_structs.hpp"
#include "SDK/FN_Targeting3PCamera_VeryShortRange_classes.hpp"
#include "SDK/FN_Targeting3PCamera_VeryShortRange_parameters.hpp"
#include "SDK/FN_v2_PlayerCameraModeBase_structs.hpp"
#include "SDK/FN_v2_PlayerCameraModeBase_classes.hpp"
#include "SDK/FN_v2_PlayerCameraModeBase_parameters.hpp"
#include "SDK/FN_v2_PlayerCameraModeMelee_structs.hpp"
#include "SDK/FN_v2_PlayerCameraModeMelee_classes.hpp"
#include "SDK/FN_v2_PlayerCameraModeMelee_parameters.hpp"
#include "SDK/FN_v2_PlayerCameraModeRanged_structs.hpp"
#include "SDK/FN_v2_PlayerCameraModeRanged_classes.hpp"
#include "SDK/FN_v2_PlayerCameraModeRanged_parameters.hpp"
#include "SDK/FN_v2_PlayerCameraModeTargetingPistol_structs.hpp"
#include "SDK/FN_v2_PlayerCameraModeTargetingPistol_classes.hpp"
#include "SDK/FN_v2_PlayerCameraModeTargetingPistol_parameters.hpp"
#include "SDK/FN_B_IngameMap_SceneCaptureBlurryNew_structs.hpp"
#include "SDK/FN_B_IngameMap_SceneCaptureBlurryNew_classes.hpp"
#include "SDK/FN_B_IngameMap_SceneCaptureBlurryNew_parameters.hpp"
#include "SDK/FN_B_IngameMap_SceneCaptureNew_structs.hpp"
#include "SDK/FN_B_IngameMap_SceneCaptureNew_classes.hpp"
#include "SDK/FN_B_IngameMap_SceneCaptureNew_parameters.hpp"
#include "SDK/FN_v2_PlayerCameraModeTargetingRifle_structs.hpp"
#include "SDK/FN_v2_PlayerCameraModeTargetingRifle_classes.hpp"
#include "SDK/FN_v2_PlayerCameraModeTargetingRifle_parameters.hpp"
#include "SDK/FN_v2_PlayerCameraModeTargetingScope_structs.hpp"
#include "SDK/FN_v2_PlayerCameraModeTargetingScope_classes.hpp"
#include "SDK/FN_v2_PlayerCameraModeTargetingScope_parameters.hpp"
#include "SDK/FN_v2_PlayerCameraModeTargetingVeryShortRange_structs.hpp"
#include "SDK/FN_v2_PlayerCameraModeTargetingVeryShortRange_classes.hpp"
#include "SDK/FN_v2_PlayerCameraModeTargetingVeryShortRange_parameters.hpp"
#include "SDK/FN_v3_PlayerCameraModeBase_structs.hpp"
#include "SDK/FN_v3_PlayerCameraModeBase_classes.hpp"
#include "SDK/FN_v3_PlayerCameraModeBase_parameters.hpp"
#include "SDK/FN_PlayerCameraMode_DBNO_structs.hpp"
#include "SDK/FN_PlayerCameraMode_DBNO_classes.hpp"
#include "SDK/FN_PlayerCameraMode_DBNO_parameters.hpp"
#include "SDK/FN_UsedPlacementActorsContext_structs.hpp"
#include "SDK/FN_UsedPlacementActorsContext_classes.hpp"
#include "SDK/FN_UsedPlacementActorsContext_parameters.hpp"
#include "SDK/FN_UsedPrimaryMissionPlacementActorsContext_structs.hpp"
#include "SDK/FN_UsedPrimaryMissionPlacementActorsContext_classes.hpp"
#include "SDK/FN_UsedPrimaryMissionPlacementActorsContext_parameters.hpp"
#include "SDK/FN_Button-SkillTree-None_structs.hpp"
#include "SDK/FN_Button-SkillTree-None_classes.hpp"
#include "SDK/FN_Button-SkillTree-None_parameters.hpp"
#include "SDK/FN_v3_PlayerCameraModeMelee_structs.hpp"
#include "SDK/FN_v3_PlayerCameraModeMelee_classes.hpp"
#include "SDK/FN_v3_PlayerCameraModeMelee_parameters.hpp"
#include "SDK/FN_Button-SkillTree-S_structs.hpp"
#include "SDK/FN_Button-SkillTree-S_classes.hpp"
#include "SDK/FN_Button-SkillTree-S_parameters.hpp"
#include "SDK/FN_TextStyle-Header-S-S_structs.hpp"
#include "SDK/FN_TextStyle-Header-S-S_classes.hpp"
#include "SDK/FN_TextStyle-Header-S-S_parameters.hpp"
#include "SDK/FN_SpeechBubbleWidget_structs.hpp"
#include "SDK/FN_SpeechBubbleWidget_classes.hpp"
#include "SDK/FN_SpeechBubbleWidget_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-S_structs.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-S_classes.hpp"
#include "SDK/FN_TextStyle-Base-XS-B-S_parameters.hpp"
#include "SDK/FN_WebBrowser_structs.hpp"
#include "SDK/FN_WebBrowser_classes.hpp"
#include "SDK/FN_WebBrowser_parameters.hpp"
#include "SDK/FN_ItemCardPowerRatingTextStyle_L_structs.hpp"
#include "SDK/FN_ItemCardPowerRatingTextStyle_L_classes.hpp"
#include "SDK/FN_ItemCardPowerRatingTextStyle_L_parameters.hpp"
#include "SDK/FN_T4_Main_structs.hpp"
#include "SDK/FN_T4_Main_classes.hpp"
#include "SDK/FN_T4_Main_parameters.hpp"
#include "SDK/FN_SessionMessages_structs.hpp"
#include "SDK/FN_SessionMessages_classes.hpp"
#include "SDK/FN_SessionMessages_parameters.hpp"
#include "SDK/FN_Serialization_structs.hpp"
#include "SDK/FN_Serialization_classes.hpp"
#include "SDK/FN_Serialization_parameters.hpp"
#include "SDK/FN_EngineMessages_structs.hpp"
#include "SDK/FN_EngineMessages_classes.hpp"
#include "SDK/FN_EngineMessages_parameters.hpp"
#include "SDK/FN_AssetRegistry_structs.hpp"
#include "SDK/FN_AssetRegistry_classes.hpp"
#include "SDK/FN_AssetRegistry_parameters.hpp"
#include "SDK/FN_VectorVM_structs.hpp"
#include "SDK/FN_VectorVM_classes.hpp"
#include "SDK/FN_VectorVM_parameters.hpp"
#include "SDK/FN_v3_PlayerCameraModeRanged_structs.hpp"
#include "SDK/FN_v3_PlayerCameraModeRanged_classes.hpp"
#include "SDK/FN_v3_PlayerCameraModeRanged_parameters.hpp"
#include "SDK/FN_ItemCardPowerRatingTextStyle_M_structs.hpp"
#include "SDK/FN_ItemCardPowerRatingTextStyle_M_classes.hpp"
#include "SDK/FN_ItemCardPowerRatingTextStyle_M_parameters.hpp"
#include "SDK/FN_TcpMessaging_structs.hpp"
#include "SDK/FN_TcpMessaging_classes.hpp"
#include "SDK/FN_TcpMessaging_parameters.hpp"
#include "SDK/FN_WmfMediaFactory_structs.hpp"
#include "SDK/FN_WmfMediaFactory_classes.hpp"
#include "SDK/FN_WmfMediaFactory_parameters.hpp"
#include "SDK/FN_AvfMediaFactory_structs.hpp"
#include "SDK/FN_AvfMediaFactory_classes.hpp"
#include "SDK/FN_AvfMediaFactory_parameters.hpp"
#include "SDK/FN_LightPropagationVolumeRuntime_structs.hpp"
#include "SDK/FN_LightPropagationVolumeRuntime_classes.hpp"
#include "SDK/FN_LightPropagationVolumeRuntime_parameters.hpp"
#include "SDK/FN_ItemCardPowerRatingTextStyle_S_structs.hpp"
#include "SDK/FN_ItemCardPowerRatingTextStyle_S_classes.hpp"
#include "SDK/FN_ItemCardPowerRatingTextStyle_S_parameters.hpp"
#include "SDK/FN_ItemCardPowerRatingTextStyle_XL_structs.hpp"
#include "SDK/FN_ItemCardPowerRatingTextStyle_XL_classes.hpp"
#include "SDK/FN_ItemCardPowerRatingTextStyle_XL_parameters.hpp"
#include "SDK/FN_PurchaseFlow_structs.hpp"
#include "SDK/FN_PurchaseFlow_classes.hpp"
#include "SDK/FN_PurchaseFlow_parameters.hpp"
#include "SDK/FN_v3_PlayerCameraModeTargetingAssault_structs.hpp"
#include "SDK/FN_v3_PlayerCameraModeTargetingAssault_classes.hpp"
#include "SDK/FN_v3_PlayerCameraModeTargetingAssault_parameters.hpp"
#include "SDK/FN_ItemCardPowerRatingTextStyle_XS_structs.hpp"
#include "SDK/FN_ItemCardPowerRatingTextStyle_XS_classes.hpp"
#include "SDK/FN_ItemCardPowerRatingTextStyle_XS_parameters.hpp"
#include "SDK/FN_ButtonStyle-Primary-M_structs.hpp"
#include "SDK/FN_ButtonStyle-Primary-M_classes.hpp"
#include "SDK/FN_ButtonStyle-Primary-M_parameters.hpp"
#include "SDK/FN_DmgTypeBP_Environmental_structs.hpp"
#include "SDK/FN_DmgTypeBP_Environmental_classes.hpp"
#include "SDK/FN_DmgTypeBP_Environmental_parameters.hpp"
#include "SDK/FN_OodleHandlerComponent_structs.hpp"
#include "SDK/FN_OodleHandlerComponent_classes.hpp"
#include "SDK/FN_OodleHandlerComponent_parameters.hpp"
#include "SDK/FN_BuildPatchServices_structs.hpp"
#include "SDK/FN_BuildPatchServices_classes.hpp"
#include "SDK/FN_BuildPatchServices_parameters.hpp"
#include "SDK/FN_TextStyle-Button-Primary-M-Disabled_structs.hpp"
#include "SDK/FN_TextStyle-Button-Primary-M-Disabled_classes.hpp"
#include "SDK/FN_TextStyle-Button-Primary-M-Disabled_parameters.hpp"
#include "SDK/FN_Overlay_structs.hpp"
#include "SDK/FN_Overlay_classes.hpp"
#include "SDK/FN_Overlay_parameters.hpp"
#include "SDK/FN_v3_PlayerCameraModeTargetingPistol_structs.hpp"
#include "SDK/FN_v3_PlayerCameraModeTargetingPistol_classes.hpp"
#include "SDK/FN_v3_PlayerCameraModeTargetingPistol_parameters.hpp"
#include "SDK/FN_TextStyle-Button-Primary-M_structs.hpp"
#include "SDK/FN_TextStyle-Button-Primary-M_classes.hpp"
#include "SDK/FN_TextStyle-Button-Primary-M_parameters.hpp"
#include "SDK/FN_UsedProximityDangerZoneContext_structs.hpp"
#include "SDK/FN_UsedProximityDangerZoneContext_classes.hpp"
#include "SDK/FN_UsedProximityDangerZoneContext_parameters.hpp"
#include "SDK/FN_MoviePlayer_structs.hpp"
#include "SDK/FN_MoviePlayer_classes.hpp"
#include "SDK/FN_MoviePlayer_parameters.hpp"
#include "SDK/FN_SocialDefaults_structs.hpp"
#include "SDK/FN_SocialDefaults_classes.hpp"
#include "SDK/FN_SocialDefaults_parameters.hpp"
#include "SDK/FN_AudioMixer_structs.hpp"
#include "SDK/FN_AudioMixer_classes.hpp"
#include "SDK/FN_AudioMixer_parameters.hpp"
#include "SDK/FN_v3_PlayerCameraModeTargetingRifle_structs.hpp"
#include "SDK/FN_v3_PlayerCameraModeTargetingRifle_classes.hpp"
#include "SDK/FN_v3_PlayerCameraModeTargetingRifle_parameters.hpp"
#include "SDK/FN_InvisibleCursorWidget_structs.hpp"
#include "SDK/FN_InvisibleCursorWidget_classes.hpp"
#include "SDK/FN_InvisibleCursorWidget_parameters.hpp"
#include "SDK/FN_MediaAssets_structs.hpp"
#include "SDK/FN_MediaAssets_classes.hpp"
#include "SDK/FN_MediaAssets_parameters.hpp"
#include "SDK/FN_GameLiveStreaming_structs.hpp"
#include "SDK/FN_GameLiveStreaming_classes.hpp"
#include "SDK/FN_GameLiveStreaming_parameters.hpp"
#include "SDK/FN_Niagara_structs.hpp"
#include "SDK/FN_Niagara_classes.hpp"
#include "SDK/FN_Niagara_parameters.hpp"
#include "SDK/FN_EngineSettings_structs.hpp"
#include "SDK/FN_EngineSettings_classes.hpp"
#include "SDK/FN_EngineSettings_parameters.hpp"
#include "SDK/FN_MovieSceneCapture_structs.hpp"
#include "SDK/FN_MovieSceneCapture_classes.hpp"
#include "SDK/FN_MovieSceneCapture_parameters.hpp"
#include "SDK/FN_SubtitlesWidgets_structs.hpp"
#include "SDK/FN_SubtitlesWidgets_classes.hpp"
#include "SDK/FN_SubtitlesWidgets_parameters.hpp"
#include "SDK/FN_GeometryCache_structs.hpp"
#include "SDK/FN_GeometryCache_classes.hpp"
#include "SDK/FN_GeometryCache_parameters.hpp"
#include "SDK/FN_v3_PlayerCameraModeTargetingScope_structs.hpp"
#include "SDK/FN_v3_PlayerCameraModeTargetingScope_classes.hpp"
#include "SDK/FN_v3_PlayerCameraModeTargetingScope_parameters.hpp"
#include "SDK/FN_ActorSequence_structs.hpp"
#include "SDK/FN_ActorSequence_classes.hpp"
#include "SDK/FN_ActorSequence_parameters.hpp"
#include "SDK/FN_CinematicCamera_structs.hpp"
#include "SDK/FN_CinematicCamera_classes.hpp"
#include "SDK/FN_CinematicCamera_parameters.hpp"
#include "SDK/FN_TextStyle-Base-XXS-B_structs.hpp"
#include "SDK/FN_TextStyle-Base-XXS-B_classes.hpp"
#include "SDK/FN_TextStyle-Base-XXS-B_parameters.hpp"
#include "SDK/FN_MaterialShaderQualitySettings_structs.hpp"
#include "SDK/FN_MaterialShaderQualitySettings_classes.hpp"
#include "SDK/FN_MaterialShaderQualitySettings_parameters.hpp"
#include "SDK/FN_LevelSequence_structs.hpp"
#include "SDK/FN_LevelSequence_classes.hpp"
#include "SDK/FN_LevelSequence_parameters.hpp"
#include "SDK/FN_v3_PlayerCameraModeTargetingVeryShortRange_structs.hpp"
#include "SDK/FN_v3_PlayerCameraModeTargetingVeryShortRange_classes.hpp"
#include "SDK/FN_v3_PlayerCameraModeTargetingVeryShortRange_parameters.hpp"
#include "SDK/FN_Landscape_structs.hpp"
#include "SDK/FN_Landscape_classes.hpp"
#include "SDK/FN_Landscape_parameters.hpp"
#include "SDK/FN_CombatManager_structs.hpp"
#include "SDK/FN_CombatManager_classes.hpp"
#include "SDK/FN_CombatManager_parameters.hpp"
#include "SDK/FN_TeamID_Default_structs.hpp"
#include "SDK/FN_TeamID_Default_classes.hpp"
#include "SDK/FN_TeamID_Default_parameters.hpp"
#include "SDK/FN_HeadMountedDisplay_structs.hpp"
#include "SDK/FN_HeadMountedDisplay_classes.hpp"
#include "SDK/FN_HeadMountedDisplay_parameters.hpp"
#include "SDK/FN_TeamID_Lime_structs.hpp"
#include "SDK/FN_TeamID_Lime_classes.hpp"
#include "SDK/FN_TeamID_Lime_parameters.hpp"
#include "SDK/FN_Qos_structs.hpp"
#include "SDK/FN_Qos_classes.hpp"
#include "SDK/FN_Qos_parameters.hpp"
#include "SDK/FN_TeamID_Orange_structs.hpp"
#include "SDK/FN_TeamID_Orange_classes.hpp"
#include "SDK/FN_TeamID_Orange_parameters.hpp"
#include "SDK/FN_SharedMissionLists_structs.hpp"
#include "SDK/FN_SharedMissionLists_classes.hpp"
#include "SDK/FN_SharedMissionLists_parameters.hpp"
#include "SDK/FN_UIMapManager_structs.hpp"
#include "SDK/FN_UIMapManager_classes.hpp"
#include "SDK/FN_UIMapManager_parameters.hpp"
#include "SDK/FN_LF_SurvivorShelterIndoor_structs.hpp"
#include "SDK/FN_LF_SurvivorShelterIndoor_classes.hpp"
#include "SDK/FN_LF_SurvivorShelterIndoor_parameters.hpp"
#include "SDK/FN_LF_SurvivorShelterOutdoor1_structs.hpp"
#include "SDK/FN_LF_SurvivorShelterOutdoor1_classes.hpp"
#include "SDK/FN_LF_SurvivorShelterOutdoor1_parameters.hpp"
#include "SDK/FN_LF_SurvivorShelterOutdoor3_structs.hpp"
#include "SDK/FN_LF_SurvivorShelterOutdoor3_classes.hpp"
#include "SDK/FN_LF_SurvivorShelterOutdoor3_parameters.hpp"
#include "SDK/FN_T4_Research_structs.hpp"
#include "SDK/FN_T4_Research_classes.hpp"
#include "SDK/FN_T4_Research_parameters.hpp"
#include "SDK/FN_PlayerSpawnPlacementActor_structs.hpp"
#include "SDK/FN_PlayerSpawnPlacementActor_classes.hpp"
#include "SDK/FN_PlayerSpawnPlacementActor_parameters.hpp"
#include "SDK/FN_DefaultSkillNode_structs.hpp"
#include "SDK/FN_DefaultSkillNode_classes.hpp"
#include "SDK/FN_DefaultSkillNode_parameters.hpp"
#include "SDK/FN_SkillTreeBPLibrary_structs.hpp"
#include "SDK/FN_SkillTreeBPLibrary_classes.hpp"
#include "SDK/FN_SkillTreeBPLibrary_parameters.hpp"
#include "SDK/FN_KeybindWidget_structs.hpp"
#include "SDK/FN_KeybindWidget_classes.hpp"
#include "SDK/FN_KeybindWidget_parameters.hpp"
#include "SDK/FN_DefaultUIDataConfiguration_structs.hpp"
#include "SDK/FN_DefaultUIDataConfiguration_classes.hpp"
#include "SDK/FN_DefaultUIDataConfiguration_parameters.hpp"
| 53.280997 | 93 | 0.861745 | [
"solid"
] |
96f878ddccc262084e473824fb0883786861085d | 12,554 | cpp | C++ | he_meanshift/test/mean_shift.cpp | encryptogroup/SoK_ppClustering | 6b008a09bfe3f3b8074e24059ac3e2aa6b87f227 | [
"MIT"
] | 3 | 2021-06-18T08:09:46.000Z | 2021-12-19T05:41:24.000Z | he_meanshift/test/mean_shift.cpp | encryptogroup/SoK_ppClustering | 6b008a09bfe3f3b8074e24059ac3e2aa6b87f227 | [
"MIT"
] | null | null | null | he_meanshift/test/mean_shift.cpp | encryptogroup/SoK_ppClustering | 6b008a09bfe3f3b8074e24059ac3e2aa6b87f227 | [
"MIT"
] | null | null | null | // MIT License
//
// Copyright (c) 2021 Aditya Shridhar Hegde
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
#include <HEAAN.h>
#include <limits.h>
#include <stdlib.h>
#include <boost/test/data/test_case.hpp>
#include <boost/test/unit_test.hpp>
#include <ckp19/dataset.hpp>
#include <ckp19/mean_shift.hpp>
#include <ckp19/plaintext_clustering.hpp>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <vector>
#include "common.hpp"
namespace utf = boost::unit_test;
// Test fixture
struct MeanShiftFixture {
Ring ring;
SecretKey secretKey;
Scheme scheme;
MeanShift meanshift;
MeanShiftFixture()
: secretKey(ring),
scheme(secretKey, ring),
meanshift(scheme, SchemeConstants.logn, SchemeConstants.logq,
SchemeConstants.logq_boot, SchemeConstants.logp,
SchemeConstants.logt, SchemeConstants.seed) {
BOOST_TEST_REQUIRE(SchemeConstants.logn < logN - 1);
scheme.addLeftRotKeys(secretKey);
scheme.addRightRotKeys(secretKey);
// Tests will involve bootstrap operations on ciphertext with 2 or 4 slots.
scheme.addBootKey(secretKey, 3, SchemeConstants.logq_boot + 4);
scheme.addBootKey(secretKey, 4, SchemeConstants.logq_boot + 4);
}
};
// Utility functions
void scale_vector(double *v, long n, double r) {
double sum;
for (int i = 0; i < n; ++i) sum += v[i] * v[i];
sum = std::sqrt(sum);
sum /= r;
for (int i = 0; i < n; ++i) v[i] /= sum;
};
void getDustCiphertextFromPlaintext(
Ciphertext &dusts, MeanShift &meanshift,
const std::vector<std::vector<double>> &points, long dim, long npoints,
long num_dusts, long slots) {
std::vector<complex<double>> pdusts(slots, 0);
for (long i = 0; i < num_dusts; ++i) {
for (long j = 0; j < npoints; ++j) {
for (long k = 0; k < dim; ++k) {
pdusts[i * npoints * dim + j * dim + k] = points[i % points.size()][k];
}
}
}
meanshift.scheme.encrypt(dusts, pdusts.data(), slots, meanshift.logp,
meanshift.logq);
}
// Since most of these algorithms take signfificant time to execute if `logN`
// is large, the tests are quite minimal and don't verify across a lot of
// different parameter values.
BOOST_FIXTURE_TEST_SUITE(mean_shift, MeanShiftFixture)
BOOST_AUTO_TEST_CASE(inverse, *utf::tolerance(1e-4)) {
srand(SchemeConstants.seed);
meanshift.refreshSeed(SchemeConstants.seed);
double m = 20;
double steps = 11;
std::unique_ptr<double[]> pval(
EvaluatorUtils::randomRealArray(meanshift.slots, m));
Ciphertext cval;
scheme.encrypt(cval, pval.get(), meanshift.slots, meanshift.logp,
meanshift.logq);
Ciphertext cinv;
meanshift.inverse(cinv, cval, m, steps);
BOOST_TEST(cinv.logq == cval.logq - (steps + 2) * meanshift.logp,
"cinv.logq: " << cinv.logq << ", cval.logq: " << cval.logq);
BOOST_TEST(cinv.logp == cval.logp,
"cinv.logp: " << cinv.logp << ", cval.logp: " << cval.logp);
std::unique_ptr<complex<double>[]> pinv(scheme.decrypt(secretKey, cinv));
for (long i = 0; i < meanshift.slots; ++i) {
double exp = 1.0 / pval[i];
double output = pinv[i].real();
BOOST_TEST(exp == output,
"output: " << pinv[i].real() << ", expected: " << exp);
}
}
BOOST_TEST_DECORATOR(*utf::tolerance(1e-5))
BOOST_DATA_TEST_CASE(kernelSIMD, utf::data::xrange<long>(2, 4), dim) {
srand(SchemeConstants.seed);
meanshift.refreshSeed(SchemeConstants.seed);
long degree = 5;
// Deliberate choice to not make `npoints` a power of 2. Having buffer values
// in plaintext slots can help catch errors in implementation.
long npoints = 6;
// `npoints` points should be encrypted within the same ciphertext.
BOOST_TEST_REQUIRE(npoints * dim < meanshift.slots);
long req_slots = npoints * dim;
std::unique_ptr<double[]> x(EvaluatorUtils::randomRealArray(meanshift.slots));
std::unique_ptr<double[]> y(EvaluatorUtils::randomRealArray(meanshift.slots));
scale_vector(x.get(), req_slots, 0.5);
scale_vector(y.get(), req_slots, 0.5);
Ciphertext cx, cy;
scheme.encrypt(cx, x.get(), meanshift.slots, meanshift.logp, meanshift.logq);
scheme.encrypt(cy, y.get(), meanshift.slots, meanshift.logp, meanshift.logq);
Ciphertext ckernel;
meanshift.kernelSIMD(ckernel, cx, cy, dim, npoints, degree);
BOOST_TEST(ckernel.logq == cx.logq - (degree + 2) * meanshift.logp,
"ckernel.logq: " << ckernel.logq << ", cx.logq: " << cx.logq);
BOOST_TEST(ckernel.logp == cx.logp,
"ckernel.logp: " << ckernel.logp << ", cx.logp: " << cx.logp);
std::unique_ptr<complex<double>[]> output(
meanshift.scheme.decrypt(secretKey, ckernel));
PlainMeanShift pmeanshift(meanshift.seed);
for (long i = 0; i < npoints; ++i) {
double kernel = pmeanshift.kernel(
std::vector<double>(x.get() + i * dim, x.get() + (i + 1) * dim),
std::vector<double>(y.get() + i * dim, y.get() + (i + 1) * dim),
degree);
for (long j = 0; j < dim; ++j) {
BOOST_TEST(
output[i * dim + j].real() == kernel,
"output: " << output[i * dim + j].real() << ", expected: " << kernel);
}
}
}
BOOST_TEST_DECORATOR(*utf::tolerance(5e-4))
BOOST_DATA_TEST_CASE(refreshDusts, utf::data::xrange(2, 4), dim) {
srand(SchemeConstants.seed);
meanshift.refreshSeed(SchemeConstants.seed);
long num_dusts = 4;
// Compute `npoints` (data points per ciphertext) based on given params
long npoints = meanshift.slots / (dim * num_dusts);
BOOST_TEST_REQUIRE(npoints >= 1);
Dataset ds(dim, npoints, SchemeConstants.seed);
Ciphertext cdusts;
getDustCiphertextFromPlaintext(cdusts, meanshift, ds.getPoints(), dim,
npoints, num_dusts, meanshift.slots);
std::unique_ptr<complex<double>[]> orig(scheme.decrypt(secretKey, cdusts));
meanshift.refreshDusts(cdusts, dim, npoints, num_dusts);
std::unique_ptr<complex<double>[]> bootstrap(
scheme.decrypt(secretKey, cdusts));
BOOST_TEST(
cdusts.logq > cdusts.logp,
"cdusts.logq: " << cdusts.logq << ", cdusts.logp: " << cdusts.logp);
BOOST_TEST(cdusts.logq > SchemeConstants.logq_boot,
"cdusts.logq: " << cdusts.logq
<< ", logq_boot: " << SchemeConstants.logq_boot);
for (long i = 0; i < num_dusts; ++i) {
for (long j = 0; j < dim; ++j) {
// `refreshDusts` sets only the first instance of the dust
long pos = i * dim * npoints + j;
BOOST_TEST(orig[pos].real() == bootstrap[pos].real(),
"output: " << bootstrap[pos].real()
<< ", expected: " << orig[pos].real());
}
}
}
BOOST_TEST_DECORATOR(*utf::tolerance(5e-4))
BOOST_DATA_TEST_CASE(modeSeekingSIMD,
utf::data::xrange(2, 4) *
utf::data::make(std::vector<long>{1, 5}),
dim, steps) {
srand(SchemeConstants.seed);
meanshift.refreshSeed(SchemeConstants.seed);
long num_point_cts = 2;
long num_dusts = 4;
long kdegree = 5;
long inv_steps = 8;
// Compute `npoints` (data points per ciphertext) based on given params
long npoints = meanshift.slots / (dim * num_dusts);
BOOST_TEST_REQUIRE(npoints >= 1);
Dataset ds(dim, num_point_cts * npoints, SchemeConstants.seed);
ds.rescaleDatasetInPlace(0.5);
EncryptedDataset eds;
ds.encryptSIMD(eds, scheme, num_dusts, meanshift.slots, meanshift.logp,
meanshift.logq);
// Meanshift object should ideally be constructed with `eds.log_slots`. For
// testing, we work our way backwards and set `eds.log_slots` to be equal to
// `meanshift.logn`.
BOOST_TEST_REQUIRE(eds.log_slots == meanshift.logn);
std::vector<std::vector<double>> dusts;
PlainMeanShift pmeanshift(meanshift.seed);
pmeanshift.modeSeeking(dusts, ds.getPoints(), num_dusts, steps, kdegree,
inv_steps);
Ciphertext cdusts;
meanshift.modeSeekingSIMD(cdusts, eds.points, eds.dim, eds.npoints, num_dusts,
steps, kdegree, inv_steps);
if (steps == 1) {
BOOST_TEST(cdusts.logq == (eds.points[0].logq -
(kdegree + inv_steps + 7) * meanshift.logp),
"cdusts.logq: " << cdusts.logq
<< ", dataset.logq: " << eds.points[0].logq);
BOOST_TEST(cdusts.logp == eds.points[0].logp,
"cdusts.logp: " << cdusts.logp
<< ", dataset.logp: " << eds.points[0].logp);
} else {
BOOST_TEST(
cdusts.logq > cdusts.logp,
"cdusts.logq: " << cdusts.logq << ", cdusts.logp: " << cdusts.logp);
BOOST_TEST(cdusts.logq > SchemeConstants.logq_boot,
"cdusts.logq: " << cdusts.logq
<< ", logq_boot: " << SchemeConstants.logq_boot);
}
std::unique_ptr<complex<double>[]> pdusts(
meanshift.scheme.decrypt(secretKey, cdusts));
for (long i = 0; i < num_dusts; ++i) {
for (long j = 0; j < npoints; ++j) {
for (long k = 0; k < dim; ++k) {
long pos = i * npoints * dim + j * dim + k;
BOOST_TEST(
pdusts[pos].real() == dusts[i][k],
"output: " << pdusts[pos].real() << ", expected: " << dusts[i][k]);
}
}
}
}
BOOST_TEST_DECORATOR(*utf::tolerance(5e-1))
BOOST_DATA_TEST_CASE(pointLabelingSIMD, utf::data::xrange(2, 4), dim) {
srand(SchemeConstants.seed);
meanshift.refreshSeed(SchemeConstants.seed);
long num_point_cts = 2;
long num_dusts = 4;
long kdegree = 4;
long inv_steps = 13;
long minidx_t = 4;
long npoints = meanshift.slots / (dim * num_dusts);
BOOST_TEST_REQUIRE(npoints >= 1);
Dataset ds(dim, num_point_cts * npoints, SchemeConstants.seed);
ds.rescaleDatasetInPlace(0.4);
EncryptedDataset eds;
ds.encryptSIMD(eds, scheme, num_dusts, meanshift.slots, meanshift.logp,
meanshift.logq);
// Meanshift object should ideally be constructed with `eds.log_slots`. For
// testing, we work our way backwards and set `eds.log_slots` to be equal to
// `meanshift.logn`.
BOOST_TEST_REQUIRE(eds.log_slots == meanshift.logn);
std::vector<std::vector<double>> dusts(ds.getPoints().begin(),
ds.getPoints().begin() + num_dusts);
Ciphertext cdusts;
getDustCiphertextFromPlaintext(cdusts, meanshift, dusts, dim, npoints,
num_dusts, meanshift.slots);
BOOST_TEST_REQUIRE(cdusts.logq == eds.points[0].logq);
BOOST_TEST_REQUIRE(cdusts.logp == eds.points[0].logp);
std::vector<std::vector<double>> labels;
PlainMeanShift pmeanshift(meanshift.seed);
pmeanshift.pointLabeling(labels, ds.getPoints(), dusts, kdegree, inv_steps,
minidx_t);
std::vector<Ciphertext> clabels;
meanshift.pointLabelingSIMD(clabels, cdusts, eds.points, dim, npoints,
num_dusts, kdegree, inv_steps, minidx_t);
for (long p = 0; p < num_point_cts; ++p) {
std::unique_ptr<complex<double>[]> plabel(
meanshift.scheme.decrypt(secretKey, clabels[p]));
for (long i = 0; i < num_dusts; ++i) {
for (long j = 0; j < npoints; ++j) {
for (long k = 0; k < dim; ++k) {
double output = plabel[i * npoints * dim + j * dim + k].real();
double exp = labels[p * npoints + j][i];
BOOST_TEST(output == exp,
"output: " << output << ", expected: " << exp);
}
}
}
}
}
BOOST_AUTO_TEST_SUITE_END()
| 35.664773 | 81 | 0.637566 | [
"object",
"vector"
] |
96f8c62c52d4931d56727b6dd4461b8325fcbd89 | 3,974 | cpp | C++ | src/main/socket/socket.cpp | fchurca/7542-2015-2 | a537a69692820899a1cd28a07cbc74190f659895 | [
"BSD-3-Clause"
] | 1 | 2015-09-06T21:29:06.000Z | 2015-09-06T21:29:06.000Z | src/main/socket/socket.cpp | fchurca/7542-2015-2 | a537a69692820899a1cd28a07cbc74190f659895 | [
"BSD-3-Clause"
] | 2 | 2015-09-02T04:05:21.000Z | 2015-10-20T21:10:58.000Z | src/main/socket/socket.cpp | fchurca/7542-2015-2 | a537a69692820899a1cd28a07cbc74190f659895 | [
"BSD-3-Clause"
] | null | null | null | #include <cstring>
#include "socket.h"
#include "../model/charnames.h"
using namespace charnames;
using namespace std;
const size_t double_discretization_scale = 100;
const double double_offset = 100;
Socket::Socket() : inBufferIndex(0) {
}
Socket::~Socket() {
}
bool Socket::flushIn() {
size_t oldSize = inBuffer.size();
const size_t bufsize = 4097;
char b[bufsize];
long size;
bool cont = true;
do {
memset(b, nul, bufsize);
size = Recv((void *)b, bufsize-1);
if(size > 0) {
inBuffer.insert(inBuffer.end(), b, b + size);
} else {
cont = false;
if (size < 0) {
deinit();
}
}
} while (false); // FIXME
return oldSize < inBuffer.size();
}
bool Socket::oFlushIn() {
bool ret = true;
if (inBufferIndex >= inBuffer.size()) {
inBuffer.clear();
ret = flushIn();
inBufferIndex = 0;
}
return ret;
}
bool Socket::flushOut() {
*this << eot;
auto oldSize = outBuffer.size();
auto sent = Send((void *)outBuffer.data(), oldSize);
outBuffer.clear();
return sent == oldSize;
}
Socket& Socket::operator<<(char c) {
outBuffer.push_back(c);
return *this;
}
Socket& Socket::operator<<(bool b) {
return *this << (b?(char)0xff:nul);
}
Socket& Socket::operator<<(int i) {
return *this<<(long)i;
}
Socket& Socket::operator<<(long l) {
uint32_t n = htonl(l);
for(auto i = sizeof(n); i > 0; i--) {
char c = n;
*this << c;
n >>= 8;
}
return *this;
}
Socket& Socket::operator<<(size_t s) {
return *this<<(long)s;
}
Socket& Socket::operator<<(std::string s) {
for(size_t i = 0; i < s.length(); i++) {
*this<<s[i];
}
*this<<nul;
return *this;
}
Socket& Socket::operator<<(double d) {
return *this << (int)((d + double_offset) * double_discretization_scale);
}
Socket& Socket::operator>>(char& c) {
if(oFlushIn()) {
c = inBuffer.data()[inBufferIndex++];
}
return *this;
}
Socket& Socket::operator>>(bool& b) {
char c = nul;
*this >> c;
b = (c != nul);
return *this;
}
Socket& Socket::operator>>(long& l) {
if(oFlushIn()) {
uint32_t ret = 0;
char c;
for(auto i = 0; i < sizeof(ret); i++) {
*this >> c;
ret |= ((uint32_t)c << (8 * i));
}
l = ntohl(ret);
}
return *this;
}
Socket& Socket::operator>>(size_t& s) {
long l;
*this >> l;
s = (size_t)l;
return *this;
}
Socket& Socket::operator>>(int& i) {
long l;
*this >> l;
i = (int)l;
return *this;
}
Socket& Socket::operator>>(double& d) {
long l;
*this >> l;
d = (((double)l) / double_discretization_scale) - double_offset;
return *this;
}
Socket& Socket::operator>>(string& s) {
s = "";
char c;
do {
*this >> c;
if(c) {
s += c;
}
} while (c);
return *this;
}
Socket& Socket::operator<<(r2 r) {
return *this << r.x << r.y;
}
Socket& Socket::operator<<(Entity& e) {
e.visit(*this);
return *this;
}
void Socket::visit(Entity& e) {
*this << 'E' << e.getId() << e.name << e.owner.name
<< e.getFrame()
<< e.getPosition();
}
void Socket::visit(Building& e) {
*this << 'B' << e.getId() << e.name << e.owner.name
<< e.getFrame()
<< e.getPosition()
<< e.health.get()
<< e.isInAction
<< e.progress.get()
<< e.currentProduct;
}
void Socket::visit(UnfinishedBuilding& e) {
*this << 'U' << e.getId() << e.name << e.owner.name
<< e.getFrame()
<< e.getPosition()
<< e.health.get()
<< e.progress.get();
}
void Socket::visit(Resource& e) {
*this << 'R' << e.getId() << e.name << e.owner.name
<< e.getFrame()
<< e.getPosition()
<< e.cargo.get();
}
void Socket::visit(Unit& e) {
*this << 'N' << e.getId() << e.name << e.owner.name
<< e.getFrame()
<< e.getPosition()
<< e.health.get()
<< e.isInAction
<< e.getOrientation();
}
void Socket::visit(Flag& e) {
*this << 'F' << e.getId() << e.name << e.owner.name
<< e.getFrame()
<< e.getPosition()
<< e.health.get();
}
Socket& Socket::operator<<(Player& p) {
*this << p.name << p.getActive() << p.getAlive();
for(auto& i : p.getResources()) {
*this << gs << i.first << i.second;
}
*this << nul;
return *this;
}
| 17.820628 | 74 | 0.581782 | [
"model"
] |
96fd943aa1d8c9a30c4234283ffee7c4b484aa0e | 8,459 | cc | C++ | chrome/browser/intents/cws_intents_registry.cc | Crystalnix/BitPop | 1fae4ecfb965e163f6ce154b3988b3181678742a | [
"BSD-3-Clause"
] | 7 | 2015-05-20T22:41:35.000Z | 2021-11-18T19:07:59.000Z | chrome/browser/intents/cws_intents_registry.cc | Crystalnix/BitPop | 1fae4ecfb965e163f6ce154b3988b3181678742a | [
"BSD-3-Clause"
] | 1 | 2015-02-02T06:55:08.000Z | 2016-01-20T06:11:59.000Z | chrome/browser/intents/cws_intents_registry.cc | Crystalnix/BitPop | 1fae4ecfb965e163f6ce154b3988b3181678742a | [
"BSD-3-Clause"
] | 2 | 2015-12-08T00:37:41.000Z | 2017-04-06T05:34:05.000Z | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/intents/cws_intents_registry.h"
#include "base/callback.h"
#include "base/json/json_string_value_serializer.h"
#include "base/memory/scoped_ptr.h"
#include "base/stl_util.h"
#include "base/string16.h"
#include "base/utf_string_conversions.h"
#include "chrome/common/extensions/extension_l10n_util.h"
#include "chrome/common/extensions/message_bundle.h"
#include "chrome/browser/intents/api_key.h"
#include "chrome/browser/net/chrome_url_request_context.h"
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/common/net/url_util.h"
#include "net/base/load_flags.h"
#include "net/base/mime_util.h"
#include "net/url_request/url_fetcher.h"
namespace {
// Limit for the number of suggestions we fix from CWS. Ideally, the registry
// simply get all of them, but there is a) chunking on the CWS side, and b)
// there is a cost with suggestions fetched. (Network overhead for favicons,
// roundtrips to registry to check if installed).
//
// Since the picker limits the number of suggestions displayed to 5, 15 means
// the suggestion list only has the potential to be shorter than that once the
// user has at least 10 installed handlers for the particular action/type.
//
// TODO(groby): Adopt number of suggestions dynamically so the picker can
// always display 5 suggestions unless there are less than 5 viable extensions
// in the CWS.
const char kMaxSuggestions[] = "15";
// URL for CWS intents API.
const char kCWSIntentServiceURL[] =
"https://www.googleapis.com/chromewebstore/v1.1b/items/intent";
// Determines if a string is a candidate for localization.
bool ShouldLocalize(const std::string& value) {
std::string::size_type index = 0;
index = value.find(extensions::MessageBundle::kMessageBegin);
if (index == std::string::npos)
return false;
index = value.find(extensions::MessageBundle::kMessageEnd, index);
return (index != std::string::npos);
}
// Parses a JSON |response| from the CWS into a list of suggested extensions,
// stored in |intents|. |intents| must not be NULL.
void ParseResponse(const std::string& response,
CWSIntentsRegistry::IntentExtensionList* intents) {
std::string error;
scoped_ptr<Value> parsed_response;
JSONStringValueSerializer serializer(response);
parsed_response.reset(serializer.Deserialize(NULL, &error));
if (parsed_response.get() == NULL)
return;
DictionaryValue* response_dict = NULL;
if (!parsed_response->GetAsDictionary(&response_dict) || !response_dict)
return;
ListValue* items;
if (!response_dict->GetList("items", &items))
return;
for (ListValue::const_iterator iter(items->begin());
iter != items->end(); ++iter) {
DictionaryValue* item = static_cast<DictionaryValue*>(*iter);
// All fields are mandatory - skip this result if any field isn't found.
CWSIntentsRegistry::IntentExtensionInfo info;
if (!item->GetString("id", &info.id))
continue;
if (!item->GetInteger("num_ratings", &info.num_ratings))
continue;
if (!item->GetDouble("average_rating", &info.average_rating))
continue;
if (!item->GetString("manifest", &info.manifest))
continue;
std::string manifest_utf8 = UTF16ToUTF8(info.manifest);
JSONStringValueSerializer manifest_serializer(manifest_utf8);
scoped_ptr<Value> manifest_value;
manifest_value.reset(manifest_serializer.Deserialize(NULL, &error));
if (manifest_value.get() == NULL)
continue;
DictionaryValue* manifest_dict;
if (!manifest_value->GetAsDictionary(&manifest_dict) ||
!manifest_dict->GetString("name", &info.name))
continue;
string16 url_string;
if (!item->GetString("icon_url", &url_string))
continue;
info.icon_url = GURL(url_string);
// Need to parse CWS reply, since it is not pre-l10n'd.
ListValue* all_locales = NULL;
if (ShouldLocalize(UTF16ToUTF8(info.name)) &&
item->GetList("locale_data", &all_locales)) {
std::map<std::string, std::string> localized_title;
for (ListValue::const_iterator locale_iter(all_locales->begin());
locale_iter != all_locales->end(); ++locale_iter) {
DictionaryValue* locale = static_cast<DictionaryValue*>(*locale_iter);
std::string locale_id, title;
if (!locale->GetString("locale_string", &locale_id) ||
!locale->GetString("title", &title))
continue;
localized_title[locale_id] = title;
}
std::vector<std::string> valid_locales;
extension_l10n_util::GetAllFallbackLocales(
extension_l10n_util::CurrentLocaleOrDefault(),
"all",
&valid_locales);
for (std::vector<std::string>::iterator iter = valid_locales.begin();
iter != valid_locales.end(); ++iter) {
if (localized_title.count(*iter)) {
info.name = UTF8ToUTF16(localized_title[*iter]);
break;
}
}
}
intents->push_back(info);
}
}
} // namespace
// Internal object representing all data associated with a single query.
struct CWSIntentsRegistry::IntentsQuery {
IntentsQuery();
~IntentsQuery();
// Underlying URL request query.
scoped_ptr<net::URLFetcher> url_fetcher;
// The callback - invoked on completed retrieval.
ResultsCallback callback;
};
CWSIntentsRegistry::IntentsQuery::IntentsQuery() {
}
CWSIntentsRegistry::IntentsQuery::~IntentsQuery() {
}
CWSIntentsRegistry::IntentExtensionInfo::IntentExtensionInfo()
: num_ratings(0),
average_rating(0) {
}
CWSIntentsRegistry::IntentExtensionInfo::~IntentExtensionInfo() {
}
CWSIntentsRegistry::CWSIntentsRegistry(net::URLRequestContextGetter* context)
: request_context_(context) {
}
CWSIntentsRegistry::~CWSIntentsRegistry() {
// Cancel all pending queries, since we can't handle them any more.
STLDeleteValues(&queries_);
}
void CWSIntentsRegistry::OnURLFetchComplete(const net::URLFetcher* source) {
DCHECK(source);
URLFetcherHandle handle = reinterpret_cast<URLFetcherHandle>(source);
QueryMap::iterator it = queries_.find(handle);
DCHECK(it != queries_.end());
scoped_ptr<IntentsQuery> query(it->second);
DCHECK(query.get() != NULL);
queries_.erase(it);
std::string response;
source->GetResponseAsString(&response);
// TODO(groby): Do we really only accept 200, or any 2xx codes?
IntentExtensionList intents;
if (source->GetResponseCode() == 200)
ParseResponse(response, &intents);
if (!query->callback.is_null())
query->callback.Run(intents);
}
void CWSIntentsRegistry::GetIntentServices(const string16& action,
const string16& mimetype,
const ResultsCallback& cb) {
scoped_ptr<IntentsQuery> query(new IntentsQuery);
query->callback = cb;
query->url_fetcher.reset(net::URLFetcher::Create(
0, BuildQueryURL(action,mimetype), net::URLFetcher::GET, this));
if (query->url_fetcher.get() == NULL)
return;
query->url_fetcher->SetRequestContext(request_context_);
query->url_fetcher->SetLoadFlags(
net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES);
URLFetcherHandle handle = reinterpret_cast<URLFetcherHandle>(
query->url_fetcher.get());
queries_[handle] = query.release();
queries_[handle]->url_fetcher->Start();
}
// static
GURL CWSIntentsRegistry::BuildQueryURL(const string16& action,
const string16& type) {
GURL request(kCWSIntentServiceURL);
request = chrome_common_net::AppendQueryParameter(request, "intent",
UTF16ToUTF8(action));
request = chrome_common_net::AppendQueryParameter(request, "mime_types",
UTF16ToUTF8(type));
request = chrome_common_net::AppendQueryParameter(request, "start_index",
"0");
request = chrome_common_net::AppendQueryParameter(request, "num_results",
kMaxSuggestions);
if (web_intents::kApiKey[0]) {
request = chrome_common_net::AppendQueryParameter(request, "key",
web_intents::kApiKey);
}
return request;
}
| 34.8107 | 78 | 0.687079 | [
"object",
"vector"
] |
8c08afabda5486d23308a1b394b8ac2478ad75ec | 11,145 | cpp | C++ | tests/selections/lexer.cpp | jmintser/chemfiles | fb1ed5ee47790cc004468e5484954e2b3d1adff2 | [
"BSD-3-Clause"
] | 116 | 2015-11-05T01:18:13.000Z | 2022-02-20T06:33:47.000Z | tests/selections/lexer.cpp | jmintser/chemfiles | fb1ed5ee47790cc004468e5484954e2b3d1adff2 | [
"BSD-3-Clause"
] | 307 | 2015-10-08T09:22:46.000Z | 2022-03-28T13:42:51.000Z | tests/selections/lexer.cpp | Luthaf/Chemharp | d41036ff5645954bd691f868f066c760560eee13 | [
"BSD-3-Clause"
] | 57 | 2015-10-22T06:45:40.000Z | 2022-03-27T17:33:05.000Z | // Chemfiles, a modern library for chemistry file reading and writing
// Copyright (C) Guillaume Fraux and contributors -- BSD license
#include <catch.hpp>
#include "chemfiles/selections/lexer.hpp"
using namespace chemfiles;
using namespace chemfiles::selections;
static std::vector<Token> tokenize(std::string selection) {
return Tokenizer(selection).tokenize();
}
TEST_CASE("Tokens") {
SECTION("Operators") {
auto OPERATORS = std::vector<Token::Type> {
Token::END, Token::LPAREN, Token::RPAREN, Token::LBRACKET,
Token::RBRACKET, Token::COMMA, Token::EQUAL, Token::NOT_EQUAL,
Token::LESS, Token::LESS_EQUAL, Token::GREATER, Token::GREATER_EQUAL,
Token::PLUS, Token::MINUS, Token::STAR, Token::SLASH, Token::PERCENT,
Token::NOT, Token::AND, Token::OR
};
for (auto type: OPERATORS) {
auto token = Token(type);
CHECK(token.type() == type);
CHECK_THROWS_AS(token.ident(), Error);
CHECK_THROWS_AS(token.number(), Error);
CHECK_THROWS_AS(token.variable(), Error);
CHECK_THROWS_AS(token.string(), Error);
}
CHECK(Token(Token::END).as_str() == "<end of selection>");
CHECK(Token(Token::LPAREN).as_str() == "(");
CHECK(Token(Token::RPAREN).as_str() == ")");
CHECK(Token(Token::LBRACKET).as_str() == "[");
CHECK(Token(Token::RBRACKET).as_str() == "]");
CHECK(Token(Token::COMMA).as_str() == ",");
CHECK(Token(Token::EQUAL).as_str() == "==");
CHECK(Token(Token::NOT_EQUAL).as_str() == "!=");
CHECK(Token(Token::LESS).as_str() == "<");
CHECK(Token(Token::LESS_EQUAL).as_str() == "<=");
CHECK(Token(Token::GREATER).as_str() == ">");
CHECK(Token(Token::GREATER_EQUAL).as_str() == ">=");
CHECK(Token(Token::PLUS).as_str() == "+");
CHECK(Token(Token::MINUS).as_str() == "-");
CHECK(Token(Token::STAR).as_str() == "*");
CHECK(Token(Token::SLASH).as_str() == "/");
CHECK(Token(Token::HAT).as_str() == "^");
CHECK(Token(Token::PERCENT).as_str() == "%");
CHECK(Token(Token::NOT).as_str() == "not");
CHECK(Token(Token::AND).as_str() == "and");
CHECK(Token(Token::OR).as_str() == "or");
}
SECTION("Identifers") {
auto token = Token::ident("blabla");
CHECK(token.type() == Token::IDENT);
CHECK(token.ident() == "blabla");
CHECK(token.as_str() == "blabla");
CHECK_THROWS_AS(token.number(), Error);
CHECK_THROWS_AS(token.variable(), Error);
CHECK_FALSE(selections::is_ident(""));
CHECK_FALSE(selections::is_ident("_not_an_id"));
CHECK_FALSE(selections::is_ident("3not_an_id"));
CHECK_FALSE(selections::is_ident("not an id"));
CHECK_FALSE(selections::is_ident("not-an-id"));
}
SECTION("Strings") {
auto token = Token::string("blabla");
CHECK(token.type() == Token::STRING);
CHECK(token.string() == "blabla");
CHECK(token.as_str() == "\"blabla\"");
CHECK_THROWS_AS(token.number(), Error);
CHECK_THROWS_AS(token.variable(), Error);
}
SECTION("Numbers") {
auto token = Token::number(3.4);
CHECK(token.type() == Token::NUMBER);
CHECK(token.number() == 3.4);
CHECK(token.as_str() == "3.400000");
CHECK_THROWS_AS(token.ident(), Error);
CHECK_THROWS_AS(token.variable(), Error);
CHECK_THROWS_AS(token.string(), Error);
}
SECTION("Variables") {
auto token = Token::variable(18);
CHECK(token.type() == Token::VARIABLE);
CHECK(token.variable() == 18);
CHECK(token.as_str() == "#19");
CHECK_THROWS_AS(token.ident(), Error);
CHECK_THROWS_AS(token.number(), Error);
CHECK_THROWS_AS(token.string(), Error);
}
SECTION("Constructor errors") {
// These constructor needs additional data
CHECK_THROWS_AS(Token(Token::NUMBER), Error);
CHECK_THROWS_AS(Token(Token::IDENT), Error);
CHECK_THROWS_AS(Token(Token::STRING), Error);
CHECK_THROWS_AS(Token(Token::VARIABLE), Error);
}
}
TEST_CASE("Lexing") {
SECTION("Whitespaces") {
for (auto& str: {"ident", "ident ", " ident", " \tident "}) {
CHECK(tokenize(str).size() == 2);
}
CHECK(tokenize("\t bar \t hkqs ").size() == 3);
auto tokens = tokenize("3+#4(foo==not<");
CHECK(tokens.size() == 9);
CHECK(tokens[0].type() == Token::NUMBER);
CHECK(tokens[1].type() == Token::PLUS);
CHECK(tokens[2].type() == Token::VARIABLE);
CHECK(tokens[3].type() == Token::LPAREN);
CHECK(tokens[4].type() == Token::IDENT);
CHECK(tokens[5].type() == Token::EQUAL);
CHECK(tokens[6].type() == Token::NOT);
CHECK(tokens[7].type() == Token::LESS);
CHECK(tokens[8].type() == Token::END);
}
SECTION("variables") {
auto tokens = tokenize("#2 #78");
CHECK(tokens.size() == 3);
CHECK(tokens[0].type() == Token::VARIABLE);
CHECK(tokens[0].variable() == 1);
CHECK(tokens[1].type() == Token::VARIABLE);
CHECK(tokens[1].variable() == 77);
CHECK(tokens[2].type() == Token::END);
CHECK_THROWS_AS(tokenize("#0"), SelectionError);
}
SECTION("Identifiers") {
for (auto& id: {"ident", "id_3nt___", "iD_3BFAMC8T3Vt___"}) {
auto tokens = tokenize(id);
CHECK(tokens.size() == 2);
CHECK(tokens[0].type() == Token::IDENT);
CHECK(tokens[0].ident() == id);
CHECK(tokens[1].type() == Token::END);
}
CHECK_THROWS_WITH(tokenize("22bar == foo"), "identifiers can not start with a digit: '22bar'");
}
SECTION("Numbers") {
for (auto& str: {"4", "567.34", "452.1E4", "4e+5", "4.6784e-56"}) {
auto tokens = tokenize(str);
CHECK(tokens.size() == 2);
CHECK(tokens[0].type() == Token::NUMBER);
CHECK(tokens[1].type() == Token::END);
}
/// A bit of a weird case, but this should be handled too
auto tokens = tokenize("3e+5+6");
CHECK(tokens.size() == 4);
CHECK(tokens[0].type() == Token::NUMBER);
CHECK(tokens[0].number() == 3e+5);
CHECK(tokens[1].type() == Token::PLUS);
CHECK(tokens[2].type() == Token::NUMBER);
CHECK(tokens[2].number() == 6);
CHECK(tokens[3].type() == Token::END);
}
SECTION("Parentheses") {
CHECK(tokenize("(")[0].type() == Token::LPAREN);
CHECK(tokenize(")")[0].type() == Token::RPAREN);
auto tokens = tokenize("(bagyu");
CHECK(tokens.size() == 3);
CHECK(tokens[0].type() == Token::LPAREN);
tokens = tokenize(")qbisbszlh");
CHECK(tokens.size() == 3);
CHECK(tokens[0].type() == Token::RPAREN);
tokens = tokenize("jsqsb(");
CHECK(tokens.size() == 3);
CHECK(tokens[1].type() == Token::LPAREN);
tokens = tokenize("kjpqhiufn)");
CHECK(tokens.size() == 3);
CHECK(tokens[1].type() == Token::RPAREN);
}
SECTION("Brackets") {
CHECK(tokenize("[")[0].type() == Token::LBRACKET);
CHECK(tokenize("]")[0].type() == Token::RBRACKET);
auto tokens = tokenize("[bagyu");
CHECK(tokens.size() == 3);
CHECK(tokens[0].type() == Token::LBRACKET);
tokens = tokenize("]qbisbszlh");
CHECK(tokens.size() == 3);
CHECK(tokens[0].type() == Token::RBRACKET);
tokens = tokenize("jsqsb[");
CHECK(tokens.size() == 3);
CHECK(tokens[1].type() == Token::LBRACKET);
tokens = tokenize("kjpqhiufn]");
CHECK(tokens.size() == 3);
CHECK(tokens[1].type() == Token::RBRACKET);
}
SECTION("Operators") {
CHECK(tokenize("and")[0].type() == Token::AND);
CHECK(tokenize("or")[0].type() == Token::OR);
CHECK(tokenize("not")[0].type() == Token::NOT);
CHECK(tokenize("<")[0].type() == Token::LESS);
CHECK(tokenize("<=")[0].type() == Token::LESS_EQUAL);
CHECK(tokenize(">")[0].type() == Token::GREATER);
CHECK(tokenize(">=")[0].type() == Token::GREATER_EQUAL);
CHECK(tokenize("==")[0].type() == Token::EQUAL);
CHECK(tokenize("!=")[0].type() == Token::NOT_EQUAL);
CHECK(tokenize("+")[0].type() == Token::PLUS);
CHECK(tokenize("-")[0].type() == Token::MINUS);
CHECK(tokenize("*")[0].type() == Token::STAR);
CHECK(tokenize("/")[0].type() == Token::SLASH);
CHECK(tokenize("^")[0].type() == Token::HAT);
CHECK(tokenize("%")[0].type() == Token::PERCENT);
}
SECTION("Functions") {
CHECK(tokenize("#9")[0].type() == Token::VARIABLE);
CHECK(tokenize("#255")[0].type() == Token::VARIABLE);
CHECK_THROWS_WITH(tokenize("# gabo"), "expected number after #");
CHECK_THROWS_WITH(tokenize("#"), "expected number after #");
CHECK_THROWS_WITH(tokenize("bhics #"), "expected number after #");
CHECK_THROWS_WITH(tokenize("#1844674407370955161555"), "could not parse variable in '1844674407370955161555'");
CHECK_THROWS_WITH(tokenize("#256"), "variable index #256 is too big (should be less than 255)");
CHECK_THROWS_WITH(tokenize("#0"), "invalid variable index #0");
CHECK(tokenize(",")[0].type() == Token::COMMA);
auto tokens = tokenize(",bagyu");
REQUIRE(tokens.size() == 3);
CHECK(tokens[0].type() == Token::COMMA);
CHECK(tokens[1].type() == Token::IDENT);
CHECK(tokens[2].type() == Token::END);
tokens = tokenize("jsqsb,");
REQUIRE(tokens.size() == 3);
CHECK(tokens[0].type() == Token::IDENT);
CHECK(tokens[1].type() == Token::COMMA);
CHECK(tokens[2].type() == Token::END);
}
SECTION("String") {
CHECK(tokenize("\"aa\"")[0].type() == Token::STRING);
for (std::string id: {"\"\"", "\"id_3nt___\"", "\"and\"", "\"3.2\""}) {
auto tokens = tokenize(id);
CHECK(tokens.size() == 2);
CHECK(tokens[0].type() == Token::STRING);
CHECK(tokens[0].string() == id.substr(1, id.size() - 2));
CHECK(tokens[1].type() == Token::END);
}
CHECK_THROWS_WITH(tokenize("\"foo"), "closing quote (\") not found in '\"foo'");
CHECK_THROWS_WITH(tokenize("\"foo and name 4"), "closing quote (\") not found in '\"foo and name 4'");
}
}
TEST_CASE("Lexing errors") {
std::vector<std::string> LEX_FAIL = {
"§", // Not accepted characters
"`",
"!",
"&",
"|",
"@",
"#",
"~",
"{",
"}",
"_",
"\\",
"=",
"è",
"à",
"ü",
"∀",
"ζ",
"R", // weird full width UTF-8 character
"形",
"# 9",
"9.2.5",
};
for (auto& failure: LEX_FAIL) {
CHECK_THROWS_AS(tokenize(failure), SelectionError);
}
}
| 35.951613 | 119 | 0.53459 | [
"vector"
] |
8c095080d14fac47016913e3bc0a41f180a306e0 | 2,618 | cpp | C++ | SPOJ/RotaCritica.cpp | aajjbb/contest-files | b8842681b96017063a7baeac52ae1318bf59d74d | [
"Apache-2.0"
] | 1 | 2018-08-28T19:58:40.000Z | 2018-08-28T19:58:40.000Z | SPOJ/RotaCritica.cpp | aajjbb/contest-files | b8842681b96017063a7baeac52ae1318bf59d74d | [
"Apache-2.0"
] | 2 | 2017-04-16T00:48:05.000Z | 2017-08-03T20:12:26.000Z | SPOJ/RotaCritica.cpp | aajjbb/contest-files | b8842681b96017063a7baeac52ae1318bf59d74d | [
"Apache-2.0"
] | 4 | 2016-03-04T19:42:00.000Z | 2018-01-08T11:42:00.000Z | #include <iostream>
#include <fstream>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <utility>
#include <functional>
#include <valarray>
#include <math.h>
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <limits.h>
using namespace std;
#define REP(i, n) for(int i = 0; i < (n); i++)
#define FOR(i, a, n) for(i = a; i < n; i++)
#define REV(i, a, n) for(i = a; i > n; i--)
template<typename T> T gcd(T a, T b) {
if(!b) return a;
return gcd(b, a % b);
}
template<typename T> T lcm(T a, T b) {
return a * b / gcd(a, b);
}
typedef long long ll;
typedef long double ld;
const int MAXN = 110;
int N, M, cont, graph[MAXN][MAXN], vis[MAXN], tree[MAXN][MAXN], used[MAXN][MAXN];
string a, b;
map<string, int> si;
map<int, string> is;
vector<pair<string, string> > order;
void do_tree(int x) {
vis[x] = 1;
int i;
for (i = 0; i < N; i++) if (!vis[i] && graph[i][x]) {
tree[i][x] = 1;
do_tree(i);
}
}
void dfs(int x) {
vis[x] = 1;
int i;
for (i = 0; i < N; i++) if (!vis[i] && graph[x][i]) {
dfs(i);
}
}
int main(void) {
int i, j, k;
while(scanf("%d%d", &N, &M) == 2 && !(N == 0 && M == 0)) {
is.clear(); si.clear(); order.clear();
for (i = 0; i < N; i++) {
vis[i] = 0;
for (j = 0; j < N; j++) {
tree[i][j] = graph[i][j] = used[i][j] = 0;
}
}
for (i = 0; i < N; i++) {
cin >> a;
si[a] = i;
is[i] = a;
}
for (i = 0; i < M; i++) {
cin >> a >> b;
order.push_back(make_pair(a, b));
graph[si[a]][si[b]] += 1;
}
do_tree(0);
bool done = false;
for (i = 0; i < N; i++) for (j = 0; j < N; j++) if (tree[i][j]) {
graph[i][j] -= 1;
for (k = 0; k < N; k++) vis[k] = 0;
dfs(i);
if (!vis[0]) {
used[i][j] = 1;
done = true;
}
graph[i][j] += 1;
}
if(!done) {
printf("Nenhuma\n");
} else {
for (i = 0; i < M; i++) {
int x = si[order[i].first], y = si[order[i].second];
if (used[x][y]) {
printf("%s %s\n", is[x].c_str(), is[y].c_str());
}
}
}
printf("\n");
}
return 0;
}
| 22 | 82 | 0.417494 | [
"vector"
] |
8c136301d3e7d533f5789a316487814cff8a64ca | 18,543 | cpp | C++ | audio/common/Semantic/jhcNetNode.cpp | jconnell11/ALIA | f7a6c9dfd775fbd41239051aeed7775adb878b0a | [
"Apache-2.0"
] | null | null | null | audio/common/Semantic/jhcNetNode.cpp | jconnell11/ALIA | f7a6c9dfd775fbd41239051aeed7775adb878b0a | [
"Apache-2.0"
] | null | null | null | audio/common/Semantic/jhcNetNode.cpp | jconnell11/ALIA | f7a6c9dfd775fbd41239051aeed7775adb878b0a | [
"Apache-2.0"
] | null | null | null | // jhcNetNode.cpp : node in semantic network for ALIA system
//
// Written by Jonathan H. Connell, jconnell@alum.mit.edu
//
///////////////////////////////////////////////////////////////////////////
//
// Copyright 2017-2020 IBM Corporation
// Copyright 2020-2021 Etaoin Systems
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
///////////////////////////////////////////////////////////////////////////
#include <string.h>
#include "Language/jhcMorphTags.h"
#include "Semantic/jhcBindings.h" // since only spec'd as class in header
#include "Semantic/jhcGraphlet.h" // since only spec'd as class in header
#include "Semantic/jhcNetNode.h"
///////////////////////////////////////////////////////////////////////////
// Creation and Initialization //
///////////////////////////////////////////////////////////////////////////
//= Default destructor does necessary cleanup.
// attempts to make remaining network consistent by deleting references
// can only be deleted through jhcNodePool manager
jhcNetNode::~jhcNetNode ()
{
int i;
delete quote;
for (i = 0; i < na; i++)
args[i]->rem_prop(this);
for (i = np - 1; i >= 0; i--)
props[i]->rem_arg(this);
}
//= Remove a specific property and compact remaining list of properties.
void jhcNetNode::rem_prop (const jhcNetNode *item)
{
int i, j;
for (i = 0; i < np; i++)
if (props[i] == item)
{
np--;
for (j = i; j < np; j++)
{
props[j] = props[j + 1];
anum[j] = anum[j + 1];
}
props[np] = NULL;
anum[np] = 0;
}
}
//= Remove a specific argument and compact remaining list of arguments.
void jhcNetNode::rem_arg (const jhcNetNode *item)
{
int i, j;
// find all occurrences of items in list of arhs
for (i = 0; i < na; i++)
if (args[i] == item)
{
// see if any other args with same slot name (arity decrease)
for (j = 0; j < na; j++)
if ((j != i) && (strcmp(links[j], links[i]) == 0))
break;
if ((na > 0) && (j >= na))
na0--;
// compact the list to cover hole made by removal
na--;
for (j = i; j < na; j++)
{
args[j] = args[j + 1];
strcpy_s(links[j], links[j + 1]);
}
// make sure old end of the list is truly empty
args[na] = NULL;
links[na][0] = '\0';
}
}
//= Default constructor initializes certain values.
// can only be created through jhcNodePool manager
jhcNetNode::jhcNetNode ()
{
// basic configuration data
*base = '\0';
*lex = '\0';
*nick = '\0';
quote = NULL;
inv = 0;
evt = 0;
blf0 = 1.0; // value to use when actualized
blf = 0.0; // used to default to one
// no arguments or properties, nothing else in list
na = 0;
na0 = 0;
np = 0;
id = 0;
next = NULL;
// default bookkeeping
hash = 0;
gen = 0;
ref = 0;
vis = 1;
// default status
top = 0;
keep = 1;
mark = 0;
// no special grammar tags
tags = 0;
// not part of halo
hrule = NULL;
hbind = NULL;
}
//= Add a long string for regurgitation by echo output function.
void jhcNetNode::SetString (const char *wds)
{
if (wds == NULL)
{
delete quote;
quote = NULL;
return;
}
if (quote == NULL)
quote = new char[200];
strcpy_s(quote, 200, wds);
}
//= Whether the node has any tags indicating it is an object.
bool jhcNetNode::NounTag () const
{
return((tags & JTAG_NOUN) != 0);
}
//= Whether the node has any tags indicating it is an action.
bool jhcNetNode::VerbTag () const
{
return((tags & JTAG_VERB) != 0);
}
//= Set belief to value specified during creation.
// lets user statements be selectively accepted/rejected from working memory
// returns 1 if belief has changed, 0 if already at same value
int jhcNetNode::Actualize (int ver)
{
if (blf == blf0)
return 0;
blf = blf0;
GenMax(ver);
return 1;
}
///////////////////////////////////////////////////////////////////////////
// Argument Functions //
///////////////////////////////////////////////////////////////////////////
//= Count the number of distinct fillers for given role.
// if role is NULL then tells total argument count
int jhcNetNode::NumVals (const char *slot) const
{
int i, cnt = 0;
for (i = 0; i < na; i++)
if (strcmp(links[i], slot) == 0)
cnt++;
return cnt;
}
//= Get the n'th filler for the given role.
// returns NULL if invalid index
jhcNetNode *jhcNetNode::Val (const char *slot, int n) const
{
int i, cnt = n;
if ((n >= 0) && (n < na))
for (i = 0; i < na; i++)
if (strcmp(links[i], slot) == 0)
if (cnt-- <= 0)
return args[i];
return NULL;
}
//= Add some other node as an argument with the given link name.
// generic arguments do not need any explicit name
// returns 1 for success, 0 if something full, -1 for bad format
int jhcNetNode::AddArg (const char *slot, jhcNetNode *val)
{
int i;
// check argument and make sure space exists
if (val == NULL)
return -1;
if (HasVal(slot, val)) // ignore duplicates
return 1;
if (na >= amax)
return jprintf(">>> More than %d arguments in jhcNetNode::AddArg !\n", amax);
if (val->np >= pmax)
return jprintf(">>> More than %d properties in jhcNetNode::AddArg !\n", pmax);
// see if a new kind of link (boosts arity)
for (i = 0; i < na; i++)
if (strcmp(links[i], slot) == 0)
break;
if ((na == 0) || (i >= na))
na0++;
// add as argument to this node
links[na][0] = '\0';
if (slot != NULL)
strcpy_s(links[na], slot);
args[na] = val;
// add this node as a property of other node
val->props[val->np] = this;
val->anum[val->np] = na;
// bump args of this node and props of other node
na++;
val->np += 1;
return 1;
}
//= Replace existing argument with alternate node.
// leaves slot name and order of arguments the same for this node
// removes associated property from old value node
void jhcNetNode::SubstArg (int i, jhcNetNode *val)
{
if ((i < 0) || (i >= na) || (val == NULL) || (val == args[i]))
return;
// cleanly remove old argument and point to replacement instead
args[i]->rem_prop(this);
args[i] = val;
// add this node as a property of the replacement node
val->props[val->np] = this;
val->anum[val->np] = i;
val->np += 1;
}
/*
//= Make sure this node is at the end of the property list for given argument.
// guarantees that this node will be the first retrieved
void jhcNetNode::RefreshArg (int i)
{
jhcNetNode *val;
int last, now, j;
// see if this node is already the final property of the argument
if ((i < 0) || (i >= na))
return;
val = args[i];
last = val->np - 1;
if (val->props[last] == this)
return;
// compact the argument's list of properties
for (now = 0; now < last; now++)
if (val->props[now] == this)
break;
for (j = now; j < last; j++)
{
val->props[j] = val->props[j + 1];
val->anum[j] = val->anum[j + 1];
}
// tack self onto end
val->props[last] = this;
val->anum[last] = i;
}
*/
///////////////////////////////////////////////////////////////////////////
// Property Functions //
///////////////////////////////////////////////////////////////////////////
//= Checks if role in i'th property is one of several items.
// largely for convenience in grounding commands
bool jhcNetNode::RoleIn (int i, const char *v1, const char *v2, const char *v3,
const char *v4, const char *v5, const char *v6) const
{
return(RoleMatch(i, v1) || RoleMatch(i, v2) || RoleMatch(i, v3) ||
RoleMatch(i, v4) || RoleMatch(i, v5) || RoleMatch(i, v6));
}
//= See if this node's i'th property has the node as its "role" argument.
// property node must also have matching "neg" and belief above "bth"
// returns property node if true, else NULL
jhcNetNode *jhcNetNode::PropMatch (int i, const char *role, double bth, int neg) const
{
jhcNetNode *p = Prop(i);
if ((p != NULL) && (strcmp(Role(i), role) == 0) && (p->blf >= bth) && (p->inv == neg))
return p;
return NULL;
}
//= Count the number of nodes that have this node as a filler for given role.
// useful for determining if this node has a "tag" or a "cuz"
// if role is NULL then tells total property count
int jhcNetNode::NumFacts (const char *role) const
{
jhcNetNode *p;
int i, j, cnt = 0;
for (i = 0; i < np; i++)
{
p = props[i];
for (j = 0; j < p->na; j++)
if ((p->args[j] == this) && (strcmp(p->links[j], role) == 0))
cnt++;
}
return cnt;
}
//= Get the n'th node that has this node as a filler for the given role.
// useful for asking about this node relative to "ako" or "hq"
// most recently added properties returned first
// returns NULL if invalid index
jhcNetNode *jhcNetNode::Fact (const char *role, int n) const
{
jhcNetNode *p;
int i, j, cnt = n;
if ((n >= 0) && (n < np))
for (i = np - 1; i >= 0; i--)
{
p = props[i];
for (j = 0; j < p->na; j++)
if ((p->args[j] == this) && (strcmp(p->links[j], role) == 0))
if (cnt-- <= 0)
return p;
}
return NULL;
}
///////////////////////////////////////////////////////////////////////////
// Simple Matching //
///////////////////////////////////////////////////////////////////////////
//= See if the node participates in the triple: <self> -slot-> val.
bool jhcNetNode::HasVal (const char *slot, const jhcNetNode *val) const
{
int i;
if ((val == NULL) || (slot == NULL) || (*slot == '\0'))
return false;
for (i = 0; i < na; i++)
if ((args[i] == val) && (strcmp(links[i], slot) == 0))
return true;
return false;
}
//= See if the node participates in the triple: prop -role-> <self>.
bool jhcNetNode::HasFact (const jhcNetNode *fact, const char *role) const
{
if (fact == NULL)
return false;
return fact->HasVal(role, this);
}
//= See if two nodes shared exactly the same set of arguments.
bool jhcNetNode::SameArgs (const jhcNetNode *ref) const
{
int i;
if ((ref == NULL) || (ref->na != na))
return false;
for (i = 0; i < na; i++)
if (!ref->HasVal(links[i], args[i]))
return false;
return true;
}
//= See if given node has same arguments as the remapped arguments of this node.
bool jhcNetNode::SameArgs (const jhcNetNode *ref, const jhcBindings *b) const
{
const jhcNetNode *a, *a2;
int i;
if ((ref == NULL) || (ref->na != na))
return false;
for (i = 0; i < na; i++)
{
a = args[i];
if ((b != NULL) && ((a2 = b->LookUp(a)) != NULL))
a = a2;
if (!ref->HasVal(links[i], a))
return false;
}
return true;
}
//= Find property node with lex "word" and argument "role" pointing to this node.
// property node must have matching "neg" and belief above "bth"
// returns NULL if no such property found (does not check properties of property)
jhcNetNode *jhcNetNode::FindProp (const char *role, const char *word, int neg, double bth) const
{
jhcNetNode *p;
int i;
for (i = 0; i < np; i++)
{
p = props[i];
if ((p->inv == neg) && (p->blf >= bth) && RoleMatch(i, role) && p->LexMatch(word))
return p;
}
return NULL;
}
///////////////////////////////////////////////////////////////////////////
// Predicate Terms and Reference Names //
///////////////////////////////////////////////////////////////////////////
//= Checks if predicate lexical term is one of several items.
// largely for convenience in grounding commands
bool jhcNetNode::LexIn (const char *v1, const char *v2, const char *v3,
const char *v4, const char *v5, const char *v6) const
{
return(LexMatch(v1) || LexMatch(v2) || LexMatch(v3) || LexMatch(v4) || LexMatch(v5) || LexMatch(v6));
}
//= Get a specific name out of all the names associated with this item.
// if "bth" > 0.0 then only returns non-negated words with belief over threshold
// most recently added terms returned first
const char *jhcNetNode::Name (int i, double bth) const
{
const jhcNetNode *p;
int j, cnt = 0;
if (i >= 0)
for (j = np - 1; j >= 0; j--)
{
p = Prop(j);
if (RoleMatch(j, "ref") && ((bth <= 0.0) || ((p->inv <= 0) && (p->blf >= bth))))
if (cnt++ >= i)
return p->Lex();
}
return NULL;
}
//= Checks if particular name is one of the references associated with this item.
// can alternatively check if the node is definitely NOT associated with some name
bool jhcNetNode::HasName (const char *word, int tru_only) const
{
int i;
if (word != NULL)
for (i = 0; i < np; i++)
if (strcmp(Role(i), "ref") == 0)
if (_stricmp(props[i]->lex, word) == 0)
return((tru_only <= 0) || (props[i]->inv <= 0)); // ignores belief
return false;
}
///////////////////////////////////////////////////////////////////////////
// Writing Functions //
///////////////////////////////////////////////////////////////////////////
//= Get text field sizes needed to represent this node.
// can optionally get sizes for lex nodes (e.g. for bindings)
void jhcNetNode::NodeSize (int& k, int& n) const
{
char num[20];
int len;
len = (int) strlen(base);
k = __max(k, len);
_itoa_s(abs(id), num, 10);
len = (int) strlen(num);
n = __max(n, len);
}
//= Estimate field widths for node kinds, instance numbers, and role names.
// this is specific to style = 0, style = 1 (properties) may be different
// variables k, n, and r need to be initialized externally (e.g. to zero)
void jhcNetNode::TxtSizes (int& k, int& n, int& r) const
{
int i, len;
NodeSize(k, n);
for (i = 0; i < na; i++)
{
args[i]->NodeSize(k, n);
len = (int) strlen(links[i]);
r = __max(r, len);
}
}
//= Report all arguments of this node including tags (no CR on last line).
// adds blank line and indents first line unless lvl < 0
// detail: -2 belief + tags, -1 belief, 0 no extras, 1 default belief, 2 default belief + tags
// always returns abs(lvl) for convenience (no check for file errors)
int jhcNetNode::Save (FILE *out, int lvl, int k, int n, int r, int detail, const jhcGraphlet *acc) const
{
char arrow[80];
int i, j, len, lvl2, kmax = k, nmax = n, rmax = r, ln = 0;
// write out main node identifier
if ((k < 1) || (n < 1) || (r < 1))
TxtSizes(kmax, nmax, rmax);
if (lvl >= 0)
jfprintf(out, "\n%*s", lvl, "");
jfprintf(out, "%*s", kmax + nmax + 1, Nick());
lvl2 = abs(lvl) + kmax + nmax + 1;
// tack on words, negation, and belief
ln = save_tags(out, lvl2, rmax, detail);
// go through all arguments (keep rewriting arrow string)
sprintf_s(arrow, " -%*s-> ", rmax, "");
for (i = 0; i < na; i++)
{
// possibly indent (if no head node)
if (ln++ > 0)
jfprintf(out, "\n%*s", lvl2, "");
// create labeled arrow to other node (strncpy_s would add an extra '\0')
_strnset_s(arrow + 2, sizeof(arrow) - 2, '-', rmax);
len = (int) strlen(links[i]);
for (j = 0; j < len; j++)
arrow[j + 2] = (links[i])[j];
jfputs(arrow, out);
jfprintf(out, "%s", args[i]->Nick());
/*
// parens around arguments which are not in graphlet (for debugging mostly)
if ((acc != NULL) && !acc->InDesc(args[i]))
jfprintf(out, "(%s)", args[i]->Nick());
else
jfprintf(out, "%s", args[i]->Nick());
*/
}
return abs(lvl);
}
//= Writes out lexical terms, negation, and belief (if they exist) for node.
// detail: -2 belief + tags, -1 belief, 0 no extras, 1 default belief, 2 default belief + tags
// returns number of lines written
int jhcNetNode::save_tags (FILE *out, int lvl, int r, int detail) const
{
char txt[10];
int i, ln = 0;
// possibly add associated predicate term
if (*lex != '\0')
{
if (ln++ > 0)
jfprintf(out, "\n%*s", lvl, "");
jfprintf(out, " %*s %s", -(r + 3), "-lex-", lex);
}
// possibly add literal (if exists, usually only part)
if (quote != NULL)
{
if (ln++ > 0)
jfprintf(out, "\n%*s", lvl, "");
jfprintf(out, " %*s %s", -(r + 3), "-str-", quote);
}
// add event (success or failure) and negation lines
if (evt > 0)
{
if (ln++ > 0)
jfprintf(out, "\n%*s", lvl, "");
jfprintf(out, " %*s %d", -(r + 3), "-ach-", ((inv > 0) ? 0 : 1));
}
else if (inv > 0)
{
if (ln++ > 0)
jfprintf(out, "\n%*s", lvl, "");
jfprintf(out, " %*s 1", -(r + 3), "-neg-");
}
// add belief line
if ((detail < 0) && (blf <= 0.0))
{
if (ln++ > 0)
jfprintf(out, "\n%*s", lvl, "");
jfprintf(out, " %*s 0", -(r + 3), "-ext-"); // add -ext- marker
if (blf0 != 1.0)
jfprintf(out, "\n%*s %*s %s", lvl, "", -(r + 3), "-blf-", bfmt(txt, blf0));
}
else if ((detail < 0) && (blf != 1.0) && (quote == NULL))
{
if (ln++ > 0)
jfprintf(out, "\n%*s", lvl, "");
jfprintf(out, " %*s %s", -(r + 3), "-blf-", bfmt(txt, blf));
}
else if ((detail > 0) && (blf0 != 1.0)) // normal mode shows blf0
{
if (ln++ > 0)
jfprintf(out, "\n%*s", lvl, "");
jfprintf(out, " %*s %s", -(r + 3), "-blf-", bfmt(txt, blf0));
}
// add grammatical tags
if ((abs(detail) >= 2) && (tags != 0))
{
if (ln++ > 0)
jfprintf(out, "\n%*s", lvl, "");
jfprintf(out, " %*s", -(r + 3), "-tag-");
for (i = 0; i < JTV_MAX; i++)
if ((tags & (0x01 << i)) != 0)
jfprintf(out, " %s", JTAG_STR[i]);
}
return ln;
}
//= Print belief value with various numbers of digits.
// assumes string passed in is at least 10 chars long
const char *jhcNetNode::bfmt (char *txt, double val) const
{
if (val < 0.0)
sprintf_s(txt, 10, "%6.3f", val);
else if (val == 0.0)
strcpy_s(txt, 10, "0");
else
sprintf_s(txt, 10, "%6.4f", val);
return txt;
} | 26.41453 | 104 | 0.539826 | [
"object"
] |
22c5e63656c5d521099e66d70b9995a4ce1d8aad | 9,730 | cpp | C++ | 3rdParty/iresearch/core/utils/automaton_utils.cpp | rajeev02101987/arangodb | 817e6c04cb82777d266f3b444494140676da98e2 | [
"Apache-2.0"
] | 1 | 2020-07-30T23:33:02.000Z | 2020-07-30T23:33:02.000Z | 3rdParty/iresearch/core/utils/automaton_utils.cpp | rajeev02101987/arangodb | 817e6c04cb82777d266f3b444494140676da98e2 | [
"Apache-2.0"
] | null | null | null | 3rdParty/iresearch/core/utils/automaton_utils.cpp | rajeev02101987/arangodb | 817e6c04cb82777d266f3b444494140676da98e2 | [
"Apache-2.0"
] | null | null | null | ////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2019 ArangoDB GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
/// Copyright holder is ArangoDB GmbH, Cologne, Germany
///
/// @author Andrey Abramov
////////////////////////////////////////////////////////////////////////////////
#include "utils/automaton_utils.hpp"
#include "index/index_reader.hpp"
#include "search/limited_sample_collector.hpp"
#include "utils/fst_table_matcher.hpp"
NS_LOCAL
using namespace irs;
// table contains indexes of states in
// utf8_transitions_builder::rho_states_ table
const automaton::Arc::Label UTF8_RHO_STATE_TABLE[] {
// 1 byte sequence (0-127)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// invalid sequence (128-191)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// 2 bytes sequence (192-223)
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
// 3 bytes sequence (224-239)
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
// 4 bytes sequence (240-255)
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
};
NS_END
NS_ROOT
void utf8_emplace_arc(
automaton& a,
automaton::StateId from,
automaton::StateId rho_state,
const bytes_ref& label,
automaton::StateId to) {
if (fst::kNoStateId == rho_state) {
return utf8_emplace_arc(a, from, label, to);
}
if (label.empty()) {
return;
}
// reserve enough arcs and states (stated ids are sequential)
a.ReserveArcs(from, 256);
const auto id = a.NumStates();
a.AddStates(3 + label.size() - 1);
const automaton::StateId rho_states[] { rho_state, id, id + 1, id + 2 };
const automaton::Arc::Label lead = label.front();
automaton::Arc::Label min = 0;
for (; min < lead; ++min) {
a.EmplaceArc(from, min, rho_states[UTF8_RHO_STATE_TABLE[min]]);
}
switch (label.size()) {
case 1: {
a.EmplaceArc(from, lead, to);
break;
}
case 2: {
const auto s0 = id + 3;
a.EmplaceArc(from, lead, s0);
a.EmplaceArc(s0, label[1], to);
a.EmplaceArc(s0, fst::fsa::kRho, rho_states[0]);
break;
}
case 3: {
const auto s0 = id + 3;
const auto s1 = id + 4;
a.EmplaceArc(from, lead, s0);
a.EmplaceArc(s0, label[1], s1);
a.EmplaceArc(s1, label[2], to);
a.EmplaceArc(s0, fst::fsa::kRho, rho_states[1]);
a.EmplaceArc(s1, fst::fsa::kRho, rho_states[0]);
break;
}
case 4: {
const auto s0 = id + 3;
const auto s1 = id + 4;
const auto s2 = id + 5;
a.EmplaceArc(from, lead, s0);
a.EmplaceArc(s0, label[1], s1);
a.EmplaceArc(s1, label[2], s2);
a.EmplaceArc(s2, label[3], to);
a.EmplaceArc(s0, fst::fsa::kRho, rho_states[2]);
a.EmplaceArc(s1, fst::fsa::kRho, rho_states[1]);
a.EmplaceArc(s2, fst::fsa::kRho, rho_states[0]);
break;
}
}
for (++min; min < 256; ++min) {
a.EmplaceArc(from, min, rho_states[UTF8_RHO_STATE_TABLE[min]]);
}
// connect intermediate states of default multi-byte UTF8 sequence
a.EmplaceArc(rho_states[1], fst::fsa::kRho, rho_states[0]);
a.EmplaceArc(rho_states[2], fst::fsa::kRho, rho_states[1]);
a.EmplaceArc(rho_states[3], fst::fsa::kRho, rho_states[2]);
}
void utf8_emplace_arc(
automaton& a,
automaton::StateId from,
const bytes_ref& label,
automaton::StateId to) {
switch (label.size()) {
case 1: {
a.EmplaceArc(from, label[0], to);
return;
}
case 2: {
const auto s0 = a.AddState();
a.EmplaceArc(from, label[0], s0);
a.EmplaceArc(s0, label[1], to);
return;
}
case 3: {
const auto s0 = a.AddState();
const auto s1 = a.AddState();
a.EmplaceArc(from, label[0], s0);
a.EmplaceArc(s0, label[1], s1);
a.EmplaceArc(s1, label[2], to);
return;
}
case 4: {
const auto s0 = a.AddState();
const auto s1 = a.AddState();
const auto s2 = a.AddState();
a.EmplaceArc(from, label[0], s0);
a.EmplaceArc(s0, label[1], s1);
a.EmplaceArc(s1, label[2], s2);
a.EmplaceArc(s2, label[3], to);
return;
}
}
}
void utf8_emplace_rho_arc(
automaton& a,
automaton::StateId from,
automaton::StateId to) {
const auto id = a.NumStates(); // stated ids are sequential
a.AddStates(3);
const automaton::StateId rho_states[] { to, id, id + 1, id + 2 };
// add rho transitions
for (automaton::Arc::Label label = 0; label < 256; ++label) {
a.EmplaceArc(from, label, rho_states[UTF8_RHO_STATE_TABLE[label]]);
}
// connect intermediate states of default multi-byte UTF8 sequence
a.EmplaceArc(rho_states[1], fst::fsa::kRho, rho_states[0]);
a.EmplaceArc(rho_states[2], fst::fsa::kRho, rho_states[1]);
a.EmplaceArc(rho_states[3], fst::fsa::kRho, rho_states[2]);
}
void utf8_transitions_builder::insert(
automaton& a,
const byte_type* label,
const size_t size,
const automaton::StateId to) {
assert(label && size < 5);
add_states(size); // ensure we have enough states
const size_t prefix = 1 + common_prefix_length(last_.c_str(), last_.size(), label, size);
minimize(a, prefix); // minimize suffix
// add current word suffix
for (size_t i = prefix; i <= size; ++i) {
auto& p = states_[i - 1];
p.arcs.emplace_back(label[i - 1], &states_[i]);
p.rho_id = rho_states_[size - i];
}
const bool is_final = last_.size() != size || prefix != (size + 1);
if (is_final) {
states_[size].id = to;
}
}
void utf8_transitions_builder::finish(automaton& a, automaton::StateId from) {
#ifdef IRESEARCH_DEBUG
auto ensure_empty = make_finally([this]() {
// ensure everything is cleaned up
assert(std::all_of(
states_.begin(), states_.end(), [](const state& s) noexcept {
return s.arcs.empty() &&
s.id == fst::kNoStateId &&
s.rho_id == fst::kNoStateId;
}));
});
#endif
auto& root = states_.front();
minimize(a, 1);
if (fst::kNoStateId == rho_states_[0]) {
// no default state: just add transitions from the
// root node to its successors
for (const auto& arc : root.arcs) {
a.EmplaceArc(from, arc.label, arc.id);
}
root.clear();
return;
}
// reserve enough memory to store all outbound transitions
a.ReserveArcs(from, 256);
// in presence of default state we have to add some extra
// transitions from root to properly handle multi-byte sequences
// and preserve correctness of arcs order
auto add_rho_arc = [&a, from, this](automaton::Arc::Label label) {
const auto rho_state_idx = UTF8_RHO_STATE_TABLE[label];
a.EmplaceArc(from, label, rho_states_[rho_state_idx]);
};
automaton::Arc::Label min = 0;
for (const auto& arc : root.arcs) {
assert(arc.label < 256);
assert(min <= arc.label); // ensure arcs are sorted
for (; min < arc.label; ++min) {
add_rho_arc(min);
}
assert(min == arc.label);
a.EmplaceArc(from, min++, arc.id);
}
root.clear();
// add remaining rho transitions
for (; min < 256; ++min) {
add_rho_arc(min);
}
// connect intermediate states of default multi-byte UTF8 sequence
a.EmplaceArc(rho_states_[1], fst::fsa::kRho, rho_states_[0]);
a.EmplaceArc(rho_states_[2], fst::fsa::kRho, rho_states_[1]);
a.EmplaceArc(rho_states_[3], fst::fsa::kRho, rho_states_[2]);
}
filter::prepared::ptr prepare_automaton_filter(
const string_ref& field,
const automaton& acceptor,
size_t scored_terms_limit,
const index_reader& index,
const order::prepared& order,
boost_t boost) {
auto matcher = make_automaton_matcher(acceptor);
if (fst::kError == matcher.Properties(0)) {
IR_FRMT_ERROR("Expected deterministic, epsilon-free acceptor, "
"got the following properties " IR_UINT64_T_SPECIFIER "",
matcher.GetFst().Properties(automaton_table_matcher::FST_PROPERTIES, false));
return filter::prepared::empty();
}
limited_sample_collector<term_frequency> collector(order.empty() ? 0 : scored_terms_limit); // object for collecting order stats
multiterm_query::states_t states(index.size());
multiterm_visitor<multiterm_query::states_t> mtv(collector, states);
for (const auto& segment : index) {
// get term dictionary for field
const auto* reader = segment.field(field);
if (!reader) {
continue;
}
visit(segment, *reader, matcher, mtv);
}
std::vector<bstring> stats;
collector.score(index, order, stats);
return memory::make_managed<multiterm_query>(
std::move(states), std::move(stats),
boost, sort::MergeType::AGGREGATE);
}
NS_END
| 29.219219 | 130 | 0.60555 | [
"object",
"vector"
] |
22cb2aaea412d63010e877d59293289566711292 | 2,539 | hpp | C++ | include/zeno/Graphics/Circle.hpp | zeno15/zeno | aa97dadde82bb17d54086d17d54254508b7ef39d | [
"MIT"
] | null | null | null | include/zeno/Graphics/Circle.hpp | zeno15/zeno | aa97dadde82bb17d54086d17d54254508b7ef39d | [
"MIT"
] | null | null | null | include/zeno/Graphics/Circle.hpp | zeno15/zeno | aa97dadde82bb17d54086d17d54254508b7ef39d | [
"MIT"
] | null | null | null | #ifndef INCLUDED_ZENO_GRAPHICS_CIRCLE_HPP
#define INCLUDED_ZENO_GRAPHICS_CIRCLE_HPP
#include <zeno/Graphics/Shape.hpp>
////////////////////////////////////////////////////////////
///
/// \namespace zeno
///
////////////////////////////////////////////////////////////
namespace zeno {
////////////////////////////////////////////////////////////
///
/// \brief Class extending Shape allowing for drawing of
/// circles
///
////////////////////////////////////////////////////////////
class Circle : public Shape
{
public:
////////////////////////////////////////////////////////////
///
/// \brief Constructor
///
/// \param _radius Desired radius of the circle
///
/// \param _points Desired number of points to make the
/// circle from
///
////////////////////////////////////////////////////////////
Circle(float _radius, unsigned int _points = 30);
////////////////////////////////////////////////////////////
///
/// \brief Sets the radius of the circle
///
/// \param _radius Desired radius size
///
////////////////////////////////////////////////////////////
void setRadius(float _radius);
////////////////////////////////////////////////////////////
///
/// \brief Sets the number of points to make the circle from
///
/// \param _points Desired number of points to make the
/// circle from
///
////////////////////////////////////////////////////////////
void setPoints(unsigned int _points);
private:
////////////////////////////////////////////////////////////
///
/// \brief Internal method to regenerate the points
///
////////////////////////////////////////////////////////////
void regeneratePoints(void);
private:
unsigned int m_CirclePoints; ///< Number of points the circle is made from
float m_Radius; ///< Radius of the circle
};
} //~ namespace zeno
#endif //~ INCLUDED_ZENO_GRAPHICS_CIRCLE_HPP
////////////////////////////////////////////////////////////
///
/// \class zeno::Circle
/// \ingroup Graphics
///
/// Explanation of how this all works
///
/// \code
///
/// zeno::Circle c(64.0f);
/// c.setPosition(zeno::Vector2f(96.0f, 96.0f));
/// c.setOutlineColour(zeno::Colour::Magenta);
/// c.setOutlineThickness(14.0f);
///
/// p.render(zeno::Mat4x4::Orthographic2D(0.0f, 600.0f, 800.0f, 0.0f);
///
/// \endcode
///
//////////////////////////////////////////////////////////// | 28.852273 | 88 | 0.39425 | [
"render",
"shape"
] |
22cb2dc18faa4af91ce5aa40125b5e51e7d4ed42 | 3,824 | cpp | C++ | src/Text.cpp | markusfisch/PieDock | 070ec545659bca9ddf1e46b0c218ea8d933174ff | [
"MIT"
] | 10 | 2015-01-16T02:29:08.000Z | 2022-02-01T20:34:59.000Z | src/Text.cpp | markusfisch/PieDock | 070ec545659bca9ddf1e46b0c218ea8d933174ff | [
"MIT"
] | 10 | 2015-01-10T12:58:51.000Z | 2021-11-12T00:02:11.000Z | src/Text.cpp | markusfisch/PieDock | 070ec545659bca9ddf1e46b0c218ea8d933174ff | [
"MIT"
] | 7 | 2016-02-16T23:12:46.000Z | 2020-09-21T21:33:52.000Z | #include "Application.h"
#include "Text.h"
#include <string.h>
#include <stdio.h>
#include <string>
#include <stdexcept>
using namespace PieDock;
/**
* Initialize color by string
*
* @param s - color string
*/
Text::Color::Color(const char *s) :
alpha(0xff),
red(0),
green(0),
blue(0) {
// old sscanf still does it best
int n = strlen(s);
switch (n) {
case 6:
sscanf(
s,
"%02x%02x%02x",
&red,
&green,
&blue);
break;
case 8:
sscanf(
s,
"%02x%02x%02x%02x",
&alpha,
&red,
&green,
&blue);
break;
default:
throw std::invalid_argument("invalid color");
}
}
/**
* Text
*
* @param d - display
* @param da - drawable
* @param v - visual
* @param f - font object
*/
Text::Text(Display *d, Drawable da, Visual *v, Text::Font f) :
display(d) {
#ifdef HAVE_XFT
if (!(xftFont = XftFontOpen(
display,
DefaultScreen(display),
XFT_FAMILY,
XftTypeString,
f.getFamily().c_str(),
XFT_SIZE,
XftTypeDouble,
f.getSize(),
NULL)) ||
!(xftDraw = XftDrawCreate(
display,
da,
v,
DefaultColormap(display, DefaultScreen(display))))) {
throw std::invalid_argument("cannot open font");
}
#else
if (!(fontInfo = XLoadQueryFont(display,
const_cast<char *>(f.getFamily().c_str())))) {
throw std::invalid_argument("cannot open font");
}
// set font
{
XGCValues values;
values.font = fontInfo->fid;
gc = XCreateGC(
display,
da,
GCFont,
&values);
}
drawable = da;
#endif
setColor(f.getColor());
}
/**
* Set foreground color
*
* @param c - color object
*/
void Text::setColor(Color c) {
#ifdef HAVE_XFT
translateColor(c, &xftColor);
#else
translateColor(c, &xColor);
#endif
}
/**
* Draw a string into canvas
*
* @param x - x position
* @param y - y position
* @param s - string to write
*/
void Text::draw(const int x, const int y, const std::string s) const {
#ifdef HAVE_XFT
XftDrawStringUtf8(
xftDraw,
&xftColor,
xftFont,
x,
y,
reinterpret_cast<const XftChar8 *>(s.c_str()),
s.length());
#else
XDrawString(
display,
drawable,
gc,
x,
y,
const_cast<char *>(s.c_str()),
s.length());
#endif
}
/**
* Determine metrics of given string
*
* @param s - some string
*/
Text::Metrics Text::getMetrics(const std::string s) const {
#ifdef HAVE_XFT
XGlyphInfo extents;
XftTextExtents8(
display,
xftFont,
reinterpret_cast<const XftChar8 *>(s.c_str()),
s.length(),
&extents);
return Metrics(
extents.x,
extents.y,
extents.width,
extents.height);
#else
int direction;
int ascent;
int descent;
XCharStruct overall;
XQueryTextExtents(
display,
fontInfo->fid,
const_cast<char *>(s.c_str()),
s.length(),
&direction,
&ascent,
&descent,
&overall);
return Metrics(
0,
overall.ascent,
overall.width,
overall.ascent+overall.descent);
#endif
}
/**
* Transform color object into a XftColor
*
* @param src - source color
* @param dest - destination color
*/
#ifdef HAVE_XFT
void Text::translateColor(const Text::Color &src, XftColor *dest)
#else
void Text::translateColor(const Text::Color &src, XColor *dest)
#endif
{
#ifdef HAVE_XFT
XRenderColor renderColor;
renderColor.red = src.getRed() * 257;
renderColor.green = src.getGreen() * 257;
renderColor.blue = src.getBlue() * 257;
renderColor.alpha = src.getAlpha() * 257;
XftColorAllocValue(
display,
DefaultVisual(display, DefaultScreen(display)),
DefaultColormap(display, DefaultScreen(display)),
&renderColor,
dest);
#else
XGCValues values;
dest->red = src.getRed() * 257;
dest->green = src.getGreen() * 257;
dest->blue = src.getBlue() * 257;
XAllocColor(
display,
DefaultColormap(display, DefaultScreen(display)),
dest);
values.foreground = dest->pixel;
XChangeGC(
display,
gc,
GCForeground,
&values);
#endif
}
| 16.27234 | 70 | 0.648536 | [
"object",
"transform"
] |
22cd54b772b984c1765633644af2d8800cf3990c | 13,706 | cpp | C++ | src/cbag/oa/database.cpp | growly/cbag | 468bf580223490a8ce0769471e25abf936b56a4e | [
"Apache-2.0",
"BSD-3-Clause"
] | 7 | 2020-02-13T21:51:04.000Z | 2021-12-11T10:01:45.000Z | src/cbag/oa/database.cpp | growly/cbag | 468bf580223490a8ce0769471e25abf936b56a4e | [
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2019-06-03T19:05:14.000Z | 2020-03-17T22:59:36.000Z | src/cbag/oa/database.cpp | growly/cbag | 468bf580223490a8ce0769471e25abf936b56a4e | [
"Apache-2.0",
"BSD-3-Clause"
] | 5 | 2019-06-03T17:02:46.000Z | 2020-09-01T23:03:01.000Z | // SPDX-License-Identifier: BSD-3-Clause AND Apache-2.0
/*
Copyright (c) 2018, Regents of the University of California
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright 2019 Blue Cheetah Analog Design Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include <fstream>
#include <tuple>
#include <cbag/logging/logging.h>
#include <yaml-cpp/yaml.h>
#include <cbag/util/sorted_map.h>
#include <cbag/layout/cellview.h>
#include <cbag/schematic/cellview.h>
#include <cbag/schematic/instance.h>
#include <cbag/util/io.h>
#include <cbag/oa/database.h>
#include <cbag/oa/read.h>
#include <cbag/oa/read_lib.h>
#include <cbag/oa/util.h>
#include <cbag/oa/write.h>
#include <cbag/oa/write_lib.h>
namespace cbagoa {
using oa_lay_purp_t = std::pair<oa::oaLayerNum, oa::oaPurposeNum>;
using oa_via_lay_purp_t = std::tuple<oa_lay_purp_t, oa_lay_purp_t, oa_lay_purp_t>;
LibDefObserver::LibDefObserver(oa::oaUInt4 priority)
: oa::oaObserver<oa::oaLibDefList>(priority, true) {}
oa::oaBoolean LibDefObserver::onLoadWarnings(oa::oaLibDefList *obj, const oa::oaString &msg,
oa::oaLibDefListWarningTypeEnum type) {
err_msg = "OA Error: " + std::string(msg);
return true;
}
database::database(std::string lib_def_fname)
: lib_def_file_(std::move(lib_def_fname)), logger(cbag::get_cbag_logger()) {
try {
oaDesignInit(oacAPIMajorRevNumber, oacAPIMinorRevNumber, oacDataModelRevNumber);
logger->info("Creating new database with file: {}", lib_def_file_);
oa::oaLibDefList::openLibs(lib_def_file_.c_str());
if (!lib_def_obs_.err_msg.empty()) {
throw std::runtime_error(lib_def_obs_.err_msg);
}
} catch (...) {
handle_oa_exceptions(*logger);
}
}
database::~database() {
try {
logger->info("Closing all OA libraries from definition file: {}", lib_def_file_);
oa::oaIter<oa::oaLib> lib_iter(oa::oaLib::getOpenLibs());
oa::oaLib *lib_ptr;
while ((lib_ptr = lib_iter.getNext()) != nullptr) {
oa::oaString tmp_str;
lib_ptr->getName(ns, tmp_str);
lib_ptr->close();
}
} catch (...) {
handle_oa_exceptions(*logger);
}
}
void database::add_yaml_path(const std::string &lib_name, std::string yaml_path) {
yaml_path_map.insert_or_assign(lib_name, std::move(yaml_path));
}
void database::add_primitive_lib(std::string lib_name) {
primitive_libs.insert(std::move(lib_name));
}
bool database::is_primitive_lib(const std::string &lib_name) const {
return primitive_libs.find(lib_name) != primitive_libs.end();
}
std::vector<std::string> database::get_cells_in_lib(const std::string &lib_name) const {
std::vector<std::string> ans;
cbagoa::get_cells(ns_native, *logger, lib_name, std::back_inserter(ans));
return ans;
}
std::string database::get_lib_path(const std::string &lib_name) const {
std::string ans;
try {
oa::oaScalarName lib_name_oa = oa::oaScalarName(ns_native, lib_name.c_str());
oa::oaLib *lib_ptr = oa::oaLib::find(lib_name_oa);
if (lib_ptr == nullptr) {
throw std::invalid_argument(fmt::format("Cannot find library {}", lib_name));
}
oa::oaString tmp_str;
lib_ptr->getFullPath(tmp_str);
return {tmp_str};
} catch (...) {
handle_oa_exceptions(*logger);
}
// should never get here
return "";
}
void database::create_lib(const std::string &lib_name, const std::string &lib_path,
const std::string &tech_lib) const {
try {
logger->info("Creating OA library {}", lib_name);
// open library
oa::oaScalarName lib_name_oa = oa::oaScalarName(ns_native, lib_name.c_str());
oa::oaLib *lib_ptr = oa::oaLib::find(lib_name_oa);
if (lib_ptr == nullptr) {
// append library name to lib_path
auto new_lib_path = cbag::util::join(lib_path, lib_name);
cbag::util::make_parent_dirs(new_lib_path);
// create new library
logger->info("Creating library {} at path {}, with tech lib {}", lib_name,
new_lib_path.c_str(), tech_lib);
oa::oaScalarName oa_tech_lib(ns_native, tech_lib.c_str());
lib_ptr = oa::oaLib::create(lib_name_oa, new_lib_path.c_str());
oa::oaTech::attach(lib_ptr, oa_tech_lib);
// NOTE: I cannot get open access to modify the library file, so
// we just do it by hand.
std::ofstream outfile;
outfile.open(lib_def_file_, std::ios_base::app);
outfile << "DEFINE " << lib_name << " " << new_lib_path.c_str() << std::endl;
outfile.close();
// Create cdsinfo.tag file
new_lib_path /= "cdsinfo.tag";
outfile.open(new_lib_path.c_str(), std::ios_base::out);
outfile << "CDSLIBRARY" << std::endl;
outfile << "NAMESPACE LibraryUnix" << std::endl;
outfile.close();
} else {
logger->info("Library already exists, do nothing.");
}
} catch (...) {
handle_oa_exceptions(*logger);
}
}
cbag::sch::cellview database::read_sch_cellview(const std::string &lib_name,
const std::string &cell_name,
const std::string &view_name) const {
try {
return cbagoa::read_sch_cellview(ns_native, ns, *logger, lib_name, cell_name, view_name,
primitive_libs);
} catch (...) {
handle_oa_exceptions(*logger);
throw;
}
}
std::vector<cell_key_t> database::read_sch_recursive(const std::string &lib_name,
const std::string &cell_name,
const std::string &view_name) const {
std::vector<cell_key_t> ans;
cbagoa::read_sch_recursive(ns_native, ns, *logger, lib_name, cell_name, view_name,
yaml_path_map, primitive_libs, std::back_inserter(ans));
return ans;
}
std::vector<cell_key_t> database::read_library(const std::string &lib_name,
const std::string &view_name) const {
std::vector<cell_key_t> ans;
cbagoa::read_library(ns_native, ns, *logger, lib_name, view_name, yaml_path_map, primitive_libs,
std::back_inserter(ans));
return ans;
}
void database::write_sch_cellview(const std::string &lib_name, const std::string &cell_name,
const std::string &view_name, bool is_sch,
const cbag::sch::cellview &cv,
const str_map_t *rename_map) const {
try {
cbagoa::write_sch_cellview(ns_native, ns, *logger, lib_name, cell_name, view_name, is_sch,
cv, rename_map);
} catch (...) {
handle_oa_exceptions(*logger);
}
}
void database::write_lay_cellview(const std::string &lib_name, const std::string &cell_name,
const std::string &view_name, const cbag::layout::cellview &cv,
oa::oaTech *tech, const str_map_t *rename_map) const {
try {
cbagoa::write_lay_cellview(ns_native, ns, *logger, lib_name, cell_name, view_name, cv, tech,
rename_map);
} catch (...) {
handle_oa_exceptions(*logger);
}
}
void database::implement_sch_list(const std::string &lib_name, const std::string &sch_view,
const std::string &sym_view,
const std::vector<sch_cv_info> &cv_list) const {
cbagoa::implement_sch_list<std::vector<sch_cv_info>>(ns_native, ns, *logger, lib_name, sch_view,
sym_view, cv_list);
}
void database::implement_lay_list(const std::string &lib_name, const std::string &view,
const std::vector<lay_cv_info> &cv_list) const {
cbagoa::implement_lay_list<std::vector<lay_cv_info>>(ns_native, ns, *logger, lib_name, view,
cv_list);
} // namespace cbagoa
void database::write_tech_info_file(const std::string &fname, const std::string &tech_lib,
const std::string &pin_purpose) const {
oa::oaTech *tech_ptr = read_tech(ns_native, tech_lib);
// read layer/purpose/via mappings
cbag::util::sorted_map<oa::oaLayerNum, std::string> lay_map;
cbag::util::sorted_map<oa::oaPurposeNum, std::string> pur_map;
cbag::util::sorted_map<oa_via_lay_purp_t, std::string> via_map;
oa::oaString tmp;
oa::oaIter<oa::oaLayer> lay_iter(tech_ptr->getLayers());
oa::oaLayer *lay;
while ((lay = lay_iter.getNext()) != nullptr) {
lay->getName(tmp);
lay_map.emplace(lay->getNumber(), std::string(tmp));
}
oa::oaIter<oa::oaPurpose> pur_iter(tech_ptr->getPurposes());
oa::oaPurpose *pur;
while ((pur = pur_iter.getNext()) != nullptr) {
pur->getName(tmp);
pur_map.emplace(pur->getNumber(), std::string(tmp));
}
oa::oaIter<oa::oaViaDef> via_iter(tech_ptr->getViaDefs());
oa::oaStdViaDef *via;
auto def_purp = oa::oaPurpose::get(tech_ptr, oa::oacDrawingPurposeType)->getNumber();
while ((via = reinterpret_cast<oa::oaStdViaDef *>(via_iter.getNext())) != nullptr) {
via->getName(tmp);
oa::oaViaParam via_params;
via->getParams(via_params);
via_map.emplace(std::make_tuple(std::make_pair(via->getLayer1Num(), def_purp),
std::make_pair(via_params.getCutLayer(), def_purp),
std::make_pair(via->getLayer2Num(), def_purp)),
std::string(tmp));
}
// emit to YAML
YAML::Emitter out;
out.SetSeqFormat(YAML::Flow);
out << YAML::BeginMap;
out << YAML::Key << "options" << YAML::Value;
out << YAML::BeginMap;
out << YAML::Key << "default_purpose" << YAML::Value << "drawing";
out << YAML::Key << "pin_purpose" << YAML::Value << pin_purpose;
out << YAML::Key << "make_pin_obj" << YAML::Value << true;
out << YAML::EndMap;
out << YAML::Key << "layer" << YAML::Value;
out << YAML::BeginMap;
for (auto const & [ lay_id, lay_name ] : lay_map) {
out << YAML::Key << lay_name << YAML::Value << lay_id;
}
out << YAML::EndMap;
out << YAML::Key << "purpose" << YAML::Value;
out << YAML::BeginMap;
for (auto const & [ purp_id, purp_name ] : pur_map) {
out << YAML::Key << purp_name << YAML::Value << purp_id;
}
out << YAML::EndMap;
out << YAML::Key << "via_layers" << YAML::Value;
out << YAML::BeginMap;
for (auto const & [ v_lay_purp_tuple, via_id ] : via_map) {
auto & [ lay1_key, cut_key, lay2_key ] = v_lay_purp_tuple;
out << YAML::Key << via_id << YAML::Value;
out << YAML::Block << YAML::BeginSeq;
out << YAML::Flow << YAML::BeginSeq << lay1_key.first << lay1_key.second << YAML::EndSeq
<< YAML::Block;
out << YAML::Flow << YAML::BeginSeq << cut_key.first << cut_key.second << YAML::EndSeq
<< YAML::Block;
out << YAML::Flow << YAML::BeginSeq << lay2_key.first << lay2_key.second << YAML::EndSeq
<< YAML::Block;
out << YAML::EndSeq << YAML::Flow;
}
out << YAML::EndMap;
out << YAML::EndMap;
// write to file
std::ofstream out_file = cbag::util::open_file_write(fname);
out_file << out.c_str();
out_file.close();
}
} // namespace cbagoa
| 39.612717 | 100 | 0.622136 | [
"vector"
] |
22d544f25600264a7cda154b96d1e3a8310ffac5 | 17,633 | cpp | C++ | samples/06_lightmapping/graphicsLayer.cpp | giordi91/SirMetal | 394b973a78faec2fec54479f895802ddb1e580c1 | [
"MIT"
] | 25 | 2020-08-10T20:42:14.000Z | 2021-12-16T00:08:56.000Z | samples/06_lightmapping/graphicsLayer.cpp | giordi91/SirMetal | 394b973a78faec2fec54479f895802ddb1e580c1 | [
"MIT"
] | 1 | 2021-04-02T21:14:48.000Z | 2021-04-28T10:57:17.000Z | sandbox/graphicsLayer.cpp | giordi91/SirMetal | 394b973a78faec2fec54479f895802ddb1e580c1 | [
"MIT"
] | 2 | 2021-01-12T20:08:16.000Z | 2021-01-20T10:22:28.000Z | #include "graphicsLayer.h"
#import <Metal/Metal.h>
#import <QuartzCore/CAMetalLayer.h>
#include <SirMetal/core/mathUtils.h>
#include "SirMetal/application/window.h"
#include "SirMetal/core/input.h"
#include "SirMetal/engine.h"
#include "SirMetal/graphics/blit.h"
#include "SirMetal/graphics/constantBufferManager.h"
#include "SirMetal/graphics/debug/debugRenderer.h"
#include "SirMetal/graphics/debug/imgui/imgui.h"
#include "SirMetal/graphics/debug/imguiRenderer.h"
#include "SirMetal/graphics/materialManager.h"
#include "SirMetal/resources/meshes/meshManager.h"
#include "SirMetal/resources/shaderManager.h"
#include <SirMetal/resources/textureManager.h>
static const char *rts[] = {"GPositions", "GUVs","lightMap"};
struct RtCamera {
simd_float4x4 VPinverse;
vector_float3 position;
vector_float3 right;
vector_float3 up;
vector_float3 forward;
};
struct Uniforms {
unsigned int width;
unsigned int height;
unsigned int frameIndex;
unsigned int lightMapSize;
RtCamera camera;
};
constexpr int kMaxInflightBuffers = 3;
id createComputePipeline(id<MTLDevice> device, id function) {
// Create compute pipelines will will execute code on the GPU
MTLComputePipelineDescriptor *computeDescriptor =
[[MTLComputePipelineDescriptor alloc] init];
// Set to YES to allow compiler to make certain optimizations
computeDescriptor.threadGroupSizeIsMultipleOfThreadExecutionWidth = YES;
// Generates rays according to view/projection matrices
computeDescriptor.computeFunction = function;
NSError *error = nullptr;
id toReturn = [device newComputePipelineStateWithDescriptor:computeDescriptor
options:0
reflection:nil
error:&error];
if (!toReturn) NSLog(@"Failed to create pipeline state: %@", error);
return toReturn;
}
namespace Sandbox {
void GraphicsLayer::onAttach(SirMetal::EngineContext *context) {
m_engine = context;
// initializing the camera to the identity
m_camera.viewMatrix = matrix_float4x4_translation(vector_float3{0, 0, 0});
m_camera.fov = M_PI / 4;
m_camera.nearPlane = 0.01;
m_camera.farPlane = 60;
m_cameraController.setCamera(&m_camera);
m_cameraController.setPosition(0, 1, 12);
m_camConfig = {1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.2, 0.008};
m_camUniformHandle = m_engine->m_constantBufferManager->allocate(
m_engine, sizeof(SirMetal::Camera),
SirMetal::CONSTANT_BUFFER_FLAGS_BITS::CONSTANT_BUFFER_FLAG_BUFFERED);
m_uniforms = m_engine->m_constantBufferManager->allocate(
m_engine, sizeof(Uniforms),
SirMetal::CONSTANT_BUFFER_FLAGS_BITS::CONSTANT_BUFFER_FLAG_BUFFERED);
const std::string base = m_engine->m_config.m_dataSourcePath + "/sandbox";
// let us load the gltf file
struct SirMetal::GLTFLoadOptions options;
options.flags = SirMetal::GLTFLoadFlags::GLTF_LOAD_FLAGS_FLATTEN_HIERARCHY |
SirMetal::GLTF_LOAD_FLAGS_GENERATE_LIGHT_MAP_UVS;
options.lightMapSize = lightMapSize;
SirMetal::loadGLTF(m_engine, (base + +"/test.glb").c_str(), m_asset, options);
id<MTLDevice> device = m_engine->m_renderingContext->getDevice();
assert(device.supportsRaytracing == true &&
"This device does not support raytracing API, you can try samples based on MPS");
m_shaderHandle =
m_engine->m_shaderManager->loadShader((base + "/Shaders.metal").c_str());
m_fullScreenHandle =
m_engine->m_shaderManager->loadShader((base + "/fullscreen.metal").c_str());
m_lightMapper.initialize(m_engine, (base + "/gbuff.metal").c_str(),(base + "/gbuffClear.metal").c_str(),
(base + "/rtLightMap.metal").c_str());
m_lightMapper.setAssetData(context, &m_asset, lightMapSize);
recordRasterArgBuffer();
SirMetal::AllocTextureRequest requestDepth{m_engine->m_config.m_windowConfig.m_width,
m_engine->m_config.m_windowConfig.m_height,
1,
MTLTextureType2D,
MTLPixelFormatDepth32Float_Stencil8,
MTLTextureUsageRenderTarget |
MTLTextureUsageShaderRead,
MTLStorageModePrivate,
1,
"depthTexture"};
m_depthHandle = m_engine->m_textureManager->allocate(device, requestDepth);
SirMetal::graphics::initImgui(m_engine);
frameBoundarySemaphore = dispatch_semaphore_create(kMaxInflightBuffers);
// this is to flush the gpu, should figure out why is not actually flushing
// properly
m_engine->m_renderingContext->flush();
generateRandomTexture(lightMapSize, lightMapSize);
MTLArgumentBuffersTier tier = [device argumentBuffersSupport];
assert(tier == MTLArgumentBuffersTier2);
}
void GraphicsLayer::onDetach() {}
bool GraphicsLayer::updateUniformsForView(float screenWidth, float screenHeight,
uint32_t lightMapSize) {
SirMetal::Input *input = m_engine->m_inputManager;
bool updated = false;
if (!ImGui::GetIO().WantCaptureMouse) {
updated = m_cameraController.update(m_camConfig, input);
}
m_cameraController.updateProjection(screenWidth, screenHeight);
m_engine->m_constantBufferManager->update(m_engine, m_camUniformHandle, &m_camera);
// update rt uniform
Uniforms u{};
u.camera.VPinverse = m_camera.VPInverse;
simd_float4 pos = m_camera.viewMatrix.columns[3];
u.camera.position = simd_float3{pos.x, pos.y, pos.z};
simd_float4 f = simd_normalize(-m_camera.viewMatrix.columns[2]);
u.camera.forward = simd_float3{f.x, f.y, f.z};
simd_float4 up = simd_normalize(m_camera.viewMatrix.columns[1]);
u.camera.up = simd_float3{up.x, up.y, up.z};
simd_float4 right = simd_normalize(m_camera.viewMatrix.columns[0]);
u.camera.right = simd_normalize(simd_float3{right.x, right.y, right.z});
u.frameIndex = m_lightMapper.m_rtSampleCounter;
u.height = m_engine->m_config.m_windowConfig.m_height;
u.width = m_engine->m_config.m_windowConfig.m_width;
u.lightMapSize = lightMapSize;
// TODO add light data
// u.light ...
m_engine->m_constantBufferManager->update(m_engine, m_uniforms, &u);
return updated;
}
void GraphicsLayer::onUpdate() {
// NOTE: very temp ESC handy to close the game
if (m_engine->m_inputManager->isKeyDown(SDL_SCANCODE_ESCAPE)) {
SDL_Event sdlevent{};
sdlevent.type = SDL_QUIT;
SDL_PushEvent(&sdlevent);
}
CAMetalLayer *swapchain = m_engine->m_renderingContext->getSwapchain();
id<MTLCommandQueue> queue = m_engine->m_renderingContext->getQueue();
// waiting for resource
dispatch_semaphore_wait(frameBoundarySemaphore, DISPATCH_TIME_FOREVER);
id<CAMetalDrawable> surface = [swapchain nextDrawable];
id<MTLTexture> texture = surface.texture;
float w = texture.width;
float h = texture.height;
updateUniformsForView(w, h, lightMapSize);
id<MTLCommandBuffer> commandBuffer = [queue commandBuffer];
if (m_lightMapper.m_rtSampleCounter < m_lightMapper.m_requestedSamples) {
m_lightMapper.bakeNextSample(m_engine, commandBuffer, m_uniforms, m_randomTexture);
}
SirMetal::graphics::DrawTracker tracker{};
tracker.renderTargets[0] = texture;
tracker.depthTarget = m_engine->m_textureManager->getNativeFromHandle(m_depthHandle);
SirMetal::PSOCache cache =
SirMetal::getPSO(m_engine, tracker, SirMetal::Material{"Shaders", false});
// blitting to the swap chain
MTLRenderPassDescriptor *passDescriptor =
[MTLRenderPassDescriptor renderPassDescriptor];
passDescriptor.colorAttachments[0].texture = texture;
passDescriptor.colorAttachments[0].clearColor = {0.2, 0.2, 0.2, 1.0};
passDescriptor.colorAttachments[0].storeAction = MTLStoreActionStore;
passDescriptor.colorAttachments[0].loadAction = MTLLoadActionClear;
MTLRenderPassDepthAttachmentDescriptor *depthAttachment =
passDescriptor.depthAttachment;
depthAttachment.texture =
m_engine->m_textureManager->getNativeFromHandle(m_depthHandle);
depthAttachment.clearDepth = 1.0;
depthAttachment.storeAction = MTLStoreActionDontCare;
depthAttachment.loadAction = MTLLoadActionClear;
id<MTLRenderCommandEncoder> commandEncoder =
[commandBuffer renderCommandEncoderWithDescriptor:passDescriptor];
doRasterRender(commandEncoder, cache);
if (debugFullScreen) {
SirMetal::graphics::BlitRequest request{};
switch (currentDebug) {
case 0:
request.srcTexture = m_lightMapper.m_gbuff[0];
break;
case 1:
request.srcTexture = m_lightMapper.m_gbuff[1];
break;
case 2:
request.srcTexture = m_lightMapper.m_lightMap;
break;
}
request.dstTexture = texture;
request.customView = 0;
request.customScissor = 0;
SirMetal::graphics::doBlit(m_engine, commandEncoder, request);
}
// render debug
m_engine->m_debugRenderer->newFrame();
float data[6]{0, 0, 0, 0, 100, 0};
m_engine->m_debugRenderer->drawLines(data, sizeof(float) * 6,
vector_float4{1, 0, 0, 1});
m_engine->m_debugRenderer->render(m_engine, commandEncoder, tracker, m_camUniformHandle,
300, 300);
// ui
SirMetal::graphics::imguiNewFrame(m_engine, passDescriptor);
renderDebugWindow();
SirMetal::graphics::imguiEndFrame(commandBuffer, commandEncoder);
[commandEncoder endEncoding];
[commandBuffer addCompletedHandler:^(id<MTLCommandBuffer> commandBuffer) {
// GPU work is complete
// Signal the semaphore to start the CPU work
dispatch_semaphore_signal(frameBoundarySemaphore);
}];
[commandBuffer presentDrawable:surface];
[commandBuffer commit];
SDL_RenderPresent(m_engine->m_renderingContext->getRenderer());
//}
}
bool GraphicsLayer::onEvent(SirMetal::Event &) {
// TODO start processing events the game cares about, like
// etc...
return false;
}
void GraphicsLayer::clear() {
m_engine->m_renderingContext->flush();
SirMetal::graphics::shutdownImgui();
}
void GraphicsLayer::renderDebugWindow() {
static bool p_open = false;
if (m_engine->m_inputManager->isKeyReleased(SDL_SCANCODE_GRAVE)) { p_open = !p_open; }
if (!p_open) { return; }
ImGui::SetNextWindowPos(ImVec2(0, 0), ImGuiCond_Once);
if (ImGui::Begin("Debug", &p_open, 0)) {
m_gpuInfo.render(m_engine->m_renderingContext->getDevice());
m_timingsWidget.render(m_engine);
//lets render the pathracer stuff
if (ImGui::CollapsingHeader("LightMapper")) {
ImGui::SliderInt("Number of samples", &m_lightMapper.m_requestedSamples, 0, 4000);
ImGui::Separator();
//bake button
bool isDone = m_lightMapper.m_rtSampleCounter == m_lightMapper.m_requestedSamples;
if (isDone) { ImGui::PushStyleColor(0, ImVec4(0, 1, 0, 1)); }
if (ImGui::Button("Bake lightmap")) { m_lightMapper.m_rtSampleCounter = 0; }
if (isDone) { ImGui::PopStyleColor(1); }
ImGui::PushItemWidth(50.0f);
ImGui::DragInt("Samples done", &m_lightMapper.m_rtSampleCounter, 0.0f);
ImGui::PopItemWidth();
ImGui::Separator();
ImGui::Checkbox("Debug full screen", &debugFullScreen);
if (debugFullScreen) { ImGui::Combo("Target", ¤tDebug, rts, 3); }
}
}
ImGui::End();
}
void GraphicsLayer::generateRandomTexture(uint32_t w, uint32_t h) {
// Create a render target which the shading kernel can write to
MTLTextureDescriptor *renderTargetDescriptor = [[MTLTextureDescriptor alloc] init];
renderTargetDescriptor.textureType = MTLTextureType2D;
renderTargetDescriptor.width = w;
renderTargetDescriptor.height = h;
// Stored in private memory because it will only be read and written from the
// GPU
renderTargetDescriptor.storageMode = MTLStorageModeManaged;
renderTargetDescriptor.pixelFormat = MTLPixelFormatR32Uint;
renderTargetDescriptor.usage = MTLTextureUsageShaderRead;
// Generate a texture containing a random integer value for each pixel. This
// value will be used to decorrelate pixels while drawing pseudorandom numbers
// from the Halton sequence.
m_randomTexture = [m_engine->m_renderingContext->getDevice()
newTextureWithDescriptor:renderTargetDescriptor];
auto *randomValues = static_cast<uint32_t *>(malloc(sizeof(uint32_t) * w * h));
for (int i = 0; i < w * h; i++) randomValues[i] = rand() % (1024 * 1024);
[m_randomTexture replaceRegion:MTLRegionMake2D(0, 0, w, h)
mipmapLevel:0
withBytes:randomValues
bytesPerRow:sizeof(uint32_t) * w];
free(randomValues);
}
void GraphicsLayer::recordRasterArgBuffer() {
id<MTLDevice> device = m_engine->m_renderingContext->getDevice();
// args buffer
id<MTLFunction> fn = m_engine->m_shaderManager->getVertexFunction(m_shaderHandle);
id<MTLArgumentEncoder> argumentEncoder = [fn newArgumentEncoderWithBufferIndex:0];
id<MTLFunction> fnFrag = m_engine->m_shaderManager->getFragmentFunction(m_shaderHandle);
id<MTLArgumentEncoder> argumentEncoderFrag =
[fnFrag newArgumentEncoderWithBufferIndex:0];
int meshesCount = m_asset.models.size();
int buffInstanceSize = argumentEncoder.encodedLength;
m_argBuffer = [device newBufferWithLength:buffInstanceSize * meshesCount options:0];
int buffInstanceSizeFrag = argumentEncoderFrag.encodedLength;
m_argBufferFrag =
[device newBufferWithLength:buffInstanceSizeFrag * meshesCount options:0];
for (int i = 0; i < meshesCount; ++i) {
[argumentEncoder setArgumentBuffer:m_argBuffer offset:i * buffInstanceSize];
const auto *meshData = m_engine->m_meshManager->getMeshData(m_asset.models[i].mesh);
[argumentEncoder setBuffer:meshData->vertexBuffer
offset:meshData->ranges[0].m_offset
atIndex:0];
[argumentEncoder setBuffer:meshData->vertexBuffer
offset:meshData->ranges[1].m_offset
atIndex:1];
[argumentEncoder setBuffer:meshData->vertexBuffer
offset:meshData->ranges[2].m_offset
atIndex:2];
[argumentEncoder setBuffer:meshData->vertexBuffer
offset:meshData->ranges[3].m_offset
atIndex:3];
[argumentEncoder setBuffer:meshData->vertexBuffer
offset:meshData->ranges[4].m_offset
atIndex:4];
const auto &material = m_asset.materials[i];
[argumentEncoderFrag setArgumentBuffer:m_argBufferFrag
offset:i * buffInstanceSizeFrag];
id albedo;
albedo = m_engine->m_textureManager->getNativeFromHandle(m_lightMapper.m_lightMap);
//}
[argumentEncoderFrag setTexture:albedo atIndex:0];
auto *ptr = [argumentEncoderFrag constantDataAtIndex:1];
float matData[8]{};
matData[0] = material.colorFactors.x;
matData[1] = material.colorFactors.y;
matData[2] = material.colorFactors.z;
matData[3] = material.colorFactors.w;
//uv offset for lightmap
const auto &packResult = m_lightMapper.getPackResult();
float wratio = static_cast<float>(packResult.rectangles[i].w) /
static_cast<float>(packResult.w);
float hratio = static_cast<float>(packResult.rectangles[i].h) /
static_cast<float>(packResult.h);
float xoff = static_cast<float>(packResult.rectangles[i].x) /
static_cast<float>(packResult.w);
float yoff = static_cast<float>(packResult.rectangles[i].y) /
static_cast<float>(packResult.h);
matData[4] = wratio;
matData[5] = hratio;
matData[6] = xoff;
matData[7] = yoff;
memcpy(ptr, &matData, sizeof(float) * 8);
}
}
void GraphicsLayer::doRasterRender(id<MTLRenderCommandEncoder> commandEncoder,
const SirMetal::PSOCache &cache) {
[commandEncoder setRenderPipelineState:cache.color];
[commandEncoder setDepthStencilState:cache.depth];
[commandEncoder setFrontFacingWinding:MTLWindingCounterClockwise];
[commandEncoder setCullMode:MTLCullModeNone];
SirMetal::BindInfo info =
m_engine->m_constantBufferManager->getBindInfo(m_engine, m_camUniformHandle);
[commandEncoder setVertexBuffer:info.buffer offset:info.offset atIndex:4];
//setting the arguments buffer
[commandEncoder setVertexBuffer:m_argBuffer offset:0 atIndex:0];
[commandEncoder setFragmentBuffer:m_argBufferFrag offset:0 atIndex:0];
int counter = 0;
for (auto &mesh : m_asset.models) {
if (!mesh.mesh.isHandleValid()) continue;
const SirMetal::MeshData *meshData = m_engine->m_meshManager->getMeshData(mesh.mesh);
auto *data = (void *) (&mesh.matrix);
//[commandEncoder useResource: m_engine->m_textureManager->getNativeFromHandle(mesh.material.colorTexture) usage:MTLResourceUsageSample];
[commandEncoder setVertexBytes:data length:16 * 4 atIndex:5];
[commandEncoder setVertexBytes:&counter length:4 atIndex:6];
[commandEncoder drawIndexedPrimitives:MTLPrimitiveTypeTriangle
indexCount:meshData->primitivesCount
indexType:MTLIndexTypeUInt32
indexBuffer:meshData->indexBuffer
indexBufferOffset:0];
counter++;
}
}
}// namespace Sandbox
| 37.839056 | 141 | 0.695004 | [
"mesh",
"render"
] |
22ddba1dd04f27aecb3970bff62fb517fef0b72b | 3,968 | hpp | C++ | legacy/galaxy/map/tile/Tile.hpp | reworks/rework | 90508252c9a4c77e45a38e7ce63cfd99f533f42b | [
"Apache-2.0"
] | 19 | 2020-02-02T16:36:46.000Z | 2021-12-25T07:02:28.000Z | legacy/galaxy/map/tile/Tile.hpp | reworks/rework | 90508252c9a4c77e45a38e7ce63cfd99f533f42b | [
"Apache-2.0"
] | 103 | 2020-10-13T09:03:42.000Z | 2022-03-26T03:41:50.000Z | legacy/galaxy/map/tile/Tile.hpp | reworks/rework | 90508252c9a4c77e45a38e7ce63cfd99f533f42b | [
"Apache-2.0"
] | 5 | 2020-03-13T06:14:37.000Z | 2021-12-12T02:13:46.000Z | ///
/// Tile.hpp
/// galaxy
///
/// Refer to LICENSE.txt for more details.
///
#ifndef GALAXY_MAP_TILE_TILE_HPP_
#define GALAXY_MAP_TILE_TILE_HPP_
#include <optional>
#include "galaxy/map/layer/ObjectLayer.hpp"
#include "galaxy/map/types/Frame.hpp"
namespace galaxy
{
namespace map
{
///
/// A tile on a tileset.
///
class Tile final
{
friend class Tileset;
public:
///
/// Constructor.
///
Tile() noexcept;
///
/// Parse constructor.
///
/// \param json JSON structure/array containing tile json.
///
explicit Tile(const nlohmann::json& json);
///
/// Destructor.
///
~Tile() noexcept;
///
/// Parses json structure to member values; etc.
///
/// \param json JSON structure containing tile json.
///
void parse(const nlohmann::json& json);
///
/// Get animation frames.
///
/// \return Std::vector array.
///
[[nodiscard]] const std::vector<Frame>& get_animations() const noexcept;
///
/// Get local tile id.
///
/// \return Const int.
///
[[nodiscard]] const int get_id() const noexcept;
///
/// Get image representing the tile.
///
/// \return Const std::string reference.
///
[[nodiscard]] const std::string& get_image() const noexcept;
///
/// Height of the tile.
///
/// \return Const int. In pixels.
///
[[nodiscard]] const int get_image_height() const noexcept;
///
/// Width of the tile.
///
/// \return Const int. In pixels.
///
[[nodiscard]] const int get_image_width() const noexcept;
///
/// Get the object group of the Tile.
///
/// \return Returns a std::optional. Make sure you check for std::nullopt if tile offset is not used!
///
[[nodiscard]] const std::optional<ObjectLayer>& get_object_group() const noexcept;
///
/// Chance this tile is chosen when competing with others in the editor.
///
/// \return Const double. This is a percentage. Will return -1.0 if not used.
///
[[nodiscard]] const double get_probability() const noexcept;
///
/// \brief Retrieve property.
///
/// You will need to provide the type when retrieving.
///
/// \param name Name of the property to retrieve.
///
/// \return Property cast as type.
///
template<tiled_property Type>
[[nodiscard]] const Type& get_property(std::string_view name);
///
/// Get index of terrain for each corner of tile.
///
/// \return std::vector int array.
///
[[nodiscard]] const std::vector<int>& get_terrain_indices() const noexcept;
///
/// Get the type of tile.
///
/// \return Const std::string reference.
///
[[nodiscard]] const std::string& get_type() const noexcept;
private:
///
/// Array of Frames.
///
std::vector<Frame> m_animation;
///
/// Local ID of the tile.
///
int m_id;
///
/// Image representing this tile (optional).
///
std::string m_image;
///
/// Height of the tile image in pixels.
///
int m_image_height;
///
/// Width of the tile image in pixels.
///
int m_image_width;
///
/// Layer with type objectgroup, when collision shapes are specified (optional).
///
std::optional<ObjectLayer> m_object_group;
///
/// Percentage chance this tile is chosen when competing with others in the editor (optional).
///
double m_probability;
///
/// Map of Properties.
///
robin_hood::unordered_flat_map<std::string, Property> m_properties;
///
/// Index of terrain for each corner of tile (optional).
///
std::vector<int> m_terrain_indices;
///
/// The type of the tile (optional).
///
std::string m_type;
};
template<tiled_property Type>
inline const Type& Tile::get_property(std::string_view name)
{
const auto str = static_cast<std::string>(name);
return m_properties[str].get<Type>();
}
} // namespace map
} // namespace galaxy
#endif | 21.106383 | 104 | 0.606855 | [
"object",
"vector"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.