RVC::OBJITEM Class Reference

OBJITEM class for specifying a particular file and object. More...

#include <rvc/objitem.h>

List of all members.

Public Types

enum  TYPE {
  TYPE_Empty = 0, TYPE_Invalid = 1, TYPE_General_Folder = 2, TYPE_General_File = 3,
  TYPE_RVC_File = 4, TYPE_RVC_Folder = 5, TYPE_RVC_Object = 6, TYPE_URL = 7
}

Public Member Functions

 OBJITEM (const DESCRIPTOR &Descriptor)
DEPRECATED OBJITEM (const FILEPATH &filename, RVCINODENUM inode, const CREDENTIALS *pCredentials=0)
 OBJITEM (const MISTRING &URL, const MISTRING &Title, const RVC::OBJTYPE &ObjType)
 OBJITEM (const FILEPATH &filename, const MISTRING &ObjectPath)
 OBJITEM (const OBJITEM &rhs)
 OBJITEM ()
 ~OBJITEM ()
void Clear ()
void CreateNew (const RVC::OBJITEM &ParentItem, RVC::OBJTYPE ObjType, const DESCRIPTOR &Descriptor)
void CreateNew (const DESCRIPTOR &Descriptor, RVC::OBJTYPE ObjType=RVC::OBJTYPE_All)
void CreateNewFileNonRVC (const FILEPATH &filepath)
ERRVALUE GetCombinedPath (MISTRING &CombinedPath, const CREDENTIALS *pCredentials=0) const
void GetDisplayPath (MISTRING &pathstr, const CREDENTIALS *pCredentials=0) const
MISTRING GetDisplayString (const CREDENTIALS *pCredentials=0) const
void GetDisplayString (MISTRING &string, const CREDENTIALS *pCredentials=0) const
const FILEPATHGetFilePath () const
ICONID GetIconID () const
DEPRECATED RVCINODENUM GetInode (const CREDENTIALS *pCredentials=0) const
const DESCRIPTORGetObjectDescriptor (const CREDENTIALS *pCredentials=0) const
void GetObjectDisplayPath (MISTRING &string, const CREDENTIALS *pCredentials=0) const
ERRVALUE GetObjectPath (MISTRING &ObjectPath, const CREDENTIALS *pCredentials=0) const
RVC::OBJTYPE GetObjectType () const
bool GetParent (OBJITEM &ParentObjItem, const CREDENTIALS *pCredentials=0) const
const MISTRINGGetTitle () const
MISTRING GetToolTipString (const CREDENTIALS *pCredentials=0) const
void GetToolTipString (MISTRING &string, const CREDENTIALS *pCredentials=0) const
OBJITEM::TYPE GetType () const
const MISTRINGGetURL () const
bool HasObjectDescription (const CREDENTIALS *pCredentials=0) const
bool HasSameParent (const OBJITEM &rhs) const
bool IniRead (INIHANDLE handle, const char *group, const char *field)
void IniWrite (INIHANDLE handle, const char *group, const char *field, const CREDENTIALS *pCredentials=0) const
bool IsAssigned () const
bool IsEqual (const OBJITEM &rhs, const CREDENTIALS *pCredentials=0) const
bool IsExisting (const CREDENTIALS *pCredentials=0) const
bool IsFileNonRVC () const
bool IsFileOnly () const
bool IsLessThan (const OBJITEM &rhs) const
bool IsLessThanChild (const OBJITEM &rhs) const
bool IsNewRequest () const
bool IsObjectExtFile (const CREDENTIALS *pCredentials=0) const
bool IsResolved () const
bool IsSkipRequest () const
bool LocateRelated (const FILEPATH &SourcePath, FILEFIND::RELATEDORDER order, const CREDENTIALS *pCredentials=0)
OBJITEMoperator= (const DESCRIPTOR &Descriptor)
OBJITEM operator= (const OBJITEM &rhs)
void SetCombinedPath (const MISTRING &CombinedPath, const CREDENTIALS *pCredentials=0)
void SetFilePath (const FILEPATH &filepath)
bool SetFromDisplayPath (const MISTRING &pathstr, const CREDENTIALS *pCredentials=0)
void SetItem (const FILEPATH &filename, const MISTRING &ObjectPath)
void SetItemToFile (const FILEPATH &filename, const CREDENTIALS *pCredentials=0)
void SetObjectDescriptor (const DESCRIPTOR &NewDescriptor)
void SetObjectPath (const MISTRING &ObjectPath, const CREDENTIALS *pCredentials=0)
void SetObjectType (OBJTYPE objtype)
void SetSkipRequest ()
void SetTitle (const MISTRING &title)
void SetURL (const MISTRING &url, RVC::OBJTYPE ObjType=RVC::OBJTYPE_Remote)

Static Public Member Functions

static ICONID GetIconIdFromObjectType (OBJTYPE objtype)
static void SetupOutputList (OBJITEMLIST &oobjlist, const OBJITEMLIST &iobjlist, const char *source=0)

Detailed Description

OBJITEM class for specifying a particular file and object.


Member Enumeration Documentation

General item type enumeration.

Enumerator:
TYPE_Empty 

Empty.

TYPE_Invalid 

Invalid location.

TYPE_General_Folder 

Existing filesystem folder.

TYPE_General_File 

Existing or new general (non-RVC) file.

TYPE_RVC_File 

Existing or new RVC file (RVC::OBJTYPE_File).

TYPE_RVC_Folder 

Existing or new RVC folder (RVC::OBJTYPE_Folder).

TYPE_RVC_Object 

Existing or new RVC object (not OBJTYPE_File or OBJTYPE_Folder).

TYPE_URL 

URL.


Constructor & Destructor Documentation

RVC::OBJITEM::OBJITEM (  ) 

Default constructor.

RVC::OBJITEM::OBJITEM ( const OBJITEM rhs  ) 

Copy constructor.

Parameters:
rhs Object to copy from
RVC::OBJITEM::OBJITEM ( const FILEPATH filename,
const MISTRING ObjectPath 
)

Construct from FILEPATH and object path string.

Parameters:
filename Filename
ObjectPath Object path
RVC::OBJITEM::OBJITEM ( const MISTRING URL,
const MISTRING Title,
const RVC::OBJTYPE ObjType 
)

Consturct from URL, Title, ObjType.

Parameters:
URL URL
Title Title
ObjType ObjType
DEPRECATED RVC::OBJITEM::OBJITEM ( const FILEPATH filename,
RVCINODENUM  inode,
const CREDENTIALS pCredentials = 0 
)

Construct from FILEPATH and object inode.

Deprecated:
Use version with object path.
Parameters:
filename Filename
inode Object inode
RVC::OBJITEM::OBJITEM ( const DESCRIPTOR Descriptor  ) 

Construct having specified name, description, optional source.

This useful when setting up an "output" OBJITEMLIST.

RVC::OBJITEM::~OBJITEM (  ) 

Default destructor.


Member Function Documentation

void RVC::OBJITEM::Clear (  ) 

Clear the OBJITEM, refers to nothing.

void RVC::OBJITEM::CreateNew ( const RVC::OBJITEM ParentItem,
RVC::OBJTYPE  ObjType,
const DESCRIPTOR Descriptor 
)

Setup for use in prompt for or creation of new object with RVC::OBJITEM parent.

Parameters:
ParentItem Parent object item reference
ObjType New object type
Descriptor New object descriptor
void RVC::OBJITEM::CreateNew ( const DESCRIPTOR Descriptor,
RVC::OBJTYPE  ObjType = RVC::OBJTYPE_All 
)

Setup for use in prompt for or creation of new object with unspecified parent.

Does not alter currently set filepath.

Parameters:
Descriptor New object descriptor
ObjType New object type
void RVC::OBJITEM::CreateNewFileNonRVC ( const FILEPATH filepath  ) 

Setup as new non-RVC file.

ERRVALUE RVC::OBJITEM::GetCombinedPath ( MISTRING CombinedPath,
const CREDENTIALS pCredentials = 0 
) const

Get the Combined Path.

This returns a string with the filepath and object path as as single string. Use SetCombinedPath to set an OBJITEM using a string of this format.

void RVC::OBJITEM::GetDisplayPath ( MISTRING pathstr,
const CREDENTIALS pCredentials = 0 
) const

Get display path, suitable for editing by user.

Display path uses / as separator between folders, file name and RVC folders. Not recommended for non-folder RVC objects. SetFromDisplayPath.

MISTRING RVC::OBJITEM::GetDisplayString ( const CREDENTIALS pCredentials = 0  )  const [inline]

