├── .gitignore
├── AUTHORS
├── COPYING
├── INSTALL.old
├── Makefile.am
├── Makefile.git
├── README.md
├── admin
├── acinclude.m4.in
├── flex.skl
├── moc_edit.pl
└── tools
│ ├── autorun
│ └── ps-mailer
├── configure.ac
├── etc
├── planescape.xml.template
└── plugin.xml.template
├── libdreamland
├── Makefile.am
├── Makefile.inc
├── alloc
│ ├── Makefile.am
│ ├── allocateclass.cpp
│ ├── allocateclass.h
│ ├── class.cpp
│ ├── class.h
│ ├── exceptionclassnotfound.cpp
│ ├── exceptionclassnotfound.h
│ ├── mocregistrator.h
│ ├── oneallocate.cpp
│ ├── oneallocate.h
│ └── xmlvariableregistrator.h
├── fenia
│ ├── Makefile.am
│ ├── TODO
│ ├── closure.cpp
│ ├── closure.h
│ ├── codesource.cpp
│ ├── codesource.h
│ ├── codesourceref.cpp
│ ├── codesourceref.h
│ ├── context.cpp
│ ├── context.h
│ ├── exceptions.cpp
│ ├── exceptions.h
│ ├── exp-tree.cpp
│ ├── exp-tree.h
│ ├── feniaparser.h
│ ├── feniastring.cpp
│ ├── feniastring.h
│ ├── flow.h
│ ├── function.cpp
│ ├── function.h
│ ├── handler.cpp
│ ├── handler.h
│ ├── impl.cpp
│ ├── impl.h
│ ├── lex.cpp
│ ├── lex.h
│ ├── main.cpp
│ ├── manager-decl.h
│ ├── manager-impl.h
│ ├── native.cpp
│ ├── native.h
│ ├── nodes.cpp
│ ├── nodes.h
│ ├── object.cpp
│ ├── object.h
│ ├── parse.y++
│ ├── phase.cpp
│ ├── phase.h
│ ├── ref-tree.cpp
│ ├── ref-tree.h
│ ├── reference-impl.h
│ ├── reference.cpp
│ ├── reference.h
│ ├── register-decl.h
│ ├── register-impl.h
│ ├── scan.l++
│ ├── scope.cpp
│ ├── scope.h
│ ├── stmt-tree.cpp
│ ├── stmt-tree.h
│ ├── test.cpp
│ ├── test.h
│ ├── xmlregister.cpp
│ └── xmlregister.h
├── flags
│ ├── Makefile.am
│ ├── enumeration-impl.h
│ ├── enumeration.cpp
│ ├── enumeration.h
│ ├── flags-impl.h
│ ├── flags.cpp
│ ├── flags.h
│ ├── flagtable.cpp
│ ├── flagtable.h
│ ├── flagtableregistry.cpp
│ ├── flagtableregistry.h
│ ├── flagtablewrapper.h
│ ├── xmlenumeration.cpp
│ ├── xmlenumeration.h
│ ├── xmlflags.cpp
│ └── xmlflags.h
├── gref
│ ├── Makefile.am
│ ├── globalarray.cpp
│ ├── globalarray.h
│ ├── globalbitvector.cpp
│ ├── globalbitvector.h
│ ├── globalreference.cpp
│ ├── globalreference.h
│ ├── globalregistry.cpp
│ ├── globalregistry.h
│ ├── globalregistryelement.cpp
│ ├── globalregistryelement.h
│ ├── xmlglobalarray.cpp
│ ├── xmlglobalarray.h
│ ├── xmlglobalbitvector.cpp
│ ├── xmlglobalbitvector.h
│ ├── xmlglobalreference.cpp
│ └── xmlglobalreference.h
├── io
│ ├── Makefile.am
│ ├── config_io.h
│ ├── dbio.cpp
│ ├── dbio.h
│ ├── dbm
│ │ ├── dbmio.cpp
│ │ ├── dbmio.h
│ │ ├── dbmtest.cpp
│ │ ├── rdbms.cpp
│ │ ├── rdbms.h
│ │ ├── rdbms_bdb.cpp
│ │ ├── rdbms_bdb.h
│ │ ├── rdbms_fs.cpp
│ │ └── rdbms_fs.h
│ ├── dldirectory.cpp
│ ├── dldirectory.h
│ ├── dlfile.cpp
│ ├── dlfile.h
│ ├── dlfileloader.cpp
│ ├── dlfileloader.h
│ ├── dlfileop.cpp
│ ├── dlfileop.h
│ ├── dlfilestream.cpp
│ ├── dlfilestream.h
│ ├── exceptiondbio.cpp
│ ├── exceptiondbio.h
│ ├── exceptiondbioeof.h
│ ├── txncontext.cpp
│ ├── txncontext.h
│ ├── xmlconfigurable.cpp
│ ├── xmlconfigurable.h
│ ├── xmlfile.cpp
│ ├── xmlfile.h
│ ├── xmlloader.cpp
│ ├── xmlloader.h
│ ├── xmltableelement.cpp
│ ├── xmltableelement.h
│ ├── xmltableloader.cpp
│ └── xmltableloader.h
├── l10n
│ ├── Makefile.am
│ ├── adjective.cpp
│ ├── adjective.h
│ ├── flexer.cpp
│ ├── flexer.h
│ ├── grammar_entities.cpp
│ ├── grammar_entities.h
│ ├── grammar_entities_impl.h
│ ├── noun.cpp
│ ├── noun.h
│ ├── nounholder.cpp
│ ├── nounholder.h
│ ├── pronouns.cpp
│ ├── pronouns.h
│ ├── ru_pronouns.cpp
│ ├── ru_pronouns.h
│ ├── russianstring.cpp
│ ├── russianstring.h
│ ├── verb.cpp
│ ├── verb.h
│ ├── xmlrussianstring.cpp
│ └── xmlrussianstring.h
├── lang
│ ├── Makefile.am
│ ├── algo.h
│ ├── bitstring.h
│ ├── boolean.cpp
│ ├── boolean.h
│ ├── byte.cpp
│ ├── byte.h
│ ├── char.cpp
│ ├── char.h
│ ├── dllist.h
│ ├── dlmap.h
│ ├── dlobject.cpp
│ ├── dlobject.h
│ ├── dlstring.cpp
│ ├── dlstring.h
│ ├── exception.cpp
│ ├── exception.h
│ ├── exceptionbadtype.h
│ ├── fileformatexception.h
│ ├── integer.cpp
│ ├── integer.h
│ ├── long.cpp
│ ├── long.h
│ ├── longlong.cpp
│ ├── longlong.h
│ ├── mallocexception.h
│ ├── pointer.h
│ ├── safelist.h
│ ├── safelist.tcc
│ ├── short.cpp
│ ├── short.h
│ ├── staticlist.h
│ ├── stringset.cpp
│ └── stringset.h
├── moc
│ ├── Makefile.am
│ ├── acinclude.m4
│ ├── autogen.sh
│ ├── configure.ac
│ ├── generate.cpp
│ ├── lex.l++
│ ├── main.cpp
│ ├── mocfunctional.h
│ ├── syn.y++
│ ├── system.cpp
│ └── system.h
├── plugin
│ ├── Makefile.am
│ ├── classselfregistratorplugin.h
│ ├── initializer.cpp
│ ├── initializer.h
│ ├── plugin.h
│ ├── plugininitializer.h
│ ├── pluginmanager.cpp
│ ├── pluginmanager.h
│ ├── sharedobject.cpp
│ ├── sharedobject.h
│ └── so.h
├── process
│ ├── Makefile.am
│ ├── monitor.cpp
│ ├── monitor.h
│ ├── mutex.cpp
│ ├── mutex.h
│ ├── process.cpp
│ ├── process.h
│ ├── thread.cpp
│ └── thread.h
├── regex
│ ├── BUGS
│ ├── COPYRIGHT
│ ├── Makefile.am
│ ├── cclass.h
│ ├── cname.h
│ ├── engine.c
│ ├── regcomp.c
│ ├── regerror.c
│ ├── regex.h
│ ├── regex2.h
│ ├── regexec.c
│ ├── regfree.c
│ ├── regutils.h
│ └── utils.h
├── scheduler
│ ├── Makefile.am
│ ├── scheduler.cpp
│ ├── scheduler.h
│ ├── schedulerlist.cpp
│ ├── schedulerlist.h
│ ├── schedulerprioritymap.cpp
│ ├── schedulerprioritymap.h
│ ├── schedulerqueue.cpp
│ ├── schedulerqueue.h
│ ├── schedulertask.cpp
│ └── schedulertask.h
├── util
│ ├── Makefile.am
│ ├── date.cpp
│ ├── date.h
│ ├── dateparser.h
│ ├── dl_ctype.cpp
│ ├── dl_ctype.h
│ ├── dl_match.cpp
│ ├── dl_match.h
│ ├── dl_math.cpp
│ ├── dl_math.h
│ ├── dl_strings.cpp
│ ├── dl_strings.h
│ ├── exceptionbaddatestring.h
│ ├── iconvmap.cpp
│ ├── iconvmap.h
│ ├── lastlogstream.cpp
│ ├── lastlogstream.h
│ ├── logstream.cpp
│ ├── logstream.h
│ ├── parsedate.l++
│ ├── profiler.cpp
│ ├── profiler.h
│ ├── regexp.cpp
│ ├── regexp.h
│ ├── timer.cpp
│ └── timer.h
└── xml
│ ├── Makefile.am
│ ├── exceptions.cpp
│ ├── exceptionskipvariable.h
│ ├── exceptionvariablenotfound.h
│ ├── exceptionxmlerror.h
│ ├── exceptionxsl.h
│ ├── fpstream.h
│ ├── moc.h
│ ├── pstream.h
│ ├── xmlboolean.cpp
│ ├── xmlboolean.h
│ ├── xmlbyte.cpp
│ ├── xmlbyte.h
│ ├── xmlchar.cpp
│ ├── xmlchar.h
│ ├── xmlclause.cpp
│ ├── xmlclause.h
│ ├── xmlcontainer.cpp
│ ├── xmlcontainer.h
│ ├── xmldate.cpp
│ ├── xmldate.h
│ ├── xmldocument.cpp
│ ├── xmldocument.h
│ ├── xmlinteger.cpp
│ ├── xmlinteger.h
│ ├── xmllimits.cpp
│ ├── xmllimits.h
│ ├── xmllist.h
│ ├── xmllong.cpp
│ ├── xmllong.h
│ ├── xmllonglong.cpp
│ ├── xmllonglong.h
│ ├── xmlmap.h
│ ├── xmlmatchpattern.h
│ ├── xmlmatchpattern.l++
│ ├── xmlnode.cpp
│ ├── xmlnode.h
│ ├── xmloptions.h
│ ├── xmlparser.h
│ ├── xmlparser.l++
│ ├── xmlpersistent.h
│ ├── xmlpointer.h
│ ├── xmlpolymorphvariable.cpp
│ ├── xmlpolymorphvariable.h
│ ├── xmlpredicate.cpp
│ ├── xmlpredicate.h
│ ├── xmlref.cpp
│ ├── xmlref.h
│ ├── xmlreftest.cpp
│ ├── xmlreftest.h
│ ├── xmlreversevector.h
│ ├── xmlsafelist.h
│ ├── xmlshort.cpp
│ ├── xmlshort.h
│ ├── xmlstreamable.h
│ ├── xmlstring.cpp
│ ├── xmlstring.h
│ ├── xmlstringlist.cpp
│ ├── xmlstringlist.h
│ ├── xmltest.cpp
│ ├── xmltimestamp.cpp
│ ├── xmltimestamp.h
│ ├── xmlvariable.cpp
│ ├── xmlvariable.h
│ ├── xmlvariablecontainer.cpp
│ ├── xmlvariablecontainer.h
│ └── xmlvector.h
├── plug-ins
├── Makefile.am
├── Makefile.inc
├── feniaroot
│ ├── Makefile.am
│ ├── ceval.cpp
│ ├── cfindref.cpp
│ ├── characterwrapper.cpp
│ ├── characterwrapper.h
│ ├── feniastringext.cpp
│ ├── idcontainerext.cpp
│ ├── impl.cpp
│ ├── nativeext.h
│ ├── objectwrapper.cpp
│ ├── objectwrapper.h
│ ├── pluginnativeimpl.cpp
│ ├── pluginnativeimpl.h
│ ├── regcontainerext.cpp
│ ├── reglistext.cpp
│ ├── roomwrapper.cpp
│ ├── roomwrapper.h
│ ├── root.cpp
│ ├── root.h
│ ├── schedulerwrapperext.cpp
│ ├── validatetask.cpp
│ ├── validatetask.h
│ ├── wrap_utils.cpp
│ ├── wrap_utils.h
│ ├── wrappermanager.cpp
│ ├── wrappermanager.h
│ ├── wrappersplugin.cpp
│ └── wrappersplugin.h
└── runtime
│ ├── Makefile.am
│ ├── act.comm.cpp
│ ├── act.cpp
│ ├── act.informative.cpp
│ ├── act.item.cpp
│ ├── act.movement.cpp
│ ├── act.offensive.cpp
│ ├── act.other.cpp
│ ├── act.social.cpp
│ ├── act.social.h
│ ├── act.wizard.cpp
│ ├── ai.cpp
│ ├── ai.h
│ ├── alias.cpp
│ ├── ban.cpp
│ ├── ban.h
│ ├── boards.cpp
│ ├── boards.h
│ ├── case.cpp
│ ├── case.h
│ ├── case_table.h
│ ├── class.cpp
│ ├── color.cpp
│ ├── comm.cpp
│ ├── comm.h
│ ├── commands.h
│ ├── constants.cpp
│ ├── constants.h
│ ├── db.cpp
│ ├── db.h
│ ├── diskio.cpp
│ ├── diskio.h
│ ├── events.cpp
│ ├── events.h
│ ├── exp_fn.cpp
│ ├── exp_fn.h
│ ├── fight.cpp
│ ├── fight.h
│ ├── gameconfig.cpp
│ ├── gameconfig.h
│ ├── graph.cpp
│ ├── handler.cpp
│ ├── handler.h
│ ├── help.cpp
│ ├── help.h
│ ├── house.cpp
│ ├── house.h
│ ├── impl.cpp
│ ├── interpreter.cpp
│ ├── interpreter.h
│ ├── iomanager.cpp
│ ├── iomanager.h
│ ├── iptoaddr.cpp
│ ├── iptoaddr.h
│ ├── item.cpp
│ ├── journal.cpp
│ ├── limits.cpp
│ ├── magic.cpp
│ ├── mail.cpp
│ ├── mail.h
│ ├── map.cpp
│ ├── map.hpp
│ ├── mobact.cpp
│ ├── mobmax.cpp
│ ├── mobmax.h
│ ├── modify.cpp
│ ├── pk.cpp
│ ├── pk.h
│ ├── registration.cpp
│ ├── registration.h
│ ├── remorts.cpp
│ ├── screen.h
│ ├── scriptboard.cpp
│ ├── scriptboard.h
│ ├── shop.cpp
│ ├── shop.h
│ ├── sp_define.h
│ ├── spec_procs.cpp
│ ├── spell_parser.cpp
│ ├── spells.cpp
│ ├── spells.h
│ ├── telnet.h
│ ├── utils.cpp
│ ├── utils.h
│ ├── weather.cpp
│ ├── xbody.cpp
│ ├── xboot.h
│ ├── xenchant.cpp
│ ├── xmaterial.cpp
│ ├── xmob.cpp
│ ├── xobj.cpp
│ ├── xquests.cpp
│ ├── xsave.cpp
│ ├── xscripts.cpp
│ ├── xskills.cpp
│ ├── xspells.cpp
│ ├── xtempl.cpp
│ ├── xwld.cpp
│ └── xzon.cpp
└── src
├── Makefile.am
├── Makefile.inc
├── boards-decl.h
├── comm-decl.h
├── core
├── Makefile.am
├── mudpluginmanager.cpp
├── mudpluginmanager.h
├── mudscheduler.cpp
├── mudscheduler.h
├── mudstats.cpp
├── mudstats.h
├── planescape.cpp
└── planescape.h
├── db-decl.h
├── events-decl.h
├── fenia
├── Makefile.am
├── README
├── feniamanager.cpp
├── feniamanager.h
├── guts.cpp
├── guts.h
├── idcontainer.cpp
├── idcontainer.h
├── regcontainer.cpp
├── regcontainer.h
├── reglist.cpp
├── reglist.h
├── schedulerwrapper.cpp
├── schedulerwrapper.h
├── subr.h
├── wrapperbase.cpp
├── wrapperbase.h
├── wrappermanagerbase.cpp
├── wrappermanagerbase.h
├── wrappertarget.cpp
└── wrappertarget.h
├── impl.cpp
├── interp-decl.h
├── io
├── Makefile.am
├── mudfile.cpp
├── mudfile.h
├── mudfilereader.cpp
├── mudfilereader.h
├── textfileloader.cpp
└── textfileloader.h
├── mail-decl.h
├── main.cpp
├── memutils.cpp
├── memutils.h
├── spells-decl.h
├── structs.cpp
├── structs.h
├── sysdep.h
├── xformat
├── Makefile.am
├── list_commands.h
├── parser_id.h
├── xbody.cpp
├── xbody.h
├── xenchant.cpp
├── xenchant.h
├── xhelp.cpp
├── xhelp.h
├── xmaterial.cpp
├── xmaterial.h
├── xmob.cpp
├── xmob.h
├── xobj.cpp
├── xobj.h
├── xquests.cpp
├── xquests.h
├── xsave.cpp
├── xsave.h
├── xscripts.cpp
├── xscripts.h
├── xshop.cpp
├── xshop.h
├── xskills.cpp
├── xskills.h
├── xspells.cpp
├── xspells.h
├── xtempl.cpp
├── xtempl.h
├── xwld.cpp
├── xwld.h
├── xzon.cpp
└── xzon.h
└── xparser
├── Makefile.am
├── expr.cpp
├── expr.h
├── parser.cpp
├── parser.h
├── parser_const.cpp
├── parser_const.h
├── parser_file.cpp
├── parser_file.h
├── parser_items.cpp
├── parser_items.h
├── parser_readcfg.cpp
├── parser_readcfg.h
├── parser_types.h
├── parser_utils.h
├── strlib.cpp
└── strlib.h
/.gitignore:
--------------------------------------------------------------------------------
1 | *.in
2 | /admin/*
3 | !/admin/*.in
4 | !/admin/*.skl
5 | !/admin/*.pl
6 | !/admin/tools
7 | *.diff
8 | *.log
9 | *.swp
10 | *.bak
11 | *~
12 | aclocal.m4
13 | acinclude.m4
14 | /autom4te.cache
15 | /config.h.in~
16 | /configure
17 | libdreamland/moc/autom4te.cache/
18 | libdreamland/moc/configure
19 | libdreamland/moc/*.h++
20 | /bin
21 | /lib
22 | /share
23 | /var
24 | /core.2*
25 | libexec/plugin.xml
26 | libexec/plugins
27 |
--------------------------------------------------------------------------------
/AUTHORS:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/planescape-mud/planescape_code/0689e4adcb1c57f4b09a4c911957b11afcaa5e5f/AUTHORS
--------------------------------------------------------------------------------
/COPYING:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/planescape-mud/planescape_code/0689e4adcb1c57f4b09a4c911957b11afcaa5e5f/COPYING
--------------------------------------------------------------------------------
/INSTALL.old:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/planescape-mud/planescape_code/0689e4adcb1c57f4b09a4c911957b11afcaa5e5f/INSTALL.old
--------------------------------------------------------------------------------
/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS = libdreamland src plug-ins
2 |
3 | AUTOMAKE_OPTIONS = foreign 1.4
4 |
5 | $(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in
6 | @cd $(top_srcdir) && cat admin/acinclude.m4.in > acinclude.m4
7 |
8 |
--------------------------------------------------------------------------------
/etc/plugin.xml.template:
--------------------------------------------------------------------------------
1 |
2 |
3 | runtime
4 | feniaroot
5 |
6 |
--------------------------------------------------------------------------------
/libdreamland/Makefile.am:
--------------------------------------------------------------------------------
1 | DUMMY_LIBS =
2 | LD_DLLGLUE =
3 | CC_DLLGLUE =
4 | MY_CXXLD = $(CXX)
5 |
6 | lib_LTLIBRARIES = libdreamland.la
7 |
8 | AM_LDFLAGS = $(LD_DLLGLUE)
9 | AM_CXXFLAGS = $(CC_DLLGLUE)
10 | CXXLD = $(MY_CXXLD)
11 |
12 |
13 | SUBDIRS = \
14 | regex \
15 | lang \
16 | alloc \
17 | util \
18 | l10n \
19 | xml \
20 | flags \
21 | gref \
22 | process \
23 | plugin \
24 | scheduler \
25 | io \
26 | fenia
27 |
28 | include $(top_srcdir)/libdreamland/Makefile.inc
29 | INCLUDES = $(INCLUDES_DREAMLAND)
30 |
31 | #####################################################
32 | # dreamland shared library
33 | #
34 | libdreamland_la_SOURCES =
35 |
36 | libdreamland_la_LIBADD = \
37 | fenia/libfenia.la \
38 | xml/libxml.la \
39 | lang/liblang.la \
40 | l10n/libl10n.la \
41 | io/libio.la \
42 | plugin/libplugin.la \
43 | util/libutil.la \
44 | scheduler/libscheduler.la \
45 | regex/libregex.la \
46 | alloc/liballoc.la \
47 | gref/libgref.la \
48 | flags/libflags.la \
49 | process/libprocess.la \
50 | $(DUMMY_LIBS) @BDB_LIBS@ @MCCP_LIBS@
51 |
52 | CLEANFILES = $(DUMMY_LIBS)
53 |
--------------------------------------------------------------------------------
/libdreamland/Makefile.inc:
--------------------------------------------------------------------------------
1 | INCLUDES_DREAMLAND = \
2 | -I$(top_srcdir)/libdreamland \
3 | -I$(top_srcdir)/libdreamland/regex \
4 | -I$(top_srcdir)/libdreamland/lang \
5 | -I$(top_srcdir)/libdreamland/util \
6 | -I$(top_srcdir)/libdreamland/xml \
7 | -I$(top_srcdir)/libdreamland/plugin \
8 | -I$(top_srcdir)/libdreamland/scheduler \
9 | -I$(top_srcdir)/libdreamland/io \
10 | -I$(top_srcdir)/libdreamland/fenia \
11 | -I$(top_srcdir)/libdreamland/l10n \
12 | -I$(top_srcdir)/libdreamland/alloc \
13 | -I$(top_srcdir)/libdreamland/flags \
14 | -I$(top_srcdir)/libdreamland/gref \
15 | -I$(top_srcdir)/libdreamland/process
16 |
17 |
--------------------------------------------------------------------------------
/libdreamland/alloc/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # ruffina, DreamLand, 2008
3 | #
4 | noinst_LTLIBRARIES = liballoc.la
5 |
6 | INCLUDES = \
7 | -I$(srcdir) \
8 | -I$(top_builddir) \
9 | -I$(srcdir)/../lang \
10 | -I$(srcdir)/../util \
11 | -I$(srcdir)/../l10n
12 |
13 | AM_CPPFLAGS = -Wall
14 |
15 | liballoc_la_SOURCES = \
16 | allocateclass.cpp \
17 | class.cpp \
18 | oneallocate.cpp \
19 | exceptionclassnotfound.cpp
20 |
--------------------------------------------------------------------------------
/libdreamland/alloc/allocateclass.cpp:
--------------------------------------------------------------------------------
1 | /* $Id: allocateclass.cpp,v 1.1.2.2 2009/10/11 18:35:35 rufina Exp $
2 | *
3 | * ruffina, DreamLand, 2004
4 | */
5 |
6 | #include "allocateclass.h"
7 |
8 | AllocateClass::~AllocateClass( )
9 | {
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/libdreamland/alloc/allocateclass.h:
--------------------------------------------------------------------------------
1 | /* $Id: allocateclass.h,v 1.1.2.2 2009/10/11 18:35:35 rufina Exp $
2 | *
3 | * ruffina, DreamLand, 2003
4 | */
5 | /***************************************************************************
6 | allocateclass.h - description
7 | -------------------
8 | begin : Wed Oct 31 2001
9 | copyright : (C) 2001 by Igor S. Petrenko
10 | email : nofate@europe.com
11 | ***************************************************************************/
12 |
13 | #ifndef ALLOCATECLASS_H
14 | #define ALLOCATECLASS_H
15 |
16 | #include "dlobject.h"
17 |
18 | class AllocateClass : public virtual DLObject
19 | {
20 | public:
21 | typedef ::Pointer Pointer;
22 |
23 | virtual ~AllocateClass( );
24 |
25 | public:
26 | virtual DLObject::Pointer set( DLObject::Pointer arg1, DLObject::Pointer arg2 ) = 0;
27 | };
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/libdreamland/alloc/exceptionclassnotfound.cpp:
--------------------------------------------------------------------------------
1 | /* $Id: exceptionclassnotfound.cpp,v 1.1.2.2 2009/10/11 18:35:35 rufina Exp $
2 | *
3 | * ruffina, DreamLand, 2003
4 | */
5 | #include "exceptionclassnotfound.h"
6 |
7 | ExceptionClassNotFound::~ExceptionClassNotFound( ) throw( )
8 | {
9 | }
10 |
11 |
12 |
--------------------------------------------------------------------------------
/libdreamland/alloc/exceptionclassnotfound.h:
--------------------------------------------------------------------------------
1 | /* $Id: exceptionclassnotfound.h,v 1.1.2.2 2009/10/11 18:35:35 rufina Exp $
2 | *
3 | * ruffina, DreamLand, 2003
4 | */
5 |
6 | /***************************************************************************
7 | exceptionclassnotfound.h - description
8 | -------------------
9 | begin : Mon Oct 1 2001
10 | copyright : (C) 2001 by Igor S. Petrenko
11 | email : nofate@europe.com
12 | ***************************************************************************/
13 |
14 | #ifndef EXCEPTIONCLASSNOTFOUND_H
15 | #define EXCEPTIONCLASSNOTFOUND_H
16 |
17 | #include "exception.h"
18 |
19 | /**
20 | * @author Igor S. Petrenko
21 | */
22 | class ExceptionClassNotFound : public Exception
23 | {
24 | public:
25 | inline ExceptionClassNotFound( string name )
26 | : Exception( string( "Class '" ) + name + "' not found" )
27 | {
28 | }
29 |
30 | virtual ~ExceptionClassNotFound( ) throw( );
31 | };
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/libdreamland/alloc/mocregistrator.h:
--------------------------------------------------------------------------------
1 | /* $Id: mocregistrator.h,v 1.1.2.2 2009/10/11 18:35:35 rufina Exp $
2 | *
3 | * ruffina, DreamLand, 2005
4 | */
5 | #ifndef __MOCREGISTRATOR_H__
6 | #define __MOCREGISTRATOR_H__
7 |
8 | #include "plugin.h"
9 | #include "class.h"
10 |
11 | template
12 | class MocRegistrator : public virtual Plugin {
13 | public:
14 | typedef ::Pointer< MocRegistrator > Pointer;
15 |
16 | virtual void initialization( )
17 | {
18 | Class::regMoc( );
19 | }
20 | virtual void destruction( )
21 | {
22 | Class::unregMoc( );
23 | }
24 | };
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/libdreamland/alloc/oneallocate.cpp:
--------------------------------------------------------------------------------
1 | /* $Id: oneallocate.cpp,v 1.1.2.2 2009/10/11 18:35:35 rufina Exp $
2 | *
3 | * ruffina, DreamLand, 2003
4 | */
5 | /***************************************************************************
6 | oneallocate.cpp - description
7 | -------------------
8 | begin : Mon May 14 2001
9 | copyright : (C) 2001 by Igor S. Petrenko
10 | email : nofate@europe.com
11 | ***************************************************************************/
12 |
13 | #include
14 | #include "dlobject.h"
15 | #include "oneallocate.h"
16 | #include "dlstring.h"
17 | #include "exception.h"
18 |
19 | OneAllocate::~OneAllocate( )
20 | {
21 | }
22 |
23 | void OneAllocate::checkDuplicate( DLObject* object )
24 | {
25 | if( object != 0 )
26 | throw Exception( DLString( "Duplicate static class " )
27 | + typeid( *object ).name( ) );
28 | }
29 |
--------------------------------------------------------------------------------
/libdreamland/alloc/oneallocate.h:
--------------------------------------------------------------------------------
1 | /* $Id: oneallocate.h,v 1.1.2.2 2009/10/11 18:35:35 rufina Exp $
2 | *
3 | * ruffina, DreamLand, 2003
4 | */
5 | /***************************************************************************
6 | oneallocate.h - description
7 | -------------------
8 | begin : Mon May 14 2001
9 | copyright : (C) 2001 by Igor S. Petrenko
10 | email : nofate@europe.com
11 | ***************************************************************************/
12 |
13 | #ifndef ONEALLOCATE_H
14 | #define ONEALLOCATE_H
15 |
16 | #include "dlobject.h"
17 |
18 | /**
19 | * @author Igor S. Petrenko
20 | */
21 | class OneAllocate : public virtual DLObject
22 | {
23 | public:
24 | virtual ~OneAllocate( );
25 |
26 | static void checkDuplicate( DLObject* );
27 | };
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/libdreamland/alloc/xmlvariableregistrator.h:
--------------------------------------------------------------------------------
1 | /* $Id: xmlvariableregistrator.h,v 1.1.2.2 2009/10/11 18:35:35 rufina Exp $
2 | *
3 | * ruffina, DreamLand, 2005
4 | */
5 | #ifndef __XMLVARREGISTRATOR_H__
6 | #define __XMLVARREGISTRATOR_H__
7 |
8 | #include "plugin.h"
9 | #include "class.h"
10 |
11 | template
12 | class XMLVariableRegistrator : public virtual Plugin {
13 | public:
14 | typedef ::Pointer< XMLVariableRegistrator > Pointer;
15 |
16 | virtual void initialization( )
17 | {
18 | Class::regXMLVar( );
19 | }
20 | virtual void destruction( )
21 | {
22 | Class::unregXMLVar( );
23 | }
24 | };
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/libdreamland/fenia/TODO:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/planescape-mud/planescape_code/0689e4adcb1c57f4b09a4c911957b11afcaa5e5f/libdreamland/fenia/TODO
--------------------------------------------------------------------------------
/libdreamland/fenia/closure.h:
--------------------------------------------------------------------------------
1 | /* $Id$
2 | *
3 | * ruffina, Dream Land, 2018
4 | */
5 | /* $Id$
6 | *
7 | * unicorn, Forgotten Dungeon, 2018
8 | */
9 |
10 |
11 | #ifndef __CLOSURE_H__
12 | #define __CLOSURE_H__
13 |
14 | #include "dlobject.h"
15 | #include "function.h"
16 |
17 | namespace Scripting {
18 |
19 | class RegisterList;
20 | class Scope;
21 | class XMLFunctionRef;
22 |
23 | class Closure : public map, public DLObject {
24 | public:
25 | Closure(XMLFunctionRef &ref);
26 | Closure(Scope *start, Function *f);
27 | virtual ~Closure();
28 |
29 | inline Function *getFunction() {
30 | return function;
31 | }
32 |
33 | void copyScope(Scope *s);
34 | Register invoke(Register thiz, const RegisterList &args);
35 |
36 | void reverse(ostream &os, const DLString &nextline) const;
37 | DLString toString() const;
38 | void toXMLFunctionRef(XMLFunctionRef &ref);
39 | private:
40 | Function *function;
41 | };
42 |
43 | }
44 |
45 | #endif
46 |
--------------------------------------------------------------------------------
/libdreamland/fenia/codesourceref.cpp:
--------------------------------------------------------------------------------
1 | /* $Id: codesourceref.cpp,v 1.1.6.2 2009/10/11 18:35:35 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | /* $Id: codesourceref.cpp,v 1.1.6.2 2009/10/11 18:35:35 rufina Exp $
6 | *
7 | * unicorn, Forgotten Dungeon, 2004
8 | */
9 |
10 | #include "codesourceref.h"
11 | #include "codesource.h"
12 |
13 | namespace Scripting {
14 |
15 | CodeSourceRef::CodeSourceRef( )
16 | {
17 | }
18 |
19 | CodeSourceRef::~CodeSourceRef( )
20 | {
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/libdreamland/fenia/codesourceref.h:
--------------------------------------------------------------------------------
1 | /* $Id: codesourceref.h,v 1.1.4.1.6.2 2009/10/11 18:35:35 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | /* $Id: codesourceref.h,v 1.1.4.1.6.2 2009/10/11 18:35:35 rufina Exp $
6 | *
7 | * unicorn, Forgotten Dungeon, 2004
8 | */
9 | #ifndef __CODESOURCEREF_H__
10 | #define __CODESOURCEREF_H__
11 |
12 | #include
13 | #include
14 | #include
15 |
16 | namespace Scripting {
17 |
18 | class CodeSource;
19 |
20 | class CodeSourceRef {
21 | public:
22 | CodeSourceRef();
23 | ~CodeSourceRef();
24 |
25 | int line;
26 | ::Pointer source;
27 | };
28 |
29 | ostream &operator << (ostream &os, const CodeSourceRef &csr);
30 |
31 | }
32 | #endif
33 |
--------------------------------------------------------------------------------
/libdreamland/fenia/feniastring.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/planescape-mud/planescape_code/0689e4adcb1c57f4b09a4c911957b11afcaa5e5f/libdreamland/fenia/feniastring.cpp
--------------------------------------------------------------------------------
/libdreamland/fenia/feniastring.h:
--------------------------------------------------------------------------------
1 | /* $Id: feniastring.h,v 1.1.2.2.18.2 2009/10/11 18:35:35 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | /* $Id: feniastring.h,v 1.1.2.2.18.2 2009/10/11 18:35:35 rufina Exp $
6 | *
7 | * unicorn, Forgotten Dungeon, 2004
8 | */
9 |
10 | #ifndef __FENIASTRING_H__
11 | #define __FENIASTRING_H__
12 |
13 | #include
14 |
15 | #include "native.h"
16 |
17 | namespace Scripting {
18 |
19 | class FeniaString : public DLString {
20 | NMI_OBJECT
21 | public:
22 | typedef NativeTraits Traits;
23 |
24 | FeniaString() { }
25 | FeniaString(const DLString &dls) : DLString(dls) { }
26 | };
27 |
28 | }
29 |
30 | #endif /* __FENIASTRING_H__ */
31 |
--------------------------------------------------------------------------------
/libdreamland/fenia/flow.h:
--------------------------------------------------------------------------------
1 | /* $Id: flow.h,v 1.1.4.2.18.1 2009/10/11 18:35:35 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | /* $Id: flow.h,v 1.1.4.2.18.1 2009/10/11 18:35:35 rufina Exp $
6 | *
7 | * unicorn, Forgotten Dungeon, 2004
8 | */
9 |
10 | #ifndef __FLOW_H__
11 | #define __FLOW_H__
12 |
13 | #include "register-decl.h"
14 |
15 | namespace Scripting {
16 |
17 | struct FlowCtl {
18 | static const int NEXT = 1;
19 | static const int BREAK = 2;
20 | static const int CONTINUE = 3;
21 | static const int RETURN = 4;
22 |
23 | FlowCtl(int t) : type(t) { }
24 | FlowCtl(int t, Register r) : type(t), ret(r) { }
25 |
26 | int type;
27 | Register ret;
28 | };
29 |
30 | }
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/libdreamland/fenia/handler.cpp:
--------------------------------------------------------------------------------
1 | /* $Id: handler.cpp,v 1.1.4.3 2009/10/11 18:35:35 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | /* $Id: handler.cpp,v 1.1.4.3 2009/10/11 18:35:35 rufina Exp $
6 | *
7 | * unicorn, Forgotten Dungeon, 2004
8 | */
9 |
10 | #include "handler.h"
11 |
12 | namespace Scripting {
13 |
14 | Handler::~Handler( )
15 | {
16 | }
17 |
18 | void
19 | Handler::backup()
20 | {
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/libdreamland/fenia/handler.h:
--------------------------------------------------------------------------------
1 | /* $Id: handler.h,v 1.1.2.3.18.3 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | /* $Id: handler.h,v 1.1.2.3.18.3 2009/10/11 18:35:36 rufina Exp $
6 | *
7 | * unicorn, Forgotten Dungeon, 2004
8 | */
9 |
10 | #ifndef __HANDLER_H__
11 | #define __HANDLER_H__
12 |
13 |
14 | #include
15 |
16 | namespace Scripting {
17 |
18 | class Object;
19 | class Register;
20 | class RegisterList;
21 |
22 | class Handler : public virtual XMLPolymorphVariable {
23 | public:
24 | typedef ::Pointer Pointer;
25 |
26 | virtual ~Handler( );
27 |
28 | virtual void setField(const Register &key, const Register &val) = 0;
29 | virtual Register getField(const Register &key) = 0;
30 | virtual Register callMethod(const Register &key, const RegisterList &args) = 0;
31 |
32 | virtual void setSelf(Object *) = 0;
33 | virtual void backup(); // called when 'object -> handler' link destroyed
34 | };
35 |
36 | }
37 |
38 | #endif
39 |
--------------------------------------------------------------------------------
/libdreamland/fenia/impl.cpp:
--------------------------------------------------------------------------------
1 | /* $Id: impl.cpp,v 1.1.4.2.18.2 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | /* $Id: impl.cpp,v 1.1.4.2.18.2 2009/10/11 18:35:36 rufina Exp $
6 | *
7 | * unicorn, Forgotten Dungeon, 2004
8 | */
9 |
10 | #include "function.h"
11 | #include "nodes.h"
12 | #include "xmlregister.h"
13 | #include "exp-tree.h"
14 | #include "ref-tree.h"
15 | #include "stmt-tree.h"
16 |
17 | using namespace Scripting;
18 |
19 | extern "C" {
20 |
21 | void fenia_init() {
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/libdreamland/fenia/impl.h:
--------------------------------------------------------------------------------
1 | /* $Id: impl.h,v 1.1.4.2.18.1 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | /* $Id: impl.h,v 1.1.4.2.18.1 2009/10/11 18:35:36 rufina Exp $
6 | *
7 | * unicorn, Forgotten Dungeon, 2004
8 | */
9 |
10 | #ifndef __IMPL_H__
11 | #define __IMPL_H__
12 |
13 | extern "C" void fenia_init();
14 |
15 | #endif
16 |
17 |
--------------------------------------------------------------------------------
/libdreamland/fenia/manager-decl.h:
--------------------------------------------------------------------------------
1 | /* $Id: manager-decl.h,v 1.1.4.4.6.6 2014-09-19 11:44:13 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | /* $Id: manager-decl.h,v 1.1.4.4.6.6 2014-09-19 11:44:13 rufina Exp $
6 | *
7 | * unicorn, Forgotten Dungeon, 2004
8 | */
9 |
10 |
11 | #ifndef __MANAGER_DECL_H__
12 | #define __MANAGER_DECL_H__
13 |
14 | namespace Scripting {
15 |
16 | template
17 | class BaseManager : public T::Map {
18 | public:
19 | typedef typename T::Map::iterator iterator;
20 | typedef typename T::Map::const_iterator const_iterator;
21 | typedef typename T::id_t id_t;
22 |
23 | using T::Map::begin;
24 | using T::Map::end;
25 | using T::Map::lower_bound;
26 | using T::Map::_M_insert_unique_;
27 |
28 | inline BaseManager();
29 | inline ~BaseManager();
30 |
31 | inline void erase(id_t id);
32 | inline T &at(id_t id);
33 | inline T &allocate();
34 |
35 | typename T::id_t lastId;
36 | };
37 |
38 | }
39 |
40 | #endif
41 |
--------------------------------------------------------------------------------
/libdreamland/fenia/native.cpp:
--------------------------------------------------------------------------------
1 | /* $Id$
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | /* $Id$
6 | *
7 | * unicorn, Forgotten Dungeon, 2004
8 | */
9 |
10 | #include "native.h"
11 | #include "register-impl.h"
12 |
13 | namespace Scripting {
14 |
15 | void NativeHandler::setField( const Register &key, const Register &val )
16 | {
17 | if (!setNativeField( key, val ))
18 | throw Exception("Set method not found: " + key.toString( ));
19 |
20 | }
21 |
22 | Register NativeHandler::getField( const Register &key )
23 | {
24 | Register retval;
25 |
26 | if (!getNativeField( key, retval ))
27 | throw Exception("Get method not found: " + key.toString( ));
28 |
29 | return retval;
30 |
31 | }
32 |
33 | Register NativeHandler::callMethod( const Register &key, const RegisterList &args )
34 | {
35 | Register retval;
36 | BTPushNative dummy(this, key.toIdentifier());
37 |
38 | if (!callNativeMethod( key, args, retval ))
39 | throw Exception("Invoke method not found: " + key.toString( ));
40 |
41 | return retval;
42 | }
43 |
44 | }
45 |
46 |
--------------------------------------------------------------------------------
/libdreamland/fenia/nodes.cpp:
--------------------------------------------------------------------------------
1 | /* $Id: nodes.cpp,v 1.4.6.3.18.2 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | /* $Id: nodes.cpp,v 1.4.6.3.18.2 2009/10/11 18:35:36 rufina Exp $
6 | *
7 | * unicorn, Forgotten Dungeon, 2004
8 | */
9 |
10 | #include "nodes.h"
11 | #include "flow.h"
12 | #include "context.h"
13 | #include "reference-impl.h"
14 |
15 | namespace Scripting {
16 |
17 | Node::Node()
18 | {
19 | }
20 |
21 | Node::~Node()
22 | {
23 | }
24 |
25 | StmtNode::~StmtNode( )
26 | {
27 | }
28 |
29 | ExpNode::~ExpNode( )
30 | {
31 | }
32 |
33 | ReferenceNode::~ReferenceNode( )
34 | {
35 | }
36 |
37 | ExpNodeList::ExpNodeList()
38 | {
39 | }
40 |
41 | ExpNodeList::~ExpNodeList()
42 | {
43 | }
44 |
45 | StmtNodeList::StmtNodeList()
46 | {
47 | }
48 |
49 | StmtNodeList::~StmtNodeList()
50 | {
51 | }
52 |
53 | FlowCtl
54 | StmtNode::eval()
55 | {
56 | NodeTrace dummy(this);
57 | return evalAux();
58 | }
59 |
60 | Register
61 | ExpNode::eval()
62 | {
63 | NodeTrace dummy(this);
64 | return evalAux();
65 | }
66 |
67 | Reference
68 | ReferenceNode::eval()
69 | {
70 | NodeTrace dummy(this);
71 | return evalAux();
72 | }
73 |
74 |
75 | }
76 |
--------------------------------------------------------------------------------
/libdreamland/fenia/phase.cpp:
--------------------------------------------------------------------------------
1 | /* $Id: phase.cpp,v 1.1.4.2.18.1 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | /* $Id: phase.cpp,v 1.1.4.2.18.1 2009/10/11 18:35:36 rufina Exp $
6 | *
7 | * unicorn, Forgotten Dungeon, 2004
8 | */
9 |
10 | #include "phase.h"
11 |
12 | namespace Scripting {
13 | bool gc = false;
14 |
15 | DereferenceListener *DereferenceListener::instance = 0;
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/libdreamland/fenia/phase.h:
--------------------------------------------------------------------------------
1 | /* $Id: phase.h,v 1.1.4.2.18.1 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | /* $Id: phase.h,v 1.1.4.2.18.1 2009/10/11 18:35:36 rufina Exp $
6 | *
7 | * unicorn, Forgotten Dungeon, 2004
8 | */
9 | #ifndef __PHASE_H__
10 | #define __PHASE_H__
11 |
12 | namespace Scripting {
13 |
14 | class Function;
15 | class Object;
16 |
17 | class DereferenceListener {
18 | public:
19 | virtual void notify(Function *) = 0;
20 | virtual void notify(Object *) = 0;
21 |
22 | static DereferenceListener *instance;
23 | };
24 |
25 | extern bool gc;
26 | }
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/libdreamland/fenia/reference-impl.h:
--------------------------------------------------------------------------------
1 | /* $Id: reference-impl.h,v 1.1.2.2.18.1 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | /* $Id: reference-impl.h,v 1.1.2.2.18.1 2009/10/11 18:35:36 rufina Exp $
6 | *
7 | * unicorn, Forgotten Dungeon, 2004
8 | */
9 |
10 | #ifndef __REFERENCE_IMPL_H__
11 | #define __REFERENCE_IMPL_H__
12 |
13 | #include "reference.h"
14 | #include "register-impl.h"
15 |
16 |
17 | namespace Scripting {
18 |
19 |
20 | Reference::Reference() : id(0)
21 | {
22 | }
23 |
24 | Reference::Reference(Lex::id_t k) : id(k)
25 | {
26 | }
27 |
28 | Reference::Reference(const Register &c, const Register &k)
29 | : id(0), container(c), key(k)
30 | {
31 | }
32 |
33 | }
34 |
35 | #endif
36 |
37 |
--------------------------------------------------------------------------------
/libdreamland/fenia/reference.h:
--------------------------------------------------------------------------------
1 | /* $Id: reference.h,v 1.1.2.5.18.1 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | /* $Id: reference.h,v 1.1.2.5.18.1 2009/10/11 18:35:36 rufina Exp $
6 | *
7 | * unicorn, Forgotten Dungeon, 2004
8 | */
9 |
10 | #ifndef __REFERENCE_H__
11 | #define __REFERENCE_H__
12 |
13 | #include "register-decl.h"
14 |
15 | namespace Scripting {
16 |
17 | struct Reference {
18 | inline Reference();
19 | inline Reference(Lex::id_t k);
20 | inline Reference(const Register &c, const Register &k);
21 |
22 | const Register operator () (const RegisterList &) const;
23 | const Register &operator = (const Register &) const;
24 | const Register operator * () const;
25 |
26 | Lex::id_t id;
27 | Register container;
28 | Register key;
29 | };
30 |
31 | }
32 |
33 | #endif
34 |
35 |
--------------------------------------------------------------------------------
/libdreamland/fenia/scan.l++:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/planescape-mud/planescape_code/0689e4adcb1c57f4b09a4c911957b11afcaa5e5f/libdreamland/fenia/scan.l++
--------------------------------------------------------------------------------
/libdreamland/fenia/test.cpp:
--------------------------------------------------------------------------------
1 | /* $Id: test.cpp,v 1.1.4.7.6.2 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | /* $Id: test.cpp,v 1.1.4.7.6.2 2009/10/11 18:35:36 rufina Exp $
6 | *
7 | * unicorn, Forgotten Dungeon, 2004
8 | */
9 |
10 |
11 | #include
12 |
13 | using namespace std;
14 |
15 | #include "test.h"
16 | #include "register-impl.h"
17 |
18 | using namespace Scripting;
19 |
20 | extern DbEnvContext dbEnv;
21 |
22 | NMI_INIT(Test, "test")
23 |
24 | Test::Test()
25 | {
26 | current = this;
27 | self = 0;
28 | }
29 |
30 | Test::~Test()
31 | {
32 | current = 0;
33 | }
34 |
35 | void
36 | Test::load()
37 | {
38 | manager.open( );
39 | manager.load( );
40 | manager.recover( );
41 | }
42 |
43 | void
44 | Test::save()
45 | {
46 | manager.sync( 0 );
47 | manager.close( );
48 | }
49 |
50 | DbEnvContext TestManager::dbEnv;
51 |
52 | DbEnvContext *
53 | TestManager::getDbEnv( ) const
54 | {
55 | return &dbEnv;
56 | }
57 |
58 |
--------------------------------------------------------------------------------
/libdreamland/flags/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # ruffina, DreamLand, 2008
3 | #
4 | noinst_LTLIBRARIES = libflags.la
5 |
6 | INCLUDES = \
7 | -I$(srcdir) \
8 | -I$(top_builddir) \
9 | -I$(srcdir)/../lang \
10 | -I$(srcdir)/../alloc \
11 | -I$(srcdir)/../util \
12 | -I$(srcdir)/../xml \
13 | -I$(srcdir)/../l10n
14 |
15 | AM_CPPFLAGS = -Wall
16 |
17 | libflags_la_SOURCES = \
18 | flagtable.cpp \
19 | flagtableregistry.cpp \
20 | flags.cpp \
21 | enumeration.cpp \
22 | xmlflags.cpp \
23 | xmlenumeration.cpp
24 |
25 |
--------------------------------------------------------------------------------
/libdreamland/flags/enumeration.cpp:
--------------------------------------------------------------------------------
1 | /* $Id: enumeration.cpp,v 1.1.2.2 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | #include "enumeration.h"
6 |
7 | const Enumeration Enumeration::emptyEnumeration;
8 | const EnumerationArray EnumerationArray::emptyArray;
9 |
--------------------------------------------------------------------------------
/libdreamland/flags/enumeration.h:
--------------------------------------------------------------------------------
1 | /* $Id: enumeration.h,v 1.1.2.2 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2006
4 | */
5 |
6 | #ifndef __ENUMERATION_H__
7 | #define __ENUMERATION_H__
8 |
9 | #include
10 | #include "integer.h"
11 | #include "flagtablewrapper.h"
12 |
13 | /*
14 | * Enumeration
15 | */
16 | struct Enumeration : public FlagTableWrapper, public Integer {
17 | inline Enumeration( );
18 | inline Enumeration( int, const FlagTable * );
19 |
20 | inline DLString name( ) const;
21 | inline DLString message( char gcase = '1' ) const;
22 |
23 | static const Enumeration emptyEnumeration;
24 | };
25 |
26 | /*
27 | * EnumerationArray
28 | */
29 | struct EnumerationArray : public FlagTableWrapper, public vector {
30 | inline EnumerationArray( );
31 | inline EnumerationArray( const FlagTable * );
32 |
33 | inline void clear( );
34 | inline void fill( int );
35 |
36 | inline int & operator [] (size_type);
37 | inline const int & operator [] (size_type) const;
38 |
39 | static const EnumerationArray emptyArray;
40 | };
41 |
42 | #endif
43 |
44 | #include "enumeration-impl.h"
45 |
--------------------------------------------------------------------------------
/libdreamland/flags/flags.cpp:
--------------------------------------------------------------------------------
1 | /* $Id: flags.cpp,v 1.1.2.2 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | #include "flags.h"
6 |
7 | const Flags Flags::emptyFlags;
8 |
--------------------------------------------------------------------------------
/libdreamland/flags/flags.h:
--------------------------------------------------------------------------------
1 | /* $Id: flags.h,v 1.1.2.2 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | #ifndef __FLAGS_H__
6 | #define __FLAGS_H__
7 |
8 | #include
9 | #include "flagtablewrapper.h"
10 |
11 | struct Flags : public FlagTableWrapper, public Bitstring {
12 | inline Flags( );
13 | inline Flags( bitstring_t, const FlagTable * );
14 |
15 | inline DLString names( ) const;
16 | inline DLString messages( bool comma = false, char gcase = '1' ) const;
17 |
18 | static const Flags emptyFlags;
19 | };
20 |
21 | struct FlagsArray : public FlagTableWrapper, vector {
22 | inline FlagsArray( const FlagTable * );
23 | /* todo */
24 | };
25 |
26 | #endif
27 |
28 | #include "flags-impl.h"
29 |
30 |
--------------------------------------------------------------------------------
/libdreamland/flags/flagtable.h:
--------------------------------------------------------------------------------
1 | /* $Id: flagtable.h,v 1.1.2.2 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2004
4 | */
5 | #ifndef __FLAGTABLE_H__
6 | #define __FLAGTABLE_H__
7 |
8 | #include "dlstring.h"
9 | #include "bitstring.h"
10 |
11 | const int NO_FLAG = -99;
12 |
13 | /*
14 | * FlagTable
15 | */
16 | struct FlagTable {
17 | struct Field {
18 | bitnumber_t value;
19 | const char *name;
20 | const char *message;
21 | };
22 |
23 | const Field * fields;
24 | const int * reverse;
25 | const int size;
26 | const int max;
27 | const bool enumerated;
28 |
29 | int index( const DLString &arg, bool strict = true ) const;
30 | bitstring_t bitstring( const DLString &arg, bool strict = true ) const;
31 | bitnumber_t value( const DLString &arg, bool strict = true ) const;
32 |
33 | DLString names( bitstring_t ) const;
34 | DLString messages( bitstring_t, bool comma = false, char gcase = '1' ) const;
35 |
36 | DLString name( bitnumber_t value ) const;
37 | DLString message( bitnumber_t value, char gcase = '1' ) const;
38 | };
39 |
40 | #endif
41 |
--------------------------------------------------------------------------------
/libdreamland/gref/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # ruffina, DreamLand, 2008
3 | #
4 | noinst_LTLIBRARIES = libgref.la
5 |
6 | INCLUDES = \
7 | -I$(srcdir) \
8 | -I$(top_builddir) \
9 | -I$(srcdir)/../lang \
10 | -I$(srcdir)/../util \
11 | -I$(srcdir)/../xml \
12 | -I$(srcdir)/../l10n
13 |
14 | AM_CPPFLAGS = -Wall
15 |
16 | libgref_la_SOURCES = \
17 | globalarray.cpp \
18 | globalbitvector.cpp \
19 | globalregistry.cpp \
20 | globalregistryelement.cpp \
21 | globalreference.cpp \
22 | xmlglobalarray.cpp \
23 | xmlglobalbitvector.cpp \
24 | xmlglobalreference.cpp
25 |
26 |
--------------------------------------------------------------------------------
/libdreamland/gref/globalarray.cpp:
--------------------------------------------------------------------------------
1 | /* $Id: globalarray.cpp,v 1.1.2.2 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2006
4 | */
5 | #include "globalarray.h"
6 |
7 | static int zeroValue;
8 |
9 | const GlobalArray GlobalArray::emptyArray;
10 |
11 | GlobalArray::GlobalArray( )
12 | : registry( NULL )
13 | {
14 | }
15 |
16 | GlobalArray::GlobalArray( GlobalRegistryBase *reg )
17 | : registry( reg )
18 | {
19 | clear( );
20 | }
21 |
22 | GlobalArray::~GlobalArray( )
23 | {
24 | }
25 |
26 | void GlobalArray::clear( )
27 | {
28 | vector::clear( );
29 |
30 | if (registry)
31 | resize( registry->size( ) );
32 | }
33 |
34 | int & GlobalArray::operator [] (size_type ndx)
35 | {
36 | if (!registry)
37 | return zeroValue;
38 | if (!registry->goodIndex( ndx ))
39 | return zeroValue;
40 | if (ndx >= size( ))
41 | resize( ndx + 1 );
42 |
43 | return vector::operator [](ndx);
44 | }
45 |
46 | const int & GlobalArray::operator [] (size_type ndx) const
47 | {
48 | return vector::operator [](ndx);
49 | }
50 |
51 |
--------------------------------------------------------------------------------
/libdreamland/gref/globalarray.h:
--------------------------------------------------------------------------------
1 | /* $Id: globalarray.h,v 1.1.2.2 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2006
4 | */
5 | #ifndef GLOBALARRAY_H
6 | #define GLOBALARRAY_H
7 |
8 | #include
9 | #include "globalregistry.h"
10 |
11 | class GlobalArray : public vector {
12 | public:
13 | static const GlobalArray emptyArray;
14 |
15 | GlobalArray( );
16 | GlobalArray( GlobalRegistryBase * );
17 | virtual ~GlobalArray( );
18 |
19 | void clear( );
20 | int & operator [] (size_type);
21 |
22 | protected:
23 | GlobalRegistryBase *registry;
24 |
25 | private:
26 | const int & operator [] (size_type) const;
27 | };
28 |
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/libdreamland/gref/globalreference.cpp:
--------------------------------------------------------------------------------
1 | /* $Id: globalreference.cpp,v 1.1.2.2 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2006
4 | */
5 | #include "globalreference.h"
6 |
7 | GlobalReferenceBase::~GlobalReferenceBase( )
8 | {
9 | }
10 |
11 | GlobalReferenceBase::GlobalReferenceBase( )
12 | {
13 | init( );
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/libdreamland/gref/globalregistryelement.cpp:
--------------------------------------------------------------------------------
1 | /* $Id$
2 | *
3 | * ruffina, 2004
4 | */
5 | #include "globalregistryelement.h"
6 |
7 | GlobalRegistryElement::GlobalRegistryElement( )
8 | : index( -1 )
9 | {
10 | }
11 |
12 | GlobalRegistryElement::~GlobalRegistryElement( )
13 | {
14 | }
15 |
16 | const DLString &GlobalRegistryElement::getRussianName( ) const
17 | {
18 | return getName( );
19 | }
20 |
21 | bool GlobalRegistryElement::matchesStrict( const DLString &str ) const
22 | {
23 | return !str.empty( ) && str == getName( );
24 | }
25 |
26 | bool GlobalRegistryElement::matchesUnstrict( const DLString &str ) const
27 | {
28 | if (str.empty( ) || getName( ).empty( ))
29 | return false;
30 |
31 | if (!str.strPrefix( getName( ) ))
32 | return false;
33 | // TODO unstrict match by russian name, all cases
34 | // Use getRussianName method in child classes instead of custom getRusName
35 | return true;
36 | }
37 |
--------------------------------------------------------------------------------
/libdreamland/gref/globalregistryelement.h:
--------------------------------------------------------------------------------
1 | /* $Id: globalregistryelement.h,v 1.1.2.4 2009/11/08 17:34:01 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2006
4 | */
5 | #ifndef __GLOBALREGISTRYELEMENT_H__
6 | #define __GLOBALREGISTRYELEMENT_H__
7 |
8 | #include "dlobject.h"
9 | #include "dlstring.h"
10 |
11 | class GlobalRegistryElement : public virtual DLObject {
12 | friend class GlobalRegistryBase;
13 | public:
14 | typedef ::Pointer Pointer;
15 |
16 | GlobalRegistryElement( );
17 | virtual ~GlobalRegistryElement( );
18 |
19 | virtual const DLString &getName( ) const = 0;
20 | virtual const DLString &getRussianName( ) const;
21 |
22 | virtual bool matchesStrict( const DLString &str ) const;
23 | virtual bool matchesUnstrict( const DLString &str ) const;
24 |
25 | inline int getIndex( ) const
26 | {
27 | return index;
28 | }
29 |
30 | virtual bool isValid( ) const
31 | {
32 | return true;
33 | }
34 |
35 | protected:
36 | inline void setIndex( int i )
37 | {
38 | index = i;
39 | }
40 |
41 | private:
42 | int index;
43 | };
44 |
45 | #endif
46 |
--------------------------------------------------------------------------------
/libdreamland/gref/xmlglobalarray.h:
--------------------------------------------------------------------------------
1 | /* $Id: xmlglobalarray.h,v 1.1.2.2 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2006
4 | */
5 | #ifndef XMLGLOBALARRAY_H
6 | #define XMLGLOBALARRAY_H
7 |
8 | #include "globalarray.h"
9 | #include "xmlnode.h"
10 |
11 | class XMLGlobalArray : public GlobalArray {
12 | public:
13 | XMLGlobalArray( GlobalRegistryBase * );
14 |
15 | bool toXML( XMLNode::Pointer& ) const;
16 | void fromXML( const XMLNode::Pointer& ) throw( ExceptionBadType );
17 | };
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/libdreamland/gref/xmlglobalbitvector.cpp:
--------------------------------------------------------------------------------
1 | /* $Id: xmlglobalbitvector.cpp,v 1.1.2.2 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2006
4 | */
5 | #include "xmlglobalbitvector.h"
6 | #include "xmlstring.h"
7 |
8 | XMLGlobalBitvector::XMLGlobalBitvector( )
9 | {
10 | }
11 |
12 | XMLGlobalBitvector::XMLGlobalBitvector( GlobalRegistryBase *reg )
13 | : GlobalBitvector( reg )
14 | {
15 | }
16 |
17 | void XMLGlobalBitvector::fromXML( const XMLNode::Pointer& parent ) throw( ExceptionBadType )
18 | {
19 | XMLString str;
20 |
21 | str.fromXML( parent );
22 | fromString( str );
23 | }
24 |
25 | bool XMLGlobalBitvector::toXML( XMLNode::Pointer& parent ) const
26 | {
27 | DLString str = toString( );
28 |
29 | if (str.empty( ))
30 | return false;
31 | else
32 | return XMLString( str ).toXML( parent );
33 | }
34 |
--------------------------------------------------------------------------------
/libdreamland/gref/xmlglobalbitvector.h:
--------------------------------------------------------------------------------
1 | /* $Id: xmlglobalbitvector.h,v 1.1.2.2 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2005
4 | */
5 | #ifndef __XMLGLOBALBITVECTOR_H__
6 | #define __XMLGLOBALBITVECTOR_H__
7 |
8 | #include "globalbitvector.h"
9 | #include "xmlnode.h"
10 |
11 | class XMLGlobalBitvector : public GlobalBitvector {
12 | public:
13 | XMLGlobalBitvector( );
14 | XMLGlobalBitvector( GlobalRegistryBase * );
15 |
16 | void fromXML( const XMLNode::Pointer& ) throw( ExceptionBadType );
17 | bool toXML( XMLNode::Pointer& ) const;
18 | };
19 |
20 |
21 | #endif
22 |
--------------------------------------------------------------------------------
/libdreamland/gref/xmlglobalreference.cpp:
--------------------------------------------------------------------------------
1 | /* $Id: xmlglobalreference.cpp,v 1.1.2.2 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2006
4 | */
5 | #include "xmlglobalreference.h"
6 | #include "xmlstring.h"
7 |
8 | void XMLGlobalReference::fromXML( const XMLNode::Pointer& parent ) throw( ExceptionBadType )
9 | {
10 | XMLString str;
11 |
12 | str.fromXML( parent );
13 | setName( str.getValue( ) );
14 | }
15 |
16 | bool XMLGlobalReference::toXML( XMLNode::Pointer& parent ) const
17 | {
18 | if (name == "none")
19 | return false;
20 | else
21 | return XMLString( name ).toXML( parent );
22 | }
23 |
--------------------------------------------------------------------------------
/libdreamland/gref/xmlglobalreference.h:
--------------------------------------------------------------------------------
1 | /* $Id: xmlglobalreference.h,v 1.1.2.2 2009/10/11 18:35:36 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2005
4 | */
5 | #ifndef __XMLGLOBALREFERENCE_H__
6 | #define __XMLGLOBALREFERENCE_H__
7 |
8 | #include "globalreference.h"
9 | #include "xmlvariable.h"
10 |
11 | class XMLGlobalReference : public virtual GlobalReferenceBase,
12 | public XMLVariable
13 | {
14 | public:
15 |
16 | virtual void fromXML( const XMLNode::Pointer& ) throw( ExceptionBadType );
17 | virtual bool toXML( XMLNode::Pointer& ) const;
18 | };
19 |
20 |
21 | #define XMLGLOBALREF_DECL(Type) \
22 | struct XML##Type##Reference : public Type##Reference, public XMLGlobalReference { \
23 | XML##Type##Reference( ); \
24 | virtual ~XML##Type##Reference( ); \
25 | inline XML##Type##Reference & operator = ( int index ) { \
26 | assign( index ); \
27 | return *this; \
28 | } \
29 | };
30 |
31 | #define XMLGLOBALREF_IMPL(Type) \
32 | XML##Type##Reference::XML##Type##Reference( ) { } \
33 | XML##Type##Reference::~XML##Type##Reference( ) { }
34 |
35 | #endif
36 |
--------------------------------------------------------------------------------
/libdreamland/io/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # ruffina, DreamLand, 2003
3 | # based on: NoFate, 2002
4 | noinst_LTLIBRARIES = libio.la
5 |
6 | INCLUDES = \
7 | -I$(srcdir) \
8 | -I$(top_builddir) \
9 | -I$(srcdir)/../xml \
10 | -I$(srcdir)/../lang \
11 | -I$(srcdir)/../alloc \
12 | -I$(srcdir)/../util
13 |
14 | AM_CPPFLAGS = -Wall
15 |
16 | libio_la_SOURCES = \
17 | txncontext.cpp \
18 | dbio.cpp \
19 | dldirectory.cpp \
20 | dlfile.cpp \
21 | dlfileop.cpp \
22 | dlfilestream.cpp \
23 | exceptiondbio.cpp \
24 | xmlloader.cpp \
25 | xmltableelement.cpp \
26 | xmltableloader.cpp \
27 | xmlfile.cpp \
28 | xmlconfigurable.cpp \
29 | dlfileloader.cpp
30 |
31 |
--------------------------------------------------------------------------------
/libdreamland/io/config_io.h:
--------------------------------------------------------------------------------
1 | /* $Id$
2 | *
3 | * ruffina, 2004
4 | */
5 | #ifndef CONFIG_IO_H
6 | #define CONFIG_IO_H
7 |
8 | #ifdef HAVE_CONFIG_H
9 | #include "config.h"
10 | #endif /* HAVE_CONFIG_H */
11 |
12 | #ifdef HAVE_DIRENT_H
13 | #include "dirent.h"
14 | #define NAMLEN( dirent ) strlen( ( dirent )->d_name )
15 | #else
16 | #define dirent direct
17 | #define NAMLEN( dirent ) ( dirent )->d_namlen
18 | #ifdef HAVE_SYS_NDIR_H
19 | #include
20 | #endif
21 | #ifdef HAVE_SYS_DIR_H
22 | #include
23 | #endif
24 | #ifdef HAVE_NDIR_H
25 | #include
26 | #endif
27 | #endif /* HAVE_DIRENT_H */
28 |
29 | #endif /* CONFIG_IO_H */
30 |
--------------------------------------------------------------------------------
/libdreamland/io/dbio.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/planescape-mud/planescape_code/0689e4adcb1c57f4b09a4c911957b11afcaa5e5f/libdreamland/io/dbio.h
--------------------------------------------------------------------------------
/libdreamland/io/dbm/dbmio.h:
--------------------------------------------------------------------------------
1 | /* $Id$
2 | *
3 | * ruffina, Dream Land, 2005
4 | */
5 | /* $Id$
6 | *
7 | * unicorn, Forgotten Dungeon, 2005
8 | */
9 |
10 |
11 | #ifndef __DBMIO_H__
12 | #define __DBMIO_H__
13 |
14 | #include
15 | #include
16 | #include
17 | #include
18 |
19 | #include
20 | #include
21 |
22 | class DBMIO {
23 | public:
24 | typedef unsigned long int Key;
25 | struct Exception : public ::Exception {
26 | Exception(const DLString &ex) : ::Exception(ex) { }
27 | };
28 | struct EOFException : public Exception {
29 | EOFException() : Exception("eof") { }
30 | };
31 |
32 | DBMIO();
33 | ~DBMIO();
34 |
35 | void open(const char *fname, int flags, int mode = 0644);
36 | void sync();
37 | void close();
38 |
39 | void del(const Key &k);
40 | void get(const Key &k, DLString &v);
41 | void put(const Key &k, const DLString &v);
42 | void seq(Key &k, DLString &v, unsigned int flags);
43 |
44 | private:
45 | static u_int32_t hash(const void *, size_t);
46 |
47 | DB *db;
48 | };
49 |
50 | #endif
51 |
--------------------------------------------------------------------------------
/libdreamland/io/dbm/dbmtest.cpp:
--------------------------------------------------------------------------------
1 | /* $Id$
2 | *
3 | * ruffina, Dream Land, 2005
4 | */
5 | /* $Id$
6 | *
7 | * unicorn, Forgotten Dungeon, 2005
8 | */
9 |
10 |
11 | #include
12 |
13 | #include
14 |
15 | #include "dbmio.h"
16 |
17 | using namespace std;
18 |
19 | int
20 | main(int argc, char **argv)
21 | {
22 | DBMIO::Key key;
23 | DLString val;
24 | DBMIO db;
25 |
26 | if(argc < 2) {
27 | cout << "Usage: dbmtest " << endl;
28 | return 1;
29 | }
30 |
31 | db.open(argv[1], O_RDWR);
32 |
33 | try {
34 | db.seq(key, val, R_FIRST);
35 | while(1) {
36 | cout << "[" << key << "] " << endl
37 | << val << endl;
38 |
39 | db.seq(key, val, R_NEXT);
40 | }
41 | } catch(const DBMIO::EOFException &ex) {
42 | /*nothing*/
43 | } catch(const DBMIO::Exception &ex) {
44 | cout << ex.what() << endl;
45 | }
46 |
47 | db.close();
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/libdreamland/io/dbm/rdbms.cpp:
--------------------------------------------------------------------------------
1 | /* $Id$
2 | *
3 | * ruffina, Dream Land, 2005
4 | */
5 | /* $Id$
6 | *
7 | * unicorn, Forgotten Dungeon, 2005
8 | */
9 |
10 | #include "config.h"
11 |
12 | #ifdef HAS_BDB
13 | #include "rdbms_bdb.cpp"
14 | #else
15 | #error
16 | #endif
17 |
18 |
19 | template class DbContext;
20 | template class DbContext;
21 | template class DbContext;
22 |
--------------------------------------------------------------------------------
/libdreamland/io/dbm/rdbms.h:
--------------------------------------------------------------------------------
1 | /* $Id$
2 | *
3 | * ruffina, Dream Land, 2005
4 | */
5 | /* $Id$
6 | *
7 | * unicorn, Forgotten Dungeon, 2005
8 | */
9 |
10 | /* $Id$
11 | *
12 | * ruffina, Dream Land, 2005
13 | */
14 | /* $Id$
15 | *
16 | * unicorn, Forgotten Dungeon, 2005
17 | */
18 |
19 | #ifndef __RDBMS_H__
20 | #define __RDBMS_H__
21 |
22 | #include "config.h"
23 |
24 | #ifdef HAS_BDB
25 | #include "rdbms_bdb.h"
26 | #else
27 | #error
28 | #endif
29 |
30 |
31 | extern template class DbContext;
32 | extern template class DbContext;
33 | extern template class DbContext;
34 |
35 | #endif
36 |
--------------------------------------------------------------------------------
/libdreamland/io/dldirectory.h:
--------------------------------------------------------------------------------
1 | /* $Id: dldirectory.h,v 1.1.2.5 2014-09-19 11:45:55 rufina Exp $
2 | *
3 | * ruffina, Dream Land, 2007
4 | */
5 | #ifndef DLDIRECTORY_H
6 | #define DLDIRECTORY_H
7 |
8 | #include
9 |
10 | #include "config_io.h"
11 | #include "exceptiondbio.h"
12 | #include "exceptiondbioeof.h"
13 | #include "dlfile.h"
14 |
15 | class DLDirectory : public DLFile {
16 | public:
17 | DLDirectory( );
18 | DLDirectory( const DLString &dirname, const DLString &filename = DLString::emptyString, const DLString &fileext = DLString::emptyString );
19 | DLDirectory( const DLFile &dir, const DLFile &file = emptyFile );
20 | DLDirectory( const DLFile &dir, const DLString &filename, const DLString &fileext = DLString::emptyString );
21 | virtual ~DLDirectory( );
22 |
23 | void open( const DLString &path ) throw( ExceptionDBIO );
24 | void open( ) throw( ExceptionDBIO );
25 | void close( );
26 |
27 | DLFile nextEntry( ) throw( ExceptionDBIOEOF );
28 | DLFile nextTypedEntry( const DLString &fileExt ) throw( ExceptionDBIOEOF );
29 | DLFile tempEntry( ) throw( ExceptionDBIO );
30 |
31 | protected:
32 | DIR * dirp;
33 | };
34 |
35 | #endif
36 |
--------------------------------------------------------------------------------
/libdreamland/io/dlfileloader.h:
--------------------------------------------------------------------------------
1 | /* $Id$
2 | *
3 | * ruffina, 2004
4 | */
5 | #ifndef DLFILELOADER_H
6 | #define DLFILELOADER_H
7 |
8 | #include