2 Copyright (C) 2008-2010, Parrot Foundation.
7 src/pmc/handle.pmc - IO Handle PMC
11 This is the base-class for all IO-related PMCs.
13 =head2 Vtable Functions
21 Handle shouldn't be directly instantiated, init and init_pmc throws
22 EXCEPTION_INVALID_OPERATION.
28 #include "parrot/parrot.h"
29 #include "../src/io/io_private.h"
31 /* HEADERIZER HFILE: none */
32 /* HEADERIZER BEGIN: static */
33 /* HEADERIZER END: static */
35 pmclass Handle provides Handle manual_attrs {
36 /* TODO: Consider encapsulating PIOHANDLE as a PMC type, for subclassing */
37 ATTR PIOHANDLE os_handle; /* Low level OS descriptor */
40 Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
41 "Handle cannot be instantiated directly.");
44 VTABLE void init_pmc(PMC * init) {
45 Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
46 "Handle cannot be instantiated directly.");
57 =item C<METHOD isatty()>
59 Returns a boolean value indicating whether C<SELF> is a console/tty.
60 This default implementation always return false. Override it in
61 subtypes that are or can be tty.
75 * c-file-style: "parrot"
77 * vim: expandtab shiftwidth=4: