SPVM::Document::Resource - How to writethe resource class
=head1 Resource
A resource is a L<native class|SPVM::Document::NativeClass> that contains a set of sources and headers of native language such as the C language or C<C++>.
A resource doesn't hasthe native class file such as C<Foo.c>. It hasa config file such as C<Foo.config>. Header files are placed at C<Foo.native/include>. Source filies are placed at C<Foo.native/src>.
Let's see the files of L<Resource::Zlib|SPVM::Resource::Zlib> as an example.
The header files of C<zlib>. These files are the header files extracted from C<src> directory.
crc32.h
deflate.h
gzguts.h
inffast.h
inffixed.h
inflate.h
inftrees.h
trees.h
zconf.h
zlib.h
zutil.h
B<The list of the files in C<src> directory>
The source files of C<zlib>.
adler32.c
amiga
ChangeLog
CMakeLists.txt
compress.c
configure
contrib
crc32.c
deflate.c
doc
examples
FAQ
gzclose.c
gzlib.c
gzread.c
gzwrite.c
INDEX
infback.c
inffast.c
inflate.c
inftrees.c
Makefile
Makefile.in
make_vms.com
msdos
nintendods
old
os400
qnx
README
test
treebuild.xml
trees.c
uncompr.c
watcom
win32
zconf.h.cmakein
zconf.h.in
zlib2ansi
zlib.3
zlib.3.pdf
zlib.map
zlib.pc.cmakein
zlib.pc.in
zutil.c
=head1 Using Resource
The method L<SPVM::Builder::Config/"use_resource"> loads a resource. C<MyZlib> is a L<native class|SPVM::Document::NativeClass> to useL<Resource::Zlib|SPVM::Resource::Zlib>.