Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
MocapPlayer/src/dab_json_helper.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
44 lines (34 sloc)
2.28 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** \file dab_json_helper.h | |
*/ | |
#pragma once | |
#include <iostream> | |
#include "ofxJSON.h" | |
#include "dab_singleton.h" | |
#include "dab_exception.h" | |
namespace dab | |
{ | |
class JsonHelper : public Singleton<JsonHelper> | |
{ | |
public: | |
const Json::Value& getValue(const Json::Value& pValue, const std::string& pValueName) throw (dab::Exception); | |
int getInt(const Json::Value& pValue, const std::string& pValueName) throw (dab::Exception); | |
float getFloat(const Json::Value& pValue, const std::string& pValueName) throw (dab::Exception); | |
std::string getString(const Json::Value& pValue, const std::string& pValueName) throw (dab::Exception); | |
const Json::Value& getValue(const Json::Value& pValue, int pValueIndex) throw (dab::Exception); | |
int getInt(const Json::Value& pValue, unsigned int pValueIndex) throw (dab::Exception); | |
float getFloat(const Json::Value& pValue, unsigned int pValueIndex) throw (dab::Exception); | |
std::string getString(const Json::Value& pValue, unsigned int pValueIndex) throw (dab::Exception); | |
const Json::Value& getValue(const Json::Value& pValue, const std::string& pValueName, int pValueIndex) throw (dab::Exception); | |
int getInt(const Json::Value& pValue, const std::string& pValueName, unsigned int pValueIndex) throw (dab::Exception); | |
float getFloat(const Json::Value& pValue, const std::string& pValueName, unsigned int pValueIndex) throw (dab::Exception); | |
std::string getString(const Json::Value& pValue, const std::string& pValueName, unsigned int pValueIndex) throw (dab::Exception); | |
void getValues(const Json::Value& pValue, const std::string& pValueName, std::vector<Json::Value>& pValues) throw (dab::Exception); | |
void getInts(const Json::Value& pValue, const std::string& pValueName, std::vector<int>& pValues) throw (dab::Exception); | |
void getFloats(const Json::Value& pValue, const std::string& pValueName, std::vector<float>& pValues) throw (dab::Exception); | |
void getStrings(const Json::Value& pValue, const std::string& pValueName, std::vector<std::string>& pValues) throw (dab::Exception); | |
void getInts(const Json::Value& pValue, std::vector<int>& pValues) throw (dab::Exception); | |
void getFloats(const Json::Value& pValue, std::vector<float>& pValues) throw (dab::Exception); | |
void getStrings(const Json::Value& pValue, std::vector<std::string>& pValues) throw (dab::Exception); | |
protected: | |
}; | |
}; |