Main   GitHub

Methods | List of all members
FileObject Class Reference

Inherits SimObject, and SimObject.

Methods

void close ()
 
void close ()
 
bool isEOF ()
 
bool isEOF ()
 
bool openForAppend (filename)
 
bool openForAppend (filename)
 
bool openForRead (filename)
 
bool openForRead (filename)
 
bool openForWrite (filename)
 
bool openForWrite (filename)
 
string peekLine ()
 
string peekLine ()
 
string readLine ()
 
string readLine ()
 
void writeLine (text)
 
void writeLine (text)
 
void writeObject (SimObject, object prepend)
 
void writeObject (SimObject, object prepend)
 
- Methods inherited from SimObject
void addFieldFilter (fieldName)
 
void addFieldFilter (fieldName)
 
string call (%args)
 
string call (%args)
 
int clone ([bool copyDynamicFields?=false])
 
int clone ([bool copyDynamicFields?=false])
 
void delete ()
 
void delete ()
 
void dump ()
 
void dump ()
 
void dumpClassHierarchy ()
 
void dumpClassHierarchy ()
 
string getClassName ()
 
string getClassName ()
 
string getClassNamespace ()
 
string getClassNamespace ()
 
string getDynamicField (index)
 
string getDynamicField (index)
 
int getDynamicFieldCount ()
 
int getDynamicFieldCount ()
 
string getField (int index)
 
string getField (int index)
 
int getFieldCount ()
 
int getFieldCount ()
 
string getFieldType (fieldName)
 
string getFieldType (fieldName)
 
string getFieldValue (fieldName)
 
string getFieldValue (fieldName)
 
int getGroup ()
 
int getGroup ()
 
int getId ()
 
int getId ()
 
string getInternalName ()
 
string getInternalName ()
 
string getName ()
 
string getName ()
 
string getProgenitorFile ()
 
string getProgenitorFile ()
 
string getSuperClassNamespace ()
 
string getSuperClassNamespace ()
 
int getType ()
 
int getType ()
 
bool isChildOfGroup ()
 
bool isChildOfGroup ()
 
bool isMemberOfClass (string classname)
 
bool isMemberOfClass (string classname)
 
bool isMethod (string method name)
 
bool isMethod (string method name)
 
bool isTimerActive ()
 
bool isTimerActive ()
 
void removeFieldFilter (fieldName)
 
void removeFieldFilter (fieldName)
 
bool save (fileName,[selectedOnly])
 
bool save (fileName,[selectedOnly])
 
int schedule (time, command,< arg1...argN >)
 
int schedule (time, command,< arg1...argN >)
 
void setClassNamespace ()
 
void setClassNamespace ()
 
bool setFieldValue (fieldName, value)
 
bool setFieldValue (fieldName, value)
 
void setInternalName ()
 
void setInternalName ()
 
void setName (newName)
 
void setName (newName)
 
void setProgenitorFile (file)
 
void setProgenitorFile (file)
 
void setSuperClassNamespace ()
 
void setSuperClassNamespace ()
 
bool startTimer (callbackFunction, float timePeriod,[repeat])
 
bool startTimer (callbackFunction, float timePeriod,[repeat])
 
void stopTimer ()
 
void stopTimer ()
 

Fields

SimBase
bool canSaveDynamicFields
 
string internalName
 
SimObjectPtr parentGroup
 
Namespace Linking
string superclass
 
string class
 
- Fields inherited from SimObject
bool canSaveDynamicFields
 
string internalName
 
SimObjectPtr parentGroup
 
string superclass
 
string class
 

Methods

void FileObject::close ( )

Use the close method to close the current file handle. If the file was opened for writing, this flushes the contents of the last write to disk.

Returns
No return value.
See Also
openForAppend, openForRead, openForWrite
void FileObject::close ( )

Use the close method to close the current file handle. If the file was opened for writing, this flushes the contents of the last write to disk.

