mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-08 14:42:09 +02:00
Adding more parsing functions
This commit is contained in:
parent
c3775623aa
commit
78624679ed
6 changed files with 50 additions and 11 deletions
|
@ -37,5 +37,9 @@ namespace Controllers {
|
|||
};
|
||||
|
||||
|
||||
Filter::Pointer Filter::parse(const QJsonObject& json) {
|
||||
// FIXME parse the json object and determine the instance type to create
|
||||
return Filter::Pointer();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
#include <list>
|
||||
#include <memory>
|
||||
|
||||
class QJsonObject;
|
||||
|
||||
namespace Controllers {
|
||||
|
||||
// Encapsulates part of a filter chain
|
||||
|
@ -22,6 +24,8 @@ namespace Controllers {
|
|||
|
||||
using Pointer = std::shared_ptr<Filter>;
|
||||
using List = std::list<Pointer>;
|
||||
|
||||
static Filter::Pointer parse(const QJsonObject& json);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
#include "Mapping.h"
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtScript/QScriptValue>
|
||||
|
||||
extern float currentTime();
|
||||
|
||||
namespace Controllers {
|
||||
}
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
#include <map>
|
||||
#include <list>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtScript/QScriptValue>
|
||||
|
||||
extern float currentTime();
|
||||
|
||||
#include "Endpoint.h"
|
||||
#include "Filter.h"
|
||||
#include "Route.h"
|
||||
|
||||
class QString;
|
||||
|
||||
namespace Controllers {
|
||||
|
||||
using ValueMap = std::map<Endpoint::Pointer, float>;
|
||||
|
|
36
libraries/controllers/src/controllers/Route.cpp
Normal file
36
libraries/controllers/src/controllers/Route.cpp
Normal file
|
@ -0,0 +1,36 @@
|
|||
//
|
||||
// Created by Bradley Austin Davis 2015/10/09
|
||||
// Copyright 2015 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#pragma once
|
||||
#ifndef hifi_Controllers_Route_h
|
||||
#define hifi_Controllers_Route_h
|
||||
|
||||
#include "Endpoint.h"
|
||||
#include "Filter.h"
|
||||
|
||||
class QJsonObject;
|
||||
|
||||
namespace Controllers {
|
||||
|
||||
/*
|
||||
* encapsulates a source, destination and filters to apply
|
||||
*/
|
||||
class Route {
|
||||
public:
|
||||
Endpoint::Pointer _source;
|
||||
Endpoint::Pointer _destination;
|
||||
Filter::List _filters;
|
||||
|
||||
using Pointer = std::shared_ptr<Route>;
|
||||
using List = std::list<Pointer>;
|
||||
|
||||
void parse(const QJsonObject& json);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
|
@ -13,6 +13,8 @@
|
|||
#include "Endpoint.h"
|
||||
#include "Filter.h"
|
||||
|
||||
class QJsonObject;
|
||||
|
||||
namespace Controllers {
|
||||
|
||||
/*
|
||||
|
@ -26,6 +28,8 @@ namespace Controllers {
|
|||
|
||||
using Pointer = std::shared_ptr<Route>;
|
||||
using List = std::list<Pointer>;
|
||||
|
||||
void parse(const QJsonObject);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue