Here goes all my source codes with #include directivrs
object.h
Code:
#ifndef JSOBJECT_H
#define JSOBJECT_H
#include "jvar.h"
#include "paramsmapcore.h"
#include <sstream>
#include <string>
using std::string;
using std::stringstream;
namespace Js{
class Object: public Js::JVar, public paramsMapCore<string, Js::JVar>{
public:
Object();
~Object();
};
}
#endif
object.cpp
Code:
#include "object.h"
namespace Js {
Object::Object(): Js::JVar(), paramsMapCore<string, Js::JVar>(){
}
Object::~Object(){
}
}
paramsmapcore.h
Code:
#ifndef PARAMSMAPCORE_H
#define PARAMSMAPCORE_H
#include <map>
#include <string>
#include "var.h"
class Var;
template <typename KeyType, typename ValueType>
class paramsMapCore : public std::map<KeyType, ValueType>{
public:
paramsMapCore();
~paramsMapCore();
public:
bool exists(const KeyType& key) const;
virtual ValueType get(const KeyType& key) const;
virtual void set(const KeyType& key, const ValueType& val);
bool remove(const KeyType& key);
void removeAll();
typename paramsMapCore<KeyType, ValueType>::iterator search(const KeyType& key);
typename paramsMapCore<KeyType, ValueType>::const_iterator search(const KeyType& key) const;
typename paramsMapCore<KeyType, ValueType>::iterator each();
typename paramsMapCore<KeyType, ValueType>::const_iterator each() const;
};
#include "paramsmapcore.hpp"
#endif
paramsmap.h
Code:
#ifndef PARAMSMAP_H
#define PARAMSMAP_H
#include <string>
#include <map>
#include "var.h"
#include "paramsmapcore.h"
using std::string;
using std::map;
class Var;
class paramsMap : public paramsMapCore<string, Var>{
public:
paramsMap();
~paramsMap();
};
#endif