LightWrap++
AC++wrapperfortheLightWave3DSDK
lwpp::FileRequest2 Class Reference

#include <file_request.h>

+ Inheritance diagram for lwpp::FileRequest2:
+ Collaboration diagram for lwpp::FileRequest2:

List of all members.

Public Member Functions

 FileRequest2 (const int reqType=FREQ_LOAD, const char *title="", const char *fileType="", const char *baseName="", const char *path="", const char *_baseDirType=0, int(*pickName)(void)=0, int bufLen=1024)
 ~FileRequest2 (void)
LWFileReqLocal * getFileReqLocal ()
const char * getFullName ()
 Return the file name of the file selected in the requester.
const char * getFullPath () const
const char * getPath () const
bool Post (void)
 Post file request and return the result.
void setBaseName (const std::string name)

Protected Member Functions

bool _acquireGlobal ()
bool _acquireGlobal ()
virtual bool available () const
 Check if the global is available.
virtual bool available () const
 Check if the global is available.
const char * GetDirectory (const char *locType=0)
 Return the path to the define type of directory.
const std::string GetDirectoryStr (const char *locType=0)
virtual LWFileActivateFunc * getGlobal ()
 Get the pointer to the global.
virtual LWDirInfoFunc * getGlobal ()
 Get the pointer to the global.
LWDirInfoFunc * operator-> ()
 Get the pointer to the global.
LWFileActivateFunc * operator-> ()
 Get the pointer to the global.
const char * stripPath (const char *fileName)
 Remove a DirInfo directory from a full filename/path if possible.

Static Protected Attributes

static LWFileActivateFunc * globPtr
 Pointer to the global functions.
static LWDirInfoFunc * globPtr
 Pointer to the global functions.

Detailed Description

A general file requester

 The file path return is content directory aware and will (optionally) return a relative path.
 @note FREQ_MULTILOAD is not tested and probably needs a slightly different concept.

Constructor & Destructor Documentation

lwpp::FileRequest2::FileRequest2 ( const int  reqType = FREQ_LOAD,
const char *  title = "",
const char *  fileType = "",
const char *  baseName = "",
const char *  path = "",
const char *  _baseDirType = 0,
int(*)(void)  pickName = 0,
int  bufLen = 1024 
)
inline
Parameters:
reqTypeType of file requester, FREQ_LOAD, FREQ_SAVE, FREQ_DIRECTORY or FREQ_MULTILOAD
<em>titleTitle for the file requester
*fileTypeA Filter string
*baseNameThe initial file name
*pathThe initial path for the file requester
*_baseDirTypeBase directory as defined as LWFTYPE_ in lwhost.h or 0
*pickNamePickName callback for a FREQ_MULTILOAD style requester
bufLenLength for the string buffers
lwpp::FileRequest2::~FileRequest2 ( void  )
inline

Member Function Documentation

bool lwpp::GlobalBase< LWFileActivateFunc >::_acquireGlobal ( )
inlineprotectedinherited
bool lwpp::GlobalBase< LWDirInfoFunc >::_acquireGlobal ( )
inlineprotectedinherited
virtual bool lwpp::GlobalBase< LWFileActivateFunc >::available ( ) const
inlinevirtualinherited

Check if the global is available.

virtual bool lwpp::GlobalBase< LWDirInfoFunc >::available ( ) const
inlinevirtualinherited

Check if the global is available.

const char * lwpp::DirInfo::GetDirectory ( const char *  locType = 0)
inherited

Return the path to the define type of directory.

Parameters:
*locTypeDirectory type string or 0 for the default type
Returns:
Path of the directory
const std::string lwpp::DirInfo::GetDirectoryStr ( const char *  locType = 0)
inlineinherited
LWFileReqLocal* lwpp::FileRequest2::getFileReqLocal ( )
inline
const char* lwpp::FileRequest2::getFullName ( void  )
inlinevirtual

Return the file name of the file selected in the requester.

Implements lwpp::BaseFileRequest.

const char* lwpp::FileRequest2::getFullPath ( ) const
inline
virtual LWDirInfoFunc * lwpp::GlobalBase< LWDirInfoFunc >::getGlobal ( )
inlinevirtualinherited

Get the pointer to the global.

virtual LWFileActivateFunc * lwpp::GlobalBase< LWFileActivateFunc >::getGlobal ( )
inlinevirtualinherited

Get the pointer to the global.

const char* lwpp::FileRequest2::getPath ( ) const
inline
LWDirInfoFunc * lwpp::GlobalBase< LWDirInfoFunc >::operator-> ( )
inlineinherited

Get the pointer to the global.

LWFileActivateFunc * lwpp::GlobalBase< LWFileActivateFunc >::operator-> ( )
inlineinherited

Get the pointer to the global.

bool lwpp::FileRequest2::Post ( void  )
inlinevirtual

Post file request and return the result.

Returns:
True if the file selection is valid

Implements lwpp::BaseFileRequest.

void lwpp::FileRequest2::setBaseName ( const std::string  name)
inline
const char * lwpp::DirInfo::stripPath ( const char *  fileName)
inherited

Remove a DirInfo directory from a full filename/path if possible.

Parameters:
*fileNameFully qualified file name that may include the current DirInfo path
Returns:
stripped/relative file name if the original contained the DirInfo directory.

Member Data Documentation

LWFileActivateFunc * lwpp::GlobalBase< LWFileActivateFunc >::globPtr
staticprotectedinherited

Pointer to the global functions.

LWDirInfoFunc * lwpp::GlobalBase< LWDirInfoFunc >::globPtr
staticprotectedinherited

Pointer to the global functions.


The documentation for this class was generated from the following file: