Main   GitHub

List of all members | Public Member Functions
FileObject Class Reference

Inherits SimObject.

Public Member Functions

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

Public Attributes

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

Member Function Documentation

virtual void FileObject::close ( )
virtual

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
virtual bool FileObject::isEOF ( )
virtual

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
virtual bool FileObject::openForAppend ( filename  )
virtual

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
virtual bool FileObject::openForRead ( filename  )
virtual

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
virtual bool FileObject::openForWrite ( filename  )
virtual

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
virtual string FileObject::peekLine ( )
virtual

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

virtual string FileObject::readLine ( )
virtual

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
virtual void FileObject::writeLine ( text  )
virtual

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
virtual void FileObject::writeObject ( SimObject  ,
object  prepend 
)
virtual

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.