Returns
No return value.
See Also
openForAppend, openForRead, openForWrite
bool FileObject::isEOF ( )

Use the isEOF method to check to see if the end of the current file (opened for read) has been reached.

Returns
Returns true if the end of file has been reached, false otherwise.
See Also
openForRead
bool FileObject::isEOF ( )

Use the isEOF method to check to see if the end of the current file (opened for read) has been reached.

Returns
Returns true if the end of file has been reached, false otherwise.
See Also
openForRead
bool FileObject::openForAppend ( filename  )

Use the openForAppend method to open a previously created file for appending. If the file specified by filename does not exist, the file is created first.

Parameters
filenameThe path and filename of the file to open for appending.
Returns
Returns true if the file was successfully opened for appending, false otherwise.
See Also
close, openForRead, openForWrite
bool FileObject::openForAppend ( filename  )

Use the openForAppend method to open a previously created file for appending. If the file specified by filename does not exist, the file is created first.

Parameters
filenameThe path and filename of the file to open for appending.
Returns
Returns true if the file was successfully opened for appending, false otherwise.
See Also
close, openForRead, openForWrite
bool FileObject::openForRead ( filename  )

Use the openForRead method to open a previously created file for reading.

Parameters
filenameThe path and filename of the file to open for reading.
Returns
Returns true if the file was successfully opened for reading, false otherwise.
See Also
close, OpenForAppend, OpenForWrite
bool FileObject::openForRead ( filename  )

Use the openForRead method to open a previously created file for reading.

Parameters
filenameThe path and filename of the file to open for reading.
Returns
Returns true if the file was successfully opened for reading, false otherwise.
See Also
close, OpenForAppend, OpenForWrite
bool FileObject::openForWrite ( filename  )

Use the openForWrite method to previously created or a new file for writing. In either case, the file will be overwritten.

Parameters
filenameThe path and filename of the file to open for writing.
Returns
Returns true if the file was successfully opened for writing, false otherwise.
See Also
close, OpenForAppend, openForRead
bool FileObject::openForWrite ( filename  )

Use the openForWrite method to previously created or a new file for writing. In either case, the file will be overwritten.

Parameters
filenameThe path and filename of the file to open for writing.
Returns
Returns true if the file was successfully opened for writing, false otherwise.
See Also
close, OpenForAppend, openForRead
string FileObject::peekLine ( )

Read a line from the file without moving the stream position.

string FileObject::peekLine ( )

Read a line from the file without moving the stream position.

string FileObject::readLine ( )

Use the readLine method to read a single line from a file previously opened for reading. Use isEOF to check for end of file while reading.

Returns
Returns the next line in the file, or a NULL string if the end-of-file has been reached.
See Also
isEOF, openForRead
string FileObject::readLine ( )

Use the readLine method to read a single line from a file previously opened for reading. Use isEOF to check for end of file while reading.

Returns
Returns the next line in the file, or a NULL string if the end-of-file has been reached.
See Also
isEOF, openForRead
void FileObject::writeLine ( text  )

Use the writeLine method to write a value ( text ) into a file that was previously opened for appending or over-writing.

Parameters
textThe value to write to the file.
Returns
No return value.
See Also
openForAppend, openForWrite
void FileObject::writeLine ( text  )

Use the writeLine method to write a value ( text ) into a file that was previously opened for appending or over-writing.

Parameters
textThe value to write to the file.
Returns
No return value.
See Also
openForAppend, openForWrite
void FileObject::writeObject ( SimObject  ,
object  prepend 
)
void FileObject::writeObject ( SimObject  ,
object  prepend 
)

Member Data Documentation

bool FileObject::canSaveDynamicFields
string FileObject::class

Script SuperClass of object.

string FileObject::internalName
SimObjectPtr FileObject::parentGroup

Group hierarchy parent of the object.

string FileObject::superclass

Script Class of object.



Copyright © 2013 GarageGames, LLC. All Rights Reserved.