[26501] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 8659 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Nov 13 00:05:34 2005

Date: Sat, 12 Nov 2005 21:05:04 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 12 Nov 2005     Volume: 10 Number: 8659

Today's topics:
    Re: A question about m/PATTERN/g - first match disappea <1usa@llenroc.ude.invalid>
        Advanced fiule handling <ronnyma@math.uio.no>
        Inject fresh variable in scope (See Website For Email)
    Re: Inject fresh variable in scope <1usa@llenroc.ude.invalid>
    Re: Inject fresh variable in scope <sdn.girths00869@zoemail.net>
        strange problem with system() and backtick operator <news@chaos-net.de>
    Re: strange problem with system() and backtick operator <someone@example.com>
    Re: Why my code doesn't look Perl-ish? robic0
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sat, 12 Nov 2005 23:14:46 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: A question about m/PATTERN/g - first match disappears
Message-Id: <Xns970CB99E5B8E5asu1cornelledu@127.0.0.1>

Abigail <abigail@abigail.nl> wrote in
news:slrndncsmn.2l3.abigail@alexandra.abigail.nl: 

> A. Sinan Unur (1usa@llenroc.ude.invalid) wrote on MMMMCDLVI September
> MCMXCIII in <URL:news:Xns970CB121219BFasu1cornelledu@127.0.0.1>:
> ~~  
> ~~  Now, why do you want to do that? :) You may have overlooked this,
> ~~  but I think the most succint explanation is given by the
> ~~  documentation for pos. When you match a string using a regex with
> ~~  the g modifier, the position of the match is stored, so that 
> ~~  the next match can match the next occurence (if any).
> 
> That's for a /g match *IN SCALAR CONTEXT*. In list context, it's quite
> different.

The OP had a /g match in scalar context, followed by a /g match in list 
context on the same string. My assumption is that the /g match in list 
context started from where the match in scalar context left off. The 
explanation for the behavior arose from the way /g behaves in scalar 
context. Am I missing something?

Sinan
-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html



------------------------------

Date: Sun, 13 Nov 2005 02:03:43 +0100
From: "Ronny Mandal" <ronnyma@math.uio.no>
Subject: Advanced fiule handling
Message-Id: <dl638r$49j$1@readme.uio.no>

Hello.

Is there a way to extract information about the userid that was the last one 
to access a file?

Running Perl 5 on 'NIX.


Regards,

Ronny Mandal 




------------------------------

Date: Sat, 12 Nov 2005 15:03:16 -0800
From: "Andrei Alexandrescu (See Website For Email)" <SeeWebsiteForEmail@moderncppdesign.com>
Subject: Inject fresh variable in scope
Message-Id: <Ipv6pH.1tB0@beaver.cs.washington.edu>

Hello,


I set out to write a useful OnScopeExit feature that's supposed to
execute some code when the current scope is exited. What I came up with is:

package OnScopeExit;
my $todo = sub {};
sub new { shift; $todo = shift; bless {}; }
sub DESTROY {
   &$todo;
}
package main;
sub OnScopeExit(&) {
   return new OnExit(shift);
}

Now I can say in any scope I please:

{
   ... code ...
   my $tempFile = "/tmp/temp.txt";
   my $cookie1 = OnScopeExit { unlink($tempFile); };
   ... code ...
}

Sure enough, when the current scope exits, the local $cookie1 will have
its reference count go to zero, the DESTROY sub gets called, and the
code that deletes the temporary file is invoked. Very nice.

The only annoying part is that I need to define some "my" variable with
a unique name for each OnScopeExit action I want to perform. Ideally,
I'd only need to write:

{
   ... code ...
   my $tempFile = "/tmp/temp.txt";
   OnScopeExit { unlink($tempFile); }
   ... code ...
}

that is, the creation of a lexically-scoped anonymous variable that will
go out of scope should be somehow automated.

I looked through symbol tables, scratchpads, and the ilk, for a couple
of hours, to no avail. Is there a way?


Thanks,

Andrei


------------------------------

Date: Sun, 13 Nov 2005 00:14:43 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Inject fresh variable in scope
Message-Id: <Xns970CC3C7E3B77asu1cornelledu@127.0.0.1>

"Andrei Alexandrescu (See Website For Email)"
<SeeWebsiteForEmail@moderncppdesign.com> wrote in
news:Ipv6pH.1tB0@beaver.cs.washington.edu: 

> I set out to write a useful OnScopeExit feature that's supposed to
> execute some code when the current scope is exited.

 ...

> Sure enough, when the current scope exits, the local $cookie1 will
> have its reference count go to zero, the DESTROY sub gets called, and
> the code that deletes the temporary file is invoked. Very nice.
> 
> The only annoying part is that I need to define some "my" variable
> with a unique name for each OnScopeExit action I want to perform.

If you are willing to live with the necessity of creating only one 
lexically scoped AtExit object, you might find:

http://search.cpan.org/~bradapp/AtExit-2.01/AtExit.pm

useful.

Sinan

-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html



------------------------------

Date: Sat, 12 Nov 2005 18:19:55 -0600
From: "Eric J. Roode" <sdn.girths00869@zoemail.net>
Subject: Re: Inject fresh variable in scope
Message-Id: <Xns970CC4DC234ECsdn.comcast@216.196.97.136>

"Andrei Alexandrescu (See Website For Email)"
<SeeWebsiteForEmail@moderncppdesign.com> wrote in
news:Ipv6pH.1tB0@beaver.cs.washington.edu: 

