Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6163541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:50:34+00:00 2026-05-23T21:50:34+00:00

Please refer to the following code: // // CacheObjectManagerImpl.h #import <Foundation/Foundation.h> //#import CacheObject.h @class

  • 0

Please refer to the following code:

 //
//  CacheObjectManagerImpl.h

#import <Foundation/Foundation.h>
//#import "CacheObject.h"

@class CacheObject;

@protocol ICacheObjectManager <NSObject>

typedef enum {
    kSTRING,
    kBYTEARRAY,
    kCACHABLE,
    kSTRINGVALUE
} CacheObjType;

CacheObjType *CacheObjectType;

@required
//- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url 
- (CacheObject *) createCacheObject:(NSString *)data url:(BOOL*)isURL savefile:(BOOL*)saveToFile downloadmgr:(ICacheObjDownloadMgr*) downloadMgr;
//-(CacheObject*) createCacheObject: (Cachable*) dataObject;
@end


@interface CacheObjectManagerImpl : NSObject {

}

@property(nonatomic,assign) id <ICacheObjectManager> delegate;

@end

The next file which uses the above class CacheObject:

//
//  CacheManagerImpl.h

#import <Foundation/Foundation.h>
//#import "CacheObject.h"
//#import "CacheObjectManagerImpl.h"


@class CacheObject;
@class CacheObjectManagerImpl;


@protocol ICachePurgeLogic <NSObject>

@required

- (void)runPurge: (NSDictionary*)cacheMap;

@end


@protocol ICacheManager <NSObject>

@required
- (void) put:(NSString*)key cacheobj:(CacheObject*)cacheObj;
- (CacheObject*)get: (NSString*)key;
- (void) clearEntireCache;
- (void) remove: (NSString*)key;
- (void) purge;
- (void) setCachePurgeCustomMgr: (ICachePurgeLogic*)cachePurgeLogic; **//ERROR: error: expected ')' before 'ICachePurgeLogic'**

@end

@interface CacheManagerImpl : NSObject {

    NSNumber *timeToLive;
    NSDictionary *cacheMap;
    ICacheObjectManager *cacheObjMgr; **//ERROR: error: expected specifier-qualifier-list before 'ICacheObjectManager'**

    ICachePurgeLogic *purgeManager; **//ERROR: error: expected specifier-qualifier-list before 'ICachePurgeLogic'**

}

@property(nonatomic,assign) id <ICacheManager> delegate;

- (void) getCacheManagerInstance: (NSNumber*) timeToLive;
- (ICacheObjectManager*) createCacheObjManager; **//ERROR: error: expected ')' before 'ICacheObjectManager'**

- (ICacheObjectManager*) getCacheObjManager; **//ERROR: error: expected ')' before 'ICacheObjectManager'**

@end

I am unable to understand why I am getting the above errors. If I include the header files, I get more errors due cyclical header includes. What are the possible work arounds for these compiler errors? Or my code is entirely wrong in the sense that I am passing and returning by protocols.

Thanks,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:50:35+00:00Added an answer on May 23, 2026 at 9:50 pm

    I would start by moving your enum declaration and what appears to be an ivar that is a pointer to your declared type out of your protocol. You shouldn’t be declaring types within a protocol declaration. Additionally, if you want to require the classes implementing your protocol to have an object of a certain type, declare a property. Protocols only specify methods that should or need to be implemented.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have question please refer the following code to understand the question. (I removed
Please consider this example class: [Serializable] public class SomeClass { private DateTime _SomeDateTime; public
Please, provide code examples in a language of your choice. Update : No constraints
Please refer to this post. I have become able to configure my web.config file
I am trying to compile the following code on Linux using gcc 4.2: #include
All, Consider the following code: void func(void) { int a; printf (%d, a); }
Please suggest some good resources to start writing Java Web services.
Please read the whole question. I'm not looking for an approach to managing multi-lingual
Please give me the direction of the best guidance on the Entity Framework.
Please bear with me, I'm just learning C++. I'm trying to write my header

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.