Browse Source

Added Dutch.

master
Maximilian Stiefel 5 years ago
parent
commit
69efe5b7ae
  1. 10
      Makefile
  2. 3
      dict/creator.h
  3. 14
      dict/denl.cc
  4. 24
      dict/denl.h
  5. 4
      dict/dict_imp.cc
  6. 3
      dict/types.h
  7. 3
      dictcc.cc

10
Makefile

@ -5,18 +5,20 @@ LFLAGS=-lcurl -lcurlpp -g -Wall
INST_FILE=/usr/local/bin/dictcc
TARGET=dictcc
dict : deen.o desv.o dict_imp.o dictcc.o make_lib
dict : deen.o desv.o denl.o dict_imp.o dictcc.o all
deen.o :
$(CC) $(CFLAGS) $(DICT_DIR)/deen.cc
desv.o :
$(CC) $(CFLAGS) $(DICT_DIR)/desv.cc
denl.o :
$(CC) $(CFLAGS) $(DICT_DIR)/denl.cc
dict_imp.o :
$(CC) $(CFLAGS) $(DICT_DIR)/dict_imp.cc
dictcc.o :
$(CC) $(CFLAGS) dictcc.cc
make_lib :
$(CC) dictcc.o deen.o desv.o dict_imp.o -o $(TARGET) $(LFLAGS)
all :
$(CC) dictcc.o deen.o desv.o denl.o dict_imp.o -o $(TARGET) $(LFLAGS)
install:
sudo ln -s $(PWD)/$(TARGET) $(INST_FILE)
clean :
rm *.o rm $(TARGET)
rm *.o && rm $(TARGET)

3
dict/creator.h

@ -5,6 +5,7 @@
#include "dict_int.h"
#include "desv.h"
#include "deen.h"
#include "denl.h"
#include "types.h"
#include "exceptions.h"
@ -26,6 +27,8 @@ namespace dictcc
return std::make_shared<desv>();
case DEEN:
return std::make_shared<deen>();
case DENL:
return std::make_shared<denl>();
default:
throw(dict_lang_error(__FILE__, __LINE__));
}

14
dict/denl.cc

@ -0,0 +1,14 @@
#include "denl.h"
namespace dictcc
{
denl::denl()
{
d_suburl = "denl";
}
bool denl::noun(const std::ostringstream& req_answer, str_list_t& res)
{
return false;
}
} // namespace dictcc

24
dict/denl.h

@ -0,0 +1,24 @@
#ifndef DICTCC_DENL_INCLUDED
#define DICTCC_DENL_INCLUDED
// STD
#include <sstream>
// Boost
// Dictcc API
#include "dict_int.h"
namespace dictcc
{
class denl : public dict
{
// TODO: Implement specifics of the language here.
private:
bool noun(const std::ostringstream& req_answer, str_list_t& res);
public:
denl();
~denl()
{}
};
} // namespace dictcc
#endif // DICTCC_DENL_INCLUDED

4
dict/dict_imp.cc

@ -108,7 +108,7 @@ namespace dictcc
std::string dict::langs2str(const lang_t& lt)
{
// TODO: Add new languages here.
std::vector<std::string> str = {"DESV", "DEEN"};
std::vector<std::string> str = {"DESV", "DEEN", "DENL"};
if (lt >= str.size()) {
throw(dict_lang_error(__FILE__, __LINE__));
}
@ -121,6 +121,8 @@ namespace dictcc
return DESV;
} else if ( str == "DEEN") {
return DEEN;
} else if ( str == "DENL") {
return DENL;
} else {
throw(dict_lang_error(__FILE__, __LINE__));
}

3
dict/types.h

@ -24,7 +24,8 @@ namespace dictcc
typedef enum
{
DESV,
DEEN
DEEN,
DENL
} lang_t;
} // namespace dictcc

3
dictcc.cc

@ -11,7 +11,8 @@ int main(int argc, char **argv)
// TODO: Add new languages here.
std::ostringstream langs;
langs << " DESV" << std::endl
<< " DEEN" << std::endl;
<< " DEEN" << std::endl
<< " DENL" << std::endl;
// Help stringstream
std::ostringstream help;
help << "dictcc [OPTION] [ARGUMENT]" << std::endl

Loading…
Cancel
Save