> Hello,
> 
> 
> I set out to write a useful OnScopeExit feature that's supposed to
> execute some code when the current scope is exited. What I came up
> with is: 
> 
> package OnScopeExit;
> my $todo = sub {};
> sub new { shift; $todo = shift; bless {}; }
> sub DESTROY {
>    &$todo;
> }
> package main;
> sub OnScopeExit(&) {
>    return new OnExit(shift);
> }
> 
> Now I can say in any scope I please:
> 
> {
>    ... code ...
>    my $tempFile = "/tmp/temp.txt";
>    my $cookie1 = OnScopeExit { unlink($tempFile); };
>    ... code ...
> }
> 
> Sure enough, when the current scope exits, the local $cookie1 will
> have its reference count go to zero, the DESTROY sub gets called, and
> the code that deletes the temporary file is invoked. Very nice.
> 
> The only annoying part is that I need to define some "my" variable
> with a unique name for each OnScopeExit action I want to perform.
> Ideally, I'd only need to write:
> 
> {
>    ... code ...
>    my $tempFile = "/tmp/temp.txt";
>    OnScopeExit { unlink($tempFile); }
>    ... code ...
> }
> 
> that is, the creation of a lexically-scoped anonymous variable that
> will go out of scope should be somehow automated.
> 
> I looked through symbol tables, scratchpads, and the ilk, for a couple
> of hours, to no avail. Is there a way?

I don't believe so.  I tried this same sort of thing a while back, 
and I couldn't think of any way.

Two things about your object class, above.  One, you should not use
a package variable ($todo) to store your action.  What if someone needed
to do this?

    {
        my $one = OnScopeExit {...};
        {
            my $two = OnScopeExit {...};
        }
    }

For each object, store the to-do action *in* the object itself.
Instead of:
> sub new { shift; $todo = shift; bless {}; }
do
  sub new { shift; bless { todo => shift }; }

Second: Don't hardcode OnScopeExit to be in package main.  What if
you need an end-of-scope action in a module you're developing, a
module that exists in a different namespace than "main"?  Export it
properly, via the Exporter module.

HTH.