Return string suitable for display.

String will consist of file name, separator and object name.

See also:
GetToolTipString
void RVC::OBJITEM::GetDisplayString ( MISTRING string,
const CREDENTIALS pCredentials = 0 
) const

Get string suitable for display.

String will consist of file name, separator and object name.

See also:
GetToolTipString
Parameters:
string String returned
const FILEPATH& RVC::OBJITEM::GetFilePath (  )  const [inline]

Get the filepath.

ICONID RVC::OBJITEM::GetIconID (  )  const

Get icon ID.

static ICONID RVC::OBJITEM::GetIconIdFromObjectType ( OBJTYPE  objtype  )  [static]
DEPRECATED RVCINODENUM RVC::OBJITEM::GetInode ( const CREDENTIALS pCredentials = 0  )  const [inline]

Get the inode.

Deprecated:
Avoid use of INODENUM
const DESCRIPTOR& RVC::OBJITEM::GetObjectDescriptor ( const CREDENTIALS pCredentials = 0  )  const [inline]

Get the RVC::DESCRIPTOR of the object represented by this instance.

Returns:
DESCRIPTOR instance containing the name and description of the object
void RVC::OBJITEM::GetObjectDisplayPath ( MISTRING string,
const CREDENTIALS pCredentials = 0 
) const

Get string suitable for displaying object path.

Will be one-line string. Containing folder will be shown with no "type" suffix. Containing object(s) will show with type in parentheses. Object itself will not show with type suffix.

Parameters:
string String returned
ERRVALUE RVC::OBJITEM::GetObjectPath ( MISTRING ObjectPath,
const CREDENTIALS pCredentials = 0 
) const [inline]

Get the Object Path.

RVC::OBJTYPE RVC::OBJITEM::GetObjectType (  )  const

Get the object type.

bool RVC::OBJITEM::GetParent ( OBJITEM ParentObjItem,
const CREDENTIALS pCredentials = 0 
) const

Get the parent object item for 'this'.

Returns:
'True' if the parent is valid, 'false' if not
const MISTRING& RVC::OBJITEM::GetTitle (  )  const [inline]

Get the object's Title.

MISTRING RVC::OBJITEM::GetToolTipString ( const CREDENTIALS pCredentials = 0  )  const [inline]

Return standard "ToolTip" string for this item.

Returned string will contain multiple lines.

See also:
GetDisplayString.
void RVC::OBJITEM::GetToolTipString ( MISTRING string,
const CREDENTIALS pCredentials = 0 
) const

Get standard "ToolTip" string for this item.

Returned string will contain multiple lines.

See also:
GetDisplayString.
Parameters:
string Tooltip string returned
OBJITEM::TYPE RVC::OBJITEM::GetType (  )  const

Get general item type.

const MISTRING& RVC::OBJITEM::GetURL (  )  const [inline]

Get the object's URL.

bool RVC::OBJITEM::HasObjectDescription ( const CREDENTIALS pCredentials = 0  )  const [inline]

Determine if has object description.

bool RVC::OBJITEM::HasSameParent ( const OBJITEM rhs  )  const [inline]

Determine if the two OBJITEM's have the same parent object.

bool RVC::OBJITEM::IniRead ( INIHANDLE  handle,
const char *  group,
const char *  field 
)

Read from .ini file.

Returns:
true if entry exists in .ini file, false if not.
Parameters:
handle Ini Handle created by IniOpen()
group Group to look for ini entry, App Name if =0
field Field to read string from
void RVC::OBJITEM::IniWrite ( INIHANDLE  handle,
const char *  group,
const char *  field,
const CREDENTIALS pCredentials = 0 
) const

Write to .ini file.

Parameters:
handle Ini Handle created by IniOpen()
group Group to write ini entry, App Name if =0
field Field to write string to
bool RVC::OBJITEM::IsAssigned (  )  const

Determine if have both filepath and "object" assigned.

Does not determine if actually resolved to existing object.

bool RVC::OBJITEM::IsEqual ( const OBJITEM rhs,
const CREDENTIALS pCredentials = 0 
) const

Is it the same?

Parameters:
rhs Object to compare
bool RVC::OBJITEM::IsExisting ( const CREDENTIALS pCredentials = 0  )  const

Determine if item references actual existing object.

