Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] spell file inheritance

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Andrew Stitt <afrayedknot AT thefrayedknot.armory.com>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] spell file inheritance
  • Date: Mon, 3 Jul 2006 09:50:26 -0700

On Mon, Jul 03, 2006 at 12:17:55AM -0700, seth AT swoolley.homeip.net wrote:
> Only two points of clarification below:
>
> On Sat, Jul 01, 2006 at 05:24:43PM -0700, Andrew Stitt wrote:
> >
<snip>
> >
> > The proposed api's will exist for every sourced spell file,
> > except DETAILS (for now). Substitute "foo" below with "build" or whatever.
> >
> > default_sorcery_foo
> > This would be the explicit function for whatever sorcery does by
> > default currently (for example in BUILD this is ./configure ...; make)
> >
> > default_grimoire_foo
> > default_section_foo
> > These would source the grimoire or section file, or if they dont exist
> > do the default behavior, which is to proceed to their parent
> > (section->grimoire, grimoire->sorcery). If theres no section or grimoire
> > file the sorcery default is called.
>
> If a spell-level FOO called default_foo and it sees no FOO file at the
> section level, does it go through to the grimoire-level FOO file that
> may exist, or as this says, would it simply call default_sorcery_foo?
>
> I'm just asking for clarification of "holey" hierarchy paths.

Yea, default_section_foo first looks for the section FOO, and if it
doesn't exist calls default_grimoire_foo. It works the same way, just
another level down, it looks for the grimoire FOO, and if it doesn't
exist calls default_sorcery_foo. Which will exist for all spell files
ones not explicitly defined (like build stuff) will be simply true.


--
_________________________________________________________________________
| Andrew D. Stitt | acedit at armory.com | astitt at sourcemage.org |
| irc: afrayedknot | Sorcery Team Lead | ftp://t.armory.com/ |
| 1024D/D39B096C | 76E4 728A 04EE 62B2 A09A 96D7 4D9E 239B D39B 096C |
-------------------------------------------------------------------------




Archive powered by MHonArc 2.6.24.

Top of Page