-- 
Eric
`$=`;$_=\%!;($_)=/(.)/;$==++$|;($.,$/,$,,$\,$",$;,$^,$#,$~,$*,$:,@%)=(
$!=~/(.)(.).(.)(.)(.)(.)..(.)(.)(.)..(.)......(.)/,$"),$=++;$.++;$.++;
$_++;$_++;($_,$\,$,)=($~.$"."$;$/$%[$?]$_$\$,$:$%[$?]",$"&$~,$#,);$,++
;$,++;$^|=$";`$_$\$,$/$:$;$~$*$%[$?]$.$~$*${#}$%[$?]$;$\$"$^$~$*.>&$=`


------------------------------

Date: Sun, 13 Nov 2005 00:23:02 +0100
From: Martin Kissner <news@chaos-net.de>
Subject: strange problem with system() and backtick operator
Message-Id: <slrndncuam.63p.news@maki.homeunix.net>

hello together,

I have a very strange problem with the system() command and/or the
backtick operator.

I can not provide a small demonstration script because when I wrote the
script (see below) the very same commands worked properly.

The main script is (among  other things) supposed to download files from
a ftp server and then change the file permissions of the local files to
those on the server.
I use Net::FTP for this script.

The download part works okay, but the permissions of the local files are
only changed, if the octal value is greater or equal 400.
Here is the sub which shows this strange behavior.

--- snip ---
[...]
use warnings;
use strict; 
[...]

sub copy_file {
    my $file    = shift; 	# remote filepath
    my $action  = shift; 	# "0" => put; "1" => get
    
    if ($action) {
        my $lfile   = strip_slash($file);
        $ftp->get($file,$lfile);
        my $octal = get_permissions($file,"r");
#       print "`chmod $octal $lfile`\n";
#       `chmod $octal $lfile`;
        system("chmod $octal $lfile 2>/dev/null") == 0
			or warn "\"chmod $octal $lfile\" failed!\n";
    } else {
        $ftp->put($lfile,$file);
    }
    set_l2rmtime($file);
}
--- snap ---

If I copy/paste the output from the print statement or from warn"..." to
the terminal, the chmod works.
As I said above if $octal is 400 or greater it also works!!!
If $octal is 377 or less I get:
	"chmod 377 testdir/testfile.txt" failed!
If I omit the '2>/dev/null' part I get
	"chmod: testdir/testlfile.txt: No such file or directory"
but only if $octal is less than 400.

I also tried working with absolute paths with the same results.
Then I wrote this little script for testing and demonstration:

--- snip ---
#!/usr/bin/perl

use warnings;
use strict;

my $octal    = $ARGV[0];

# print "`chmod $octal testdir/testfile.txt`\n";
#       `chmod $octal $lfile`;
system("chmod $octal testdir/testfile.txt") or warn "\"chmod $mode
testfile.txt\" failed!\n";
--- snap ---

I have testes this successfully for $octal from 0 to 777 (with backticks
and with system("...")).

At this point I have tried everything I could imagine.
Any help will be highly appreciated.

Best regards
Martin

-- 
perl -e '$S=[[73,116,114,115,31,96],[108,109,114,102,99,112],
[29,77,98,111,105,29],[100,93,95,103,97,110]];
for(0..3){for$s(0..5){print(chr($S->[$_]->[$s]+$_+1))}}'


------------------------------

Date: Sun, 13 Nov 2005 00:14:03 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: strange problem with system() and backtick operator
Message-Id: <fzvdf.105949$S4.81794@edtnps84>

Martin Kissner wrote:
> 
> I have a very strange problem with the system() command and/or the
> backtick operator.
> 
> I can not provide a small demonstration script because when I wrote the
> script (see below) the very same commands worked properly.
> 
> The main script is (among  other things) supposed to download files from
> a ftp server and then change the file permissions of the local files to
> those on the server.
> I use Net::FTP for this script.
> 
> The download part works okay, but the permissions of the local files are
> only changed, if the octal value is greater or equal 400.
> Here is the sub which shows this strange behavior.
> 
> --- snip ---
> [...]
> use warnings;
> use strict; 
> [...]
> 
> sub copy_file {
>     my $file    = shift; 	# remote filepath
>     my $action  = shift; 	# "0" => put; "1" => get
>     
>     if ($action) {
>         my $lfile   = strip_slash($file);
>         $ftp->get($file,$lfile);
>         my $octal = get_permissions($file,"r");
> #       print "`chmod $octal $lfile`\n";
> #       `chmod $octal $lfile`;
>         system("chmod $octal $lfile 2>/dev/null") == 0
> 			or warn "\"chmod $octal $lfile\" failed!\n";
>     } else {
>         $ftp->put($lfile,$file);
>     }
>     set_l2rmtime($file);
> }
> --- snap ---
> 
> If I copy/paste the output from the print statement or from warn"..." to
> the terminal, the chmod works.
> As I said above if $octal is 400 or greater it also works!!!
> If $octal is 377 or less I get:
> 	"chmod 377 testdir/testfile.txt" failed!
> If I omit the '2>/dev/null' part I get
> 	"chmod: testdir/testlfile.txt: No such file or directory"
> but only if $octal is less than 400.
> 
> I also tried working with absolute paths with the same results.
> Then I wrote this little script for testing and demonstration:
> 
> --- snip ---
> #!/usr/bin/perl
> 
> use warnings;
> use strict;
> 
> my $octal    = $ARGV[0];
> 
> # print "`chmod $octal testdir/testfile.txt`\n";
> #       `chmod $octal $lfile`;
> system("chmod $octal testdir/testfile.txt") or warn "\"chmod $mode
> testfile.txt\" failed!\n";
> --- snap ---
> 
> I have testes this successfully for $octal from 0 to 777 (with backticks
> and with system("...")).
> 
> At this point I have tried everything I could imagine.
> Any help will be highly appreciated.

Have you tried the built-in chmod function?

perldoc -f chmod



John
-- 
use Perl;
program
fulfillment


------------------------------

Date: Sat, 12 Nov 2005 18:40:12 -0800
From: robic0
Subject: Re: Why my code doesn't look Perl-ish?
Message-Id: <vp7dn1hq3jj9pc1jes12ged96g02f9vqan@4ax.com>

On Wed, 09 Nov 2005 23:36:12 -0800, robic0 wrote:

>On Sat, 5 Nov 2005 09:34:40 +0100, "Tassilo v. Parseval"
><tassilo.von.parseval@rwth-aachen.de> wrote:
>
>>Also sprach robic0@yahoo.com:
>>
>>> On Fri, 04 Nov 2005 23:09:06 -0800, robic0@yahoo.com wrote:
>>
>>>>In my opinion, Perl is NOT good for stream parsing of
>>>>strings because the only powerful tool in Perl for that
>>>>is Regular Expressions (filters/pattern matching). 
>>>>Though with RE's you do have mechanism's of
>>>>of capturing the non-matching in-stream characters,
>>>>but it usually is, if you have multiple paterns,
>>>>very slow and itterative as opposed to a very robust
>>>>C++ class like CString. You however, are doing 
>>>>stream parsing and not pattern matching. And,
>>>>given you are keying on a single escape character
>>>>(although it could be others combined, as well)
>>>>I believe your method is "better" than the regex
>>>>suggested by others. The reason being that your 
>>>>methid is infinetly expandable which would leave
>>>>regex methods far behind when it comes to stream
>>>>parsing.
>>>>
>>>>Well done!
>>> Just want to add that sometimes in Perl it would
>>> be nice to be able to index and adress, ie:
>>> change and modify a single character in a string,
>>> known only by its position in the array of 
>>> characters. Or embed a string in a string, or
>>> delete the same. To "index" a character in 
>>> would be heaven. Maybe this can be done without
>>> having to turn a string into an array of characters
>>> then back into a string. I haven't seen it.
>>> It would be nice to have the power to index a
>>> string even if Perl doesen't know pointers.
>>> Makes you wonder if "substr" is an intrinsic.
>>
>>substr() is exactly the tool for that. And it's often overlooked that
>>substr returns a lvalue:
>>
>>    my $str = "abc";
>>    my $c = \substr $str, 1, 1;
>>    $$c = uc($$c);
>>    print $str;
>>    __END__
>>    aBc
>>
>>That translates quite easily into C:
>>
>>    #include <ctype.h>
>>    #include <stdio.h>
>>
>>    ...
>>    
>>    char str[] = "abc";
>>    char *c = str + 1;
>>    *c = toupper(*c);
>>    printf("%s", str);
>>    
>>That's not quite as convenient as doing
>>
>>    str[1] = toupper(str[1]);
>>
>>but behold this:
>>
>>    substr($str, 1, 1) =~ tr/a-z/A-Z/;
>>    
>>The string may even grow when using substr():
>>
>>    my $str = "abc";
>>    substr($str, 1, 1, "bbb");
>>    print $str;
>>    __END__
>>    abbbc
>>
>>Or even:
>>
>>    my $str = "abc";
>>    substr($str, 1, 1) .= "bb";
>>    print $str;
>>    __END__
>>    abbbc
>>
>>Try that in C. ;-)
>>
>>Perl could even be made to look more like C with a little overload trickery:
>>
>>    package StrArray;
>>
>>    use overload '""' => sub { return join '', @{+shift} };
>>
>>    sub import {
>>	shift;
>>	overload::constant q => sub { 
>>	    return "\n" if $_[0] eq '\n';
>>	    return bless [ split //, shift ] => __PACKAGE__;
>>	};
>>    }
>>    1;
>>    __END__
>>
>>And now:
>>
>>    use StrArray;
>>    my $str = "abc";
>>    
>>    for my $i (0 .. length($str) - 1) {
>>	print $str->[$i], "\n";
>>    }
>>
>>    splice @$str, 1, 0, qw/d e f/;
>>    print $str, "\n";
>>    __END__
>>    a
>>    b
>>    c
>>    adefbc
>>
>>I'd never recommend using that in production code but it's a nice
>>showcase for some of Perl's abilities.
>>
>>Tassilo
>
>Yeah, I will revisit this one. You pass through to the Perl source.
>I'll post my C++ intrinsic type overloads tommorrow, ie:
>double, float, int, string and all possible operators. From back in
>the days when I didn't know what Perl was and had to do it all in 
>C++. Its bad though now, shifting to Perl has lessened my C++.
>I think its syntax and style has erroded my skills for the
>other languages I "think" are still in my head (C++).  Man o man...


Sorry for the delay, I got so many irons in the fire.
This should start you out. Some mis-nombers there on double, float,
int, classes. Its not derrived! The CString is derrived.
Also, note that on the intrinsic types, NOT all overrided. Just 
the ones I needed at the time, add at your leisure. This was along
time ago. I've forgotten more than most here will ever learn.
But I'm not so far removed from any of it. I know its not 
relavent to Perl, however, this is just for you Tassilo!
Ps. I'm just positing the CStringEx and Double class.
I'll post the rest later. Just keep it on your hard drive.
Trust me its valuable. If you wonder what its useful for
just ask, hehe !!!

(no attachments, rename cut-paste to proper C++ name
convention.

This is my gift to you guys!! Thx.......

// StringExSel.h: interface for the CStringExSel class.
//
//////////////////////////////////////////////////////////////////////

#if
!defined(AFX_STRINGEXSEL_H__22B385B3_4DFF_11D4_B387_00010227EF90__INCLUDED_)
#define
AFX_STRINGEXSEL_H__22B385B3_4DFF_11D4_B387_00010227EF90__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CStringExSel : public CString
{
public:

	// constructs empty CStringEx
	CStringExSel();
	// copy constructor's
	// from a CString
	CStringExSel(const CString& stringSrc);
	// from a single character
	CStringExSel(TCHAR ch, int nRepeat = 1);
	// from an ANSI string (converts to TCHAR)
	CStringExSel(LPCSTR lpsz);
	// from a UNICODE string (converts to TCHAR)
	CStringExSel(LPCWSTR lpsz);
	// subset of characters from an ANSI string (converts to
TCHAR)
	CStringExSel(LPCSTR lpch, int nLength);
	// subset of characters from a UNICODE string (converts to
TCHAR)
	CStringExSel(LPCWSTR lpch, int nLength);
	// from unsigned characters
	CStringExSel(const unsigned char* psz);

	virtual ~CStringExSel();

	// overloaded assignment
	// ref-counted copy from another CString
	const CStringExSel& operator=(const CString& stringSrc);
	// set string content to single character
	const CStringExSel& operator=(TCHAR ch);
#ifdef _UNICODE
	const CStringExSel& operator=(char ch);
#endif
	// copy string content from ANSI string (converts to TCHAR)
	const CStringExSel& operator=(LPCSTR lpsz);
	// copy string content from UNICODE string (converts to TCHAR)
	const CStringExSel& operator=(LPCWSTR lpsz);
	// copy string content from unsigned chars
	const CStringExSel& operator=(const unsigned char* psz);

	// string concatenation
	// concatenate from another CString
	const CStringExSel& operator+=(const CString& string);
	// concatenate a single character
	const CStringExSel& operator+=(TCHAR ch);
#ifdef _UNICODE
	// concatenate an ANSI character after converting it to TCHAR
	const CStringExSel& operator+=(char ch);
#endif
	// concatenate a UNICODE character after converting it to
TCHAR
	const CStringExSel& operator+=(LPCTSTR lpsz);


	//////////////////////////////////////////////////////////////
	// Start of custom String derived class data/operations
	//////////////////////////////////////////////////////////////

	// I/O 
	// input and output
#ifdef _DEBUG
	friend CDumpContext& AFXAPI operator<<(CDumpContext& dc, const
CStringExSel& string);
#endif
	friend CArchive& AFXAPI operator<<(CArchive& ar, const
CStringExSel& string);
	friend CArchive& AFXAPI operator>>(CArchive& ar, CStringExSel&
string);
	void DcDumpExtra(CDumpContext& dc);
	void ArSaveExtra(CArchive& ar);
	void ArLoadExtra(CArchive& ar);

	// init's
	void InitStringExSel();
	void InitStringExSel(const CString& sRptTag, const CString&
src );

	// copy constructor's
	CStringExSel(const CStringExSel& stringSrc);
	// overloaded assignment's
	const CStringExSel& operator=(const CStringExSel& stringSrc);


	// data
	CString strSelRptTag;
	static CString sExtraTagTxt;  // Text to be appended to tag

	void GetSelectionReportData(CMapStringToOb *pMapObject, int
iMode);

};

#endif //
!defined(AFX_STRINGEXSEL_H__22B385B3_4DFF_11D4_B387_00010227EF90__INCLUDED_)

// StringExSel.cpp: implementation of the CStringExSel class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "StringExSel.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif



// Input and Output (stream archive/dumps)
#ifdef _DEBUG
CDumpContext& AFXAPI operator<<(CDumpContext& dc, const CStringExSel&
string)
{
	dc << ((CString &)(string));
	((CStringExSel&)(string)).DcDumpExtra(dc);
	return dc;
}
#endif
CArchive& AFXAPI operator<<(CArchive& ar, const CStringExSel& string)
{
	ar << ((CString &)(string));
	((CStringExSel&)(string)).ArSaveExtra(ar);
	return ar;
}
CArchive& AFXAPI operator>>(CArchive& ar, CStringExSel& string)
{
	ar >> ((CString &)(string));
	string.ArLoadExtra(ar);
	return ar;
}


//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CStringExSel::CStringExSel()
{
	InitStringExSel();
}

// Copy constructor from CString
CStringExSel::CStringExSel(const CString& stringSrc)
{
	InitStringExSel();
	CString::CString(stringSrc);
}

// from a single character
CStringExSel::CStringExSel(TCHAR ch, int nRepeat)
{
	InitStringExSel();
	CString::CString(ch, nRepeat);
}

// from an ANSI string (converts to TCHAR)
CStringExSel::CStringExSel(LPCSTR lpsz)
{
	InitStringExSel();
	CString::CString(lpsz);
}

// from a UNICODE string (converts to TCHAR)
CStringExSel::CStringExSel(LPCWSTR lpsz)
{
	InitStringExSel();
	CString::CString(lpsz);
}

// subset of characters from an ANSI string (converts to TCHAR)
CStringExSel::CStringExSel(LPCSTR lpch, int nLength)
{
	InitStringExSel();
	CString::CString(lpch, nLength);
}

// subset of characters from a UNICODE string (converts to TCHAR)
CStringExSel::CStringExSel(LPCWSTR lpch, int nLength)
{
	InitStringExSel();
	CString::CString(lpch, nLength);
}

// from unsigned characters
CStringExSel::CStringExSel(const unsigned char* psz)
{
	InitStringExSel();
	CString::CString(psz);
}


CStringExSel::~CStringExSel()
{

}


// CString overloads
// --------------------

const CStringExSel& CStringExSel::operator=(const CString& stringSrc)
{
	CString::operator=(stringSrc);
	return *this;
}

// set string content to single character
const CStringExSel& CStringExSel::operator=(TCHAR ch)
{
	CString::operator=(ch);
	return *this;
}

#ifdef _UNICODE
const CStringExSel& CStringExSel::operator=(char ch)
{
	CString::operator=(ch);
	return *this;
}
#endif

// copy string content from ANSI string (converts to TCHAR)
const CStringExSel& CStringExSel::operator=(LPCSTR lpsz)
{
	CString::operator=(lpsz);
	return *this;
}

// copy string content from UNICODE string (converts to TCHAR)
const CStringExSel& CStringExSel::operator=(LPCWSTR lpsz)
{
	CString::operator=(lpsz);
	return *this;
}

// copy string content from unsigned chars
const CStringExSel& CStringExSel::operator=(const unsigned char* psz)
{
	CString::operator=(psz);
	return *this;
}

// CString concatenation
// ---------------------------------

// concatenate from another CString
const CStringExSel& CStringExSel::operator+=(const CString& string)
{
	CString::operator+=(string);
	return *this;
}

// concatenate a single character
const CStringExSel& CStringExSel::operator+=(TCHAR ch)
{
	CString::operator+=(ch);
	return *this;
}

#ifdef _UNICODE
// concatenate an ANSI character after converting it to TCHAR
const CStringExSel& CStringExSel::operator+=(char ch)
{
	CString::operator+=(ch);
	return *this
}
#endif
// concatenate a UNICODE character after converting it to TCHAR
const CStringExSel& CStringExSel::operator+=(LPCTSTR lpsz)
{
	CString::operator+=(lpsz);
	return *this;
}


//////////////////////////////////////////////////////////////
// Start of custom String derived class data/operations
//////////////////////////////////////////////////////////////

void CStringExSel::DcDumpExtra(CDumpContext& dc)
{
	dc << strSelRptTag;
}

void CStringExSel::ArSaveExtra(CArchive& ar)
{
	ar << strSelRptTag;
}

void CStringExSel::ArLoadExtra(CArchive& ar)
{
	ar >> strSelRptTag;
}

void CStringExSel::InitStringExSel()
{
	*((CString*) this) = _T(""); 
	strSelRptTag = _T("");
}

void CStringExSel::InitStringExSel(const CString& sRptTag, const
CString& src)
{
	*((CString*) this) = src; 
	strSelRptTag = sRptTag;
}

// Copy constructor from CStringExSel
CStringExSel::CStringExSel(const CStringExSel& stringSrc)
{
	CString::operator =(stringSrc);
	// add local assignment here ...
	if( !stringSrc.strSelRptTag.IsEmpty() )
		strSelRptTag = stringSrc.strSelRptTag;
}

// ref-counted copy from another CStringExSel
const CStringExSel & CStringExSel::operator =(const CStringExSel
&stringSrc)
{
	CString::operator =(stringSrc);
	// add local assignment here ...
	if( !stringSrc.strSelRptTag.IsEmpty() )
		strSelRptTag = stringSrc.strSelRptTag;
	return *this;
}

void CStringExSel::GetSelectionReportData(CMapStringToOb *pMapObject,
int iMode)
{
	CString strValue = *this;
	CString strKey;
	CStringArray* pzSelectionReportRecord;

	if( !strSelRptTag.IsEmpty())// && !strValue.IsEmpty())// ||
iMode != 0 )
	{
		pzSelectionReportRecord = new CStringArray;
		pzSelectionReportRecord->SetSize( 1, 1 );
		pzSelectionReportRecord->SetAt( 0, strValue );
		strKey = strSelRptTag;
		pMapObject->SetAt( strKey, pzSelectionReportRecord );
	}
}

// DoubleExSel.h: interface for the CDoubleExSel class.
//
//////////////////////////////////////////////////////////////////////

#if
!defined(AFX_DOUBLEEXSEL_H__5EDAD435_5114_11D4_B389_00010227EF90__INCLUDED_)
#define
AFX_DOUBLEEXSEL_H__5EDAD435_5114_11D4_B389_00010227EF90__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CDoubleExSel  
{
public:
	CDoubleExSel();

public:

	// copy constructor's
	CDoubleExSel(double doubleVal);
		
	virtual ~CDoubleExSel();

	// overloaded assignment
	const CDoubleExSel& operator=(double doubleVal);

	// overloaded inequalities
	int operator==(double f) {return dblValue == f ? 1 : 0;};
	int operator!=(double f) {return dblValue != f ? 1 : 0;};
	int operator>=(double f) {return dblValue >= f ? 1 : 0;};
	int operator<=(double f) {return dblValue <= f ? 1 : 0;};
	int operator<(double f) {return dblValue < f ? 1 : 0;};
	int operator>(double f) {return dblValue > f ? 1 : 0;};

	//////////////////////////////////////////////////////////////
	// Start of custom double derived class data/operations
	//////////////////////////////////////////////////////////////

	// I/O 
	// input and output
#ifdef _DEBUG
	friend CDumpContext& AFXAPI operator<<(CDumpContext& dc, const
CDoubleExSel& doubleExSelSrc);
#endif
	friend CArchive& AFXAPI operator<<(CArchive& ar, const
CDoubleExSel& doubleExSelSrc);
	friend CArchive& AFXAPI operator>>(CArchive& ar, CDoubleExSel&
doubleExSelSrc);
	void DcDumpExtra(CDumpContext& dc);
	void ArSaveExtra(CArchive& ar);
	void ArLoadExtra(CArchive& ar);

	// init
	void InitDoubleExSel();
	void InitDoubleExSel(CString sRptTag, double dblval );

	// copy constructor's
	CDoubleExSel(const CDoubleExSel& doubleExSelSrc);
	// overloaded assignment
	const CDoubleExSel& operator=(const CDoubleExSel&
doubleExSelSrc);

	// overloaded inequalities
	int operator==(const CDoubleExSel& f) {return dblValue ==
f.dblValue ? 1 : 0;};
	int operator!=(const CDoubleExSel& f) {return dblValue !=
f.dblValue ? 1 : 0;};
	int operator>=(const CDoubleExSel& f) {return dblValue >=
f.dblValue ? 1 : 0;};
	int operator<=(const CDoubleExSel& f) {return dblValue <=
f.dblValue ? 1 : 0;};
	int operator<(const CDoubleExSel& f) {return dblValue <
f.dblValue ? 1 : 0;};
	int operator>(const CDoubleExSel& f) {return dblValue >
f.dblValue ? 1 : 0;};

	// data
	double dblValue;
	CString	strSelRptTag_VAL;

	void GetSelectionReportData(CMapStringToOb *pMapObject, int
iMode, CString sfmt = _T(""));
};

#endif //
!defined(AFX_DOUBLEEXSEL_H__5EDAD435_5114_11D4_B389_00010227EF90__INCLUDED_)

// DoubleExSel.cpp: implementation of the CDoubleExSel class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "DoubleExSel.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

// Input and Output (stream archive/dumps)
#ifdef _DEBUG
CDumpContext& AFXAPI operator<<(CDumpContext& dc, const CDoubleExSel&
doubleExSel)
{
	dc << ((CDoubleExSel&)(doubleExSel)).dblValue;
	((CDoubleExSel &)(doubleExSel)).DcDumpExtra(dc);
	return dc;
}
#endif
CArchive& AFXAPI operator<<(CArchive& ar, const CDoubleExSel&
doubleExSel)
{
	ar << ((CDoubleExSel&)(doubleExSel)).dblValue;
	((CDoubleExSel &)(doubleExSel)).ArSaveExtra(ar);
	return ar;
}
CArchive& AFXAPI operator>>(CArchive& ar, CDoubleExSel& doubleExSel)
{
	ar >> ((CDoubleExSel&)(doubleExSel)).dblValue;
	((CDoubleExSel &)(doubleExSel)).ArLoadExtra(ar);
	return ar;
}


//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CDoubleExSel::CDoubleExSel()
{
	dblValue = 0.0;
	strSelRptTag_VAL = _T("");
}

// copy constructor's
CDoubleExSel::CDoubleExSel(double doubleVal)
{
	dblValue = doubleVal;
	strSelRptTag_VAL = _T("");
}

CDoubleExSel::~CDoubleExSel()
{
}

// overloaded assignment
const CDoubleExSel& CDoubleExSel::operator=(double doubleVal)
{
	dblValue = doubleVal;
	return *this;
}



//////////////////////////////////////////////////////////////
// Start of custom double derived class data/operations
//////////////////////////////////////////////////////////////

void CDoubleExSel::DcDumpExtra(CDumpContext& dc)
{
	dc << strSelRptTag_VAL;
}

void CDoubleExSel::ArSaveExtra(CArchive& ar)
{
	ar << strSelRptTag_VAL;
}

void CDoubleExSel::ArLoadExtra(CArchive& ar)
{
	ar >> strSelRptTag_VAL;
}

void CDoubleExSel::InitDoubleExSel()
{
	dblValue = 0.0;
	strSelRptTag_VAL = _T("");
}

void CDoubleExSel::InitDoubleExSel(CString sRptTag, double dblval)
{
	dblValue = dblval;
	strSelRptTag_VAL = sRptTag;
}

// copy constructor's
CDoubleExSel::CDoubleExSel(const CDoubleExSel& doubleExSrc)
{
	InitDoubleExSel();
	dblValue = doubleExSrc.dblValue;
	// add local assignment here ...
	if( !doubleExSrc.strSelRptTag_VAL.IsEmpty() )
		strSelRptTag_VAL = doubleExSrc.strSelRptTag_VAL;
}

// overloaded assignment
const CDoubleExSel& CDoubleExSel::operator=(const CDoubleExSel&
doubleExSrc)
{
	dblValue = doubleExSrc.dblValue;
	// add local assignment here ...
	if( !doubleExSrc.strSelRptTag_VAL.IsEmpty() )
		strSelRptTag_VAL = doubleExSrc.strSelRptTag_VAL;
	return *this;
}

void CDoubleExSel::GetSelectionReportData(CMapStringToOb *pMapObject,
int iMode, CString sfmt)
{
	CString str_dblValue;
	if ( !sfmt.IsEmpty() )
		str_dblValue.Format(sfmt, dblValue);
	else
		str_dblValue.Format(_T("%.0f"), dblValue); 

	CString strKey;
	CStringArray* pzSelectionReportRecord;

	if( !strSelRptTag_VAL.IsEmpty())// &&
!str_dblValue.IsEmpty())// || iMode != 0 )
	{
		pzSelectionReportRecord = new CStringArray;
		pzSelectionReportRecord->SetSize( 1, 1 );
		pzSelectionReportRecord->SetAt( 0, str_dblValue );
		strKey = strSelRptTag_VAL;
		pMapObject->SetAt( strKey, pzSelectionReportRecord );
	}
}

// FloatExSel.h: interface for the CFloatExSelSel class.
//
//////////////////////////////////////////////////////////////////////

#if
!defined(AFX_FLOATEXSEL_H__5EDAD434_5114_11D4_B389_00010227EF90__INCLUDED_)
#define
AFX_FLOATEXSEL_H__5EDAD434_5114_11D4_B389_00010227EF90__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CFloatExSel  
{
public:
	CFloatExSel();

public:

	// copy constructor's
	CFloatExSel(float floatVal);
		
	virtual ~CFloatExSel();

	// overloaded assignment
	const CFloatExSel& operator=(float floatVal);

	// overloaded inequalities
	int operator==(float f) {return fValue == f ? 1 : 0;};
	int operator!=(float f) {return fValue != f ? 1 : 0;};
	int operator>=(float f) {return fValue >= f ? 1 : 0;};
	int operator<=(float f) {return fValue <= f ? 1 : 0;};
	int operator<(float f) {return fValue < f ? 1 : 0;};
	int operator>(float f) {return fValue > f ? 1 : 0;};

	//////////////////////////////////////////////////////////////
	// Start of custom float derived class data/operations
	//////////////////////////////////////////////////////////////

	// I/O 
	// input and output
#ifdef _DEBUG
	friend CDumpContext& AFXAPI operator<<(CDumpContext& dc, const
CFloatExSel& floatExSelSrc);
#endif
	friend CArchive& AFXAPI operator<<(CArchive& ar, const
CFloatExSel& floatExSelSrc);
	friend CArchive& AFXAPI operator>>(CArchive& ar, CFloatExSel&
floatExSelSrc);
	void DcDumpExtra(CDumpContext& dc);
	void ArSaveExtra(CArchive& ar);
	void ArLoadExtra(CArchive& ar);

	// init
	void InitFloatExSel();
	void InitFloatExSel(CString sRptTag, float fval);

	// copy constructor's
	CFloatExSel(const CFloatExSel& floatExSelSrc);
	// overloaded assignment
	const CFloatExSel& operator=(const CFloatExSel&
floatExSelSrc);

	// overloaded inequalities
	int operator==(const CFloatExSel &f) {return fValue ==
f.fValue ? 1 : 0;};
	int operator!=(const CFloatExSel &f) {return fValue !=
f.fValue ? 1 : 0;};
	int operator>=(const CFloatExSel &f) {return fValue >=
f.fValue ? 1 : 0;};
	int operator<=(const CFloatExSel &f) {return fValue <=
f.fValue ? 1 : 0;};
	int operator<(const CFloatExSel &f) {return fValue < f.fValue
? 1 : 0;};
	int operator>(const CFloatExSel &f) {return fValue > f.fValue
? 1 : 0;};

	// data
	float fValue;
	CString strSelRptTag_FVAL;

	void GetSelectionReportData(CMapStringToOb *pMapObject, int
iMode, CString sfmt = _T(""));
};

#endif //
!defined(AFX_FLOATEXSEL_H__5EDAD434_5114_11D4_B389_00010227EF90__INCLUDED_)

// FloatExSel.cpp: implementation of the CFloatExSelSel class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "FloatExSel.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

// Input and Output (stream archive/dumps)
#ifdef _DEBUG
CDumpContext& AFXAPI operator<<(CDumpContext& dc, const CFloatExSel&
floatExSel)
{
	dc << ((CFloatExSel&)(floatExSel)).fValue;
	((CFloatExSel &)(floatExSel)).DcDumpExtra(dc);
	return dc;
}
#endif
CArchive& AFXAPI operator<<(CArchive& ar, const CFloatExSel&
floatExSel)
{
	ar << ((CFloatExSel&)(floatExSel)).fValue;
	((CFloatExSel &)(floatExSel)).ArSaveExtra(ar);
	return ar;
}
CArchive& AFXAPI operator>>(CArchive& ar, CFloatExSel& floatExSel)
{
	ar >> ((CFloatExSel&)(floatExSel)).fValue;
	((CFloatExSel &)(floatExSel)).ArLoadExtra(ar);
	return ar;
}


//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CFloatExSel::CFloatExSel()
{

}

CFloatExSel::~CFloatExSel()
{

}

// copy constructor's
CFloatExSel::CFloatExSel(float floatVal)
{
	InitFloatExSel();
	fValue = floatVal;
}


// overloaded assignment
const CFloatExSel& CFloatExSel::operator=(float floatVal)
{
	fValue = floatVal;
	return *this;
}


//////////////////////////////////////////////////////////////
// Start of custom float derived class data/operations
//////////////////////////////////////////////////////////////

void CFloatExSel::DcDumpExtra(CDumpContext& dc)
{
	dc << strSelRptTag_FVAL;
}

void CFloatExSel::ArSaveExtra(CArchive& ar)
{
	ar << strSelRptTag_FVAL;
}

void CFloatExSel::ArLoadExtra(CArchive& ar)
{
	ar >> strSelRptTag_FVAL;
}

void CFloatExSel::InitFloatExSel()
{
	fValue = 0.0;
	strSelRptTag_FVAL = _T("");
}

void CFloatExSel::InitFloatExSel(CString sRptTag, float fval)
{
	fValue = fval;
	strSelRptTag_FVAL = sRptTag;
}

// copy constructor's
CFloatExSel::CFloatExSel(const CFloatExSel& floatExSrc)
{
	InitFloatExSel();
	fValue = floatExSrc.fValue;
	// add local assignment here ...
	if( !floatExSrc.strSelRptTag_FVAL.IsEmpty() )
		strSelRptTag_FVAL = floatExSrc.strSelRptTag_FVAL;
}

// overloaded assignment
const CFloatExSel& CFloatExSel::operator=(const CFloatExSel&
floatExSrc)
{
	fValue = floatExSrc.fValue;
	// add local assignment here ...
	if( !floatExSrc.strSelRptTag_FVAL.IsEmpty() )
		strSelRptTag_FVAL = floatExSrc.strSelRptTag_FVAL;
	return *this;
}

void CFloatExSel::GetSelectionReportData(CMapStringToOb *pMapObject,
int iMode, CString sfmt)
{
	CString str_fValue;
	if ( !sfmt.IsEmpty() )
		str_fValue.Format(sfmt, fValue);
	else
		str_fValue.Format(_T("%.0f"), fValue); 

	CString strKey;
	CStringArray* pzSelectionReportRecord;

	if(!strSelRptTag_FVAL.IsEmpty())// !str_fValue.IsEmpty() ||
iMode != 0 )
	{
		pzSelectionReportRecord = new CStringArray;
		pzSelectionReportRecord->SetSize( 1, 1 );
		pzSelectionReportRecord->SetAt( 0, str_fValue );
		strKey = strSelRptTag_FVAL;
		pMapObject->SetAt( strKey, pzSelectionReportRecord );
	}
}

// IntExSel.h: interface for the CIntExSel class.
//
//////////////////////////////////////////////////////////////////////

#if
!defined(AFX_INTEXSEL_H__0B369813_5125_11D4_B389_00010227EF90__INCLUDED_)
#define
AFX_INTEXSEL_H__0B369813_5125_11D4_B389_00010227EF90__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CIntExSel  
{
public:
	CIntExSel();

	// copy constructor's
	CIntExSel(int intVal);
		
	virtual ~CIntExSel();

	// overloaded assignment
	CIntExSel& operator=(int intVal);

	// overloaded inequalities
	int operator==(int i) {return iValue == i ? 1 : 0;};
	int operator!=(int i) {return iValue != i ? 1 : 0;};
	int operator>=(int i) {return iValue >= i ? 1 : 0;};
	int operator<=(int i) {return iValue <= i ? 1 : 0;};
	int operator<(int i) {return iValue < i ? 1 : 0;};
	int operator>(int i) {return iValue > i ? 1 : 0;};


	//////////////////////////////////////////////////////////////
	// Start of custom int derived class data/operations
	//////////////////////////////////////////////////////////////

	// I/O 
	// input and output
#ifdef _DEBUG
	friend CDumpContext& AFXAPI operator<<(CDumpContext& dc, const
CIntExSel& intExSelSrc);
#endif
	friend CArchive& AFXAPI operator<<(CArchive& ar, const
CIntExSel& intExSelSrc);
	friend CArchive& AFXAPI operator>>(CArchive& ar, CIntExSel&
intExSelSrc);
	void DcDumpExtra(CDumpContext& dc);
	void ArSaveExtra(CArchive& ar);
	void ArLoadExtra(CArchive& ar);

	// init
	void InitIntExSel();
	void InitIntExSel(CString sRptTag, int ival);

	// copy constructor's
	CIntExSel(const CIntExSel& intExSelSrc);
	// overloaded assignment
	const CIntExSel& operator=(const CIntExSel& intExSelSrc);

	int operator==(const CIntExSel& i) {return iValue == i.iValue
? 1 : 0;};
	int operator!=(const CIntExSel& i) {return iValue != i.iValue
? 1 : 0;};
	int operator>=(const CIntExSel& i) {return iValue >= i.iValue
? 1 : 0;};
	int operator<=(const CIntExSel& i) {return iValue <= i.iValue
? 1 : 0;};
	int operator<(const CIntExSel& i) {return iValue < i.iValue ?
1 : 0;};
	int operator>(const CIntExSel& i) {return iValue > i.iValue ?
1 : 0;};

	// data
	int iValue;
	CString strSelRptTag_INT;

	void GetSelectionReportData(CMapStringToOb *pMapObject, int
iMode, CString sfmt = _T(""));

};

#endif //
!defined(AFX_INTEXSEL_H__0B369813_5125_11D4_B389_00010227EF90__INCLUDED_)

// IntExSel.cpp: implementation of the CIntExSel class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "IntExSel.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

// Input and Output (stream archive/dumps)
#ifdef _DEBUG
CDumpContext& AFXAPI operator<<(CDumpContext& dc, const CIntExSel&
intExSel)
{
	dc << ((CIntExSel&)(intExSel)).iValue;
	((CIntExSel &)(intExSel)).DcDumpExtra(dc);
	return dc;
}
#endif
CArchive& AFXAPI operator<<(CArchive& ar, const CIntExSel& intExSel)
{
	ar << ((CIntExSel&)(intExSel)).iValue;
	((CIntExSel &)(intExSel)).ArSaveExtra(ar);
	return ar;
}
CArchive& AFXAPI operator>>(CArchive& ar, CIntExSel& intExSel)
{
	ar >> ((CIntExSel&)(intExSel)).iValue;
	((CIntExSel &)(intExSel)).ArLoadExtra(ar);
	return ar;
}


//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CIntExSel::CIntExSel()
{
	iValue = 0;
	strSelRptTag_INT = _T("");
}

CIntExSel::~CIntExSel()
{
}

// copy constructor's
CIntExSel::CIntExSel(int intVal)
{
	InitIntExSel();
	iValue = intVal;
}


// overloaded assignment
CIntExSel& CIntExSel::operator=(int intVal)
{
	iValue = intVal;
	return *this;
}


//////////////////////////////////////////////////////////////
// Start of custom int derived class data/operations
//////////////////////////////////////////////////////////////

void CIntExSel::DcDumpExtra(CDumpContext& dc)
{
	dc << strSelRptTag_INT;
}

void CIntExSel::ArSaveExtra(CArchive& ar)
{
	ar << strSelRptTag_INT;
}

void CIntExSel::ArLoadExtra(CArchive& ar)
{
	ar >> strSelRptTag_INT;
}

void CIntExSel::InitIntExSel()
{
	iValue = 0;
	strSelRptTag_INT = _T("");
}

void CIntExSel::InitIntExSel(CString sRptTag, int ival)
{
	iValue = ival;
	strSelRptTag_INT = sRptTag;
}

// copy constructor's
CIntExSel::CIntExSel(const CIntExSel& intExSrc)
{
	InitIntExSel();
	iValue = intExSrc.iValue;
	// add local assignment here ...
	if( !intExSrc.strSelRptTag_INT.IsEmpty() )
		strSelRptTag_INT = intExSrc.strSelRptTag_INT;
}

// overloaded assignment
const CIntExSel& CIntExSel::operator=(const CIntExSel& intExSrc)
{
	iValue = intExSrc.iValue;
	// add local assignment here ...
	if( !intExSrc.strSelRptTag_INT.IsEmpty() )
		strSelRptTag_INT = intExSrc.strSelRptTag_INT;
	return *this;
}

void CIntExSel::GetSelectionReportData(CMapStringToOb *pMapObject, int
iMode, CString sfmt)
{
	CString str_iValue;
	if ( !sfmt.IsEmpty() )
		str_iValue.Format(sfmt, iValue);
	else
		str_iValue.Format(_T("%d"), iValue); 

	CString strKey;
	CStringArray* pzSelectionReportRecord;

	if( !strSelRptTag_INT.IsEmpty() && !str_iValue.IsEmpty())// ||
iMode != 0 )
	{
		pzSelectionReportRecord = new CStringArray;
		pzSelectionReportRecord->SetSize( 1, 1 );
		pzSelectionReportRecord->SetAt( 0, str_iValue );
		strKey = strSelRptTag_INT;
		pMapObject->SetAt( strKey, pzSelectionReportRecord );
	}
}





------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 8659
***************************************


home help back first fref pref prev next nref lref last post