This should not be used in time-critical operations as it will actually open the file and verify that the object exists.

bool RVC::OBJITEM::IsFileNonRVC (  )  const

Determine if assigned file is non-RVC format.

bool RVC::OBJITEM::IsFileOnly (  )  const [inline]

Determine if item references the file level.

bool RVC::OBJITEM::IsLessThan ( const OBJITEM rhs  )  const

Determine if item is less than 'rhs' Needed for export of OBJITEMLIST from dll.

bool RVC::OBJITEM::IsLessThanChild ( const OBJITEM rhs  )  const [inline]

Determine if item is less than 'rhs' according to child ordering.

bool RVC::OBJITEM::IsNewRequest (  )  const [inline]

Determine if item is built from a new object request from DlgGetObject().

bool RVC::OBJITEM::IsObjectExtFile ( const CREDENTIALS pCredentials = 0  )  const

Determine if assigned "object" actually refers to external (non-RVC) file.

bool RVC::OBJITEM::IsResolved (  )  const

Determine if has been resolved to specific existing object.

bool RVC::OBJITEM::IsSkipRequest (  )  const [inline]

Determine if item is built from a skip object request from DlgGetObject().

bool RVC::OBJITEM::LocateRelated ( const FILEPATH SourcePath,
FILEFIND::RELATEDORDER  order,
const CREDENTIALS pCredentials = 0 
)

Locate item by search relative to specified source path.

Will use current file and object paths as items to search for, and if successful the current instance will be set to the located object.

Returns:
'true' if located, false if not
Parameters:
SourcePath Path to source file or starting folder
order Folder search order
OBJITEM& RVC::OBJITEM::operator= ( const DESCRIPTOR Descriptor  ) 

Assignment.

OBJITEM RVC::OBJITEM::operator= ( const OBJITEM rhs  ) 

Assignment.

Parameters:
rhs Object to copy from
void RVC::OBJITEM::SetCombinedPath ( const MISTRING CombinedPath,
const CREDENTIALS pCredentials = 0 
)

Set the Combined Path.

This sets up an ObjItem given a string encoded by GetCombinedPath

void RVC::OBJITEM::SetFilePath ( const FILEPATH filepath  ) 

Set file path.

bool RVC::OBJITEM::SetFromDisplayPath ( const MISTRING pathstr,
const CREDENTIALS pCredentials = 0 
)

Set from "display path".

Display path uses / as separator between folders, file name and RVC folders.

Returns:
true if set to existing location, false if not.
void RVC::OBJITEM::SetItem ( const FILEPATH filename,
const MISTRING ObjectPath 
)

Set item from FILEPATH and object path.

Parameters:
filename File name
ObjectPath Object path
void RVC::OBJITEM::SetItemToFile ( const FILEPATH filename,
const CREDENTIALS pCredentials = 0 
)

Set item from FILEPATH only, must be an rvc file.

Parameters:
filename File name
void RVC::OBJITEM::SetObjectDescriptor ( const DESCRIPTOR NewDescriptor  ) 

Set object descriptor.

void RVC::OBJITEM::SetObjectPath ( const MISTRING ObjectPath,
const CREDENTIALS pCredentials = 0 
)

Set object path without clearing file path.

Parameters:
ObjectPath Object path
void RVC::OBJITEM::SetObjectType ( OBJTYPE  objtype  )  [inline]

Set object type if not bound to an object.

Parameters:
objtype Object type
void RVC::OBJITEM::SetSkipRequest (  ) 

Set item to be 'skip' request.

void RVC::OBJITEM::SetTitle ( const MISTRING title  )  [inline]

Set "title" (typically only used for URL).

Parameters:
title Title string
static void RVC::OBJITEM::SetupOutputList ( OBJITEMLIST oobjlist,
const OBJITEMLIST iobjlist,
const char *  source = 0 
) [static]

Setup output object item list corresponding to specified input object item list.

Parameters:
oobjlist Output list
iobjlist Input list
source Value to use for "source" in object header, will use application name if null.
void RVC::OBJITEM::SetURL ( const MISTRING url,
RVC::OBJTYPE  ObjType = RVC::OBJTYPE_Remote 
)

Set item to reference URL.

Parameters:
url URL string
ObjType Remote object type

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

Generated on Sun Oct 7 21:37:45 2012 for TNTsdk 2012 by  doxygen 1.6.1