/*
        SlideObject.m

	SlideObject.m : This file is part of SlideShow

	Copyright (C) 2004 Fabien VALLON
	Additional copyrights here

	Authors: Fabien VALLON <fabien.vallon@fr.alcove.com>
	Date:	13 October 2004

	This program is free software; you can redistribute it and/or
	modify it under the terms of the GNU General Public License as
	published by the Free Software Foundation; either version 2 of
	the License, or (at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

	See the GNU General Public License for more details.

	You should have received a copy of the GNU General Public
	License along with this program; if not, write to:

		Free Software Foundation, Inc.
		59 Temple Place - Suite 330
		Boston, MA  02111-1307, USA
*/


#include "SlideObject.h"

#include <Foundation/NSString.h>

#include <AppKit/NSImage.h>


@implementation SlideObject

-(id) init
{
  if ( ! ( self = [super init] ) ) 
    return nil;
  
  _path = nil;
  return self;
}

-(void) dealloc
{
  if ( _path )
    [_path release];

  [super dealloc];
}

-(void) setPath: (NSString*) path
{
  if ( [path isEqualToString: _path]  )
    return;
  
  [path retain];
  [_path release];
  _path = path;
}

-(NSString *) path
{
  return _path;
}

-(NSString *) description
{
  if ( ! _path )
    return nil;
  else
    return [_path lastPathComponent];
}

-(NSString *) shortName
{
  if ( ! _path )
    return nil;
  else
    return [_path lastPathComponent];
}



-(void) setMark:(BOOL) flag
{
  _mark = flag;
}

-(BOOL) isMark
{
  return _mark; 
}

@end
