// test adding descriptions with classes and functions using @doc
// requires: chuck-1.5.4.4 or higher

class Foo
{
    // add inline documenation (processed at compile-time)
    // (@doc can appear anywhere within the class definition)
    @doc "this is a description for the class Foo"
    
    fun void bar()
    {
        beth();
        kenny();

        // add inline documenation (processed at compile-time)
        // (@doc can appear anywhere within the function definition)
        @doc "a function in Foo, bar() likes calling his friends"
    }

    fun static void beth()
    {
        // add inline documenation (processed at compile-time)
        @doc "beth() is working on a novel about shared memory"
    }

    fun static void kenny()
    {
        // add inline documenation (processed at compile-time)
        @doc "kenny() is fun, and expects nothing in return"
    }
}

// print runtime info about Foo...
// (will also appear in documentation generated by CKDoc)
<<< CKDoc.describe( Foo ) >>>;
<<< CKDoc.describe( Foo.beth ) >>>;
<<< CKDoc.describe( Foo.kenny ) >>>;

// with an instance, can also get info about instanced functions
Foo f;
<<< CKDoc.describe( f ) >>>;
<<< CKDoc.describe( f.bar ) >>>;
